We've got Fermat's primality test to test if a number is probable prime. Is there an analogous test for polynomials in $\mathbb{F}_{p^n}[X]$ and irreducibility?
2026-03-26 07:34:51.1774510491
On
Analogue of Fermat's primality test for polynomials and irreducibility
359 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
2
On
Yes, over finite fields there is a polynomial irreducibility test that is an an efficient analog of the impractical Pocklington-Lehmer integer primality test (see also Section 3.4.3 and Section 8.3.1 of Henri Cohen's book A Course in Computational Algebraic Number Theory). Below is a description of one form of this algorithm, from this Wikipedia page.

Part of the point of Fermat's primality test is that $n$ is prime if and only if $\mathbb{Z}/(n)$ is a field. When the latter is a field, its multiplicative group has order $n - 1$, so any representative from ${1,\dots,n-1}$ should have order dividing $n - 1$ mod $n$.
Analogously, a polynomial $f \in \mathbb{F}_q[x]$ ($q = p^n$) is irreducible if and only if the ring $\mathbb{F}_q[x]/(f)$ is a field. The latter has order $q^m$, with a unique set of representatives being given by the polynomials of degree strictly less than $m$ (thanks to the Euclidean algorithm). So if it's a field, then its multiplicative group has order $q^m - 1$, and the order of every element divides this value. (Notice that every nonzero constant polynomial has order $q-1 = |\mathbb{F}_q^*|$, which divides $q^m - 1$, so there would be no need to test these.)
Thus it seems to me that the best analogue for Fermat's primality test would be: