\documentclass[11pt]{article} \usepackage[margin=1in]{geometry} \usepackage{amsmath,amssymb,amsthm,indentfirst} \usepackage[hyperfootnotes=false,colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref} \newtheorem{theorem}{Theorem}[section] \newtheorem{proposition}[theorem]{Proposition} \newtheorem{lemma}[theorem]{Lemma} \theoremstyle{remark} \newtheorem*{remark}{Remark} \newcommand{\F}{\mathbb F} \newcommand{\Q}{\mathbb Q} \title{Deterministic Polynomial-Time Factorization over Finite Fields} \author{Qiyue Tang} \date{November 6, 2026} \begin{document} \maketitle \begin{abstract} Using prime-field factorization and a Dedekind zeta zero-free theorem, we obtain deterministic polynomial-time algorithms for complete factorization over finite fields and for constructing their presentations from their orders. \end{abstract} \begingroup \renewcommand{\thefootnote}{} \footnotetext{\textbf{Keywords.} Finite fields, polynomial factorization, Frobenius, auxiliary primes.\par \textbf{MSC 2020.} Primary 11T06. Secondary 68W30.} \endgroup \section{Introduction} Let $p$ be a prime, let $m\ge1$, and put $q=p^m$. Write $\F_q$ for a field of order $q$ and $\F_p$ for its prime field. Factoring a nonzero polynomial in the indeterminate $X$ over $\F_q$ means finding its leading coefficient and its distinct monic irreducible factors with their multiplicities. The deterministic complexity problem asks for a single algorithm whose number of bit operations is polynomial in the degree and $\log_2 q$, as both vary. Even a polynomial known to split into distinct linear factors poses the problem of finding its roots without testing all field elements. Berlekamp's 1967 algorithm \cite{Berlekamp} distinguishes irreducible factors by linear algebra in the quotient by the input polynomial. For a square-free input $g$, the quotient $\F_q[X]/(g)$ is a product of fields, one for each irreducible factor. The elements fixed by $z\mapsto z^q$ have coordinates in $\F_q$. A fixed element whose coordinates differ separates the factors by greatest common divisors. Enumerating the possible coordinate values costs up to $q$ trials. In 1970 \cite[Sections~3--7]{BerlekampLarge}, Berlekamp reduced factorization over extension fields to root finding over the prime field, using trace and norm constructions to reach split polynomials. He identified deterministic root finding over large prime fields as the remaining difficulty. Cantor and Zassenhaus \cite{CZ} used random choices to split products of irreducibles of equal degree. This gives complete factorization in expected polynomial time. In the deterministic setting, Shoup \cite{ShoupComplexity} obtained a bound with a square-root dependence on the characteristic, up to smaller factors, and Evdokimov \cite{Evdokimov} obtained quasipolynomial time under the generalized Riemann hypothesis. A separate problem is to construct the field in which the coefficients are represented. Shoup \cite[Theorem~3.1]{Shoup} reduced construction of irreducible polynomials to prime-field factorization, and Lenstra \cite[Sections~2 and~7--9]{Lenstra} developed deterministic constructions and isomorphisms for explicitly represented finite fields. OpenAI's prime-field preprint \cite{OpenAI} separates the algebraic algorithm from the task of finding auxiliary primes. Its Theorem~1.2 gives a deterministic algorithm with a cost polynomial in the input length and the \emph{values} of the auxiliary primes. Its Theorem~1.1 obtains a uniform polynomial bound by invoking a Hecke zero-free theorem. Cureton and Thorner \cite[Theorem~1.1]{CT} give a fixed zero-free half-plane for Dedekind zeta functions of arbitrary number fields. Shunia~\cite[Lemma~4.2]{Shunia} uses this theorem and a weighted difference of prime-ideal sums to find auxiliary primes for odd prime degrees in a primality test. A different approach, due to Spaenlehauer \cite{Spaenlehauer}, reduces root finding to computations on an elliptic curve and its quadratic twist, with an online bound depending on the group orders of the supplied curve data. Here we use the Dedekind zeta theorem to construct the full auxiliary table for the prime-field algorithm, including its entry of degree two. We give the extension-field reduction by taking the fixed space of $z\mapsto z^p$ directly. This makes the degree and number of prime-field queries explicit. The same prime-field algorithm supplies the queries in the construction of a field presentation. An explicit presentation is a quotient $\F_p[U]/(h)$ in an indeterminate $U$ with $h$ monic irreducible of degree $m$. A field element is encoded by the $m$ coefficients of its representative of degree less than $m$, with each coefficient represented in binary by its residue in $\{0,\ldots,p-1\}$. A dense polynomial of degree $n$ is encoded by its $n+1$ coefficients. A nonzero constant has an empty factor list. \begin{theorem}\label{main} There is a uniform deterministic algorithm for complete factorization of every nonzero dense polynomial over an explicitly presented finite field of order $q$. For degree $n$ the bit cost is polynomial in $n+1$ and $\log_2 q$. Given the binary integer $q$ promised to be a prime power, the algorithm can first construct a presentation in time polynomial in $\log_2 q$. In this case the polynomial is then supplied in the resulting power basis. \end{theorem} \begin{remark} The external inputs to Theorem~\ref{main} are the Dedekind zeta zero-free theorem of Cureton and Thorner \cite[Theorem~1.1]{CT} and the auxiliary-prime factorization theorem, bit bound, and smoothed prime-ideal estimate of OpenAI \cite[Theorem~1.2, Proposition~10.1, and Lemma~11.2]{OpenAI}. \end{remark} \section{Auxiliary primes and the prime-field algorithm}\label{prime} For a prime-field input of degree $n$, put \[ B=20+(n+1)(\lceil\log_2 p\rceil+1). \] For $n\ge2$ and $p>B^{200000}$, the algorithm of \cite[Theorem~1.2]{OpenAI} requires, for every prime $r\le n$, a rational prime $\ell$ satisfying \begin{equation}\label{aux} \ell\notin\{2,3,p,r\},\qquad \ell\equiv1\pmod{12r},\qquad p^{(\ell-1)/r}\not\equiv1\pmod\ell . \end{equation} For the remaining inputs the table is empty. If $E$ is the maximum of $2$ and the supplied primes, the bit cost, including upward search for the primes, is $O(B^{500000}+B^{100}E^{20})$ by \cite[Proposition~10.1]{OpenAI}. \begin{lemma}\label{auxbound} For $n\ge2$, $p>\max(n,3)$, and each prime $r\le n$, there is a prime satisfying \eqref{aux} with $\ell=O(B^{32})$, uniformly in $p,n,r$. \end{lemma} \begin{proof} Write $K=\Q(\mu_{12r})$, with $\mu_{12r}$ the group of complex $(12r)$th roots of unity, and put $M=K(p^{1/r})$ using the positive real root. Since $p\nmid12r$, it is unramified in $K$. The valuation normalized to give a uniformizer value one at any prime of $K$ over $p$ therefore gives $p$ value one. Hence $X^r-p$ is Eisenstein at that prime. Its roots are obtained by multiplying $p^{1/r}$ by the $r$th roots of unity, all of which lie in $K$, so $M/K$ is cyclic of degree $r$. For a number field $F$, let $d_F=[F:\Q]$ and let $D_F$ be its absolute discriminant. Write $\log$ for the natural logarithm. The cyclotomic degree satisfies $d_K\le4r$, since among the integers up to $12r$ at most $4r$ are prime to $6$. Let $\Phi_{12r}$ be the monic polynomial whose roots are the primitive $(12r)$th roots of unity. Write $X^{12r}-1=\Phi_{12r}(X)H(X)$, where $H$ is the monic cofactor in $\mathbb Z[X]$. At every primitive root $\zeta$, differentiation gives \[ 12r\,\zeta^{12r-1}=\Phi_{12r}'(\zeta)H(\zeta). \] The product of the left sides is $\pm(12r)^{d_K}$. The product of the cofactor values is the field norm of an algebraic integer, hence an integer. The product of the derivatives is the polynomial discriminant up to sign. It follows that this discriminant divides $(12r)^{d_K}$. The field discriminant divides the polynomial discriminant, giving $\log D_K\le d_K\log(12r)$. For $X^r-p$, the product of $rX^{r-1}$ over the roots is $r^r p^{r-1}$ up to sign. Thus the relative discriminant of $M/K$ divides the ideal generated by $r^r p^{r-1}$. The discriminant formula in the tower therefore gives \[ \log D_M\le r\log D_K+d_K\bigl(r\log r+(r-1)\log p\bigr). \] Since $d_M=rd_K$, the weighted sum satisfies \begin{align*} (\log D_K+d_K)+r^{-1}(\log D_M+d_M) &\le d_K\bigl(2\log(12r)+2+\log r+(1-1/r)\log p\bigr)\\ &=O(r(1+\log p))=O(B), \end{align*} using $r\le n$ and $r0$. By \cite[Theorem~1.1]{CT}, each nontrivial zero $\rho$ of the Dedekind zeta function of $F$ satisfies $\operatorname{Re}\rho\le31/32$. In the smoothed explicit formula of \cite[Lemma~11.2]{OpenAI}, each zero contributes $-x^\rho\int_1^2 w(t)t^{\rho-1}\,dt$. The sum of the absolute values of the integrals, over the zeros with multiplicity, is $O_w(\log D_F+d_F)$, and the remainder apart from the pole term $cx$ has this same bound. Hence $\Psi_F(x)-cx=O_w(x^{31/32}(\log D_F+d_F))$, with constants depending only on $w$. Applying it to both fields and retaining the weight $1/r$ gives \[ \Psi_K(x)-r^{-1}\Psi_M(x) =(1-r^{-1})cx+O_w(Bx^{31/32}). \] Suppose there is no prime satisfying \eqref{aux} in $(x,2x)$. A term in $\Psi_K(x)$ with $j=1$ and residue degree one over a rational prime $\ell\notin\{2,3,p,r\}$ has $x<\ell<2x$. The Frobenius at $\ell$ acts on $\mu_{12r}$ by raising to the $\ell$th power. Residue degree one makes this automorphism the identity, so $\ell\equiv1\pmod{12r}$. By the supposition, $p^{(\ell-1)/r}=1$ in $\F_\ell$. This is the criterion for being an $r$th power in the cyclic group $\F_\ell^\times$ of order $\ell-1$. Then $X^r-p$ has $r$ distinct roots in $\F_\ell$, so the corresponding prime of $K$ splits completely in $M$. Here $\ell$ is prime to the power-basis discriminant, so reduction of the polynomial determines the splitting. The $r$ primes of $M$ above this prime each have norm $\ell$. Their terms, with weight $-1/r$, sum to the negative of the term from $K$. The terms left in $\Psi_M(x)$ enter with a negative sign. A remaining term from $K$ with $j$ times residue degree at least two lies over a rational prime at most $\sqrt{2x}$. There are at most $\sqrt{2x}$ such rational primes and at most $d_K$ prime ideals above each. Since $(N\mathfrak p)^j<2x$ on the support of a summand, the number of eligible $j$ is at most $\log(2x)/\log N\mathfrak p$. Thus each ideal contributes at most $\|w\|_\infty\log(2x)$, where $\|w\|_\infty$ is the maximum of $w$. Terms with $j=1$ and residue degree one over the four exceptional primes contribute at most $4d_K\|w\|_\infty\log(2x)$. Consequently \[ \Psi_K(x)-r^{-1}\Psi_M(x)\le C_w r\sqrt{x}\log(2x), \] where $C_w$ depends only on $w$. Set $x=T B^{32}$ with a fixed $T\ge2$. After division by $x$, the explicit-formula error is $O_w(T^{-1/32})$. Since $r\le B$, dividing $C_w r\sqrt{x}\log(2x)$ by $x$ gives a bound of order $T^{-1/2}(1+\log T)$, uniformly in $B$. Indeed, $B/\sqrt{x}=T^{-1/2}B^{-15}$, and $\log(2x)=\log(2T)+32\log B$. Both $B^{-15}$ and $B^{-15}\log B$ are at most one. Choose $T$ so the divided error and the divided upper bound are each less than $c/4$. The main term divided by $x$ is at least $c/2$, a contradiction. The prime obtained is less than $2TB^{32}$. \end{proof} In the branch $n\ge2$ and $p>B^{200000}$ we have $p>\max(n,3)$. Enumerate the primes $r\le n$ by trial division. For each $r$, test successive integers for primality and check \eqref{aux} by modular exponentiation until a prime is found. Lemma~\ref{auxbound} gives $E=O(B^{32})$. The search bound need not be supplied to the algorithm. Substitution in the cited bit bound gives $O(B^{500000})$, since $100+20\cdot32=740$. In the empty-table branch the same bound follows with $E=2$. \section{Reduction by absolute Frobenius} \begin{proposition}\label{reduction} For a nonzero input of degree $n$ over an explicitly presented field of order $q=p^m$, complete factorization reduces deterministically to at most $\max(0,n-1)$ prime-field factorizations of split square-free polynomials of degree at most $n$. The other bit operations are polynomial in $n+1$ and $\log_2 q$. \end{proposition} \begin{proof} Record the leading coefficient and divide by it. For a constant, return the empty list. Consider a monic square-free polynomial $g\in\F_q[X]$ of positive degree. In $\F_q[X]/(g)$, the map $z\mapsto z^p-z$ is $\F_p$-linear by the binomial theorem and the equality $a^p=a$ for $a\in\F_p$. Its matrix is obtained by raising the residue classes of $U^iX^j$, for $0\le i1$, factor the integer $m$ by trial division. For each exact prime power $r^a$ dividing $m$ (so $r^a\mid m$ and $r^{a+1}\nmid m$), first construct a field containing the degree-$r^a$ field over $\F_p$. \emph{Odd $r\ne p$.} Factor $1+U+\cdots+U^{r-1}$ over $\F_p$, and use any one of its irreducible factors as the modulus of a field $E$. The residue class of $U$ has $r$th power one by the geometric sum identity and is different from one because the sum takes value $r\ne0$ at one. Its order in $E^\times$ is therefore $r$, and $[E:\F_p]\le r-1$. Write $v_r(N)$ for the exponent of $r$ in a positive integer $N$. Put $t=v_r(|E|-1)$, computed by division by $r$. Starting with the element of order $r$, repeatedly take an $r$th root in $E$ until reaching an element $c$ of order $r^t$. In the cyclic group $E^\times$, the image of $r$th powering contains the subgroup of order $r^{t-1}$. Thus an element of order $r^j$, for $1\le j