Skip to content

finite-field .extension() sets up wrong coercion #33937

@yyyyx4

Description

@yyyyx4

Failing example:

K.<u> = GF(23^4)
L.<v> = K.extension(5)
assert L(u).minpoly() == u.minpoly()

This is because K uses a Conway polynomial, but L doesn't, so the following code in FiniteField.extension() is wrong (introduced in #24195):

                if self.is_conway(): # and E is Conway
                    alpha = E.gen()**((E.order()-1)//(self.order()-1))
                else:
                    alpha = self.modulus().any_root(E)
                try: # to register a coercion map (embedding of self to E)
                    E.register_coercion(self.hom([alpha], codomain=E, check=False))

The mysterious comment "# and E is Conway" tells us exactly what to do to fix the bug.

CC: @kwankyu @videlec

Component: finite rings

Author: Lorenz Panny

Branch/Commit: 3b6be5f

Reviewer: Kwankyu Lee, Frédéric Chapoton

Issue created by migration from https://trac.sagemath.org/ticket/33937

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions