This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Polynomials Modulo Primes

Mathematica can work with polynomials whose coefficients are in the finite field Zp of integers modulo a prime p.
PolynomialMod[poly,p]reduce the coefficients in a polynomial modulo p
Expand[poly,Modulus->p]expand poly modulo p
Factor[poly,Modulus->p]factor poly modulo p
PolynomialGCD[poly1,poly2,Modulus->p]
find the GCD of the polyi modulo p
GroebnerBasis[polys,vars,Modulus->p]
find the Gröbner basis modulo p

Functions for manipulating polynomials over finite fields.

Here is an ordinary polynomial.
In[1]:=
Click for copyable input
Out[1]=
This reduces the coefficients modulo 2.
In[2]:=
Click for copyable input
Out[2]=
Here are the factors of the resulting polynomial over the integers.
In[3]:=
Click for copyable input
Out[3]=
If you work modulo 2, further factoring becomes possible.
In[4]:=
Click for copyable input
Out[4]=