# Revision history [back]

When defining a finite field of non-prime order, it is useful to give a name to the generator.

Likewise, when defining a polynomial ring, it is useful to give a name to the polynomial variable.

In the example, GF(2^8, 'a') returns the finite field with $2^8$ elements, with a as the display name of its generator.

And R.<x> = K[] simultaneously defines R as a polynomial ring over the field K, and definds x as its generator, i.e., the polynomial variable.

So x^254 is the monic monomial of degree 254 in this polynomial ring.

When defining a finite field of non-prime order, it is useful to give a name to the generator.

Likewise, when defining a polynomial ring, it is useful to give a name to the polynomial variable.

In the example, GF(2^8, 'a') returns the finite field with $2^8$ elements, with a as the display name of its generator.

And R.<x> = K[] simultaneously defines R as a polynomial ring over the field K, with a polynomial variable that displays as 'x', and definds defines x as its generator, i.e., the the polynomial variable.

So x^254 is the monic monomial of degree 254 in this polynomial ring.

For more, read the documentation or/and the source code for GF:

sage: GF?
sage: GF??


and for PolynomialRing:

sage: PolynomialRing?
sage: PolynomialRing??


Note that R.<x> = K[] is transformed by the Sage preparser into:

sage: preparse("R.<x> = K[]")
"R = K['x']; (x,) = R._first_ngens(1)"