The following is a well known theorem on the Galois field:

**Theorem 1.*** For any element c of GF(q), c ^{q}=c.*

This theorem works for a variable which represents an element but not for an algebraic variable. When we declare variables which represent elements of the finite field K9.

Since K9 is a finite field of order 9, the theorem 1 works likeDeclareVariables[K9,x,y]

From the theorem 1, xx^9xx^-10-2 x

you can see algebra name in which a variable was declared by the function AlgebraName.

AlgebraName[x^2-1]K9

x

x^0Zero x% /. x-> K9[5]K9[1]

The theorem 2 says that if x is an nonzero element of K9 then x^{8}=1. The Galois Field Package have a declaration function for nonzero variable.

You can compare with a ordinal variable y of K9.NonZero[x]x^{0,1,2,3,4,5,6,7,8,9,10}2 3 4 5 6 7 2 {K9[1], x, x , x , x , x , x , x , K9[1], x, x }

Note that 0-th power of 0 is indeterminate.y^{0,1,2,3,4,5,6,7,8,9,10}Zero 2 3 4 5 6 7 8 2 {y , y, y , y , y , y , y , y , y , y, y }{x , y }^168 {K9[1], y }

Nonzero variables can also be declared by the NonZero option in the function DeclareVariables.K9[0]^0Power:K9[0]^-1 and K9[0]^0 are undefined Indeterminate

Next, when we declare an algebraic variable, we use the function DeclareAlgebraicVariables or DeclareIndeterminates.DeclareVariables[K9,x, NonZero -> True]Inverse[{{ x,1},{0,x}}]1 K9[2] 1 {{-, -----}, {0, -}} x 2 x x

Using the algebraic variable, we can define a polynomial ring GF(9)[X]. Since algebraic variables are not elements of a finite field, the theorem 1 and 2 have no effect on X and Y.DeclareAlgebraicVariables[K9,X,Y]

We define the 0-th power of an algebraic variable to be 1.X^99 X

Since X, Y are indeterminate, you can not substitute a constant to these variables.X^0K9[1]

The Factor function of a polynomail over a Galois field is contained in the subpackage Factor.mX = K9[2]Set::wrsym: Symbol X is Protected. K9[2]

<<Factor.mFactor.m was loaded.Factor[X^7-1]3 2 (X + K9[2]) (X + K9[2] + X K9[3] + X K9[5]) 3 2 (X + K9[2] + X K9[6] + X K9[7])