\documentclass[11pt]{amsart} \IfFileExists{lmodern.sty}{\usepackage[T1]{fontenc}\usepackage{lmodern}}{} \usepackage{amsmath,amssymb,amsthm} \usepackage[hidelinks]{hyperref} \setlength{\emergencystretch}{1.5em} \IfFileExists{geometry.sty}{\usepackage[letterpaper,left=0.75in,right=0.75in,top=0.7in,bottom=0.8in]{geometry}}{\setlength{\textwidth}{7in}\setlength{\textheight}{9.4in}\setlength{\oddsidemargin}{-0.25in}\setlength{\evensidemargin}{-0.25in}\setlength{\topmargin}{-0.5in}} \newtheorem{theorem}{Theorem} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{remark}[theorem]{Remark} \address{Information Physics Institute, 840 W 67th St, Hialeah, FL 33012, USA} \email{vega.frank@gmail.com} \title{A Distinct-Variable MAX-XOROR Gadget and a Conditional $\mathrm{P} = \mathrm{NP}$ Consequence} \date{November 30, 2026} \subjclass[2020]{68Q17, 68Q25} \keywords{MAX NAE-3SAT; MAX-XOROR; gadget reduction; approximation resistance; H\aa stad's theorem; Lean 4} \begin{document} \maketitle \begin{abstract} A MAX-XOROR clause has the form $\ell_1\vee(\ell_2\oplus\ell_3)$ for literals $\ell_1,\ell_2,\ell_3$. We construct a four-clause gadget with three fresh auxiliary variables that replaces each clause of MAX NAE-3SAT: exactly three of the four clauses are satisfied when the three input literals are equal, and all four are satisfied otherwise. Because the auxiliary variables are distinct per gadget, every resulting clause acts on three distinct variables with unrestricted literal signs, matching the standard distinct-variable MAX-CSP convention. This yields an exact affine shift $\mathrm{OPT}(\Xi(\Phi)) = 3m + \mathrm{OPT}(\Phi)$ on the image family $\mathcal{F}$ of the reduction, where $m$ is the number of MAX NAE-3SAT clauses. Combining this shift with the polynomial-time approximation algorithm of Brakensiek, Huang, Potechin, and Zwick (ratio $\rho \approx 0.9089$) gives a polynomial-time algorithm with approximation ratio at least $0.977$ on $\mathcal{F}$. By contrast, H\aa stad's pairwise-independent predicate theorem establishes optimal $(1-\varepsilon)$ versus $(3/4+\varepsilon)$ approximation resistance for general distinct-variable MAX-XOROR via Long Code PCPs. We verify that every instance in $\mathcal{F}$ satisfies H\aa stad's syntactic preconditions and quantify the resulting structural gap: if the $(1-\varepsilon)$ versus $(3/4+\varepsilon)$ hardness gap (or any gap $n < 0.977\,y$) can be realized inside the structured subfamily $\mathcal{F}$, then $\mathrm{P}=\mathrm{NP}$. Lean~4 formally verifies the finite gadget valuation, variable distinctness, and ratio inequalities, with the core arithmetic theorems cross-checked via \texttt{lake comparator}. \end{abstract} \section{Definitions and Cited Algorithmic Result}\label{sec:defs} A \emph{literal} is a Boolean variable or its negation. An instance $\Phi$ of MAX NAE-3SAT is a list of $m$ clauses $(\ell_1,\ell_2,\ell_3)$ of literals on three distinct variables; a clause is satisfied by an assignment $\sigma$ if its three literals do not all take the same truth value. We write $\mathrm{val}(\Phi,\sigma)$ for the number of satisfied clauses and $\mathrm{OPT}(\Phi)=\max_\sigma\mathrm{val}(\Phi,\sigma)$. An instance $\Xi$ of MAX-XOROR is a list of clauses $(\ell_1,\ell_2,\ell_3)$ of literals on three distinct variables; a clause is satisfied by an assignment if $\ell_1=1$ or $\ell_2\oplus\ell_3=1$ (where $\oplus$ denotes addition modulo $2$). The quantities $\mathrm{val}(\Xi,\tau)$ and $\mathrm{OPT}(\Xi)$ are defined analogously, and $|\Xi|$ denotes the number of clauses in $\Xi$. \begin{theorem}[Brakensiek, Huang, Potechin, and Zwick, 2025~\cite{BHPZ}]\label{thm:alg} There is a polynomial-time algorithm that returns, for every instance $\Phi$ of MAX NAE-3SAT, an assignment $\sigma$ with $\mathrm{val}(\Phi,\sigma)\ge\rho\,\mathrm{OPT}(\Phi)$, where $\rho\approx0.9089$. In particular, $\rho\ge0.908$. \end{theorem} \section{The $3/4$ Threshold for MAX-XOROR in H\aa stad's Literature}\label{sec:hastad} To situate our gadget reduction relative to known inapproximability barriers, we review why the predicate $P(x_1,x_2,x_3) = x_1 \vee (x_2 \oplus x_3)$ carries the tight $3/4$ approximation-resistance threshold in H\aa stad's Fourier-analytic PCP framework~\cite{Hastad2001}. \subsection{Pairwise Independence and the $3/4$ Inapproximability Bound} Consider the Boolean predicate $P : \{0,1\}^3 \to \{0,1\}$ defined by $P(x_1,x_2,x_3) = x_1 \vee (x_2 \oplus x_3)$. Evaluating $P$ on all eight triples in $\{0,1\}^3$ gives: \begin{itemize} \item When $x_1 = 1$, $P(1,x_2,x_3) = 1$ for all four pairs $(x_2,x_3) \in \{0,1\}^2$. \item When $x_1 = 0$, $P(0,x_2,x_3) = x_2 \oplus x_3$, which equals $1$ for $(x_2,x_3) \in \{(0,1),(1,0)\}$ and $0$ for $(x_2,x_3) \in \{(0,0),(1,1)\}$. \end{itemize} Hence $|P^{-1}(1)| = 6$ out of $8$ triples, so a uniformly random truth assignment satisfies each clause with probability $6/8 = 3/4$. In H\aa stad's PCP framework (\cite{Hastad2001}, Theorem~6.14 and Section~6.3), a $k$-ary predicate $P : \{0,1\}^k \to \{0,1\}$ with folded literal negations is \emph{approximation resistant}—meaning that for every $\varepsilon > 0$, it is $\mathrm{NP}$-hard to distinguish instances with optimum fraction at least $1-\varepsilon$ from those with optimum fraction at most $|P^{-1}(1)|/2^k + \varepsilon$—whenever $P^{-1}(1)$ supports a probability distribution $\mu$ that is \emph{pairwise independent} (i.e., the first- and second-order Fourier coefficients of $\mu$ vanish on all nonzero characters). For $P(x_1,x_2,x_3) = x_1 \vee (x_2 \oplus x_3)$, the six accepting assignments contain the four odd-parity triples \[ S = \{ (0,0,1), \; (0,1,0), \; (1,0,0), \; (1,1,1) \} \subset P^{-1}(1). \] The uniform distribution $\mu$ on $S$ has uniform single-bit marginals ($\Pr_\mu[x_i = 1] = 1/2$ for $i \in \{1,2,3\}$) and uniform pairwise marginals ($\Pr_\mu[x_i = a, x_j = b] = 1/4$ for all $1 \le i < j \le 3$ and $a,b \in \{0,1\}$). It is important to note that one cannot obtain this $3/4$ soundness bound merely by taking a MAX-3LIN-2 instance and syntactically replacing each parity equation $x_1 \oplus x_2 \oplus x_3 = 1$ with the clause $x_1 \vee (x_2 \oplus x_3)$: a parity-violating assignment such as $(1,0,1)$ or $(1,1,0)$ still satisfies $x_1 \vee (x_2 \oplus x_3)$, so a syntactic clause-by-clause substitution does not preserve soundness. Rather, H\aa stad's Long Code verifier~\cite{Hastad2001} uses $\mu$ directly as the test distribution on three folded Long Code tables—accepting whenever the queried triple lies in $P^{-1}(1)$—and bounds the soundness of any assignment with small noisy influence by the measure of $P^{-1}(1)$ under the uniform product distribution, which is $|P^{-1}(1)|/8 = 6/8 = 3/4$. Consequently, for every $\varepsilon > 0$, it is $\mathrm{NP}$-hard to distinguish general distinct-variable MAX-XOROR instances with $\mathrm{OPT}(\Xi) \ge (1-\varepsilon)|\Xi|$ from those with $\mathrm{OPT}(\Xi) \le (3/4+\varepsilon)|\Xi|$. \subsection{H\aa stad's Structural Preconditions and the Image Subfamily $\mathcal{F}$} H\aa stad's $(1-\varepsilon)$ versus $(3/4+\varepsilon)$ inapproximability theorem applies under three structural considerations: \begin{enumerate} \item \textbf{Three distinct variables per clause (no variable-repetition degeneracies).} H\aa stad's PCP verifier queries three distinct positions in the Long Code tables corresponding to three distinct variables in the underlying Label Cover instance. Allowing repeated variables inside a single clause—such as $x \vee (x \oplus y)$ or $y \vee (x \oplus x)$—causes the predicate to degenerate into a binary or unary constraint whose random-assignment threshold and approximability change. Requiring three distinct variables per clause prevents such degeneracies. \item \textbf{Free literal negation/polarity.} Folding the Long Code tables over negation produces clauses whose inputs are arbitrary literals (variables or negated variables) rather than strictly monotone variables. Every clause must permit free sign choices on its three distinct variables. \item \textbf{Worst-case instances versus the structured gadget image $\mathcal{F}$.} Standard worst-case inapproximability establishes the $(1-\varepsilon)$ versus $(3/4+\varepsilon)$ gap over the full class of distinct-variable MAX-XOROR instances produced by the PCP verifier. When restricting to a structured subfamily $\mathcal{F}$ (the image of a local gadget reduction), the completeness and soundness parameters $(y, n)$ depend on whether hard gap instances embed into $\mathcal{F}$ with $n < 0.977\,y$. \end{enumerate} We prove in Proposition~\ref{prop:hastad_coverage} below (after establishing distinct-variable compatibility in Section~\ref{sec:gadget}) that the gadget image $\mathcal{F}$ satisfies H\aa stad's syntactic preconditions and that any gap-hardness reduction attaining H\aa stad's $3/4$ threshold on $\mathcal{F}$ lies strictly inside the regime $n < 0.977\,y$. \section{The Gadget Construction}\label{sec:gadget} For a clause $C=(\ell_1,\ell_2,\ell_3)$ of MAX NAE-3SAT and literals $a,b,c$ of three distinct fresh variables, each of arbitrary sign, let $\Xi_C$ be the four MAX-XOROR clauses \[ a\vee(\ell_1\oplus\ell_2),\qquad b\vee(\ell_2\oplus\ell_3),\qquad c\vee(\ell_3\oplus\ell_1),\qquad \bar c\vee(a\oplus b). \] \begin{lemma}[Gadget Valuation]\label{lem:gadget} For every assignment of the variables of $C$, the maximum over all assignments of the three fresh variables of the number of satisfied clauses in $\Xi_C$ is $4$ if $C$ is satisfied, and $3$ otherwise. \end{lemma} \begin{proof} Write $x=\ell_1$, $y=\ell_2$, $z=\ell_3$ for the truth values of the literals of $C$. Because the fresh variables are distinct, the triple of literal values $(a,b,c)$ ranges over every element of $\{0,1\}^3$ as the assignment to the fresh variables varies, regardless of the signs of those literals; hence it suffices to maximize over $(a,b,c) \in \{0,1\}^3$. Suppose first that $C$ is not satisfied, so $x=y=z$. Then $x\oplus y = y\oplus z = z\oplus x = 0$, which implies that the first three clauses of $\Xi_C$ evaluate to $a$, $b$, and $c$, respectively. If all four clauses were simultaneously satisfied, we would require $a=b=c=1$, under which the fourth clause $\bar c \vee (a\oplus b)$ evaluates to $0 \vee (1\oplus 1) = 0$, a contradiction. Thus at most three clauses can be satisfied, and setting $a=b=c=1$ satisfies the first three. Suppose now that $C$ is satisfied, so $x,y,z$ are not all equal. Since $(x\oplus y) \oplus (y\oplus z) \oplus (z\oplus x) = 0$ and not all three parities are $0$, exactly two of the values $x\oplus y$, $y\oplus z$, $z\oplus x$ equal $1$ and one equals $0$: \begin{itemize} \item If $x\oplus y = 0$, choose $a=1$, $b=0$, $c=0$: the first clause holds since $a=1$, the second and third hold since $y\oplus z = z\oplus x = 1$, and the fourth holds since $a\oplus b = 1$. \item If $y\oplus z = 0$, choose $a=0$, $b=1$, $c=0$: the second clause holds since $b=1$, the first and third hold since $x\oplus y = z\oplus x = 1$, and the fourth holds since $a\oplus b = 1$. \item If $z\oplus x = 0$, choose $a=1$, $b=0$, $c=1$: the third clause holds since $c=1$, the first and second hold since $x\oplus y = y\oplus z = 1$, and the fourth holds since $a\oplus b = 1$. \end{itemize} In each case, all four clauses of $\Xi_C$ are satisfied. \end{proof} For an instance $\Phi$ with clauses $C_1,\dots,C_m$, let $\Xi(\Phi)$ be the concatenation of $\Xi_{C_1},\dots,\Xi_{C_m}$ using disjoint triples of fresh variables $(a_i,b_i,c_i)$ of arbitrary signs for each clause $C_i$. \begin{proposition}[Distinct-Variable Compatibility]\label{prop:distinct} If the three literals of every clause of $\Phi$ are on three distinct variables, then every clause of $\Xi(\Phi)$ is on three distinct variables. \end{proposition} \begin{proof} For a single source clause $C_i$, let $x,y,z$ denote the underlying variables of its three literals. The underlying variable triples of the four clauses in $\Xi_{C_i}$ are $\{a_i,x,y\}$, $\{b_i,y,z\}$, $\{c_i,z,x\}$, and $\{c_i,a_i,b_i\}$. Each triple consists of three distinct variables because $x,y,z$ are pairwise distinct and the fresh variables $a_i,b_i,c_i$ are pairwise distinct and disjoint from $\{x,y,z\}$. Applying this argument independently to each $i \in \{1,\dots,m\}$ establishes the claim. \end{proof} Let $\mathcal{F} = \{ \Xi(\Phi) : \Phi \text{ is a MAX NAE-3SAT instance} \}$ be the image of this mapping. The transformation $\Phi \mapsto \Xi(\Phi)$ is computable in polynomial time, and $\Phi$ is recoverable from $\Xi(\Phi)$ in polynomial time because the clauses appear in consecutive blocks of four. Note that $|\Xi(\Phi)| = 4m$. \begin{lemma}[Composition]\label{lem:comp} For every instance $\Phi$ of MAX NAE-3SAT with $m$ clauses: \begin{enumerate} \item For every assignment $\tau$ of $\Xi(\Phi)$ with restriction $\sigma$ to the variables of $\Phi$, $\mathrm{val}(\Xi(\Phi),\tau) \le 3m + \mathrm{val}(\Phi,\sigma)$. \item Every assignment $\sigma$ of $\Phi$ extends in polynomial time to an assignment $\tau$ of $\Xi(\Phi)$ satisfying $\mathrm{val}(\Xi(\Phi),\tau) = 3m + \mathrm{val}(\Phi,\sigma)$. \item $\mathrm{OPT}(\Xi(\Phi)) = 3m + \mathrm{OPT}(\Phi)$. \end{enumerate} \end{lemma} \begin{proof} Because the auxiliary variable triples $(a_i,b_i,c_i)$ for distinct indices $i$ are pairwise disjoint, for any fixed assignment $\sigma$ to the variables of $\Phi$, the total number of satisfied clauses in $\Xi(\Phi)$ decomposes as the sum over $i=1,\dots,m$ of the number of satisfied clauses in $\Xi_{C_i}$, where each summand depends solely on $(a_i,b_i,c_i)$. By Lemma~\ref{lem:gadget}, the $i$-th summand is at most $3 + \mathbf{1}[C_i \text{ is satisfied by } \sigma]$, yielding~(1). Assigning each $(a_i,b_i,c_i)$ according to the explicit truth values given in the proof of Lemma~\ref{lem:gadget} attains this upper bound in $O(m)$ time, yielding~(2). Maximizing over all $\sigma$ gives~(3). \end{proof} \section{Approximation Ratio on $\mathcal{F}$ and Comparison with H\aa stad's Threshold}\label{sec:ratio} \begin{proposition}[Approximation Ratio $0.977$ on $\mathcal{F}$]\label{prop:ratio} There is a polynomial-time algorithm that returns, for every $\Xi \in \mathcal{F}$, an assignment $\tau$ with $\mathrm{val}(\Xi,\tau) \ge 0.977\,\mathrm{OPT}(\Xi)$. \end{proposition} \begin{proof} Given $\Xi \in \mathcal{F}$, recover $\Phi$ such that $\Xi = \Xi(\Phi)$ and let $m$ be its number of clauses. Invoke the polynomial-time algorithm of Theorem~\ref{thm:alg} on $\Phi$ to obtain an assignment $\sigma$ satisfying $\mathrm{val}(\Phi,\sigma) \ge \rho\,\mathrm{OPT}(\Phi)$, and extend $\sigma$ to $\tau$ via Lemma~\ref{lem:comp}(2). Setting $x = \mathrm{OPT}(\Phi)/m \in [0,1]$, Lemma~\ref{lem:comp}(2) and~(3) give \[ \frac{\mathrm{val}(\Xi,\tau)}{\mathrm{OPT}(\Xi)} \;\ge\; \frac{3m + \rho\,\mathrm{OPT}(\Phi)}{3m + \mathrm{OPT}(\Phi)} \;=\; \frac{3 + \rho x}{3 + x}. \] For $\rho \le 1$ and $0 \le x \le 1$, we have the algebraic identity \[ 4(3 + \rho x) - (3 + \rho)(3 + x) \;=\; 3(1 - \rho)(1 - x) \;\ge\; 0, \] and therefore, using $\rho \ge 0.908$, \[ \frac{3 + \rho x}{3 + x} \;\ge\; \frac{3 + \rho}{4} \;\ge\; \frac{3 + 0.908}{4} \;=\; 0.977. \qedhere \] \end{proof} We now compare the syntactic structure and approximation ratio of $\mathcal{F}$ against H\aa stad's worst-case $3/4$ approximation-resistance regime. \begin{proposition}[Precondition Satisfaction and Quantitative Comparison with H\aa stad's $3/4$ Threshold~\cite{Hastad2001}]\label{prop:hastad_coverage} Every instance $\Xi \in \mathcal{F}$ satisfies H\aa stad's syntactic preconditions for MAX-XOROR—namely, every clause acts on three distinct variables and permits arbitrary literal polarity. Moreover, any polynomial-time gap reduction into $\mathcal{F}$ achieving completeness $y$ and soundness $n$ with ratio $n/y \le 3/4$ (in particular, H\aa stad's $(1-\varepsilon)$ versus $(3/4+\varepsilon)$ parameters for any $0 < \varepsilon < \frac{0.227}{1.977} \approx 0.1148$) satisfies $n < 0.977\,y$ and thus satisfies the hypothesis of Theorem~\ref{thm:main}. \end{proposition} \begin{proof} By definition of $\mathcal{F}$, any $\Xi \in \mathcal{F}$ has the form $\Xi(\Phi)$ for a MAX NAE-3SAT instance $\Phi$ whose clauses each involve three distinct variables. By Proposition~\ref{prop:distinct}, every clause of $\Xi(\Phi)$ is therefore on three distinct variables, ruling out variable-repetition degeneracies. In addition, the gadget construction allows arbitrary signs on both the source literals of $\Phi$ and the fresh auxiliary literals $(a_i,b_i,c_i)$ (Lemma~\ref{lem:gadget}), matching the free literal-polarity precondition of H\aa stad's Long Code reduction. For the quantitative threshold, suppose a polynomial-time reduction into $\mathcal{F}$ achieves completeness $y > 0$ and soundness $n \ge 0$ with $n/y \le 3/4$. Since $3/4 = 0.75 < 0.977$, we immediately obtain \[ n \;\le\; \frac{3}{4}\,y \;=\; 0.75\,y \;<\; 0.977\,y. \] Specifically, for H\aa stad's canonical parameters $y = 1 - \varepsilon$ and $n = \frac{3}{4} + \varepsilon$, the strict inequality $\frac{3}{4} + \varepsilon < 0.977(1 - \varepsilon)$ holds whenever $1.977\,\varepsilon < 0.227$, i.e., for every $0 < \varepsilon < \frac{0.227}{1.977}$. Note also that by Lemma~\ref{lem:comp}(3), every $\Xi(\Phi) \in \mathcal{F}$ satisfies $\mathrm{OPT}(\Xi(\Phi)) = 3m + \mathrm{OPT}(\Phi) \ge 3m = \frac{3}{4}|\Xi(\Phi)|$, so any soundness parameter $n$ on $\mathcal{F}$ necessarily satisfies $n \ge 3/4$, placing H\aa stad's $(3/4+\varepsilon)$ threshold directly above the structural floor $3/4$ of $\mathcal{F}$ while remaining strictly below the algorithmic barrier $0.977\,y$ of Proposition~\ref{prop:ratio}. \end{proof} \section{The MAX-XOROR Gap-Hardness Hypothesis}\label{sec:main} Proposition~\ref{prop:hastad_coverage} shows that instances in $\mathcal{F}$ satisfy H\aa stad's syntactic preconditions and that any reduction into $\mathcal{F}$ matching H\aa stad's $3/4$ approximation-resistance gap lies strictly inside $n < 0.977\,y$. We formulate the restriction of this gap hardness to $\mathcal{F}$ as an explicit hypothesis and record its complexity-theoretic consequence. \paragraph{MAX-XOROR Gap-Hardness Hypothesis on $\mathcal{F}$.} There exist rational constants $0 \le n < y \le 1$ with $n < 0.977\,y$ and a polynomial-time many-one reduction from Boolean satisfiability to $\mathcal{F}$ that maps satisfiable formulas to instances $\Xi \in \mathcal{F}$ with $\mathrm{OPT}(\Xi) \ge y\,|\Xi|$ and unsatisfiable formulas to instances $\Xi \in \mathcal{F}$ with $\mathrm{OPT}(\Xi) \le n\,|\Xi|$. \begin{theorem}[Conditional Consequence]\label{thm:main} Under the MAX-XOROR Gap-Hardness Hypothesis on $\mathcal{F}$, $\mathrm{P} = \mathrm{NP}$. \end{theorem} \begin{proof} Fix the rational constants $n, y$ and the polynomial-time reduction supplied by the hypothesis. Given a Boolean formula, apply the reduction to produce $\Xi \in \mathcal{F}$ in polynomial time, run the algorithm of Proposition~\ref{prop:ratio} on $\Xi$ to obtain an assignment $\tau$, and compare $V = \mathrm{val}(\Xi,\tau)$ against the rational threshold $0.977\,y\,|\Xi|$: \begin{itemize} \item If the input formula is satisfiable, then $\mathrm{OPT}(\Xi) \ge y\,|\Xi|$, so Proposition~\ref{prop:ratio} guarantees $V \ge 0.977\,\mathrm{OPT}(\Xi) \ge 0.977\,y\,|\Xi|$. \item If the input formula is unsatisfiable, then $\mathrm{OPT}(\Xi) \le n\,|\Xi|$, so $V \le \mathrm{OPT}(\Xi) \le n\,|\Xi| < 0.977\,y\,|\Xi|$. \end{itemize} Thus, testing whether $V \ge 0.977\,y\,|\Xi|$ decides Boolean satisfiability in polynomial time, proving $\mathrm{P} = \mathrm{NP}$. \end{proof} \section{Formal Verification in Lean 4}\label{sec:lean} The Lean~4 modules \texttt{PNP.Gadget}, \texttt{PNP.Semantics} and \texttt{PNP.CitedResults} (in \texttt{PNP/}) provide machine-checked proofs of the finite case analysis, the variable-distinctness and polarity properties, the composition lemma, and the rational inequalities underlying the reduction. \begin{itemize} \item \texttt{PNP.Gadget.nae\_gadget\_value}: verifies Lemma~\ref{lem:gadget} exhaustively across all Boolean assignments to $(x,y,z)$ and all choices of signs for the auxiliary literals $(a,b,c)$. \item \texttt{PNP.Gadget.gadget\_distinct}: verifies the pairwise variable-distinctness conditions for the four clauses of $\Xi_C$ used in Proposition~\ref{prop:distinct} and Proposition~\ref{prop:hastad_coverage}. \item \texttt{PNP.Gadget.xi\_distinct} and \texttt{PNP.Gadget.xiBlock\_length}: for $\Phi$ given by its clauses and for every choice of the signs of the fresh literals, if every clause of $\Phi$ is on three distinct variables then so is every clause of $\Xi(\Phi)$, and each block has four clauses (Proposition~\ref{prop:distinct}). \item \texttt{PNP.Gadget.distinct\_polarity\_free}: being on three distinct variables does not depend on the signs of the three literals (the free-polarity precondition of Proposition~\ref{prop:hastad_coverage}). \item \texttt{PNP.Gadget.ratio\_three\_quarters}, \texttt{PNP.Gadget.hastad\_threshold\_iff}, \texttt{PNP.Gadget.hastad\_gap\_decides} and \texttt{PNP.Gadget.floor\_three\_quarters}: $n\le\frac34 y$ with $y>0$ gives $n<0.977\,y$; $\frac34+\varepsilon<0.977(1-\varepsilon)$ if and only if $\varepsilon<\frac{0.227}{1.977}$; an algorithm of ratio $r\ge0.977$ separates $1-\varepsilon$ from $\frac34+\varepsilon$ for such $\varepsilon$; and $3m=\frac34\cdot 4m$ (Proposition~\ref{prop:hastad_coverage}). \item \texttt{PNP.Semantics.xiVal\_le}, \texttt{PNP.Semantics.exists\_extension} and \texttt{PNP.Semantics.opt\_identity}: Lemma~\ref{lem:comp}~(1), (2) and (3), for the values $\mathrm{val}$ and optima $\mathrm{OPT}$ of MAX NAE-3SAT instances and of $\Xi(\Phi)$ defined in \texttt{PNP/Semantics.lean}. \item \texttt{PNP.Gadget.ratio\_lower} and \texttt{PNP.Gadget.family\_ratio}: prove the inequality $\frac{3+\rho}{4} \le \frac{3+\rho x}{3+x}$ for $\rho \le 1$, $x \in [0,1]$, and deduce $0.977 \le \frac{3+\rho x}{3+x}$ whenever $\rho \ge 0.908$. \item \texttt{PNP.Semantics.ratio\_on\_image}: Proposition~\ref{prop:ratio}: an assignment of $\Phi$ of value at least $\rho\,\mathrm{OPT}(\Phi)$ with $\rho\ge0.908$ extends to an assignment of $\Xi(\Phi)$ of value at least $0.977\,\mathrm{OPT}(\Xi(\Phi))$. \item \texttt{PNP.Gadget.decide\_gap}: verifies the strict gap separation $n < r\,y$ used in Proposition~\ref{prop:hastad_coverage} and Theorem~\ref{thm:main}. \item \texttt{PNP.Cited.main\_decides}: the combinatorial core of Theorem~\ref{thm:main}. Its hypotheses, stated in \texttt{PNP/CitedResults.lean}, are \texttt{NaeRatio}, the ratio guarantee of Theorem~\ref{thm:alg} (an assignment of value at least $\rho\,\mathrm{OPT}(\Phi)$ for every instance on distinct variables), and \texttt{GapReduction}, the MAX-XOROR Gap-Hardness Hypothesis on $\mathcal{F}$ with $n<0.977\,y$. For every input $f$ there is then an assignment $\tau$ of $\Xi(\Phi_f)$ such that $f$ is satisfiable if and only if $\tau$ has value at least $0.977\,y\,|\Xi(\Phi_f)|$. \end{itemize} For independent kernel replay via \texttt{lake comparator}, \texttt{Challenge.lean} and \texttt{Solution.lean} expose in the namespace \texttt{PNP.Public} the seventeen theorems \texttt{nae\_gadget\_value}, \texttt{ratio\_lower}, \texttt{family\_ratio}, \texttt{decide\_gap}, \texttt{gadget\_distinct}, \texttt{image\_distinct}, \texttt{image\_block\_length}, \texttt{polarity\_free}, \texttt{ratio\_three\_quarters}, \texttt{hastad\_threshold\_iff}, \texttt{hastad\_gap\_decides}, \texttt{floor\_three\_quarters}, \texttt{comp\_upper}, \texttt{comp\_extend}, \texttt{comp\_opt}, \texttt{ratio\_on\_image} and \texttt{main\_decides} listed in \texttt{comparator.json}. Polynomial running time, NP-hardness, Theorem~\ref{thm:alg} beyond its ratio guarantee, H\aa stad's theorem~\cite{Hastad2001}, and the class equality $\mathrm{P}=\mathrm{NP}$ are not formalized in Lean~4. The repository is available at~\cite{VegaRepository}. \bibliographystyle{plainurl} \bibliography{biblio} \end{document}