\documentclass[11pt]{article} \usepackage[T1]{fontenc} \usepackage{lmodern,microtype,amsmath,amssymb,amsthm,mathtools,booktabs,needspace} \usepackage[letterpaper,left=.92in,right=.92in,top=.78in,bottom=.78in]{geometry} \usepackage[font=small,labelfont=bf,labelsep=period]{caption} \usepackage[hidelinks]{hyperref} \hypersetup{ pdftitle={A prime-field rank logic dichotomy for finite-template CSPs}, pdfauthor={Qian Peng and Peiwei Wu}, pdfkeywords={constraint satisfaction, rank logic, cohomological consistency, weak near-unanimity, finite group torsors, descriptive complexity, Lean 4} } \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{corollary}[theorem]{Corollary} \newcommand{\Coh}{\mathrm{Coh}} \newcommand{\CSP}{\operatorname{CSP}} \newcommand{\FPR}{\mathrm{FPR}} \newcommand{\FPS}{\mathrm{FPS}} \newcommand{\Sym}{\operatorname{Sym}} \newcommand{\core}{\operatorname{core}} \newcommand{\Z}{\mathbb Z} \newcommand{\F}{\mathbb F} \newcommand{\Q}{\mathbb Q} \newcommand{\R}{\mathbb R} \newcommand{\lean}[1]{\nolinkurl{#1}} \newcommand{\doi}[1]{\href{https://doi.org/#1}{doi:\,\nolinkurl{#1}}} \newcommand{\arx}[1]{\href{https://arxiv.org/abs/#1}{arXiv:\,\nolinkurl{#1}}} \setlength{\emergencystretch}{1.5em} \title{\bfseries A prime-field rank logic dichotomy\\for finite-template CSPs} \author{Qian Peng\thanks{Corresponding author. \href{mailto:qianpeng@student.unimelb.edu.au}{\nolinkurl{qianpeng@student.unimelb.edu.au}}. \href{https://orcid.org/0009-0009-2486-2485}{ORCID 0009-0009-2486-2485}.}\qquad Peiwei Wu\thanks{\href{https://orcid.org/0009-0008-3096-1669}{ORCID 0009-0008-3096-1669}.}} \date{5 December 2026} \begin{document} \maketitle \begin{abstract} Let \(B\) be a finite relational template. The existence of a homomorphism from a finite unordered input to \(B\) is definable in prime-field rank logic if and only if the core of \(B\) admits a weak near-unanimity polymorphism. If the core has \(n\ge 2\) elements and admits such a polymorphism, pinned cohomological consistency is complete at a template-dependent width over the product of the primes at most \(n\). In each round the prime fields can use different witnesses supported on the same surviving partial assignments. To obtain this modulus, we reconstruct integral witnesses on finite group torsors and then remove prime powers by increasing the width. The resulting sentence uses one inflationary fixed point and prime-field solvability tests, without counting. We formalized this definability result for weak near-unanimity templates in Lean~4. \end{abstract} \noindent\textbf{Keywords.} Constraint satisfaction, fixed-point logic with rank, cohomological consistency, weak near-unanimity, finite group torsors, Lean~4.\\ \textbf{2020 Mathematics Subject Classification.} Primary 03C13, 68Q25. Secondary 08A70, 20D99. \section{Introduction and main results} Fix a finite relational template \(B\). On input \(I\) of the same signature, \(\CSP(B)\) asks whether there is a homomorphism \(I\to B\). When the core of \(B\) admits a weak near-unanimity (WNU) polymorphism, cohomological consistency answers this question by testing systems of integer equations on partial assignments. This follows from the permutation-transporter theorem of Peng and Wu~\cite{pw} answering \'O~Conghaile's Question~13~\cite{oc}. Can one fix a finite set of prime characteristics once \(B\) is known and still detect every obstruction on every input? The distinction matters even for two equations. Modulo \(4\), the equations \(x+y=0\) and \(x+y=2\) are incompatible, although reduction modulo \(2\) makes them identical. Our proof changes the local information available to the tests. At a larger width the test sees several contexts together, and this recovers information lost by reducing the coefficients. The primes at most the size of the core suffice. This bound concerns a fixed template. Distinct characteristics give incomparable rank logics~\cite{gp}, and allowing the exponent in the rings \(\Z/2^e\Z\) to vary is central to Lichter's separation of rank logic from polynomial time~\cite{lichter}. Here \(C=\core(B)\) is a minimal retract of \(B\). A WNU polymorphism is an idempotent operation \(w\) of some arity \(s\ge3\) that preserves the relations coordinatewise and satisfies \[ w(y,x,\ldots,x)=w(x,y,x,\ldots,x)=\cdots=w(x,\ldots,x,y). \] A width-\(k\) context is a set \(U\) of at most \(k\) input elements. Start with the partial homomorphisms \(I[U]\to B\) on each context. For a current family \(S\), a witness over a ring \(R\) pinned at \(s\in S(U)\) consists of weight tables on all contexts \(V\), supported on \(S(V)\). Pushing each table forward by restriction gives the table on the smaller context, and the table at \(U\) is the point mass \(\delta_s\). Restriction to the empty context gives total mass one everywhere. A deletion round retains a tuple if it and each of its restrictions belong to the current family, extend in it to every one-element enlargement within width \(k\), and admit such a witness. The test accepts if the empty tuple survives at the fixed point~\cite[Definition~4]{oc}. This pinning is important on tractable examples where unpinned affine relaxations fail~\cite{lp}. \needspace{5\baselineskip} \begin{theorem}[Square-free fixed-modulus consistency]\label{thm:main} Let \(B\) be a finite relational template of finite signature whose core \(C\) has \(n = |C|\) elements and admits a WNU polymorphism. Set \(P(n) = \{p \le \max(2, n) : p \text{ prime}\}\) and \[ M(n) = \prod_{p \in P(n)} p. \] Then there exists a constant width \(K = K(B) \ge 1\) such that for every finite unordered input structure \(I\) of the same signature, \[ I \to B \quad\Longleftrightarrow\quad \Coh_K^{\Z/M(n)\Z}(I,B) \text{ accepts} \quad\Longleftrightarrow\quad \Coh_K^{P(n)}(I,B) \text{ accepts}, \] where \(\Coh_K^{P(n)}\) tests, at each deletion round and on the common surviving support, the existence of a pinned compatible \(\F_p\)-table family for each \(p \in P(n)\) separately. \end{theorem} Write \(\FPR_\Omega\) for fixed-point logic with counting and rank operators over the prime fields of characteristics in \(\Omega\)~\cite{dghl,gp}. With \(\Omega\) the set of all primes this is classical \(\FPR\), in which each sentence uses only finitely many characteristics. We write \(\FPS^{-}_\Omega\) for single-sorted inflationary fixed-point logic with solvability quantifiers \(\mathrm{slv}_p\) for \(p\in\Omega\), without counting. Each quantifier tests \(Mz=\mathbf{1}\) over \(\F_p\) for a definable Boolean matrix \(M\). We follow the counting-free convention of Gr\"adel and Pakusa~\cite[\S4]{gp}. \needspace{6\baselineskip} \begin{theorem}[Prime-field rank logic dichotomy]\label{thm:fpr} For every finite relational template \(B\) of finite signature with core size \(n\), the following are equivalent. \begin{enumerate} \item \(\core(B)\) admits a WNU polymorphism. \item A sentence of \(\FPS^{-}_{P(n)}\) with one inflationary fixed point defines \(\CSP(B)\). \item \(\CSP(B)\) is definable in \(\FPR\). \end{enumerate} \end{theorem} For \(m\ge2\), the set \(P(m)\) is optimal uniformly over templates with core size at most \(m\). To see which characteristics are necessary, let \(T_{G,r}\) have domain \(G\) and a relation for each left coset of a subgroup of \(G^a\), for \(1\le a\le r\). For every prime \(p\le m\), the template \(T_{C_p,3}\) on the additive group of \(\F_p\) is its own core because it contains all unary singletons. The sum of \(p+1\) arguments is a WNU polymorphism. Its coefficients sum to one in \(\F_p\), so it preserves every affine coset, and on a one-exception tuple its value is the exceptional entry. Lemma~\ref{lem:ternary} proves that a sentence defining this CSP must use characteristic \(p\). For cores of size at most one, first-order logic suffices. For a singleton core, exclude every input fact whose constant image is forbidden, including forbidden nullary facts. For an empty core, require an empty input domain and check the nullary facts. By the finite-domain CSP dichotomy~\cite{bulatov,zhuk}, the WNU case is in \(\mathrm P\) and the other case is \(\mathrm{NP}\)-complete. Assuming \(\mathrm P\ne\mathrm{NP}\), Theorem~\ref{thm:fpr} therefore characterizes precisely the fixed finite-template CSPs in \(\mathrm P\). The logical equivalence itself holds unconditionally. The general argument gives an existential width. For the alternating group \(A_5\), the subgroup structure gives a numerical bound and identifies the required characteristics. \needspace{5\baselineskip} \begin{theorem}[Explicit width and exact primes for \(A_5\)]\label{thm:a5} For every \(r \ge 1\), pinned cohomological consistency at width \(k = \max(3, r+1)\) and modulus \(30\) decides \(\CSP(T_{A_5,r})\). In particular, width \(4\) and modulus \(30\) suffice for all ternary \(A_5\)-coset CSPs. Moreover, for every \(r \ge 3\) and every set of primes \(\Omega\), \[ \CSP(T_{A_5,r}) \in \FPR_\Omega \quad\Longleftrightarrow\quad \{2,3,5\} \subseteq \Omega. \] \end{theorem} The passage from integer coefficients to prime fields has two steps. The group instances in the transporter induction admit a single modulus \(M_0\) because their local torsors have bounded sizes (Section~\ref{sec:torsor}). Increasing the width then removes the prime powers in \(M_0\) (Section~\ref{sec:squarefree}). Section~\ref{sec:wnu} applies both steps to a fixed template and proves the converse by a reduction on CFI structures. \section{Normal-quotient M\"obius projection and torsor lifting}\label{sec:torsor} A finite torsor diagram assigns a nonempty finite group torsor \(A_u\) to each vertex \(u\) and a surjective affine map to each arrow. We allow cycles and parallel arrows. After choosing origins, an arrow \(f\colon A_u\to A_v\) has the form \(g\mapsto\varphi(g)c\) for a surjective homomorphism of the acting groups and \(c\in G_v\). A compatible weight system over a commutative ring assigns a function \(w_u\) of total mass one to each torsor, with \(w_v(b)=\sum_{f(a)=b}w_u(a)\) along each arrow. Pinning vertex \(u\) at \(s_u\) imposes \(w_u=\delta_{s_u}\). \begin{theorem}[Torsor lifting]\label{thm:torsor} Let \(L \ge 2\) be an integer divisible by \(|A_u|\) for every vertex \(u\) of a finite torsor diagram \(\mathcal D\). Then \(\mathcal D\) admits a compatible \(\Z/L^2\Z\)-weight system satisfying a prescribed set of pins if and only if it admits a compatible \(\Z\)-weight system satisfying the exact same pins. \end{theorem} The integer witness can have different coordinates from the modular witness away from the pins. Three maps between two small torsors illustrate why this freedom matters. \begin{proposition}[No residue-preserving lift]\label{prop:klein} Consider the torsor diagram consisting of the Klein four-group \(V_4 = \F_2^2\) mapping to a single copy of \(C_2 = \F_2\) along the three projections \((x,y) \mapsto x\), \((x,y) \mapsto y\), and \((x,y) \mapsto x+y\), with target pinned at \(\delta_0\). Ordered as \((00, 01, 10, 11)\), the vector \((9, 8, 8, 8)\) is a compatible modulo-\(16\) weight table (with \(L = 4\), \(L^2 = 16\)), whereas the unique compatible integral weight table is \((1, 0, 0, 0)\). Thus no integral lift agrees with \((9,8,8,8)\) modulo \(16\). \end{proposition} \begin{proof} Modulo \(16\), \(9 + 8 + 8 + 8 = 33 \equiv 1\), every \(0\)-fiber sums to \(9 + 8 = 17 \equiv 1\), and every \(1\)-fiber sums to \(8 + 8 = 16 \equiv 0\). Over \(\Z\), the three \(1\)-fiber equations \(b + d = c + d = b + c = 0\) force \(b = c = d = 0\), and total mass \(1\) forces \(a = 1 \not\equiv 9 \pmod{16}\). \end{proof} To reconstruct a witness for a whole diagram, we decompose each table into components indexed by normal quotients. An arrow identifies the components that pass to its target. Reconstructing each such component by the same rule makes the integer marginals agree even around a cycle. \begin{proof}[Proof of Theorem~\ref{thm:torsor}] The reverse implication is reduction modulo \(M := L^2\). Assume now that \((w_u)\) is a compatible \(\Z/M\Z\)-weight system satisfying the pins. Choose an arbitrary origin \(o_u \in A_u\) at each vertex to identify \(A_u\) with \(G_u\). Lift each \(w_u\) coordinatewise to \(\Z\), adjusting one coordinate by a multiple of \(M\) so that \(\sum_{a \in A_u} w_u(a) = 1\) in \(\Z\), and taking the exact integral Dirac mass \(\delta_{s_u}\) at every pinned vertex. Define the integer \emph{density} \(d_u = |A_u|\, w_u \in \Z^{A_u}\). For any finite group \(G\) acting on a torsor \(A\) and any normal subgroup \(K \trianglelefteq G\), averaging along the \(K\)-orbits defines an operator \(P_K \colon \Q^A \to \Q^A\) by \[ (P_K \xi)(a) = \frac{1}{|K|} \sum_{x \in K \cdot a} \xi(x). \] On the density \(d_u = |A_u| w_u\), each entry of \(P_K d_u\) equals \(|A_u/K|\) times the sum of \(w_u\) over a \(K\)-orbit, hence is an integer. Because \(J, K \trianglelefteq G\) are normal, the product map \(J \times K \to JK\) has fibers of uniform size \(|J \cap K|\), so \(P_J P_K = P_{JK}\). Moreover each \(P_K\) is symmetric and idempotent, hence an orthogonal projection on \(\R^A\). Let \(\mu\) be the M\"obius function of the normal subgroup lattice \(\mathcal N(G)\), and define \[ E_J = \sum_{K \in \mathcal N(G),\, K \ge J} \mu(J, K)\, P_K \qquad (J \in \mathcal N(G)). \] M\"obius inversion gives \(P_J = \sum_{K \ge J} E_K\) and in particular \(\sum_{J \in \mathcal N(G)} E_J = I\). We claim that for all \(H, J \in \mathcal N(G)\), \begin{equation}\label{eq:orth} P_H E_J = \begin{cases} E_J & \text{if } H \le J,\\ 0 & \text{otherwise}, \end{cases} \qquad\text{and}\qquad E_H E_J = \begin{cases} E_J & \text{if } H = J,\\ 0 & \text{otherwise}. \end{cases} \end{equation} Indeed, for any \(S \in \mathcal N(G)\), \[ \sum_{K \ge S} P_H E_K = P_H P_S = P_{HS} = \sum_{K \ge HS} E_K = \sum_{K \ge S} [H \le K]\, E_K, \] and M\"obius inversion from the top yields the first identity in~\eqref{eq:orth}. Applying the same inversion to \(\sum_{K \ge H} E_K E_J = P_H E_J = \sum_{K \ge H} [K = J] E_J\) yields the second. Thus the \(E_J\) are pairwise orthogonal symmetric idempotents. Since \(E_J d_u\) is constant on \(J\)-cosets, it descends to an integer vector \(v_{u,J} \in \Z^Q\) on the quotient torsor \(Q = A_u/J\) of size \(m = |Q|\). Denote by \(\Pi_Q\) the primitive operator \(E_{\{1\}}\) on \(Q\). Because the interval \([J, G_u]\) is isomorphic to \(\mathcal N(G_u/J)\), the vector \(v_{u,J}\) satisfies \(\Pi_Q v_{u,J} = v_{u,J}\), and \(m \Pi_Q\) is an integer matrix (as every \(|K|\) divides \(m\)) commuting with all affine bijections of \(Q\). Now consider any arrow \(f \colon u \to v\) with kernel \(N = \ker\varphi \trianglelefteq G_u\). For every \(J \in \mathcal N(G_u)\) containing \(N\), there is a unique normal subgroup \(J' = \varphi(J) \trianglelefteq G_v\) and an affine bijection \(\bar f \colon A_u/J \xrightarrow{\sim} A_v/J'\). For every \(K \ge J\), each \(K\)-orbit in \(A_u\) is the full preimage of the corresponding \(K'\)-orbit in \(A_v\), and \(|A_u/K| = |A_v/K'|\). Compatibility of \((w_u)\) modulo \(M\) therefore implies that \(P_K d_u\) and \(P_{K'} d_v\) agree coordinatewise modulo \(M\) under \(\bar f\). Since the upper intervals \([J, G_u]\) and \([J', G_v]\) are isomorphic, \(v_{u,J}\) and \(v_{v,J'}\) agree coordinatewise modulo \(M\) under \(\bar f\), independently of the choice of origins. For every vertex \(u\) and every \(J \in \mathcal N(G_u)\) (with \(Q = A_u/J\) of size \(m\)), let \(h_{u,J} \in \Z^Q\) be obtained by replacing each coordinate of \(v_{u,J}\) with its unique centered residue in \((-M/2,\, M/2]\) modulo \(M\), and define \[ v'_{u,J} = \Pi_Q h_{u,J}. \] Because the centered residue depends only on the residue class modulo \(M\) and \(\Pi_Q\) is natural under affine bijections, \(v'_{u,J}\) and \(v'_{v,J'}\) agree \emph{identically} in \(\Z\) under \(\bar f\) for every arrow \(f \colon u \to v\) and every \(J \ge \ker\varphi\). Furthermore, since \(\Pi_Q v_{u,J} = v_{u,J}\), \(h_{u,J} - v_{u,J} \in M\Z^Q\), and \(m \Pi_Q\) has integer entries, we obtain \[ v'_{u,J} - v_{u,J} = \frac{1}{m}\,(m\Pi_Q)(h_{u,J} - v_{u,J}) \in \frac{M}{m}\,\Z^Q. \] As both \(m\) and \(|A_u|\) divide \(L\), the product \(m |A_u|\) divides \(L^2 = M\), so \(|A_u|\) divides \(M/m\). Hence \(v'_{u,J} \in \Z^Q\) and \(v'_{u,J} \equiv v_{u,J} \pmod{|A_u|}\). Next we check that pins are preserved. Suppose \(u\) is pinned at \(s \in A_u\), so \(d_u = |A_u|\,\delta_s\). Then \(P_K d_u = |A_u/K|\,\delta_{sK}\) for every \(K \ge J\), whence \(v_{u,J} = \Pi_Q(m\,\delta_{sJ})\). When \(m = 1\), \(v_{u,J}\) is the constant \(1\), which lies in \((-M/2, M/2]\) since \(M \ge 4\). When \(m \ge 2\), \(\Pi_Q\) is a symmetric idempotent matrix killing constant vectors (by~\eqref{eq:orth}, since \(P_{G_u/J}\Pi_Q=0\) on \(Q\)). For any symmetric idempotent matrix \(E\) killing constants, every entry satisfies \(|E_{ab}|<1\). To see this, \(E_{aa} = \sum_c E_{ac}^2 \ge E_{ab}^2\) gives \(0 \le E_{aa} \le 1\), and if \(E_{aa} = 1\) then \(E_{ac} = 0\) for all \(c \neq a\), contradicting \(\sum_c E_{ac} = 0\). Multiplying by \(m\) shows that every integer coordinate of \(v_{u,J} = m\,\Pi_Q \delta_{sJ}\) has absolute value strictly less than \(m\), hence at most \(m - 1 < L \le L^2/2 = M/2\) (for \(L = 2\), \(m - 1 \le 1 < 2 = M/2\)). Therefore \(h_{u,J} = v_{u,J}\) and \(v'_{u,J} = \Pi_Q v_{u,J} = v_{u,J}\) at every pinned vertex \(u\) and every \(J \in \mathcal N(G_u)\). The top component \(J = G_u\) is similarly the constant \(1\) at every vertex and satisfies \(v'_{u,G_u} = 1\). Finally, pull each \(v'_{u,J}\) back along \(\pi_J \colon A_u \to A_u/J\) and set \(d'_u = \sum_{J \in \mathcal N(G_u)} \pi_J^* v'_{u,J} \in \Z^{A_u}\). Because \(v'_{u,J} \equiv v_{u,J} \pmod{|A_u|}\) and \(\sum_J \pi_J^* v_{u,J} = d_u = |A_u| w_u\), every coordinate of \(d'_u\) is divisible by \(|A_u|\). Set \(w'_u = d'_u / |A_u| \in \Z^{A_u}\). Averaging \(d'_u\) over \(G_u\) leaves only the top component \(v'_{u,G_u} = 1\), so \(\sum_{a \in A_u} w'_u(a) = 1\). At every pinned vertex, \(d'_u = d_u\) gives \(w'_u = \delta_{s_u}\). For every arrow \(f \colon u \to v\) with kernel \(N\), applying \(P_N\) to \(d'_u\) annihilates all terms with \(N \not\le J\) by~\eqref{eq:orth} and keeps all terms with \(N \le J\), which match the full decomposition of \(d'_v\) via \(\bar f\). Hence \(P_N d'_u = f^* d'_v\). Dividing by \(|A_v|\) and using \(|N| = |A_u|/|A_v|\) yields \(\sum_{a \in f^{-1}(b)} w'_u(a) = w'_v(b)\) identically. \end{proof} In Lean we use the congruences of the heap \(xy^{-1}z\), avoiding the choice of origins. Its integer matrices \(C_J\) satisfy \(C_J^2=|A_u|C_J\), \(C_HC_J=0\) for \(H\ne J\), and \(\sum_J C_J=|A_u|I\). The formal development proves that rounding commutes with every surjective heap morphism (\lean{rounded_marginal}) and preserves every Dirac mass (\lean{round_delta}). The CSP theorem \lean{heapPinLifting} applies these facts to context restrictions with one specified pin per witness. Theorem~\ref{thm:torsor} allows any prescribed set of pins on an arbitrary finite torsor diagram. \section{Eliminating prime powers via truncated group algebras}\label{sec:squarefree} An equation over \(\Z/p^e\Z\) can retain information that its reduction modulo \(p\) loses. The truncated polynomial algebra below retains enough degrees to distinguish an element of order \(p^e\). We first give the resulting test for a single system, then use the same degree bound to control how many contexts a pinned witness must see at once. \begin{theorem}[Dense prime-power compilation]\label{thm:dense} Let \(p\) be prime, \(e \ge 1\), \(q = p^e\), and \(d = p^{e-1}\). For any \(A \in (\Z/q\Z)^{m \times n}\) with columns \(a_1,\ldots,a_n\) and any \(b \in (\Z/q\Z)^m\), let \(S = \F_p[t_1,\ldots,t_m] / (t^\alpha : |\alpha| > d)\). For \(v \in (\Z/q\Z)^m\) (using representatives in \(\{0,\ldots,q-1\}\)), set \[ E(v) = \prod_{i=1}^m (1 + t_i)^{v_i} \in S, \qquad F(v) = E(v) - 1. \] Then \(Ax = b\) has a solution \(x \in (\Z/q\Z)^n\) if and only if \[ F(b) \in \operatorname{span}_{\F_p} \{\, t^\beta F(a_j) : 1 \le j \le n,\; |\beta| < d \,\}. \] \end{theorem} \begin{proof} In \(S\), \((1 + t_i)^q = 1 + t_i^q = 1\) because \(q = p^e > d\), so \(E(v+w) = E(v) E(w)\) is well-defined on \((\Z/q\Z)^m\). Since each \(F(a_j)\) has zero constant term, the displayed \(\F_p\)-span is the ideal \(I = (F(a_1),\ldots,F(a_n)) \subseteq S\). In \(S/I\) we have \(E(a_j) = 1\) for all \(j\), hence \(E(v) = 1\) and \(F(v) \in I\) for every \(v\) in the subgroup \(H = A(\Z/q\Z)^n\). Conversely, suppose \(b \notin H\). In the finite abelian \(p\)-group \((\Z/q\Z)^m / H\), the image \(\bar b\) is nonzero. Projecting onto a cyclic direct summand \(\Z/p^s\Z\) where \(\bar b\) is nonzero and embedding via \(z \mapsto p^{e-s} z\) into \(\Z/q\Z\) yields a homomorphism \(\chi \colon (\Z/q\Z)^m \to \Z/q\Z\) with \(\chi(H) = 0\) and \(\chi(b) \neq 0\). In the ring \(T = \F_p[u]/(u^{d+1})\), the element \(1 + u\) has multiplicative order exactly \(q\), since \((1+u)^{p^{e-1}} = 1 + u^d \neq 1\) while \((1+u)^q = 1\). The substitution \(t_i \mapsto (1+u)^{\chi(e_i)} - 1 \in (u)\) kills all monomials of degree exceeding \(d\), hence defines a ring homomorphism \(S \to T\) sending \(E(v)\) to \((1+u)^{\chi(v)}\). It annihilates every \(F(a_j)\) (hence all of \(I\)) while sending \(F(b)\) to \((1+u)^{\chi(b)} - 1 \neq 0\). \end{proof} Writing \(F(v)\) in the monomial basis \(\{t^\alpha : 1 \le |\alpha| \le d\}\) yields an \(\F_p\)-matrix of \(\binom{m+d}{d} - 1\) rows and \(n \binom{m+d-1}{d-1}\) columns whose \((\alpha, (j,\beta))\)-entry is \(\prod_i \binom{(a_j)_i}{\alpha_i - \beta_i} \bmod p\) for \(\beta \le \alpha,\; \beta \neq \alpha\) (and \(0\) otherwise). Duplicating rows and columns over all ordered tuples of length at most \(d\) makes this compilation first-order interpretable on unordered inputs without dividing by factorials~\cite{dghkp}. Write \(S^R_k\) for the greatest stable family in the deletion test over \(R\), and \(S^P_k\) for the greatest stable family when every pin is tested over every \(\F_p\), \(p\in P\), on the common support. A family here is indexed by contexts of size at most \(k\). \begin{theorem}[Square-free reduction of pinned fixed points]\label{thm:sqfree} Let \(M = \prod_{p \in P} p^{e_p} \ge 2\) and \(D = \max_{p \in P} p^{e_p - 1}\). For every finite relational template \(B\), every finite input \(I\), every \(k \ge 1\), and every context \(T\) with \(|T| \le k\), \[ S^P_{Dk}(T) \subseteq S^{\Z/M\Z}_k(T) \subseteq S^P_k(T). \] \end{theorem} \begin{proof} The right inclusion follows by reducing \(\Z/M\Z\)-witnesses modulo each \(p \in P\). For the left inclusion, let \(S = S^P_{Dk}\) and restrict \(S\) to contexts of size at most \(k\). Downward closure, legality, and upward extension pass to this restriction. It suffices to construct, for every \(|T| \le k\), \(s \in S(T)\), and \(p \in P\), a pinned compatible \(\Z/q\Z\)-witness at width \(k\) supported on \(S\), where \(q = p^{e_p}\) and \(d = p^{e_p - 1} \le D\), and then combine them across \(p \in P\) by the Chinese Remainder Theorem. Fix \(T\), \(s \in S(T)\), and \(p \in P\), and take a compatible \(\F_p\)-witness \((w_U)_{|U| \le Dk}\) supported on \(S\) with \(w_T = \delta_s\). If \(B = \varnothing\) and \(X \neq \varnothing\), upward extension forces \(S = \varnothing\) for \(k \ge 1\), while if \(X = \varnothing\), \(B^X\) is a singleton. Otherwise pick any \(b_0 \in B\). The tensor products of \(\{1\} \cup \{\mathbf{1}_{x_v = a} : a \neq b_0\}\) form a basis of \(\F_p^{B^X}\). Prescribing the expectation of every basis function of support size at most \(Dk\) from \((w_U)\) and setting all higher-support expectations to \(0\) defines a signed \(\F_p\)-valued function \(\mu\) on all full assignments \(B^X\) (not necessarily legal) whose marginals on every \(|U| \le Dk\) equal \(w_U\). Form the \(\Z/q\Z\)-linear system for a width-\(k\) witness pinned at \((T,s)\). Use one normalization row per context \(|U| \le k\), one marginal row per inclusion \(V \subset U\) and \(v \in B^V\), and one pin row per \(t \in B^T\). Denote by \(m_{U,a}\) the column of variable \((U,a)\), by \(H\) the \(\Z/q\Z\)-subgroup generated by the surviving columns \(\{m_{U,a} : a \in S(U)\}\), and by \(b_T(t)\) the right-hand side with \(1\) on normalization rows, \(0\) on marginal rows, and \(\delta_t\) on pin rows. For every global assignment \(x \in B^X\), rowwise cancellation gives the exact identity \[ \sum_{|U| \le k} m_{U, x|_U} = b_T(x|_T). \] Suppose toward a contradiction that \(b_T(s) \notin H\). As in Theorem~\ref{thm:dense}, choose a homomorphism \(\chi\) vanishing on \(H\) with \(\chi(b_T(s)) \neq 0\), and set \(L(v) = (1+u)^{\chi(v)} \in \F_p[u]/(u^{d+1})\). Turning the sum into a product and taking the \(\mu\)-expectation over \(x \in B^X\) gives \[ \mathbb E_\mu\Bigl[\prod_{|U| \le k} \bigl(1 + (L(m_{U, x|_U}) - 1)\bigr)\Bigr] = \mathbb E_\mu\bigl[L(b_T(x|_T))\bigr] = L(b_T(s)) \neq 1, \] because the right-hand side depends only on \(x|_T\) where \(\mu\) has Dirac marginal \(\delta_s\). Expanding the left product, every term with more than \(d\) factors \((L(m_{U,x|_U}) - 1) \in (u)\) vanishes since \(u^{d+1} = 0\). Any nonempty product of \(1 \le r \le d\) factors depends only on the union \(W = U_1 \cup \dots \cup U_r\) of size at most \(dk \le Dk\). On \(W\), the marginal of \(\mu\) is \(w_W\), which is supported on \(S(W)\). By downward closure, every \(x|_W \in S(W)\) restricts to \(x|_{U_i} \in S(U_i)\), so \(m_{U_i, x|_{U_i}} \in H\) and \(L(m_{U_i, x|_{U_i}}) - 1 = 0\). Hence every nonconstant term has expectation \(0\), leaving \(1 = L(b_T(s))\), a contradiction. Thus \(b_T(s) \in H\), proving that the width-\(k\) restriction of \(S\) is a \(\Z/M\Z\)-stable family and lies in \(S^{\Z/M\Z}_k\). \end{proof} Barto, Hadek and Zhuk~\cite{bhz} show that level \(p\) of the \(\F_p\)-affine relaxation solves equations modulo \(p^2\), and study the dihedral group of order eight. Gkantzounis~\cite{gk} gives sharp coefficient-height bounds for the unpinned saturated hierarchy. The inclusion in Theorem~\ref{thm:sqfree} concerns the greatest pinned families, so it can be applied inside a deletion fixed point. \section{Uniform modulus for all WNU templates and \texorpdfstring{\(\FPR\)}{FPR} dichotomy}\label{sec:wnu} \begin{proof}[Proof of Theorem~\ref{thm:main}] Let \(C=\core(B)\) have \(n\) elements, with retraction \(B\to C\) and inclusion \(C\hookrightarrow B\). Apply the retraction to every surviving tuple and sum the entries of each witness along its fibers. This preserves legality, extension, marginals and Dirac pins. Thus acceptance for \((I,B)\) implies acceptance for \((I,C)\) at the same width and modulus. A homomorphism \(I\to C\) gives one to \(B\) by composition, and every homomorphism supplies Dirac witnesses. It suffices to work with \(C\). Write \(r_\sigma\) for the largest relation arity, taking \(r_\sigma=0\) for an empty signature. If \(n\le1\), width \(\max(1,r_\sigma)\) checks every constraint, including nullary ones, and the modulus \(2\) suffices. Assume \(n\ge2\). Let \(r=\max(1,r_\sigma)\), \(D=n!\) and \(R=r(n!)^2\). The integral group-coset theorem~\cite{pw}, extending the group cases of~\cite{goel}, supplies a width \(g\ge R\) complete for all coset instances of arity at most \(R\) and variable group orders at most \(D\). Put \(L=D^g\) and \(M_0=L^2\). \emph{Step 1 (Group cosets at modulus \(M_0\)).} Consider any finite-group coset instance \(J\) of arity at most \(R\) with every variable group order dividing \(D\), and suppose \(\Coh_g^{\Z/M_0\Z}(J)\) accepts. Let \(F\) be its greatest nonempty stable family at width \(g\). Because every constraint relation is a coset and therefore closed under the Mal'tsev heap operation \((a,b,c) \mapsto a b^{-1} c\), closing each \(F(U)\) under the heap operation preserves legality, upward extension (by extending each of the three inputs), and pinned \(\Z/M_0\Z\)-witnesses (via the tensor product of three pinned witnesses pushed forward along \((a,b,c) \mapsto a b^{-1} c\)). By maximality, every \(F(U)\) is already a nonempty coset of a subgroup of \(\prod_{x \in U} G_x\). By Lagrange's theorem, \(|F(U)|\) divides \(\prod_{x \in U} |G_x|\), which divides \(D^g = L\). The restriction maps \(F(V) \to F(U)\) (\(U \subseteq V\)) are surjective affine group maps. Applying Theorem~\ref{thm:torsor} to each pin \((U,s)\) individually lifts its \(\Z/M_0\Z\)-witness to a compatible \(\Z\)-witness supported on the same family \(F\) with the same pin. Thus \(F\) is a valid \(\Z\)-stable family at width \(g\), so \(J\) has a global solution by the unrestricted integral group-coset theorem~\cite{pw}. \emph{Step 2 (Sort-size induction).} Run the induction of~\cite{pw} over \(\Z/M_0\Z\). In a step from sort size \(j\) to \(j-1\), the arity bound grows by a factor of at most \(j^2\). Hence all arities are at most \(r\prod_{j=1}^n j^2=R\). A central lifting step introduces a symmetric group on a set \(D_x\times V_x\) that injects into the current sort, so its order divides \(n!\). Step~1 applies each time a transporter is needed. Restricting a table, pushing it forward and tensoring tables all commute with restriction of assignments. Pinning and slicing use only finite sums and products of coefficients. These are the witness operations used in the induction, including the comparison along root paths. The induction therefore yields a width \(k\ge1\), fixed by \(C\) and its signature, at which \(\Coh_k^{\Z/M_0\Z}\) decides \(\CSP(C)\). \emph{Step 3 (Reduction to square-free \(M(n)\)).} The prime factors of \(M_0 = (n!)^{2g}\) are precisely \(P(n) = \{p \le n : p \text{ prime}\}\), with exponents \(e_p = 2g\, v_p(n!)\). Putting \(\Delta = \max_{p \in P(n)} p^{e_p - 1}\) and \(K = \Delta \max(1, k)\) (or, even more simply, \(K = M_0 k\) as in our Lean formalization \lean{ModCSP.primeWidth}), Theorem~\ref{thm:sqfree} yields \(S^{P(n)}_K(\varnothing) \subseteq S^{\Z/M_0\Z}_k(\varnothing)\). If \(\Coh_K^{\Z/M(n)\Z}\) (equivalently \(\Coh_K^{P(n)}\) by the Chinese Remainder Theorem) accepts \(I\), then \(\Coh_k^{\Z/M_0\Z}\) accepts \(I\), whence \(I \to C\). The converse follows from Dirac point-mass witnesses of any homomorphism. \end{proof} \subsection{A ternary affine template for the lower bound} The characteristic lower bound concerns a fixed template of arity three. A general long equation does not come with a first summand. We use the Cai--F\"urer--Immerman (CFI) structures of Gr\"adel and Pakusa~\cite{gp}. Their incidence relation and preorder supply the successor relations needed for the local and global sums. \begin{lemma}[First-order ternarization on the CFI family]\label{lem:ternary} Fix a prime \(p\) and \(z\in\F_p\). On the Gr\"adel--Pakusa class of CFI structures over nontrivial connected ordered base graphs, there is a parameter-free first-order interpretation \(J_z\) into unordered instances of \(T_{C_p,3}\) such that \[ J_z(\mathrm{CFI}_p(G,\vec d))\to T_{C_p,3} \quad\Longleftrightarrow\quad \sum_{v\in V(G)}d(v)=z. \] Consequently, if \(p\notin\Omega\), then \(\CSP(T_{C_p,3})\) is not definable in \(\FPR_\Omega\). \end{lemma} \begin{proof} Use the relational presentation of~\cite[\S3, Lemma~3.18]{gp}. Write \(a\) for an edge node and \(\rho\) for an equation node. The cycle relation identifies the edge nodes, and the other nodes are equation nodes. The input preorder induces a strict order \(\prec\) on its equivalence classes. On the equation nodes its classes are the vertex gadgets \(\hat v\), ordered as the base vertices. For \(\rho\in\hat v\), the incidence set \(D_\rho=\{a:R(\rho,a)\}\) meets each outgoing edge class at \(v\) in exactly one node. The restriction of \(\prec\) to \(D_\rho\) is therefore a linear order. Each \(D_\rho\) is nonempty since \(G\) is connected and has at least two vertices. There is an unknown \(X_a\) for each edge node. A cycle edge from \(a\) to \(b\) gives \(X_b=X_a+1\), and an inverse pair gives \(X_a+X_b=0\). These are the binary constraints E1 and E2 of~\cite[Lemma~3.18]{gp}. For every equation node introduce a vertex value \(Y_\rho\) and a running total \(T_\rho\). For all \(\rho,\sigma\) in the same vertex class impose \(Y_\rho=Y_\sigma\) and \(T_\rho=T_\sigma\). For the local equation E3 introduce one unknown \(P_{\rho,a}\) for each \(a\in D_\rho\). Its constraints are \[ \begin{aligned} P_{\rho,a}&=X_a &&\text{for the first \(a\) in \(D_\rho\)},\\ P_{\rho,b}&=P_{\rho,a}+X_b &&\text{for successive \(a,b\) in \(D_\rho\)},\\ Y_\rho&=P_{\rho,a} &&\text{for the last \(a\) in \(D_\rho\)}. \end{aligned} \] For the global equation E4 impose \(T_\rho=Y_\rho\) in the first vertex class. For \emph{every} pair \(\rho,\sigma\) in consecutive vertex classes, with \(\rho\prec\sigma\), impose \(T_\sigma=T_\rho+Y_\sigma\). In the last class impose \(T_\rho=z\). This adds one vertex value per class, even when the class contains many equation nodes. Here is an explicit coding by pairs of input elements. If \(a_\rho\) is the first element of \(D_\rho\), use \[ X_a=(a,a),\qquad Y_\rho=(\rho,\rho),\qquad P_{\rho,a}=(\rho,a),\qquad T_\rho=(a_\rho,\rho). \] The four sets of pairs are disjoint. In a definable row \(D\), succession is given by \(a,b\in D,\ a\prec b,\ \neg\exists c\in D\,(a\prec c\prec b)\). For consecutive vertex classes use this same test on equation nodes. First and last are defined by absence of a predecessor and a successor, respectively. All indices and constraint tuples are thus first-order definable, including \(a_\rho\). Equality, the singleton \(\{z\}\), the two binary affine relations and the ternary addition relation are cosets in the signature of \(T_{C_p,3}\). Give each relation exactly the tuples prescribed for it, taking the union if two prescriptions name the same relation. The interpreted structure has only this coset signature. In a solution of E1--E4, copy each vertex value to its equation nodes and take the indicated partial sums. This extends it to a homomorphism on \(J_z\). Conversely, equality within each class recovers one vertex value. Induction along each row gives \(Y_\rho=\sum_{a\in D_\rho}X_a\). Induction along the vertex classes makes the last running total the sum of all vertex values. These values solve E1--E4, which by~\cite[Lemma~3.18]{gp} is equivalent to the displayed charge condition. Take \(z=0\) on the hard family of base graphs of increasing connectivity. For \(p\notin\Omega\), \(\FPR_\Omega\) collapses to fixed-point logic with counting on this family~\cite[Theorem~3.3(a),(b)]{gp}. That logic cannot distinguish charge zero from charge one there~\cite[Lemma~3.17]{gp}. Pulling a putative \(\FPR_\Omega\) definition of the ternary CSP back through the interpretation would do so. In this pullback element variables range over the definable pairs above and matrix indices become tuples of pairs. The pair domain is first-order definable. Counts of pairs and the polynomially bounded number sort can be represented by fixed-length tuples on the ordered number sort of fixed-point logic with counting. Matrices are restricted to the interpreted indices by zero padding. These translations preserve the characteristic of each rank operator. \end{proof} \subsection{The defining sentence and the converse} \begin{proof}[Proof of Theorem~\ref{thm:fpr}] \emph{\((1)\Rightarrow(2)\).} Work with the core \(C\), since the homomorphisms between \(B\) and \(C\) give \(\CSP(B)=\CSP(C)\). Take \(K\) and \(P(n)\) from Theorem~\ref{thm:main}. If the input domain \(X\) is empty, its unique empty map is a homomorphism exactly when every nullary fact of \(I\) holds in \(C\). If \(X=\{a\}\), take a finite disjunction over \(c\in C\). In the disjunct for \(c\), require that every input fact \(R(a,\ldots,a)\) have image \(R(c,\ldots,c)\) in \(C\), with the same nullary check. This tests each possible image of \(a\) and is false for a singleton input when \(C\) is empty. Both size cases are first-order definable. For \(|X|\ge2\), existentially quantify two distinct elements \(x,y\). Fixed-length tuples over \(\{x,y\}\) encode the template labels, context slots and equation types. Ordered tuples of input elements represent contexts of size at most \(K\). Different enumerations repeat rows and columns in the encoded systems. To descend a solution, sum the variables of each group of identical columns. To lift a solution, put its value on one copy of each column and zero on the others. Repeating a row leaves its equation unchanged. Thus solvability is invariant even in a characteristic dividing the number of copies. Every \(\Coh_K^{\F_p}\) witness query has entries in \(\{-1, 0, 1\}\) and right-hand side in \(\{0, 1\}\), written \((A^+ - A^-) w = b\) with Boolean \(A^+, A^-, b\). Introducing one auxiliary unknown \(z_*\) with row \(z_* = 1\), splitting each variable \(w_j\) into \((z^+_j, z^-_j)\) coupled by \(z^+_j + z^-_j + z_* = 1\), and rewriting each original row \(i\) as \[ \sum_j A^+_{ij}\, z^+_j + \sum_j A^-_{ij}\, z^-_j + (1 - b_i)\, z_* = 1 \] produces a Boolean coefficient matrix and right-hand side \(\mathbf{1}\). The equations force \(z_*=1\) and \(z_j^-=-z_j^+\), so solutions project to the original variables and each original solution extends. The two element parameters supply the row and column tags on a common Cartesian power of \(X\). Before the conversion, pad the unused rows and columns of \(A^+\) and \(A^-\) by zeros and the unused entries of \(b\) by zero. Each padded equation then becomes \(z_*=1\). One inflationary fixed point accumulates deleted tuples. It stabilizes within the size of the guarded tuple domain. \emph{\((2)\Rightarrow(3)\).} Over each \(\F_p\), \(Mz=b\) has a solution exactly when \(M\) and its augmentation by \(b\) have equal rank~\cite{dghl,gp}. This expresses every solvability test in \(\FPR_{P(n)}\). \emph{\((3)\Rightarrow(1)\).} A defining \(\FPR\) sentence uses a finite set \(\Omega\) of characteristics. Suppose the core lacks a WNU polymorphism. By the Taylor/WNU criterion, \(B\) pp-constructs \(K_3\)~\cite{bop,zhuk}. Choose a prime \(p\notin\Omega\). The fixed-template gadget reductions take \(\CSP(T_{C_p,3})\) to 3-coloring and then to \(\CSP(B)\). These reductions are expressible in Datalog with disjoint unions~\cite{do} and can be interpreted in inflationary fixed-point logic~\cite[proof of Lemma~19]{lp}. Pulling the sentence back along them would define \(\CSP(T_{C_p,3})\) in \(\FPR_\Omega\), contrary to Lemma~\ref{lem:ternary}. \end{proof} \section{Explicit width four and exact prime spectrum for \texorpdfstring{\(A_5\)}{A5}}\label{sec:a5} We prove the width bound for each arity \(r\) by describing how a solution is recovered from the surviving tuples. The uniform argument uses width three to propagate a binary constraint along a path and one extra variable beyond an \(r\)-tuple to condition on a fixed root. \emph{Step 1 (Arc consistency and Goursat splitting).} After merging repeated variables in each atom and checking nullary constraints, apply generalized arc consistency (GAC) until stabilization. Reject an empty domain or constraint. A projection of a coset is a coset, as is any nonempty intersection of cosets. Thus every surviving unary domain translates to a subgroup \(B_x \le A_5\) and every surviving relation is a subdirect right coset \(Hh\) in \(\prod_{x \in U} B_x\). The proper subgroups of \(A_5\) have isomorphism types \(1, C_2, C_3, C_5, C_2^2, S_3, D_{10}, A_4\), all solvable. For any constraint subgroup \(H\), its projection \(P\) onto full-\(A_5\) coordinates is a direct product of twisted diagonal copies of \(A_5\) (by Goursat's lemma and simplicity of \(A_5\)), while its projection \(B\) onto proper-subgroup coordinates is solvable. Applying Goursat's lemma to \(P\) and \(B\) forces a common quotient that is both perfect and solvable, hence trivial. This gives \(H=P\times B\), decoupling full-\(A_5\) variables from proper-subgroup variables. The full-\(A_5\) side reduces to binary bijection constraints \(g_y = f_{xy}(g_x)\). \emph{Step 2 (Kernel blocks in the proper subgroups).} Each non-abelian proper subgroup is a Frobenius extension \(V_i\rtimes Q_i\). The pairs \((V_i,Q_i)\) are \((\F_3,C_2)\) for \(S_3\), \((\F_5,C_2)\) for \(D_{10}\), and \((\F_2^2,C_3)\) for \(A_4\). Each nonidentity element of \(Q_i\) acts without nonzero fixed points. Put abelian coordinates on the quotient side by taking \(V_i=0\), \(Q_i=B_i\). Write a local constraint as \(Hh\subseteq V\rtimes W\), where \(W=\prod_i Q_i\) is abelian, \(L=\pi H\le W\), and \(K=H\cap V\). For a non-abelian coordinate let \(p_i\) be its kernel characteristic. The coordinate map \(\chi_i:L\to Q_i\) is onto. Group the coordinates with the same \(p_i\) and the same \(\ker\chi_i\) into a block \(D\). Fix \(p=p_i\) and let \(L_{p'}\) be the prime-to-\(p\) subgroup of \(L\). Average on the \(p\)-primary space over \(\ker(\chi_i|_{L_{p'}})\), whose order is invertible in \(\F_p\). The average fixes the block of \(i\). On any other block of characteristic \(p\) this averaging subgroup maps onto the prime-order quotient. Indeed, the two kernels in \(L\) are distinct of the same prime index, and both contain the \(p\)-primary subgroup of \(L\). Its average there vanishes by the fixed-point-free action. Since \(K_p\) is invariant, these projections split \(K=\prod_D K_D\). The image in \(V_D/K_D\) of a lift of \(\ell\in L\) defines a cocycle \(c_D(\ell)\). Choose \(z\in L\) outside the common kernel on \(D\). Then \(1-z\) is invertible on \(V_D\), on its finite invariant subspace \(K_D\) and on the quotient. Commutativity of \(L\) gives \((1-z)c_D(\ell)=(1-\ell)c_D(z)\). Thus \(c_D(\ell)=(1-\ell)d_D\) for a fixed \(d_D\). Above any quotient tuple in \(\pi(Hh)\), the kernel fiber is a product of affine subspaces, one for each \(D\), and its \(D\)-factor depends only on the quotient labels in \(D\). Within a block, equality of the kernels of the \(\chi_i\) induces isomorphisms of the cyclic quotients. Translation by \(h\) gives the corresponding affine bijections of quotient labels. \emph{Step 3 (Recovering a solution).} Let \(S\) be a nonempty stable family of width \(k=\max(3,r+1)\) over \(\Z/30\Z\). Each surviving unary value extends within \(S\) to a legal tuple on each incident constraint scope. Its other coordinates have surviving unary restrictions, so no round of arc consistency removes the value. Join variables linked by the binary bijections of Step~1, and separately join non-abelian coordinates occurring in a common block of Step~2, labeling these edges by the corresponding quotient bijections. A surviving pair on an edge extends to the scope from which the edge was projected and therefore obeys its label. It also satisfies the composite along any path between its endpoints. For the induction, extend the pair to include the penultimate vertex and restrict to the two shorter pairs. This uses at most three variables and also handles a path returning to its start. Any surviving root value therefore yields a solution on its full-\(A_5\) component. On a kernel-block component it determines the quotient labels on that component. On each connected component \(C\) of the kernel-block graph (which has uniform kernel characteristic \(p\) and quotient prime \(q\)), fix any \(x \in C\) and any \(s \in S(\{x\})\), and let \(w\) be a width-\(k\) \(\F_p\)-witness pinned at \(s\). Conditioning on \(u_x = s\) defines, for every \(|U| \le r\), \[ \nu_U(t) = \sum_{\substack{u \in S(U \cup \{x\}) \\ u|_U = t,\; u_x = s}} w_{U \cup \{x\}}(u), \] using \(|U\cup\{x\}|\le r+1\le k\). Each \(\nu_U\) has mass \(w_{\{x\}}(s)=1\), and marginalization commutes with the slice. Its tuples have the labels propagated from \(\pi(s)\) on \(C\). Taking unary expectations of kernel coordinates gives a joint solution in the affine fibers on \(C\) since each local table has mass one and is supported in its fiber. Let \(Q_x^*\) be the quotient seeds at \(x\) admitting such a component solution. The inverse images of all block constraints in the product of the component groups are cosets. Their intersection, when nonempty, is a coset, and its image in \(Q_x=C_q\) is exactly \(Q_x^*\). Every surviving unary value has image in \(Q_x^*\) by the preceding argument. Hence \(Q_x^*\) is either a singleton or all of \(C_q\). For each \(\ell\in\{2,3,5\}\), take a witness pinned at the empty tuple and form unary expectations in the \(\ell\)-primary quotient coordinates. The local quotient relations are affine in each primary part, so these expectations give a joint quotient solution satisfying every singleton seed restriction. On each component the quotient solution respects the edge bijections and its root seed lies in \(Q_x^*\), giving a kernel lift. Step~2 makes the lifts on different components compatible on every constraint. \emph{Step 4 (The required characteristics).} Compiling the width-\(k\) test over \(\Z/30\Z\) as in the positive implication of Theorem~\ref{thm:fpr} uses exactly the three available tests at \(2,3,5\). For necessity, suppose \(r\ge3\) and fix an embedding \(C_p\hookrightarrow A_5\) for \(p\in\{2,3,5\}\). From an instance of \(T_{C_p,3}\), keep its variables, require each to lie in the image subgroup by a unary constraint, and send each coset relation to its image in \(A_5^a\). These images are named cosets for \(a\le3\), so this is a first-order reduction on unordered structures. Its solutions are precisely the embedded solutions of the original instance. Lemma~\ref{lem:ternary} forces \(p\in\Omega\) for each of the three primes. Gkantzounis~\cite[Theorem~3.9 and Proposition~AO.1]{gk} constructs unsatisfiable instances over non-nilpotent groups which survive sublinear levels of unpinned saturated affine tests, and shows that width-three cohomological consistency rejects that family. In the selector construction the same mechanism can be seen in the two prime fields. A pin fixes the selector's quotient label for both the quotient equation and the kernel equation. The two equations then impose incompatible requirements on that label. \section{Formal verification}\label{sec:lean} The Lean theorem \lean{wnuSolvabilityAndRank} takes a finite template with a polymorphism satisfying the one-exception law and constructs, at an existentially chosen width, a sentence whose two interpretations decide homomorphism on every finite input. The theorem bounds the primes occurring in the syntax. Applied to a WNU core \(C\), it gives the bound in terms of \(|C|\). The declaration \lean{viaEquivalentTemplate} transports the rank sentence across homomorphisms in both directions, and \lean{Sentence.fps_iff} identifies its solvability interpretation. For \(A_5\) the formal relational theorem uses Mathlib's \texttt{alternatingGroup (Fin 5)}, arity at most three, literal width four and modulus \(30\). \begin{center} \begin{minipage}{\linewidth} \captionsetup{type=table} \caption{Selected declarations in the checked proof export.}\label{tab:lean} \smallskip \centering\small \begin{tabular}{@{}ll@{}} \toprule Statement & Lean declaration (namespace prefixes omitted)\\ \midrule Naturality and the contextwise pinned lift & \lean{rounded_marginal}, \lean{heapPinLifting}\\ Fixed modulus and square-free modulus & \lean{fixedModulus}, \lean{primeWidth}\\ Solvability and rank on finite inputs & \lean{wnuSolvabilityAndRank}\\ Transfer from the core & \lean{viaEquivalentTemplate}, \lean{Sentence.fps_iff}\\ Ternary \(A_5\) and the deletion rounds & \lean{relationalWidthFour}, \lean{decidesByDeletionRounds}\\ \(V_4\) residue obstruction & \lean{klein_no_residuewise_lift}\\ \bottomrule \end{tabular} \end{minipage} \end{center} The lift used by the CSP proof has one pin per witness on the diagram of context restrictions. Section~\ref{sec:torsor} gives the arbitrary-diagram, simultaneous-pin statement in mathematical form. The width bound for general \(r\) in Theorem~\ref{thm:a5}, the first-order interpretation of Lemma~\ref{lem:ternary}, the characteristic lower bounds, and the implication from \(\FPR\)-definability to a WNU core are paper proofs. The export \lean{modular-targets.ndjson.gz} contains 30 target theorems and their dependencies. The Lean~4.35.0 default kernel accepted the export and \emph{nanoda} independently checked its 48,109 declarations. The axioms are \lean{propext}, \lean{Classical.choice} and \lean{Quot.sound}. The receipt \lean{modular-lean-verification.json} records the hashes of the export, the 47 files under \lean{ModCSP/}, the root file \lean{Augmentation.lean}, and 289 matching upstream sources from~\cite{pw}. The finite tests exercise three parts of the construction. For torsors they include 135 diagrams and all 4,096 normalized tables modulo \(16\) on the \(V_4\) example. For prime-power elimination they include all 4,096 two-equation, two-unknown systems modulo \(4\). Of the 1,653 inconsistent systems, 309 become consistent under entrywise reduction modulo \(2\). For \(A_5\), the structural solver agreed with exhaustive search on 160 randomized instances (108 satisfiable and 52 unsatisfiable). A separate comparison ran the pinned deletion procedure against exhaustive search on ten named instances. \needspace{10\baselineskip} \section*{Author contributions and use of AI} Qian Peng and Peiwei Wu asked which prime fields suffice for a fixed WNU template and chose ternary \(A_5\) cosets to test the width-four bound modulo \(30\). They based the general proof strategy on lifting pinned witnesses in their transporter induction~\cite{pw} and guided Codex in developing the arguments, formalizing selected results in Lean~4, and running the finite checks. Both authors take full responsibility for the mathematical content of the paper. \needspace{14\baselineskip} \begin{thebibliography}{14}\small\raggedright\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt} \bibitem{bhz} L.~Barto, M.~Hadek and D.~Zhuk, Toward a uniform algorithm and uniform reduction for constraint problems (2026). \arx{2604.06335}. \bibitem{bop} L.~Barto, J.~Opr\v{s}al and M.~Pinsker, The wonderland of reflections, \emph{Israel J. Math.} \textbf{223} (2018), 363--398. \doi{10.1007/s11856-017-1621-9}. \bibitem{bulatov} A.~A.~Bulatov, A dichotomy theorem for nonuniform CSPs, in \emph{Proc.\ 58th IEEE Symposium on Foundations of Computer Science (FOCS 2017)}, 319--330. \doi{10.1109/FOCS.2017.37}. \bibitem{do} V.~Dalmau and J.~Opr\v{s}al, Local consistency as a reduction between constraint satisfaction problems, in \emph{Proc.\ 39th ACM/IEEE Symposium on Logic in Computer Science (LICS 2024)}, 1--15. \doi{10.1145/3661814.3662068}. \bibitem{dghkp} A.~Dawar, E.~Gr\"adel, B.~Holm, E.~Kopczy\'nski and W.~Pakusa, Definability of linear equation systems over groups and rings, \emph{Log. Methods Comput. Sci.} \textbf{9} (2013), no.~4, Art.~12. \doi{10.2168/LMCS-9(4:12)2013}. \bibitem{dghl} A.~Dawar, M.~Grohe, B.~Holm and B.~Laubner, Logics with rank operators, in \emph{Proc.\ 24th Annual IEEE Symposium on Logic in Computer Science (LICS 2009)}, 113--122. \doi{10.1109/LICS.2009.24}. \bibitem{gk} A.~Gkantzounis, \emph{Affine hierarchies: exact coefficient heights and algebraic completeness}, Zenodo (2026). \doi{10.5281/zenodo.24368757}. \bibitem{goel} D.~Goel, \emph{Cohomological \(k\)-consistency decides coset CSPs over all finite solvable groups} (expanded version 2.00), Zenodo (2026). \doi{10.5281/zenodo.24761279}. \bibitem{gp} E.~Gr\"adel and W.~Pakusa, Rank logic is dead, long live rank logic!, \emph{J. Symbolic Logic} \textbf{84} (2019), 54--87. \doi{10.1017/jsl.2018.33}. \bibitem{lichter} M.~Lichter, Separating rank logic from polynomial time, \emph{J. ACM} \textbf{70} (2023), no.~2, Art.~14, 1--53. \doi{10.1145/3572918}. \bibitem{lp} M.~Lichter and B.~Pago, Limitations of affine integer relaxations for solving constraint satisfaction problems, in \emph{Proc.\ 52nd International Colloquium on Automata, Languages, and Programming (ICALP 2025)}, LIPIcs \textbf{334}, 166:1--166:17. \doi{10.4230/LIPIcs.ICALP.2025.166}. \bibitem{oc} A.~\'O~Conghaile, Cohomology in constraint satisfaction and structure isomorphism, in \emph{Proc.\ 47th International Symposium on Mathematical Foundations of Computer Science (MFCS 2022)}, LIPIcs \textbf{241}, 75:1--75:16. \doi{10.4230/LIPIcs.MFCS.2022.75}. \bibitem{pw} Q.~Peng and P.~Wu, \emph{Permutation transporters and bounded cohomological width}, version~2.0.1, Zenodo (2026). \doi{10.5281/zenodo.24837202}. \bibitem{zhuk} D.~Zhuk, A proof of the CSP dichotomy conjecture, \emph{J. ACM} \textbf{67} (2020), Art.~30, 1--78. \doi{10.1145/3402029}. \end{thebibliography} \end{document}