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

Comment (by pbruin):

 The problem lies in the ''NTL implementation'' of polynomials over finite
 fields.  This is the default implementation for polynomials over finite
 fields, even though the fields themselves are only implemented via NTL in
 characteristic 2, and via Givaro or PARI otherwise.

 The following example demonstrates this (after applying #8335 plus a patch
 that I will upload shortly):
 {{{
 sage: K.<a> = GF(5^2, conway=True, prefix='z')
 sage: L.<b> = GF(5^4, conway=True, prefix='z')
 sage: type(K)
 <class
 'sage.rings.finite_rings.finite_field_givaro.FiniteField_givaro_with_category'>
 sage: R = PolynomialRing(K, 'x', implementation='NTL')
 sage: S = PolynomialRing(L, 'x', implementation='NTL')
 sage: f = R.gen() + a; f
 x + a
 sage: type(f)
 <type 'sage.rings.polynomial.polynomial_zz_pex.Polynomial_ZZ_pEX'>
 sage: S(f)
 x + b
 sage: R = PolynomialRing(K, 'x', implementation='generic')
 sage: S = PolynomialRing(L, 'x', implementation='generic')
 sage: f = R.gen() + a; f
 x + a
 sage: type(f)
 <class
 
'sage.rings.polynomial.polynomial_element_generic.Polynomial_generic_dense_field'>
 sage: S(f)
 x + b^3 + b^2 + b + 3
 }}}

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