#17366: for multivariate polynomial rings, degree method should convert its
argument
-------------------------------------+-------------------------------------
       Reporter:  jhpalmieri         |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.5
      Component:  algebra            |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  John Palmieri      |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/jhpalmieri/degree_convert_element|  65e68e16e2bffc1fcfb6fe5328c6ca5c0695ddbc
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by jhpalmieri):

 Making this change in `multi_polynomial_libsingular.pyx` breaks a doctest
 which is supposed to test exactly this:
 {{{
         The following example is inspired by trac 11652::

             sage: R.<p,q,t> = ZZ[]
             sage: poly = p+q^2+t^3
             sage: poly = poly.polynomial(t)[0]
             sage: poly
             q^2 + p

         There is no canonical coercion from ``R`` to the parent of
 ``poly``, so
         this doesn't work::

             sage: poly.degree(q)
             Traceback (most recent call last):
             ...
             TypeError: argument must canonically coerce to parent
 }}}
 At #11652, there was some debate about this, and the conclusion was that
 coercion was appropriate, not conversion. (In the above example, q
 obviously converts to an element of the parent of `poly`, but there is no
 coercion.)

--
Ticket URL: <http://trac.sagemath.org/ticket/17366#comment:8>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to