#14504: finite field coercion fails for extended fields
-----------------------------+----------------------------------------------
   Reporter:  llpamies       |             Owner:  tbd
       Type:  defect         |            Status:  new
   Priority:  major          |         Milestone:     
  Component:  PLEASE CHANGE  |          Keywords:     
Work issues:                 |   Report Upstream:  N/A
  Reviewers:                 |           Authors:     
  Merged in:                 |      Dependencies:     
   Stopgaps:                 |  
-----------------------------+----------------------------------------------
 The following code works:
 {{{
 sage: ff.<x>=GF(4)
 sage: ff(x+1)
 }}}

 However, if we try to get the element from an expression it fails:
 {{{
 sage: o=var('o')
 sage: ff.<x>=GF(4)
 sage: ff((x*o).coefficient(o))
 TypeError: unable to coerce
 }}}

 This bug only happens for extended fields. You can try it by executing:

 {{{
 for fsize in [2,3,4,5,8]:
     ff.<x>=GF(fsize)
     o=var('o')
     e=(x+1)*o
     e.coefficient(o)
     c = e.coefficient(o)
     try:
         print fsize, ff(c)
     except:
         print fsize, 'extended fields fail!'
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14504>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to