Polynomials Modulo m

The $\limfunc$mod function can also be combined with polynomials:


$\blacktriangleright$ Evaluate

x5 +9x4 - x3 +7x - 2$\limfunc$mod5 = x5 +4x4 +4x3 +2x + 3


Thus Evaluate reduces each of the coefficients modulo 5.

Given a prime p, the set of polynomials with coefficients reduced modulo p is a ring, denoted by GFp[x].


$\blacktriangleright$ To calculate a product of polynomials a(x) and b(x) in GFp[x]

1.
Expand the product a(x)b(x).

2.
Reduce the product modulo p.


To calculate the product of 4x5 + 5x + 3 and 6x4 + x3 + 3 in GF7[x], do the following steps.


$\blacktriangleright$ Expand

$\left(\vphantom{ 4x^{5}+5x+3}\right.$4x5 + 5x + 3$\left.\vphantom{ 4x^{5}+5x+3}\right)$$\left(\vphantom{ 6x^{4}+x^{3}+3}\right.$6x4 + x3 + 3$\left.\vphantom{ 6x^{4}+x^{3}+3}\right)$ =  24x9 +4x8 +42x5 +23x4 +3x3 +15x + 9


$\blacktriangleright$ Evaluate

24x9 +4x8 +42x5 +23x4 +3x3 +15x + 9$\limfunc$mod7 = 3x9 +4x8 +2x4 +3x3 + x + 2


The sum of 4x5 + 5x + 3 and 6x4 + x3 + 3 in GF7[x] is slightly simpler.


$\blacktriangleright$ Evaluate

$\left(\vphantom{ 4x^{5}+5x+3}\right.$4x5 + 5x + 3$\left.\vphantom{ 4x^{5}+5x+3}\right)$ + $\left(\vphantom{ 6x^{4}+x^{3}+3}\right.$6x4 + x3 + 3$\left.\vphantom{ 6x^{4}+x^{3}+3}\right)$$\limfunc$mod7 =  4x5 +6x4 + x3 + 5x + 6