From bd1c88ea3463ff08c4c2cc4376ba1122efe10ac9 Mon Sep 17 00:00:00 2001 From: Will Cook <46428721+wcook04@users.noreply.github.com> Date: Sun, 15 Nov 2026 22:25:18 +0000 Subject: [PATCH] Publish second-review PCP accounts and repair narrow reader header --- papers/pcp-exposition/generated/lean.json | 124 ++ papers/pcp-exposition/links.json | 83 +- papers/pcp-exposition/paper.md | 494 +++-- papers/pcp-exposition/paper.toml | 2 +- papers/pcp-full-argument/links.json | 50 +- papers/pcp-full-argument/paper.md | 2097 +++++++++++---------- papers/pcp-specialist/generated/lean.json | 77 + papers/pcp-specialist/links.json | 64 +- papers/pcp-specialist/paper.md | 147 +- papers/pcp-specialist/paper.toml | 2 +- tests/journey.py | 59 + web/src/app/app.css | 2 +- 12 files changed, 1896 insertions(+), 1305 deletions(-) diff --git a/papers/pcp-exposition/generated/lean.json b/papers/pcp-exposition/generated/lean.json index 467cfdf..d32205e 100644 --- a/papers/pcp-exposition/generated/lean.json +++ b/papers/pcp-exposition/generated/lean.json @@ -1,17 +1,21 @@ { "modules": [ "PCP.Algebraic.BLR", + "PCP.Algebraic.BinaryLocalCorrection", "PCP.Algebraic.BinaryLocalCorrectionSoundness", "PCP.Algebraic.BinaryZeroOnGridSoundness", "PCP.Algebraic.EncodedLineLowDegreeSoundness", + "PCP.Algebraic.EncodedLineLowDegreeTest", "PCP.Algebraic.GeneratorLowDegreeTest", "PCP.Algebraic.GridVanishing", "PCP.Algebraic.Hadamard", "PCP.Algebraic.HadamardSoundness", "PCP.Algebraic.HadamardTest", "PCP.Algebraic.PointLineSoundness", + "PCP.Algebraic.SetMultilinear", "PCP.Algebraic.ThreeColorAmplifiedVerifier", "PCP.Algebraic.ThreeColorGrid", + "PCP.Algebraic.ThreeColorVerifier", "PCP.Algebraic.ThreeColorVerifierCompleteness", "PCP.Algebraic.ThreeColorVerifierSoundness", "PCP.Complexity.CostModel", @@ -7498,6 +7502,126 @@ "type": "SOURCE EXCERPT, NOT ELABORATED:\ntheorem orGate_iff (z x y : Literal W) (a : W → Bool) :\n (∀ j, ClauseHolds (orGate z x y j) a) ↔ z.eval a = (x.eval a || y.eval a)", "type_dependencies": [], "value_dependencies": [] + }, + { + "axioms": [], + "doc": null, + "end_line": 64, + "is_class": false, + "kind": "def", + "line": 63, + "module": "PCP.Algebraic.SetMultilinear", + "name": "PCP.Algebraic.SetMultilinear.evaluationPoint", + "provenance": "source-read", + "structural_dependencies": [], + "type": "SOURCE EXCERPT, NOT ELABORATED:\ndef evaluationPoint (x : R) : Variables m c → R :=\n fun ij => x ^ ((ij.2 : ℕ) * m ^ (ij.1 : ℕ))", + "type_dependencies": [], + "value_dependencies": [] + }, + { + "axioms": [], + "doc": null, + "end_line": 107, + "is_class": false, + "kind": "theorem", + "line": 101, + "module": "PCP.Algebraic.SetMultilinear", + "name": "PCP.Algebraic.SetMultilinear.eval_encode", + "provenance": "source-read", + "structural_dependencies": [], + "type": "SOURCE EXCERPT, NOT ELABORATED:\ntheorem eval_encode (P : Polynomial R) (hP : P.natDegree < m ^ c) (x : R) :\n MvPolynomial.eval (evaluationPoint m c x) (encode m c P) = P.eval x", + "type_dependencies": [], + "value_dependencies": [] + }, + { + "axioms": [], + "doc": null, + "end_line": 32, + "is_class": false, + "kind": "abbrev", + "line": 32, + "module": "PCP.Algebraic.EncodedLineLowDegreeTest", + "name": "PCP.Algebraic.EncodedLineLowDegreeTest.Auxiliary", + "provenance": "source-read", + "structural_dependencies": [], + "type": "SOURCE EXCERPT, NOT ELABORATED:\nabbrev Auxiliary (F σ : Type*) (m c t : ℕ) := Lines F σ → RowOracle F m c t", + "type_dependencies": [], + "value_dependencies": [] + }, + { + "axioms": [], + "doc": null, + "end_line": 45, + "is_class": false, + "kind": "structure", + "line": 37, + "module": "PCP.Algebraic.ThreeColorVerifier", + "name": "PCP.Algebraic.ThreeColorVerifier.Proof", + "provenance": "source-read", + "structural_dependencies": [], + "type": "SOURCE EXCERPT, NOT ELABORATED:\nstructure Proof (F : Type*) (n m c t : ℕ) where\n color : Vertex F n → Coefficients t 3 → ZMod 2\n validCert : PairPoint F n → Coefficients t 1 → ZMod 2\n difference : PairPoint F n → Coefficients t 3 → ZMod 2\n properCert : ProperPoint F n → Coefficients t 1 → ZMod 2\n colorLines : EncodedLineLowDegreeTest.Auxiliary F (Fin n) m c t\n validLines : EncodedLineLowDegreeTest.Auxiliary F (Fin n ⊕ Fin n) m c t\n differenceLines : EncodedLineLowDegreeTest.Auxiliary F (Fin n ⊕ Fin n) m c t\n properLines : EncodedLineLowDegreeTest.Auxiliary F (Fin (n + n) ⊕ Fin (n + n)) m c t", + "type_dependencies": [], + "value_dependencies": [] + }, + { + "axioms": [], + "doc": null, + "end_line": 136, + "is_class": false, + "kind": "inductive", + "line": 124, + "module": "PCP.Algebraic.ThreeColorVerifier", + "name": "PCP.Algebraic.ThreeColorVerifier.Query", + "provenance": "source-read", + "structural_dependencies": [], + "type": "SOURCE EXCERPT, NOT ELABORATED:\ninductive Query (F : Type*) (n m c t : ℕ) where\n | color : Vertex F n → Coefficients t 3 → Query F n m c t\n | validCert : PairPoint F n → Coefficients t 1 → Query F n m c t\n | difference : PairPoint F n → Coefficients t 3 → Query F n m c t\n | properCert : ProperPoint F n → Coefficients t 1 → Query F n m c t\n | colorLine : (Vertex F n × Vertex F n) → BinaryLocalCorrection.InnerPoint F m c →\n Coefficients t 1 → Query F n m c t\n | validLine : (PairPoint F n × PairPoint F n) → BinaryLocalCorrection.InnerPoint F m c →\n Coefficients t 1 → Query F n m c t\n | differenceLine : (PairPoint F n × PairPoint F n) → BinaryLocalCorrection.InnerPoint F m c →\n Coefficients t 1 → Query F n m c t\n | properLine : (ProperPoint F n × ProperPoint F n) → BinaryLocalCorrection.InnerPoint F m c →\n Coefficients t 1 → Query F n m c t", + "type_dependencies": [], + "value_dependencies": [] + }, + { + "axioms": [], + "doc": null, + "end_line": 147, + "is_class": false, + "kind": "def", + "line": 139, + "module": "PCP.Algebraic.ThreeColorVerifier", + "name": "PCP.Algebraic.ThreeColorVerifier.read", + "provenance": "source-read", + "structural_dependencies": [], + "type": "SOURCE EXCERPT, NOT ELABORATED:\ndef read (π : Proof F n m c t) : Query F n m c t → ZMod 2\n | .color x q => π.color x q\n | .validCert x q => π.validCert x q\n | .difference x q => π.difference x q\n | .properCert x q => π.properCert x q\n | .colorLine uv x q => π.colorLines uv x q\n | .validLine uv x q => π.validLines uv x q\n | .differenceLine uv x q => π.differenceLines uv x q\n | .properLine uv x q => π.properLines uv x q", + "type_dependencies": [], + "value_dependencies": [] + }, + { + "axioms": [], + "doc": null, + "end_line": 59, + "is_class": false, + "kind": "def", + "line": 45, + "module": "PCP.Algebraic.BinaryLocalCorrection", + "name": "PCP.Algebraic.BinaryLocalCorrection.run", + "provenance": "source-read", + "structural_dependencies": [], + "type": "SOURCE EXCERPT, NOT ELABORATED:\nnoncomputable def run (ρ : F ≃ₗ[ZMod 2] (Fin t → ZMod 2))\n (nodes : Fin (c + 1) → F) (ζ : F)\n (f : (σ → F) → Coefficients t 1 → ZMod 2)\n (H : (σ → F) → RowOracle F m c t) (a b : σ → F) (z : Fˣ)\n (v : InnerPoint F m c) (w : Fin t → ZMod 2) (s : InnerSeed F m c t) :\n Option (ZMod 2) := by", + "type_dependencies": [], + "value_dependencies": [] + }, + { + "axioms": [], + "doc": null, + "end_line": 151, + "is_class": false, + "kind": "theorem", + "line": 149, + "module": "PCP.Algebraic.SetMultilinear", + "name": "PCP.Algebraic.SetMultilinear.totalDegree_encode_le", + "provenance": "source-read", + "structural_dependencies": [], + "type": "SOURCE EXCERPT, NOT ELABORATED:\ntheorem totalDegree_encode_le (P : Polynomial R) :\n (encode m c P).totalDegree ≤ c", + "type_dependencies": [], + "value_dependencies": [] } ] } diff --git a/papers/pcp-exposition/links.json b/papers/pcp-exposition/links.json index 8a3ba29..73d1c94 100644 --- a/papers/pcp-exposition/links.json +++ b/papers/pcp-exposition/links.json @@ -181,13 +181,13 @@ "id": "pcp-expository-grid-certificate", "section": "5", "role": "explains", - "quote": "The displayed decomposition certifies the grid condition: each term\ncontains a factor that vanishes on the grid. In more variables, the\ncorresponding statement is Lemma 2.9 of the [corrected paper][paper-v2]:\na polynomial vanishing on $H^m$ can be written", + "quote": "Each summand vanishes on the grid because it contains one of its\ncoordinate vanishing polynomials. Polynomial division in each\nvariable proves this result. After removing all multiples of the\n$Z_H(X_j)$, the remainder has degree less than $|H|$ in every variable;\nif it is zero on the whole grid, repeated univariate interpolation makes\nthe remainder zero. Write $h=|H|\\geq1$. Division can choose each nonzero\nquotient with $\\deg Q_j+h\\leq\\deg P$: removing a multiple of the monic\ndegree-$h$ polynomial loses $h$ from its total degree.", "lean": [ "PCP.Algebraic.GridVanishing.vanishesOn_iff_exists_decomposition" ], "anchor": { "heading": "5. A certificate for vanishing on a grid", - "block": 5 + "block": 3 } }, { @@ -239,7 +239,7 @@ ], "anchor": { "heading": "Why the construction needs more than linear questions", - "block": 12 + "block": 13 } }, { @@ -252,7 +252,7 @@ ], "anchor": { "heading": "8. Combining the encodings and returning to the grid", - "block": 11 + "block": 8 } }, { @@ -278,14 +278,14 @@ ], "anchor": { "heading": "10. Randomness, proof length and repetition", - "block": 11 + "block": 5 } }, { "id": "linked-source-14", "section": "9. From the seven checks to a colouring", "role": "explains", - "quote": "For perfect completeness, start with a proper colouring, interpolate it,\nform its difference polynomial, and construct the two vanishing\ncertificates. Supply their honest encodings and line tables.\nInterpolation identities, binary encoding identities and the two grid\ncertificates then make every check accept for every seed, provided the\nhonest degrees fit the encoding capacity. Section 10 checks the\nsufficient condition $5m(h-1) @@ -286,9 +286,7 @@ they are different exactly when $(u-v)^3-1=0$. The residual values are: | $u=\omega$ | $0$ | $1$ | $0$ | | $u=\omega^2$ | $0$ | $0$ | $1$ | -For example, the triangle coloured $(1,\omega,\omega^2)$ gives three -zero edge residuals. The assignment $(1,1,\omega^2)$ gives residuals -$(1,0,0)$ on edges $12,23,31$. The colour-validity check remains necessary: +The colour-validity check remains necessary: the edge identity was interpreted under the assumption that its two arguments were allowed colours. To see what goes wrong without that assumption, give the four vertices of $K_4$ all four elements of @@ -314,43 +312,45 @@ $\operatorname{Val}$ vanishes on $H^m$ and $\operatorname{Prop}$ vanishes on $H^{2m}$. The adjacency factor makes the second requirement automatic for nonedges. -This translation has combined all the vertex requirements into one -polynomial and all the edge requirements into another. It has not yet -made them easy to check. In particular, we need vanishing **on the grid**, -not on the whole field. A perfectly valid $\operatorname{Val}$ can be -nonzero away from the grid. A random ambient evaluation cannot simply be -required to equal zero. - - - -## 5. A certificate for vanishing on a grid - -Return temporarily to $\mathbb F_5$, with $H=\{0,1\}$ and -$Z(X)=X(X-1)$. Consider +We will follow the vertex condition for a graph consisting of one edge. +Label its ends by $H=\{0,1\}$ and give them colours $1,\omega$. +Their interpolating polynomial is $$ -P(X,Y)=Z(X)(Y+1)+Z(Y)(X+2). +\chi(X)=1+\omega^2X, +\qquad \chi(0)=1,\quad \chi(1)=\omega. $$ -It vanishes at all four points of $H^2$: at each of them both $Z(X)$ -and $Z(Y)$ vanish. It is not the zero polynomial. For example, +Its vertex residual is $$ -P(2,2)=2\cdot3+2\cdot4=4\pmod5. +P(X)=\chi(X)^3-1 +=X^3+\omega X^2+\omega^2X +=(X^2+X)(X+\omega^2). $$ -The displayed decomposition certifies the grid condition: each term -contains a factor that vanishes on the grid. In more variables, the -corresponding statement is Lemma 2.9 of the [corrected paper][paper-v2]: -a polynomial vanishing on $H^m$ can be written +At the off-grid point $x=\omega$, we have $\chi(\omega)=0$ and +$P(\omega)=1$. This is consistent with a proper colouring: only $0,1$ +label vertices. We need $P$ to vanish on the vertex grid, while the +checker samples the larger ambient field. + + + +## 5. A certificate for vanishing on a grid + +In the one-edge example, $Z_H(X)=X^2+X$ vanishes precisely on +$H=\{0,1\}$, and $P(X)=Z_H(X)(X+\omega^2)$. The factorisation +certifies the vertex condition. More generally, Lemma 2.9 of the +[corrected paper][paper-v2] says that every polynomial vanishing on $H^m$ +has a representation $$ P(X)=\sum_{j=1}^m Z_H(X_j)Q_j(X), -\qquad Z_H(T)=\prod_{h\in H}(T-h), +\qquad Z_H(T)=\prod_{h\in H}(T-h). $$ -with suitable degree bounds on the $Q_j$. In our example the two quotients -are visible: $Q_1=Y+1$ and $Q_2=X+2$. Polynomial division in each +Each summand vanishes on the grid because it contains one of its +coordinate vanishing polynomials. Polynomial division in each variable proves this result. After removing all multiples of the $Z_H(X_j)$, the remainder has degree less than $|H|$ in every variable; if it is zero on the whole grid, repeated univariate interpolation makes @@ -381,16 +381,16 @@ where $Z_H$ is applied to each coordinate. These identities also imply the desired grid condition: if $x\in H^m$, then $Z_H(x)=0$, so both expressions for $M$ give $P(x)=0$. -In the small example, the packaged certificate is +Our one-edge colouring gives $$ -M(X,Y,U,V)=U(Y+1)+V(X+2). +M(X,U)=U(X+\omega^2),\qquad Z_H(\omega)=1. $$ -At $(X,Y)=(2,2)$ its two substitutions are -$M(2,2,0,0)=0$ and $M(2,2,2,2)=4=P(2,2)$. -The polynomial $P$ is allowed to be nonzero there. The identity between -the certificate and $P$ holds everywhere. +At $x=\omega$, the two identities read $M(\omega,0)=0$ and +$M(\omega,1)=1=P(\omega)$. We will follow these two certificate +requests through the encoding. Their equality holds away from the +vertex grid too, although the residual itself is nonzero there. Now suppose a proposed low-degree pair $P,M$ has $P$ nonzero somewhere on the grid. At least one of the two identities must be false as a @@ -413,6 +413,26 @@ We need to recover a value at a prescribed point through random locations elsewhere in the table. + +### The stored proof + +The prover supplies four primary tables and four auxiliary line tables. +In an honest proof, their intended contents are: + +| Primary polynomial | What it records | Binary labels | +| --- | --- | --- | +| $\chi(x)$ | Colour extension at every ambient point; its grid values give the colouring | Degree at most three | +| $\chi'(x,y)$ | Difference $\chi(x)-\chi(y)$ | Degree at most three | +| $M_V(x,u)$ | Certificate for the vertex condition | Affine linear | +| $M_E(x,y,u,v)$ | Certificate for the edge condition | Affine linear | + +Each auxiliary table supplies the encoded restrictions of its primary +polynomial to lines. A label is a bit-valued question about a field +value; Section 7 defines the affine and degree-three label spaces. A received proof can contain arbitrary bits; the +tests must establish proximity to polynomials with these roles. + + + ## 6. Keeping the number of queries constant @@ -481,6 +501,16 @@ substitution recovers every evaluation of the original polynomial. The construction fixes $c$, while allowing the number of variables to grow. This is the **set-multilinear encoding** defined in Section 3.1 of the [corrected paper][paper-v2]; Claim 3.2 states its evaluation identity. +Write the substitution as + +$$ +\Phi:F\longrightarrow F^{cb},\qquad +\Phi(z)_{i,j}=z^{jb^i}\quad(0\le i ## 8. Combining the encodings and returning to the grid -The prover supplies four primary tables and four auxiliary line tables. -In an honest proof, their intended contents are: - -| Primary polynomial | What it records | Binary labels | -| --- | --- | --- | -| $\chi(x)$ | Colour at a vertex-grid point | Degree at most three | -| $\chi'(x,y)$ | Difference $\chi(x)-\chi(y)$ | Degree at most three | -| $M_V(x,u)$ | Certificate for the vertex condition | Affine linear | -| $M_E(x,y,u,v)$ | Certificate for the edge condition | Affine linear | - -Each auxiliary table supplies the encoded restrictions of its primary -polynomial to lines. A received proof can contain arbitrary bits; the -tests must establish proximity to polynomials with these roles. - The construction now has two forms of redundancy. A line polynomial is encoded as a polynomial of fixed degree in more variables. Each field-valued entry is in turn encoded by binary questions. The @@ -750,14 +775,16 @@ uniformly from the whole field. Zero directions and parameters are included. It primary row at $u$, tests the auxiliary row for that same $(u,v)$, and compares the primary bit at $(u+zv,L)$ with a corrected auxiliary answer at $(\Phi(z),L)$. Here $L$ is a uniform homogeneous label. -All three checks must pass. +All three checks must pass. Inside the auxiliary test, a fair coin chooses +between a row test and a weighted interpolation check; it does not run +both alternatives on every seed. -The two kinds of address are worth separating: +For a primary polynomial on $F^k$, the two kinds of address are: | Table | Address | Returned object | | --- | --- | --- | | Primary | Ambient point $x$ and label $R$ | One bit about the value at $x$ | -| Auxiliary | Oriented line $(u,v)$, inner point $w$, and label $R$ | One bit about its digit-encoded line value at $w$ | +| Auxiliary | Oriented line $(u,v)\in F^k\times F^k$, inner point $w\in F^{cb}$, and affine label $R$ | One bit about its digit-encoded line value at $w$ | For an honest auxiliary row, putting $w=\Phi(z)$ recovers an observation of the original line value at $z$. Correction obtains that observation @@ -829,6 +856,15 @@ label. This is the precise combined testing result we use below; the [full account][long] derives the constants by summing the row-decoding, line-correction and comparison errors. +The outer test averages over anchors $u$ and directions $v$. At a +prescribed target $a\in F^k$, every row used by a corrector has anchor +$a$. All those rows together occupy only a fraction $Q^{-k}$ of the +auxiliary table and could all be corrupt. For $Q=4,k=2$, they are 16 of +256 oriented lines, yet comprise every line this corrector can select. +Randomising the direction does not randomise the anchor. The corrector +therefore tests its selected row again and charges that test's rejection +to its own rejection rate. + Now fix a target point $a$ whose bit we want to recover. The outer corrector performs the following experiment. @@ -878,8 +914,8 @@ M(x,0)=0, \qquad M(x,Z_H(x))=P(x). $$ -The binary ZERO test chooses a uniform point $x$ and homogeneous label -$L$, reads the primary bit $p(x,L)$, and calls the certificate corrector +The generic binary ZERO test chooses a uniform point $x$ and homogeneous +label $L$, obtains a constraint bit $p(x,L)$, and calls the certificate corrector at $(x,0)$ and $(x,Z_H(x))$. Both calls use this $L$ and independent remaining seeds. If they return $b_0,b_Z$, acceptance requires $b_0=0$ and $b_Z=p(x,L)$; either rejection makes ZERO reject. @@ -887,11 +923,13 @@ Consequently ZERO's rejection rate bounds each correction's rejection *averaged over its requested targets*. It does not give that bound for every fixed target separately. -For an honest zero-on-grid polynomial, the prover supplies its exact -primary encoding, an exact vanishing certificate and the honest encoded -line data for that certificate. All corrections and both identity checks -then succeed for every seed. Honest primary values alone would not -guarantee acceptance with an arbitrary certificate or arbitrary line data. +In the colouring verifier, $p(x,L)$ is a derived answer, not an extra +stored table. The vertex check obtains it from two masked colour-table +reads; the edge check uses two difference-table reads, with the public +adjacency value incorporated in the requested label. The stored proof +still has four primary/auxiliary pairs. On honest encodings, exact +certificates and their line data, all corrections and identities pass +for every seed. The soundness argument compares this received-data test with the ideal test on the decoded polynomials. If the two outcomes differ, @@ -909,10 +947,80 @@ or a wrong answer using both the global error fraction and the corrector's actual rejection rate. + + +### Following the one-edge certificate to bits + +Return to $P(X)=\chi(X)^3-1$, $M(X,U)=U(X+\omega^2)$ and $x=\omega$. +Choose the possible homogeneous-label outcome $L(a+b\omega)=a$. +The desired constraint bit is $L(P(\omega))=1$. Its Boolean label from +Section 7 is $\Lambda=1+Z_1+Z_2+Z_1Z_2$. For the possible mask +$R=Z_1$, the two colour-table reads are + +| Address | Bit on the honest row, where $\chi(\omega)=0$ | +| --- | ---: | +| $(\omega,Z_1)$ | $0$ | +| $(\omega,1+Z_2+Z_1Z_2)$ | $1$ | + +Their sum is the required bit. Every mask works on honest data; +fresh uniform masking is what supplies the error bound on received data. + +The certificate targets are $A=(\omega,0)$ and $B=(\omega,1)$. +Consider a run where both independently chosen outer directions equal +$v=(1,1)$ and both nonzero comparison parameters equal $z=1$. +The honest line restrictions are + +$$ +p_A(Y)=M(\omega+Y,Y)=Y^2+Y,\qquad +p_B(Y)=M(\omega+Y,1+Y)=Y^2+1. +$$ + +Both have value zero at the comparison parameter $1$. Thus the primary +comparison reads $((\omega^2,1),L)$ and $((\omega^2,0),L)$ both return zero. +At the target parameter $0$, the desired answers are zero and one. + +Choose $b=3,c=1$ for this honest illustration. The digit encodings are +$\widetilde p_A(W)=W_2+W_1$ and $\widetilde p_B(W)=W_2+W_0$. +With $\Phi(z)=(1,z,z^2)$ they recover $p_A(z),p_B(z)$. +The generator nodes $\omega,\omega^2$ have weights $\omega^2,\omega$, +so an affine inner polynomial $T$ satisfies + +$$ +T(w)=\omega^2T(w+\omega e)+\omega T(w+\omega^2e). +$$ + +Take the possible inner direction $e=(0,1,0)$ in each call. +The field weights become bit labels: $L(\omega^2u)=a+b$ and +$L(\omega u)=b$. The following table lists the eight weighted-interpolation +reads. Each call also runs the inner row test; those test reads are omitted +here. Each displayed address includes its call's anchor $A$ or $B$ and the +outer direction $v$; the two columns headed by labels specify the +remaining inner-point/label pairs. + +| Call | Step | $z$ | Point for $Z_1+Z_2$ | Bit | Point for $Z_2$ | Bit | Sum | +| ----- | ---------- | ---: | -------------------- | ---: | -------------------- | ---: | ---: | +| $A$ | Compare | $1$ | $(1,\omega^2,1)$ | $1$ | $(1,\omega,1)$ | $1$ | $0$ | +| $A$ | Return | $0$ | $(1,\omega,0)$ | $1$ | $(1,\omega^2,0)$ | $1$ | $0$ | +| $B$ | Compare | $1$ | $(1,\omega^2,1)$ | $0$ | $(1,\omega,1)$ | $0$ | $0$ | +| $B$ | Return | $0$ | $(1,\omega,0)$ | $1$ | $(1,\omega^2,0)$ | $0$ | $1$ | + +The comparison bits agree with the two primary reads. The syntactic row +tests pass on these honest encodings, and the calls return $b_0=0,b_Z=1$. +ZERO accepts: $b_0=0$ and $b_Z=1=p(\omega,L)$. + +Within each call, comparison and return reuse its inner direction. +Across the two calls, the remaining seeds are independent conditional on +$x,L$; displaying equal outcomes does not identify the random variables. +This example expands the data reads of one honest vertex check. Its tiny +field and $c=1$ do not instantiate the large-field soundness theorem or +the complete $c=4$, 187-query verifier. The [finite checker][trace-checker] +verifies the displayed identities and addresses. + + ## 9. From the seven checks to a colouring -The eight received tables were listed in Section 8. The verifier runs +The eight received tables were listed after the grid certificate in Section 5. The verifier runs four low-degree tests, one for each primary table and its line table; two ZERO tests, one for each colouring condition; and one difference check connecting $\chi'$ to $\chi$. It accepts only if all seven pass. @@ -928,7 +1036,7 @@ form its difference polynomial, and construct the two vanishing certificates. Supply their honest encodings and line tables. Interpolation identities, binary encoding identities and the two grid certificates then make every check accept for every seed, provided the -honest degrees fit the encoding capacity. Section 10 checks the +honest degrees fit the encoding capacity. Appendix A checks the sufficient condition $5m(h-1)2$, the preceding value $(a-1)2^{a-1}$ was too small, -and $a2^a\leq4(a-1)2^{a-1}$. The boundary value $a=2$ -adds only a constant. The formal definition also covers -$N=0,1$ by taking $a=2$. - -A point of $F^m$ takes $m\log_2|F|=s(12a+32)=O(\log N)$ -bits to specify. The encoded line data uses $cs=4s$ extra -field coordinates, so it fits the same order of address -length. - -A label address has a different form: it specifies polynomial coefficients. -There is one constant monomial, $t$ single variables, $\binom t2$ products -of two distinct variables, and $\binom t3$ products of three. Thus a -degree-three label uses $1+t+\binom t2+\binom t3$ bits for $t=12a+32$. -This is $O(a^3)$, which is also $O(a2^a)$ because -$a^2=O(2^a)$. Thus an address or a random seed for any of -the fixed number of tests has $O(\log N)$ bits. There -are at most $2^{C\log_2(N+2)}=(N+2)^C$ addresses for a fixed constant $C$, -hence polynomially many in total. - -The digit encoding uses base $b=s$ and degree $c=4$, so -the substitution estimate in Section 6 gives $D=cb^c=4s^4$. -The honest colour and certificate polynomials have degree at -most $5m(h-1)=5s(s-1)$. Since $s\geq4$, - -$$ -5s(s-1) + +## Appendix A. Parameters and error bounds + +### Parameter calculation + +For a graph with $N\geq2$ vertices, choose the least integer $a\geq2$ +such that $\lceil\log_2 N\rceil\leq a2^a$. Put + +$$ +s=2^a,\qquad |H|=m=s,\qquad c=4,\qquad +|F|=2^{12a+32}=2^{32}s^{12}. +$$ + +The grid $H^m$ contains $s^s=2^{a2^a}$ points, enough for +the vertices. Minimality of $a$ gives $a2^a=O(\log N)$: +if $a>2$, the preceding value $(a-1)2^{a-1}$ was too small, +and $a2^a\leq4(a-1)2^{a-1}$. The boundary value $a=2$ +adds only a constant. The formal definition also covers +$N=0,1$ by taking $a=2$. + +A point of $F^m$ takes $m\log_2|F|=s(12a+32)=O(\log N)$ +bits to specify. The encoded line data uses $cs=4s$ extra +field coordinates, so it fits the same order of address +length. + +A label address has a different form: it specifies polynomial coefficients. +There is one constant monomial, $t$ single variables, $\binom t2$ products +of two distinct variables, and $\binom t3$ products of three. Thus a +degree-three label uses $1+t+\binom t2+\binom t3$ bits for $t=12a+32$. +This is $O(a^3)$, which is also $O(a2^a)$ because +$a^2=O(2^a)$. Thus an address or a random seed for any of +the fixed number of tests has $O(\log N)$ bits. There +are at most $2^{C\log_2(N+2)}=(N+2)^C$ addresses for a fixed constant $C$, +hence polynomially many in total. + +The digit encoding uses base $b=s$ and degree $c=4$, so +the substitution estimate in Section 6 gives $D=cb^c=4s^4$. +The honest colour and certificate polynomials have degree at +most $5m(h-1)=5s(s-1)$. Since $s\geq4$, + +$$ +5s(s-1) + ### The error constants @@ -1350,6 +1462,48 @@ derives these coefficients. Their expansions are not additional choices of parameters; the same constants were used throughout the preceding proof. + +## Appendix B. The Boolean-to-colouring gadget + +The final colouring gadget can be checked by hand. +For Boolean values, write $\operatorname{NAE}(a,b,c)$ +when the three values are **not all equal**. A clause +$a\lor b\lor c$ is equivalent to the existence of +a bit $z$ such that + +$$ +\operatorname{NAE}(a,b,z),\qquad +\operatorname{NAE}(\neg z,c,0). +$$ + +If $a=b=0$, the first relation forces $z=1$, and the +second then forces $c=1$. If $a=b=1$, choose $z=0$; +if $a\ne b$, the same choice works regardless of $c$. +These cases establish the equivalence. + +Now make a palette triangle whose colours we call +$0,1,2$. These are palette names, represented by $1,\omega,\omega^2$ +in the earlier field encoding. A Boolean variable and its negation are +adjacent vertices, each joined to palette vertex $2$. +They must take opposite colours $0$ and $1$. For +each NAE relation on literal vertices $a,b,c$, add vertices $A,B,C$ +and the six edges + +$$ +\{AB,BC,CA,Aa,Bb,Cc\}. +$$ + +The first three edges form a triangle; the last three connect its vertices +to the corresponding literals. If all literal colours are equal, +the new triangle has only two colours available and +cannot be coloured. For literal colours $(0,0,1)$, +the new triangle can use $(1,2,0)$ respectively: +its colours are distinct, and each differs from +its adjacent literal. Permuting and complementing +the literal colours covers every other NAE case. + + + ### Optional calculation: converting a finite relation to clauses @@ -1386,7 +1540,7 @@ output remains polynomial in size. -## 12. Why the low-degree test needed correction +## Appendix C. Why the low-degree test needed correction The first version of the source paper used an element of order $c+1$ and unit weights. For $c=2$, let $\zeta$ have order three in a field @@ -1514,4 +1668,6 @@ Further reading: [bchks]: https://www.csc.kth.se/tcs/projects/publications/bchks.pdf -[example-checker]: https://github.com/wcook04/lean-exposition/blob/main/papers/pcp/expository/check_examples.py +[example-checker]: https://github.com/wcook04/lean-exposition/blob/f992ebd7fb9f16f921ec05c4c3f93f33ad933ad6/papers/pcp/expository/check_examples.py + +[trace-checker]: https://github.com/wcook04/lean-exposition/blob/e4f60e1d0b1a857074c9d9aa869a1c375e95920d/papers/pcp/expository/check_trace.py diff --git a/papers/pcp-exposition/paper.toml b/papers/pcp-exposition/paper.toml index 2802d5c..2d027d5 100644 --- a/papers/pcp-exposition/paper.toml +++ b/papers/pcp-exposition/paper.toml @@ -11,7 +11,7 @@ text = "Original algebraic proof: Amireddy, Behera, Srinivasan, Sudan and Willum [lean] project = "../pcp-full-argument/lean" -modules = ["PCP.Algebraic.BLR", "PCP.Algebraic.BinaryLocalCorrectionSoundness", "PCP.Algebraic.BinaryZeroOnGridSoundness", "PCP.Algebraic.EncodedLineLowDegreeSoundness", "PCP.Algebraic.GeneratorLowDegreeTest", "PCP.Algebraic.GridVanishing", "PCP.Algebraic.Hadamard", "PCP.Algebraic.HadamardSoundness", "PCP.Algebraic.HadamardTest", "PCP.Algebraic.PointLineSoundness", "PCP.Algebraic.ThreeColorAmplifiedVerifier", "PCP.Algebraic.ThreeColorGrid", "PCP.Algebraic.ThreeColorVerifierCompleteness", "PCP.Algebraic.ThreeColorVerifierSoundness", "PCP.Complexity.CostModel", "PCP.Complexity.Machine", "PCP.Complexity.NP", "PCP.Complexity.ThreeColorRuntime", "PCP.Reduction.FiniteBooleanConstraints", "PCP.ReverseConcrete", "PCP.Theorem", "PCP.Verifier.Definition"] +modules = ["PCP.Algebraic.BLR", "PCP.Algebraic.BinaryLocalCorrection", "PCP.Algebraic.BinaryLocalCorrectionSoundness", "PCP.Algebraic.BinaryZeroOnGridSoundness", "PCP.Algebraic.EncodedLineLowDegreeSoundness", "PCP.Algebraic.EncodedLineLowDegreeTest", "PCP.Algebraic.GeneratorLowDegreeTest", "PCP.Algebraic.GridVanishing", "PCP.Algebraic.Hadamard", "PCP.Algebraic.HadamardSoundness", "PCP.Algebraic.HadamardTest", "PCP.Algebraic.PointLineSoundness", "PCP.Algebraic.SetMultilinear", "PCP.Algebraic.ThreeColorAmplifiedVerifier", "PCP.Algebraic.ThreeColorGrid", "PCP.Algebraic.ThreeColorVerifier", "PCP.Algebraic.ThreeColorVerifierCompleteness", "PCP.Algebraic.ThreeColorVerifierSoundness", "PCP.Complexity.CostModel", "PCP.Complexity.Machine", "PCP.Complexity.NP", "PCP.Complexity.ThreeColorRuntime", "PCP.Reduction.FiniteBooleanConstraints", "PCP.ReverseConcrete", "PCP.Theorem", "PCP.Verifier.Definition"] source = "https://github.com/troyjlee/tcs-formalizations/tree/a0ce13ed0fa264f051c1278e039596ce65557fa4" source_name = "tcs-formalizations at a0ce13e" source_lines = "https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/{path}#L{line}-L{end}" diff --git a/papers/pcp-full-argument/links.json b/papers/pcp-full-argument/links.json index 8fe6e72..da6067d 100644 --- a/papers/pcp-full-argument/links.json +++ b/papers/pcp-full-argument/links.json @@ -225,7 +225,7 @@ "id": "pcp-long-intro-theorem", "section": "The algebraic PCP theorem: a detailed account of the Lean proof", "role": "explains", - "quote": "A polynomial-time verifier can check membership in any NP language by reading a constant number of bits from a suitably encoded proof. It uses only logarithmically many random bits, accepts a correct proof with certainty, and rejects every purported proof of a false statement with probability at least one half. This account explains the algebraic construction and the machine-level steps that establish this statement in Troy Lee's Lean formalization.", + "quote": "A polynomial-time verifier can check membership in any NP language by reading a constant number of bits from a suitably encoded proof. It uses only logarithmically many random bits, accepts a correct proof with certainty, and rejects every purported proof of a false statement with probability at least one half. We reconstruct the algebraic argument in Troy Lee's Lean formalization and explain how its implementation and machine-simulation theorems establish these resource bounds.", "lean": [ "PCP.np_subset_pcp" ], @@ -236,15 +236,15 @@ }, { "id": "pcp-long-intro-roadmap", - "section": "How the proof is organized", + "section": "From the algebraic tests to the PCP theorem", "role": "explains", - "quote": "A polynomial vanishing on the whole grid has a certificate built from the grid's coordinate vanishing polynomials.", + "quote": "Put $Z_H(T)=\\prod_{u\\in H}(T-u)$. The grid-vanishing theorem, proved in the algebraic chapter, writes any polynomial $A$ vanishing on $H^k$ as $\\sum_i Z_H(X_i)U_i(X)$. Its certificate $M(X,Y)=\\sum_iY_iU_i(X)$ satisfies $M(X,0)=0$ and $M(X,Z_H(X))=A(X)$, with $\\deg M\\le\\deg A$.", "lean": [ "PCP.Algebraic.GridVanishing.vanishesOn_iff_exists_certificate" ], "anchor": { - "heading": "How the proof is organized", - "block": 2 + "heading": "Three colours as polynomial equations", + "block": 19 } }, { @@ -290,7 +290,7 @@ "id": "pcp-long-algebra-generator-soundness", "section": "2", "role": "explains", - "quote": "Apply this result to (A6), with $n=c+1$. If", + "quote": "Suppose $q>2c$. If the test using a generator of $F^\\times$ and its Lagrange weights rejects with probability $\\delta<1/[2(c+2)^2]$, then a formal polynomial of total degree at most $c$ agrees with $f$ outside a set of relative size at most $2\\delta$.", "lean": [ "PCP.Algebraic.GeneratorLowDegreeTest.exists_close" ], @@ -348,7 +348,7 @@ ], "anchor": { "heading": "4. Bivariate agreement", - "block": 13 + "block": 14 } }, { @@ -361,7 +361,7 @@ ], "anchor": { "heading": "4. Bivariate agreement", - "block": 25 + "block": 26 } }, { @@ -374,7 +374,7 @@ ], "anchor": { "heading": "4. Bivariate agreement", - "block": 46 + "block": 47 } }, { @@ -615,15 +615,15 @@ }, { "id": "pcp-long-final-target", - "section": "From the algebraic tests to the PCP theorem", + "section": "The algebraic PCP theorem: a detailed account of the Lean proof", "role": "explains", - "quote": "The constants, polynomial, verifier and implementation are chosen before the input. The proof may depend on the input but is fixed before the random seed.", + "quote": "The verifier may choose its next proof address using the bits already read. The proof is fixed before the seed is drawn; the statement does not allow the prover to choose a new proof after seeing the verifier's randomness. The verifier, its implementation, the constants, and the proof-length polynomial are chosen for the language, before the input. Proofs may depend on the input.", "lean": [ "PCP.np_subset_pcp" ], "anchor": { - "heading": "From the algebraic tests to the PCP theorem", - "block": 4 + "heading": "The algebraic PCP theorem: a detailed account of the Lean proof", + "block": 8 } }, { @@ -662,7 +662,7 @@ ], "anchor": { "heading": "The eight tables and seven checks", - "block": 11 + "block": 12 } }, { @@ -675,7 +675,7 @@ ], "anchor": { "heading": "The eight tables and seven checks", - "block": 17 + "block": 18 } }, { @@ -702,7 +702,7 @@ ], "anchor": { "heading": "Soundness of the seven-check verifier", - "block": 7 + "block": 11 }, "lines": [ 90, @@ -719,7 +719,7 @@ ], "anchor": { "heading": "Soundness of the seven-check verifier", - "block": 12 + "block": 16 } }, { @@ -732,7 +732,7 @@ ], "anchor": { "heading": "Soundness of the seven-check verifier", - "block": 33 + "block": 37 } }, { @@ -929,6 +929,20 @@ "block": 7 }, "section": "The reverse inclusion" + }, + { + "id": "pcp-long-implementation-contracts", + "section": "Implementation results used in the argument", + "role": "uses", + "quote": "Its implementation condition identifies the verifier with the query tree obtained by unfolding this step for a bounded number of queries, on both possible answers at every branch. A further query at depth zero becomes rejection.", + "lean": [ + "PCP.Verifier.ImplementedBy", + "PCP.QueryTree.ofStep" + ], + "anchor": { + "heading": "Implementation results used in the argument", + "block": 2 + } } ], "plain": { diff --git a/papers/pcp-full-argument/paper.md b/papers/pcp-full-argument/paper.md index 2b7d9bd..cc6b2b0 100644 --- a/papers/pcp-full-argument/paper.md +++ b/papers/pcp-full-argument/paper.md @@ -10,7 +10,7 @@ attribution: "Original algebraic argument: Prashanth Amireddy, Amik Raj Behera, *An explanatory account prepared by Will Cook with AI assistance, following Troy Lee's formalization of the algebraic proof of Amireddy, Behera, Srinivasan, Sudan and Willumsgaard.* -A polynomial-time verifier can check membership in any NP language by reading a constant number of bits from a suitably encoded proof. It uses only logarithmically many random bits, accepts a correct proof with certainty, and rejects every purported proof of a false statement with probability at least one half. This account explains the algebraic construction and the machine-level steps that establish this statement in Troy Lee's Lean formalization. +A polynomial-time verifier can check membership in any NP language by reading a constant number of bits from a suitably encoded proof. It uses only logarithmically many random bits, accepts a correct proof with certainty, and rejects every purported proof of a false statement with probability at least one half. We reconstruct the algebraic argument in Troy Lee's Lean formalization and explain how its implementation and machine-simulation theorems establish these resource bounds. Here is the precise version. Let $L$ be a language of finite binary strings. Say that $L$ is in NP if there are a polynomial $p_0$ and a deterministic polynomial-time Boolean relation $R(x,w)$ such that @@ -33,7 +33,7 @@ $$ \mathrm{NP}\subseteq\mathrm{PCP}(O(\log n),O(1)). $$ -Conversely, any language with a verifier satisfying these effectiveness, length, completeness and soundness conditions is in NP. Guess the polynomially bounded proof prefix and check every random seed. There are polynomially many seeds because $2^{r(n)}\le 2^b[2(n+2)]^a$. Each simulation takes polynomial time. An input with a perfectly accepted proof passes this deterministic check; a false input cannot pass it because acceptance on every seed would contradict the soundness bound of one half. The final chapter supplies the concrete implementation and witness-checker details in both directions. Together the inclusions give +Conversely, any language with a verifier satisfying these effectiveness, length, completeness and soundness conditions is in NP. Guess the polynomially bounded proof prefix and check every random seed. There are polynomially many seeds because $2^{r(n)}\le 2^b[2(n+2)]^a$. Each simulation takes polynomial time. An input with a perfectly accepted proof passes this deterministic check; a false input cannot pass it because acceptance on every seed would contradict the soundness bound of one half. The first chapter supplies the implementation and witness-checker arguments in both directions, using the machine results identified below. Together the inclusions give $$ \mathrm{NP}=\mathrm{PCP}(O(\log n),O(1)). @@ -45,25 +45,19 @@ The formal statement uses an infinite Boolean oracle $\pi:\mathbb N\to\{0,1\}$ a ## How the proof is organized -The construction first treats graph three-colourability. A colouring is interpolated from a finite grid to a polynomial. Two families of equations express that every vertex has one of three permitted colours and adjacent vertices have different colours. A polynomial vanishing on the whole grid has a certificate built from the grid's coordinate vanishing polynomials. A verifier can therefore test a colouring through its low-degree encoding and these vanishing certificates. +The construction treats graph three-colourability first. Interpolation turns a colouring into a polynomial. Two polynomial constraints express colour validity and separation across edges; grid-vanishing certificates make them testable at random ambient points. The proof stores binary encodings of four polynomials and their line restrictions. Its seven checks must force one consistent colouring from arbitrary received bits. -There are two obstacles to checking only constantly many **bits**. A corrupted table may not be a polynomial at all, so low-degree testing must produce an actual nearby polynomial from the observed rejection probability. Also, a field element or a line polynomial can contain many bits, so counting a field-valued query as one proof query would not establish the theorem. The proof handles the obstacles in successive stages. +We begin with that verifier and prove the global implication from low rejection to colourability, using precise testing and correction statements. The chapter also gives perfect completeness, parameter choices, fair-bit sampling, repetition and the reductions to and from NP. The later chapters prove the algebraic and binary statements used in this assembly. Thus a reader can first see what each estimate must accomplish, then follow its proof without changing the verifier under discussion. -The first chapter establishes the algebraic tools. It proves interpolation and grid vanishing, then the corrected weighted low-degree test and the associated local correctors. It also proves point-versus-line soundness from bivariate agreement. Its explicit field-size and error bounds are carried into the subsequent tests. - -The second chapter encodes polynomial values as bits. A set-multilinear encoding lowers the degree needed by an inner test. Hadamard labels let the verifier request individual Boolean linear or polynomial observations of a field element. Linearity testing and local correction turn consistency checks on those bits into the hypotheses needed by the algebraic tests. The resulting encoded-line test, outer local corrector and zero-on-grid test have constant physical bit-query bounds. - -The final chapter combines four primary tables and four auxiliary line tables in a verifier with seven checks. A proper colouring supplies a proof accepted on every seed. Conversely, sufficiently small rejection forces four nearby polynomials; the consistency and vanishing checks force those polynomials to encode a proper colouring. Explicit parameter choices give polynomial proof length, logarithmic randomness and a constant positive rejection gap. Repetition brings soundness down to one half. The proof then implements uniform finite sampling using fair random bits, bounds the running time, and carries a concrete NP reduction through to the verifier above. - -These are implications about the same proof tables and the same verifier. In particular, the line tables used to test certificates are also used when correcting those certificates inside later checks. Every decoding statement is applied with its stated label distribution, degree bound and error constant. The detailed account retains these connections because an isolated correct testing lemma would not by itself establish the assembled PCP theorem. +The algebraic chapter reconstructs the corrected weighted test and point-versus-line soundness, including the bivariate agreement and ruled-surface arguments. The binary chapter proves how two encodings give constant-query tests, how one decoded polynomial satisfies both required label-distance bounds, and how correction handles the nonuniform points requested by a grid certificate. The same auxiliary tables are used for testing and correction throughout. ## Reading this account -The mathematical prerequisites are finite fields, polynomials in several variables, elementary linear algebra, and finite probability. Basic complexity terminology is introduced through the theorem above; the final chapter explains the additional machine and resource accounting. The proof uses normalized Hamming distance, written $\Delta(f,g)=\Pr[f\ne g]$. The same letter may name a degree parameter in different chapters; each local statement fixes its meaning. A distinction worth keeping throughout is between total degree and degree in each variable, and between a formal polynomial and its evaluation function over a finite field. +The mathematical prerequisites are finite fields, polynomials in several variables, elementary linear algebra, and finite probability. Basic complexity terminology is introduced through the theorem above; the first chapter explains the additional machine and resource accounting. The proof uses normalized Hamming distance, written $\Delta(f,g)=\Pr[f\ne g]$. The same letter may name a degree parameter in different chapters; each local statement fixes its meaning. A distinction worth keeping throughout is between total degree and degree in each variable, and between a formal polynomial and its evaluation function over a finite field. -This is the long account. It contains the intermediate estimates, reconstruction of the substantial algebraic inputs, parameter substitutions, and boundary cases needed to follow the complete argument. The [specialist paper](../short/paper.md) presents the theorem and main proof structure with less local detail. The [exposition with worked examples](../expository/main.md) develops the construction through concrete calculations. These companion texts have different reading purposes; the detailed proofs remain here, and the linked Lean statements provide the exact formal counterparts. +The detailed proofs include the intermediate estimates, parameter substitutions and boundary cases. The machine-level transition proofs are used through the following contracts; their semantics and cost bounds remain in the formal source. The [specialist paper](../short/paper.md) presents the theorem and main proof structure with less local detail. The [exposition with worked examples](../expository/main.md) develops the construction through concrete calculations. These companion texts have different reading purposes; the detailed proofs remain here, and the linked Lean statements provide the exact formal counterparts. @@ -75,1850 +69,1897 @@ This is the long account. It contains the intermediate estimates, reconstruction [intro-reverse]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/ReverseConcrete.lean [intro-reference]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/ReferenceNPConverse.lean -## Algebraic tests and correction - -The algebraic part of the construction has two distinct tasks. It must recognize a word that is close to a low-degree polynomial, and it must recover a specified value of that polynomial from the word. This chapter proves the forms of these statements used in Lee's formalization. It also develops the interpolation and vanishing certificates needed to express constraints on an encoded assignment. +### Implementation results used in the argument -Throughout, $F$ is a finite field of cardinality $q$, and $V=F^m$, with $m$ allowed to be zero. Every probability and expectation is uniform on its displayed finite domain. Write + +The immediate model uses deterministic finite multi-stack machines with fixed public encodings. A verifier step takes an input, seed and answer history, and either returns a verdict or requests the next proof address. Its implementation condition identifies the verifier with the query tree obtained by unfolding this step for a bounded number of queries, on both possible answers at every branch. A further query at depth zero becomes rejection. This condition alone does not assert that the unrestricted callback halts within that depth. Polynomial running time is a separate machine property. -$$ -\Delta(f,g)=\Pr_x[f(x)\ne g(x)]. -$$ +| Established source result | Guarantee used here | Application in this account | +| --- | --- | --- | +| [Callback correctness][lean-runtime-correct] | The program computes the mathematical query list and verdict for arbitrary input, seed and answer history. | The seven-check verifier's implementation | +| [Charged cost][lean-runtime-cost] and [machine compilation][lean-runtime] | Polynomial bounds on the complete callback, storage and repetition protocol give a polynomial-time machine. | Time complexity, separately from the number of proof reads | +| [Executable NP reduction][lean-np-runtime] | A concrete certificate checker yields a polynomial-time graph map, with polynomial output size and the required membership equivalence. | Transport from NP to three-colourability | +| [Finite-witness checker][intro-reverse] | Canonical logarithmic randomness and a polynomial address bound permit polynomial-time checking of every seed against a finite proof prefix. | Reverse inclusion | +| [Reference-machine simulations][intro-reference] | The concrete certificate class equals the pinned nondeterministic-machine definition of NP, in both directions. | Interpretation of the endpoint | -An assertion about the total degree of a polynomial refers to a formal polynomial in $F[X_1,\ldots,X_m]$. Equal evaluation functions need not be equal formal polynomials over a finite field. Where the proof passes from evaluations to polynomial identities, the necessary degree bound will be stated. We use basic field arithmetic, finite-dimensional linear algebra, and the univariate root bound: a nonzero polynomial of degree at most $d$ has at most $d$ roots. All further ingredients needed for the testing argument are proved below. +The sections on implementation, reduction and the reverse inclusion explain how these results compose. The algebraic testing and correction arguments are proved below rather than imported through this table. + -The primary paper is the corrected public revision of Amireddy, Behera, Srinivasan, Sudan and Willumsgaard, *A Simple Algebraic Proof of the PCP Theorem*, [arXiv:2608.17429v2][paper]. The theorem statements below follow the pinned Lean source when it makes a more specific choice of test or constants. In particular, the short test uses a generator of the whole multiplicative group and Lagrange weights. The point-versus-line test samples its line parameter from all of $F$. +## From the algebraic tests to the PCP theorem - + +We first construct the three-colouring verifier and prove its completeness, soundness and resource bounds. The later algebraic and binary chapters establish the testing statements used here. Throughout this chapter, $d$ is the grid dimension, $m$ the digit base, and $Q=|F|$ the field size. The fixed inner degree is $c$ and the decoded degree bound is $D=cm^c$. The difference polynomial is written $Q_*$. -### 1. Polynomial distance, interpolation, and grid certificates +The construction follows Amireddy, Behera, Srinivasan, Sudan and Willumsgaard's corrected [paper, Section 7][paper-pcp], with the concrete choices in Lee's formalization. The paper invokes NP-completeness after proving the three-colouring construction. The formalization also constructs the NP reduction, fair-bit sampler and polynomial-time machine; their composition occupies the rest of this chapter. + - -**Polynomial distance.** If $P\ne0$ has total degree at most $d$, then +### Three colours as polynomial equations + + +Let $F$ be a finite field of characteristic two, of cardinality $Q$, containing a primitive cube root of unity $\omega$. The three colours will be $$ -\Pr_{x\in F^m}[P(x)=0]\le d/q. -\tag{A1} +\mathcal C=\{1,\omega,\omega^2\}. $$ -For completeness, induct on $m$. For $m=0$, a nonzero polynomial is a nonzero constant. In the induction step write +These are distinct, and they are exactly the roots of $Z^3-1$. For two valid colours $u,v$, the equation $$ -P(X,T)=\sum_{j=0}^r P_j(X)T^j,\qquad P_r\ne0. +(u-v)^3=1 $$ -The coefficient $P_r$ has total degree at most $d-r$. The induction hypothesis bounds the fraction of $X$ for which it vanishes by $(d-r)/q$. For every other $X$, the specialization in $T$ is nonzero of degree $r$, so at most $r/q$ of its evaluations vanish. Bounding the contribution from exceptional bases by their full probability gives at most $(d-r)/q+r/q=d/q$. - -Thus distinct polynomials of total degree at most $d$ have evaluation distance at least $1-d/q$. In particular, evaluation is injective on these polynomials when $d - - -**Grid extension.** Let $H\subseteq F$ be nonempty, and put $h=|H|$. For $a\in H$, define +holds exactly when $u\ne v$. To prove the nontrivial direction, characteristic two gives $$ -\ell_a(T)=\prod_{b\in H\setminus\{a\}}\frac{T-b}{a-b}. +(u-v)^4=u^4-v^4=u-v, $$ -The denominators are nonzero, and $\ell_a(b)$ is one for $b=a$ and zero for all other $b\in H$. Therefore a table $f:H^m\to F$ has the extension +because $u^3=v^3=1$. If $u\ne v$, cancellation of the nonzero factor $u-v$ yields $(u-v)^3=1$. Conversely, $u=v$ would make the left side zero. Thus an assignment $f:V(G)\to F$ is a proper three-colouring precisely when $$ -\widetilde f(X)=\sum_{z\in H^m}f(z)\prod_{i=1}^m\ell_{z_i}(X_i). -\tag{A2} +f(v)^3-1=0\quad(v\in V(G)),\qquad +(f(v)-f(w))^3-1=0\quad(vw\in E(G)). $$ -Its degree in each variable is at most $h-1$, and its total degree is at most $m(h-1)$. It agrees with $f$ because precisely one summand survives at each grid point. It is the unique polynomial with these individual degree bounds and these evaluations. To prove uniqueness, a difference polynomial vanishing on $H^m$, regarded as a polynomial in its last variable, has $h$ roots after every specialization of the others. Its degree is less than $h$, so each coefficient vanishes on $H^{m-1}$; induction makes every coefficient zero. The empty product and singleton zero-dimensional grid give the same assertion when $m=0$. See the [grid interpolation proof][lean-interpolation]. +Both families matter. For example, assign the four vertices of $K_4$ the four elements of $\mathbb F_4$. Every difference across an edge is a nonzero element of $\mathbb F_4$, hence has cube one. All edge equations hold, although $K_4$ is not three-colourable. The vertex assigned zero violates its vertex equation. The formal [colour algebra][lean-colour-algebra] proves both implications with the vertex condition present. + - + +Choose a nonempty set $H\subseteq F$, of size $h$, and a dimension $d$ large enough to place the input graph's vertices in $H^d$. Unused grid points are isolated vertices. Extending a colouring arbitrarily to these points preserves three-colourability in both directions. - -**Vanishing on the grid.** Set +Let $P$ be the coordinatewise interpolation of the colour assignment on $H^d$, and let $E$ be the interpolation of the graph's zero-one adjacency function on $H^d\times H^d$. Writing $$ -Z_i(X)=\prod_{a\in H}(X_i-a). +d_0=d(h-1), $$ -A polynomial $P$ vanishes on $H^m$ if and only if it admits the formal identity +we have $\deg P\le d_0$ and $\deg E\le2d_0$. Form the difference and constraint polynomials $$ -P=\sum_{i=1}^m Q_i Z_i. -\tag{A3} +\begin{aligned} +Q_P(X,Y)&=P(X)-P(Y),\\ +A_P(X)&=P(X)^3-1,\\ +B_P(X,Y)&=E(X,Y)\bigl(Q_P(X,Y)^3-1\bigr). +\end{aligned} $$ -Moreover, the coefficients can be chosen so that every nonzero $Q_i$ satisfies - -$$ -\deg Q_i+h\le\deg P. -\tag{A4} -$$ +Their total degrees are at most $d_0,3d_0,5d_0$, respectively. A proper colouring makes $A_P$ vanish on $H^d$ and $B_P$ vanish on $H^{2d}$. Conversely, these two vanishing conditions, together with $Q_P(X,Y)=P(X)-P(Y)$, recover a proper colouring by the preceding scalar argument. The factor $E$ is the public graph's actual adjacency extension: it equals one on edges and zero on nonedges at grid points. It is computed from the input, not supplied by the prover. The [grid construction][lean-colour-grid] implements this equivalence. -To see this, divide successively by the monic polynomials $Z_1,\ldots,Z_m$, treating the other variables as coefficients. At the $i$-th step remove every term whose exponent of $X_i$ is at least $h$. Replacing the leading term $X_i^h$ by lower powers never increases total degree. The quotient terms have lost $h$ from their degree, proving (A4). Later divisions do not increase degrees in previously processed variables, since their divisors involve only their own coordinate. The result is $P=\sum Q_iZ_i+R$, where $R$ has individual degrees less than $h$. If $P$ vanishes on the grid, so does $R$; uniqueness in (A2) gives $R=0$. The converse follows by evaluation, since every $Z_i$ vanishes there. This also proves the assertion in dimension zero: a vanishing constant is zero and the sum is empty. See the [grid decomposition][lean-grid]. +Put $Z_H(T)=\prod_{u\in H}(T-u)$. The grid-vanishing theorem, proved in the algebraic chapter, writes any polynomial $A$ vanishing on $H^k$ as $\sum_i Z_H(X_i)U_i(X)$. Its certificate $M(X,Y)=\sum_iY_iU_i(X)$ satisfies $M(X,0)=0$ and $M(X,Z_H(X))=A(X)$, with $\deg M\le\deg A$. Conversely these identities imply grid vanishing, even if a proposed $M$ is nonlinear in $Y$. Apply the theorem to obtain $M_A,M_B$. The sufficient degree bound $5d_0$ covers the colour polynomial and both certificate polynomials. The proper-colouring certificate has two blocks of $2d$ variables; the implementation flattens the first two vertex-coordinate blocks before passing them to the same certificate routines. This is a coordinate bijection and preserves evaluations, total degree and normalized distances. + -Package (A3) as one polynomial in two blocks of variables: +### The eight tables and seven checks -$$ -M(X,Y)=\sum_i Q_i(X)Y_i. -$$ + +Fix binary coordinates $\rho:F\to\mathbb F_2^t$, where $Q=2^t$. A degree-$r$ Hadamard row for $u\in F$ stores $R(\rho(u))$ at each squarefree Boolean polynomial label $R$ of degree at most $r$. Degree-one labels are affine; homogeneous labels have zero constant term. They preserve sums and distinguish unequal field values with probability one half when sampled uniformly. -It satisfies the formal identities +The received proof contains four primary tables and four encoded line tables. An honest proof has the following mathematical contents: -$$ -M(X,0)=0,\qquad M(X,Z_1(X),\ldots,Z_m(X))=P(X), -\tag{A5} -$$ +| Primary polynomial | Number of field coordinates | Primary binary encoding | +| --- | ---: | --- | +| $P$, the colour extension | $d$ | degree-three Hadamard encoding | +| $M_A$, the vertex certificate | $2d$ | degree-one Hadamard encoding | +| $Q_P$, the difference polynomial | $2d$ | degree-three Hadamard encoding | +| $M_B$, the edge certificate | $4d$ | degree-one Hadamard encoding | -and $\deg M\le\deg P$, since $h\ge1$ and (A4) gives $\deg Q_i+1\le\deg P$. Conversely, any polynomial $M$ satisfying (A5), including one nonlinear in $Y$, proves that $P$ vanishes on the grid: at a grid point the two substitutions have the same value. Nonemptiness of $H$ is needed for the degree-bounded existence direction. On an empty grid of positive dimension, the constant one vanishes vacuously but has no degree-zero certificate whose zero substitution is zero. Finally, substitution of the $Z_i$'s into an arbitrary degree-$D$ certificate has degree at most $hD$: each substituted variable has degree at most $h$, so each monomial's degree grows by at most that factor. See the [certificate and substitution bounds][lean-certificate]. +Each primary table has one encoded line table. In the formal implementation every auxiliary line table uses degree-one labels. For a primary domain $F^k$, an auxiliary address consists of an oriented line $(u,v)\in F^k\times F^k$, an inner point $w\in F^{cm}$, and an affine Boolean label. Honest rows encode the line restriction after digit expansion: writing each exponent below $m^c$ in base $m$ turns it into a product of $c$ variables, of total degree $c$. Substitution $\Phi(z)_{i,j}=z^{jm^i}$ recovers the original line value. The binary chapter proves these statements and explains why an arbitrary decoded inner polynomial can have outer degree as large as $D=cm^c$. The paper's Section 7 lists degree-three auxiliary labels for colour and difference; the formal variant uses degree-one auxiliary labels throughout. In particular, the line table used to test a certificate is the same physical table used to correct that certificate inside ZERO. There is no second certificate table whose consistency would have to be assumed. The [proof datatype and read function][lean-seven-checks] specify all eight tags and their address spaces. - +The verifier runs four encoded-line low-degree tests, one on each primary/line-table pair. It also runs ZERO on the vertex constraint, ZERO on the edge constraint, and a difference check. It accepts exactly when all seven accept. Each check receives an independent seed with the prescribed finite uniform distribution. This makes each branch's marginal distribution the one analysed in its soundness theorem. Since failure of a branch forces failure of the conjunction, each branch's rejection probability is at most the full rejection probability. + - -**From exact lines to total degree.** Suppose $q>2d$, and every function + +The constraint polynomials are not extra proof tables. Suppose $p(x,\Lambda)$ is the received degree-three row intended to encode $P(x)$. To request a linear bit of $P(x)^3-1$, transform the desired linear label $L$ into the degree-three Boolean label $\Lambda_{Z^3-1,L}$ supplied by the encoding lemma. Draw a fresh uniform degree-three label $R$, read $$ -t\longmapsto f(u+tv),\qquad u,v\in V, +p(x,R+\Lambda_{Z^3-1,L})+p(x,R), $$ -is represented by a univariate polynomial of degree at most $d$. Then $f$ is represented by a multivariate polynomial of total degree at most $d$. +and return their sum in $\mathbb F_2$. The corresponding edge query uses the difference table and the label for $Z\mapsto E(x,y)(Z^3-1)$. Thus each derived read costs two physical bits. -We prove the claim by induction on the dimension. Choose $d+1$ distinct values $a_0,\ldots,a_d\in F$ for the first coordinate. Each slice $y\mapsto f(a_i,y)$ has the same exact-line property in one less dimension and therefore, by induction, is represented by a total-degree-$d$ polynomial $P_i(y)$. Interpolate the slices: +For an exact Hadamard row, linearity in the **label** gives the requested bit exactly, even though $Z\mapsto Z^3-1$ is nonlinear in the field value. For a row close on average to the correct encoding, the two sampled labels are individually uniform, so the probability of an incorrect derived read is bounded by twice the row error. The formal verifier uses fresh masks as part of the actual test seed. Its soundness argument carries this replacement error through the ZERO inequality; it does not postulate a globally good fixed mask. + +The difference check selects independent uniform $x,y\in F^d$ and a homogeneous linear functional $L:F\to\mathbb F_2$. It compares the difference table's bit with the sum of the colour-table bits at $x$ and $y$. Homogeneity is essential to the displayed additive identity. The formal proof uses exactly the homogeneous-label distance guarantee supplied by the encoded-line theorem, rather than a stronger assertion about arbitrary affine labels. + + + +The seven physical query bounds, in the order colour, vertex certificate, difference, edge certificate, vertex ZERO, edge ZERO, and difference check, are $$ -Q(x,y)=\sum_{i=0}^d\ell_i(x)P_i(y). +2c+18,\quad2c+14,\quad2c+18,\quad2c+14, +\quad6c+20,\quad6c+20,\quad3. $$ -This polynomial has total degree at most $2d$. For fixed $y$, both $Q(\cdot,y)$ and the prescribed polynomial representing the first-coordinate line have degree at most $d$ and agree at $d+1$ nodes. They are equal, so $Q$ represents $f$ everywhere. +Their sum is $20c+107$, independent of the graph size. Taking $c=4$ bounds one unamplified run by at most $26+22+26+22+44+44+3=187$ physical bit reads. This count includes the fresh derived reads. A separate congruence theorem says that two proof oracles agreeing on the listed addresses give the same verdict; the count therefore measures actual information read from the proof, rather than merely the number of named subroutines. The [query-list theorem][lean-query-budget] establishes both facts. + -It remains to improve total degree from $2d$ to $d$. For every direction $v$, the formal polynomial $Q(tv)$ has degree at most $2dd$. Each such component has degree at most $2d + +Start with a proper colouring. Interpolate it to obtain $P$, put the exact difference polynomial $Q_P$ in the difference table, and choose grid-vanishing certificates $M_A,M_B$. Put the exact encodings and exact encoded restrictions to lines in their eight locations. Assume the honest degree capacity -### 2. The corrected short low-degree test +$$ +5d(h-1) -Let $c\ge0$, assume $q>2c$, and choose a generator $\zeta$ of $F^\times$. Put +where $m$ is the base used by the degree-reducing inner encoding. + +Every outer low-degree test accepts because it sees an exact polynomial of degree below $m^c$ and its honest encoded line restrictions. The two-query derived read agrees exactly with the requested constraint encoding for every mask. Each ZERO check accepts because its polynomial has the supplied vanishing certificate. Finally, $$ -a_i=\zeta^i\quad(1\le i\le c+1),\qquad -w_i=\prod_{\substack{1\le j\le c+1\\j\ne i}} -\frac{-a_j}{a_i-a_j}. -\tag{A6} +L(Q_P(x,y))=L(P(x))+L(P(y)) $$ -These nodes are distinct and nonzero. Indeed, $c+1\le q-1$ for $c>0$, and the $c=0$ case has only one node. The weights are all nonzero. They are the Lagrange interpolation coefficients for evaluation at zero, so $\sum_i w_i=1$. +for every homogeneous label $L$, so the difference check also accepts. The same eight tables satisfy all these statements simultaneously. Consequently every seven-component random seed accepts. This proves perfect completeness. The [honest-proof construction][lean-completeness] supplies the certificates and verifies each branch. + -For a word $f:V\to F$, define +### Soundness of the seven-check verifier + + +Set $D=cm^c$. Suppose the field and grid satisfy $$ -A_f(x,v)=\sum_{i=1}^{c+1}w_i f(x+a_iv). +Q\ge10^6D^3,\qquad Q\ge100Dh, +\qquad d(h-1)\le D, $$ -The test chooses $x,v\in V$ and accepts if $f(x)=A_f(x,v)$. It makes $c+2$ listed queries, including the center; coincident points, for example when $v=0$, need not give distinct locations. Every polynomial of total degree at most $c$ passes every test: restrict it to the affine line and apply Lagrange interpolation at zero. +with $c,m,h\ge1$ and a primitive cube root of unity. The weighted test uses the first $c+1$ powers of a generator of $F^\times$ and their Lagrange weights. For correction, the $c+1$ powers of its chosen parameter must be distinct and nonzero (the source condition `GoodNodes`); choosing the same generator suffices here. Let $\kappa$ be the rejection probability of an arbitrary received proof. The argument will show that sufficiently small $\kappa$ forces the graph to be three-colourable. -Conversely, if every test accepts, $f$ is a total-degree-$c$ polynomial function. First prove this on $F$. Interpolate a polynomial $P$ of degree at most $c$ through $f(a_1),\ldots,f(a_{c+1})$, and let $h=f-P$. The constraints are linear, so $h$ satisfies them and vanishes at these nodes. The constraint with center zero and direction one gives $h(0)=0$. For $n>c+1$, use center zero and direction $\zeta^{n-(c+1)}$: +The constants used by the binary tests are $$ -0=\sum_{i=1}^{c+1}w_i h\bigl(\zeta^{n-(c+1)+i}\bigr). +K_c=4(c+2)^2(112(c+2)+60),\quad +E_c=2((c+1)K_c+29),\quad S_c=28+E_c,\quad +C_c=2+2(c+1)K_c. $$ -All exponents except the last are smaller positive integers. Induction and $w_{c+1}\ne0$ give $h(\zeta^n)=0$. The initial nodes and induction include the exponents $1,\ldots,q-1$, which exhaust $F^\times$. Thus $h=0$. - -For a word on $V$, fix any affine line and apply the same univariate argument. Its constraint at parameters $r,s\in F$ is exactly the original constraint at center $u+rv$ and direction $sv$. Every line is consequently degree at most $c$. The exact-line characterization applies because $q>2c$. This proof includes $c=0$ and arbitrary field characteristic. See the [corrected generator test][lean-generator]. +We need the following three statements, proved in the binary chapter. - +| Statement | Guarantee used in the assembly | +| --- | --- | +| Encoded-line soundness (B15) | Under the field bound and $E_c\kappa\le1/4\,000\,000$, one degree-$D$ polynomial has both full-label and homogeneous-label distance at most $S_c\kappa$ from the primary table. Auxiliary rows are arbitrary. | +| Outer correction (B16) | At each fixed target $a$, homogeneous primary error $\delta$ gives failure probability at most $C_cR_a+\delta+D/[2(Q-1)]$. Failure means rejection or a wrong bit; $R_a$ is actual rejection, and the label is uniform homogeneous. | +| Derived ZERO (B25) | Suppose the point-dependent derived values equal one fixed polynomial, and this polynomial and its certificate have degree at most $D$. If the polynomial fails to vanish on the grid, its ideal rejection lower bound is at most $(1+2C_c)(\kappa+2\varepsilon)+2\delta_M+D/(Q-1)$. Here $\varepsilon$ is full primary error and $\delta_M$ is homogeneous certificate error. | - -We first prove robustness for weighted affine constraints, before applying it to polynomials. Let $a_1,\ldots,a_n\in F^\times$, allow arbitrary weights $w_i\in F$, and use the same prediction formula with $n$ terms. Neither distinctness of nodes nor nonzero weights is needed in this paragraph. Set +The first statement chooses the witnesses. The second handles prescribed certificate targets, which need not be uniform. The third uses that correction twice, retaining both actual rejection and the fresh-mask replacement error. We now apply them with the same received tables. If $$ -\delta=\Pr_{x,v}[f(x)\ne A_f(x,v)],\qquad -g(x)=\mathop{\mathrm{plurality}}_v A_f(x,v), +E_c\kappa\le\frac1{4\,000\,000}, $$ -breaking any tie arbitrarily. Then +the four outer tests supply four actual polynomials $P,Q_*,M_A,M_B$, each of total degree at most $D$. They give full degree-three label distance at most $$ -\Delta(f,g)\le2\delta. -\tag{A7} +\varepsilon=S_c\kappa $$ -For a fixed $x$ with $g(x)\ne f(x)$, the probability of prediction $f(x)$ is at most one half, since the distinct plurality value is at least as frequent. Thus the conditional rejection probability is at least one half. Averaging proves (A7). +for $P,Q_*$, and homogeneous linear-label distance at most $\varepsilon$ for all four relevant primary tables. These polynomials are chosen once for the received proof; the later argument uses those same choices. No closeness assumption is imposed on the auxiliary line tables. Their actual test behaviour is already part of the decoding theorem. These are the decoded polynomials used in [the assembled soundness proof][lean-soundness]. + -We next bound predictions at **each** center. Introduce the weighted grid + +First identify the decoded difference polynomial. Replace the three received bits in the difference test by their decoded homogeneous bits. The replacement can change the verdict only if one of these three bits differs, an event of probability at most $3\varepsilon$. Hence the ideal consistency check rejects with probability at most $\kappa+3\varepsilon$. + +For a nonzero field element $z$, exactly half of the homogeneous linear functionals satisfy $L(z)=1$. Therefore this ideal rejection rate is exactly half the relative distance between the field-valued functions $Q_*(x,y)$ and $P(x)-P(y)$. If these polynomials differed, their difference would be a nonzero polynomial of degree at most $D$, and the polynomial zero bound would give relative disagreement at least $1-D/Q$. It follows that $$ -D(x;y,z,b)=\sum_{i,j}w_iw_j -f(x+a_i y+a_j z+a_i a_j b). -\tag{A8} +\kappa+3\varepsilon<\frac{1-D/Q}{2} $$ -For fixed $x,z$, and uniform $y,b\in V$, each pair +forces the polynomial identity $Q_*(X,Y)=P(X)-P(Y)$. This is an identity of polynomials, not merely agreement at most sampled points. The [difference-consistency theorem][lean-difference] makes the strict inequality explicit. + + + +Now consider the decoded vertex constraint $A_P=P^3-1$. Its degree is at most $3D$. For the edge constraint, the public adjacency polynomial has degree at most $2D$; using the just-proved difference identity, the decoded edge constraint $$ -(x+a_i y,\ z+a_i b) +B_P=E\bigl((P(X)-P(Y))^3-1\bigr) $$ -is uniform on $V^2$, since multiplication by $a_i\ne0$ is invertible. Except on probability at most $n\delta$, all $n$ corresponding constraints hold. Summing these constraints with weights $w_i$ gives $A_f(x,y)=D(x;y,z,b)$. The expression $D$ is symmetric under exchanging $y,z$, because its double sum can exchange $i,j$. Thus, over independent $y,z,b$, it also equals $A_f(x,z)$ except on probability at most $n\delta$. Consequently +has degree at most $5D$. Both certificates have degree at most $D$, so the common degree bound $5D$ is sufficient for the two ZERO arguments. + +The derived-ZERO inequality (B25) says that if either decoded constraint fails to vanish on its grid, then $$ -\Pr_{y,z}[A_f(x,y)\ne A_f(x,z)]\le2n\delta. +\frac{1-5Dh/Q}{2} +\le +(1+2C_c)(\kappa+2\varepsilon) ++2\varepsilon+\frac{5D}{Q-1}. $$ -For any distribution with atom probabilities $p_a$, its plurality error is $1-\max_a p_a\le1-\sum_a p_a^2$, the disagreement probability of two independent samples. Hence +Here $2\varepsilon$ inside the parentheses is the replacement loss from the derived read. Multiplying it by $1+2C_c$ is necessary: it enters the same rejection term as the actual ZERO failure probability. The other $2\varepsilon$ comes from the two uses of the certificate's homogeneous proximity bound. The last term is the nonzero-parameter local-correction loss. These terms cannot be dropped by choosing a favourable random seed after the fact. -$$ -\Pr_v[A_f(x,v)\ne g(x)]\le2n\delta -\quad\text{for every }x. -\tag{A9} -$$ +Consequently, the strict reverse inequality forces $A_P$ to vanish on $H^d$ and $B_P$ to vanish on $H^{2d}$. The scalar colour equations then make $P|_{H^d}$ a proper colouring. The coordinate flattening in the edge branch is a bijection, so its normalized error and vanishing statements transport unchanged. The [decoded soundness theorem][lean-decoded] performs these two applications to the same decoded colour and difference polynomials. + -Now fix **both** $x,v$. With random $y,b$, compare the following four values: + +An explicit positive gap makes all three inequalities hold at once. Define $$ -g(x),\quad A_f(x,y),\quad D(x;y,v,b),\quad -\sum_iw_i g(x+a_i v). +\begin{aligned} +A_c&=1+2C_c,\\ +B_c&=1+3S_c,\\ +T_c&=A_c(1+2S_c)+2S_c,\\ +g_c&=\min\left\{ +\frac{1}{4\,000\,000(E_c+1)}, +\frac{1}{16B_c}, +\frac{1}{16(T_c+1)}\right\}. +\end{aligned} $$ -The first comparison fails with probability at most $2n\delta$, by (A9). The second fails with probability at most $n\delta$, by the grid argument. For the third, rewrite the grid as +At the chosen value $c=4$, the constants evaluate to -$$ -D(x;y,v,b)=\sum_iw_i A_f(x+a_i v,\ y+a_i b). -$$ +| $K_4$ | $E_4$ | $S_4$ | $C_4$ | $T_4$ | +| ---: | ---: | ---: | ---: | ---: | +| $105408$ | $1054138$ | $1054166$ | $1054082$ | $4444715947277$ | -For each $i$, the direction $y+a_i b$ is uniform; (A9) and a union bound give failure probability at most $2n^2\delta$. The two endpoints of this chain are constants, independent of $y,b$. If +All denominators are positive, so $g_c>0$. If $0\le\kappa - +### Parameters for every finite graph - -Apply this result to (A6), with $n=c+1$. If + +The formalization chooses a concrete parameter family different from the paper's asymptotic display. For a graph with $N$ vertices, let $a$ be the least integer at least two with $$ -\delta<\frac{1}{2(c+2)^2}, -\tag{A11} +\lceil\log _2N\rceil\le a2^a. $$ -then (A10) holds, because $2(c+1)^2+3(c+1)=2c^2+7c+5<2(c+2)^2$. The exact characterization proves that $g$ is represented by a polynomial $P$ of total degree at most $c$, and (A7) gives +Use the natural ceiling-log convention at $N=0,1$; the definition still selects $a=2$. Put $$ -\Delta(f,P)\le2\delta. -\tag{A12} +s=2^a,\quad d=m=h=s,\quad c=4, +\quad t=12a+32,\quad Q=2^t=2^{32}s^{12}. $$ -This is the corrected low-degree soundness statement. It needs $q>2c$, not a cubic field-size hypothesis. A downstream closed threshold such as $1/[4(c+2)^2]$ lies strictly below (A11). The full multiplicative generator and the weights are essential parts of the test being proved here; replacing them by a root of order $c+1$ and unit weights changes the equations. See [the paper, Fact 2.7 and Lemma 3.3][paper] and the [proximity theorem][lean-generator]. +The finite field is represented by binary coefficient arrays modulo a computed monic irreducible polynomial of degree $t$. The coordinate map $F\cong\mathbb F_2^t$ reads these stored coefficients. Since $t$ is divisible by four, $3\mid Q-1$; bounded searches in the field's numeric order supply a primitive cube root and a generator of $F^{\times}$. The grid $H$ is the first $s$ field elements in this numeric order. It need not be a subfield. - - - -The earlier test's failure can be seen in a family of arbitrarily large fields, so it is not merely a small-field exception. Let $q=2^{2k}$ for any $k\ge2$, set $c=2$, and choose $\omega$ of order three in $F_q^\times$. Such an element exists because $3$ divides $q-1$. In any dimension $m\ge1$, put $f(x)=x_1^4$. The unit-weight test in v1 accepts when +The grid has $h^d=s^s=2^{a2^a}\ge N$ points. With $D=4s^4$, the soundness field requirement holds because $$ -f(u)+\sum_{i=1}^3 f(u+\omega^i v)=0. +10^6D^3=64\,000\,000s^{12}\le2^{32}s^{12}=Q. $$ -The characteristic-two Frobenius identity $(a+b)^4=a^4+b^4$ gives, for every pair $u,v$, +Also $100Dh=400s^5\le Q$. Since $s\ge4$, $$ -f(u)+\sum_{i=1}^3 f(u+\omega^i v) -=4u_1^4+v_1^4\sum_{i=1}^3\omega^{4i}=0. +5s(s-1)2$, then $$ -X^4-P(X,x_2,\ldots,x_m) +(a-1)2^{a-1}<\lceil\log _2N\rceil, +\qquad +a2^a\le4(a-1)2^{a-1}. $$ -has degree exactly four and leading coefficient one. It has at most four roots, so averaging over the fixed coordinates proves $\Delta(f,P)\ge1-4/q$. In particular $f$ is not a degree-two polynomial function. The same argument excludes representations of individual degree at most two. +If $a=2$, the volume $a2^a$ is eight. Both cases yield -The fields in this family are unbounded. For any proposed absolute constant $C$, choose $k$ large enough that $q>Cc^3=8C$. Then choose $0<\delta<1/[2(c+2)^2]$ with $2\delta<1-4/q$. The word passes every old test but violates the claimed proximity conclusion of v1 Lemma 3.3 under its stated large-field condition. This identifies a failure of that scalar characterization and soundness lemma; it does not construct a cheating proof for every check of the final PCP verifier. +$$ +a2^a\le4\max\{8,\lceil\log _2N\rceil\} +\le32(\lceil\log _2N\rceil+1). +$$ -In v2, Fact 2.7 and Lemma 3.3 use the full multiplicative generator and the weights (A6), for which the proof above applies. The v2 acknowledgments thank Troy Lee for pointing out the earlier mistake in Lemma 3.3. The calculation here is an ordinary derived explanation of the correction, not a claim that this particular example was Lee's, a novelty claim, or a separately Lean-checked counterexample. [Paper v1, Fact 2.7 and Lemma 3.3][paper-v1]; [corrected v2 and acknowledgments][paper]. +Thus a resource bounded by a fixed multiple of $a2^a$ is logarithmic in $N$; a resource bounded by $2^{O(a2^a)}$ is polynomial in $N$. Merely knowing that the grid can hold the graph would not give these upper bounds. + - +### From finite samples to fair random bits -### 3. Recovering a specified value + +Some mathematical correctors use uniformly distributed nonzero field parameters. Sampling uniformly from $F^{\times}$ with a fixed fair-bit budget is inconvenient because $Q-1$ is not a power of two. The implemented verifier instead samples all four such parameters from the whole field. If any is zero, it accepts immediately and makes no queries. Otherwise it runs the seven-check verifier. - -Suppose $P$ has total degree at most $c$, $\Delta(f,P)=\eta$, and the nodes in (A6) are distinct and nonzero. To recover $P(u)$, choose a uniform direction $v\in V$ and return $A_f(u,v)$. If all $c+1$ sampled values agree with $P$, interpolation makes the answer $P(u)$. Each point $u+a_i v$ is uniform on $V$, so a union bound gives +Conditioned on all four being nonzero, the decoded seed has exactly the original product-uniform distribution. Every other coordinate is unchanged. Therefore $$ -\Pr_v[A_f(u,v)\ne P(u)]\le(c+1)\eta -\quad\text{for every }u. -\tag{A13} +\Pr[\text{new verifier rejects}] +=\left(\frac{Q-1}{Q}\right)^4 +\Pr[\text{original verifier rejects}]. $$ -The sampled points are correlated, but the union bound requires no independence. This correction result has no small-distance hypothesis and needs no additional field-size assumption beyond the existence of the distinct nonzero nodes. For an exact polynomial it always succeeds. It uses $c+1$ listed queries. See [the paper, Fact 2.8 and Lemma 3.4][paper] and the [local-correction bound][lean-correction]. +Since $Q\ge2$, the factor is at least $1/16$. Perfect completeness survives, and non-colourable graphs have rejection at least $\delta=g_4/16$. This is an exact counting identity on the two finite seed spaces, as proved by [whole-field sampling][lean-sampling]; it does not use an approximation to a uniform distribution. - +Every remaining random coordinate is a field vector, a Boolean coefficient vector or a finite product of such objects. The chosen linear coordinates and explicit product codecs give a bijection between the entire seed space and a fixed-length bit string. Uniform bit strings therefore induce exactly the required distribution. Likewise, a tagged mixed-radix codec packs the eight physical tables into one finite binary word. Encoding and decoding are inverse, and the query list is translated through the same codec. + - -A second corrector uses an auxiliary line table and may reject. Let $P$ have degree at most $d$, let $\Delta(f,P)=\eta$, and fix a center $u\in V$. For each direction $b\in V$, let $T_b\in F[T]$ be **any** polynomial of degree at most $d$. Choose $b$ uniformly and independently choose $\lambda$ uniformly in $F^\times$. If + +Here is how polynomial proof length follows for the actual eight-table address space. A degree-$r$ Boolean label on $t$ coordinates has $$ -T_b(\lambda)=f(u+\lambda b), +b_r(t)=\sum_{j=0}^{r}\binom tj $$ -output $T_b(0)$; otherwise reject. Then +binary coefficients, so there are $C_r=2^{b_r(t)}$ labels. The four primary-table lengths are $$ -\Pr[\text{accept and output a value different from }P(u)] -\le\eta+\frac{d}{q-1}. -\tag{A14} +Q^dC_3,\quad Q^{2d}C_1,\quad Q^{2d}C_3,\quad Q^{4d}C_1. $$ -An accepted wrong answer requires either corruption at the tested point, or +A line table for a polynomial on $j$ coordinates indexes two field points specifying a line, the $cm$ coordinates of its reduced-degree encoding, and a linear Boolean label. Its length is $Q^{2j+cm}C_1$. Thus the four auxiliary lengths are $$ -T_b(0)\ne P(u),\qquad T_b(\lambda)=P(u+\lambda b). +Q^{2d+cm}C_1,\quad Q^{4d+cm}C_1,\quad +Q^{4d+cm}C_1,\quad Q^{8d+cm}C_1. $$ -For each nonzero $\lambda$, the tested point is uniform as $b$ varies, so the first event has probability $\eta$. For each fixed $b$ in the second event, $T_b(T)-P(u+Tb)$ is a nonzero degree-$d$ polynomial because its constant coefficient is nonzero. At most $d$ of the $q-1$ nonzero parameters are roots. Averaging proves (A14). No consistency among the different $T_b$'s was assumed. The bound concerns accepted wrong answers; it does not claim that an arbitrary line table accepts frequently. See the [line-table correction bound][lean-line-correction]. +Since $b_1(t)\le b_3(t)\le(t+1)^3$, the sum of these eight lengths is at most - +$$ +2^{(8d+cm)t+(t+1)^3+3}. +$$ -### 4. Bivariate agreement +For $d=m=2^a$, $c=4$ and $t=12a+32$, the exponent is at most $132\,000a2^a$. One elementary estimate controls the cubic term: $a^2\le4\cdot2^a$ for every natural $a$, and $12a+33\le32a$ for $a\ge2$. Hence $(t+1)^3\le131\,072a2^a$; the remaining linear terms fit within the stated bound. - -The point-versus-line theorem below needs a substantial agreement result. We prove the explicit form implemented in the formalization: +For the seed count, write $u=\binom t2$ and $v=\binom t3$ in the following table. The affine and cubic Hadamard tests use $3(1+t)$ and $5+5t+3u+2v$ bits. The inner test uses $1+3tcm+2t+3(1+t)=4+3tcm+5t$ bits, including the fair choice bit and the data sampled for both alternatives. Expanding the seven product seeds gives: -**Bivariate agreement theorem.** Let $d>0$, $q\ge1000d^3$, and $f:F^2\to F$. For every $y\in F$, let $R_y(X)$ have degree at most $d$; for every $x\in F$, let $C_x(Y)$ have degree at most $d$. Suppose +| Check | Power-of-two exponent | Nonzero-field draws | +| --- | --- | ---: | +| Colour low-degree | $2td+4tcm+12t+9+3u+2v$ | $0$ | +| Vertex-certificate low-degree | $4td+4tcm+10t+7$ | $0$ | +| Difference low-degree | $4td+4tcm+12t+9+3u+2v$ | $0$ | +| Edge-certificate low-degree | $8td+4tcm+10t+7$ | $0$ | +| Vertex ZERO | $5td+8tcm+12t+9+u+v$ | $2$ | +| Edge ZERO | $10td+8tcm+12t+9+u+v$ | $2$ | +| Difference consistency | $2td+t$ | $0$ | + +The original seed space therefore has size $(Q-1)^4 2^{35td+32tcm+69t+50+8u+6v}$. Replacing the four nonzero-field draws by whole-field draws adds $4t$ bits. The exact fair-bit seed length is $$ -\Pr_{x,y}[f(x,y)\ne R_y(x)]\le\varepsilon,\qquad -\Pr_{x,y}[f(x,y)\ne C_x(y)]\le\varepsilon, -\qquad\varepsilon\le1/100. -\tag{A15} +r=35td+32tcm+73t+50+8\binom t2+6\binom t3. $$ -Then there exists $P\in F[X,Y]$, of degree at most $d$ in **each** variable, such that $\Delta(f,P)\le4\varepsilon$. The approximating rows and columns need not be nearest approximations. Individual degree at most $d$ allows total degree $2d$, which is sufficient for the use below. This is an explicit variant of [ALMSS Theorem 69, in the author-hosted manuscript][almss]. That theorem uses nearest row and column polynomials and unspecified absolute constants. The arbitrary approximants and numerical bounds in (A15) are justified by the proof below, which adapts the construction in [Arora–Safra §5.2, Lemmas 5.2.2 and 5.2.7 and Corollary 5.2.3][arora-safra]. See the [bivariate agreement theorem][lean-bivariate]. - - - - -First, the mean discrepancy between $R_y(x)$ and $C_x(y)$ is at most $2\varepsilon$. Markov's inequality therefore shows that at most $20\varepsilon\le1/5$ of columns have discrepancy greater than $1/10$. Since $q\ge20d$, choose $10d$ distinct good columns, at positions $a_1,\ldots,a_{10d}$. Write their column polynomials as $C_i(Y)$. Thus +This counts every product coordinate, even when a branch ignores it or the whole-field wrapper accepts early. The same elementary estimates bound $r$ by $10^6a2^a$. Combining both estimates with $a2^a\le32(\lceil\log_2N\rceil+1)$, and using $2^{\lceil\log_2N\rceil}\le2\max\{1,N\}$, gives $$ -\Pr_y[R_y(a_i)\ne C_i(y)]\le1/10\quad\text{for each }i. -\tag{A16} +\begin{aligned} +r(N)&\le32\,000\,000(\lceil\log _2N\rceil+1),\\ +\operatorname{proofLength}(N)&\le(4\max\{1,N\})^{4\,224\,000},\\ +\#\operatorname{queries}&\le187. +\end{aligned} $$ -Let $e(y)$ count the discrepant entries among these $10d$ columns. Its mean is at most $d$. Since $e(y)$ is an integer, the fraction of rows with $e(y)>2d$ is at most $d/(2d+1)<1/2$. Let $S$ be the rows with $e(y)\le2d$; then $|S|\ge q/2$. See the [column-selection argument][lean-column-selection]. - - +These are proved upper bounds, with very large constants. They establish the complexity class statement; they are not practical resource estimates. The proof-size estimate concerns the actual packed eight-table address space, and the query estimate concerns addresses in that space. [The exact seed count][lean-seed-size], [address-space estimates][lean-resources] and [binary-verifier guarantees][lean-binary] give these calculations together with perfect completeness and the rejection bound. - -To describe the inconsistent entries algebraically, we use the error-locator construction of [Arora–Safra, Lemma 5.2.5 and its polynomial extension in Lemma 5.2.7][arora-safra]. Seek bivariate polynomials $E,N$ satisfying +For an encoded graph input $x$, its decoded vertex count is at most $n=|x|$. The verifier uses the canonical budget $$ -\deg_X E\le2d,\qquad\deg_X N\le3d,\qquad -N(a_i,Y)=C_i(Y)E(a_i,Y)\quad(1\le i\le10d). -\tag{A17} +r_0(n)=32\,000\,000\lceil\log _2(n+2)\rceil+32\,000\,000. $$ -There are $n=5d+2$ unknown coefficient polynomials in $Y$: $2d+1$ coefficients for $E$, and $3d+1$ for $N$. The equations form a $10d$-by-$n$ matrix with entries in $F[Y]$, each of degree at most $d$. - -For every $y\in S$, this specialized matrix has a nonzero kernel. Indeed, take $E_y(X)$ to be the product of $X-a_i$ over the discrepant positions, and put $N_y=E_yR_y$. The product has at most $2d$ factors and is nonzero. At a discrepant position both sides of (A17) vanish; at every other position $R_y(a_i)=C_i(y)$. Thus every $n$-by-$n$ minor of the matrix vanishes at all $y\in S$. Each such determinant has degree at most $nd=(5d+2)d$. The field bound gives +It ignores the surplus bits beyond those needed by the exact seed codec. Every shorter bit string has exactly the same number of extensions, so prefix sampling preserves the acceptance probability. The proof address bound becomes the natural-coefficient polynomial $$ -|S|\ge q/2>(5d+2)d, +p_0(n)=\bigl(4(n+1)\bigr)^{4\,224\,000}. $$ -so the root bound makes every maximal minor the zero polynomial. +The nonadaptive list of at most 187 physical reads is compiled into a decision tree of that depth. Its evaluation equals the algebraic verdict for every oracle, and all syntactic addresses are below $p_0(n)$. The [canonical verifier][lean-canonical] proves these properties for every bit string, including malformed graph encodings according to its fixed decoder. + -The following cofactor construction supplies a nonzero polynomial kernel with a degree bound. Choose a largest nonzero $k$-by-$k$ minor. The empty minor has determinant one, so such a $k$ exists, and $k\le n-1$. Append one column outside its columns. Form a vector supported on these $k+1$ columns whose coordinates are the alternating $k$-by-$k$ cofactors. Its coordinate at the appended column is the chosen nonzero determinant. For any row of the original matrix, the row's product with this vector is the determinant obtained by adjoining that row to the chosen $k$ rows. This is a $(k+1)$-minor and vanishes by maximality. Hence the vector is a nonzero kernel vector. Every coordinate is a determinant with $k$ factors of degree at most $d$, so has degree at most $kd\le(n-1)d$. +### Repetition on one fixed proof -Assembling these coordinates as coefficients of $E,N$ proves (A17) with + +With the constants fixed above, exact rational arithmetic gives $$ -\deg_Y E,\deg_Y N\le K:=(5d+1)d. -\tag{A18} +g_4=\frac1{71\,115\,455\,156\,448},\qquad +\delta=\frac1{1\,137\,847\,282\,503\,168}. $$ -Also $E\ne0$. If $E=0$, then $N(a_i,Y)=0$ for $10d>3d$ distinct values $a_i$. Regard $N$ as a polynomial in $X$ over the integral domain $F[Y]$; its root bound gives $N=0$, contradicting the nonzero kernel vector. See the [bounded polynomial-kernel construction][lean-matrix] and the [assembled error-locator certificate][lean-locator]. +Set $R=\lceil1/\delta\rceil$. Run the base verifier $R$ times with independent seeds on the **same** proof, and accept only if every run accepts. For a fixed proof with single-run acceptance $u$, independence gives acceptance $u^R$. In a no-instance, $u\le1-\delta$, so it remains to show $(1-\delta)^R\le1/2$. - +An elementary inequality proves this without logarithmic approximation: - -At most $2d$ of the $10d$ selected columns have $E(a_i,Y)=0$ as a formal polynomial, again by the root bound over $F[Y]$. Choose $d+1$ columns $J$ on which this polynomial is nonzero. For $y\in S$, the polynomial +$$ +(1+k\delta)(1-\delta)^k\le1 +\quad(k\ge0, 0\le\delta\le1). +$$ + +The base case is equality. For the induction step, $$ -N(X,y)-E(X,y)R_y(X) +(1+(k+1)\delta)(1-\delta) +=1+k\delta-(k+1)\delta^2\le1+k\delta; $$ -has degree at most $3d$ and vanishes at all uncorrupted selected entries, of which there are at least $8d>3d$. It is therefore identically zero. At any selected $i\in J$, equations (A17) now imply +multiply by the nonnegative factor $(1-\delta)^k$. Since $R\delta\ge1$, division gives $$ -E(a_i,y)\bigl(C_i(y)-R_y(a_i)\bigr)=0. +(1-\delta)^R\le\frac1{1+R\delta}\le\frac12. $$ -Each nonzero polynomial $E(a_i,Y)$ has at most $K$ roots. Removing these roots for all $d+1$ indices in $J$ removes at most $(d+1)K\le q/10$ rows. At least $q/2-q/10=2q/5$ rows remain. Call this set $B$. All entries of the rectangle $J\times B$ agree between $R$ and $C$. See the [clean-rectangle construction][lean-rectangle]. +The same honest proof still accepts on every repeated seed. Repetition leaves the proof-length polynomial unchanged and multiplies the query and random-bit budgets by the fixed constant $R$. Here $R=1\,137\,847\,282\,503\,168$ and $187R=212\,777\,441\,828\,092\,416$. The [rational repetition bound][lean-repetition-bound] and [amplified verifier][lean-amplified] retain these fixed choices. A prover cannot supply a different proof after seeing each seed; the probability statement quantifies over one proof before the product distribution. + - +### The polynomial-time implementation - -Interpolate the $d+1$ columns in $J$: + +The information-theoretic verifier must be implemented by a polynomial-time machine; a bounded number of oracle queries alone does not provide this. The formal implementation computes the parameters, field arithmetic, seed codecs, query addresses and verdict in a fixed program language and compiles that language to Mathlib's finite multi-stack `FinTM2` machine model. A verifier step takes the input, random seed and answer history, then either halts with a verdict or requests the next proof address. The implementation relation states that executing these steps produces the specified bounded query tree, on both possible answers at every queried branch. -$$ -P(X,Y)=\sum_{i\in J}\ell_i(X)C_i(Y). -$$ +The concrete operations can be bounded as follows. Parameter selection is a bounded search for the least admissible $a$. Field elements have $t=12a+32$ binary coefficients; arithmetic reduces polynomial representatives modulo the computed irreducible modulus, and inversion uses powering. The modulus, cube root and full generator are obtained by bounded finite searches, with candidate tests expressed in the same finite arithmetic. Their search ranges are polynomial in the field cardinality $Q$, and $Q=2^{32}s^{12}$ is polynomially bounded in the input length. For example, the charged modulus-construction cost is at most $7\,000\,000(Q+1)^7$; each root search costs at most $400\,000\,000(Q+4)^6$; the combined field-and-roots routine costs at most $10^9(Q+4)^7$. [These cost proofs][lean-field-cost] include candidate testing and storage. The runtime construction computes the parameters and arithmetic data from the input. For the underlying finite-field construction, see Shoup [Sections 20.2 and 21.1][shoup], especially the irreducible-polynomial existence result in Theorem 20.11. Shoup also analyses irreducibility testing and randomized construction. The deterministic bounded searches and charged cost estimates above are those of the formal implementation. -It has individual degrees at most $d$. For every $y\in B$, $P(X,y)$ and $R_y(X)$ agree at all $d+1$ selected positions, so they are equal as polynomials. Consider any of the original $10d$ columns $a_i$. By (A16), at most $q/10$ rows disagree between its column polynomial and the row values. Thus $P(a_i,Y)$ and $C_i(Y)$ agree at at least $|B|-q/10\ge3q/10>d$ positions. Their degree is at most $d$, so they are identical. +The public edge extension is evaluated from the input adjacency matrix by finite interpolation sums. The grid and its pair space have polynomial size because $s^s=2^{a2^a}$ and the preceding volume bound is logarithmic. Lagrange weights, degree-reduction coordinates and label transformations use bounded arithmetic loops. The proof-address values are polynomially bounded by $p_0(n)$; the implementation proves bounds for the sizes of their stored representations as well as for the number of addresses. -If a row polynomial $R_y$ differs from $P(\cdot,y)$, the two agree at at most $d$ of the $10d$ selected points. Since $P(a_i,y)=C_i(y)$ at every selected column, this row has $e(y)\ge9d$. But the mean of $e(y)$ is at most $d$. Hence at most $1/9$ of the formal rows differ, and therefore +The base callback has two passes. A discovery pass constructs the exact list of physical queries. A replay pass evaluates the algebraic verdict using the answer history at those addresses. The invalid whole-field-seed case emits no queries and returns acceptance. [Callback correctness][lean-runtime-correct] proves that these outputs agree with the mathematical query list and verdict for arbitrary input, seed and answer words. This is stronger than correctness only on honest proof responses. + +For cost, the proof assigns polynomial bounds to the setup, generated-query storage and branch computations, then substitutes each bound into the routine that consumes it. Concretely, if query storage is bounded by $C_q(n+1)^{d_q}$ and a branch's cost has degree $d_b$ in the size of its input/history, the combined proof takes an exponent at least $$ -\Delta\bigl((x,y)\mapsto R_y(x),P\bigr)\le1/9, -\qquad \Delta(f,P)\le\varepsilon+1/9. -\tag{A19} +\max\{84,d_q,(d_q+1)d_b\}. $$ -The distinction between the fraction of differing formal rows and their evaluation distance is useful: the former bounds the latter without any additional root estimate. See the [agreement argument from the rectangle][lean-coarse]. +Constants are enlarged to absorb the two passes, fixed seven-branch overhead and setup. The resulting theorem bounds the charged cost by $C(|x|+|r|+|u|+1)^e$ for every answer history $u$. The [polynomial-cost proof][lean-runtime-cost] retains the query-size premise until the separately proved storage bound supplies it. - +The repetition protocol slices the random string into $R$ blocks, invokes this same callback, and manages the answer history. Because $R$ is fixed, the protocol's loop and storage overhead are polynomial. Its compiler and public input/output codecs preserve the callback's semantics and translate the charged cost to a step bound on the finite machine. Thus [the runtime theorem][lean-runtime] concludes polynomial-time implementation of the actual amplified query algorithm. The low-level compiler, array arithmetic and finite-search proofs are supporting implementation lemmas; this account uses their stated semantic and cost guarantees and explains their composition, rather than reproducing their individual machine-state derivations. + - -To sharpen (A19), put $\tau=d/q$ and $\rho=\Delta(f,P)$. A simple transverse estimate will be used twice. Given two families of univariate degree-$d$ polynomials $A_z,B_z$, let $\alpha$ be the fraction of indices $z$ for which they differ as polynomials. Their mean evaluation distance is at least $\alpha(1-\tau)\ge\alpha-\tau$, so +### From every NP verifier to a graph + + +Fix an NP language $L$, a Boolean witness relation $R(x,w)$, a natural-coefficient witness bound $q$, and its concrete polynomial-time checker. Then $$ -\alpha\le \mathbb E_z\Delta(A_z,B_z)+\tau. -\tag{A20} +x\in L\iff\exists w\ (|w|\le q(|x|)\ \text{and}\ R(x,w)=1). $$ -At any fixed evaluation parameter, the disagreement fraction is at most $\alpha$. Apply this to the column polynomials $C_x$ and $P(x,\cdot)$. Their mean evaluation distance is at most $\varepsilon+\rho$, so at every $y$, +Let $T_0$ be the checker's time polynomial. At input length $n$, one bound valid for all permitted witnesses is $$ -\Pr_x[C_x(y)\ne P(x,y)]\le\varepsilon+\rho+\tau. +T(n)=T_0(n+q(n)+1). $$ -If $R_y\ne P(\cdot,y)$, polynomial separation gives +The $+1$ accounts for the delimiter in the fixed pair encoding. If the machine pushes at most $B$ cells per step, a sufficient stack-space bound is $$ -\Pr_x[R_y(x)\ne C_x(y)] -\ge1-\tau-(\varepsilon+\rho+\tau). +S(n)=n+q(n)+1+B T(n). $$ -Since $\rho\le\varepsilon+1/9$, $\varepsilon\le1/100$, and $q\ge20d$, this lower bound is at least $2/3$. The global row/column discrepancy is at most $2\varepsilon$, so at most $3\varepsilon$ of formal rows differ from $P$. Adding the initial row error gives $\Delta(f,P)\le\varepsilon+3\varepsilon=4\varepsilon$, as asserted. See the [sharpening of coarse agreement][lean-boost]. - - - -### 5. Point-versus-line soundness - - -A degree-$d$ line table assigns a polynomial $T_{u,v}\in F[T]$ of degree at most $d$ to each ordered pair $u,v\in V$. It need not assign compatible polynomials to different parameterizations of the same geometric line. Zero directions are allowed. Define +Represent a computation by $T(n)+1$ rows of bounded configurations, with the witness length and bits included. The constraints enforce the initial row, every adjacent transition and the accepting final row. Halting is padded by the machine's bounded-evaluation convention. Every true computation gives such a tableau within the space bound. Conversely, determinism and the transition constraints force each successive row to be the actual machine configuration, so an accepting tableau gives a witness with $R(x,w)=1$. This proves the [finite tableau equivalence][lean-tableau] for all witness lengths from zero through $q(n)$. + -$$ -\delta=\Pr_{u,v\in V,\ t\in F} -[f(u+tv)\ne T_{u,v}(t)]. -\tag{A21} -$$ + +To make the tableau a bounded-arity constraint system, use a finite alphabet fixed by the source machine. Each row has one control-and-prefix variable and one optional-symbol variable for each stack position below $S(n)$. Let $w_0$ be the machine's fixed window size. Link constraints identify the stored prefix with the first $w_0$ cells of every stack. -**Point-versus-line theorem.** If +The locality theorem for the machine states that a successor stack consists of the output produced from this prefix followed by the untouched old suffix starting at position $w_0$. The possible output-prefix lengths are bounded by a machine-fixed number $b_0$. Consequently the new symbol at position $j$ is either a symbol in that computed output prefix, or the old symbol at $$ -q\ge10^6d^3,\qquad\delta\le1/(4\cdot10^6), -\tag{A22} +w_0+(j-\lambda), $$ -then there is a polynomial $P$ of total degree at most $d$ with $\Delta(f,P)\le2\delta$. The result covers $d=0$ and $m=0$. These are the explicit sufficient constants in the source, rather than optimized values. Its all-field parameter distribution and factor-two conclusion should not be conflated with the paper's formulation using nonzero parameters and a factor-four conclusion. See the [test definition][lean-point-test] and the [complete soundness theorem][lean-point-soundness]. +where $\lambda\le b_0$ is the actual output-prefix length. A cell constraint reads the old prefix, the new cell, and the $b_0+1$ candidate old cells corresponding to every possible $\lambda$. The finite transition table selects the correct candidate. This gives fixed arity without placing an entire, input-sized stack in one variable. Positions outside the space bound read a single distinguished blank variable. [The cell-step reconstruction][lean-tableau-cells] proves that a row representing a real configuration, with linked prefix and satisfying cell constraints, represents exactly its successor. The proved growth bound ensures that no actual successor cell is lost at the boundary. - +Initial constraints fix the input bits, delimiter and all other stacks. In the next $q(n)$ positions they permit guessed Boolean symbols or blanks; adjacent constraints require every blank to be followed by a blank. Thus those cells describe exactly a witness of some length from zero through $q(n)$, without requiring the checker to reject longer words. Final constraints fix the accepting halt configuration. Induction on the rows now reconstructs a real accepting computation from a satisfying assignment. Reading the rows of a real accepting computation supplies the converse. - -Replace each $T_{u,v}$ by a nearest degree-$d$ polynomial $L_{u,v}$ to the received line $t\mapsto f(u+tv)$, choosing arbitrarily among ties. There are finitely many candidate polynomials, so a minimum exists. This can only decrease rejection; denote the new rejection by $\delta'\le\delta$. For every $x\in V$, define predictions and a corrected word by +For $k$ stacks, the source gives the variable count $$ -\pi_x(v,t)=L_{x-tv,v}(t),\qquad -g(x)=\mathop{\mathrm{plurality}}_{v,t}\pi_x(v,t). -\tag{A23} +v(n)=(T(n)+1)(1+kS(n))+1, $$ -The change of variables $(x,v,t)\leftrightarrow(u=x-tv,v,t)$ is a bijection. The plurality argument of (A7) therefore gives +including a blank variable. The constraint count is $$ -\Delta(f,g)\le2\delta'. -\tag{A24} +c(n)=1+(T(n)+1)kw_0+T(n)+T(n)kS(n) ++2(1+kS(n))+q(n). $$ -We must show that $g$ is an actual polynomial of the required total degree. See the [all-parameter correction definition][lean-point-correction]. +Both are polynomials: the terms count the blank test, prefix links, control steps, cell steps, two boundaries and witness-adjacency tests respectively. The [cell-constraint construction][lean-cell-constraints] and [assembled reduction][lean-np-reduction] provide these directions and the explicit index codecs. There is also a machine-fixed degenerate case: if the proposed accepting output contains a symbol outside the machine's finite reachable support, the checker can never accept. The reduction then emits a fixed non-three-colourable graph. Thus the theorem needs no extra assumption that acceptance is possible. + - + +A constraint over an alphabet of size $A$ is converted to Boolean constraints by one-hot coding. Each source variable receives $A$ bits, exactly one of which is true; its true index is the encoded symbol. Validity constraints enforce this condition. A relation inspects the relevant one-hot blocks and accepts precisely the tuples accepted by the original finite relation. The alphabet size and local arity are constants fixed by the original machine. [The finite-domain encoding][lean-one-hot] proves that decoding a satisfying one-hot assignment and encoding a source assignment preserve all constraints. - -First obtain an error bound for a **fixed** line parameter $t$. Let +For completeness of the next step, consider any Boolean relation $R_e$ on $k_0$ input bits. For every pattern $p\in\{0,1\}^{k_0}$, introduce flags $z_0,\ldots,z_{k_0}$ with $$ -e(u,v)=\Pr_s[f(u+sv)\ne L_{u,v}(s)]. +z_0=0,\qquad z_{i+1}=z_i\lor(x_i\mathbin{\mathrm{xor}}p_i), +\qquad R_e(p)\lor z_{k_0}=1. $$ -Its mean is $\delta'$. If $e(u,v) + + +A three-literal OR clause $a\lor b\lor c$ is equivalent to the existence of a fresh bit $z$ satisfying $$ -\Pr_{u,v}[f(u+tv)\ne L_{u,v}(t)]\le4\delta' -\quad\text{for every }t\in F. -\tag{A25} +\operatorname{NAE}(a,b,z),\qquad +\operatorname{NAE}(\neg z,c,0), $$ -No global convention for choosing tied minimizers is required. See the [fixed-parameter estimate][lean-parameter]. +where NAE means that the three values are not all equal. If $a=b=0$, the first clause forces $z=1$, and the second then forces $c=1$. If $a=b=1$, take $z=0$, which makes the second clause automatic. If $a\ne b$, take $z=0$, and both hold. These cases prove equivalence. - +To encode NAE by a graph, make a palette triangle with colours $0,1,2$. Each Boolean variable has two adjacent vertices, one for itself and one for its negation; both are joined to palette vertex 2. They must therefore receive complementary colours 0 and 1. Constant literals 0 and 1 use the corresponding palette vertices. For a NAE clause, make a new triangle and join its $i$-th vertex to the vertex for its $i$-th literal. If the three literal colours are equal, every vertex of the new triangle is forbidden that colour, so three distinct colours are impossible. If the literals are not all equal, the triangle can be coloured: for literal colours $(0,0,1)$, use triangle colours $(1,2,0)$; complementing or permuting yields the other cases. A colouring of the whole graph can first be relabelled so the palette has colours 0,1,2, after which it yields a satisfying Boolean assignment. The [NAE graph theorem][lean-nae] proves these two constructions. - -We need a consequence of bivariate agreement at one crossing. Assume $d>0$ and $q\ge1000d^3$. Suppose a received grid has degree-$d$ approximating rows and columns with global errors at most $\varepsilon\le1/100$. Suppose also that, at the selected crossing $(x_0,y_0)$, its received row is within $\varepsilon$ of the transverse column values, and its received column is within $\varepsilon$ of the transverse row values. Assume +The graph has one palette triangle, two vertices per Boolean variable and three vertices per NAE clause. Encoding its adjacency matrix therefore has quadratic length in those counts. Composing with the one-hot and fixed-arity constructions gives a polynomial-length graph encoding $f(x)$, with $$ -6\varepsilon+2d/q<1/2. -\tag{A26} +G_{f(x)}\text{ is three-colourable}\iff x\in L. $$ + -If the selected row and column polynomials are nearest approximations, their values at the crossing agree. To prove this, bivariate agreement supplies $P$ within $4\varepsilon$ of the received grid. Each polynomial family is then within $5\varepsilon$ of $P$ in mean evaluation distance. Formula (A20) shows that its transverse distance at every fixed parameter is at most $5\varepsilon+d/q$. The received selected row is therefore within $6\varepsilon+d/q$ of the corresponding row of $P$. Its nearest polynomial is no farther away from the received row, so it lies within $12\varepsilon+2d/q<1-d/q$ of that polynomial row of $P$, by (A26). Polynomial separation forces identity. The same holds for the column, proving agreement at the crossing. + +The reduction is executable. The program computes $T(n)$, $S(n)$ and the fixed source dimensions, enumerates the tableau variables and relations using arithmetic sum/product indices, emits the fixed-arity clauses and gadgets, and writes the graph's bitstring. The fixed finite alphabet and fixed relation arity make truth-table enumeration constant work per relation up to the machine-dependent factor $2^{k_0}$. Matrix emission is polynomial in the already bounded vertex count. -One variant will be needed: the selected row may be a candidate rather than a nearest approximation, provided its own received-row error is at most $\varepsilon$. Its distance from the row of $P$ is then at most $7\varepsilon+d/q<1-d/q$, again by (A26), so the same conclusion holds. The selected column remains a nearest approximation. Thus four small errors suffice when both are nearest, and five suffice in this candidate-row version. See the [crossing-consistency lemma][lean-crossing] and the [candidate-row variant][lean-candidate]. +More explicitly, the [program-bearing reduction theorem][lean-np-runtime] returns $f,p,P,C,e$, all depending only on the NP certificate, such that on every input $x$, program $P$ emits exactly $f(x)$, its charged cost is at most $C(|x|+1)^e$, the output length is at most $p(|x|)$, and graph colourability is equivalent to $x\in L$. The source derives the program cost from fixed polynomial preprocessing plus a sixth-degree bound in the preprocessing size and the variable/constraint counts. Substitution of their polynomial bounds is again a polynomial. The compiler and fixed public symbol codecs give the corresponding finite-machine certificate. These retained data are what the final verifier uses to preprocess its input. + - +### Transporting the verifier through the reduction - -For the positive-degree case of (A22), fix a center $u\in V$ and parameter $t\in F$. Choose $0<\varepsilon\le1/100$ satisfying (A26). Choose independent uniform $v,w\in V$ and $s\in F$, and inspect the grid + +Let the amplified graph verifier use exactly $A\lceil\log _2(n+2)\rceil+B$ random bits, and let $|f(x)|\le p(|x|)$, where $p\in\mathbb N[X]$. Put $e=\deg p$, using the source's natural-degree convention for the zero polynomial. Since the coefficients are nonnegative, $$ -M(y,z)=f\bigl(u+yv+(z-s)w\bigr). -\tag{A27} +p(n)\le p(1)(n+2)^e, +\qquad +p(n)+2\le(p(1)+2)(n+2)^e. $$ -Here a row fixes $y$ and varies $z$; a column fixes $z$ and varies $y$. Use the nearest line polynomials +The first inequality follows term by term from $n^i\le(n+2)^e$ for every exponent with nonzero coefficient; the second also uses $(n+2)^e\ge1$. Therefore $$ -R_y(z)=L_{u+yv-sw,w}(z),\qquad -C_z(y)=L_{u+(z-s)w,v}(y). +\lceil\log _2(p(n)+2)\rceil +\le e\lceil\log _2(n+2)\rceil ++\lceil\log _2(p(1)+2)\rceil. $$ -At crossing $(t,s)$, the column prediction is $C_s(t)=L_{u,v}(t)$, and the row prediction is +Choose source randomness $$ -L_{u+tv-sw,w}(s)=\pi_{u+tv}(w,s). +a=Ae,\qquad b=A\lceil\log _2(p(1)+2)\rceil+B. $$ -The four discrepancies needed for crossing consistency are +These formulas remain valid for constant and zero polynomials; the slope can be zero. On $x$, compute $f(x)$, use the initial portion of the random word needed by the graph verifier, and ignore the rest. Equal-size fibres of the prefix map preserve the exact acceptance probability. If the graph proof bound is $p_0$, the transported bound is $p_0\circ p$, by monotonicity of natural-coefficient polynomials. The query budget is unchanged. [The resource-transport proof][lean-transport] gives these formulas, while [final assembly][lean-assembly] composes the executable reduction with the actual query algorithm. -$$ -\begin{aligned} -e_{\rm row}&=\Pr_{y,z}[M(y,z)\ne R_y(z)],& -e_{\rm col}&=\Pr_{y,z}[M(y,z)\ne C_z(y)],\\ -e_{\rm cross,row}&=\Pr_z[M(t,z)\ne C_z(t)],& -e_{\rm cross,col}&=\Pr_y[M(y,s)\ne R_y(s)]. -\end{aligned} -$$ +This completes the forward theorem: membership in $L$ gives an honest proof for the reduced colourable graph; nonmembership gives a non-colourable graph and hence acceptance at most $1/2$ for every proof. Polynomial preprocessing composed with the polynomial-time graph protocol remains polynomial. All coefficients and degrees depend on the original NP verifier, never on the particular input or proof. + -The last two compare a received slice with the *transverse* polynomial predictions. Each quantity depends on the sampled $v,w,s$; we now bound its mean over those choices. A random affine expression $a+\lambda b$ is uniform in $V$ when $b$ is uniform and $\lambda\ne0$. In the global row error of (A27), the row center contains the coefficient $y$ of $v$; all $y\ne0$ therefore give the global rejection distribution, while the exceptional slice $y=0$ contributes at most $1/q$. In the global column error, the analogous exceptional slice is $z=s$. The local error along the selected column has the same $y=0$ exception. These three means are at most $\delta'+1/q$. For the local error along the selected row, $z\ne s$ makes the center uniform, but the evaluation parameter is the fixed $t$; (A25) bounds this contribution by $4\delta'$, and the exceptional slice contributes at most $1/q$. Thus all four means are at most $4\delta'+1/q$. +### The reverse inclusion -Markov's inequality and a union bound show that the probability one of these four errors exceeds $\varepsilon$ is at most $4(4\delta'+1/q)/\varepsilon$. On the complementary event the predictions agree by the crossing lemma. For each $v$, plurality minimizes the probability of disagreeing with the independent prediction $\pi_{u+tv}(w,s)$; comparing it with $L_{u,v}(t)$ costs at most a factor two, exactly as in (A7). Hence + +Suppose a language has a verifier satisfying the target conditions. An NP witness can be the first $p(n)$ proof bits. The deterministic witness checker runs the verifier for every random seed and accepts exactly if all runs accept. + +There are polynomially many seeds. Indeed, $$ -\Pr_v[L_{u,v}(t)\ne g(u+tv)]\le -\gamma:=\frac{8(4\delta'+1/q)}{\varepsilon} -\quad\text{for every }u,t. -\tag{A28} +2^{a\lceil\log _2(n+2)\rceil+b} +\le2^b\bigl(2(n+2)\bigr)^a. $$ -The endpoint $u+tv$ varies here. This is stronger than merely bounding the average error at a fixed point and is precisely what is needed next. See the [mixed-plane sampling estimates][lean-mixed] and the [endpoint-consistency bound][lean-endpoint]. +For each seed, at most $\ell$ answers are requested. Each address is below $p(n)$, and looking up a bit in the supplied finite witness takes polynomial time even using a linear scan. The implementation of each query step is polynomial in the input, random string and bounded answer history. Enumerating all seeds, simulating these runs and accumulating their conjunction therefore takes polynomial time. The [concrete finite-witness checker][lean-concrete-converse] supplies this closure in the same finite-machine model. - +If $x\in L$, perfect completeness gives a proof accepted on every seed. Truncating it to its first $p(n)$ bits preserves every run because no branch reads another address. Conversely, if a finite witness is accepted on every seed, extend it by zeros to an infinite oracle. The acceptance probability of this oracle is one. If $x\notin L$, soundness would make it at most $1/2$, a contradiction. Thus the finite witness relation characterizes $L$, proving the reverse inclusion. - -Fix a target line $y\mapsto x+yh$, and choose once and for all a nearest degree-$d$ polynomial $Q(y)$ to $g$ on this line. We prove that it represents $g$ there **exactly**. Fix a parameter $y_0$. For independent uniform $v,w\in V$, use the grid +The remaining task is to identify this certificate class with the reference nondeterministic-machine definition of NP in the unchanged vendored Complexitylib. The [reference-NP equivalence][lean-reference-np] uses two concrete simulations. -$$ -M(y,z)= -\begin{cases} -g(x+yh),&z=0,\\ -f\bigl(x+yh+z(v+yw)\bigr),&z\ne0. -\end{cases} -\tag{A29} -$$ +For the direction from a polynomial-time nondeterministic machine to certificates, a witness records the bounded sequence of nondeterministic choices. A deterministic path checker follows the supplied choices and checks that the machine has accepted when the list ends; the time bound limits the admissible witness length. Its compiled program has polynomial cost, giving a certificate verifier in the concrete model used above. -The zero column is the target line in the corrected function. Each nonzero column samples an oriented line with uniform center and direction. The rows join these random comparisons to the target, allowing us to prove that the already chosen $Q$ agrees with every target value. The expression for nonzero $z$ is affine in either variable when the other is fixed. Give row $y$ the candidate polynomial +For the converse, translate the concrete certificate checker into a reference decision machine. A bounded-guess construction computes and enforces the polynomial witness-length bound, guesses a witness within it, and runs the translated checker. An accepting branch exists exactly when an accepted certificate does. The translation and bounded-guess theorems supply the simulation and runtime guarantees; they are imported machine proofs, not additional premises left to the reader. Together these directions identify the certificate class in the PCP theorem with the intended reference NP class. + -$$ -R_y(z)=L_{x+yh,\,v+yw}(z). -$$ +[paper-pcp]: https://arxiv.org/html/2608.17429v2#S7 +[lean-theorem]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Theorem.lean#L25 +[lean-colour-algebra]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorAlgebra.lean#L94 +[lean-colour-grid]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorGrid.lean#L135 +[lean-seven-checks]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorVerifier.lean#L37 +[lean-query-budget]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorVerifier.lean#L362 +[lean-completeness]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorVerifierCompleteness.lean#L101 +[lean-soundness]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorVerifierSoundness.lean#L58 +[lean-difference]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryDifferenceConsistency.lean#L297 +[lean-decoded]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorDecodedSoundness.lean#L86 +[lean-budget]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorSoundnessBudget.lean#L142 +[lean-parameters]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorParameters.lean#L168 +[lean-choice]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorParameterChoice.lean#L89 +[lean-sampling]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorFullFieldSampling.lean#L160 +[lean-binary]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorBinaryVerifier.lean#L250 +[lean-canonical]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorCanonicalVerifier.lean#L168 +[lean-repetition-bound]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/RationalRepetitionBound.lean#L59 +[lean-amplified]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorAmplifiedVerifier.lean#L72 +[lean-runtime-correct]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/ThreeColorBaseCorrect.lean#L14 +[lean-runtime-cost]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/ThreeColorBasePolynomial.lean#L55 +[lean-runtime]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/ThreeColorRuntime.lean#L11 +[lean-tableau]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/NPTableau.lean#L142 +[lean-cell-constraints]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/NPCellConstraints.lean#L227 +[lean-np-reduction]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Reduction/NPThreeColor.lean#L144 +[lean-boolean-clauses]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Reduction/FiniteBooleanConstraints.lean#L187 +[lean-nae]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Reduction/NAEThreeColor.lean#L241 +[lean-np-runtime]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Reduction/NPThreeColorRuntime.lean#L257 +[lean-transport]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Verifier/ReductionResources.lean#L35 +[lean-assembly]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorFinalAssembly.lean#L54 +[lean-concrete-converse]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/ReverseConcrete.lean#L33 +[lean-reference-np]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/ReferenceNPConverse.lean#L39 +[lean-seed-size]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorSeedSize.lean#L170 +[lean-resources]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorResourceBounds.lean#L44 +[lean-field-cost]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/ThreeColorFieldSetupCost.lean#L45 +[lean-tableau-cells]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/TableauCells.lean#L155 +[lean-one-hot]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Reduction/FiniteDomainConstraints.lean#L119 -For $z\ne0$, give column $z$ its nearest polynomial + +## Algebraic tests and correction + + +The algebraic part of the construction has two distinct tasks. It must recognize a word that is close to a low-degree polynomial, and it must recover a specified value of that polynomial from the word. This chapter proves the forms of these statements used in Lee's formalization. It also develops the interpolation and vanishing certificates needed to express constraints on an encoded assignment. + +Throughout, $F$ is a finite field of cardinality $q$, and $V=F^m$, with $m$ allowed to be zero. Every probability and expectation is uniform on its displayed finite domain. Write $$ -C_z(y)=L_{x+zv,\,h+zw}(y), +\Delta(f,g)=\Pr_x[f(x)\ne g(x)]. $$ -and put $C_0=Q$. By its choice, $Q$ is a nearest approximation to the modified zero column. The other row candidates need not remain nearest after this modification, which is why the five-error crossing lemma was proved. +An assertion about the total degree of a polynomial refers to a formal polynomial in $F[X_1,\ldots,X_m]$. Equal evaluation functions need not be equal formal polynomials over a finite field. Where the proof passes from evaluations to polynomial identities, the necessary degree bound will be stated. We use basic field arithmetic, finite-dimensional linear algebra, and the univariate root bound: a nonzero polynomial of degree at most $d$ has at most $d$ roots. All further ingredients needed for the testing argument are proved below. -Put $\eta=\Delta(f,g)\le2\delta'$, and $\ell=4\delta'$, the bound in (A25). The five errors at crossing $(y_0,0)$ have the following mean bounds over $v,w$: +The primary paper is the corrected public revision of Amireddy, Behera, Srinivasan, Sudan and Willumsgaard, *A Simple Algebraic Proof of the PCP Theorem*, [arXiv:2608.17429v2][paper]. The theorem statements below follow the pinned Lean source when it makes a more specific choice of test or constants. In particular, the short test uses a generator of the whole multiplicative group and Lagrange weights. The point-versus-line test samples its line parameter from all of $F$. -| Error | Mean upper bound | -|---|---:| -| global row error | $\gamma+\eta$ | -| global column error | $\delta'+1/q$ | -| received selected row versus column values | $\ell+1/q$ | -| received zero column versus row values | $\gamma$ | -| selected row candidate's own error | $\gamma+\eta$ | + -Here are the sampling details. For fixed $y$, $v+yw$ is a uniform direction. Equation (A28) bounds disagreement of its line polynomial with $g$ at each parameter by $\gamma$; at nonzero parameters the sampled point is uniform, adding at most $\eta$ for replacing $g$ by $f$. At parameter zero the received value already is $g$. This proves the first and fifth entries. For a fixed $z\ne0$, the pair $(x+zv,h+zw)$ is uniform on $V^2$, so the mean column error is $\delta'$; discard the exceptional zero column at cost $1/q$. For the third entry, the same uniform pair is evaluated at fixed $y_0$, so (A25) gives $\ell$ off the zero column. For the fourth entry, apply (A28) with parameter zero to each row center. These arguments use invertible affine maps; they do not assume independence among all entries of a grid. See the [ruled-surface sampling estimates][lean-ruled-sampling]. +### 1. Polynomial distance, interpolation, and grid certificates -Let + +**Polynomial distance.** If $P\ne0$ has total degree at most $d$, then $$ -B=2(\gamma+\eta)+\delta'+\ell+\gamma+2/q. -\tag{A30} +\Pr_{x\in F^m}[P(x)=0]\le d/q. +\tag{A1} $$ -Markov and the union bound show that one of the five errors exceeds $\varepsilon$ with probability at most $B/\varepsilon$. Otherwise the crossing lemma gives $R_{y_0}(0)=Q(y_0)$. Separately, (A28) gives +For completeness, induct on $m$. For $m=0$, a nonzero polynomial is a nonzero constant. In the induction step write $$ -\Pr[R_{y_0}(0)\ne g(x+y_0h)]\le\gamma. +P(X,T)=\sum_{j=0}^r P_j(X)T^j,\qquad P_r\ne0. $$ -If $B/\varepsilon+\gamma<1$, some seed satisfies both equalities. Their right sides are constants, so $Q(y_0)=g(x+y_0h)$. This holds for each $y_0$, with the same previously chosen $Q$; hence the entire target line has degree at most $d$. Since the line was arbitrary, the exact-line characterization makes $g$ a polynomial of total degree at most $d$. See the [ruled-surface rigidity argument][lean-ruled]. +The coefficient $P_r$ has total degree at most $d-r$. The induction hypothesis bounds the fraction of $X$ for which it vanishes by $(d-r)/q$. For every other $X$, the specialization in $T$ is nonzero of degree $r$, so at most $r/q$ of its evaluations vanish. Bounding the contribution from exceptional bases by their full probability gives at most $(d-r)/q+r/q=d/q$. - +Thus distinct polynomials of total degree at most $d$ have evaluation distance at least $1-d/q$. In particular, evaluation is injective on these polynomials when $d -We now verify the numerical bounds required by the crossing argument. For $d>0$, (A22) gives $q\ge10^6$ and $q\ge1000d^3$. Take $\varepsilon=1/100$. Then + + + +**Grid extension.** Let $H\subseteq F$ be nonempty, and put $h=|H|$. For $a\in H$, define $$ -\gamma\le0.0016,\qquad -\eta\le0.0000005,\qquad -\ell\le0.000001. +\ell_a(T)=\prod_{b\in H\setminus\{a\}}\frac{T-b}{a-b}. $$ -Equation (A30) gives $B\le0.00480425$, and therefore +The denominators are nonzero, and $\ell_a(b)$ is one for $b=a$ and zero for all other $b\in H$. Therefore a table $f:H^m\to F$ has the extension $$ -B/\varepsilon+\gamma\le0.482025<1. +\widetilde f(X)=\sum_{z\in H^m}f(z)\prod_{i=1}^m\ell_{z_i}(X_i). +\tag{A2} $$ -Also $d/q\le10^{-6}$, so $6\varepsilon+2d/q<1/2$; all uses of the crossing lemma are valid. The bound $q>2d$ needed for the exact-line characterization follows as well. We have constructed $g=P$, and (A24) finishes the estimate $\Delta(f,P)\le2\delta'\le2\delta$. See the [explicit constants][lean-point-constants]. +Its degree in each variable is at most $h-1$, and its total degree is at most $m(h-1)$. It agrees with $f$ because precisely one summand survives at each grid point. It is the unique polynomial with these individual degree bounds and these evaluations. To prove uniqueness, a difference polynomial vanishing on $H^m$, regarded as a polynomial in its last variable, has $h$ roots after every specialization of the others. Its degree is less than $h$, so each coefficient vanishes on $H^{m-1}$; induction makes every coefficient zero. The empty product and singleton zero-dimensional grid give the same assertion when $m=0$. See the [grid interpolation proof][lean-interpolation]. - + - -For $d=0$ there is a shorter proof requiring no large-field hypothesis. Every table polynomial is a constant $b_{u,v}$. Both $f(u+tv)$ and $f(u+(t+1)v)$ disagree with this constant with mean probability $\delta$; translation $t\mapsto t+1$ preserves the sampling distribution. Thus the mean disagreement between these two function values is at most $2\delta$. For every fixed $t$, the map + +**Vanishing on the grid.** Set $$ -(u,v)\longmapsto(u+tv,\ u+(t+1)v) +Z_i(X)=\prod_{a\in H}(X_i-a). $$ -is a bijection of $V^2$, with inverse $v=y-x, u=x-tv$. Therefore two independent uniform values of $f$ disagree with probability at most $2\delta$. Averaging over the second point gives a value $a\in F$ with $\Pr_x[f(x)\ne a]\le2\delta$. The constant polynomial $a$ is the required approximation. This works in characteristic two and in dimension zero. See the [degree-zero soundness proof][lean-constant]. +A polynomial $P$ vanishes on $H^m$ if and only if it admits the formal identity - +$$ +P=\sum_{i=1}^m Q_i Z_i. +\tag{A3} +$$ -### Source correspondence and scope +Moreover, the coefficients can be chosen so that every nonzero $Q_i$ satisfies - -The short-test proof and the point-versus-line proof are separate components. The former uses only $q>2c$ and a weighted affine-constraint argument. The latter uses the bivariate agreement construction and explicit cubic field-size constants. The local correctors then consume proximity to a polynomial; they do not supply the polynomial's existence. Keeping these implications separate prevents a correction guarantee from being used as an unproved testing theorem. +$$ +\deg Q_i+h\le\deg P. +\tag{A4} +$$ -The point-versus-line argument follows the sequence in [ALMSS Appendix A][almss]: plurality correction (Lemma 66), bivariate agreement and crossing consistency (Theorem 69 and Corollary 70), then consistency on randomly sampled surfaces (Lemmas 71–73). The fixed-parameter estimate above handles arbitrary choices among nearest-line ties, and the candidate-row crossing variant handles the modified zero column in (A29). These steps give the stated whole-field test and explicit constants. +To see this, divide successively by the monic polynomials $Z_1,\ldots,Z_m$, treating the other variables as coefficients. At the $i$-th step remove every term whose exponent of $X_i$ is at least $h$. Replacing the leading term $X_i^h$ by lower powers never increases total degree. The quotient terms have lost $h$ from their degree, proving (A4). Later divisions do not increase degrees in previously processed variables, since their divisors involve only their own coordinate. The result is $P=\sum Q_iZ_i+R$, where $R$ has individual degrees less than $h$. If $P$ vanishes on the grid, so does $R$; uniqueness in (A2) gives $R=0$. The converse follows by evaluation, since every $Z_i$ vanishes there. This also proves the assertion in dimension zero: a vanishing constant is zero and the sum is empty. See the [grid decomposition][lean-grid]. - +Package (A3) as one polynomial in two blocks of variables: -[paper]: https://arxiv.org/abs/2608.17429v2 -[paper-v1]: https://arxiv.org/abs/2608.17429v1 -[almss]: https://people.seas.harvard.edu/~madhusudan/papers/1992/almss-journ.pdf -[arora-safra]: https://www.cs.umd.edu/~gasarch/TOPICS/pcp/AS.pdf -[lean-distance]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PolynomialDistance.lean -[lean-interpolation]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/GridInterpolation.lean -[lean-grid]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/GridVanishing.lean -[lean-certificate]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/VanishingCertificate.lean -[lean-lines]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PolynomialLineCharacterization.lean -[lean-generator]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/GeneratorLowDegreeTest.lean -[lean-weighted]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/WeightedConstraintSoundness.lean -[lean-correction]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/StandardLocalCorrection.lean -[lean-line-correction]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/LineTableLocalCorrection.lean -[lean-bivariate]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BivariateAgreement.lean -[lean-column-selection]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BivariateColumnSelection.lean -[lean-matrix]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PolynomialMatrixKernel.lean -[lean-locator]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BerlekampWelchCertificate.lean -[lean-rectangle]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BivariateCleanRectangle.lean -[lean-coarse]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BivariateAgreementFromRectangle.lean -[lean-boost]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BivariateAgreementBoost.lean -[lean-point-test]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PointLineTest.lean -[lean-point-soundness]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PointLineSoundness.lean -[lean-point-correction]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PointLineCorrection.lean -[lean-parameter]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PointLineParameterError.lean -[lean-crossing]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BivariateCrossingSoundness.lean -[lean-candidate]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/CandidateCrossing.lean -[lean-mixed]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/MixedPlaneSampling.lean -[lean-endpoint]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PointLineEndpointConsistency.lean -[lean-ruled-sampling]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/RuledSurfaceSampling.lean -[lean-ruled]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/RuledSurfaceRigidity.lean -[lean-point-constants]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PointLineConstants.lean -[lean-constant]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PointLineConstant.lean +$$ +M(X,Y)=\sum_i Q_i(X)Y_i. +$$ -## From polynomial values to a constant number of bits +It satisfies the formal identities - +$$ +M(X,0)=0,\qquad M(X,Z_1(X),\ldots,Z_m(X))=P(X), +\tag{A5} +$$ -The field-valued tests from the preceding part read a bounded number of field elements, but a field element contains several bits. Moreover, a line restriction can have degree growing with the input size. Two encodings remove these obstacles. A digit substitution represents a univariate polynomial by a polynomial of fixed total degree in more variables. A Hadamard encoding then lets the verifier inspect a binary linear observation of a field value with one bit query. Local tests bound the distance of a received binary table from a valid encoding. +and $\deg M\le\deg P$, since $h\ge1$ and (A4) gives $\deg Q_i+1\le\deg P$. Conversely, any polynomial $M$ satisfying (A5), including one nonlinear in $Y$, proves that $P$ vanishes on the grid: at a grid point the two substitutions have the same value. Nonemptiness of $H$ is needed for the degree-bounded existence direction. On an empty grid of positive dimension, the constant one vanishes vacuously but has no degree-zero certificate whose zero substitution is zero. Finally, substitution of the $Z_i$'s into an arbitrary degree-$D$ certificate has degree at most $hD$: each substituted variable has degree at most $h$, so each monomial's degree grows by at most that factor. See the [certificate and substitution bounds][lean-certificate]. -We next combine the two encodings with low-degree testing, local correction and the zero-on-grid test. The construction is due to Amireddy, Behera, Srinivasan, Sudan and Willumsgaard in [the corrected paper, Sections 3–6 and Appendices B–D](https://arxiv.org/abs/2608.17429v2); the quantitative argument below follows Troy Lee's pinned formal implementation. Its explicit constants and sampling conventions sometimes differ from that paper. The changes are identified at the relevant steps. + -Throughout, $F$ is a finite field of characteristic two, $q=|F|=2^t$, and + +**From exact lines to total degree.** Suppose $q>2d$, and every function $$ -\rho:F\longrightarrow\mathbb F_2^t +t\longmapsto f(u+tv),\qquad u,v\in V, $$ -is a fixed linear isomorphism over $\mathbb F_2$. Distances and probabilities are uniform finite averages. We write $\Delta(u,v)$ for the fraction of inputs on which two functions disagree. The digit radix is denoted by $b$, to distinguish it from the number of variables of an outer polynomial. The parameters $b,c,r$ are integers with $b\geq1$, $c\geq0$, and $r\geq1$. The construction eventually takes $c=4$. Polynomial degree means total degree for several variables and ordinary degree for one variable; the zero polynomial satisfies every nonnegative bound used below. All auxiliary tables in soundness statements are arbitrary received tables. +is represented by a univariate polynomial of degree at most $d$. Then $f$ is represented by a multivariate polynomial of total degree at most $d$. - +We prove the claim by induction on the dimension. Choose $d+1$ distinct values $a_0,\ldots,a_d\in F$ for the first coordinate. Each slice $y\mapsto f(a_i,y)$ has the same exact-line property in one less dimension and therefore, by induction, is represented by a total-degree-$d$ polynomial $P_i(y)$. Interpolate the slices: -### A high-degree univariate polynomial as a low-degree multivariate polynomial +$$ +Q(x,y)=\sum_{i=0}^d\ell_i(x)P_i(y). +$$ - +This polynomial has total degree at most $2d$. For fixed $y$, both $Q(\cdot,y)$ and the prescribed polynomial representing the first-coordinate line have degree at most $d$ and agree at $d+1$ nodes. They are equal, so $Q$ represents $f$ everywhere. -Let $p(Y)=\sum_{jd$. Each such component has degree at most $2d + +### 2. The corrected short low-degree test + + +Let $c\ge0$, assume $q>2c$, and choose a generator $\zeta$ of $F^\times$. Put $$ -j=j_0+j_1b+\cdots+j_{c-1}b^{c-1},\qquad 0\leq j_i0$, and the $c=0$ case has only one node. The weights are all nonzero. They are the Lagrange interpolation coefficients for evaluation at zero, so $\sum_i w_i=1$. + +For a word $f:V\to F$, define $$ -\operatorname{Enc}(p)=\sum_{jc+1$, use center zero and direction $\zeta^{n-(c+1)}$: $$ -\operatorname{Dec}(Q)(Y)=Q\bigl((Y^{k b^i})_{i,k}\bigr). +0=\sum_{i=1}^{c+1}w_i h\bigl(\zeta^{n-(c+1)+i}\bigr). $$ -For $j2c$. This proof includes $c=0$ and arbitrary field characteristic. See the [corrected generator test][lean-generator]. + + + + +We first prove robustness for weighted affine constraints, before applying it to polynomials. Let $a_1,\ldots,a_n\in F^\times$, allow arbitrary weights $w_i\in F$, and use the same prediction formula with $n$ terms. Neither distinctness of nodes nor nonzero weights is needed in this paragraph. Set $$ -\operatorname{Dec}(\operatorname{Enc}(p))=p\qquad\text{in }F[Y]. +\delta=\Pr_{x,v}[f(x)\ne A_f(x,v)],\qquad +g(x)=\mathop{\mathrm{plurality}}_v A_f(x,v), $$ -Applying $\operatorname{Dec}$ to equal encodings proves injectivity on polynomials of degree strictly below $b^c$. The strict bound matters: the encoding retains only $c$ digits. Evaluating the identity at $z\in F$ then gives +breaking any tie arbitrarily. Then $$ -\operatorname{Enc}(p)(\Phi(z))=p(z), -\qquad \Phi(z)_{i,k}=z^{k b^i}. +\Delta(f,g)\le2\delta. +\tag{A7} $$ -The formal identity proves more than equality of evaluations. Over a finite field of size $q$, the nonzero polynomial $Y^q-Y$ vanishes at every field element. When $q +$$ +(x+a_i y,\ z+a_i b) +$$ -### Binary labels for field elements +is uniform on $V^2$, since multiplication by $a_i\ne0$ is invertible. Except on probability at most $n\delta$, all $n$ corresponding constraints hold. Summing these constraints with weights $w_i$ gives $A_f(x,y)=D(x;y,z,b)$. The expression $D$ is symmetric under exchanging $y,z$, because its double sum can exchange $i,j$. Thus, over independent $y,z,b$, it also equals $A_f(x,z)$ except on probability at most $n\delta$. Consequently - +$$ +\Pr_{y,z}[A_f(x,y)\ne A_f(x,z)]\le2n\delta. +$$ -For $r\geq1$, let $\mathcal B_r$ be the vector space of squarefree Boolean polynomials in $t$ variables of degree at most $r$. A label is a coefficient vector in this space. The reduction $Z_i^2=Z_i$ is appropriate because labels are evaluated on $\mathbb F_2^t$; the formal implementation indexes monomials by subsets of coordinates. A field element $u$ is encoded by the binary word +For any distribution with atom probabilities $p_a$, its plurality error is $1-\max_a p_a\le1-\sum_a p_a^2$, the disagreement probability of two independent samples. Hence $$ -\mathcal H_r(u)(R)=R(\rho(u)),\qquad R\in\mathcal B_r. +\Pr_v[A_f(x,v)\ne g(x)]\le2n\delta +\quad\text{for every }x. +\tag{A9} $$ -The word has $2^{\sum_{j=0}^{\min(r,t)}\binom tj}$ entries. We will use full labels, affine degree-one labels, and homogeneous degree-one labels. A homogeneous label has the form +Now fix **both** $x,v$. With random $y,b$, compare the following four values: $$ -L_w(z)=\sum_{i=1}^t w_i z_i,\qquad w\in\mathbb F_2^t. +g(x),\quad A_f(x,y),\quad D(x;y,v,b),\quad +\sum_iw_i g(x+a_i v). $$ -For a field-valued function $g$, write $\mathcal H_r(g)(x,R)=\mathcal H_r(g(x))(R)$. - -If $u\neq v$, choose a coordinate on which $\rho(u)$ and $\rho(v)$ differ. Adding that coordinate label pairs every label giving equal evaluations with one giving unequal evaluations. Consequently, for $r\geq1$, +The first comparison fails with probability at most $2n\delta$, by (A9). The second fails with probability at most $n\delta$, by the grid argument. For the third, rewrite the grid as $$ -\Delta(\mathcal H_r(u),\mathcal H_r(v))=\frac12. +D(x;y,v,b)=\sum_iw_i A_f(x+a_i v,\ y+a_i b). $$ -The same pairing works among homogeneous linear labels. Averaging over the outer input gives +For each $i$, the direction $y+a_i b$ is uniform; (A9) and a union bound give failure probability at most $2n^2\delta$. The two endpoints of this chain are constants, independent of $y,b$. If $$ -\Delta(\mathcal H_r(g),\mathcal H_r(h)) -=\frac12\Delta(g,h), -\tag{B1} +(2n^2+3n)\delta<1, +\tag{A10} $$ -and the same identity holds when distance is measured only on homogeneous degree-one labels. This exact factor of two converts the rejection probability of a field equality into that of a binary observation. +their disagreement probability is less than one, so they must be equal. This proves that the corrected word $g$ satisfies every weighted constraint. This last use of strict inequality converts a probability estimate into an exact identity. See the [weighted-constraint soundness proof][lean-weighted]. -For an arbitrary received word, small full-label distance does not imply equally small distance on a much smaller subset of labels. We therefore maintain two bounds for the same decoded function: one on all labels and one on homogeneous degree-one labels. When the received oracle itself has degree-one labels, homogeneous labels form half its domain, so their error is at most twice the full affine-label error. No corresponding dimension-independent restriction estimate is inferred from the full degree-$r$ domain for $r>1$. +The plurality correction and double-sampling argument follow the approach of Rubinfeld–Sudan [Section 4, Theorem 5 and Lemmas 6–8 in the retained manuscript][rubinfeld-sudan]. Amireddy et al. identify this antecedent as Theorem 4.1 of the published paper in their discussion after Lemma 3.3. They also relate the test to Kaufman–Sudan [Theorem 2.9][kaufman-sudan], whose general result assumes a 2-ary independent local formal characterization. For that theorem, take $k=c+2$ forms: $\ell_1(u,v)=u$ and $\ell_{i+1}(u,v)=u+a_iv$. Accepted vectors satisfy $y_0=\sum_iw_i y_i$, a linear subspace. The exact characterization proved above supplies the formal characterization, and the nonzero nodes make the center and each other form jointly uniform, giving the required two-ary independence. Its denominator becomes $(2k+1)(k-1)=2c^2+7c+5$, the denominator in (A10). The direct grid proof is retained here because it also explains the fixed-center prediction bound (A9). - + - + +Suppose $q>2c$. If the test using a generator of $F^\times$ and its Lagrange weights rejects with probability $\delta<1/[2(c+2)^2]$, then a formal polynomial of total degree at most $c$ agrees with $f$ outside a set of relative size at most $2\delta$. -Higher-degree labels allow a bit query about a polynomial in a field value. Let $A(Y)\in F[Y]$ have degree at most $r$, and let $L$ be an affine binary label. Choose the field basis $e_1,\ldots,e_t$ supplied by $\rho$, and write $e_ie_j=\sum_k\mu_{ijk}e_k$. The $k$-th coordinate of a product is then $\sum_{i,j}\mu_{ijk}z_iw_j$. Repeated multiplication gives coordinate polynomials of degree at most $s$ for the $s$-th power. Multiplication by a fixed field coefficient is linear, so every coordinate of $A(\rho^{-1}(z))$ has degree at most $r$. Replacing positive powers of each $z_i$ by $z_i$ preserves evaluations on binary points and cannot increase degree. Composing with $L$ therefore gives a squarefree label $\Lambda_{A,L}\in\mathcal B_r$ satisfying +Indeed, apply the preceding robustness result to (A6), with $n=c+1$. Its hypothesis is $$ -\mathcal H_1(A(u))(L)=\mathcal H_r(u)(\Lambda_{A,L}). -\tag{B2} +\delta<\frac{1}{2(c+2)^2}, +\tag{A11} $$ -The statement concerns one field value $u$ and one polynomial $A$; its extension to an oracle is pointwise. In particular, cubic labels suffice to observe $u^3-1$, the expression used to enforce membership in the three allowed colours. +then (A10) holds, because $2(c+1)^2+3(c+1)=2c^2+7c+5<2(c+2)^2$. The exact characterization proves that $g$ is represented by a polynomial $P$ of total degree at most $c$, and (A7) gives -For $A(Y)=\eta Y$ and a homogeneous label $L$, the composed label is homogeneous. If $\eta\neq0$, multiplication by $\eta$ is a linear bijection of $F$, and its dual permutes the homogeneous labels. This permutation is essential when averaging noisy answers with Lagrange weights. Zero weights must be treated separately: a zero summand is known without reading the oracle. The formal source proves the general [composition identity](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/HadamardComposition.lean) and the needed [weighted homogeneous relabelling](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/HadamardWeights.lean). This is the scalar homogeneous case stated in Claim 3.7 of the corrected paper. +$$ +\Delta(f,P)\le2\delta. +\tag{A12} +$$ - +This is the corrected low-degree soundness statement. It needs $q>2c$, not a cubic field-size hypothesis. A downstream closed threshold such as $1/[4(c+2)^2]$ lies strictly below (A11). The full multiplicative generator and the weights are essential parts of the test being proved here; replacing them by a root of order $c+1$ and unit weights changes the equations. See [the paper, Fact 2.7 and Lemma 3.3][paper] and the [proximity theorem][lean-generator]. -### Testing a received Hadamard word + - -The first ingredient is the binary linearity test. For a function $h:V\to\mathbb F_2$, where $V$ is a finite binary vector space, choose uniform independent $x,y$ and check + +### 3. Recovering a specified value + + +Suppose $P$ has total degree at most $c$, $\Delta(f,P)=\eta$, and the nodes in (A6) are distinct and nonzero. To recover $P(u)$, choose a uniform direction $v\in V$ and return $A_f(u,v)$. If all $c+1$ sampled values agree with $P$, interpolation makes the answer $P(u)$. Each point $u+a_i v$ is uniform on $V$, so a union bound gives $$ -h(x+y)=h(x)+h(y). +\Pr_v[A_f(u,v)\ne P(u)]\le(c+1)\eta +\quad\text{for every }u. +\tag{A13} $$ -If its rejection probability is $\epsilon$, some linear functional $\ell:V\to\mathbb F_2$ satisfies $\Delta(h,\ell)\leq\epsilon$. The test is due to Blum, Luby and Rubinfeld [Section 4.2][blr]; the sharp characteristic-two bound follows from Bellare, Coppersmith, Håstad, Kiwi and Sudan [Theorem 1.2 and Section 2][bchks], also cited in Amireddy et al., Appendix B, Theorem B.1. We give that Fourier argument. Choose coordinates for $V$, put $s(x)=(-1)^{h(x)}$, and for a linear functional $a$ put $\chi_a(x)=(-1)^{a(x)}$. A nontrivial character has average zero: translation by a point where it is $-1$ negates its sum. Thus the characters are orthonormal. With +The sampled points are correlated, but the union bound requires no independence. This correction result has no small-distance hypothesis and needs no additional field-size assumption beyond the existence of the distinct nonzero nodes. For an exact polynomial it always succeeds. It uses $c+1$ listed queries. See [the paper, Fact 2.8 and Lemma 3.4][paper] and the [local-correction bound][lean-correction]. + + + + +A second corrector uses an auxiliary line table and may reject. Let $P$ have degree at most $d$, let $\Delta(f,P)=\eta$, and fix a center $u\in V$. For each direction $b\in V$, let $T_b\in F[T]$ be **any** polynomial of degree at most $d$. Choose $b$ uniformly and independently choose $\lambda$ uniformly in $F^\times$. If $$ -\widehat s(a)=\mathbb E_x s(x)\chi_a(x), +T_b(\lambda)=f(u+\lambda b), $$ -orthogonality gives Fourier inversion and Parseval, +output $T_b(0)$; otherwise reject. Then $$ -s(x)=\sum_a\widehat s(a)\chi_a(x),\qquad -\sum_a\widehat s(a)^2=\mathbb E_xs(x)^2=1. +\Pr[\text{accept and output a value different from }P(u)] +\le\eta+\frac{d}{q-1}. +\tag{A14} $$ -Expanding each of the three factors in the acceptance bias and averaging first over $x$ and then over $y$ kills every term except those with the same character in all three positions. Hence +An accepted wrong answer requires either corruption at the tested point, or $$ -1-2\epsilon -=\mathbb E_{x,y}s(x)s(y)s(x+y) -=\sum_a\widehat s(a)^3 -\leq\max_a\widehat s(a)\sum_a\widehat s(a)^2 -=\max_a\widehat s(a). +T_b(0)\ne P(u),\qquad T_b(\lambda)=P(u+\lambda b). $$ -Choose a maximising $a$. Since $\widehat s(a)=1-2\Delta(h,a)$, rearrangement gives the claim. This includes every possible rejection rate; no small-error hypothesis is needed for this intermediate result. See [the formal Walsh argument](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BLR.lean). - - +For each nonzero $\lambda$, the tested point is uniform as $b$ varies, so the first event has probability $\eta$. For each fixed $b$ in the second event, $T_b(T)-P(u+Tb)$ is a nonzero degree-$d$ polynomial because its constant coefficient is nonzero. At most $d$ of the $q-1$ nonzero parameters are roots. Averaging proves (A14). No consistency among the different $T_b$'s was assumed. The bound concerns accepted wrong answers; it does not claim that an arbitrary line table accepts frequently. See the [line-table correction bound][lean-line-correction]. - + -Linearity on the label space is necessary but not sufficient for a Hadamard word to be evaluation at a point: the linear functional must preserve the unit and products. To test these laws reliably on a noisy word, define +### 4. Bivariate agreement -$$ -\operatorname{SC}_h(Q;R)=h(Q+R)-h(R), -$$ + +The point-versus-line theorem below needs a substantial agreement result. We prove the explicit form implemented in the formalization: -with $R$ uniform on the full label space. If $\Delta(h,\ell)\leq\epsilon$ for an additive $\ell$, both arguments $R$ and $Q+R$ are uniform, even for a fixed or adversarially selected $Q$. Outside two error events, their difference equals $\ell(Q)$. Therefore +**Bivariate agreement theorem.** Let $d>0$, $q\ge1000d^3$, and $f:F^2\to F$. For every $y\in F$, let $R_y(X)$ have degree at most $d$; for every $x\in F$, let $C_x(Y)$ have degree at most $d$. Suppose $$ -\Pr_R[\operatorname{SC}_h(Q;R)\neq\ell(Q)]\leq2\epsilon. -\tag{B3} +\Pr_{x,y}[f(x,y)\ne R_y(x)]\le\varepsilon,\qquad +\Pr_{x,y}[f(x,y)\ne C_x(y)]\le\varepsilon, +\qquad\varepsilon\le1/100. +\tag{A15} $$ -The bound remains valid after averaging over any distribution of requests selected before the independent seed $R$. The error events need not be independent. +Then there exists $P\in F[X,Y]$, of degree at most $d$ in **each** variable, such that $\Delta(f,P)\le4\varepsilon$. The approximating rows and columns need not be nearest approximations. Individual degree at most $d$ allows total degree $2d$, which is sufficient for the use below. This is an explicit variant of [ALMSS Theorem 69, in the author-hosted manuscript][almss]. That theorem uses nearest row and column polynomials and unspecified absolute constants. The arbitrary approximants and numerical bounds in (A15) are justified by the proof below, which adapts the construction in [Arora–Safra §5.2, Lemmas 5.2.2 and 5.2.7 and Corollary 5.2.3][arora-safra]. See the [bivariate agreement theorem][lean-bivariate]. -The pinned formal tester chooses independent full labels $R,R'$, an affine degree-one label $L$, and, for each $j=2,\ldots,r$, a label $P_{j-1}$ of degree at most $j-1$. It checks + + + +First, the mean discrepancy between $R_y(x)$ and $C_x(y)$ is at most $2\varepsilon$. Markov's inequality therefore shows that at most $20\varepsilon\le1/5$ of columns have discrepancy greater than $1/10$. Since $q\ge20d$, choose $10d$ distinct good columns, at positions $a_1,\ldots,a_{10d}$. Write their column polynomials as $C_i(Y)$. Thus $$ -\begin{aligned} -h(R+R')&=h(R)+h(R'),\\ -\operatorname{SC}_h(1;R)&=1,\\ -\operatorname{SC}_h(L;R)&=h(L),\\ -\operatorname{SC}_h(LP_{j-1};R) -&=\operatorname{SC}_h(L;R)\operatorname{SC}_h(P_{j-1};R) -\quad(2\leq j\leq r). -\end{aligned} -\tag{B4} +\Pr_y[R_y(a_i)\ne C_i(y)]\le1/10\quad\text{for each }i. +\tag{A16} $$ -Products are squarefree-reduced. Shared answers are reused, so the query list has length $2r+4$. The corrected arXiv v2 algorithm retains only the last multiplication check and uses eight queries; the pinned formal tester retains the earlier degree checks as well. Its soundness proof needs only the top-degree check, so the extra checks do not weaken soundness. At $r=3$, the formal query count is ten. - - - - +Let $e(y)$ count the discrepant entries among these $10d$ columns. Its mean is at most $d$. Since $e(y)$ is an integer, the fraction of rows with $e(y)>2d$ is at most $d/(2d+1)<1/2$. Let $S$ be the rows with $e(y)\le2d$; then $|S|\ge q/2$. See the [column-selection argument][lean-column-selection]. -Suppose the full test rejects with probability at most $\epsilon<1/28$. Each individual check has rejection at most $\epsilon$, because failure of that check implies failure of the conjunction. The linearity bound supplies one linear functional $\ell$ with $\Delta(h,\ell)\leq\epsilon$. + -The corrected unit test and (B3) force $\ell(1)=1$. Otherwise the correct target value and the required answer differ on every seed, whereas their discrepancy is at most $2\epsilon+\epsilon<1$. + +We seek a rectangle on which the chosen row and column polynomials agree exactly: $d+1$ columns and sufficiently many rows. The columns will determine a polynomial of degree at most $d$ in the horizontal coordinate; agreement on many rows will identify most row polynomials with its restrictions. The error locator below removes the inconsistent entries while leaving such a rectangle. -For $r\ge2$, use the top-degree product check and replace its three corrected answers by their $\ell$-values. The three replacements cost at most $6\epsilon$, and test failure costs at most another $\epsilon$. Thus +To describe the inconsistent entries algebraically, we use the error-locator construction of [Arora–Safra, Lemma 5.2.5 and its polynomial extension in Lemma 5.2.7][arora-safra]. Seek bivariate polynomials $E,N$ satisfying $$ -\Pr_{L,P}\bigl[\ell(LP)\neq\ell(L)\ell(P)\bigr] -\leq7\epsilon<\frac14, -\tag{B5} +\deg_X E\le2d,\qquad\deg_X N\le3d,\qquad +N(a_i,Y)=C_i(Y)E(a_i,Y)\quad(1\le i\le10d). +\tag{A17} $$ -where $L\in\mathcal B_1$, $P\in\mathcal B_{r-1}$. The defect $B(L,P)=\ell(LP)-\ell(L)\ell(P)$ is bilinear. A nonzero bilinear binary form is nonzero on at least a quarter of its domain: at least half the first arguments induce a nonzero linear functional of the second argument, and every such functional is nonzero on exactly half the second arguments. Inequality (B5) therefore forces the defect to vanish identically. +There are $n=5d+2$ unknown coefficient polynomials in $Y$: $2d+1$ coefficients for $E$, and $3d+1$ for $N$. The equations form a $10d$-by-$n$ matrix with entries in $F[Y]$, each of degree at most $d$. -Set $z_i=\ell(Z_i)$. For a squarefree monomial, repeatedly separate one variable from the remaining product. The exact product law and $\ell(1)=1$ give +For every $y\in S$, this specialized matrix has a nonzero kernel. Indeed, take $E_y(X)$ to be the product of $X-a_i$ over the discrepant positions, and put $N_y=E_yR_y$. The product has at most $2d$ factors and is nonzero. At a discrepant position both sides of (A17) vanish; at every other position $R_y(a_i)=C_i(y)$. Thus every $n$-by-$n$ minor of the matrix vanishes at all $y\in S$. Each such determinant has degree at most $nd=(5d+2)d$. The field bound gives $$ -\ell\Bigl(\prod_{i\in S}Z_i\Bigr)=\prod_{i\in S}z_i. +|S|\ge q/2>(5d+2)d, $$ -Linearity then gives $\ell(R)=R(z)$ for every label. For $r=1$, unit preservation and linearity already give this conclusion without a product check. Thus $h$ is $\epsilon$-close to one evaluation word $\mathcal H_r(\rho^{-1}z)$. +so the root bound makes every maximal minor the zero polynomial. -The same point also controls affine degree-one labels. Their consistency check compares $h(L)$ with a corrected answer; (B3) bounds the latter's error relative to $\ell(L)$. A union bound gives +The following cofactor construction supplies a nonzero polynomial kernel with a degree bound. Choose a largest nonzero $k$-by-$k$ minor. The empty minor has determinant one, so such a $k$ exists, and $k\le n-1$. Append one column outside its columns. Form a vector supported on these $k+1$ columns whose coordinates are the alternating $k$-by-$k$ cofactors. Its coordinate at the appended column is the chosen nonzero determinant. For any row of the original matrix, the row's product with this vector is the determinant obtained by adjoining that row to the chosen $k$ rows. This is a $(k+1)$-minor and vanishes by maximality. Hence the vector is a nonzero kernel vector. Every coordinate is a determinant with $k$ factors of degree at most $d$, so has degree at most $kd\le(n-1)d$. + +Assembling these coordinates as coefficients of $E,N$ proves (A17) with $$ -\Delta\bigl(h|_{\mathcal B_1},\mathcal H_1(\rho^{-1}z)\bigr) -\leq3\epsilon. -\tag{B6} +\deg_Y E,\deg_Y N\le K:=(5d+1)d. +\tag{A18} $$ -This argument is [Hadamard test soundness](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/HadamardSoundness.lean); the quarter-distance step is in [the bilinear characterization](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BilinearHadamard.lean). It reconstructs the formal variant of the paper's Lemma 3.10. - - +Also $E\ne0$. If $E=0$, then $N(a_i,Y)=0$ for $10d>3d$ distinct values $a_i$. Regard $N$ as a polynomial in $X$ over the integral domain $F[Y]$; its root bound gives $N=0$, contradicting the nonzero kernel vector. See the [bounded polynomial-kernel construction][lean-matrix] and the [assembled error-locator certificate][lean-locator]. - + -We need this conclusion for a table whose individual rows can be arbitrarily bad. If a row has rejection $e<1/28$, choose the point just constructed. Its full-label error is at most $e$, and its homogeneous-label error is at most $2\cdot3e=6e$. If $e\geq1/28$, choose any point; each distance is at most $1\leq28e$. Consequently every row admits one decoded field value for which both distances are at most $28e$. Choose these values simultaneously and average. If $\overline e$ is average row rejection, the resulting field function $g$ satisfies + +At most $2d$ of the $10d$ selected columns have $E(a_i,Y)=0$ as a formal polynomial, again by the root bound over $F[Y]$. Choose $d+1$ columns $J$ on which this polynomial is nonzero. For $y\in S$, the polynomial $$ -\Delta_{\rm full}(h,\mathcal H_r(g))\leq28\overline e, -\qquad -\Delta_{\rm hom}(h,\mathcal H_r(g))\leq28\overline e. -\tag{B7} +N(X,y)-E(X,y)R_y(X) $$ -The same $g$ occurs in both conclusions. This is an existence argument used in soundness analysis; it does not provide an efficient decoding algorithm. The formal [row-decoding theorem](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/HadamardRowDecoding.lean) deliberately has no global small-error premise. +has degree at most $3d$ and vanishes at all uncorrupted selected entries, of which there are at least $8d>3d$. It is therefore identically zero. At any selected $i\in J$, equations (A17) now imply - +$$ +E(a_i,y)\bigl(C_i(y)-R_y(a_i)\bigr)=0. +$$ -### A binary version of the weighted low-degree test +Each nonzero polynomial $E(a_i,Y)$ has at most $K$ roots. Removing these roots for all $d+1$ indices in $J$ removes at most $(d+1)K\le q/10$ rows. At least $q/2-q/10=2q/5$ rows remain. Call this set $B$. All entries of the rectangle $J\times B$ agree between $R$ and $C$. See the [clean-rectangle construction][lean-rectangle]. - + -Take a generator $\theta$ of $F^\times$, let $a_i=\theta^{i+1}$ for $0\leq i\leq c$, and assume $q>2c$. These nodes are distinct and nonzero. Their Lagrange weights for evaluation at zero are + +Interpolate the $d+1$ columns in $J$: $$ -\eta_i=\prod_{j\ne i}\frac{-a_j}{a_i-a_j}. +P(X,Y)=\sum_{i\in J}\ell_i(X)C_i(Y). $$ -Each weight is nonzero. Interpolating a polynomial of degree at most $c$ at the $c+1$ nodes and evaluating at zero gives the field-valued equation +It has individual degrees at most $d$. For every $y\in B$, $P(X,y)$ and $R_y(X)$ agree at all $d+1$ selected positions, so they are equal as polynomials. Consider any of the original $10d$ columns $a_i$. By (A16), at most $q/10$ rows disagree between its column polynomial and the row values. Thus $P(a_i,Y)$ and $C_i(Y)$ agree at at least $|B|-q/10\ge3q/10>d$ positions. Their degree is at most $d$, so they are identical. + +If a row polynomial $R_y$ differs from $P(\cdot,y)$, the two agree at at most $d$ of the $10d$ selected points. Since $P(a_i,y)=C_i(y)$ at every selected column, this row has $e(y)\ge9d$. But the mean of $e(y)$ is at most $d$. Hence at most $1/9$ of the formal rows differ, and therefore $$ -g(u)=\sum_{i=0}^c\eta_i g(u+a_i v). -\tag{B8} +\Delta\bigl((x,y)\mapsto R_y(x),P\bigr)\le1/9, +\qquad \Delta(f,P)\le\varepsilon+1/9. +\tag{A19} $$ -For a received binary table $h(x,L)$, choose a homogeneous label $L$ and check the binary observation of (B8): query the centre with $L$, and the $i$-th other point with the homogeneous label $L\circ(\eta_i\cdot)$. At most $c+2$ bits are read. On an exact encoding $\mathcal H_r(g)$, (B1) says that the binary check rejects with exactly half the rejection probability of (B8). +The distinction between the fraction of differing formal rows and their evaluation distance is useful: the former bounds the latter without any additional root estimate. See the [agreement argument from the rectangle][lean-coarse]. -For a corrupted encoding, suppose $\Delta_{\rm hom}(h,\mathcal H_r(g))=\tau$. Each nonzero weighted label is a permutation of uniform labels; each sampled point $u+a_iv$, and the centre $u$, is uniform. Replacing the at most $c+2$ answers therefore changes the binary decision on at most $(c+2)\tau$ of the seeds. If the received binary check has rejection $\beta$, then + + + +To sharpen (A19), put $\tau=d/q$ and $\rho=\Delta(f,P)$. A simple transverse estimate will be used twice. Given two families of univariate degree-$d$ polynomials $A_z,B_z$, let $\alpha$ be the fraction of indices $z$ for which they differ as polynomials. Their mean evaluation distance is at least $\alpha(1-\tau)\ge\alpha-\tau$, so $$ -\Pr[(\mathrm{B8})\text{ fails}] -\leq2\beta+2(c+2)\tau. -\tag{B9} +\alpha\le \mathbb E_z\Delta(A_z,B_z)+\tau. +\tag{A20} $$ -The actual inner tester flips a fair coin between a rowwise Hadamard test and this weighted check. If its rejection is $\kappa$, each branch rejects with probability at most $2\kappa$. Applying (B7) to the Hadamard branch gives a field function $g$ with both binary distances at most $56\kappa$. Equation (B9) then gives +At any fixed evaluation parameter, the disagreement fraction is at most $\alpha$. Apply this to the column polynomials $C_x$ and $P(x,\cdot)$. Their mean evaluation distance is at most $\varepsilon+\rho$, so at every $y$, $$ -\Pr[(\mathrm{B8})\text{ fails}] -\leq \bigl(112(c+2)+4\bigr)\kappa. -\tag{B10} +\Pr_x[C_x(y)\ne P(x,y)]\le\varepsilon+\rho+\tau. $$ -The preceding field-valued low-degree theorem applies when $q>2c$, the nodes come from a full multiplicative generator, and this last rejection is below its threshold. The formal argument uses the sufficient threshold +If $R_y\ne P(\cdot,y)$, polynomial separation gives $$ -\bigl(112(c+2)+4\bigr)\kappa -\leq\frac{1}{4(c+2)^2}, +\Pr_x[R_y(x)\ne C_x(y)] +\ge1-\tau-(\varepsilon+\rho+\tau). $$ -which is strictly below $1/[2(c+2)^2]$. It gives a polynomial $Q$ of total degree at most $c$ with field distance at most twice (B10). By (B1), encoding that field distance costs one half. A triangle inequality therefore bounds both binary distances to $\mathcal H_r(Q)$ by +Since $\rho\le\varepsilon+1/9$, $\varepsilon\le1/100$, and $q\ge20d$, this lower bound is at least $2/3$. The global row/column discrepancy is at most $2\varepsilon$, so at most $3\varepsilon$ of formal rows differ from $P$. Adding the initial row error gives $\Delta(f,P)\le\varepsilon+3\varepsilon=4\varepsilon$, as asserted. See the [sharpening of coarse agreement][lean-boost]. + + + +### 5. Point-versus-line soundness + + +A degree-$d$ line table assigns a polynomial $T_{u,v}\in F[T]$ of degree at most $d$ to each ordered pair $u,v\in V$. It need not assign compatible polynomials to different parameterizations of the same geometric line. Zero directions are allowed. Define $$ -\bigl(112(c+2)+60\bigr)\kappa. +\delta=\Pr_{u,v\in V,\ t\in F} +[f(u+tv)\ne T_{u,v}(t)]. +\tag{A21} $$ -For a row above this threshold, use the zero polynomial and the universal distance bound one. Both cases are covered by +**Point-versus-line theorem.** If $$ -K(c)=4(c+2)^2\bigl(112(c+2)+60\bigr): -\quad -\Delta_{\rm full}(h,\mathcal H_r(Q)),\ -\Delta_{\rm hom}(h,\mathcal H_r(Q)) -\leq K(c)\kappa. -\tag{B11} +q\ge10^6d^3,\qquad\delta\le1/(4\cdot10^6), +\tag{A22} $$ -Indeed, in the high-rejection case, -$K(c)\kappa>[112(c+2)+60]/[112(c+2)+4]>1$. -This proves a uniform row-decoding statement with no smallness assumption. The decoded polynomial is again the same in both conclusions. The exact proof is [binary polynomial row decoding](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryLocalRowDecoding.lean). - - +then there is a polynomial $P$ of total degree at most $d$ with $\Delta(f,P)\le2\delta$. The result covers $d=0$ and $m=0$. These are the explicit sufficient constants in the source, rather than optimized values. Its all-field parameter distribution and factor-two conclusion should not be conflated with the paper's formulation using nonzero parameters and a factor-four conclusion. See the [test definition][lean-point-test] and the [complete soundness theorem][lean-point-soundness]. - + -The weighted local corrector uses a node table $\alpha_i=\zeta^{i+1}$, required only to have distinct entries and $\zeta\ne0$. The formal theorem calls this condition `GoodNodes`. It follows from the generator hypothesis above, but the tester's generator $\theta$ and the corrector's parameter $\zeta$ need not be equal. Let $\omega_i=\prod_{j\ne i}(-\alpha_j)/(\alpha_i-\alpha_j)$. To recover the homogeneous observation of $Q(u)$, the corrector returns + +Replace each $T_{u,v}$ by a nearest degree-$d$ polynomial $L_{u,v}$ to the received line $t\mapsto f(u+tv)$, choosing arbitrarily among ties. There are finitely many candidate polynomials, so a minimum exists. This can only decrease rejection; denote the new rejection by $\delta'\le\delta$. For every $x\in V$, define predictions and a corrected word by $$ -\sum_{i=0}^c -h\bigl(u+\alpha_i v,\ L\circ(\omega_i\cdot)\bigr). -\tag{B12} +\pi_x(v,t)=L_{x-tv,v}(t),\qquad +g(x)=\mathop{\mathrm{plurality}}_{v,t}\pi_x(v,t). +\tag{A23} $$ -On an honest degree-$c$ polynomial this is exactly $L(Q(u))$, by interpolation. Suppose the received table differs from $\mathcal H_1(Q)$ by homogeneous distance $\tau$. For fixed $u$, random $v$, and random homogeneous $L$, each queried point-label pair is uniform: $\alpha_i\ne0$ makes $v\mapsto u+\alpha_iv$ bijective, and $\omega_i\ne0$ makes the label map bijective. A wrong sum requires at least one wrong answer, so +The change of variables $(x,v,t)\leftrightarrow(u=x-tv,v,t)$ is a bijection. The plurality argument of (A7) therefore gives $$ -\Pr[(\mathrm{B12})\neq L(Q(u))]\leq(c+1)\tau. -\tag{B13} +\Delta(f,g)\le2\delta'. +\tag{A24} $$ -The guarantee is averaged over the requested homogeneous label as well as the direction. We do not claim this bound for every fixed label of an arbitrary received table. This is [binary weighted local correction](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryStandardLocalCorrection.lean). +We must show that $g$ is an actual polynomial of the required total degree. See the [all-parameter correction definition][lean-point-correction]. - + -### Testing a high-degree outer polynomial + +First obtain an error bound for a **fixed** line parameter $t$. Let - +$$ +e(u,v)=\Pr_s[f(u+sv)\ne L_{u,v}(s)]. +$$ -Let the primary table be $f:F^k\times\mathcal B_r\to\mathbb F_2$. For every oriented line $x=u+zv$, an auxiliary table is intended to encode the set-multilinear image of the univariate restriction $P(u+Yv)$, using degree-one Hadamard labels. Use generator nodes for its inner test and `GoodNodes` for its corrector, as above. Choose uniform $u,v\in F^k$ and $z\in F$, a homogeneous label $L$, an inner correction direction, and independent seeds for the two tests. The formal verifier: +Its mean is $\delta'$. If $e(u,v) +$$ +\Pr_{u,v}[f(u+tv)\ne L_{u,v}(t)]\le4\delta' +\quad\text{for every }t\in F. +\tag{A25} +$$ - +No global convention for choosing tied minimizers is required. See the [fixed-parameter estimate][lean-parameter]. -Let the complete tester's rejection probability be $\kappa$. Its Hadamard marginal, inner-test marginal, and comparison error are individually at most $\kappa$. From (B7), choose one primary field function $g$, close to $f$ by at most $28\kappa$ on both relevant label domains. Apply (B11) to every auxiliary row, obtaining inner polynomials $Q_{u,v}$ of degree at most $c$. Their average homogeneous distance is at most $K(c)\kappa$. Define actual univariate line polynomials + + + +We need a consequence of bivariate agreement at one crossing. Assume $d>0$ and $q\ge1000d^3$. Suppose a received grid has degree-$d$ approximating rows and columns with global errors at most $\varepsilon\le1/100$. Suppose also that, at the selected crossing $(x_0,y_0)$, its received row is within $\varepsilon$ of the transverse column values, and its received column is within $\varepsilon$ of the transverse row values. Assume $$ -T_{u,v}=\operatorname{Dec}(Q_{u,v}),\qquad -\deg T_{u,v}\leq D:=c b^c. +6\varepsilon+2d/q<1/2. +\tag{A26} $$ -There are three discrepancies between the binary observations of $T_{u,v}(z)$ and $g(u+zv)$: +If the selected row and column polynomials are nearest approximations, their values at the crossing agree. To prove this, bivariate agreement supplies $P$ within $4\varepsilon$ of the received grid. Each polynomial family is then within $5\varepsilon$ of $P$ in mean evaluation distance. Formula (A20) shows that its transverse distance at every fixed parameter is at most $5\varepsilon+d/q$. The received selected row is therefore within $6\varepsilon+d/q$ of the corresponding row of $P$. Its nearest polynomial is no farther away from the received row, so it lies within $12\varepsilon+2d/q<1-d/q$ of that polynomial row of $P$, by (A26). Polynomial separation forces identity. The same holds for the column, proving agreement at the crossing. -- replacing the locally corrected auxiliary answer by $L(T_{u,v}(z))$, costing at most $(c+1)K(c)\kappa$ by (B13); -- the comparison checked by the tester, costing at most $\kappa$; -- replacing the received primary answer by $L(g(u+zv))$, costing at most $28\kappa$. +One variant will be needed: the selected row may be a candidate rather than a nearest approximation, provided its own received-row error is at most $\varepsilon$. Its distance from the row of $P$ is then at most $7\varepsilon+d/q<1-d/q$, again by (A26), so the same conclusion holds. The selected column remains a nearest approximation. Thus four small errors suffice when both are nearest, and five suffice in this candidate-row version. See the [crossing-consistency lemma][lean-crossing] and the [candidate-row variant][lean-candidate]. -The last bound uses uniformity of $u+zv$ when $u$ is uniform, even for $z=0$. Combining the three discrepancies and applying the exact half-distance identity (B1) gives + + + +For the positive-degree case of (A22), fix a center $u\in V$ and parameter $t\in F$. Choose $0<\varepsilon\le1/100$ satisfying (A26). Choose independent uniform $v,w\in V$ and $s\in F$, and inspect the grid $$ -\Pr_{u,v,z}[T_{u,v}(z)\neq g(u+zv)] -\leq E(c)\kappa, -\quad E(c)=2\bigl((c+1)K(c)+29\bigr). -\tag{B14} +M(y,z)=f\bigl(u+yv+(z-s)w\bigr). +\tag{A27} $$ -Now use the field-valued point-versus-line theorem proved in the algebraic part. Its explicit formal hypotheses are +Here a row fixes $y$ and varies $z$; a column fixes $z$ and varies $y$. Use the nearest line polynomials $$ -q\geq10^6D^3,\qquad E(c)\kappa\leq\frac1{4\cdot10^6}. +R_y(z)=L_{u+yv-sw,w}(z),\qquad +C_z(y)=L_{u+(z-s)w,v}(y). $$ -It supplies a formal polynomial $P\in F[X_1,\ldots,X_k]$ of total degree at most $D$ for which $\Delta(g,P)\leq2E(c)\kappa$. Encoding halves this distance. A final triangle inequality proves +At crossing $(t,s)$, the column prediction is $C_s(t)=L_{u,v}(t)$, and the row prediction is $$ -\Delta_{\rm full}(f,\mathcal H_r(P)),\ -\Delta_{\rm hom}(f,\mathcal H_r(P)) -\leq S(c)\kappa, -\qquad S(c)=28+E(c). -\tag{B15} +L_{u+tv-sw,w}(s)=\pi_{u+tv}(w,s). $$ -This is the formal [encoded-line low-degree theorem](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/EncodedLineLowDegreeSoundness.lean). No closeness of the auxiliary rows is assumed: it was proved from their actual rejection rates. The second conclusion concerns homogeneous degree-one labels. The corrected paper's Theorem 4.1 states a bound for all affine degree-one labels; that stronger conclusion is not claimed here. The homogeneous bound is enough for the final difference check, while a certificate table whose full label space already has degree one receives its affine bound from the first conclusion. - - +The four discrepancies needed for crossing consistency are -### Correcting an outer value at a prescribed point +$$ +\begin{aligned} +e_{\rm row}&=\Pr_{y,z}[M(y,z)\ne R_y(z)],& +e_{\rm col}&=\Pr_{y,z}[M(y,z)\ne C_z(y)],\\ +e_{\rm cross,row}&=\Pr_z[M(t,z)\ne C_z(t)],& +e_{\rm cross,col}&=\Pr_y[M(y,s)\ne R_y(s)]. +\end{aligned} +$$ - +The last two compare a received slice with the *transverse* polynomial predictions. Each quantity depends on the sampled $v,w,s$; we now bound its mean over those choices. A random affine expression $a+\lambda b$ is uniform in $V$ when $b$ is uniform and $\lambda\ne0$. In the global row error of (A27), the row center contains the coefficient $y$ of $v$; all $y\ne0$ therefore give the global rejection distribution, while the exceptional slice $y=0$ contributes at most $1/q$. In the global column error, the analogous exceptional slice is $z=s$. The local error along the selected column has the same $y=0$ exception. These three means are at most $\delta'+1/q$. For the local error along the selected row, $z\ne s$ makes the center uniform, but the evaluation parameter is the fixed $t$; (A25) bounds this contribution by $4\delta'$, and the exceptional slice contributes at most $1/q$. Thus all four means are at most $4\delta'+1/q$. -Fix a target $a\in F^k$. A point oracle $f$ has degree-one labels, and an auxiliary table is supplied for each line through $a$. Choose a uniform direction $v\in F^k$, a nonzero uniform parameter $z\in F^\times$, a uniform homogeneous label $L$, an inner correction direction, and an independent inner-test seed. Run the inner test on the line's auxiliary row. If it fails, reject. Otherwise correct that row at $\Phi(z)$ and compare with $f(a+zv,L)$. If the comparison fails, reject. If both checks pass, return the correction at $\Phi(0)$, with the same inner correction direction and label. +Markov's inequality and a union bound show that the probability one of these four errors exceeds $\varepsilon$ is at most $4(4\delta'+1/q)/\varepsilon$. On the complementary event the predictions agree by the crossing lemma. For each $v$, plurality minimizes the probability of disagreeing with the independent prediction $\pi_{u+tv}(w,s)$; comparing it with $L_{u,v}(t)$ costs at most a factor two, exactly as in (A7). Hence -Thus the output is either one bit or rejection. The procedure uses at most $3c+9$ queries. With honest point and line tables for a polynomial of degree strictly below $b^c$, it returns $L(P(a))$ for every random seed. See [the local-correction procedure](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryLocalCorrection.lean). +$$ +\Pr_v[L_{u,v}(t)\ne g(u+tv)]\le +\gamma:=\frac{8(4\delta'+1/q)}{\varepsilon} +\quad\text{for every }u,t. +\tag{A28} +$$ - +The endpoint $u+tv$ varies here. This is stronger than merely bounding the average error at a fixed point and is precisely what is needed next. See the [mixed-plane sampling estimates][lean-mixed] and the [endpoint-consistency bound][lean-endpoint]. - + -Let $P$ have total degree at most $D$, with $D\geq cb^c$, and suppose $f$ is within homogeneous distance $\delta$ of $\mathcal H_1(P)$. Assume $q>2c$, generator nodes for the inner test, and `GoodNodes` for the corrector. Let $R_a$ be the probability that the actual procedure rejects at target $a$. Define + +Fix a target line $y\mapsto x+yh$, and choose once and for all a nearest degree-$d$ polynomial $Q(y)$ to $g$ on this line. We prove that it represents $g$ there **exactly**. Fix a parameter $y_0$. For independent uniform $v,w\in V$, use the grid $$ -C(c)=2+2(c+1)K(c). +M(y,z)= +\begin{cases} +g(x+yh),&z=0,\\ +f\bigl(x+yh+z(v+yw)\bigr),&z\ne0. +\end{cases} +\tag{A29} $$ -Then the probability of either rejection or a wrong returned bit is at most +The zero column is the target line in the corrected function. Each nonzero column samples an oriented line with uniform center and direction. The rows join these random comparisons to the target, allowing us to prove that the already chosen $Q$ agrees with every target value. The expression for nonzero $z$ is affine in either variable when the other is fixed. Give row $y$ the candidate polynomial $$ -C(c)R_a+\delta+\frac{D}{2(q-1)}. -\tag{B16} +R_y(z)=L_{x+yh,\,v+yw}(z). $$ -To prove this, decode each auxiliary row to $Q_v$ using (B11), and put $T_v=\operatorname{Dec}(Q_v)$. Since failure of the inner test forces rejection, the average auxiliary decoding error is at most $K(c)R_a$. Let $e=(c+1)K(c)R_a$. Equation (B13) bounds by $e$ each replacement of a corrected answer by $L(T_v(z))$, at either $z$ or zero. The comparison check then gives +For $z\ne0$, give column $z$ its nearest polynomial $$ -\Pr[L(T_v(z))\neq f(a+zv,L)]\leq e+R_a. -\tag{B17} +C_z(y)=L_{x+zv,\,h+zw}(y), $$ -We next relate the decoded line's origin to its random nonzero point. If $T_v(0)\neq P(a)$, the polynomial -$T_v(Y)-P(a+Yv)$ is nonzero and has degree at most $D$. It has at most $D$ roots in $F^\times$. Therefore, averaging first over $v,z$ and then over the binary label, - -$$ -\Pr_{v,L}[L(T_v(0))\neq L(P(a))] -\leq -\Pr_{v,z,L}[L(T_v(z))\neq L(P(a+zv))] -+\frac{D}{2(q-1)}. -\tag{B18} -$$ +and put $C_0=Q$. By its choice, $Q$ is a nearest approximation to the modified zero column. The other row candidates need not remain nearest after this modification, which is why the five-error crossing lemma was proved. -The factor one half again comes from the exact distance of two distinct field messages under homogeneous labels. For each fixed nonzero $z$, the map $v\mapsto a+zv$ is a bijection, so replacing the received primary bit in (B17) by the correct bit costs at most $\delta$. Combining (B17) and (B18) bounds the decoded origin's error by $e+R_a+\delta+D/[2(q-1)]$. Replacing its bit by the actual corrected origin costs another $e$, and accounting for rejection costs another $R_a$. This is (B16). +Put $\eta=\Delta(f,g)\le2\delta'$, and $\ell=4\delta'$, the bound in (A25). The five errors at crossing $(y_0,0)$ have the following mean bounds over $v,w$: -The formal [local-correction soundness theorem](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryLocalCorrectionSoundness.lean) has no smallness assumption on $R_a$, no closeness hypothesis on the auxiliary table, and no claim that rejection is itself small. If only full affine-label distance $\delta$ is known, replace the $\delta$ in (B16) by $2\delta$. The theorem averages over the label: it does not promise reliability for each prescribed label of a corrupted oracle. +| Error | Mean upper bound | +|---|---:| +| global row error | $\gamma+\eta$ | +| global column error | $\delta'+1/q$ | +| received selected row versus column values | $\ell+1/q$ | +| received zero column versus row values | $\gamma$ | +| selected row candidate's own error | $\gamma+\eta$ | - +Here are the sampling details. For fixed $y$, $v+yw$ is a uniform direction. Equation (A28) bounds disagreement of its line polynomial with $g$ at each parameter by $\gamma$; at nonzero parameters the sampled point is uniform, adding at most $\eta$ for replacing $g$ by $f$. At parameter zero the received value already is $g$. This proves the first and fifth entries. For a fixed $z\ne0$, the pair $(x+zv,h+zw)$ is uniform on $V^2$, so the mean column error is $\delta'$; discard the exceptional zero column at cost $1/q$. For the third entry, the same uniform pair is evaluated at fixed $y_0$, so (A25) gives $\ell$ off the zero column. For the fourth entry, apply (A28) with parameter zero to each row center. These arguments use invertible affine maps; they do not assume independence among all entries of a grid. See the [ruled-surface sampling estimates][lean-ruled-sampling]. -### Checking that a polynomial vanishes on a grid +Let - +$$ +B=2(\gamma+\eta)+\delta'+\ell+\gamma+2/q. +\tag{A30} +$$ -Let $H\subset F$ be nonempty, let $h=|H|$, and put $Z_H(Y)=\prod_{a\in H}(Y-a)$. The algebraic part established that $P$ vanishes on $H^k$ exactly when there is a polynomial certificate $M(X,Y)$, with $k$ coordinates of each kind, such that +Markov and the union bound show that one of the five errors exceeds $\varepsilon$ with probability at most $B/\varepsilon$. Otherwise the crossing lemma gives $R_{y_0}(0)=Q(y_0)$. Separately, (A28) gives $$ -M(X,0)=0,\qquad M(X,Z_H(X))=P(X), -\tag{B19} +\Pr[R_{y_0}(0)\ne g(x+y_0h)]\le\gamma. $$ -where $Z_H$ is applied coordinatewise. For the honest certificate, $\deg M\leq\deg P$. For the reverse implication no polynomial division is needed: at $x\in H^k$, the second argument is zero, so the two identities give $P(x)=0$. +If $B/\varepsilon+\gamma<1$, some seed satisfies both equalities. Their right sides are constants, so $Q(y_0)=g(x+y_0h)$. This holds for each $y_0$, with the same previously chosen $Q$; hence the entire target line has degree at most $d$. Since the line was arbitrary, the exact-line characterization makes $g$ a polynomial of total degree at most $d$. See the [ruled-surface rigidity argument][lean-ruled]. -Suppose both $P$ and an arbitrary proposed certificate $M$ have degree at most $D$, but $P$ does not vanish on the grid. At least one residual + + + +We now verify the numerical bounds required by the crossing argument. For $d>0$, (A22) gives $q\ge10^6$ and $q\ge1000d^3$. Take $\varepsilon=1/100$. Then $$ -M(X,0),\qquad M(X,Z_H(X))-P(X) +\gamma\le0.0016,\qquad +\eta\le0.0000005,\qquad +\ell\le0.000001. $$ -is a nonzero polynomial. Their degrees are at most $D$ and $Dh$, respectively. The latter bound uses $h\geq1$. The polynomial distance bound therefore shows that the field test checking both residuals at a uniform point rejects with probability at least $1-Dh/q$. - -Observe both residuals with the same random homogeneous label. Whenever at least one field residual is nonzero, the binary pair is nonzero with probability at least one half: one selected nonzero residual alone already has that probability. Hence the ideal binary test rejects with probability at least +Equation (A30) gives $B\le0.00480425$, and therefore $$ -\frac{1-Dh/q}{2}. -\tag{B20} +B/\varepsilon+\gamma\le0.482025<1. $$ -The two residuals need not yield independent binary observations. This proof uses only a lower bound for their union. The field argument is [the algebraic grid check](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ZeroOnGridCheck.lean). - - +Also $d/q\le10^{-6}$, so $6\varepsilon+2d/q<1/2$; all uses of the crossing lemma are valid. The bound $q>2d$ needed for the exact-line characterization follows as well. We have constructed $g=P$, and (A24) finishes the estimate $\Delta(f,P)\le2\delta'\le2\delta$. See the [explicit constants][lean-point-constants]. - + -The received certificate is only close to $M$ on the full domain. Directly reading it at $(x,0)$ or $(x,Z_H(x))$ would be unjustified: these points lie in special subsets that could contain all its errors. The actual ZERO test therefore uses the outer local corrector at each of these two points. It reads the received primary bit $p(x,L)$ once, corrects the certificate at $(x,0)$ and requires zero, then corrects it at $(x,Z_H(x))$ and requires $p(x,L)$. It rejects every abstention. The two calls share $x,L$, but use independent remaining seeds. Its query bound is + +For $d=0$ there is a shorter proof requiring no large-field hypothesis. Every table polynomial is a constant $b_{u,v}$. Both $f(u+tv)$ and $f(u+(t+1)v)$ disagree with this constant with mean probability $\delta$; translation $t\mapsto t+1$ preserves the sampling distribution. Thus the mean disagreement between these two function values is at most $2\delta$. For every fixed $t$, the map $$ -1+2(3c+9)=6c+19. +(u,v)\longmapsto(u+tv,\ u+(t+1)v) $$ -For perfect completeness, take the primary table to be exactly $\mathcal H_1(P)$, the certificate table to be exactly $\mathcal H_1(M)$, and all auxiliary line tables to be the honest encodings of the corresponding restrictions of $M$. If $\deg M + - +### Source correspondence and scope -Let $\delta_P$ and $\delta_M$ bound homogeneous distance of the received primary and certificate tables from $\mathcal H_1(P)$ and $\mathcal H_1(M)$, respectively. Let $\kappa$ be actual ZERO rejection. Assume $D\geq cb^c$, $q>2c$, generator nodes for the inner test, and `GoodNodes` for the corrector. As in (B20), $P$ does not vanish on the grid, and both $P$ and $M$ have degree at most $D$. At either requested certificate point, its corrector's rejection event is contained in ZERO rejection. Averaging (B16) over $x$ therefore bounds each call's failure by + +The short-test proof and the point-versus-line proof are separate components. The former uses only $q>2c$ and a weighted affine-constraint argument. The latter uses the bivariate agreement construction and explicit cubic field-size constants. The local correctors then consume proximity to a polynomial; they do not supply the polynomial's existence. Keeping these implications separate prevents a correction guarantee from being used as an unproved testing theorem. -$$ -C(c)\kappa+\delta_M+\frac{D}{2(q-1)}. -$$ +The point-versus-line argument follows the sequence in [ALMSS Appendix A][almss]: plurality correction (Lemma 66), bivariate agreement and crossing consistency (Theorem 69 and Corollary 70), then consistency on randomly sampled surfaces (Lemmas 71–73). The fixed-parameter estimate above handles arbitrary choices among nearest-line ties, and the candidate-row crossing variant handles the modified zero column in (A29). These steps give the stated whole-field test and explicit constants. -Couple the ideal and received tests by using the same outer point and label. If their verdicts differ, then either the primary bit is wrong or one of the two certificate calls fails to supply the ideal bit. The union bound, followed by (B20), gives the exact formal inequality + -$$ -\frac{1-Dh/q}{2} -\leq (1+2C(c))\kappa+\delta_P+2\delta_M+\frac{D}{q-1}. -\tag{B21} -$$ +[paper]: https://arxiv.org/abs/2608.17429v2 +[paper-v1]: https://arxiv.org/abs/2608.17429v1 +[almss]: https://people.seas.harvard.edu/~madhusudan/papers/1992/almss-journ.pdf +[arora-safra]: https://www.cs.umd.edu/~gasarch/TOPICS/pcp/AS.pdf +[lean-distance]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PolynomialDistance.lean +[lean-interpolation]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/GridInterpolation.lean +[lean-grid]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/GridVanishing.lean +[lean-certificate]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/VanishingCertificate.lean +[lean-lines]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PolynomialLineCharacterization.lean +[lean-generator]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/GeneratorLowDegreeTest.lean +[lean-weighted]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/WeightedConstraintSoundness.lean +[lean-correction]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/StandardLocalCorrection.lean +[lean-line-correction]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/LineTableLocalCorrection.lean +[lean-bivariate]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BivariateAgreement.lean +[lean-column-selection]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BivariateColumnSelection.lean +[lean-matrix]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PolynomialMatrixKernel.lean +[lean-locator]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BerlekampWelchCertificate.lean +[lean-rectangle]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BivariateCleanRectangle.lean +[lean-coarse]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BivariateAgreementFromRectangle.lean +[lean-boost]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BivariateAgreementBoost.lean +[lean-point-test]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PointLineTest.lean +[lean-point-soundness]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PointLineSoundness.lean +[lean-point-correction]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PointLineCorrection.lean +[lean-parameter]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PointLineParameterError.lean +[lean-crossing]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BivariateCrossingSoundness.lean +[lean-candidate]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/CandidateCrossing.lean +[lean-mixed]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/MixedPlaneSampling.lean +[lean-endpoint]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PointLineEndpointConsistency.lean +[lean-ruled-sampling]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/RuledSurfaceSampling.lean +[lean-ruled]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/RuledSurfaceRigidity.lean +[lean-point-constants]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PointLineConstants.lean +[lean-constant]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PointLineConstant.lean -The denominator $1+2C(c)$ is positive, so equivalently +## From polynomial values to a constant number of bits + + + +The field-valued tests from the preceding part read a bounded number of field elements, but a field element contains several bits. Moreover, a line restriction can have degree growing with the input size. Two encodings remove these obstacles. A digit substitution represents a univariate polynomial by a polynomial of fixed total degree in more variables. A Hadamard encoding then lets the verifier inspect a binary linear observation of a field value with one bit query. Local tests bound the distance of a received binary table from a valid encoding. + +We next combine the two encodings with low-degree testing, local correction and the zero-on-grid test. The construction is due to Amireddy, Behera, Srinivasan, Sudan and Willumsgaard in [the corrected paper, Sections 3–6 and Appendices B–D](https://arxiv.org/abs/2608.17429v2); the quantitative argument below follows Troy Lee's pinned formal implementation. Its explicit constants and sampling conventions sometimes differ from that paper. The changes are identified at the relevant steps. + +Throughout, $F$ is a finite field of characteristic two, $q=|F|=2^t$, and $$ -\kappa\geq -\frac{(1-Dh/q)/2-\delta_P-2\delta_M-D/(q-1)}{1+2C(c)}. -\tag{B22} +\rho:F\longrightarrow\mathbb F_2^t $$ -When the numerator is negative this is simply a valid, uninformative lower bound; later parameter choices make it positive. If the hypotheses are stated in full affine-label distances, use $2\delta_P+4\delta_M$ in place of $\delta_P+2\delta_M$. These are the [actual binary grid-test bounds](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryZeroOnGridSoundness.lean), valid for every auxiliary correction table. This explicit inequality supplies the paper's asymptotic constant in Theorem 6.1 for the formal verifier's conventions. +is a fixed linear isomorphism over $\mathbb F_2$. Distances and probabilities are uniform finite averages. We write $\Delta(u,v)$ for the fraction of inputs on which two functions disagree. The digit radix is denoted by $b$, to distinguish it from the number of variables of an outer polynomial. The parameters $b,c,r$ are integers with $b\geq1$, $c\geq0$, and $r\geq1$. The construction eventually takes $c=4$. Polynomial degree means total degree for several variables and ordinary degree for one variable; the zero polynomial satisfies every nonnegative bound used below. All auxiliary tables in soundness statements are arbitrary received tables. - + -### Derived polynomial oracles and fresh correction randomness +### A high-degree univariate polynomial as a low-degree multivariate polynomial - + -The final verifier must apply ZERO to expressions such as $g(x)^3-1$, although its proof contains the degree-three encoding of $g$. Equation (B2) converts the desired affine observation to one label of the original row. A corrupted row may be wrong at exactly that label, so the verifier uses two-query self-correction with a fresh uniform full label $R$: +Let $p(Y)=\sum_{j +The formal identity proves more than equality of evaluations. Over a finite field of size $q$, the nonzero polynomial $Y^q-Y$ vanishes at every field element. When $q -The preceding tests give a verifier for graph three-colourability. This chapter assembles that verifier and then transfers it to every language in NP. The result has the following quantifier order. For every language $L\subseteq\{0,1\}^{*}$ with a polynomial-time witness relation, there are one verifier $V$, one polynomial-time implementation of its query protocol, natural numbers $a,b,\ell$, and a polynomial $p\in\mathbb N[X]$, such that every input $x$ of length $n$ satisfies these conditions: +A monomial of $Q$ has at most $c$ variable occurrences, counted with multiplicity. Each substituted variable has degree at most $b^c$, so + +$$ +\deg\operatorname{Dec}(Q)\leq c b^c. +$$ -1. The verifier uses exactly $a\lceil\log _2(n+2)\rceil+b$ fair random bits and makes at most $\ell$ proof-bit queries. -2. Every proof address on every branch is less than $p(n)$. -3. If $x\in L$, some fixed proof is accepted for every random seed. -4. If $x\notin L$, every fixed proof is accepted with probability at most $1/2$. +The distinction between the honest degree bound $\deg p -The algebraic construction is due to Amireddy, Behera, Srinivasan, Sudan and Willumsgaard. We follow the corrected [arXiv v2, Section 7][paper-pcp], with the concrete choices and additional reductions in Troy Lee's formalization. The paper proves the three-colouring construction and invokes NP-completeness. The formalization also constructs the NP reduction, the fair-bit sampler and the polynomial-time machine. Its exact choices need not coincide with the asymptotic parameter choices in the paper. - +### Binary labels for field elements -### Three colours as polynomial equations + - -Let $F$ be a finite field of characteristic two, of cardinality $Q$, containing a primitive cube root of unity $\omega$. The three colours will be +For $r\geq1$, let $\mathcal B_r$ be the vector space of squarefree Boolean polynomials in $t$ variables of degree at most $r$. A label is a coefficient vector in this space. The reduction $Z_i^2=Z_i$ is appropriate because labels are evaluated on $\mathbb F_2^t$; the formal implementation indexes monomials by subsets of coordinates. A field element $u$ is encoded by the binary word $$ -\mathcal C=\{1,\omega,\omega^2\}. +\mathcal H_r(u)(R)=R(\rho(u)),\qquad R\in\mathcal B_r. $$ -These are distinct, and they are exactly the roots of $Z^3-1$. For two valid colours $u,v$, the equation +The word has $2^{\sum_{j=0}^{\min(r,t)}\binom tj}$ entries. We will use full labels, affine degree-one labels, and homogeneous degree-one labels. A homogeneous label has the form $$ -(u-v)^3=1 +L_w(z)=\sum_{i=1}^t w_i z_i,\qquad w\in\mathbb F_2^t. $$ -holds exactly when $u\ne v$. To prove the nontrivial direction, characteristic two gives +For a field-valued function $g$, write $\mathcal H_r(g)(x,R)=\mathcal H_r(g(x))(R)$. + +If $u\neq v$, choose a coordinate on which $\rho(u)$ and $\rho(v)$ differ. Adding that coordinate label pairs every label giving equal evaluations with one giving unequal evaluations. Consequently, for $r\geq1$, $$ -(u-v)^4=u^4-v^4=u-v, +\Delta(\mathcal H_r(u),\mathcal H_r(v))=\frac12. $$ -because $u^3=v^3=1$. If $u\ne v$, cancellation of the nonzero factor $u-v$ yields $(u-v)^3=1$. Conversely, $u=v$ would make the left side zero. Thus an assignment $f:V(G)\to F$ is a proper three-colouring precisely when +The same pairing works among homogeneous linear labels. Averaging over the outer input gives $$ -f(v)^3-1=0\quad(v\in V(G)),\qquad -(f(v)-f(w))^3-1=0\quad(vw\in E(G)). +\Delta(\mathcal H_r(g),\mathcal H_r(h)) +=\frac12\Delta(g,h), +\tag{B1} $$ -Both families matter. For example, assign the four vertices of $K_4$ the four elements of $\mathbb F_4$. Every difference across an edge is a nonzero element of $\mathbb F_4$, hence has cube one. All edge equations hold, although $K_4$ is not three-colourable. The vertex assigned zero violates its vertex equation. The formal [colour algebra][lean-colour-algebra] proves both implications with the vertex condition present. - +and the same identity holds when distance is measured only on homogeneous degree-one labels. This exact factor of two converts the rejection probability of a field equality into that of a binary observation. - -Choose a nonempty set $H\subseteq F$, of size $h$, and a dimension $d$ large enough to place the input graph's vertices in $H^d$. Unused grid points are isolated vertices. Extending a colouring arbitrarily to these points preserves three-colourability in both directions. +For an arbitrary received word, small full-label distance does not imply equally small distance on a much smaller subset of labels. We therefore maintain two bounds for the same decoded function: one on all labels and one on homogeneous degree-one labels. When the received oracle itself has degree-one labels, homogeneous labels form half its domain, so their error is at most twice the full affine-label error. No corresponding dimension-independent restriction estimate is inferred from the full degree-$r$ domain for $r>1$. -Let $P$ be the coordinatewise interpolation of the colour assignment on $H^d$, and let $E$ be the interpolation of the graph's zero-one adjacency function on $H^d\times H^d$. Writing + -$$ -d_0=d(h-1), -$$ + -we have $\deg P\le d_0$ and $\deg E\le2d_0$. Form the difference and constraint polynomials +Higher-degree labels allow a bit query about a polynomial in a field value. Let $A(Y)\in F[Y]$ have degree at most $r$, and let $L$ be an affine binary label. Choose the field basis $e_1,\ldots,e_t$ supplied by $\rho$, and write $e_ie_j=\sum_k\mu_{ijk}e_k$. The $k$-th coordinate of a product is then $\sum_{i,j}\mu_{ijk}z_iw_j$. Repeated multiplication gives coordinate polynomials of degree at most $s$ for the $s$-th power. Multiplication by a fixed field coefficient is linear, so every coordinate of $A(\rho^{-1}(z))$ has degree at most $r$. Replacing positive powers of each $z_i$ by $z_i$ preserves evaluations on binary points and cannot increase degree. Composing with $L$ therefore gives a squarefree label $\Lambda_{A,L}\in\mathcal B_r$ satisfying $$ -\begin{aligned} -Q_P(X,Y)&=P(X)-P(Y),\\ -A_P(X)&=P(X)^3-1,\\ -B_P(X,Y)&=E(X,Y)\bigl(Q_P(X,Y)^3-1\bigr). -\end{aligned} +\mathcal H_1(A(u))(L)=\mathcal H_r(u)(\Lambda_{A,L}). +\tag{B2} $$ -Their total degrees are at most $d_0,3d_0,5d_0$, respectively. A proper colouring makes $A_P$ vanish on $H^d$ and $B_P$ vanish on $H^{2d}$. Conversely, these two vanishing conditions, together with $Q_P(X,Y)=P(X)-P(Y)$, recover a proper colouring by the preceding scalar argument. The factor $E$ is the public graph's actual adjacency extension: it equals one on edges and zero on nonedges at grid points. It is computed from the input, not supplied by the prover. The [grid construction][lean-colour-grid] implements this equivalence. - -The grid-vanishing theorem supplies certificates $M_A$ and $M_B$ for $A_P$ and $B_P$. In the notation of the preceding chapter, each certificate packages the coefficients in a representation by the coordinate vanishing polynomials. The sufficient degree bound $5d_0$ covers the colour polynomial and both certificate polynomials. The proper-colouring certificate has two blocks of $2d$ variables; the implementation flattens the first two vertex-coordinate blocks before passing them to the same certificate routines. This is a coordinate bijection and preserves evaluations, total degree and normalized distances. - - -### The eight tables and seven checks +The statement concerns one field value $u$ and one polynomial $A$; its extension to an oracle is pointwise. In particular, cubic labels suffice to observe $u^3-1$, the expression used to enforce membership in the three allowed colours. - -The received proof contains four primary tables and four encoded line tables. An honest proof has the following mathematical contents: +For $A(Y)=\eta Y$ and a homogeneous label $L$, the composed label is homogeneous. If $\eta\neq0$, multiplication by $\eta$ is a linear bijection of $F$, and its dual permutes the homogeneous labels. This permutation is essential when averaging noisy answers with Lagrange weights. Zero weights must be treated separately: a zero summand is known without reading the oracle. The formal source proves the general [composition identity](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/HadamardComposition.lean) and the needed [weighted homogeneous relabelling](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/HadamardWeights.lean). This is the scalar homogeneous case stated in Claim 3.7 of the corrected paper. -| Primary polynomial | Number of field coordinates | Primary binary encoding | -| --- | ---: | --- | -| $P$, the colour extension | $d$ | degree-three Hadamard encoding | -| $M_A$, the vertex certificate | $2d$ | degree-one Hadamard encoding | -| $Q_P$, the difference polynomial | $2d$ | degree-three Hadamard encoding | -| $M_B$, the edge certificate | $4d$ | degree-one Hadamard encoding | + -Each primary table has one encoded line table. In the formal implementation every auxiliary line table uses degree-one labels. The paper's Section 7 lists degree-three labels for the colour and difference line tables; the formal construction uses the degree-one auxiliary encoding analysed in the preceding chapter. In particular, the line table used to test a certificate is the same physical table used to correct that certificate inside ZERO. There is no second certificate table whose consistency would have to be assumed. The [proof datatype and read function][lean-seven-checks] specify all eight tags and their address spaces. +### Testing a received Hadamard word -The verifier runs four encoded-line low-degree tests, one on each primary/line-table pair. It also runs ZERO on the vertex constraint, ZERO on the edge constraint, and a difference check. It accepts exactly when all seven accept. Each check receives an independent seed with the prescribed finite uniform distribution. This makes each branch's marginal distribution the one analysed in its soundness theorem. Since failure of a branch forces failure of the conjunction, each branch's rejection probability is at most the full rejection probability. - + - -The constraint polynomials are not extra proof tables. Suppose $p(x,\Lambda)$ is the received degree-three row intended to encode $P(x)$. To request a linear bit of $P(x)^3-1$, transform the desired linear label $L$ into the degree-three Boolean label $\Lambda_{Z^3-1,L}$ supplied by the encoding lemma. Draw a fresh uniform degree-three label $R$, read +The first ingredient is the binary linearity test. For a function $h:V\to\mathbb F_2$, where $V$ is a finite binary vector space, choose uniform independent $x,y$ and check $$ -p(x,R+\Lambda_{Z^3-1,L})+p(x,R), +h(x+y)=h(x)+h(y). $$ -and return their sum in $\mathbb F_2$. The corresponding edge query uses the difference table and the label for $Z\mapsto E(x,y)(Z^3-1)$. Thus each derived read costs two physical bits. - -For an exact Hadamard row, linearity in the **label** gives the requested bit exactly, even though $Z\mapsto Z^3-1$ is nonlinear in the field value. For a row close on average to the correct encoding, the two sampled labels are individually uniform, so the probability of an incorrect derived read is bounded by twice the row error. The formal verifier uses fresh masks as part of the actual test seed. Its soundness argument carries this replacement error through the ZERO inequality; it does not postulate a globally good fixed mask. - -The difference check selects independent uniform $x,y\in F^d$ and a homogeneous linear functional $L:F\to\mathbb F_2$. It compares the difference table's bit with the sum of the colour-table bits at $x$ and $y$. Homogeneity is essential to the displayed additive identity. The formal proof uses exactly the homogeneous-label distance guarantee proved by the earlier low-degree test, rather than a stronger assertion about arbitrary affine labels. - - - -The seven physical query bounds, in the order colour, vertex certificate, difference, edge certificate, vertex ZERO, edge ZERO, and difference check, are +If its rejection probability is $\epsilon$, some linear functional $\ell:V\to\mathbb F_2$ satisfies $\Delta(h,\ell)\leq\epsilon$. The test is due to Blum, Luby and Rubinfeld [Section 4.2][blr]; the sharp characteristic-two bound follows from Bellare, Coppersmith, Håstad, Kiwi and Sudan [Theorem 1.2 and Section 2][bchks], also cited in Amireddy et al., Appendix B, Theorem B.1. We give that Fourier argument. Choose coordinates for $V$, put $s(x)=(-1)^{h(x)}$, and for a linear functional $a$ put $\chi_a(x)=(-1)^{a(x)}$. A nontrivial character has average zero: translation by a point where it is $-1$ negates its sum. Thus the characters are orthonormal. With $$ -2c+18,\quad2c+14,\quad2c+18,\quad2c+14, -\quad6c+20,\quad6c+20,\quad3. +\widehat s(a)=\mathbb E_x s(x)\chi_a(x), $$ -Their sum is $20c+107$, independent of the graph size. Taking $c=4$ bounds one unamplified run by at most $26+22+26+22+44+44+3=187$ physical bit reads. This count includes the fresh derived reads. A separate congruence theorem says that two proof oracles agreeing on the listed addresses give the same verdict; the count therefore measures actual information read from the proof, rather than merely the number of named subroutines. The [query-list theorem][lean-query-budget] establishes both facts. - - -### Perfect completeness - - -Start with a proper colouring. Interpolate it to obtain $P$, put the exact difference polynomial $Q_P$ in the difference table, and choose grid-vanishing certificates $M_A,M_B$. Put the exact encodings and exact encoded restrictions to lines in their eight locations. Assume the honest degree capacity +orthogonality gives Fourier inversion and Parseval, $$ -5d(h-1) +Choose a maximising $a$. Since $\widehat s(a)=1-2\Delta(h,a)$, rearrangement gives the claim. This includes every possible rejection rate; no small-error hypothesis is needed for this intermediate result. See [the formal Walsh argument](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BLR.lean). -### Soundness of the seven-check verifier + - -Set $D=cm^c$. Suppose the field and grid satisfy + + +Linearity on the label space is necessary but not sufficient for a Hadamard word to be evaluation at a point: the linear functional must preserve the unit and products. To test these laws reliably on a noisy word, define $$ -Q\ge10^6D^3,\qquad Q\ge100Dh, -\qquad d(h-1)\le D, +\operatorname{SC}_h(Q;R)=h(Q+R)-h(R), $$ -with $c,m,h\ge1$, the prescribed generator nodes, a correction parameter satisfying `GoodNodes`, as in the inner corrector, and a primitive cube root of unity. Let $\kappa$ be the rejection probability of an arbitrary received proof. The argument will show that sufficiently small $\kappa$ forces the graph to be three-colourable. - -Write $E_c$ for the line-error constant and $S_c$ for the soundness constant of the encoded-line test, and $C_c$ for the binary local corrector's soundness constant. If +with $R$ uniform on the full label space. If $\Delta(h,\ell)\leq\epsilon$ for an additive $\ell$, both arguments $R$ and $Q+R$ are uniform, even for a fixed or adversarially selected $Q$. Outside two error events, their difference equals $\ell(Q)$. Therefore $$ -E_c\kappa\le\frac1{4\,000\,000}, +\Pr_R[\operatorname{SC}_h(Q;R)\neq\ell(Q)]\leq2\epsilon. +\tag{B3} $$ -the four outer tests supply four actual polynomials $P,Q_*,M_A,M_B$, each of total degree at most $D$. They give full degree-three label distance at most +The bound remains valid after averaging over any distribution of requests selected before the independent seed $R$. The error events need not be independent. + +The pinned formal tester chooses independent full labels $R,R'$, an affine degree-one label $L$, and, for each $j=2,\ldots,r$, a label $P_{j-1}$ of degree at most $j-1$. It checks $$ -\varepsilon=S_c\kappa +\begin{aligned} +h(R+R')&=h(R)+h(R'),\\ +\operatorname{SC}_h(1;R)&=1,\\ +\operatorname{SC}_h(L;R)&=h(L),\\ +\operatorname{SC}_h(LP_{j-1};R) +&=\operatorname{SC}_h(L;R)\operatorname{SC}_h(P_{j-1};R) +\quad(2\leq j\leq r). +\end{aligned} +\tag{B4} $$ -for $P,Q_*$, and homogeneous linear-label distance at most $\varepsilon$ for all four relevant primary tables. These polynomials are chosen once for the received proof; the later argument uses those same choices. No closeness assumption is imposed on the auxiliary line tables. Their actual test behaviour is already part of the decoding theorem. These are the decoded polynomials used in [the assembled soundness proof][lean-soundness]. - +Products are squarefree-reduced. Shared answers are reused, so the query list has length $2r+4$. The corrected arXiv v2 algorithm retains only the last multiplication check and uses eight queries; the pinned formal tester retains the earlier degree checks as well. Its soundness proof needs only the top-degree check, so the extra checks do not weaken soundness. At $r=3$, the formal query count is ten. - -First identify the decoded difference polynomial. Replace the three received bits in the difference test by their decoded homogeneous bits. The replacement can change the verdict only if one of these three bits differs, an event of probability at most $3\varepsilon$. Hence the ideal consistency check rejects with probability at most $\kappa+3\varepsilon$. + -For a nonzero field element $z$, exactly half of the homogeneous linear functionals satisfy $L(z)=1$. Therefore this ideal rejection rate is exactly half the relative distance between the field-valued functions $Q_*(x,y)$ and $P(x)-P(y)$. If these polynomials differed, their difference would be a nonzero polynomial of degree at most $D$, and the polynomial zero bound would give relative disagreement at least $1-D/Q$. It follows that + + +Suppose the full test rejects with probability at most $\epsilon<1/28$. Each individual check has rejection at most $\epsilon$, because failure of that check implies failure of the conjunction. The linearity bound supplies one linear functional $\ell$ with $\Delta(h,\ell)\leq\epsilon$. + +The corrected unit test and (B3) force $\ell(1)=1$. Otherwise the correct target value and the required answer differ on every seed, whereas their discrepancy is at most $2\epsilon+\epsilon<1$. + +For $r\ge2$, use the top-degree product check and replace its three corrected answers by their $\ell$-values. The three replacements cost at most $6\epsilon$, and test failure costs at most another $\epsilon$. Thus $$ -\kappa+3\varepsilon<\frac{1-D/Q}{2} +\Pr_{L,P}\bigl[\ell(LP)\neq\ell(L)\ell(P)\bigr] +\leq7\epsilon<\frac14, +\tag{B5} $$ -forces the polynomial identity $Q_*(X,Y)=P(X)-P(Y)$. This is an identity of polynomials, not merely agreement at most sampled points. The [difference-consistency theorem][lean-difference] makes the strict inequality explicit. - +where $L\in\mathcal B_1$, $P\in\mathcal B_{r-1}$. The defect $B(L,P)=\ell(LP)-\ell(L)\ell(P)$ is bilinear. A nonzero bilinear binary form is nonzero on at least a quarter of its domain: at least half the first arguments induce a nonzero linear functional of the second argument, and every such functional is nonzero on exactly half the second arguments. Inequality (B5) therefore forces the defect to vanish identically. - -Now consider the decoded vertex constraint $A_P=P^3-1$. Its degree is at most $3D$. For the edge constraint, the public adjacency polynomial has degree at most $2D$; using the just-proved difference identity, the decoded edge constraint +Set $z_i=\ell(Z_i)$. For a squarefree monomial, repeatedly separate one variable from the remaining product. The exact product law and $\ell(1)=1$ give $$ -B_P=E\bigl((P(X)-P(Y))^3-1\bigr) +\ell\Bigl(\prod_{i\in S}Z_i\Bigr)=\prod_{i\in S}z_i. $$ -has degree at most $5D$. Both certificates have degree at most $D$, so the common degree bound $5D$ is sufficient for the two ZERO arguments. +Linearity then gives $\ell(R)=R(z)$ for every label. For $r=1$, unit preservation and linearity already give this conclusion without a product check. Thus $h$ is $\epsilon$-close to one evaluation word $\mathcal H_r(\rho^{-1}z)$. -The fresh-derived-read inequality from the previous chapter says that if either decoded constraint fails to vanish on its grid, then +The same point also controls affine degree-one labels. Their consistency check compares $h(L)$ with a corrected answer; (B3) bounds the latter's error relative to $\ell(L)$. A union bound gives $$ -\frac{1-5Dh/Q}{2} -\le -(1+2C_c)(\kappa+2\varepsilon) -+2\varepsilon+\frac{5D}{Q-1}. +\Delta\bigl(h|_{\mathcal B_1},\mathcal H_1(\rho^{-1}z)\bigr) +\leq3\epsilon. +\tag{B6} $$ -Here $2\varepsilon$ inside the parentheses is the replacement loss from the derived read. Multiplying it by $1+2C_c$ is necessary: it enters the same rejection term as the actual ZERO failure probability. The other $2\varepsilon$ comes from the two uses of the certificate's homogeneous proximity bound. The last term is the nonzero-parameter local-correction loss. These terms cannot be dropped by choosing a favourable random seed after the fact. +This argument is [Hadamard test soundness](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/HadamardSoundness.lean); the quarter-distance step is in [the bilinear characterization](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BilinearHadamard.lean). It reconstructs the formal variant of the paper's Lemma 3.10. -Consequently, the strict reverse inequality forces $A_P$ to vanish on $H^d$ and $B_P$ to vanish on $H^{2d}$. The scalar colour equations then make $P|_{H^d}$ a proper colouring. The coordinate flattening in the edge branch is a bijection, so its normalized error and vanishing statements transport unchanged. The [decoded soundness theorem][lean-decoded] performs these two applications to the same decoded colour and difference polynomials. - + - -An explicit positive gap makes all three inequalities hold at once. Define + + +We need this conclusion for a table whose individual rows can be arbitrarily bad. If a row has rejection $e<1/28$, choose the point just constructed. Its full-label error is at most $e$, and its homogeneous-label error is at most $2\cdot3e=6e$. If $e\geq1/28$, choose any point; each distance is at most $1\leq28e$. Consequently every row admits one decoded field value for which both distances are at most $28e$. Choose these values simultaneously and average. If $\overline e$ is average row rejection, the resulting field function $g$ satisfies $$ -\begin{aligned} -A_c&=1+2C_c,\\ -B_c&=1+3S_c,\\ -T_c&=A_c(1+2S_c)+2S_c,\\ -g_c&=\min\left\{ -\frac{1}{4\,000\,000(E_c+1)}, -\frac{1}{16B_c}, -\frac{1}{16(T_c+1)}\right\}. -\end{aligned} +\Delta_{\rm full}(h,\mathcal H_r(g))\leq28\overline e, +\qquad +\Delta_{\rm hom}(h,\mathcal H_r(g))\leq28\overline e. +\tag{B7} $$ -At the chosen value $c=4$, the constants evaluate to +The same $g$ occurs in both conclusions. This is an existence argument used in soundness analysis; it does not provide an efficient decoding algorithm. The formal [row-decoding theorem](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/HadamardRowDecoding.lean) deliberately has no global small-error premise. -| $K_4$ | $E_4$ | $S_4$ | $C_4$ | $T_4$ | -| ---: | ---: | ---: | ---: | ---: | -| $105408$ | $1054138$ | $1054166$ | $1054082$ | $4444715947277$ | + -All denominators are positive, so $g_c>0$. If $0\le\kappa + +Take a generator $\theta$ of $F^\times$, let $a_i=\theta^{i+1}$ for $0\leq i\leq c$, and assume $q>2c$. These nodes are distinct and nonzero. Their Lagrange weights for evaluation at zero are $$ -\frac DQ\le\frac14,\qquad -\frac{5Dh}{Q}\le\frac14,\qquad -\frac{5D}{Q-1}\le\frac18. +\eta_i=\prod_{j\ne i}\frac{-a_j}{a_i-a_j}. $$ -For the last inequality, $Q\ge100D$ implies $Q-1\ge40D$. The difference error is then below $1/16<3/8$, and the total ZERO error is below $1/16+1/8=3/16<3/8$. These bounds prove the required strict comparisons. Thus rejection below $g_c$ implies colourability. Taking the contrapositive, **every received proof of a non-three-colourable graph has rejection probability at least $g_c$**. The [budget lemmas][lean-budget] establish this explicit rejection gap. - +Each weight is nonzero. Interpolating a polynomial of degree at most $c$ at the $c+1$ nodes and evaluating at zero gives the field-valued equation -### Parameters for every finite graph +$$ +g(u)=\sum_{i=0}^c\eta_i g(u+a_i v). +\tag{B8} +$$ - -The formalization chooses a concrete parameter family different from the paper's asymptotic display. For a graph with $N$ vertices, let $a$ be the least integer at least two with +For a received binary table $h(x,L)$, choose a homogeneous label $L$ and check the binary observation of (B8): query the centre with $L$, and the $i$-th other point with the homogeneous label $L\circ(\eta_i\cdot)$. At most $c+2$ bits are read. On an exact encoding $\mathcal H_r(g)$, (B1) says that the binary check rejects with exactly half the rejection probability of (B8). + +For a corrupted encoding, suppose $\Delta_{\rm hom}(h,\mathcal H_r(g))=\tau$. Each nonzero weighted label is a permutation of uniform labels; each sampled point $u+a_iv$, and the centre $u$, is uniform. Replacing the at most $c+2$ answers therefore changes the binary decision on at most $(c+2)\tau$ of the seeds. If the received binary check has rejection $\beta$, then $$ -\lceil\log _2N\rceil\le a2^a. +\Pr[(\mathrm{B8})\text{ fails}] +\leq2\beta+2(c+2)\tau. +\tag{B9} $$ -Use the natural ceiling-log convention at $N=0,1$; the definition still selects $a=2$. Put +The actual inner tester flips a fair coin between a rowwise Hadamard test and this weighted check. If its rejection is $\kappa$, each branch rejects with probability at most $2\kappa$. Applying (B7) to the Hadamard branch gives a field function $g$ with both binary distances at most $56\kappa$. Equation (B9) then gives $$ -s=2^a,\quad d=m=h=s,\quad c=4, -\quad t=12a+32,\quad Q=2^t=2^{32}s^{12}. +\Pr[(\mathrm{B8})\text{ fails}] +\leq \bigl(112(c+2)+4\bigr)\kappa. +\tag{B10} $$ -The finite field is represented by binary coefficient arrays modulo a computed monic irreducible polynomial of degree $t$. The coordinate map $F\cong\mathbb F_2^t$ reads these stored coefficients. Since $t$ is divisible by four, $3\mid Q-1$; bounded searches in the field's numeric order supply a primitive cube root and a generator of $F^{\times}$. The grid $H$ is the first $s$ field elements in this numeric order. It need not be a subfield. +The preceding field-valued low-degree theorem applies when $q>2c$, the nodes come from a full multiplicative generator, and this last rejection is below its threshold. The formal argument uses the sufficient threshold -The grid has $h^d=s^s=2^{a2^a}\ge N$ points. With $D=4s^4$, the soundness field requirement holds because +$$ +\bigl(112(c+2)+4\bigr)\kappa +\leq\frac{1}{4(c+2)^2}, +$$ + +which is strictly below $1/[2(c+2)^2]$. It gives a polynomial $Q$ of total degree at most $c$ with field distance at most twice (B10). By (B1), encoding that field distance costs one half. A triangle inequality therefore bounds both binary distances to $\mathcal H_r(Q)$ by $$ -10^6D^3=64\,000\,000s^{12}\le2^{32}s^{12}=Q. +\bigl(112(c+2)+60\bigr)\kappa. $$ -Also $100Dh=400s^5\le Q$. Since $s\ge4$, +For a row above this threshold, use the zero polynomial and the universal distance bound one. Both cases are covered by $$ -5s(s-1)[112(c+2)+60]/[112(c+2)+4]>1$. +This proves a uniform row-decoding statement with no smallness assumption. The decoded polynomial is again the same in both conclusions. The exact proof is [binary polynomial row decoding](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryLocalRowDecoding.lean). -To obtain the logarithmic resource bounds, minimality matters. If $a>2$, then + + + + +The weighted local corrector uses a node table $\alpha_i=\zeta^{i+1}$, required only to have distinct entries and $\zeta\ne0$. The formal theorem calls this condition `GoodNodes`. It follows from the generator hypothesis above, but the tester's generator $\theta$ and the corrector's parameter $\zeta$ need not be equal. Let $\omega_i=\prod_{j\ne i}(-\alpha_j)/(\alpha_i-\alpha_j)$. To recover the homogeneous observation of $Q(u)$, the corrector returns $$ -(a-1)2^{a-1}<\lceil\log _2N\rceil, -\qquad -a2^a\le4(a-1)2^{a-1}. +\sum_{i=0}^c +h\bigl(u+\alpha_i v,\ L\circ(\omega_i\cdot)\bigr). +\tag{B12} $$ -If $a=2$, the volume $a2^a$ is eight. Both cases yield +On an honest degree-$c$ polynomial this is exactly $L(Q(u))$, by interpolation. Suppose the received table differs from $\mathcal H_1(Q)$ by homogeneous distance $\tau$. For fixed $u$, random $v$, and random homogeneous $L$, each queried point-label pair is uniform: $\alpha_i\ne0$ makes $v\mapsto u+\alpha_iv$ bijective, and $\omega_i\ne0$ makes the label map bijective. A wrong sum requires at least one wrong answer, so $$ -a2^a\le4\max\{8,\lceil\log _2N\rceil\} -\le32(\lceil\log _2N\rceil+1). +\Pr[(\mathrm{B12})\neq L(Q(u))]\leq(c+1)\tau. +\tag{B13} $$ -Thus a resource bounded by a fixed multiple of $a2^a$ is logarithmic in $N$; a resource bounded by $2^{O(a2^a)}$ is polynomial in $N$. Merely knowing that the grid can hold the graph would not give these upper bounds. - +The guarantee is averaged over the requested homogeneous label as well as the direction. We do not claim this bound for every fixed label of an arbitrary received table. This is [binary weighted local correction](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryStandardLocalCorrection.lean). -### From finite samples to fair random bits + - -Some mathematical correctors use uniformly distributed nonzero field parameters. Sampling uniformly from $F^{\times}$ with a fixed fair-bit budget is inconvenient because $Q-1$ is not a power of two. The implemented verifier instead samples all four such parameters from the whole field. If any is zero, it accepts immediately and makes no queries. Otherwise it runs the seven-check verifier. +### Testing a high-degree outer polynomial -Conditioned on all four being nonzero, the decoded seed has exactly the original product-uniform distribution. Every other coordinate is unchanged. Therefore + -$$ -\Pr[\text{new verifier rejects}] -=\left(\frac{Q-1}{Q}\right)^4 -\Pr[\text{original verifier rejects}]. -$$ +Let the primary table be $f:F^k\times\mathcal B_r\to\mathbb F_2$. For every oriented line $x=u+zv$, an auxiliary table is intended to encode the set-multilinear image of the univariate restriction $P(u+Yv)$, using degree-one Hadamard labels. Use generator nodes for its inner test and `GoodNodes` for its corrector, as above. Choose uniform $u,v\in F^k$ and $z\in F$, a homogeneous label $L$, an inner correction direction, and independent seeds for the two tests. The formal verifier: -Since $Q\ge2$, the factor is at least $1/16$. Perfect completeness survives, and non-colourable graphs have rejection at least $\delta=g_4/16$. This is an exact counting identity on the two finite seed spaces, as proved by [whole-field sampling][lean-sampling]; it does not use an approximation to a uniform distribution. +1. runs the Hadamard test on the primary row $f(u,\cdot)$; +2. runs the fair-coin inner test on the auxiliary row belonging to $(u,v)$; +3. corrects that row at $\Phi(z)$, using (B12), and compares the answer with $f(u+zv,L)$. -Every remaining random coordinate is a field vector, a Boolean coefficient vector or a finite product of such objects. The chosen linear coordinates and explicit product codecs give a bijection between the entire seed space and a fixed-length bit string. Uniform bit strings therefore induce exactly the required distribution. Likewise, a tagged mixed-radix codec packs the eight physical tables into one finite binary word. Encoding and decoding are inverse, and the query list is translated through the same codec. - +All three checks must pass. In particular, $z$ ranges over the whole field. Honest polynomials of degree strictly below $b^c$, with their actual encoded line restrictions, pass for every seed. The query list has length at most $2r+2c+12$, as proved by [the actual tester's query bound](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/EncodedLineLowDegreeTest.lean). - -Here is how polynomial proof length follows for the actual eight-table address space. A degree-$r$ Boolean label on $t$ coordinates has + -$$ -b_r(t)=\sum_{j=0}^{r}\binom tj -$$ + -binary coefficients, so there are $C_r=2^{b_r(t)}$ labels. The four primary-table lengths are +Let the complete tester's rejection probability be $\kappa$. Its Hadamard marginal, inner-test marginal, and comparison error are individually at most $\kappa$. From (B7), choose one primary field function $g$, close to $f$ by at most $28\kappa$ on both relevant label domains. Apply (B11) to every auxiliary row, obtaining inner polynomials $Q_{u,v}$ of degree at most $c$. Their average homogeneous distance is at most $K(c)\kappa$. Define actual univariate line polynomials $$ -Q^dC_3,\quad Q^{2d}C_1,\quad Q^{2d}C_3,\quad Q^{4d}C_1. +T_{u,v}=\operatorname{Dec}(Q_{u,v}),\qquad +\deg T_{u,v}\leq D:=c b^c. $$ -A line table for a polynomial on $j$ coordinates indexes two field points specifying a line, the $cm$ coordinates of its reduced-degree encoding, and a linear Boolean label. Its length is $Q^{2j+cm}C_1$. Thus the four auxiliary lengths are +There are three discrepancies between the binary observations of $T_{u,v}(z)$ and $g(u+zv)$: -$$ -Q^{2d+cm}C_1,\quad Q^{4d+cm}C_1,\quad -Q^{4d+cm}C_1,\quad Q^{8d+cm}C_1. -$$ +- replacing the locally corrected auxiliary answer by $L(T_{u,v}(z))$, costing at most $(c+1)K(c)\kappa$ by (B13); +- the comparison checked by the tester, costing at most $\kappa$; +- replacing the received primary answer by $L(g(u+zv))$, costing at most $28\kappa$. -Since $b_1(t)\le b_3(t)\le(t+1)^3$, the sum of these eight lengths is at most +The last bound uses uniformity of $u+zv$ when $u$ is uniform, even for $z=0$. Combining the three discrepancies and applying the exact half-distance identity (B1) gives $$ -2^{(8d+cm)t+(t+1)^3+3}. +\Pr_{u,v,z}[T_{u,v}(z)\neq g(u+zv)] +\leq E(c)\kappa, +\quad E(c)=2\bigl((c+1)K(c)+29\bigr). +\tag{B14} $$ -For $d=m=2^a$, $c=4$ and $t=12a+32$, the exponent is at most $132\,000a2^a$. One elementary estimate controls the cubic term: $a^2\le4\cdot2^a$ for every natural $a$, and $12a+33\le32a$ for $a\ge2$. Hence $(t+1)^3\le131\,072a2^a$; the remaining linear terms fit within the stated bound. - -The exact fair-bit seed length, counting every product coordinate even when a branch ignores it, is +Now use the field-valued point-versus-line theorem proved in the algebraic part. Its explicit formal hypotheses are $$ -r=35td+32tcm+73t+50+8\binom t2+6\binom t3. +q\geq10^6D^3,\qquad E(c)\kappa\leq\frac1{4\cdot10^6}. $$ -This comes from summing the four outer-test seeds, two derived-ZERO seeds and the difference-check seed; replacing the four nonzero parameters contributes $4t$ of these bits. The same elementary estimates bound $r$ by $10^6a2^a$. Combining both estimates with $a2^a\le32(\lceil\log_2N\rceil+1)$, and using $2^{\lceil\log_2N\rceil}\le2\max\{1,N\}$, gives +It supplies a formal polynomial $P\in F[X_1,\ldots,X_k]$ of total degree at most $D$ for which $\Delta(g,P)\leq2E(c)\kappa$. Encoding halves this distance. A final triangle inequality proves $$ -\begin{aligned} -r(N)&\le32\,000\,000(\lceil\log _2N\rceil+1),\\ -\operatorname{proofLength}(N)&\le(4\max\{1,N\})^{4\,224\,000},\\ -\#\operatorname{queries}&\le187. -\end{aligned} +\Delta_{\rm full}(f,\mathcal H_r(P)),\ +\Delta_{\rm hom}(f,\mathcal H_r(P)) +\leq S(c)\kappa, +\qquad S(c)=28+E(c). +\tag{B15} $$ -These are proved upper bounds, with very large constants. They establish the complexity class statement; they are not practical resource estimates. The proof-size estimate concerns the actual packed eight-table address space, and the query estimate concerns addresses in that space. [The exact seed count][lean-seed-size], [address-space estimates][lean-resources] and [binary-verifier guarantees][lean-binary] give these calculations together with perfect completeness and the rejection bound. +This is the formal [encoded-line low-degree theorem](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/EncodedLineLowDegreeSoundness.lean). No closeness of the auxiliary rows is assumed: it was proved from their actual rejection rates. The second conclusion concerns homogeneous degree-one labels. The corrected paper's Theorem 4.1 states a bound for all affine degree-one labels; that stronger conclusion is not claimed here. The homogeneous bound is enough for the final difference check, while a certificate table whose full label space already has degree one receives its affine bound from the first conclusion. + + -For an encoded graph input $x$, its decoded vertex count is at most $n=|x|$. The verifier uses the canonical budget +### Correcting an outer value at a prescribed point -$$ -r_0(n)=32\,000\,000\lceil\log _2(n+2)\rceil+32\,000\,000. -$$ + -It ignores the surplus bits beyond those needed by the exact seed codec. Every shorter bit string has exactly the same number of extensions, so prefix sampling preserves the acceptance probability. The proof address bound becomes the natural-coefficient polynomial +Fix a target $a\in F^k$. A point oracle $f$ has degree-one labels, and an auxiliary table is supplied for each line through $a$. Choose a uniform direction $v\in F^k$, a nonzero uniform parameter $z\in F^\times$, a uniform homogeneous label $L$, an inner correction direction, and an independent inner-test seed. Run the inner test on the line's auxiliary row. If it fails, reject. Otherwise correct that row at $\Phi(z)$ and compare with $f(a+zv,L)$. If the comparison fails, reject. If both checks pass, return the correction at $\Phi(0)$, with the same inner correction direction and label. -$$ -p_0(n)=\bigl(4(n+1)\bigr)^{4\,224\,000}. -$$ +Thus the output is either one bit or rejection. The procedure uses at most $3c+9$ queries. With honest point and line tables for a polynomial of degree strictly below $b^c$, it returns $L(P(a))$ for every random seed. See [the local-correction procedure](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryLocalCorrection.lean). -The nonadaptive list of at most 187 physical reads is compiled into a decision tree of that depth. Its evaluation equals the algebraic verdict for every oracle, and all syntactic addresses are below $p_0(n)$. The [canonical verifier][lean-canonical] proves these properties for every bit string, including malformed graph encodings according to its fixed decoder. - + -### Repetition on one fixed proof + - -With the constants from the preceding chapters, exact rational arithmetic gives +Let $P$ have total degree at most $D$, with $D\geq cb^c$, and suppose $f$ is within homogeneous distance $\delta$ of $\mathcal H_1(P)$. Assume $q>2c$, generator nodes for the inner test, and `GoodNodes` for the corrector. Let $R_a$ be the probability that the actual procedure rejects at target $a$. Define $$ -g_4=\frac1{71\,115\,455\,156\,448},\qquad -\delta=\frac1{1\,137\,847\,282\,503\,168}. +C(c)=2+2(c+1)K(c). $$ -Set $R=\lceil1/\delta\rceil$. Run the base verifier $R$ times with independent seeds on the **same** proof, and accept only if every run accepts. For a fixed proof with single-run acceptance $u$, independence gives acceptance $u^R$. In a no-instance, $u\le1-\delta$, so it remains to show $(1-\delta)^R\le1/2$. - -An elementary inequality proves this without logarithmic approximation: +Then the probability of either rejection or a wrong returned bit is at most $$ -(1+k\delta)(1-\delta)^k\le1 -\quad(k\ge0, 0\le\delta\le1). +C(c)R_a+\delta+\frac{D}{2(q-1)}. +\tag{B16} $$ -The base case is equality. For the induction step, +To prove this, decode each auxiliary row to $Q_v$ using (B11), and put $T_v=\operatorname{Dec}(Q_v)$. Since failure of the inner test forces rejection, the average auxiliary decoding error is at most $K(c)R_a$. Let $e=(c+1)K(c)R_a$. Equation (B13) bounds by $e$ each replacement of a corrected answer by $L(T_v(z))$, at either $z$ or zero. The comparison check then gives $$ -(1+(k+1)\delta)(1-\delta) -=1+k\delta-(k+1)\delta^2\le1+k\delta; +\Pr[L(T_v(z))\neq f(a+zv,L)]\leq e+R_a. +\tag{B17} $$ -multiply by the nonnegative factor $(1-\delta)^k$. Since $R\delta\ge1$, division gives +We next relate the decoded line's origin to its random nonzero point. If $T_v(0)\neq P(a)$, the polynomial +$T_v(Y)-P(a+Yv)$ is nonzero and has degree at most $D$. It has at most $D$ roots in $F^\times$. Therefore, averaging first over $v,z$ and then over the binary label, $$ -(1-\delta)^R\le\frac1{1+R\delta}\le\frac12. +\Pr_{v,L}[L(T_v(0))\neq L(P(a))] +\leq +\Pr_{v,z,L}[L(T_v(z))\neq L(P(a+zv))] ++\frac{D}{2(q-1)}. +\tag{B18} $$ -The same honest proof still accepts on every repeated seed. Repetition leaves the proof-length polynomial unchanged and multiplies the query and random-bit budgets by the fixed constant $R$. Here $R=1\,137\,847\,282\,503\,168$ and $187R=212\,777\,441\,828\,092\,416$. The [rational repetition bound][lean-repetition-bound] and [amplified verifier][lean-amplified] retain these fixed choices. A prover cannot supply a different proof after seeing each seed; the probability statement quantifies over one proof before the product distribution. - - -### The polynomial-time implementation +The factor one half again comes from the exact distance of two distinct field messages under homogeneous labels. For each fixed nonzero $z$, the map $v\mapsto a+zv$ is a bijection, so replacing the received primary bit in (B17) by the correct bit costs at most $\delta$. Combining (B17) and (B18) bounds the decoded origin's error by $e+R_a+\delta+D/[2(q-1)]$. Replacing its bit by the actual corrected origin costs another $e$, and accounting for rejection costs another $R_a$. This is (B16). - -The information-theoretic verifier must be implemented by a polynomial-time machine; a bounded number of oracle queries alone does not provide this. The formal implementation computes the parameters, field arithmetic, seed codecs, query addresses and verdict in a fixed program language and compiles that language to Mathlib's finite multi-stack `FinTM2` machine model. A verifier step takes the input, random seed and answer history, then either halts with a verdict or requests the next proof address. The implementation relation states that executing these steps produces the specified bounded query tree, on both possible answers at every queried branch. +The formal [local-correction soundness theorem](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryLocalCorrectionSoundness.lean) has no smallness assumption on $R_a$, no closeness hypothesis on the auxiliary table, and no claim that rejection is itself small. If only full affine-label distance $\delta$ is known, replace the $\delta$ in (B16) by $2\delta$. The theorem averages over the label: it does not promise reliability for each prescribed label of a corrupted oracle. -The concrete operations can be bounded as follows. Parameter selection is a bounded search for the least admissible $a$. Field elements have $t=12a+32$ binary coefficients; arithmetic reduces polynomial representatives modulo the computed irreducible modulus, and inversion uses powering. The modulus, cube root and full generator are obtained by bounded finite searches, with candidate tests expressed in the same finite arithmetic. Their search ranges are polynomial in the field cardinality $Q$, and $Q=2^{32}s^{12}$ is polynomially bounded in the input length. For example, the charged modulus-construction cost is at most $7\,000\,000(Q+1)^7$; each root search costs at most $400\,000\,000(Q+4)^6$; the combined field-and-roots routine costs at most $10^9(Q+4)^7$. [These cost proofs][lean-field-cost] include candidate testing and storage. The runtime construction computes the parameters and arithmetic data from the input. For the underlying finite-field construction, see Shoup [Sections 20.2 and 21.1][shoup], especially the irreducible-polynomial existence result in Theorem 20.11. Shoup also analyses irreducibility testing and randomized construction. The deterministic bounded searches and charged cost estimates above are those of the formal implementation. + -The public edge extension is evaluated from the input adjacency matrix by finite interpolation sums. The grid and its pair space have polynomial size because $s^s=2^{a2^a}$ and the preceding volume bound is logarithmic. Lagrange weights, degree-reduction coordinates and label transformations use bounded arithmetic loops. The proof-address values are polynomially bounded by $p_0(n)$; the implementation proves bounds for the sizes of their stored representations as well as for the number of addresses. +### Checking that a polynomial vanishes on a grid -The base callback has two passes. A discovery pass constructs the exact list of physical queries. A replay pass evaluates the algebraic verdict using the answer history at those addresses. The invalid whole-field-seed case emits no queries and returns acceptance. [Callback correctness][lean-runtime-correct] proves that these outputs agree with the mathematical query list and verdict for arbitrary input, seed and answer words. This is stronger than correctness only on honest proof responses. + -For cost, the proof assigns polynomial bounds to the setup, generated-query storage and branch computations, then substitutes each bound into the routine that consumes it. Concretely, if query storage is bounded by $C_q(n+1)^{d_q}$ and a branch's cost has degree $d_b$ in the size of its input/history, the combined proof takes an exponent at least +Let $H\subset F$ be nonempty, let $h=|H|$, and put $Z_H(Y)=\prod_{a\in H}(Y-a)$. The algebraic part established that $P$ vanishes on $H^k$ exactly when there is a polynomial certificate $M(X,Y)$, with $k$ coordinates of each kind, such that $$ -\max\{84,d_q,(d_q+1)d_b\}. +M(X,0)=0,\qquad M(X,Z_H(X))=P(X), +\tag{B19} $$ -Constants are enlarged to absorb the two passes, fixed seven-branch overhead and setup. The resulting theorem bounds the charged cost by $C(|x|+|r|+|u|+1)^e$ for every answer history $u$. The [polynomial-cost proof][lean-runtime-cost] retains the query-size premise until the separately proved storage bound supplies it. - -The repetition protocol slices the random string into $R$ blocks, invokes this same callback, and manages the answer history. Because $R$ is fixed, the protocol's loop and storage overhead are polynomial. Its compiler and public input/output codecs preserve the callback's semantics and translate the charged cost to a step bound on the finite machine. Thus [the runtime theorem][lean-runtime] concludes polynomial-time implementation of the actual amplified query algorithm. The low-level compiler, array arithmetic and finite-search proofs are supporting implementation lemmas; this account uses their stated semantic and cost guarantees and explains their composition, rather than reproducing their individual machine-state derivations. - - -### From every NP verifier to a graph +where $Z_H$ is applied coordinatewise. For the honest certificate, $\deg M\leq\deg P$. For the reverse implication no polynomial division is needed: at $x\in H^k$, the second argument is zero, so the two identities give $P(x)=0$. - -Fix an NP language $L$, a Boolean witness relation $R(x,w)$, a natural-coefficient witness bound $q$, and its concrete polynomial-time checker. Then +Suppose both $P$ and an arbitrary proposed certificate $M$ have degree at most $D$, but $P$ does not vanish on the grid. At least one residual $$ -x\in L\iff\exists w\ (|w|\le q(|x|)\ \text{and}\ R(x,w)=1). +M(X,0),\qquad M(X,Z_H(X))-P(X) $$ -Let $T_0$ be the checker's time polynomial. At input length $n$, one bound valid for all permitted witnesses is +is a nonzero polynomial. Their degrees are at most $D$ and $Dh$, respectively. The latter bound uses $h\geq1$. The polynomial distance bound therefore shows that the field test checking both residuals at a uniform point rejects with probability at least $1-Dh/q$. + +Observe both residuals with the same random homogeneous label. Whenever at least one field residual is nonzero, the binary pair is nonzero with probability at least one half: one selected nonzero residual alone already has that probability. Hence the ideal binary test rejects with probability at least $$ -T(n)=T_0(n+q(n)+1). +\frac{1-Dh/q}{2}. +\tag{B20} $$ -The $+1$ accounts for the delimiter in the fixed pair encoding. If the machine pushes at most $B$ cells per step, a sufficient stack-space bound is +The two residuals need not yield independent binary observations. This proof uses only a lower bound for their union. The field argument is [the algebraic grid check](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ZeroOnGridCheck.lean). + + + + + +The received certificate is only close to $M$ on the full domain. Directly reading it at $(x,0)$ or $(x,Z_H(x))$ would be unjustified: these points lie in special subsets that could contain all its errors. The actual ZERO test therefore uses the outer local corrector at each of these two points. It reads the received primary bit $p(x,L)$ once, corrects the certificate at $(x,0)$ and requires zero, then corrects it at $(x,Z_H(x))$ and requires $p(x,L)$. It rejects every abstention. The two calls share $x,L$, but use independent remaining seeds. Its query bound is $$ -S(n)=n+q(n)+1+B T(n). +1+2(3c+9)=6c+19. $$ -Represent a computation by $T(n)+1$ rows of bounded configurations, with the witness length and bits included. The constraints enforce the initial row, every adjacent transition and the accepting final row. Halting is padded by the machine's bounded-evaluation convention. Every true computation gives such a tableau within the space bound. Conversely, determinism and the transition constraints force each successive row to be the actual machine configuration, so an accepting tableau gives a witness with $R(x,w)=1$. This proves the [finite tableau equivalence][lean-tableau] for all witness lengths from zero through $q(n)$. - +For perfect completeness, take the primary table to be exactly $\mathcal H_1(P)$, the certificate table to be exactly $\mathcal H_1(M)$, and all auxiliary line tables to be the honest encodings of the corresponding restrictions of $M$. If $\deg M -To make the tableau a bounded-arity constraint system, use a finite alphabet fixed by the source machine. Each row has one control-and-prefix variable and one optional-symbol variable for each stack position below $S(n)$. Let $w_0$ be the machine's fixed window size. Link constraints identify the stored prefix with the first $w_0$ cells of every stack. + -The locality theorem for the machine states that a successor stack consists of the output produced from this prefix followed by the untouched old suffix starting at position $w_0$. The possible output-prefix lengths are bounded by a machine-fixed number $b_0$. Consequently the new symbol at position $j$ is either a symbol in that computed output prefix, or the old symbol at + + +Let $\delta_P$ and $\delta_M$ bound homogeneous distance of the received primary and certificate tables from $\mathcal H_1(P)$ and $\mathcal H_1(M)$, respectively. Let $\kappa$ be actual ZERO rejection. Assume $D\geq cb^c$, $q>2c$, generator nodes for the inner test, and `GoodNodes` for the corrector. As in (B20), $P$ does not vanish on the grid, and both $P$ and $M$ have degree at most $D$. At either requested certificate point, its corrector's rejection event is contained in ZERO rejection. Averaging (B16) over $x$ therefore bounds each call's failure by $$ -w_0+(j-\lambda), +C(c)\kappa+\delta_M+\frac{D}{2(q-1)}. $$ -where $\lambda\le b_0$ is the actual output-prefix length. A cell constraint reads the old prefix, the new cell, and the $b_0+1$ candidate old cells corresponding to every possible $\lambda$. The finite transition table selects the correct candidate. This gives fixed arity without placing an entire, input-sized stack in one variable. Positions outside the space bound read a single distinguished blank variable. [The cell-step reconstruction][lean-tableau-cells] proves that a row representing a real configuration, with linked prefix and satisfying cell constraints, represents exactly its successor. The proved growth bound ensures that no actual successor cell is lost at the boundary. - -Initial constraints fix the input bits, delimiter and all other stacks. In the next $q(n)$ positions they permit guessed Boolean symbols or blanks; adjacent constraints require every blank to be followed by a blank. Thus those cells describe exactly a witness of some length from zero through $q(n)$, without requiring the checker to reject longer words. Final constraints fix the accepting halt configuration. Induction on the rows now reconstructs a real accepting computation from a satisfying assignment. Reading the rows of a real accepting computation supplies the converse. - -For $k$ stacks, the source gives the variable count +Couple the ideal and received tests by using the same outer point and label. If their verdicts differ, then either the primary bit is wrong or one of the two certificate calls fails to supply the ideal bit. The union bound, followed by (B20), gives the exact formal inequality $$ -v(n)=(T(n)+1)(1+kS(n))+1, +\frac{1-Dh/q}{2} +\leq (1+2C(c))\kappa+\delta_P+2\delta_M+\frac{D}{q-1}. +\tag{B21} $$ -including a blank variable. The constraint count is +The denominator $1+2C(c)$ is positive, so equivalently $$ -c(n)=1+(T(n)+1)kw_0+T(n)+T(n)kS(n) -+2(1+kS(n))+q(n). +\kappa\geq +\frac{(1-Dh/q)/2-\delta_P-2\delta_M-D/(q-1)}{1+2C(c)}. +\tag{B22} $$ -Both are polynomials: the terms count the blank test, prefix links, control steps, cell steps, two boundaries and witness-adjacency tests respectively. The [cell-constraint construction][lean-cell-constraints] and [assembled reduction][lean-np-reduction] provide these directions and the explicit index codecs. There is also a machine-fixed degenerate case: if the proposed accepting output contains a symbol outside the machine's finite reachable support, the checker can never accept. The reduction then emits a fixed non-three-colourable graph. Thus the theorem needs no extra assumption that acceptance is possible. - +When the numerator is negative this is simply a valid, uninformative lower bound; later parameter choices make it positive. If the hypotheses are stated in full affine-label distances, use $2\delta_P+4\delta_M$ in place of $\delta_P+2\delta_M$. These are the [actual binary grid-test bounds](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryZeroOnGridSoundness.lean), valid for every auxiliary correction table. This explicit inequality supplies the paper's asymptotic constant in Theorem 6.1 for the formal verifier's conventions. - -A constraint over an alphabet of size $A$ is converted to Boolean constraints by one-hot coding. Each source variable receives $A$ bits, exactly one of which is true; its true index is the encoded symbol. Validity constraints enforce this condition. A relation inspects the relevant one-hot blocks and accepts precisely the tuples accepted by the original finite relation. The alphabet size and local arity are constants fixed by the original machine. [The finite-domain encoding][lean-one-hot] proves that decoding a satisfying one-hot assignment and encoding a source assignment preserve all constraints. + -For completeness of the next step, consider any Boolean relation $R_e$ on $k_0$ input bits. For every pattern $p\in\{0,1\}^{k_0}$, introduce flags $z_0,\ldots,z_{k_0}$ with +### Derived polynomial oracles and fresh correction randomness + + + +The final verifier must apply ZERO to expressions such as $g(x)^3-1$, although its proof contains the degree-three encoding of $g$. Equation (B2) converts the desired affine observation to one label of the original row. A corrupted row may be wrong at exactly that label, so the verifier uses two-query self-correction with a fresh uniform full label $R$: $$ -z_0=0,\qquad z_{i+1}=z_i\lor(x_i\mathbin{\mathrm{xor}}p_i), -\qquad R_e(p)\lor z_{k_0}=1. +h(x,\Lambda_{A_x,L}+R)-h(x,R). +\tag{B23} $$ -An OR equation $z=x\lor y$ is enforced by the three clauses +Here $A_x\in F[Y]$ may depend on the outer point, with $\deg A_x\leq r$ for every $x$. For a fixed point and requested label, (B3) bounds the chance of disagreement with $\mathcal H_1(A_x(g(x)))(L)$ by twice the full-label distance of that row from $\mathcal H_r(g(x))$. Averaging over uniform $x$ and any requested-label distribution chosen before $R$ gives an error at most $2\epsilon$, where $$ -(z\lor\neg x),\qquad(z\lor\neg y),\qquad(\neg z\lor x\lor y), +\epsilon=\Delta_{\rm full}(h,\mathcal H_r(g)). $$ -padding short clauses with false. The flags are forced to record whether the actual input differs from the prefix of $p$. Thus the final clause is automatic when $x\ne p$, and when $x=p$ it requires $R_e(x)=1$. This proves both directions of the reduction, with $2^{k_0}(3k_0+2)$ three-literal clauses per relation. It is polynomial because $k_0$ is fixed, not because an exponential in a varying arity would be harmless. These are the actual [Boolean clauses][lean-boolean-clauses] used by the implementation. - +This averaging does not require the label transformation $L\mapsto\Lambda_{A_x,L}$ to be a bijection. In particular, it remains valid when the polynomial or an outside multiplier is zero. - -A three-literal OR clause $a\lor b\lor c$ is equivalent to the existence of a fresh bit $z$ satisfying +Now fix all other random choices of a downstream test, and couple its decision using (B23) to the decision using the ideal derived bit. The decisions can differ only when those two bits differ. If $\kappa_{\rm actual}$ and $\kappa_{\rm ideal}$ are their rejection probabilities, the same coupling yields $$ -\operatorname{NAE}(a,b,z),\qquad -\operatorname{NAE}(\neg z,c,0), +\kappa_{\rm ideal}\leq\kappa_{\rm actual}+2\epsilon. +\tag{B24} $$ -where NAE means that the three values are not all equal. If $a=b=0$, the first clause forces $z=1$, and the second then forces $c=1$. If $a=b=1$, take $z=0$, which makes the second clause automatic. If $a\ne b$, take $z=0$, and both hold. These cases prove equivalence. - -To encode NAE by a graph, make a palette triangle with colours $0,1,2$. Each Boolean variable has two adjacent vertices, one for itself and one for its negation; both are joined to palette vertex 2. They must therefore receive complementary colours 0 and 1. Constant literals 0 and 1 use the corresponding palette vertices. For a NAE clause, make a new triangle and join its $i$-th vertex to the vertex for its $i$-th literal. If the three literal colours are equal, every vertex of the new triangle is forbidden that colour, so three distinct colours are impossible. If the literals are not all equal, the triangle can be coloured: for literal colours $(0,0,1)$, use triangle colours $(1,2,0)$; complementing or permuting yields the other cases. A colouring of the whole graph can first be relabelled so the palette has colours 0,1,2, after which it yields a satisfying Boolean assignment. The [NAE graph theorem][lean-nae] proves these two constructions. +This is a statement about the actual joint distribution of the verifier's randomness. It neither fixes a favourable seed nor treats the randomized derived answers as a single deterministic oracle close to the intended one. The distinction avoids an unnecessary exchange of quantifiers. -The graph has one palette triangle, two vertices per Boolean variable and three vertices per NAE clause. Encoding its adjacency matrix therefore has quadratic length in those counts. Composing with the one-hot and fixed-arity constructions gives a polynomial-length graph encoding $f(x)$, with +Suppose there is a polynomial $P$ of total degree at most $D$ such that $P(x)=A_x(g(x))$ at every point. This polynomiality is a hypothesis: arbitrary dependence of $A_x$ on $x$ does not establish it. Also assume that $P$ does not vanish on the nonempty grid, that the decoded certificate $M$ has degree at most $D$, and that the field-size, decoding-degree and node hypotheses of (B21) hold. In (B21), take the ideal primary oracle to be exactly $\mathcal H_1(P)$. Its primary distance is zero. Substituting (B24) gives $$ -G_{f(x)}\text{ is three-colourable}\iff x\in L. +\frac{1-Dh/q}{2} +\leq +(1+2C(c))\bigl(\kappa_{\rm actual}+2\epsilon\bigr) ++2\delta_M+\frac{D}{q-1}. +\tag{B25} $$ - - - -The reduction is executable. The program computes $T(n)$, $S(n)$ and the fixed source dimensions, enumerates the tableau variables and relations using arithmetic sum/product indices, emits the fixed-arity clauses and gadgets, and writes the graph's bitstring. The fixed finite alphabet and fixed relation arity make truth-table enumeration constant work per relation up to the machine-dependent factor $2^{k_0}$. Matrix emission is polynomial in the already bounded vertex count. -More explicitly, the [program-bearing reduction theorem][lean-np-runtime] returns $f,p,P,C,e$, all depending only on the NP certificate, such that on every input $x$, program $P$ emits exactly $f(x)$, its charged cost is at most $C(|x|+1)^e$, the output length is at most $p(|x|)$, and graph colourability is equivalent to $x\in L$. The source derives the program cost from fixed polynomial preprocessing plus a sixth-degree bound in the preprocessing size and the variable/constraint counts. Substitution of their polynomial bounds is again a polynomial. The compiler and fixed public symbol codecs give the corresponding finite-machine certificate. These retained data are what the final verifier uses to preprocess its input. - +The replacement error is multiplied by $1+2C(c)$, because it enters through ZERO's rejection term. Omitting that factor would change the quantitative argument. The formal sources are [fresh derived answers](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/HadamardDerivedOracle.lean) and [their use in ZERO](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/DerivedZeroOnGridSoundness.lean). -### Transporting the verifier through the reduction +These establish the testing and correction statements used in the [seven-check soundness argument](#soundness-of-the-seven-check-verifier). In particular, (B15) supplies the fixed witnesses, and (B25) constrains their derived vertex and edge polynomials. Retaining those witnesses through all the checks is what yields one proper colouring. - -Let the amplified graph verifier use exactly $A\lceil\log _2(n+2)\rceil+B$ random bits, and let $|f(x)|\le p(|x|)$, where $p\in\mathbb N[X]$. Put $e=\deg p$, using the source's natural-degree convention for the zero polynomial. Since the coefficients are nonnegative, + -$$ -p(n)\le p(1)(n+2)^e, -\qquad -p(n)+2\le(p(1)+2)(n+2)^e. -$$ +## Appendix. Failure of the earlier scalar test -The first inequality follows term by term from $n^i\le(n+2)^e$ for every exponent with nonzero coefficient; the second also uses $(n+2)^e\ge1$. Therefore + +The earlier test's failure can be seen in a family of arbitrarily large fields, so it is not merely a small-field exception. Let $q=2^{2k}$ for any $k\ge2$, set $c=2$, and choose $\omega$ of order three in $F_q^\times$. Such an element exists because $3$ divides $q-1$. In any dimension $m\ge1$, put $f(x)=x_1^4$. The unit-weight test in v1 accepts when $$ -\lceil\log _2(p(n)+2)\rceil -\le e\lceil\log _2(n+2)\rceil -+\lceil\log _2(p(1)+2)\rceil. +f(u)+\sum_{i=1}^3 f(u+\omega^i v)=0. $$ -Choose source randomness +The characteristic-two Frobenius identity $(a+b)^4=a^4+b^4$ gives, for every pair $u,v$, $$ -a=Ae,\qquad b=A\lceil\log _2(p(1)+2)\rceil+B. +f(u)+\sum_{i=1}^3 f(u+\omega^i v) +=4u_1^4+v_1^4\sum_{i=1}^3\omega^{4i}=0. $$ -These formulas remain valid for constant and zero polynomials; the slope can be zero. On $x$, compute $f(x)$, use the initial portion of the random word needed by the graph verifier, and ignore the rest. Equal-size fibres of the prefix map preserve the exact acceptance probability. If the graph proof bound is $p_0$, the transported bound is $p_0\circ p$, by monotonicity of natural-coefficient polynomials. The query budget is unchanged. [The resource-transport proof][lean-transport] gives these formulas, while [final assembly][lean-assembly] composes the executable reduction with the actual query algorithm. - -This completes the forward theorem: membership in $L$ gives an honest proof for the reduced colourable graph; nonmembership gives a non-colourable graph and hence acceptance at most $1/2$ for every proof. Polynomial preprocessing composed with the polynomial-time graph protocol remains polynomial. All coefficients and degrees depend on the original NP verifier, never on the particular input or proof. - - -### The reverse inclusion - - -Suppose a language has a verifier satisfying the target conditions. An NP witness can be the first $p(n)$ proof bits. The deterministic witness checker runs the verifier for every random seed and accepts exactly if all runs accept. - -There are polynomially many seeds. Indeed, +Here $4=0$, $\omega^4=\omega$, and $1+\omega+\omega^2=0$. Thus the test accepts with probability one. Nevertheless, for every polynomial $P$ of total degree at most two, fix the other $m-1$ coordinates. The polynomial $$ -2^{a\lceil\log _2(n+2)\rceil+b} -\le2^b\bigl(2(n+2)\bigr)^a. +X^4-P(X,x_2,\ldots,x_m) $$ -For each seed, at most $\ell$ answers are requested. Each address is below $p(n)$, and looking up a bit in the supplied finite witness takes polynomial time even using a linear scan. The implementation of each query step is polynomial in the input, random string and bounded answer history. Enumerating all seeds, simulating these runs and accumulating their conjunction therefore takes polynomial time. The [concrete finite-witness checker][lean-concrete-converse] supplies this closure in the same finite-machine model. - -If $x\in L$, perfect completeness gives a proof accepted on every seed. Truncating it to its first $p(n)$ bits preserves every run because no branch reads another address. Conversely, if a finite witness is accepted on every seed, extend it by zeros to an infinite oracle. The acceptance probability of this oracle is one. If $x\notin L$, soundness would make it at most $1/2$, a contradiction. Thus the finite witness relation characterizes $L$, proving the reverse inclusion. - -The remaining task is to identify this certificate class with the reference nondeterministic-machine definition of NP in the unchanged vendored Complexitylib. The [reference-NP equivalence][lean-reference-np] uses two concrete simulations. +has degree exactly four and leading coefficient one. It has at most four roots, so averaging over the fixed coordinates proves $\Delta(f,P)\ge1-4/q$. In particular $f$ is not a degree-two polynomial function. The same argument excludes representations of individual degree at most two. -For the direction from a polynomial-time nondeterministic machine to certificates, a witness records the bounded sequence of nondeterministic choices. A deterministic path checker follows the supplied choices and checks that the machine has accepted when the list ends; the time bound limits the admissible witness length. Its compiled program has polynomial cost, giving a certificate verifier in the concrete model used above. +The fields in this family are unbounded. For any proposed absolute constant $C$, choose $k$ large enough that $q>Cc^3=8C$. Then choose $0<\delta<1/[2(c+2)^2]$ with $2\delta<1-4/q$. The word passes every old test but violates the claimed proximity conclusion of v1 Lemma 3.3 under its stated large-field condition. This identifies a failure of that scalar characterization and soundness lemma; it does not construct a cheating proof for every check of the final PCP verifier. -For the converse, translate the concrete certificate checker into a reference decision machine. A bounded-guess construction computes and enforces the polynomial witness-length bound, guesses a witness within it, and runs the translated checker. An accepting branch exists exactly when an accepted certificate does. The translation and bounded-guess theorems supply the simulation and runtime guarantees; they are imported machine proofs, not additional premises left to the reader. Together these directions identify the certificate class in the PCP theorem with the intended reference NP class. - +In v2, Fact 2.7 and Lemma 3.3 use the full multiplicative generator and the weights (A6), for which the proof above applies. The v2 acknowledgments thank Troy Lee for pointing out the earlier mistake in Lemma 3.3. The calculation here is an ordinary derived explanation of the correction, not a claim that this particular example was Lee's, a novelty claim, or a separately Lean-checked counterexample. [Paper v1, Fact 2.7 and Lemma 3.3][paper-v1]; [corrected v2 and acknowledgments][paper]. -[paper-pcp]: https://arxiv.org/html/2608.17429v2#S7 -[lean-theorem]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Theorem.lean#L25 -[lean-colour-algebra]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorAlgebra.lean#L94 -[lean-colour-grid]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorGrid.lean#L135 -[lean-seven-checks]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorVerifier.lean#L37 -[lean-query-budget]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorVerifier.lean#L362 -[lean-completeness]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorVerifierCompleteness.lean#L101 -[lean-soundness]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorVerifierSoundness.lean#L58 -[lean-difference]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryDifferenceConsistency.lean#L297 -[lean-decoded]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorDecodedSoundness.lean#L86 -[lean-budget]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorSoundnessBudget.lean#L142 -[lean-parameters]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorParameters.lean#L168 -[lean-choice]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorParameterChoice.lean#L89 -[lean-sampling]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorFullFieldSampling.lean#L160 -[lean-binary]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorBinaryVerifier.lean#L250 -[lean-canonical]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorCanonicalVerifier.lean#L168 -[lean-repetition-bound]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/RationalRepetitionBound.lean#L59 -[lean-amplified]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorAmplifiedVerifier.lean#L72 -[lean-runtime-correct]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/ThreeColorBaseCorrect.lean#L14 -[lean-runtime-cost]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/ThreeColorBasePolynomial.lean#L55 -[lean-runtime]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/ThreeColorRuntime.lean#L11 -[lean-tableau]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/NPTableau.lean#L142 -[lean-cell-constraints]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/NPCellConstraints.lean#L227 -[lean-np-reduction]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Reduction/NPThreeColor.lean#L144 -[lean-boolean-clauses]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Reduction/FiniteBooleanConstraints.lean#L187 -[lean-nae]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Reduction/NAEThreeColor.lean#L241 -[lean-np-runtime]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Reduction/NPThreeColorRuntime.lean#L257 -[lean-transport]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Verifier/ReductionResources.lean#L35 -[lean-assembly]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorFinalAssembly.lean#L54 -[lean-concrete-converse]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/ReverseConcrete.lean#L33 -[lean-reference-np]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/ReferenceNPConverse.lean#L39 -[lean-seed-size]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorSeedSize.lean#L170 -[lean-resources]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/ThreeColorResourceBounds.lean#L44 -[lean-field-cost]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/ThreeColorFieldSetupCost.lean#L45 -[lean-tableau-cells]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/TableauCells.lean#L155 -[lean-one-hot]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Reduction/FiniteDomainConstraints.lean#L119 + ## Source and verification account @@ -1953,7 +1994,7 @@ The version notes identify the copies consulted. Theorem and section numbers ref **[Lee26]** Troy Lee. *tcs-formalizations: PCP development*. Lean source, 2026. [Revision a0ce13ed0fa264f051c1278e039596ce65557fa4](https://github.com/troyjlee/tcs-formalizations/tree/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP). This fixed revision is the formal source of the theorem statements, explicit constants, verifier implementation and concrete complexity-model results explained here. The chapter links identify individual files and declarations within it. -**[Shoup05]** Victor Shoup. *A Computational Introduction to Number Theory and Algebra*. First edition. Cambridge University Press, 2005. Consulted version: [Version 1 of the author's electronic edition](https://shoup.net/ntb/ntb-v1.pdf), 15 January 2005. Chapters 20–21 provide the finite-field construction background cited in the primary paper's Fact 2.3. The detailed bounded-search algorithms and explicit cost bounds in the final chapter are those of Lee's formalization, not bounds attributed to this book. +**[Shoup05]** Victor Shoup. *A Computational Introduction to Number Theory and Algebra*. First edition. Cambridge University Press, 2005. Consulted version: [Version 1 of the author's electronic edition](https://shoup.net/ntb/ntb-v1.pdf), 15 January 2005. Chapters 20–21 provide the finite-field construction background cited in the primary paper's Fact 2.3. The detailed bounded-search algorithms and explicit cost bounds in the implementation section are those of Lee's formalization, not bounds attributed to this book. [friedl-sudan]: https://arxiv.org/abs/1307.3975v1 diff --git a/papers/pcp-specialist/generated/lean.json b/papers/pcp-specialist/generated/lean.json index 58c10f5..3c0c6ad 100644 --- a/papers/pcp-specialist/generated/lean.json +++ b/papers/pcp-specialist/generated/lean.json @@ -5,6 +5,7 @@ "PCP.Algebraic.BinaryZeroOnGridSoundness", "PCP.Algebraic.DerivedZeroOnGridSoundness", "PCP.Algebraic.EncodedLineLowDegreeSoundness", + "PCP.Algebraic.EncodedLineLowDegreeTest", "PCP.Algebraic.GeneratorLowDegreeTest", "PCP.Algebraic.GridVanishing", "PCP.Algebraic.PointLineSoundness", @@ -13,6 +14,7 @@ "PCP.Algebraic.ThreeColorFields", "PCP.Algebraic.ThreeColorGrid", "PCP.Algebraic.ThreeColorParameterChoice", + "PCP.Algebraic.ThreeColorVerifier", "PCP.Algebraic.ThreeColorVerifierCompleteness", "PCP.Algebraic.VanishingCertificate", "PCP.Complexity.CostModel", @@ -7522,6 +7524,81 @@ "type": "SOURCE EXCERPT, NOT ELABORATED:\ntheorem inNP_iff_mem {L : Complexity.Language} :\n PCP.InNP Machine.PolyTimeRel L ↔ L ∈ Complexity.NP", "type_dependencies": [], "value_dependencies": [] + }, + { + "axioms": [], + "doc": null, + "end_line": 64, + "is_class": false, + "kind": "def", + "line": 63, + "module": "PCP.Algebraic.SetMultilinear", + "name": "PCP.Algebraic.SetMultilinear.evaluationPoint", + "provenance": "source-read", + "structural_dependencies": [], + "type": "SOURCE EXCERPT, NOT ELABORATED:\ndef evaluationPoint (x : R) : Variables m c → R :=\n fun ij => x ^ ((ij.2 : ℕ) * m ^ (ij.1 : ℕ))", + "type_dependencies": [], + "value_dependencies": [] + }, + { + "axioms": [], + "doc": null, + "end_line": 32, + "is_class": false, + "kind": "abbrev", + "line": 32, + "module": "PCP.Algebraic.EncodedLineLowDegreeTest", + "name": "PCP.Algebraic.EncodedLineLowDegreeTest.Auxiliary", + "provenance": "source-read", + "structural_dependencies": [], + "type": "SOURCE EXCERPT, NOT ELABORATED:\nabbrev Auxiliary (F σ : Type*) (m c t : ℕ) := Lines F σ → RowOracle F m c t", + "type_dependencies": [], + "value_dependencies": [] + }, + { + "axioms": [], + "doc": null, + "end_line": 45, + "is_class": false, + "kind": "structure", + "line": 37, + "module": "PCP.Algebraic.ThreeColorVerifier", + "name": "PCP.Algebraic.ThreeColorVerifier.Proof", + "provenance": "source-read", + "structural_dependencies": [], + "type": "SOURCE EXCERPT, NOT ELABORATED:\nstructure Proof (F : Type*) (n m c t : ℕ) where\n color : Vertex F n → Coefficients t 3 → ZMod 2\n validCert : PairPoint F n → Coefficients t 1 → ZMod 2\n difference : PairPoint F n → Coefficients t 3 → ZMod 2\n properCert : ProperPoint F n → Coefficients t 1 → ZMod 2\n colorLines : EncodedLineLowDegreeTest.Auxiliary F (Fin n) m c t\n validLines : EncodedLineLowDegreeTest.Auxiliary F (Fin n ⊕ Fin n) m c t\n differenceLines : EncodedLineLowDegreeTest.Auxiliary F (Fin n ⊕ Fin n) m c t\n properLines : EncodedLineLowDegreeTest.Auxiliary F (Fin (n + n) ⊕ Fin (n + n)) m c t", + "type_dependencies": [], + "value_dependencies": [] + }, + { + "axioms": [], + "doc": null, + "end_line": 136, + "is_class": false, + "kind": "inductive", + "line": 124, + "module": "PCP.Algebraic.ThreeColorVerifier", + "name": "PCP.Algebraic.ThreeColorVerifier.Query", + "provenance": "source-read", + "structural_dependencies": [], + "type": "SOURCE EXCERPT, NOT ELABORATED:\ninductive Query (F : Type*) (n m c t : ℕ) where\n | color : Vertex F n → Coefficients t 3 → Query F n m c t\n | validCert : PairPoint F n → Coefficients t 1 → Query F n m c t\n | difference : PairPoint F n → Coefficients t 3 → Query F n m c t\n | properCert : ProperPoint F n → Coefficients t 1 → Query F n m c t\n | colorLine : (Vertex F n × Vertex F n) → BinaryLocalCorrection.InnerPoint F m c →\n Coefficients t 1 → Query F n m c t\n | validLine : (PairPoint F n × PairPoint F n) → BinaryLocalCorrection.InnerPoint F m c →\n Coefficients t 1 → Query F n m c t\n | differenceLine : (PairPoint F n × PairPoint F n) → BinaryLocalCorrection.InnerPoint F m c →\n Coefficients t 1 → Query F n m c t\n | properLine : (ProperPoint F n × ProperPoint F n) → BinaryLocalCorrection.InnerPoint F m c →\n Coefficients t 1 → Query F n m c t", + "type_dependencies": [], + "value_dependencies": [] + }, + { + "axioms": [], + "doc": null, + "end_line": 147, + "is_class": false, + "kind": "def", + "line": 139, + "module": "PCP.Algebraic.ThreeColorVerifier", + "name": "PCP.Algebraic.ThreeColorVerifier.read", + "provenance": "source-read", + "structural_dependencies": [], + "type": "SOURCE EXCERPT, NOT ELABORATED:\ndef read (π : Proof F n m c t) : Query F n m c t → ZMod 2\n | .color x q => π.color x q\n | .validCert x q => π.validCert x q\n | .difference x q => π.difference x q\n | .properCert x q => π.properCert x q\n | .colorLine uv x q => π.colorLines uv x q\n | .validLine uv x q => π.validLines uv x q\n | .differenceLine uv x q => π.differenceLines uv x q\n | .properLine uv x q => π.properLines uv x q", + "type_dependencies": [], + "value_dependencies": [] } ] } diff --git a/papers/pcp-specialist/links.json b/papers/pcp-specialist/links.json index a08e495..d37f5cd 100644 --- a/papers/pcp-specialist/links.json +++ b/papers/pcp-specialist/links.json @@ -115,7 +115,7 @@ "id": "pcp-short-abstract", "section": "Abstract", "role": "explains", - "quote": "The PCP theorem states that every language in NP has a polynomial-time verifier with logarithmic randomness, constantly many proof-bit queries, perfect completeness and constant soundness error.", + "quote": "The PCP theorem gives every language in NP a polynomial-time verifier with logarithmic randomness, constantly many proof-bit queries, perfect completeness and soundness error at most one half.", "lean": [ "PCP.np_subset_pcp" ], @@ -146,34 +146,34 @@ "PCP.Algebraic.ThreeColorGrid.colorable_iff_exists_constraints" ], "anchor": { - "heading": "2. Three-colouring as two vanishing conditions", - "block": 7 + "heading": "2. Four polynomials and seven checks", + "block": 8 } }, { "id": "pcp-short-weighted-test", "section": "4", "role": "explains", - "quote": "If (10) rejects with probability $\\delta<1/[2(c+2)^2]$, then $f$ is within $2\\delta$ of a degree-$c$ polynomial.", + "quote": "If uniform $(u,v)$ violates it with probability $\\delta<1/[2(c+2)^2]$, one degree-at-most-$c$ polynomial is within $2\\delta$ of $f$.", "lean": [ "PCP.Algebraic.GeneratorLowDegreeTest.exists_close" ], "anchor": { - "heading": "4. The local tests and their decoding guarantee", - "block": 7 + "heading": "4. What the low-degree tests supply", + "block": 6 } }, { "id": "pcp-short-binary-decoding", "section": "4", "role": "explains", - "quote": "There is no small-rejection premise in (11), and both bounds concern the same decoded polynomial.", + "quote": "Under the field and node assumptions above, every received inner table has one polynomial $U$ of total degree at most $c$ whose full-label and homogeneous-label distances are each at most $K$ times the tester's rejection probability. There is no small-rejection premise: the proof uses the trivial distance bound outside the weighted theorem's small-error regime.", "lean": [ "PCP.Algebraic.BinaryLocalRowDecoding.exists_polynomial_distance_le" ], "anchor": { - "heading": "4. The local tests and their decoding guarantee", - "block": 23 + "heading": "4. What the low-degree tests supply", + "block": 16 } }, { @@ -185,8 +185,8 @@ "PCP.Algebraic.EncodedLineLowDegreeTest.exists_close" ], "anchor": { - "heading": "4. The local tests and their decoding guarantee", - "block": 38 + "heading": "4. What the low-degree tests supply", + "block": 32 } }, { @@ -199,7 +199,7 @@ ], "anchor": { "heading": "5. Correcting the nonuniform certificate queries", - "block": 10 + "block": 11 } }, { @@ -212,7 +212,7 @@ ], "anchor": { "heading": "5. Correcting the nonuniform certificate queries", - "block": 17 + "block": 19 } }, { @@ -225,7 +225,7 @@ ], "anchor": { "heading": "6. One decoding for all seven checks", - "block": 15 + "block": 13 } }, { @@ -280,7 +280,7 @@ ], "anchor": { "heading": "5. Correcting the nonuniform certificate queries", - "block": 19 + "block": 21 }, "section": "5. Correcting the nonuniform certificate queries" }, @@ -309,6 +309,33 @@ "block": 2 }, "section": "1. The theorem and the encoding problem" + }, + { + "id": "pcp-short-proof-table-type", + "section": "2", + "role": "explains", + "quote": "The received proof consists of eight arbitrary binary tables.", + "lean": [ + "PCP.Algebraic.ThreeColorVerifier.Proof" + ], + "anchor": { + "heading": "2. Four polynomials and seven checks", + "block": 18 + } + }, + { + "id": "pcp-short-query-type", + "section": "2", + "role": "uses", + "quote": "A primary address consists of a point and a label.", + "lean": [ + "PCP.Algebraic.ThreeColorVerifier.Query", + "PCP.Algebraic.ThreeColorVerifier.read" + ], + "anchor": { + "heading": "2. Four polynomials and seven checks", + "block": 21 + } } ], "plain": { @@ -360,7 +387,12 @@ "PCP.Algebraic.BinaryZeroOnGridCorrection.rejectionRate_lower_bound": "ZERO rejection lower bound", "PCP.Algebraic.GridVanishing.vanishesOn_iff_exists_decomposition": "Grid vanishing decomposition", "PCP.Algebraic.DerivedZeroOnGrid.rejectionRate_lower_bound": "Derived ZERO rejection bound", - "PCP.ReferenceNP.inNP_iff_mem": "Equivalence with reference NP" + "PCP.ReferenceNP.inNP_iff_mem": "Equivalence with reference NP", + "PCP.Algebraic.SetMultilinear.evaluationPoint": "Digit-substitution point", + "PCP.Algebraic.EncodedLineLowDegreeTest.Auxiliary": "Encoded line-table type", + "PCP.Algebraic.ThreeColorVerifier.Proof": "The eight proof tables", + "PCP.Algebraic.ThreeColorVerifier.Query": "Eight physical query tags", + "PCP.Algebraic.ThreeColorVerifier.read": "Read a tagged proof bit" }, "fidelity_held": "The selected source has not yet been compared against elaborated Lean statements for this page." } diff --git a/papers/pcp-specialist/paper.md b/papers/pcp-specialist/paper.md index 916365e..95cfb53 100644 --- a/papers/pcp-specialist/paper.md +++ b/papers/pcp-specialist/paper.md @@ -1,11 +1,11 @@ # Constant-query verification by algebraic encoding -*A specialist account of the PCP proof of Amireddy, Behera, Srinivasan, Sudan and Willumsgaard, following Troy Lee's formalization* +*A specialist reconstruction of the algebraic PCP proof of Amireddy, Behera, Srinivasan, Sudan and Willumsgaard, following Troy Lee's formalization* ## Abstract -The PCP theorem states that every language in NP has a polynomial-time verifier with logarithmic randomness, constantly many proof-bit queries, perfect completeness and constant soundness error. The algebraic proof of Amireddy, Behera, Srinivasan, Sudan and Willumsgaard obtains these resources by encoding line polynomials as constant-degree multivariate polynomials and encoding field values by low-degree Hadamard words. The first encoding keeps the proof polynomial in size; the second makes the required observations accessible with constantly many bit queries. We reconstruct the resulting proof for three-colourability. Small rejection supplies four decoded polynomials that satisfy the colouring constraints simultaneously. The main step is to justify the certificate queries at nonuniform points, where average proximity alone gives no control. The quantitative statements follow Lee's formal implementation, whose sampling conventions and query counts differ in several places from the paper. +The PCP theorem gives every language in NP a polynomial-time verifier with logarithmic randomness, constantly many proof-bit queries, perfect completeness and soundness error at most one half. We explain the algebraic construction of Amireddy, Behera, Srinivasan, Sudan and Willumsgaard through Troy Lee's formalization. Degree reduction keeps encoded line restrictions polynomial in size; Hadamard words make the required observations available as bit queries. The soundness argument chooses four nearby polynomials and forces them to satisfy the colouring constraints together. Its main difficulty is correction at prescribed certificate points, where average proximity alone gives no control. We derive the rejection-dependent correction bound and its use in the seven-check verifier, taking the underlying low-degree testing theorems as stated inputs. The resource bounds follow the formal variant, including its sampling conventions and query counts. ## 1. The theorem and the encoding problem @@ -29,12 +29,14 @@ Arora–Lund–Motwani–Sudan–Szegedy [3] proved the constant-query theorem, Proof size constrains the encoding as well. Applying the binary encoding directly to a growing line-coefficient vector can require quasipolynomially many bits. The construction first reduces the degree, then applies the binary encoding to individual field values. -A base-$b$ digit expansion turns a line polynomial of degree strictly below $b^c$ into a degree-$c$ polynomial in $cb$ variables. Here $c$ is fixed while $b$ grows. A Hadamard word then makes a binary observation of a field value accessible in one query. Testing and locally correcting the encoded line recovers its value at the required digit-substitution point despite errors. These operations suffice to verify the polynomial constraints. An auxiliary line oracle remains part of the proof, but the verifier's acceptance computation is not recursively re-encoded through repeated PCP composition [1, §1]. +A base-$b$ digit expansion turns a line polynomial of degree strictly below $b^c$ into a degree-$c$ polynomial in $cb$ variables. Here $c$ is fixed while $b$ grows. A Hadamard word then makes a binary observation of a field value accessible in one query. Testing and locally correcting the encoded line recovers the required homogeneous binary observation of its value at the digit-substitution point despite errors. These operations suffice to verify the polynomial constraints. An auxiliary line oracle remains part of the proof, but the verifier's acceptance computation is not recursively re-encoded through repeated PCP composition [1, §1]. -We give the construction for graph three-colourability, keeping the bit-level soundness argument explicit. The [full argument](../long/reasoning-record.md) supplies the underlying bivariate agreement proof, all error estimates and the machine-model reductions; the [worked exposition](../expository/main.md) develops concrete examples of the encodings and constraints. +Low rejection in the four low-degree tests supplies four polynomials close to the received tables. We fix these witnesses and use a difference check and two certificate checks to force a proper colouring. The certificate checks request values at special points. Section 5 derives the correction bound needed there; Section 6 uses it to constrain the same four witnesses simultaneously. + +The [full argument](../long/reasoning-record.md) proves the testing results and explains the machine reductions used here. The [worked exposition](../expository/main.md) follows the construction through finite examples. -## 2. Three-colouring as two vanishing conditions +## 2. Four polynomials and seven checks Let $F$ be a field of characteristic two, of cardinality $q$, containing a primitive cube root of unity $\omega$. Represent the three colours by @@ -43,7 +45,9 @@ $$ \mathcal C=\{1,\omega,\omega^2\}. $$ -For $u,v\in\mathcal C$, their difference satisfies $(u-v)^4=u-v$. Hence $u\ne v$ exactly when $(u-v)^3=1$. Choose a nonempty grid $H^m\subseteq F^m$ large enough to hold the graph's $N$ vertices, adding isolated vertices at unused grid points. Write $h=|H|$. Coordinatewise interpolation gives a colour extension $P$ of degree at most $d_0=m(h-1)$, and a public polynomial $E$ of degree at most $2d_0$ on pairs of grid points. On the grid, $E$ is one on edges of the padded graph and zero elsewhere. +For $u,v\in\mathcal C$, their difference satisfies $(u-v)^4=u-v$. Hence $u\ne v$ exactly when $(u-v)^3=1$. + +Choose a nonempty grid $H^m\subseteq F^m$ large enough to hold the graph's $N$ vertices, adding isolated vertices at unused grid points. Write $h=|H|$. Coordinatewise interpolation gives a colour extension $P$ of degree at most $d_0=m(h-1)$, and a public polynomial $E$ of degree at most $2d_0$ on pairs of grid points. On the grid, $E$ is one on edges of the padded graph and zero elsewhere. Set @@ -77,10 +81,33 @@ M(X,0)=0,\qquad M(X,Z_H(X))=A(X). \tag{2} $$ -Here $Z_H$ is applied coordinatewise. Each nonzero quotient has degree at most $\deg A-h$, so $Y_iU_i$ has degree at most $\deg A$ because $h\ge1$. Thus $M$ has that degree bound too. The converse in (2) holds even for a proposed certificate nonlinear in $Y$: on the grid its two second arguments coincide. The proof therefore needs four principal polynomials, $P,Q_P,M_A,M_B$, together with their encoded line restrictions. The verifier computes the public polynomial $E$ from the graph rather than reading it from the prover's advice. +Here $Z_H$ is applied coordinatewise. Each nonzero quotient has degree at most $\deg A-h$, so $Y_iU_i$ has degree at most $\deg A$ because $h\ge1$. Thus $M$ has that degree bound too. The converse in (2) holds even for a proposed certificate nonlinear in $Y$: on the grid its two second arguments coincide. -## 3. Encoding the values that the verifier needs + +The received proof consists of eight arbitrary binary tables. Their intended honest contents are + +| Primary table | Intended polynomial | Point domain | Label degree | +| --- | --- | --- | --- | +| $f_P$ | Colour extension $P$ | $F^m$ | $3$ | +| $f_Q$ | Difference $Q_P(X,Y)$ | $F^{2m}$ | $3$ | +| $f_A$ | Vertex certificate $M_A$ | $F^{2m}$ | $1$ | +| $f_B$ | Edge certificate $M_B$ | $F^{4m}$ | $1$ | + +Each primary table has an auxiliary table encoding its restrictions to lines. The descriptions above specify the honest proof; received tables may contain arbitrary bits. + +A primary address consists of a point and a label. A label in $\mathcal B_r$ is a squarefree Boolean polynomial of degree at most $r$ in the binary coordinates of a field value; the stored bit is its evaluation (Section 3). If a primary table has point domain $F^k$, its auxiliary table is indexed by an oriented line $(u,v)\in F^k\times F^k$; the row for that line has type + +$$ +h_{u,v}:F^{cb}\times\mathcal B_1\longrightarrow\mathbb F_2. +$$ + +Here $b$ is the digit base, $c$ the fixed inner degree, and $\mathcal B_1$ the affine label space. Honest rows encode the digit-transformed line restriction at the inner point; the label selects one bit of that field value. The verifier also computes the public adjacency polynomial $E$ from the graph. + +One run accepts only if all seven checks pass: four low-degree checks on these primary/auxiliary pairs, two checks of the grid certificates, and a comparison of the received difference bit with the sum of the two received colour bits. Each branch uses its prescribed independent seed. The certificate corrections use the same received auxiliary tables as the low-degree checks. We will justify these operations before proving their joint soundness. + + +## 3. Why two encodings are needed Fix positive integers $b,c$, and consider a univariate polynomial $T(Y)=\sum_{j -## 4. The local tests and their decoding guarantee +## 4. What the low-degree tests supply -The constant-degree inner polynomial is tested by a weighted interpolation identity. Assume $q>2c$, choose a generator $\zeta$ of the full group $F^\times$, and set +The inner polynomial has constant degree $c$. Assume $q>2c$, take a generator $\zeta$ of the full group $F^\times$, and let $$ a_i=\zeta^i,\qquad @@ -157,60 +194,40 @@ a_i=\zeta^i,\qquad \quad(1\le i\le c+1). $$ -The nodes are distinct and nonzero, and every weight is nonzero. A degree-$c$ polynomial satisfies +The nodes and weights are nonzero. Lagrange interpolation gives, for every degree-at-most-$c$ polynomial, $$ f(u)=\sum_{i=1}^{c+1}\eta_i f(u+a_iv). \tag{10} $$ -Conversely, satisfying (10) for every $u,v$ characterizes total degree at most $c$. On a univariate line, subtract the interpolant through $\zeta,\ldots,\zeta^{c+1}$. The constraint at zero gives the zero value; applying it with successively shifted powers of $\zeta$ propagates these zeros through $F^\times$. Every affine line is therefore degree at most $c$. The finite-field line characterization of Friedl–Sudan [9, Lemma 4], under the stronger sufficient hypothesis $q>2c$, gives total degree at most $c$. In characteristic two, this hypothesis implies $q/2-1\ge c$, the condition in that characterization. - -If (10) rejects with probability $\delta<1/[2(c+2)^2]$, then $f$ is within $2\delta$ of a degree-$c$ polynomial. To prove this robust form, replace each value by the plurality of its predictions in (10). A point at which this changes $f$ has conditional test failure at least $1/2$, giving the distance bound. Comparing predictions through the symmetric weighted grid - -$$ -\sum_{i,j}\eta_i\eta_j -f(u+a_i v+a_j w+a_i a_j z) -$$ - -gives the pointwise estimate +We use two precise guarantees of this weighted test. Exact satisfaction for every $u,v$ characterizes total degree at most $c$. If uniform $(u,v)$ violates it with probability $\delta<1/[2(c+2)^2]$, one degree-at-most-$c$ polynomial is within $2\delta$ of $f$. The plurality correction $g$ additionally satisfies the pointwise estimate $$ \Pr_v\left[\sum_i\eta_i f(x+a_iv)\ne g(x)\right] -\le2(c+1)\delta\qquad\text{for every }x, -$$ - -where $g$ is the plurality correction. Fixing a desired constraint of $g$ and comparing its two sides through this grid incurs three losses: $2(c+1)\delta$, $(c+1)\delta$ and $2(c+1)^2\delta$. Their sum is less than one. The two sides are fixed values, so agreement with positive probability makes them equal. Thus $g$ satisfies every constraint, and the exact characterization makes it a degree-$c$ polynomial. The [full weighted argument](../long/reasoning-record.md#2-the-corrected-short-low-degree-test) includes the pointwise prediction bound needed for this last step. The plurality correction and comparison of predictions follow the robust-characterization argument of Rubinfeld–Sudan [7, §4]. Kaufman–Sudan [8, Theorem 2.9] prove a general testability theorem for linear-invariant families with a two-ary independent local formal characterization. As noted in [1, §3.2], these are antecedents of the weighted test; the hypotheses and constants used here are those of Lee's formalized version. - -The weights and full generator are the correction in [1, v2, Fact 2.7 and Lemma 3.3]. The old unit-weight test fails even over arbitrarily large fields. For $q=2^{2k}$, $k\ge2$, take an element $\omega$ of order three and, in any dimension $m\ge1$, put $f(x)=x_1^4$. In characteristic two, - -$$ -f(u)+\sum_{i=1}^3f(u+\omega^iv) -=4u_1^4+v_1^4\sum_{i=1}^3\omega^{4i}=0 +\le2(c+1)\delta\quad\text{for every }x. $$ -for every $u,v$. Yet every total-degree-two polynomial agrees with $f$ on at most a fraction $4/q$ of $F^m$: fix the other coordinates and apply the root bound to a degree-four difference. Thus increasing the field size cannot repair that earlier test. The corrected paper credits Lee for identifying the error. This calculation explains the distinction between the tests; it does not exhibit a cheating proof for all checks of the final verifier. +The [weighted proof](../long/reasoning-record.md#2-the-corrected-short-low-degree-test) derives the pointwise estimate and the three losses $2(c+1)\delta$, $(c+1)\delta$, and $2(c+1)^2\delta$ that force exact satisfaction. It also gives the full-generator argument and the application of Friedl–Sudan [9, Lemma 4]: in characteristic two, $q>2c$ implies the sufficient condition $q/2-1\ge c$. Rubinfeld–Sudan [7, §4] provide the robust-characterization antecedent; Kaufman–Sudan [8, Theorem 2.9] give a general theorem for linear-invariant families with a two-ary independent local formal characterization. The explicit constants here follow Lee's implementation. Appendix A explains why the weights and full generator in corrected [1] matter. -To test a received row $w:\mathcal B_r\to\mathbb F_2$, combine the BLR additivity test [4] with unit preservation, multiplicativity and consistency on affine degree-one labels. Let $\epsilon$ be its rejection probability. The characteristic-two analysis of Bellare, Coppersmith, Håstad, Kiwi and Sudan [6, Theorem 1.2], in the form stated in [1, Theorem B.1], gives a linear functional $\ell$ within $\epsilon$ of $w$. The decoded functional is chosen only in the soundness proof; the verifier performs the local checks. The remaining laws distinguish evaluation functionals from arbitrary linear functionals. For $r\ge2$, use the top-degree product check. It is checked using (9); replacing its three corrected values by their $\ell$-values costs at most $6\epsilon$, and the check itself costs another $\epsilon$. The defect - -$$ -(L,A)\longmapsto\ell(LA)-\ell(L)\ell(A) -$$ +The binary row tester conjoins BLR additivity [4], unit preservation, the implemented product checks and consistency on affine labels. Its soundness contract is this: from any received row $w:\mathcal B_r\to\mathbb F_2$, choose one field value with both full-label and homogeneous-label error at most $28$ times row rejection. This choice is made in the soundness proof; the verifier only runs local tests. -is bilinear for $L\in\mathcal B_1$, $A\in\mathcal B_{r-1}$. For $r\ge2$, a nonzero defect is nonzero on at least a quarter of its arguments, so rejection below $1/28$ forces exact multiplicativity. With $z_i=\ell(Z_i)$, induction on monomials gives $\ell(R)=R(z)$; unit preservation handles the constant monomial: the corrected unit check forces $\ell(1)=1$, since otherwise its discrepancy would be one but its error is at most $3\epsilon<1$. For $r=1$, additivity and unit preservation already give this conclusion. For rows with $\epsilon<1/28$, this gives one field value whose full-label error is at most $\epsilon$. The affine-label consistency check compares a received affine answer with its corrected answer. Its rejection costs at most $\epsilon$, and replacing the corrected answer by $\ell$ costs at most $2\epsilon$. The affine-label error for this same value is therefore at most $3\epsilon$. Homogeneous labels form half the affine domain, so their error is at most $6\epsilon$. For a row with $\epsilon\ge1/28$, choose any value and use $1\le28\epsilon$. Both distances are consequently at most $28$ times row rejection, for one decoded value. +The restriction to homogeneous labels requires a separate deduction. In a row with rejection $\epsilon<1/28$, the characteristic-two linearity estimate [6, Theorem 1.2; 1, Theorem B.1] and the unit/product checks supply an evaluation functional with full-label error at most $\epsilon$. Affine consistency costs at most $\epsilon$ for its check and $2\epsilon$ for masking, so the same value has affine error at most $3\epsilon$. Homogeneous labels occupy half of that affine domain, giving error at most $6\epsilon$. If $\epsilon\ge1/28$, choose any value and use $1\le28\epsilon$. The [complete row proof](../long/reasoning-record.md#testing-a-received-hadamard-word) proves evaluation structure and all these estimates. -The implemented Hadamard test retains product checks at every degree from two to $r$, sharing the read values. Its query count is $2r+4$, hence ten for cubic labels. The v2 algorithm uses only the top-degree product check and has eight queries. The extra checks are included in the counts below. +The implemented tester retains product checks at every degree from two to $r$, sharing read values. Its query bound is $2r+4$, hence ten for cubic labels. The v2 algorithm uses only the top-degree product check and has eight queries. All query bounds here include the implementation's extra checks. -The inner binary polynomial tester flips a fair coin between this Hadamard test and the binary observation of (10) using a random homogeneous label. If its rejection is $\kappa$, each branch rejects with probability at most $2\kappa$. Decode the rows to field values. The weighted relabelling preserves uniform labels; replacing each of the $c+2$ queried bits therefore costs its homogeneous error. Equation (7) converts the resulting binary rejection into field rejection. Apply the weighted theorem when its rejection hypothesis holds, and the trivial distance bound one otherwise. This gives a degree-$c$ polynomial $U$ with both binary distances at most +For a received inner table $w:F^{cb}\times\mathcal B_r\to\mathbb F_2$, the binary polynomial tester flips a fair coin between the row test at a uniform inner point and a homogeneous binary observation of (10) at uniform $u,v,L$. If its rejection is $\kappa$, each branch rejects with probability at most $2\kappa$. Row decoding, the weighted theorem and the half-distance identity give one polynomial $U$ of total degree at most $c$ with $$ -K\kappa,\qquad K=4(c+2)^2\bigl(112(c+2)+60\bigr). +\Delta_{\rm full}(w,\mathcal H_r(U)),\quad +\Delta_{\rm hom}(w,\mathcal H_r(U))\le K\kappa, +\qquad K=4(c+2)^2\bigl(112(c+2)+60\bigr). \tag{11} $$ -There is no small-rejection premise in (11), and both bounds concern the same decoded polynomial. Full-label proximity alone would not justify restriction to the much smaller set of homogeneous labels. +Under the field and node assumptions above, every received inner table has one polynomial $U$ of total degree at most $c$ whose full-label and homogeneous-label distances are each at most $K$ times the tester's rejection probability. There is no small-rejection premise: the proof uses the trivial distance bound outside the weighted theorem's small-error regime. The [binary low-degree proof](../long/reasoning-record.md#a-binary-version-of-the-weighted-low-degree-test) gives the branch calculation. @@ -235,13 +252,15 @@ $$ The factor two is exactly (7). No polynomial consistency among different auxiliary rows has been assumed. -The point-versus-line theorem used here states that if +We import the following point-versus-line contract. Suppose $$ q\ge10^6D^3,\qquad \theta\le\frac1{4\cdot10^6}, $$ -and degree-$D$ line polynomials disagree with a point function on a fraction $\theta$ of uniform triples $(u,v,z)$, then that function is within $2\theta$ of one total-degree-$D$ polynomial. It applies to arbitrary oriented line tables, including zero directions. This is a formalized variant of the line test in [3, Theorem 45], with the explicit bounds above from Lee's proof. The argument uses the bivariate agreement method of [2, §5.2] and [3, Appendix A]. Nearest line polynomials define a corrected point function by plurality. Bivariate agreement on randomly sampled planes controls their predictions at crossings. A ruled surface $x+yh+z(v+yw)$ then compares an entire target line with transverse random lines, forcing that corrected function to have degree at most $D$ on every line. The exact-line characterization converts this into total degree. The full argument contains both the [bivariate error-locator construction](../long/reasoning-record.md#4-bivariate-agreement) and the [point-versus-line proof](../long/reasoning-record.md#5-point-versus-line-soundness), including its exceptional zero-slice estimates. +and arbitrary degree-at-most-$D$ line polynomials disagree with a point function on a fraction $\theta$ of uniform triples $(u,v,z)$. Then the point function is within $2\theta$ of one polynomial of total degree at most $D$. The line table includes all oriented pairs, zero directions, and all parameters $z\in F$; consistency between different parametrizations is not an input assumption. + +This is Lee's explicit variant of [3, Theorem 45]. Its [bivariate agreement proof](../long/reasoning-record.md#4-bivariate-agreement) follows the method of [2, §5.2] and [3, Appendix A]; the [point-versus-line proof](../long/reasoning-record.md#5-point-versus-line-soundness) supplies the stated constants and zero-slice estimates. Applying this theorem to (12) and encoding the resulting field distance yields one polynomial $P$ of degree at most $D$ such that @@ -261,6 +280,8 @@ provided $J\kappa\le1/(4\cdot10^6)$. The restricted conclusion is for homogeneou The points $(x,0)$ and $(x,Z_H(x))$ in (2) occupy special subsets of the certificate's domain. Even a table with tiny average error could be wrong at all these points. The verifier must correct each requested value before using the certificate identities. +A low-degree test averages over the auxiliary anchor as well as its direction. It need not control the rows at one prescribed anchor, so the corrector tests its selected row again. + Fix a target $a$ and choose a uniform homogeneous label $L$. Sample a direction $v$, a nonzero uniform $z\in F^\times$, a separate uniform inner correction direction, and an independent inner-test seed. Test the auxiliary row $h_{a,v}$. Correct that row at $\Phi(z)$ and compare the answer with $f(a+zv,L)$. Reject if the test or comparison fails; otherwise return the correction at $\Phi(0)$. The two corrections use the same inner direction and label. The output is one bit or rejection, with at most $3c+9$ proof-bit reads. Exact primary and auxiliary tables for a polynomial of degree strictly below $b^c$ return $L(P(a))$ for every seed. Let the primary table be within homogeneous distance $\delta$ of a degree-$D$ polynomial $P$, where $D\ge cb^c$. Denote by $R_a$ the actual rejection probability of this corrector at $a$. Its probability of rejection **or** a wrong returned bit satisfies @@ -294,7 +315,9 @@ $$ \frac{1-Dh/q}{2}. $$ -The actual ZERO check samples one $x,L$ and reads a primary bit $a_{\rm bit}$. With the same $x,L$ and independent remaining seeds, its certificate corrections at $(x,0)$ and $(x,Z_H(x))$ return $b_0,b_Z$ or reject. ZERO accepts precisely when neither call rejects, $b_0=0$, and $b_Z=a_{\rm bit}$. A single nonzero residual suffices for the ideal lower bound; independence of the two detections is unnecessary. Let its rejection be $\kappa$, and let $\delta_A,\delta_M$ be the homogeneous distances of the primary and certificate tables from their respective polynomial encodings. Each correction's rejection event is contained in ZERO rejection. This bounds its rejection after averaging over the targets requested by ZERO; it need not bound rejection at every fixed target. Coupling the ideal and actual tests and using (14) twice gives +The actual ZERO check samples one $x,L$ and reads a primary bit $a_{\rm bit}$. With the same $x,L$ and independent remaining seeds, its certificate corrections at $(x,0)$ and $(x,Z_H(x))$ return $b_0,b_Z$ or reject. ZERO accepts precisely when neither call rejects, $b_0=0$, and $b_Z=a_{\rm bit}$. A single nonzero residual suffices for the ideal lower bound; independence of the two detections is unnecessary. + +Let its rejection be $\kappa$, and let $\delta_A,\delta_M$ be the homogeneous distances of the primary and certificate tables from their respective polynomial encodings. Each correction's rejection event is contained in ZERO rejection. This bounds its rejection after averaging over the targets requested by ZERO; it need not bound rejection at every fixed target. Coupling the ideal and actual tests and using (14) twice gives $$ \frac{1-Dh/q}{2} @@ -304,7 +327,7 @@ $$ Thus small observed rejection forces the decoded polynomial to vanish on the grid, once the error terms are below the left side. -For (1), the primary constraint bit is produced from a cubic-encoded colour or difference row using (8) and the fresh mask in (9). If that row has full-label error $\epsilon$, replacing this derived read by its ideal value changes the downstream rejection probability by at most $2\epsilon$. In (15) the ideal primary distance is then zero and the rejection term becomes $\kappa+2\epsilon$: +For (1), the primary constraint bit is produced from a cubic-encoded colour or difference row using (8) and the fresh mask in (9). Write $\epsilon_x$ for the full-label error in the received row at $x$. Conditional on this point, replacing the derived read costs at most $2\epsilon_x$, for every requested label. Since ZERO samples $x$ uniformly, the total loss is at most $2\mathbb E_x\epsilon_x\le2\epsilon$, where $\epsilon$ is the full-table error bound supplied by (13). The downstream rejection probability therefore changes by at most $2\epsilon$. In (15) the ideal primary distance is then zero and the rejection term becomes $\kappa+2\epsilon$: $$ \frac{1-Dh/q}{2} @@ -318,23 +341,14 @@ The factor $1+2C$ multiplies the derived-read error because that error enters th ## 6. One decoding for all seven checks -The received proof consists of eight arbitrary binary tables. Their intended honest contents are - -| Primary table | Intended polynomial | Point domain | Label degree | -| --- | --- | --- | --- | -| $f_P$ | Colour extension $P$ | $F^m$ | $3$ | -| $f_Q$ | Difference $Q_P(X,Y)$ | $F^{2m}$ | $3$ | -| $f_A$ | Vertex certificate $M_A$ | $F^{2m}$ | $1$ | -| $f_B$ | Edge certificate $M_B$ | $F^{4m}$ | $1$ | - -Each primary table has its own auxiliary table of degree-one encodings of digit-encoded line restrictions. These descriptions specify the honest proof; no polynomial structure is assumed of received tables. The verifier runs four outer low-degree tests, two derived ZERO checks, and the received-bit difference check +For the eight arbitrary tables introduced in Section 2, the received-bit difference check is $$ f_Q((x,y),L)=f_P(x,L)+f_P(y,L). \tag{17} $$ -Each branch has its prescribed independent seed; acceptance requires all seven to pass. The same certificate line table is used in its low-degree test and in its correction calls. If the whole verifier rejects with probability $\kappa$, each branch rejects with probability at most $\kappa$. +Fix the received proof. If the whole verifier rejects with probability $\kappa$, each of its seven branches rejects with probability at most $\kappa$, because acceptance is conjunctive. Assume $q\ge10^6D^3$, $q\ge100Dh$ and $m(h-1)\le D$. When $J\kappa\le1/(4\cdot10^6)$, apply (13) to each of the four low-degree tests and choose polynomials $P,Q,M_A,M_B$ of degree at most $D$, each with the appropriate errors at most $\epsilon=S\kappa$. Fix these choices. In (17), replacing the three received bits by the decoded bits costs at most $3\epsilon$. If $Q$ differed from $P(X)-P(Y)$, their nonzero polynomial difference would have relative support at least $1-D/q$. Equation (7) would make the ideal check reject on at least half that fraction. Hence @@ -432,14 +446,27 @@ For the converse, guess the first $p(n)$ proof bits and simulate the verifier on ## Formal correspondence and credits -Using Lean, Lee proved the [forward PCP theorem][lean-forward] with an implemented verifier in a concrete finite-machine model, and the [reverse inclusion in that model][lean-reverse]. Explicit machine simulations identify the concrete witness class with [the NP class in the unchanged vendored ComplexityLib][lean-reference-np]. Our quantitative statements follow his [encoded-line decoding theorem][lean-line], [local-correction guarantee][lean-correction] and [assembled three-colouring argument][lean-assembly]. They retain the homogeneous-label guarantee, whole-field outer sampling, independent branch seeds and ten-query cubic Hadamard test of that implementation. The separate [source and verification account](../long/reasoning-record.md#source-and-verification-account) records the exact source revision, theorem definitions and validation evidence. The old-test calculation in §4 is an ordinary mathematical explanation, not an additional formal theorem. +Using Lean, Lee proved the [forward PCP theorem][lean-forward] with an implemented verifier in a concrete finite-machine model, and the [reverse inclusion in that model][lean-reverse]. Explicit machine simulations identify the concrete witness class with [the NP class in the unchanged vendored ComplexityLib][lean-reference-np]. Our quantitative statements follow his [encoded-line decoding theorem][lean-line], [local-correction guarantee][lean-correction] and [assembled three-colouring argument][lean-assembly]. They retain the homogeneous-label guarantee, whole-field outer sampling, independent branch seeds and ten-query cubic Hadamard test of that implementation. The separate [source and verification account](../long/reasoning-record.md#source-and-verification-account) records the exact source revision, theorem definitions and validation evidence. The old-test calculation in Appendix A is an ordinary mathematical explanation, not an additional formal theorem. This account was prepared by Will Cook with AI assistance. The PCP construction follows Amireddy, Behera, Srinivasan, Sudan and Willumsgaard. It combines their set-multilinear form of inverse-Kronecker degree reduction with the established low-degree Hadamard encoding. The formal proof is due to Troy Lee. The corrected paper acknowledges Lee's identification of the earlier low-degree-test error. This explanatory reconstruction claims no new PCP theorem. +## Appendix A. Why the corrected weighted test matters + + +The weights and full generator are the correction in [1, v2, Fact 2.7 and Lemma 3.3]. The old unit-weight test fails even over arbitrarily large fields. For $q=2^{2k}$, $k\ge2$, take an element $\omega$ of order three and, in dimension $m\ge1$, put $f(x)=x_1^4$. In characteristic two, + +$$ +f(u)+\sum_{i=1}^3f(u+\omega^iv) +=4u_1^4+v_1^4\sum_{i=1}^3\omega^{4i}=0 +$$ + +for every $u,v$. Yet every polynomial of total degree at most two agrees with $f$ on at most a fraction $4/q$ of $F^m$: fixing the other coordinates leaves a nonzero degree-four difference in $x_1$. Thus enlarging the field cannot repair the earlier test. Corrected [1] credits Lee with identifying the error. This calculation concerns that scalar test; it is not a cheating proof against all checks of the final verifier. + + ## References -1. Prashanth Amireddy, Amik Raj Behera, Srikanth Srinivasan, Madhu Sudan and Sophus Valentin Willumsgaard. *A Simple Algebraic Proof of the PCP Theorem*. [arXiv:2608.17429v2](https://arxiv.org/abs/2608.17429v2), 22 October 2026. The earlier test discussed in §4 is in [v1](https://arxiv.org/abs/2608.17429v1), Fact 2.7 and Lemma 3.3; the current construction uses v2. +1. Prashanth Amireddy, Amik Raj Behera, Srikanth Srinivasan, Madhu Sudan and Sophus Valentin Willumsgaard. *A Simple Algebraic Proof of the PCP Theorem*. [arXiv:2608.17429v2](https://arxiv.org/abs/2608.17429v2), 22 October 2026. The earlier test discussed in Appendix A is in [v1](https://arxiv.org/abs/2608.17429v1), Fact 2.7 and Lemma 3.3; the current construction uses v2. 2. Sanjeev Arora and Shmuel Safra. *Probabilistic Checking of Proofs: A New Characterization of NP*. Journal of the ACM **45**(1), 70–122, 1998. [Journal text](https://www.cs.umd.edu/~gasarch/TOPICS/pcp/AS.pdf). The bivariate agreement construction is in §5.2. 3. Sanjeev Arora, Carsten Lund, Rajeev Motwani, Madhu Sudan and Mario Szegedy. *Proof Verification and the Hardness of Approximation Problems*. Journal of the ACM **45**(3), 1998. [Author-hosted manuscript](https://people.seas.harvard.edu/~madhusudan/papers/1992/almss-journ.pdf), especially Theorems 45 and 69 in that manuscript's numbering. 4. Manuel Blum, Michael Luby and Ronitt Rubinfeld. *Self-Testing/Correcting with Applications to Numerical Problems*. Journal of Computer and System Sciences **47**(3), 549–595, 1993. [Author-hosted manuscript](https://people.csail.mit.edu/ronitt/papers/selftestcorrect.pdf). diff --git a/papers/pcp-specialist/paper.toml b/papers/pcp-specialist/paper.toml index dbcfd39..356062c 100644 --- a/papers/pcp-specialist/paper.toml +++ b/papers/pcp-specialist/paper.toml @@ -11,7 +11,7 @@ text = "Original algebraic proof: Amireddy, Behera, Srinivasan, Sudan and Willum [lean] project = "../pcp-full-argument/lean" -modules = ["PCP.Algebraic.BinaryLocalCorrectionSoundness", "PCP.Algebraic.BinaryLocalRowDecoding", "PCP.Algebraic.BinaryZeroOnGridSoundness", "PCP.Algebraic.DerivedZeroOnGridSoundness", "PCP.Algebraic.EncodedLineLowDegreeSoundness", "PCP.Algebraic.GeneratorLowDegreeTest", "PCP.Algebraic.GridVanishing", "PCP.Algebraic.PointLineSoundness", "PCP.Algebraic.SetMultilinear", "PCP.Algebraic.ThreeColorAmplifiedVerifier", "PCP.Algebraic.ThreeColorFields", "PCP.Algebraic.ThreeColorGrid", "PCP.Algebraic.ThreeColorParameterChoice", "PCP.Algebraic.ThreeColorVerifierCompleteness", "PCP.Algebraic.VanishingCertificate", "PCP.Complexity.CostModel", "PCP.Complexity.Machine", "PCP.Complexity.NP", "PCP.Complexity.ReferenceNPConverse", "PCP.Complexity.ThreeColorRuntime", "PCP.Reduction.NPThreeColorRuntime", "PCP.ReverseConcrete", "PCP.Theorem", "PCP.Verifier.Definition"] +modules = ["PCP.Algebraic.BinaryLocalCorrectionSoundness", "PCP.Algebraic.BinaryLocalRowDecoding", "PCP.Algebraic.BinaryZeroOnGridSoundness", "PCP.Algebraic.DerivedZeroOnGridSoundness", "PCP.Algebraic.EncodedLineLowDegreeSoundness", "PCP.Algebraic.EncodedLineLowDegreeTest", "PCP.Algebraic.GeneratorLowDegreeTest", "PCP.Algebraic.GridVanishing", "PCP.Algebraic.PointLineSoundness", "PCP.Algebraic.SetMultilinear", "PCP.Algebraic.ThreeColorAmplifiedVerifier", "PCP.Algebraic.ThreeColorFields", "PCP.Algebraic.ThreeColorGrid", "PCP.Algebraic.ThreeColorParameterChoice", "PCP.Algebraic.ThreeColorVerifier", "PCP.Algebraic.ThreeColorVerifierCompleteness", "PCP.Algebraic.VanishingCertificate", "PCP.Complexity.CostModel", "PCP.Complexity.Machine", "PCP.Complexity.NP", "PCP.Complexity.ReferenceNPConverse", "PCP.Complexity.ThreeColorRuntime", "PCP.Reduction.NPThreeColorRuntime", "PCP.ReverseConcrete", "PCP.Theorem", "PCP.Verifier.Definition"] source = "https://github.com/troyjlee/tcs-formalizations/tree/a0ce13ed0fa264f051c1278e039596ce65557fa4" source_name = "tcs-formalizations at a0ce13e" source_lines = "https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/{path}#L{line}-L{end}" diff --git a/tests/journey.py b/tests/journey.py index 1563c70..1272d5b 100644 --- a/tests/journey.py +++ b/tests/journey.py @@ -1295,6 +1295,62 @@ def at_heading() -> bool: section_link = page.locator(".proof__lean a", has_text="The algebraic PCP theorem").first.inner_text() check(section_link.startswith("The algebraic PCP theorem"), "an unnumbered heading is displayed by title, without a section mark") + # These two ordinary clicks failed in a reported live desktop session. Exercise + # their actual links and the return positions, not only the exposition route. + page.goto(full, wait_until="load") + page.locator(".sheet__text h1").wait_for() + link = page.locator('.sheet__text a[href="./#/pcp-specialist"]').first + link.evaluate("el => el.addEventListener('click', () => { window.companionSourceTop = el.closest('[data-paper-pane]').scrollTop; }, { once: true })") + before = entries(page) + link.click() + origin = page.evaluate("window.companionSourceTop") + page.wait_for_url(f"{specialist}*") + page.locator(".sheet__text h1").wait_for() + check(entries(page) == before + 1, "the long paper's specialist link opens with one history entry") + page.go_back() + page.wait_for_url(f"{full}*") + page.locator(".sheet__text h1").wait_for() + wait_until(page, lambda: abs(top(page) - origin) < 5, "Back restores the long paper's source position") + + page.goto(specialist, wait_until="load") + page.locator(".sheet__text h1").wait_for() + link = page.locator('.sheet__text a[href="./#/pcp-full-argument/@4-bivariate-agreement"]') + link.evaluate("el => el.addEventListener('click', () => { window.companionSourceTop = el.closest('[data-paper-pane]').scrollTop; }, { once: true })") + before = entries(page) + link.click() + origin = page.evaluate("window.companionSourceTop") + wait_until(page, lambda: page.url.startswith(full), "the bivariate link changes to the full-argument route") + wait_until(page, lambda: ( + (box := page.locator(".sheet__text #s-4").bounding_box()) is not None + and (pane := page.locator("[data-paper-pane]").bounding_box()) is not None + and pane["y"] <= box["y"] < pane["y"] + 150 + ), "the specialist's bivariate link opens at the full argument's heading") + check(entries(page) == before + 1, "the bivariate link opens with one history entry") + page.go_back() + page.wait_for_url(f"{specialist}*") + page.locator(".sheet__text h1").wait_for() + wait_until(page, lambda: abs(top(page) - origin) < 5, "Back restores the specialist's source position") + + +def narrow_header(page: Page, url: str, shots: Path | None) -> None: + """A long history label stays in its column when Graph is closed.""" + print("Narrow reader header at 1363px") + page.goto(f"{url}#/pcp-full-argument", wait_until="load") + page.locator(".sheet__text h1").wait_for() + items = page.locator(".rail__item") + items.filter(has_text="A high-degree univariate polynomial as a low-degree multivariate polynomial").click() + items.filter(has_text="Binary labels for field elements").click() + page.locator(".proof__close").click() + page.locator(".proof").wait_for(state="hidden") + back = page.locator(".bar .back") + check("A high-degree univariate polynomial" in back.inner_text(), "history keeps the full source-section Back label") + back_box = back.bounding_box() + title_box = page.locator(".bar__paper").bounding_box() + check(back_box is not None and title_box is not None and back_box["x"] + back_box["width"] + 8 <= title_box["x"], + "the Back label stays clear of the paper title") + check(title_box["width"] >= 100, "the title keeps readable space") + shot(page, shots, "pcp-narrow-header-1363") + def main() -> int: parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) @@ -1351,6 +1407,9 @@ def main() -> int: context = graph_first(browser.new_context(viewport={"width": w, "height": h}, reduced_motion="reduce")) companions(context.new_page(), url, args.shots) context.close() + context = graph_first(browser.new_context(viewport={"width": 1363, "height": 936}, reduced_motion="reduce")) + narrow_header(context.new_page(), url, args.shots) + context.close() browser.close() except Stop as failure: print(f"\nFAILED: {failure}") diff --git a/web/src/app/app.css b/web/src/app/app.css index d033976..667840a 100644 --- a/web/src/app/app.css +++ b/web/src/app/app.css @@ -90,7 +90,7 @@ button:disabled { cursor: default; } .switch button { min-height: 28px; padding: 0 9px; border-radius: var(--radius-s); color: var(--ink-2); white-space: nowrap; } .switch button:hover { color: var(--ink); } .switch button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--thread); text-decoration-thickness: 2px; text-underline-offset: 5px; } -.back { flex: none; min-height: 28px; padding: 0 8px 0 4px; border-radius: var(--radius-s); color: var(--lit); font-size: var(--fs-sm); white-space: nowrap; text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 3px; } +.back { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; min-height: 28px; padding: 0 8px 0 4px; border-radius: var(--radius-s); color: var(--lit); font-size: var(--fs-sm); white-space: nowrap; text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 3px; } .back::before { content: "\2190\00a0"; } .back:hover { background: var(--hover-wash); } .badline { flex: none; margin: 0; padding: 8px 20px; background: var(--highlight-soft); border-bottom: 1px solid var(--rule-strong); font-size: var(--fs-ui); color: var(--ink); }