#13607: bug dans 5.3 lorsque l'on veut injecter un élément d'ordre q-1, 
appartenant
à une extension de F_q, dans F_q.
-------------------------------------------+--------------------------------
       Reporter:  frovetta                 |         Owner:  robertwb
           Type:  defect                   |        Status:  new     
       Priority:  major                    |     Milestone:  sage-5.5
      Component:  coercion                 |    Resolution:          
       Keywords:  finite fields, coercion  |   Work issues:          
Report Upstream:  N/A                      |     Reviewers:          
        Authors:  Rovetta Florent          |     Merged in:          
   Dependencies:                           |      Stopgaps:          
-------------------------------------------+--------------------------------

Comment (by fwclarke):

 The problem can be illustrated more simply:
 {{{
 sage: q = 25
 sage: K.<d> = GF(q)
 sage: F.<a> = GF(q^6)
 sage: K(a)
 d
 }}}
 This is, of course, nonsense.

 The offending code is at lines 482--494 of `sage-5.3/devel/sage-
 main/sage/rings/finite_rings/element_givaro.pyx`.

 As it says at lines 291--292 of `sage-5.3/devel/sage-
 main/sage/rings/finite_rings/finite_field_givaro.py`:
 {{{
   PARI elements are interpreted as finite field elements; this PARI
 flexibility
   is (absurdly!) liberal
 }}}

 ----

 There is a more mathematical difficulty with what you wish to do, and how
 one could expect Sage to do it.  There are, of course, two embeddings of
 GF(25) into GF(5^12^), with the same image.  Thus  there is no canonical
 way of identifying an element of GF(5^12^) belonging to the subfield of
 order 25 with an element of another field of order 25.

 But it is possible, in a very simple-minded way, to find the two
 candidates:
 {{{
 sage: z = a^10172526
 sage: z.multiplicative_order()
 24
 sage: [[y for y in K if f(y) == z][0] for f in Hom(K, F)]
 [d, 4*d + 1]
 }}}
 Or, much more efficiently,
 {{{
 sage: z.minimal_polynomial().roots(ring=K, multiplicities=False)
 [4*d + 1, d]
 }}}

 ----

 Another point: there's no need to define `element_primitif`; it's built
 in:
 {{{
 sage: K.primitive_element()
 d
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13607#comment:3>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to