#18266: Conversion from Sage polynomial to gap/libgap
-------------------------------------+-------------------------------------
       Reporter:  vdelecroix         |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.3
      Component:  interfaces         |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Vincent Delecroix  |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/vdelecroix/18266                 |  f1b8bcd98ffadede706ec244975fab07fa3bd942
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by tscrim):

 The problem with unlimited coercion maps is that we get a bad (IMO
 incorrect) error message (this is on `develop`):
 {{{#!sage
 sage: cat = Algebras(QQ).WithBasis().FiniteDimensional()
 sage: C = CombinatorialFreeModule(QQ, ['x','y','z'], category=cat)
 sage: J1 = JordanAlgebra(C, names=['a','b','c'])
 sage: J1.an_element() + gap(2)
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 ...
 TypeError: unsupported operand parent(s) for '+': 'Jordan algebra of Free
 module generated by {'x', 'y', 'z'} over Rational Field' and 'Gap'
 sage: J1.an_element() + pari(2)
 ---------------------------------------------------------------------------
 PariError                                 Traceback (most recent call
 last)
 ...
 PariError: incorrect type in gtos [integer expected] (t_POL)
 }}}
 There should be a conversion, but I think a coercion is far too strong.
 Perhaps we should ask sage-devel?

--
Ticket URL: <https://trac.sagemath.org/ticket/18266#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to