Ask Your Question

Revision history [back]

The error is in the polynomial used to define the field extension.

It should use a polynomial variable over the base field, not a field element.

Try this instead.

sage: GF2.<a> = GF(2)
sage: x = polygen(GF2)
sage: GF4.<b> = GF(4, modulus=x^2 + x + 1)

etc.

The error is in the polynomial used to define the field extension.

It should use a polynomial variable over the base field, not a field element.

Try this instead.One way to define the fields you want might be as follows:

sage: GF2.<a> F2 = GF(2)
sage: x a = polygen(GF2)
polygen(F2)
sage: GF4.<b> F4.<a> = GF(4, modulus=x^2 F2.extension(a^2 + x a + 1)
sage: b = polygen(F4)
sage: F16.<b> = F4.extension(b^2 + b + a)
sage: c = polygen(F16)
sage: F256.<c> = F16.extension(c^2 + c + a*b)

etc.This gives:

sage: F2
Finite Field of size 2
sage: F4
Finite Field in a of size 2^2
sage: F16
Univariate Quotient Polynomial Ring in b over Finite Field in a of size 2^2 with modulus b^2 + b + a
sage: F256
Univariate Quotient Polynomial Ring in c over Univariate Quotient Polynomial Ring in b over Finite Field in a of size 2^2 with modulus b^2 + b + a with modulus c^2 + c + a*b