The following is a well known theorem on the Galois field:
Theorem 1. For any element c of GF(q), cq=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, x9 = x in GF(9). Exponents of variable x in outputs can never be larger than 8 ( generally "order" - 1).x^9 x x^-10 -2 x
you can see algebra name in which a variable was declared by the function AlgebraName.
Mathematica does not print in the form " x0 ". Therefore, the Galois Field Package prints with the formAlgebraName[x^2-1] K9
Theorem 2. For any nonzero element d of GF(q), d(q-1) = 1.x^0 Zero x % /. x-> K9[5] K9[1]
The theorem 2 says that if x is an nonzero element of K9 then x8=1. The Galois Field Package have a declaration function for nonzero variable.
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 }
You can compare with a ordinal variable y of K9.
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 }^16
8
{K9[1], y }
Note that 0-th power of 0 is indeterminate.
Nonzero variables can also be declared by the NonZero option in the function DeclareVariables.K9[0]^0 Power:K9[0]^-1 and K9[0]^0 are undefined Indeterminate
DeclareVariables[K9,x, NonZero -> True]
Inverse[{{ x,1},{0,x}}]
1 K9[2] 1
{{-, -----}, {0, -}}
x 2 x
x
Next, when we declare an algebraic variable, we use the function DeclareAlgebraicVariables or DeclareIndeterminates.
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^9 9 X
Since X, Y are indeterminate, you can not substitute a constant to these variables.X^0 K9[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.m
Factor.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])