Ticket #8373 (new defect)
finite fields constructed with non-primitive defining polynomial
|Reported by:||rkirov||Owned by:||AlexGhitza|
Consider the following code:
sage: R.<x> = PolynomialRing(GF(2)) sage: K.<a> = GF(16, modulus=x^4+x^3+x^2+x+1) sage: a^5 1
This is all fine mathematically, as long as the user is clear what a is and isn't (it isn't a generator for the multiplicative group of the finite field). So the options as I see them (in increasing difficulty for implementation):
1)GF already checks modulus for irreducibility, just add check for modulus.is_primitive().
2)Rewrite the help for the GF function to indicate that the function does not return a generator necessarily (like in this specific case).
3)Find an actual generator (that might not be the polynomial x) and return that.