Skip to content

finite field coercion fails for extended fields #14504

Open
@sagetrac-llpamies

Description

@sagetrac-llpamies

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions