#11239: Incorrect coercion of polynomials over finite fields
-------------------------------------------------+-------------------------
       Reporter:  johanbosman                    |         Owner:  robertwb
           Type:  defect                         |        Status:
       Priority:  major                          |  needs_work
      Component:  coercion                       |     Milestone:
       Keywords:  finite fields, polynomials,    |  sage-5.11
  coercion                                       |    Resolution:
        Authors:  pbruin                         |     Merged in:
Report Upstream:  N/A                            |     Reviewers:
         Branch:                                 |   Work issues:
       Stopgaps:                                 |  Dependencies:  #8335
-------------------------------------------------+-------------------------

Comment (by pbruin):

 Replying to [comment:3 dkrenn]:
 > It seems that everything that can be represented as polynomial is
 converted in that way. The phenomenon also appears with quotient rings:
 >
 > {{{
 > sage: R.<x> = ZZ[]
 > sage: A.<a> = R.quotient(x^3+2); PA.<s> = A[]
 > sage: B.<b> = R.quotient(x^5+3); PB.<t> = B[]
 > sage: f = a*s^3 + a^2*s; f
 > a*s^3 + a^2*s
 > sage: PB(f)
 > b*t^3 + b^2*t
 > }}}
 Debatable as it may seem, this is the behaviour currently described in the
 documentation of `PolynomialQuotientRing_generic._element_constructor_()`.
 Attempting a coercion (`PB.coerce(f)`) instead of a conversion (`PB(f)`)
 does lead to
 {{{
 TypeError: no canonical coercion from Univariate Polynomial Ring in s over
 Univariate Quotient Polynomial Ring in a over Integer Ring with modulus
 x^3 + 2 to Univariate Polynomial Ring in t over Univariate Quotient
 Polynomial Ring in b over Integer Ring with modulus x^5 + 3
 }}}
 as expected.

--
Ticket URL: <http://trac.sagemath.org/ticket/11239#comment:10>
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/groups/opt_out.


Reply via email to