Open
Description
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!'
Component: symbolics
Issue created by migration from https://trac.sagemath.org/ticket/14504