#13607: bug lorsque l'on veut injecter un élément d'ordre q-1, appartenant à
extension de F_q, dans F_q.
-----------------------------+----------------------------------------------
   Reporter:  frovetta       |             Owner:  robertwb               
       Type:  PLEASE CHANGE  |            Status:  new                    
   Priority:  major          |         Milestone:  sage-5.5               
  Component:  coercion       |          Keywords:  finite fields, coercion
Work issues:                 |   Report Upstream:  N/A                    
  Reviewers:                 |           Authors:  Rovetta Florent        
  Merged in:                 |      Dependencies:                         
   Stopgaps:                 |  
-----------------------------+----------------------------------------------
 {{{
 sage : def element_primitif(K):
           q = K.cardinality()
           j = 0
               while j == 0:
           x = K.random_element()
           if x <> 0 and multiplicative_order(x) == q-1:
               j=1
           return x

 sage :def element_d_ordre_a(K,a):
           q = K.cardinality()
           x = element_primitif(K)
           return x^((q-1)/a)

 sage : q = 25
 sage : K.<d> = GF(q)
 sage : F.<a> = GF(q^6)
 sage : z = element_d_ordre_a(F,q-1);
 # en fait z est un élément (primitif) de K puisque d'ordre q-1

 sage : c = z
 sage : print "c= ", c
 sage : b = K(-c^2)
 sage : print "b = ", b
 sage : print "b = b:", b == -K(c)^2 # normalement sage doit renvoyer True

 c=  4*a^11 + 4*a^10 + 2*a^9 + 3*a^7 + 4*a^6 + 4*a^5 + 3*a^4 + 3*a^3 +
 4*a^2 + 4*a + 3
 b =  3*d + 4
 b = b: False
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13607>
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