Background on finite fields

The finite fields in GAP are of the form $ \mathbb{F}_{p^k}=GF(p^k)$ , where $ p$ is a prime power and $ k\geq 1$ is an integer. Let's start with something simple: enter $ \mathbb{F}_2$ and $ \mathbb{F}_3$ and print out all their elements.

gap> GF2:=GF(2);
GF(2)
gap> gf2:=Elements(GF2);
[ 0*Z(2), Z(2)^0 ]
gap> GF3:=GF(3);
GF(3)
gap> gf3:=Elements(GF3);
[ 0*Z(3), Z(3)^0, Z(3) ]

What are $ Z(2)$ , $ Z(3)$ ? In general, $ \mathbb{F}_{p^k}^\times$ is a cyclic group. GAP uses this fact and lets $ Z(p^k)$ denote a generator of this cyclic group. If $ k=1$ then giving a generator of $ \mathbb{F}_p^\times = (\mathbb{Z}/p\mathbb{Z})^\times$ is equivalent to giving a primitive root mod $ p$ . In fact, $ Z(p)$ is the smallest primitive root mod $ p$ , as is obtained from the PrimitiveRootMod function. Here's how to verify this for $ p=3,5$ :

gap> PrimitiveRootMod(3);
2
gap> 2*Z(3)^0=Z(3);
true
gap> PrimitiveRootMod(5)*Z(5)^0=Z(5);
true

Onto fields $ \mathbb{F}_{p^k}$ with $ k>1$ .

gap> GF4:=GF(4);
GF(2^2)
gap> gf4:=Elements(GF4);
[ 0*Z(2), Z(2)^0, Z(2^2), Z(2^2)^2 ]
gap> GF7:=GF(7);
GF(7)
gap> GF8:=GF(8);
GF(2^3)
gap> gf8:=Elements(GF8);
[ 0*Z(2), Z(2)^0, Z(2^3), Z(2^3)^2, Z(2^3)^3, Z(2^3)^4, Z(2^3)^5, Z(2^3)^6 ]
gap> GF9:=GF(9);
GF(3^2)
gap> gf9:=Elements(GF9);
[ 0*Z(3), Z(3)^0, Z(3), Z(3^2), Z(3^2)^2, Z(3^2)^3, Z(3^2)^5, Z(3^2)^6, 
  Z(3^2)^7 ]

Note that $ GF(8)$ contains $ GF(2)$ but not $ GF(4)$ . It is a general fact that $ GF(p^m)$ contains $ GF(p^k)$ as a subfield if and only if $ k\vert m$ .

What are Z(2^2), Z(2^3), Z(3^2), ...? They are less easy to explicitly explain. $ Z(p^k)$ is a root of a certain irreducible polynomial mod $ p$ called a Conway polynomial. We can check this in the case $ p^k=8$ in GAP by plugging this supposed root into the polynomial and see if we get 0 or not:

gap> R:=PolynomialRing(GF2,["x"]);
<algebra-with-one over GF(2), with 1 generators>
gap> p:=ConwayPolynomial(2,3);
Z(2)^0+x+x^3
gap> Value(p,Z(8));
0*Z(2)

This tells us that the generator of $ GF(8)$ is a root of the polynomial $ x^3 + x + 1$ mod $ 2$ .

Next, let's try adding, subtracting, and multiplying field elements in GAP.

gap> gf9[4]; gf9[5]; gf9[4]+gf9[5];
Z(3^2)
Z(3^2)^2
Z(3^2)^3
gap> gf9[3]; gf9[6]; gf9[3]+gf9[6];
Z(3)
Z(3^2)^3
Z(3^2)^5
gap> gf9[3]; gf9[6]; gf9[3]*gf9[6];
Z(3)
Z(3^2)^3
Z(3^2)^7
gap> gf9[4]; gf9[6]; gf9[4]*gf9[6];
Z(3^2)
Z(3^2)^3
Z(3)
gap> gf8[4]; gf8[6]; gf8[4]*gf8[6];
Z(2^3)^2
Z(2^3)^4
Z(2^3)^6
gap> gf8[4]; gf8[6]; gf8[4]+gf8[6];
Z(2^3)^2
Z(2^3)^4
Z(2^3)



david joyner 2008-04-20