diff --git a/README.md b/README.md index e35db12..84189e6 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ In the reader these use the routes `#/pcp-full-argument`, `#/pcp-specialist`, and `#/pcp-exposition`; Troy Lee's [original reading guide](papers/pcp-reading-guide/guide.md) remains at `#/pcp-reading-guide`. The algebraic proof is due to Amireddy, Behera, Srinivasan, Sudan and Willumsgaard; Lee wrote the Lean formalization. -AI agents wrote the three explanations under Will Cook's direction. +Will Cook prepared the three explanations with AI assistance. On a desktop, each visit opens with the paper on the left and the proof pane on the right: the graph above the Lean, or beside it on a very wide screen. Drag diff --git a/papers/pcp-exposition/links.json b/papers/pcp-exposition/links.json index 91f3e38..db45fab 100644 --- a/papers/pcp-exposition/links.json +++ b/papers/pcp-exposition/links.json @@ -3,8 +3,8 @@ "claims": [ { "id": "claim-1", - "title": "The forward PCP theorem", - "section": "2. What the theorem promises", + "title": "The PCP theorem", + "section": "2", "passage": "pcp-expository-forward-statement", "lean": [ "PCP.np_subset_pcp" @@ -12,7 +12,7 @@ }, { "id": "claim-2", - "title": "Colouring constraints on the grid", + "title": "Colourings as polynomial equations", "section": "4", "passage": "pcp-expository-colour-polynomials", "lean": [ @@ -21,7 +21,7 @@ }, { "id": "claim-3", - "title": "Grid vanishing decomposition", + "title": "Vanishing on a grid", "section": "5", "passage": "pcp-expository-grid-certificate", "lean": [ @@ -30,7 +30,7 @@ }, { "id": "claim-4", - "title": "Point and line agreement", + "title": "Point-versus-line test", "section": "6", "passage": "pcp-expository-digit-encoding", "lean": [ @@ -39,8 +39,8 @@ }, { "id": "claim-5", - "title": "Decoding the inner weighted test", - "section": "Testing and correcting a polynomial of fixed degree", + "title": "Standard low-degree test", + "section": "6", "passage": "pcp-expository-weighted-test", "lean": [ "PCP.Algebraic.GeneratorLowDegreeTest.exists_close" @@ -48,7 +48,7 @@ }, { "id": "claim-6", - "title": "Linearity from the BLR test", + "title": "BLR linearity test", "section": "7", "passage": "pcp-expository-hadamard", "lean": [ @@ -58,7 +58,7 @@ { "id": "claim-7", "title": "Hadamard test query count", - "section": "Why the construction needs more than linear questions", + "section": "7", "passage": "pcp-expository-cubic-labels", "lean": [ "PCP.Algebraic.Hadamard.testQueries_length" @@ -66,7 +66,7 @@ }, { "id": "claim-8", - "title": "Decoding the outer encoded-line test", + "title": "Binary low-degree test", "section": "8", "passage": "pcp-expository-binary-tests", "lean": [ @@ -76,7 +76,7 @@ { "id": "claim-9", "title": "Soundness for noncolourable graphs", - "section": "9. From the seven checks to a colouring", + "section": "9", "passage": "pcp-expository-soundness", "lean": [ "PCP.Algebraic.ThreeColorVerifier.rejectionRate_ge_of_not_colorable" @@ -93,8 +93,8 @@ }, { "id": "claim-11", - "title": "A proof for a proper colouring", - "section": "9. From the seven checks to a colouring", + "title": "Perfect completeness", + "section": "9", "passage": "linked-source-14", "lean": [ "PCP.Algebraic.ThreeColorVerifier.exists_proof_rejectionRate_eq_zero" @@ -102,8 +102,8 @@ }, { "id": "claim-13", - "title": "Soundness of the grid test", - "section": "8. Combining the encodings and returning to the grid", + "title": "Zero-on-grid test soundness", + "section": "8", "passage": "linked-source-16", "lean": [ "PCP.Algebraic.BinaryZeroOnGridCorrection.rejectionRate_ge" @@ -111,8 +111,8 @@ }, { "id": "claim-14", - "title": "The converse PCP theorem", - "section": "2. What the theorem promises", + "title": "The reverse inclusion", + "section": "2", "passage": "linked-source-17", "lean": [ "PCP.pcp_subset_np_concrete" @@ -120,8 +120,8 @@ }, { "id": "claim-15", - "title": "Homogeneous words differ by half", - "section": "7. A field value represented by many one-bit questions", + "title": "Encodings differ at half the positions", + "section": "7", "passage": "linked-source-18", "lean": [ "PCP.Algebraic.Hadamard.relativeDistance_linearEncode" @@ -129,39 +129,57 @@ }, { "id": "claim-16", - "title": "Verifier resource and soundness bounds", - "section": "10. Randomness, proof length and repetition", + "title": "Rejection gap and repetition count", + "section": "Appendix A. Parameters and error bounds", "passage": "linked-source-19", "lean": [ "PCP.Algebraic.ThreeColorAmplifiedVerifier.verification_guarantees" ] + }, + { + "id": "hadamard-test", + "title": "Hadamard test", + "passage": "pcp-expository-hadamard-test", + "lean": [ + "PCP.Algebraic.Hadamard.test_soundness" + ], + "section": "7" + }, + { + "id": "local-correction", + "title": "Local correction", + "passage": "pcp-expository-local-correction", + "lean": [ + "PCP.Algebraic.BinaryLocalCorrection.failure_le" + ], + "section": "8" } ], "passages": [ { "id": "pcp-expository-opening", - "section": "An algebraic proof of the PCP theorem, through worked examples", + "section": "Introduction", "role": "explains", - "quote": "The same statement holds for every problem whose proposed solutions can be\nchecked in polynomial time.", + "quote": "The same holds for every decision problem whose answer is yes exactly\nwhen some polynomial-length **witness** is accepted by a deterministic\npolynomial-time algorithm.", "lean": [ "PCP.np_subset_pcp" ], "anchor": { - "heading": "An algebraic proof of the PCP theorem, through worked examples", - "block": 5 + "heading": "Introduction", + "block": 2 } }, { "id": "pcp-expository-theorem", "section": "2", "role": "explains", - "quote": "**PCP theorem.** For every $L\\in\\mathrm{NP}$, there are a polynomial-time\nverifier $V$, natural-number constants $a,b,q$, and a polynomial $p$, such\nthat on every input $x$ of length $n$:", + "quote": "**Theorem 2.1 (PCP theorem; [ALMSS98], [AS98]).** For every\n$\\mathcal L\\in\\mathrm{NP}$, there are a polynomial-time verifier $V$,\nnatural-number constants $\\alpha,\\beta,\\ell$, and a polynomial $p$, such\nthat on every input $x$ of length $n$:", "lean": [ "PCP.np_subset_pcp" ], "anchor": { - "heading": "2. What the theorem promises", - "block": 3 + "heading": "2. The PCP theorem", + "block": 2 } }, { @@ -173,7 +191,7 @@ "PCP.Algebraic.ThreeColorGrid.constraints_iff_satisfies" ], "anchor": { - "heading": "4. Turning three colours into polynomial equations", + "heading": "4. Colourings as polynomial equations", "block": 12 } }, @@ -181,38 +199,38 @@ "id": "pcp-expository-grid-certificate", "section": "5", "role": "explains", - "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.", + "quote": "More generally, by the\nCombinatorial Nullstellensatz in the form of [ABSSW26, Lemma 2.9], every\npolynomial vanishing on $H^m$ has a representation", "lean": [ "PCP.Algebraic.GridVanishing.vanishesOn_iff_exists_decomposition" ], "anchor": { - "heading": "5. A certificate for vanishing on a grid", - "block": 3 + "heading": "5. Vanishing certificates", + "block": 1 } }, { "id": "pcp-expository-digit-encoding", "section": "6", "role": "explains", - "quote": "The point-versus-line theorem gives the converse needed for soundness.\nSuppose each supplied line polynomial has degree at most $d$, and sample\n$u,v$ and the line parameter $\\lambda$ uniformly, with $\\lambda$ allowed\nto be zero. Let $\\delta$ be the fraction of comparisons\n$f(u+\\lambda v)=T_{u,v}(\\lambda)$ that fail. The formal theorem says\nthat if $Q\\geq10^6d^3$ and $\\delta\\leq1/(4\\cdot10^6)$, then the point\ntable is within distance $2\\delta$ of one multivariate polynomial of\ntotal degree at most $d$. This conclusion requires no assumption that\nthe supplied line polynomials agree with one another.", + "quote": "If $q\\geq10^6d^3$\nand $\\delta\\leq1/(4\\cdot10^6)$, then $f$ is $2\\delta$-close to a\npolynomial of total degree at most $d$.", "lean": [ "PCP.Algebraic.PointLineTest.exists_close_of_small_rejection" ], "anchor": { - "heading": "6. Keeping the number of queries constant", + "heading": "6. Low-degree tests and the set-multilinear encoding", "block": 2 } }, { "id": "pcp-expository-weighted-test", - "section": "Testing and correcting a polynomial of fixed degree", + "section": "6", "role": "explains", - "quote": "For the converse, use the stated generator nodes and $|F|>2c$.\nIf the rejection rate is $\\delta<1/[2(c+2)^2]$, the function is within\ndistance $2\\delta$ of some polynomial of total degree at most $c$.\nHere distance means the fraction of table entries that differ.\nPassing the relation rarely or at a few selected lines would not give\nthis conclusion. The [corrected paper][paper-v2], Section 3.2, develops\nthis weighted test and its correction procedure; the bounds stated here\nare those of the formal development.", + "quote": "**Theorem 6.2 (standard low-degree test; cf. [ABSSW26, Lemma 3.3]).** With\nthese generator nodes and $q>2c$, if the test rejects with probability\n$\\delta<1/[2(c+2)^2]$, then $f$ is $2\\delta$-close to a polynomial of\ntotal degree at most $c$.", "lean": [ "PCP.Algebraic.GeneratorLowDegreeTest.exists_close" ], "anchor": { - "heading": "Testing and correcting a polynomial of fixed degree", + "heading": "The standard low-degree test and local correction", "block": 4 } }, @@ -220,25 +238,25 @@ "id": "pcp-expository-hadamard", "section": "7", "role": "explains", - "quote": "Bellare, Coppersmith, Håstad, Kiwi and Sudan proved the sharp bound\n([Theorem 1.2][bchks]): a function which fails this test with probability\n$\\varepsilon$ is within distance $\\varepsilon$ of a linear functional.\nIts proof, included in the formal development, uses Fourier analysis on\na finite binary vector space. Appendix B, Theorem B.1 of the\n[corrected paper][paper-v2] states this bound and cites both works.\nThe eight-point example demonstrates the test; the theorem applies to\narbitrary received words.", + "quote": "If the BLR linearity test rejects a word with\nprobability $\\varepsilon$, the word is $\\varepsilon$-close to a linear\nfunctional.", "lean": [ "PCP.Algebraic.BLR.exists_linearMap_distance_le_of_rejection_le" ], "anchor": { - "heading": "7. A field value represented by many one-bit questions", - "block": 10 + "heading": "7. The Hadamard encoding", + "block": 9 } }, { "id": "pcp-expository-cubic-labels", - "section": "Why the construction needs more than linear questions", + "section": "7", "role": "explains", - "quote": "The formal Hadamard test checks these properties using corrected\nanswers. Its degree-three version makes ten bit queries. The current\npaper gives an eight-query version which retains only the top-degree\nproduct check; the pinned Lean verifier also performs lower-degree\nchecks. We use the formal version's count when discussing its\nresources. The linearity example above explains one component, not\nthe whole degree-three test.", + "quote": "Lee's\ndegree-three Hadamard test reads ten bits; their test HadTest reads\neight, retaining only the top-degree product check.", "lean": [ "PCP.Algebraic.Hadamard.testQueries_length" ], "anchor": { - "heading": "Why the construction needs more than linear questions", + "heading": "Labels of degree three", "block": 13 } }, @@ -246,25 +264,25 @@ "id": "pcp-expository-binary-tests", "section": "8", "role": "explains", - "quote": "The combined low-degree theorem supplies **one** polynomial close to\nthe primary oracle on the label sets used later. It is not enough to\nobtain one polynomial for the cubic questions and an unrelated one for\nthe linear questions: both checks must refer to the same decoded\npolynomial. In the formal version, the additional degree-one guarantee\nconcerns homogeneous linear labels; this is the label family used for\nthe final difference check. A certificate table whose entire label\nspace has degree one also receives the full affine-label guarantee.", + "quote": "then there is one polynomial of degree at most $D$ whose encoding is\nwithin $\\varepsilon=S\\kappa$ of the received points table on both\nfull and homogeneous labels.", "lean": [ "PCP.Algebraic.EncodedLineLowDegreeTest.exists_close" ], "anchor": { - "heading": "8. Combining the encodings and returning to the grid", - "block": 8 + "heading": "The stored proof", + "block": 19 } }, { "id": "pcp-expository-assembly", "section": "9", "role": "explains", - "quote": "For soundness, suppose an arbitrary proof string is accepted with\nprobability very close to one. Each of the seven checks must then\nreject rarely, because failure of any one makes the whole verifier reject.", + "quote": "For soundness, fix an arbitrary proof and let $\\kappa$ be the seven-check\nverifier's rejection rate, so that each check rejects with probability at\nmost $\\kappa$.", "lean": [ "PCP.Algebraic.ThreeColorVerifier.rejectionRate_ge_of_not_colorable" ], "anchor": { - "heading": "9. From the seven checks to a colouring", + "heading": "9. Soundness of the seven-check verifier", "block": 6 } }, @@ -272,72 +290,72 @@ "id": "pcp-expository-resources", "section": "10", "role": "explains", - "quote": "The running-time claim requires more than short addresses.\nThe formal implementation computes the field, its arithmetic,\nthe public adjacency extension, the queries and their\nacceptance condition in polynomial time, and compiles\nthese operations to a concrete machine model. The [full\nargument][long] separates this implementation proof from\nthe information-theoretic query and randomness bounds.", + "quote": "Lee also implements the field, arithmetic,\nadjacency extension, queries and acceptance predicate in polynomial time\non a concrete machine model; this proof is in the [full argument][long].", "lean": [ "PCP.Lang.ThreeColorRuntime.polyTimeAlg" ], "anchor": { "heading": "10. Randomness, proof length and repetition", - "block": 5 + "block": 2 } }, { "id": "linked-source-14", - "section": "9. From the seven checks to a colouring", + "section": "9", "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.", + "quote": "For perfect completeness, interpolate a proper colouring, form its\ndifference polynomial, construct both vanishing certificates, and supply\ntheir encodings and lines tables. All seven checks then pass for every\nseed, given the degree-capacity condition $5m(h-1) -Suppose someone hands you a graph and claims that its vertices can be coloured -with three colours, with different colours at the ends of every edge. A -colour for each vertex would let you check the claim by inspecting all the -edges. By the PCP theorem, there is a more redundant certificate that a -randomised checker can test by reading only a constant number of bits. If -the graph is three-colourable, some certificate always passes. Otherwise, -every certificate fails with probability at least one half. - -The same statement holds for every problem whose proposed solutions can be -checked in polynomial time. A polynomial bound is at most $C(n+1)^k$ -for fixed constants $C,k$, where $n$ is the input length. Both the checking -time and the encoded certificate length have such bounds. PCP stands for -*probabilistically checkable proof*. - -The constant bounds the number of **certificate bits read**. The checker may -read the input and perform a polynomial amount of computation. The certificate -is specially encoded; it is not an ordinary written proof read at a few -randomly selected places. The verifier checks relations among entries of -the encoding. - -These notes explain the algebraic construction of Amireddy, Behera, -Srinivasan, Sudan and Willumsgaard, and its formalisation in Lean by Troy -Lee. The construction combines polynomial identities with binary encodings; -it does not use composition of PCP verifiers. We follow the corrected -[October 2026 paper][paper-v2] and identify consequential differences in -the pinned formal development. The theorem itself predates this construction: -its original proofs are due to [Arora and Safra][arora-safra] and -[Arora, Lund, Motwani, Sudan and Szegedy][almss]. - -The intended reader knows polynomial arithmetic, finite sums and elementary -probability, but need not know complexity theory, coding theory or Lean. -By the end, you should be able to follow a colouring constraint from a -field equation to the bits the verifier reads, and explain why frequent -acceptance forces a proper colouring. We will carry one vertex condition from a two-vertex colouring through its -certificate and line encoding to the actual bit queries. The difficult general testing theorems are -stated at their uses; their proofs are in the [full argument][long]. -The [specialist paper][short] gives a shorter mathematical account. +## Abstract + +Every problem in NP has a randomised verifier that uses logarithmically +many random bits, reads a constant number of proof bits, always accepts +some proof of each true instance and rejects every proof of a false one +with probability at least one half. We explain the algebraic proof of this +PCP theorem by Amireddy, Behera, Srinivasan, Sudan and Willumsgaard, as +formalized in Lean by Troy Lee, through worked examples that follow one +colouring constraint down to the bits the verifier reads. + +## Introduction + +Suppose someone gives you a graph and claims that its vertices can be +coloured with three colours, with different colours at the ends of every +edge. By the PCP +theorem, a more redundant **proof**, the bit string the verifier queries, +can be checked by a randomised verifier reading only a constant number of +its bits. If the graph is three-colourable, some proof always passes. +Otherwise, every proof fails with probability at least one half. + +The same holds for every decision problem whose answer is yes exactly +when some polynomial-length **witness** is accepted by a deterministic +polynomial-time algorithm. A polynomial bound is at most $C(n+1)^k$ for +fixed constants $C,k$, where $n$ is the input length; the verifier's +running time and the proof length have such bounds, and only the number +of proof bits read is constant. PCP stands for *probabilistically +checkable proof*. + +The constant-query PCP theorem is due to Arora, Lund, Motwani, Sudan and +Szegedy [ALMSS98], building on Arora and Safra [AS98]. The construction +explained here, which combines polynomial identities with binary +encodings and avoids composition of PCP verifiers, is that of Amireddy, +Behera, Srinivasan, Sudan and Willumsgaard [ABSSW26, version 2]; the +formal proof in the proof assistant Lean, with explicit constants and +corrected test hypotheses, is Troy Lee's [Lee26]. These notes contribute +an explanation through small worked examples. + +We assume polynomial arithmetic, finite sums and elementary probability, +and no complexity theory, coding theory or Lean. After an example +(Section 1) and the statement (Section 2), we develop polynomial +distance, the colouring equations, vanishing certificates, low-degree +tests and the Hadamard encoding in Sections 3 to 7. In Section 8 we combine the +encodings and follow one vertex condition of a two-vertex colouring to +the bits read; in Sections 9 and 10 we prove soundness and bound the +resources. Exercises, solutions and three appendices follow. The testing theorems are proved in the +[full argument][long]; the [specialist paper][short] is a shorter account. -## 1. Why checking a few edges is not enough - -A proper three-colouring of a graph assigns one of three colours to each -vertex so that the ends of every edge have different colours. Finding the -colouring may be difficult, but checking a supplied colouring is easy: -inspect every edge. The colouring is an ordinary certificate. +## 1. Sampling the edges of a colouring Consider the complete graph on four vertices, $K_4$. It has six edges and cannot be three-coloured: among four vertices, two must have the same colour, and those two are joined by an edge. Give its vertices the colours $({\rm red},{\rm red},{\rm green},{\rm blue})$. Exactly one edge has equal -colours at its ends. A checker that samples one edge uniformly catches this -failure with probability $1/6$. +colours at its ends, so sampling one edge uniformly catches this failure +with probability $1/6$. Now add $t$ disjoint triangles, each properly coloured. The graph is still not three-colourable, because it still contains $K_4$, but the displayed @@ -70,136 +74,126 @@ $$ \frac{1}{6+3t}. $$ -For example, three added triangles reduce this to $1/15$. A fixed number -of samples becomes ineffective as $t$ grows: the one bad edge accounts for -a smaller fraction of the sampled edges. - -In the PCP construction, the prover supplies redundant tables related by -algebraic identities. The checker tests only a few entries, but the soundness -proof shows that tables passing very often would determine a proper colouring -of the original graph. For $K_4$, that is impossible. +Three added triangles reduce this probability to $1/15$. For any fixed +number of uniform edge samples, the probability of finding the bad edge +tends to zero as $t$ grows. -There are two obligations. First, the tables must describe coherent -mathematical objects rather than arbitrary strings. Second, those objects -must satisfy the colouring conditions. Testing the second without the -first would allow a dishonest prover to give unrelated answers to different -questions. +The PCP verifier instead reads redundant tables related by algebraic +identities, and checks both that they encode low-degree polynomials and +that those polynomials satisfy the colouring conditions; tables passing often +enough will determine a proper colouring, which for $K_4$ is impossible. -## 2. What the theorem promises +## 2. The PCP theorem -A decision problem is a set $L$ of finite bit strings; a string $x$ is a -yes-instance when $x\in L$. The class NP consists of problems for which -membership has a polynomial-length certificate that a deterministic -polynomial-time algorithm can check. Three-colouring is one such problem. +A decision problem is a set $\mathcal L$ of finite bit strings; a string +$x$ is a yes-instance when $x\in\mathcal L$. The class NP consists of +problems for which membership has a polynomial-length witness that a +deterministic polynomial-time algorithm can check [AB07, §2.1]. +Three-colouring is one such problem. -A verifier is one algorithm, fixed for the problem. The prover fixes its -certificate before the verifier chooses its random bits. - -**PCP theorem.** For every $L\in\mathrm{NP}$, there are a polynomial-time -verifier $V$, natural-number constants $a,b,q$, and a polynomial $p$, such +**Theorem 2.1 (PCP theorem; [ALMSS98], [AS98]).** For every +$\mathcal L\in\mathrm{NP}$, there are a polynomial-time verifier $V$, +natural-number constants $\alpha,\beta,\ell$, and a polynomial $p$, such that on every input $x$ of length $n$: -* $V$ uses exactly $a\lceil\log_2(n+2)\rceil+b$ independent fair random bits; -* on every run it reads at most $q$ bits of a certificate, all at positions +* $V$ uses exactly $\alpha\lceil\log_2(n+2)\rceil+\beta$ independent fair random bits; +* on every run it reads at most $\ell$ bits of a proof, all at positions below $p(n)$; -* if $x\in L$, some certificate is accepted for every choice of the random +* if $x\in\mathcal L$, some proof is accepted for every choice of the random bits; -* if $x\notin L$, every certificate is accepted with probability at most +* if $x\notin\mathcal L$, every proof is accepted with probability at most $1/2$. -The constants, polynomial and verifier are chosen once for $L$, before -$x$. The certificate may depend on $x$, but it may not depend on the random -bits that will be used to check it. A yes-instance has **perfect -completeness**; the upper bound $1/2$ on acceptance of false instances is -the **soundness error**. These conditions are expressed in the formal -[verifier definitions][verifier-definitions] and -[main theorem][lean-theorem]. +The verifier is one algorithm, fixed for $\mathcal L$ together with the +constants and polynomial. The proof may depend on $x$ and is fixed before +the random bits are chosen. A choice of those bits is a **random seed**. +Acceptance for every seed on a yes-instance is **perfect completeness**; +the bound $1/2$ on acceptance of a no-instance is the **soundness error**. -The formula for the random-bit budget is convenient for the formal proof. -Extra random bits can be ignored, so requiring this exact form does not -force the verifier to make use of each bit. It also makes the budget a -specified computable function of the input length. +*Remark (formalization).* The count $\alpha\lceil\log_2(n+2)\rceil+\beta$ +is the **exact randomness formula** of Lee's theorem; surplus bits may be +ignored, and the usual statement asks only for $O(\log n)$ bits. The +conditions above are those of the formal +[verifier definitions][verifier-definitions] and [main theorem][lean-theorem]. Conversely, suppose a problem has a verifier with these properties. Guess -the first $p(n)$ certificate bits, and run the verifier on **all** its +the first $p(n)$ proof bits, and run the verifier on **all** its random strings. There are $$ -2^{a\lceil\log_2(n+2)\rceil+b} -\leq 2^{a+b}(n+2)^a +2^{\alpha\lceil\log_2(n+2)\rceil+\beta} +\leq 2^{\alpha+\beta}(n+2)^\alpha $$ -such strings, a polynomial number because $a,b$ are fixed. Accept the -guessed certificate if every run accepts. Perfect completeness supplies -such a certificate on yes-instances. On a no-instance no certificate can -pass every run, since acceptance probability one would exceed $1/2$. -The certificate and the exhaustive computation both have polynomial size. -Thus the problem is in NP. This proves the equality usually written +random strings, polynomially many because $\alpha,\beta$ are fixed. +Accept the guessed bits if every run accepts. Perfect completeness +supplies such bits on yes-instances and soundness excludes them on +no-instances, all in polynomial time, so the problem is in NP. This +proves the equality $$ \mathrm{NP}=\mathrm{PCP}(O(\log n),O(1)). $$ -The hard direction is constructing the verifier. We first explain it for -three-colouring. A polynomial-time reduction then transfers it to any -problem in NP. +The right-hand side is the class of problems with such a verifier, where +$O(\log n)$ means a bound by a fixed multiple of $\log n$ for all +sufficiently large $n$, and $O(1)$ a constant bound. We construct the +verifier for three-colouring and in Section 10 transfer it to every +problem in NP by a polynomial-time **reduction**, a translation of +inputs into graphs that preserves the answer. -## 3. Why polynomial tables can reveal a hidden defect +## 3. Polynomial distance and interpolation -Work first with arithmetic modulo $5$, in the field -$\mathbb F_5=\{0,1,2,3,4\}$. Addition and multiplication are performed -modulo $5$. In particular, nonzero elements can be divided by: -$2^{-1}=3$, since $2\cdot3=1$ modulo $5$. +First work in the field $\mathbb F_5=\{0,1,2,3,4\}$, with addition and +multiplication modulo $5$. Every nonzero element has a multiplicative +inverse; for example, $2^{-1}=3$ because $2\cdot3=1$ modulo $5$. The polynomial $Z(X)=X(X-1)$ has the following values: | $x$ | $0$ | $1$ | $2$ | $3$ | $4$ | -| --- | --- | --- | --- | --- | --- | +| :-------------------------------- | :-------- | :-------- | :-------- | :-------- | :-------- | | $Z(x)$ | $0$ | $0$ | $2$ | $1$ | $2$ | -It vanishes at two points and is nonzero at three. This reflects a general -fact: a nonzero polynomial of degree at most $d$ over a field has at most -$d$ roots. Each root permits a factor $(X-r)$ to be removed, and repeatedly -removing distinct roots cannot reduce the degree below zero. +It vanishes at two points and is nonzero at three, as it must: a nonzero +polynomial of degree at most $d$ over a field has at most $d$ roots, +since each root permits a factor $(X-r)$ to be removed. Let $F$ be a +finite field with $q$ elements. By this root bound applied to their +difference, two different polynomials of degree at most $d$ over +$F$ disagree on at least a fraction $1-d/q$ of its elements. For +multivariate polynomials the corresponding bound uses **total degree**, +the largest sum of exponents in any nonzero monomial. For example, $X^2Y$ +has total degree three, degree two in $X$, and degree one in $Y$. -Consequently, two different polynomials of degree at most $d$ disagree at -at least a fraction $1-d/Q$ of the elements of a field with $Q$ elements. -Apply the root bound to their difference. For multivariate polynomials, -the corresponding bound uses **total degree**. For example, $X^2Y$ has -total degree three, degree two in $X$, and degree one in $Y$. The total -degree of a polynomial is the largest sum of exponents in any of its -nonzero monomials. If $P$ is a nonzero -polynomial of total degree at most $d$ in $m$ variables, then +**Lemma 3.1 (Schwartz–Zippel lemma; [ABSSW26, Theorem 2.5]).** If $P$ is +a nonzero polynomial over $F$ of total degree at most $d$ in $m$ +variables and $u$ is uniform on $F^m$, then $$ -\Pr_{u\in\mathbb F_Q^m}[P(u)=0]\leq\frac dQ. +\Pr_{u\in F^m}[P(u)=0]\leq\frac dq. $$ -The probability is uniform over the whole ambient space. This is the -polynomial distance estimate used throughout the proof; a proof by -induction on the number of variables is given in the full account. -It is informative when the field is large compared with the degree. - -If a claimed polynomial identity is false, its difference is a nonzero -polynomial. A uniformly random point then finds a failure with high -probability. A false identity cannot differ at just one arbitrarily chosen -location while both sides retain low degree. +A proof by induction on $m$ is in the [full argument][long]. Thus a +uniform point detects a false polynomial identity, whose two sides differ +by a nonzero polynomial of total degree at most $d$, with probability at +least $1-d/q$. -An arbitrary table can agree with a polynomial everywhere except one -entry. A received table therefore needs a separate low-degree test before -we can use the polynomial distance bound. +The **relative Hamming distance**, or simply **distance**, between two +tables on the same finite domain is the fraction of entries on which they +disagree; a table is **$\delta$-close** to another when their distance is +at most $\delta$. An arbitrary table may differ from a polynomial at just +one entry, so a separate test is needed to establish closeness to a +low-degree polynomial before the lemma can be applied. -### Extending a short table +### The low-degree extension -Interpolation turns values on a small set into a polynomial on a larger -space. A polynomial of degree at most two is determined by its values at -three distinct points. Over $\mathbb F_5$, its value at $3$ can be recovered +A polynomial of degree at most two is determined by its values at three +distinct points. Over $\mathbb F_5$, its value at $3$ can be recovered from the values at $0,1,2$ by $$ @@ -216,45 +210,44 @@ $$ \quad\text{in }\mathbb F_5. $$ -These weights are part of the identity. Replacing them by three unit -weights would give $0+1+4=0$, which is not $p(3)$. +Unit weights would give $0+1+4=0$, so the Lagrange weights are necessary +for this interpolation identity. -For a set $H$ of $h$ distinct field elements, let $L_s(X)$ be the +For a set $H$ of $h$ distinct field elements, let $\psi_s(X)$ be the degree-$(h-1)$ polynomial equal to one at $s\in H$ and zero at the other points of $H$: $$ -L_s(X)=\prod_{t\in H,\ t\ne s}\frac{X-t}{s-t}. +\psi_s(X)=\prod_{t\in H,\ t\ne s}\frac{X-t}{s-t}. $$ The grid $H^m$ consists of $m$-tuples of elements of $H$. For $H=\{0,1\}$, -the one-variable basis polynomials are $L_0(X)=1-X$ and $L_1(X)=X$. +the one-variable basis polynomials are $\psi_0(X)=1-X$ and $\psi_1(X)=X$. On the four-point grid $H^2$, the product $X(1-Y)$ is one at $(1,0)$ and zero at the other three points. Multiplying it by $f(1,0)$ contributes exactly the entry at that point. Summing one such term per grid point gives -the general extension of a table $f:H^m\to\mathbb F_Q$: +the general extension of a table $f:H^m\to F$: $$ \widehat f(X_1,\ldots,X_m) -=\sum_{s\in H^m}f(s)\prod_{j=1}^m L_{s_j}(X_j). +=\sum_{s\in H^m}f(s)\prod_{j=1}^m \psi_{s_j}(X_j). $$ -At a grid point, all the basis products are zero except the one indexed -by that point. The extension therefore agrees with $f$ on $H^m$, has -degree at most $h-1$ in each coordinate, and has total degree at most -$m(h-1)$. This gives us an honest polynomial table from an ordinary colouring -table. The proof encodes its values throughout $\mathbb F_Q^m$, not just on -the original grid. +At each grid point, only its own basis product is nonzero. Thus +$\widehat f$, the **low-degree extension** of $f$ [ABSSW26, Fact 2.4], +agrees with $f$ on $H^m$, has degree at most $h-1$ in each coordinate, +and has total degree at most $m(h-1)$. For a colouring, the proof stores +this extension at every point of $F^m$. -## 4. Turning three colours into polynomial equations +## 4. Colourings as polynomial equations -For the colouring construction, use arithmetic with $1+1=0$. Begin with -the four elements $0,1,\omega,1+\omega$, adding their binary coefficients -modulo two and multiplying with the rule $\omega^2=\omega+1$. These -operations form the field $\mathbb F_4$. Subtraction equals addition. -For example, +For the colouring construction, use a field of **characteristic two**, +meaning $1+1=0$. Begin with the four elements $0,1,\omega,1+\omega$, +adding their binary coefficients modulo two and multiplying with the +rule $\omega^2=\omega+1$. These operations form the field +$\mathbb F_4$. Subtraction equals addition. For example, $$ 1-\omega=1+\omega=\omega^2,\qquad @@ -270,9 +263,9 @@ $$ =(ac+bd)+(ad+bc+bd)\omega. $$ -We will use these coordinates again when constructing a bit query. -The full verifier works in a larger characteristic-two field containing -this four-element field. Its three chosen nonzero elements obey +From now on $F$ is a field of characteristic two containing +$\mathbb F_4$; the full verifier works in such a field with $q$ much +larger than four. The three nonzero elements of $\mathbb F_4$ satisfy $$ 1^3=\omega^3=(\omega^2)^3=1. @@ -283,23 +276,20 @@ these colours exactly when $u^3-1=0$. If $u,v$ are valid colours, they are different exactly when $(u-v)^3-1=0$. The residual values are: | $(u-v)^3-1$ | $v=1$ | $v=\omega$ | $v=\omega^2$ | -| --- | --- | --- | --- | +| :-------------------------------- | :------------ | :------------ | :---------------- | | $u=1$ | $1$ | $0$ | $0$ | | $u=\omega$ | $0$ | $1$ | $0$ | | $u=\omega^2$ | $0$ | $0$ | $1$ | -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 -$\mathbb F_4$, including zero. Every edge difference is nonzero and has -cube one, so every edge equation passes. The vertex assigned zero fails -$u^3-1=0$, as it must: this graph cannot be three-coloured. +The vertex equation cannot be dropped. Assign all four elements of +$\mathbb F_4$, including zero, to the vertices of $K_4$. Every edge +difference is nonzero and has cube one, so every edge equation passes, +while the vertex assigned zero fails $u^3-1=0$. -Label the graph's vertices by a grid $H^m$, adding isolated vertices if +Index the graph's vertices by a grid $H^m$, adding isolated vertices if needed. Let $\chi$ be the low-degree extension of a colouring, and let -$\widehat E(x,y)$ extend the adjacency table, whose grid values are one -for an edge and zero otherwise. Define +$\widehat E(x,y)$ be the low-degree extension of the adjacency function, +whose grid values are one for an edge and zero otherwise. Define $$ \begin{aligned} @@ -315,7 +305,7 @@ $\operatorname{Prop}$ vanishes on $H^{2m}$. The adjacency factor makes the second requirement automatic for nonedges. 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$. +Index its ends by $H=\{0,1\}$ and give them colours $1,\omega$. Their interpolating polynomial is $$ @@ -331,46 +321,41 @@ P(X)=\chi(X)^3-1 =(X^2+X)(X+\omega^2). $$ -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. +A proper colouring requires $P$ to vanish only on the grid $\{0,1\}$; at +$x=\omega$, outside it, $\chi(\omega)=0$ and $P(\omega)=1$, yet the +verifier samples the whole field. -## 5. A certificate for vanishing on a grid +## 5. Vanishing certificates 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 +$H=\{0,1\}$, and $P(X)=Z_H(X)(X+\omega^2)$. More generally, by the +Combinatorial Nullstellensatz in the form of [ABSSW26, Lemma 2.9], 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). $$ -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 -the remainder zero. Write $h=|H|\geq1$. Division can choose each nonzero -quotient with $\deg Q_j+h\leq\deg P$: removing a multiple of the monic -degree-$h$ polynomial loses $h$ from its total degree. +Each summand vanishes on the grid. Conversely, divide in each variable +by $Z_H$. The remainder has degree less than $h=|H|\geq1$ +in every variable and is zero on $H^m$; repeated univariate interpolation +therefore makes it zero. Division can choose each nonzero quotient with +$\deg Q_j+h\leq\deg P$, since the divisor is monic of degree $h$. -Reading all $m$ terms would require a number of queries that grows with -the dimension. Following Corollary 2.10 of the [corrected paper][paper-v2], -package the sum into a single polynomial of two groups of variables: +Reading all $m$ terms would take a number of queries growing with $m$. +Following [ABSSW26, Corollary 2.10], package the sum into +a single polynomial of two groups of variables, the **vanishing +certificate** of $P$: $$ M(X,U)=\sum_{j=1}^m U_jQ_j(X). $$ Its degree is at most $\deg P$, because multiplication by $U_j$ adds -one to $\deg Q_j$ and $h\geq1$. This bound will let the honest -certificate fit in the encoding used later. +one to $\deg Q_j$ and $h\geq1$; this bound is used in Section 9. It satisfies two polynomial identities, @@ -390,155 +375,123 @@ M(X,U)=U(X+\omega^2),\qquad Z_H(\omega)=1. $$ 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 -polynomial identity. A random ambient point detects that failure by the -polynomial distance bound. Substituting $Z_H(X_j)$ can multiply degree by $h=|H|$; -the field must be large compared with this resulting degree. Section 9 -checks that requirement. Thus a large collection of grid conditions -has become two random algebraic checks. - -**Question 1.** Could the checker omit the first identity and test only -$M(X,Z_H(X))=P(X)$? Test your answer with the nonvanishing polynomial -$P=1$. Answers to the questions appear in Section 11. - -The remaining problem is that a received table is only *close* to a -polynomial, and the points $(x,0)$ and $(x,Z_H(x))$ are special points. -All its errors could lie there. For instance, in a table on $F^2$, -corrupting the entire row $F\times\{0\}$ changes only a fraction -$1/|F|$ of the entries but ruins every requested entry in that row. -We need to recover a value at a prescribed point through random -locations elsewhere in the table. +$M(\omega,1)=1=P(\omega)$. The identities hold throughout the field, +even though $P(\omega)\ne0$. Both requested values are followed through +the binary encoding in Section 8. + +If $P$ and $M$ have low degree and $P$ is nonzero somewhere on the grid, +one identity fails as a polynomial identity. By Lemma 3.1 a uniform +point then detects the failure, provided $q$ is large compared with the +degree, which substituting $Z_H(X_j)$ can multiply by $h$ (Section 9). + +A table close to a polynomial may still be wrong at prescribed points. +Corrupting the row $F\times\{0\}$ in a table on $F^2$ changes only a +fraction $1/|F|$ of its entries, yet can corrupt every request of the +form $(x,0)$. The checks therefore need a procedure that recovers a +prescribed value through random table locations. - -### 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 - -A low-degree polynomial in many variables restricts to a low-degree -univariate polynomial on each line $u+Yv$. The prover supplies a table -whose row indexed by $(u,v)$ proposes a univariate polynomial -$T_{u,v}$. A parameter $\lambda$ selects the point $u+\lambda v$. -The checker compares its point-table value with $T_{u,v}(\lambda)$. - -The point-versus-line theorem gives the converse needed for soundness. -Suppose each supplied line polynomial has degree at most $d$, and sample -$u,v$ and the line parameter $\lambda$ uniformly, with $\lambda$ allowed -to be zero. Let $\delta$ be the fraction of comparisons -$f(u+\lambda v)=T_{u,v}(\lambda)$ that fail. The formal theorem says -that if $Q\geq10^6d^3$ and $\delta\leq1/(4\cdot10^6)$, then the point -table is within distance $2\delta$ of one multivariate polynomial of -total degree at most $d$. This conclusion requires no assumption that -the supplied line polynomials agree with one another. - -This is the substantial testing theorem we take as an input. Its proof -uses agreement between row and column polynomials to show that the local -line predictions determine one polynomial. The full record supplies the -[bivariate agreement construction](../long/reasoning-record.md#4-bivariate-agreement) -and the [point-versus-line proof](../long/reasoning-record.md#5-point-versus-line-soundness). -Our next task is to implement the comparison using a constant number of bits. - -A line polynomial of degree $d$ has $d+1$ coefficients. Reading all -those coefficients is not a constant number of bit queries when $d$ -grows. The construction encodes the polynomial in a different set of -variables so that its new degree is fixed. - -Here is the operation with two base-$3$ digits. Over $\mathbb F_5$, take +## 6. Low-degree tests and the set-multilinear encoding + +Let $f:F^m\to F$ be an arbitrary table of field values. For +$u,v\in F^m$ the **line through $u$ with slope $v$** is $z\mapsto u+zv$; +$v=0$ is allowed. The pair $(u,v)$ is the line's **index** and $u$ its +**base point**. A polynomial of total degree at most $d$ restricts to a +univariate polynomial of degree at most $d$ on each line. The proof supplies a +polynomial $T_{u,v}$ for each index $(u,v)$, and the +**point-versus-line test** (also called the line-point test) compares +$f(u+zv)$ with $T_{u,v}(z)$. + +**Theorem 6.1 (point-versus-line test; [ALMSS98, Theorem 45], +cf. [ABSSW26, Theorem 2.12]).** Suppose every supplied line polynomial has +degree at most $d$. Sample $u,v\in F^m$ and $z\in F$ independently and +uniformly, including zero, and let $\delta$ be the rejection +probability of the comparison $f(u+zv)=T_{u,v}(z)$. If $q\geq10^6d^3$ +and $\delta\leq1/(4\cdot10^6)$, then $f$ is $2\delta$-close to a +polynomial of total degree at most $d$. + +No agreement between the supplied line polynomials is assumed. A +polynomial of the stated degree whose encoding is within the stated +distance of the received table is called a **nearby polynomial**; the +analysis chooses it, and the verifier never computes it. + +*Remark (formalization).* This is Lee's whole-field version; +[ABSSW26, Theorem 2.12] samples $z\in F^\times$ and concludes distance +$4\delta$ with unspecified absolute constants. + +We use Theorem 6.1 without proof; it is derived in the full argument +from agreement between row and column polynomials, through the [bivariate +agreement construction](../long/reasoning-record.md#45-bivariate-agreement) +and the [point-versus-line argument](../long/reasoning-record.md#46-the-point-versus-line-test). Reading the $d+1$ coefficients of a line polynomial is not +a constant number of bit queries when $d$ grows, so the construction +encodes the polynomial in more variables with a fixed degree. + +For an example with two base-$3$ digits over $\mathbb F_5$, take $$ p(Y)=Y^4+2Y+3. $$ -Since $4=1+1\cdot3$, replace $Y^4$ by $X_{0,1}X_{1,1}$. -Likewise, $1=1+0\cdot3$ and $0=0+0\cdot3$. The encoded polynomial is +Since $4=1+1\cdot3$, $1=1+0\cdot3$ and $0=0+0\cdot3$, replace $Y^4$ by +$X_{0,1}X_{1,1}$, $Y$ by $X_{0,1}X_{1,0}$ and $1$ by $X_{0,0}X_{1,0}$: $$ \widetilde p(X)=X_{0,1}X_{1,1} +2X_{0,1}X_{1,0}+3X_{0,0}X_{1,0}. $$ -It has degree two, although $p$ has degree four. There are more variables, -one group for each digit position. To recover $p(\lambda)$, substitute +It has degree two, with one group of variables for each digit position. +To recover $p(z)$, substitute $$ -(X_{0,0},X_{0,1},X_{0,2})=(1,\lambda,\lambda^2), +(X_{0,0},X_{0,1},X_{0,2})=(1,z,z^2), \qquad -(X_{1,0},X_{1,1},X_{1,2})=(1,\lambda^3,\lambda^6). +(X_{1,0},X_{1,1},X_{1,2})=(1,z^3,z^6). $$ -At $\lambda=2$, these two triples are $(1,2,4)$ and $(1,3,4)$. -The encoded evaluation is $2\cdot3+2\cdot2+3=3$ modulo $5$, -which agrees with $p(2)=2^4+2\cdot2+3=3$ modulo $5$. No quadratic -in the original variable can have these values at all five field elements: -its difference from $p$ would be a nonzero degree-four polynomial with -five roots. The additional variables are doing real work. +At $z=2$, the triples are $(1,2,4)$ and $(1,3,4)$. The encoded +evaluation is $2\cdot3+2\cdot2+3=3$ modulo $5$, equal to +$p(2)=2^4+2\cdot2+3$. No quadratic in the original variable agrees +with $p$ at all five field elements: their difference would be a nonzero +polynomial of degree four with five roots. -In general, write an exponent $j -### Testing and correcting a polynomial of fixed degree +### The standard low-degree test and local correction -For degree at most $c$, interpolation needs $c+1$ values, a fixed number. -The nonzero elements of a finite field form a cyclic multiplicative -group: there is an element $\zeta$ whose successive powers run through -every nonzero field element. We use this standard finite-field theorem -as an algebraic input and call $\zeta$ a generator. The formal -construction chooses $a_i=\zeta^{i+1}$ for $i=0,\ldots,c$, and the -Lagrange weights $\eta_i$ for evaluation at zero. It tests +A polynomial of degree at most $c$ is determined on a line by $c+1$ +values. The nonzero elements of a finite field form a cyclic +multiplicative group [Shoup05, Theorem 9.16]: some element $\zeta$, +called a **generator**, has powers running through all of them. The +formal construction uses the nodes $a_i=\zeta^{i+1}$ for $i=0,\ldots,c$ +and the Lagrange weights $\eta_i$ for evaluation at zero. The +**standard low-degree test** accepts when $$ f(u)=\sum_{i=0}^c\eta_i f(u+a_i v) @@ -548,47 +501,38 @@ at uniformly random $u,v$. An honest polynomial of total degree at most $c$ passes: along a line it is a univariate polynomial of degree at most $c$, so interpolation applies. -For the converse, use the stated generator nodes and $|F|>2c$. -If the rejection rate is $\delta<1/[2(c+2)^2]$, the function is within -distance $2\delta$ of some polynomial of total degree at most $c$. -Here distance means the fraction of table entries that differ. -Passing the relation rarely or at a few selected lines would not give -this conclusion. The [corrected paper][paper-v2], Section 3.2, develops -this weighted test and its correction procedure; the bounds stated here -are those of the formal development. - -The same formula also corrects a value at a prescribed point. Suppose -$f$ differs from a degree-$c$ polynomial $P$ on at most a fraction -$\varepsilon$ of the ambient space. Fix $u$, choose $v$ uniformly, -and return the weighted sum of the $c+1$ surrounding values, without -making a separate query at $u$ (a zero direction can still make a listed -point equal to $u$). Each point $u+a_i v$ is uniform because $a_i\ne0$. -The inverse map is $w\mapsto a_i^{-1}(w-u)$, so every point occurs -with equal probability. If all those values are correct, interpolation returns $P(u)$. -By the union bound, the probability of a wrong answer is at most +**Theorem 6.2 (standard low-degree test; cf. [ABSSW26, Lemma 3.3]).** With +these generator nodes and $q>2c$, if the test rejects with probability +$\delta<1/[2(c+2)^2]$, then $f$ is $2\delta$-close to a polynomial of +total degree at most $c$. + +*Remark (formalization).* The field-size condition $q>2c$ is Lee's. +[ABSSW26, Lemma 3.3] assumes characteristic two and a field size greater +than an unspecified absolute constant times $c^3$. + +The same formula gives **local correction**, the recovery of a value at a +prescribed point, cf. [ABSSW26, Lemma 3.4], which also assumes $q>Cc^3$. Suppose $f$ differs from a +degree-$c$ polynomial $P$ on at most a fraction $\varepsilon$ of $F^m$. +Fix $u$, choose $v$ uniformly, and return the weighted sum of the $c+1$ +values at $u+a_i v$, with no query at $u$ itself unless $v=0$. Each point +$u+a_i v$ is uniform: +since $a_i\ne0$, the inverse map is $y\mapsto a_i^{-1}(y-u)$. If all +sampled values are correct, interpolation returns $P(u)$. The points lie +on one line and need not be independent, but each individual error event +has probability at most $\varepsilon$, so the union bound gives error +probability at most $$ (c+1)\varepsilon. $$ -For the earlier example $p(X)=X^2$, a request at $3$ can be answered -from the surrounding values at $0,1,2$ as $0+2\cdot1+3\cdot4=4$ -modulo five. None of those reads uses $p(3)$. This one choice illustrates -the interpolation; randomising the direction gives the guarantee against -corruption. - -The sampled points need not be independent for this bound: they all -lie on one line, but each individual error event has the required -probability. - -A fixed-degree encoding can therefore be checked with a fixed number -of field queries, and a value at a special point can be recovered through -random points. Each field query still returns several bits. To reach -the promised bit-query bound, we need a binary encoding as well. +Testing and correction now use a fixed number of +field queries; since each field value occupies several bits, a binary +encoding is needed to bound the number of bit queries. -## 7. A field value represented by many one-bit questions +## 7. The Hadamard encoding Start with a three-bit message $s=101$. For every three-bit vector $x$, store the parity @@ -597,55 +541,49 @@ $$ h_s(x)=s\cdot x\pmod2. $$ -The positions of the word are themselves bit vectors. In order -$000,001,010,011,100,101,110,111$, its contents are +Until labels are defined below, $s$ denotes a message, $h_s$, $h$ and +$g$ words, and $r$ a vector. In the order +$000,001,010,011,100,101,110,111$ of positions, the word is $$ (0,1,0,1,1,0,1,0). $$ -These labels are **homogeneous linear**: each is a parity dot product, -with no added constant. They form the homogeneous linear part of a -Hadamard encoding. It stores -eight answers about a message with only three bits. Any two different -messages give words differing in exactly half their positions. Indeed, -their difference is a nonzero linear functional. Choose a vector on -which it is one; adding that vector pairs every zero value with a one value. - -Thus a uniformly random one-bit observation distinguishes two unequal -messages with probability $1/2$. To compare values, the checker queries -the same random linear functional on each and compares the resulting -bits; it does not need to reconstruct either whole message. +These positions are **homogeneous linear** labels: parity dot products +with no constant term. The eight answers form the **Walsh–Hadamard +encoding** of the three-bit message [AB07, §18.4.1]. Encodings of +distinct messages differ at exactly half the positions: their difference +is a nonzero **linear functional**, a map $x\mapsto s'\cdot x$ with +$s'\ne0$, and translation by a vector on which it +is one pairs each zero with a one. Querying the same uniform homogeneous +label on two encodings therefore detects unequal messages with +probability $1/2$. -Blum, Luby and Rubinfeld's [linearity test][blr] checks this kind of -word. Choose independent uniform $a,b$ and check +The **BLR linearity test** of Blum, Luby and Rubinfeld [BLR93] checks +whether an arbitrary **word**, a function from labels to bits, is such an +encoding. Choose independent uniform $a,b$ and check $$ h(a)+h(b)=h(a+b), $$ -where all vector and bit additions are modulo two. An honest word always -passes. Flip the entry at $001$ in our eight-bit word to obtain $g$. -Of the $64$ ordered pairs $(a,b)$, $46$ pass and $18$ fail. One way to -see the rejection count is to track whether an odd number of -$a,b,a+b$ equals $001$. The three relevant sets each have eight -pairs; their pairwise intersections are the three distinct pairs -$(001,001)$, $(001,000)$ and $(000,001)$. Those intersections -contribute two errors, which cancel. The count is therefore +with additions modulo two. An honest word always passes. Flip the entry +at $001$ in our eight-bit word to obtain $g$. +Of the $64$ ordered pairs $(a,b)$, $46$ pass and $18$ fail. To count the +rejections, track whether an odd number of $a,b,a+b$ equals $001$. The +three relevant sets each have eight pairs; their pairwise intersections +are the three distinct pairs $(001,001)$, $(001,000)$ and $(000,001)$, +in each of which two errors cancel. The count is therefore $3\cdot8-2\cdot3=18$. -Bellare, Coppersmith, Håstad, Kiwi and Sudan proved the sharp bound -([Theorem 1.2][bchks]): a function which fails this test with probability -$\varepsilon$ is within distance $\varepsilon$ of a linear functional. -Its proof, included in the formal development, uses Fourier analysis on -a finite binary vector space. Appendix B, Theorem B.1 of the -[corrected paper][paper-v2] states this bound and cites both works. -The eight-point example demonstrates the test; the theorem applies to -arbitrary received words. +**Theorem 7.1 (BLR linearity test; [BCHKS96, Theorem 1.2], +[ABSSW26, Theorem B.1]).** If the BLR linearity test rejects a word with +probability $\varepsilon$, the word is $\varepsilon$-close to a linear +functional. -### Recovering a chosen answer +### Self-correction Suppose we want $h_s(x)$ but distrust the entry at $x$. Choose a uniform $r$ and return @@ -654,57 +592,51 @@ $$ g(r)+g(r+x). $$ -For the honest word this equals $h_s(x)$, because the two appearances -of $h_s(r)$ cancel. If $g$ has error fraction $\varepsilon$, a wrong -answer requires an error at $r$ or at $r+x$. Each is uniform, so the -error probability is at most $2\varepsilon$. +This two-query read is **self-correction** [BLR93], [AB07, §18.4.1]. +For the honest word it equals $h_s(x)$, because the two appearances of +$h_s(r)$ cancel. If $g$ has error fraction $\varepsilon$, a wrong answer +requires an error at $r$ or at $r+x$. Each is uniform, so the error +probability is at most $2\varepsilon$. In our word with one corrupted position, $\varepsilon=1/8$. For each nonzero $x$, exactly six of the eight choices of $r$ give the correct -answer. At $x=0$ the same entry is queried twice, so it cancels even -when corrupt; all eight choices are correct. The general upper bound -$2\varepsilon=1/4$ is attained at every nonzero $x$ in this example. - -**Question 2.** Why would choosing $r=x$ deterministically fail to give -the same guarantee against an arbitrary corrupt word? Which property -of the random choice was used in the proof? - -Random self-correction lets the verifier request a special algebraic -observation using random query locations. The requested location itself -need not be typical. Arora and Barak explain the same two-query operation -in Section 18.4.1 of their [January 2007 draft][arora-barak]. +answer, so the bound $2\varepsilon=1/4$ is attained. -### Why the construction needs more than linear questions +### Labels of degree three -In our four-element field, $u=a+b\omega$ has coordinates $(a,b)$ in -the basis $(1,\omega)$. More generally, fixing a basis represents a field -$F$ of size $2^t$ by $t$ binary coordinates. Write $\rho(u)$ for that -coordinate vector. To check the colouring identities, the -verifier needs observations of expressions such as $u^3-1$. +In a field $F$ of size $q=2^t$, a binary basis is a list of $t$ +elements expressing each field element uniquely as a sum with +coefficients in $\{0,1\}$; in $\mathbb F_4$, $u=a+b\omega$ has +coordinates $(a,b)$ in the basis $(1,\omega)$. Write $\rho(u)$ for the +$t$ coordinates. The colouring identities need observations of +expressions such as $u^3-1$. -For this purpose, it stores a larger word whose positions are Boolean -polynomials $R$ of degree at most three: +Precisely, a **label** is a multilinear polynomial over $\mathbb F_2$ in $t$ +variables $Z_1,\ldots,Z_t$ of degree at most $r$; the **degree-$r$ Hadamard encoding** of +$u$ [ABSSW26, Definition 3.5] stores $R(\rho(u))$ at label $R$. Since +Boolean variables satisfy $Z_i^2=Z_i$ on evaluation, multilinear +monomials, in which no variable is repeated, suffice. The verifier uses $r=3$: $$ -H_3(u)(R)=R(\rho(u)). +\mathcal H_3(u)(R)=R(\rho(u)). $$ -The coefficients of $R$ specify the position; the stored answer is -one bit. Boolean variables satisfy $Z_i^2=Z_i$ when evaluated, so -squarefree monomials suffice. For fixed $u$, this word is linear in -the label $R$, even though $R$ may be cubic in the message coordinates. +For fixed $u$ the word is linear in the label $R$, although $R$ may be +cubic in the coordinates. We write $R(u)$ for $R(\rho(u))$. **Affine** labels have +degree at most one, constants included; **homogeneous** labels are those +without constant term; all labels of degree at most $r$ are the **full** +labels. For $t=3$ there are $8$ homogeneous linear labels, $16$ affine +labels, used later for the certificates and line restrictions, and +$2^8=256$ full labels of degree at most three, used for $\chi$ and $\chi'$. -Multiplication in a finite field is bilinear in its binary coordinates. -Consequently, a linear binary observation $L(u^3-1)$ is a polynomial -of degree at most three in $\rho(u)$. The verifier can compute the -corresponding label and query that one position of $H_3(u)$. -It learns the required bit about $u^3-1$ without reading all $t$ -coordinates of $u$. +Each binary coordinate of a field product is a sum of products of +coordinates of its two factors. Thus a homogeneous observation +$L(u^3-1)$ is a polynomial of degree at most three in $\rho(u)$, and the +verifier obtains it by querying one position of $\mathcal H_3(u)$. -Here is the address calculation in our four-element field. The product -formula in Section 4 gives $u^2=(a+b)+b\omega$, then +In our four-element field, the product formula of Section 4 gives $u^2=(a+b)+b\omega$, then $$ u^3-1=(1+a+b+ab)+0\omega. @@ -716,259 +648,259 @@ $$ \Lambda=1+Z_1+Z_2+Z_1Z_2. $$ -For example, $u=\omega$ has coordinates $(0,1)$, and this label returns -$1+0+1+0=0$, as required by $\omega^3-1=0$. Squaring is linear in binary coordinates in every characteristic-two -field, so $L(u^3-1)$ has Boolean degree at most two in general. -The degree-three label space used by the formal verifier contains these -labels; its query counts refer to that unchanged verifier. - -Linearity in the labels alone is insufficient to establish that a -received word represents a field element. For example, assign values -one to the labels $1$ and $Z_1Z_2$, and zero to $Z_1,Z_2$, then extend -linearly to every label in their span. This is a linear function of -labels, but no evaluation at a point has those values: $Z_1=Z_2=0$ -would force $Z_1Z_2=0$. Evaluation words satisfy $H(1)=1$ and, for example, -$H(Z_1Z_2)=H(Z_1)H(Z_2)$. The displayed false word violates the latter -equation. The general test checks products of labels of the permitted -degrees, using corrected answers. - -**Row-testing theorem used here.** For a word on all squarefree Boolean -labels of degree at most $r\ge1$ over $t$ binary coordinates, conjoin -additivity, unit preservation, affine consistency and the implemented -product checks. If rejection is $\delta<1/28$, one message has full-label -error at most $\delta$ and affine-label error at most $3\delta$. -The same message satisfies both bounds. This is an input from the -[Hadamard soundness proof](../long/reasoning-record.md#testing-a-received-hadamard-word); -the earlier BLR illustration proves neither the product condition nor -this combined theorem. - -The formal Hadamard test checks these properties using corrected -answers. Its degree-three version makes ten bit queries. The current -paper gives an eight-query version which retains only the top-degree -product check; the pinned Lean verifier also performs lower-degree -checks. We use the formal version's count when discussing its -resources. The linearity example above explains one component, not -the whole degree-three test. -The preceding address calculation concerned an honest row. For a received -row $g_x$, its special requested label $\Lambda_{x,L}$ might always be -corrupt, even when the row has small average error. Use the same correction -as before, now on the full polynomial-label space: - -$$ -g_x(R)+g_x(R+\Lambda_{x,L}), -$$ - -where $R$ is a fresh uniform label. For fixed $x,L$, both queried labels -are individually uniform, so row error $\varepsilon_x$ gives answer error -at most $2\varepsilon_x$. The reads need not be independent. Averaging -over uniform $x$ gives the $2\varepsilon$ bound used in Section 9. -Neither every row's error nor the distribution of the requested label -has been assumed uniform. +For $u=\omega$, the coordinates $(0,1)$ give $1+0+1+0=0$, as required. +Since squaring is binary-linear in characteristic two, $L(u^3-1)$ in fact +has degree at most two; we keep Lee's degree-three labels and his query +count. + +Linearity in the labels does not show that a word encodes a field +element. Assign one to $1$ and $Z_1Z_2$, zero to $Z_1,Z_2$, and extend +linearly on their span. No point has these evaluations: $Z_1=Z_2=0$ +forces $Z_1Z_2=0$. Encodings satisfy $\mathcal H_3(u)(1)=1$ and +$\mathcal H_3(u)(Z_1Z_2)=\mathcal H_3(u)(Z_1)\mathcal H_3(u)(Z_2)$, +and the false word violates the product identity. + +**Theorem 7.2 (Hadamard test; cf. [ABSSW26, Lemma 3.10]).** Consider a word +on all full labels of degree at most $r\geq1$ in $t$ variables. The +**Hadamard test** runs the BLR linearity test and, using self-corrected +answers, checks preservation of one and products of an affine factor with +a factor of degree at most $j$, for each $1\leq j + +## 8. The proof tables, binary tests and local correction + +### The stored proof + +The proof consists of eight **tables**, which [ABSSW26] call proof +oracles: four **points tables** and four **lines tables**. The points +table of a polynomial $P$ on $F^k$ stores at each point $x$ the Hadamard +encoding of $P(x)$. Its **lines table** assigns to each index +$(u,v)\in F^k\times F^k$ the restriction $z\mapsto P(u+zv)$, stored after +the set-multilinear encoding and then the Hadamard encoding with affine +labels. The four polynomials are: + +| Polynomial | What it records | Labels | +| :------------ | :--------------------------------------- | :--------------------- | +| $\chi(x)$ | Low-degree extension of the colouring | Degree at most three | +| $\chi'(x,y)$ | Difference $\chi(x)-\chi(y)$ | Degree at most three | +| $M_V(x,u)$ | Vanishing certificate of $\operatorname{Val}$ | Affine | +| $M_E(x,y,u,v)$ | Vanishing certificate of $\operatorname{Prop}$ | Affine | + +An **honest proof** contains these tables for a proper colouring and its +certificates; a received proof may contain arbitrary bits. Lee's +formalization writes $P,Q_P,A_P,B_P,E,M_A,M_B$ for +$\chi,\chi',\operatorname{Val},\operatorname{Prop},\widehat E,M_V,M_E$. + + + -## 8. Combining the encodings and returning to the grid +The two kinds of table have the following addresses. -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 -checker chooses $u,v$ uniformly from the ambient vector space and $z$ -uniformly from the whole field. Zero directions and parameters are included. It tests the -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. 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. +| Table | Address | Stored bit | +| :----------------- | :------------------------------------ | :--------------------------- | +| Points table $f$ | Point $x\in F^k$, label $R$ | $R$ of the value at $x$ | +| Lines table $f'$ | Index $(u,v)\in F^k\times F^k$, inner point $\xi\in F^{cb}$, affine label $R$ | $R$ of the encoded line restriction at $\xi$ | -For a primary polynomial on $F^k$, the two kinds of address are: +At a fixed point $x$ the points table holds the word $w_x$. At a fixed +index $(u,v)$ the lines table holds the **encoded entry** $f'_{u,v}$, +indexed by an **inner point** $\xi$, the argument of the set-multilinear +encoding, and an affine label. In an honest entry, $\xi=\Phi(z)$ gives +the labelled bit of the original line value at $z$. -| Table | Address | Returned object | -| --- | --- | --- | -| Primary | Ambient point $x$ and label $R$ | One bit about the value at $x$ | -| 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$ | +*Remark (formalization).* Lee uses affine labels for all four lines +tables. [ABSSW26, §7] uses degree-three labels for the colour and +difference lines tables. -For an honest auxiliary row, putting $w=\Phi(z)$ recovers an observation -of the original line value at $z$. Correction obtains that observation -using random addresses when the table is corrupt. +The **inner low-degree test** acts on one encoded entry: a fair coin +chooses between the Hadamard test at a uniform inner point and a one-bit +observation of the standard low-degree test of Section 6. The +**binary low-degree test** samples $u,v\in F^k$ and $z\in F$ +independently and uniformly, zero included. It runs the Hadamard test on +the word $w_u$, runs the inner low-degree test on $f'_{u,v}$, and +compares the points-table bit at $(u+zv,L)$ with a self-corrected +lines-table answer at $(\Phi(z),L)$, for an independent uniform +homogeneous label $L$. All three checks must pass. -Field coefficients in the interpolation formula do not require -reading a whole field element. For a homogeneous binary linear -label $L$ and a field weight $\eta$, +*Remark (formalization).* In [ABSSW26, Algorithm 5] the inner low-degree test runs +both components; Lee's fair coin runs one. + +The field weights of the interpolation formula do not require reading a +whole field element. For a homogeneous label $L$ and a field weight +$\eta$, $$ L(\eta u)=(L\circ(\eta\cdot))(u). $$ -For example, multiplying $u=a+b\omega$ by $\omega$ gives -$b+(a+b)\omega$. If $L$ reads the first coordinate, then -$L(\omega u)=b$: the weighted observation asks the second-coordinate -label of the original value. The weight changes the queried label, -not the stored bit after it has been read. Applying $L$ to a -weighted field identity therefore produces an identity among a fixed -number of bits. If the field identity is false, a uniform homogeneous -label detects it with probability $1/2$. - -The combined low-degree theorem supplies **one** polynomial close to -the primary oracle on the label sets used later. It is not enough to -obtain one polynomial for the cubic questions and an unrelated one for -the linear questions: both checks must refer to the same decoded -polynomial. In the formal version, the additional degree-one guarantee -concerns homogeneous linear labels; this is the label family used for -the final difference check. A certificate table whose entire label -space has degree one also receives the full affine-label guarantee. - -There are three label domains. For $t$ coordinate bits, homogeneous -linear labels are sums $\sum_i a_iZ_i$; affine labels may also have a -constant term. Full degree-three labels may use every squarefree monomial -of degree at most three. - -| Label domain | Number for $t=3$ | Later use | -| --- | ---: | --- | -| Homogeneous linear | $8$ | Weighted comparisons and the difference check | -| Affine linear | $16$ | Full label domain of certificate rows | -| Full degree-three | $256$ | Nonlinear derived queries from colour and difference rows | - -A small full-domain error can hide a large error on the first row of -this table. Begin with the full evaluation word of the message $(1,0,1)$. -On its eight homogeneous positions only, replace the answers by those -for $(1,0,0)$. Four answers change. The full error is $4/256=1/64$, -but the homogeneous error is $4/8=1/2$. This is why the testing theorem -must supply both bounds for the same polynomial. - -We need quantitative versions of these statements to know that the -errors will leave a positive gap. Fix a positive inner degree $c$ and -a positive digit base $b$, put $D=cb^c$, and write $Q=|F|$. The analysis gives -constants $E,S,C$ depending only on $c$. Their roles are: $E$ controls -the field-valued line error, $S$ converts test rejection into code distance, -and $C$ controls correction failure. Their [exact formulas](#the-error-constants) -are collected after the exercises. With the prescribed interpolation nodes, if the complete -encoded-line tester rejects with probability at most $\kappa$, and - -$$ -Q\geq10^6D^3, -\qquad E\kappa\leq\frac1{4\cdot10^6}, -$$ - -there is one polynomial of degree at most $D$ whose encoding differs from the -received primary table on at most a fraction $\varepsilon=S\kappa$ -of full labels, and on at most that fraction of homogeneous labels. -Both distances average over the ambient point as well as the indicated -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. - -1. Independently choose a uniform direction $v$ from the whole ambient - vector space, a uniform nonzero $z\in F^\times$, and a uniform homogeneous - label $L$. Choose a separate uniform direction from the full inner digit - space and an independent seed for the inner test. -2. Test the auxiliary row for the line $a+Yv$. Reject if it fails. -3. Correct that row at $\Phi(z)$ and compare the bit with the primary - answer at $(a+zv,L)$. Reject if they differ. +For example, $\omega(a+b\omega)=b+(a+b)\omega$. If $L$ reads the +first coordinate, $L(\omega u)=b$, so the weighted query asks for the +second coordinate of $u$: the weight is incorporated into the label. +Applying $L$ to a weighted field identity gives an identity among a fixed +number of bits, and a uniform homogeneous label detects a false field +identity with probability $1/2$. + +The analysis needs **one** nearby polynomial whose encoding is close to +the points table both on its full labels (affine labels, for the +certificate tables) and on the homogeneous labels. A small error on the +full labels can conceal a large homogeneous error: in the encoding of +$(1,0,1)$ on the 256 full labels of Section 7, substitute the answers for +$(1,0,0)$ at the eight homogeneous positions. Four answers change, so the +full-label error is $4/256=1/64$ while the homogeneous-label error is +$4/8=1/2$. + +Fix positive integers $c,b$ and put $D=cb^c$. Constants $J,S,C$ depend +only on $c$: $J$ bounds field-valued line error, $S$ converts rejection +to encoding distance, and $C$ bounds the correction-failure contribution +from rejection. Their [formulas](#the-error-constants) are in Appendix A. + +**Theorem 8.1 (binary low-degree test; cf. [ABSSW26, Theorem 4.1]).** With +the generator nodes of Section 6, if the binary low-degree test +rejects with probability at most $\kappa$ and + +$$ +q\geq10^6D^3, +\qquad J\kappa\leq\frac1{4\cdot10^6}, +$$ + +then there is one polynomial of degree at most $D$ whose encoding is +within $\varepsilon=S\kappa$ of the received points table on both +full and homogeneous labels. Each distance averages over the point of +$F^k$ and the specified label domain. + +*Remark (formalization).* Lee samples $z$ from all of $F$ and concludes +closeness on homogeneous labels with explicit constants, derived in the +[full argument][long]; the second guarantee of [ABSSW26, Theorem 4.1] +concerns all affine labels. + +The binary low-degree test averages over base points and slopes, but a +local corrector requesting the value at $a\in F^k$ uses only entries with +base point $a$. These form a fraction $q^{-k}$ of the lines table, yet +they include every entry this corrector can select, and all of them +could be corrupt (Exercise 7). Randomising the +slope leaves the base point fixed, so the corrector tests its selected +entry again, and the rejection rate of that test enters the bound. + +At a fixed target $a\in F^k$, the **local corrector** runs the following +experiment. + +1. Independently choose a uniform slope $v\in F^k$, a uniform nonzero + $z\in F^\times$, a uniform homogeneous label $L$, a uniform inner + slope $e\in F^{cb}$ and an independent seed for the inner low-degree + test. +2. Run the inner low-degree test on the entry for the line $a+Yv$. + Reject if it fails. +3. Correct that entry at $\Phi(z)$ and compare the bit with the + points-table answer at $(a+zv,L)$. Reject if they differ. 4. Otherwise return its correction at $\Phi(0)$, using the same inner - direction and label. Exact primary and auxiliary tables for $P$ of degree - strictly below $b^c$ return $L(P(a))$ for every seed. + slope and label. + +The output is rejection or one bit; honest tables of a polynomial $P$ of +degree strictly below $b^c$ return $L(P(a))$ for every seed. -Thus the output is either rejection or one bit. Suppose the primary table -has homogeneous distance at most $\delta$ from a degree-$D$ polynomial -$P$, and this procedure rejects with probability $R_a$. Then +**Theorem 8.2 (local correction; cf. [ABSSW26, Theorem 5.1]).** +Suppose the points table has homogeneous distance at most $\delta$ from +a polynomial $P$ of degree at most $D$, and the local corrector at $a$ +rejects with probability $\kappa_a$. Then $$ \Pr[\text{rejection or wrong returned bit}] -\leq C R_a+\delta+\frac{D}{2(Q-1)}. +\leq C \kappa_a+\delta+\frac{D}{2(q-1)}. $$ -To understand the three terms, decode the tested auxiliary rows to -candidate line polynomials. Poor auxiliary rows cause inner-test rejection, -so their correction errors are bounded by a constant times $R_a$. -If a candidate line has the wrong value at zero, its difference from -$P(a+Yv)$ is a nonzero degree-$D$ polynomial. It can hide that discrepancy -at at most $D$ of the $Q-1$ nonzero comparison points. A random homogeneous -observation distinguishes unequal field values with probability one half; -this gives the displayed root loss. Finally, $a+zv$ is uniform for fixed -nonzero $z$, so replacing its primary answer costs at most $\delta$. -The full proof counts both auxiliary corrections and the rejection event -in the coefficient $C$. +*Remark (formalization).* Lee assumes closeness only on homogeneous +labels and gives the explicit constant $C$; [ABSSW26, Theorem 5.1] +assumes closeness on all affine labels and bounds the failure by an +$O_c(\cdot)$ term. -This probability includes a uniformly random homogeneous label; it is -not a guarantee for every fixed label. It assumes no honesty of the -auxiliary line table and no smallness of $R_a$. The term $C R_a$ is -useful because a later test that rejects whenever correction rejects -will bound $R_a$ by its own rejection rate, after averaging over its -requested targets. +The probability averages over a uniform homogeneous label; it is not a +bound for each fixed label, and no assumption on the lines table or on +$\kappa_a$ is needed. For the three terms, choose a nearby line +polynomial for each tested entry. The inner low-degree test bounds each entry's +encoding distance by a constant times its rejection rate, and averaging +over slopes bounds the resulting correction errors by a constant times +$\kappa_a$. If a chosen +line polynomial has the wrong value at zero, its difference from +$P(a+Yv)$ is a nonzero polynomial of degree at most $D$, with at most $D$ +roots among the $q-1$ nonzero comparison points. A uniform homogeneous +label distinguishes unequal field values with probability $1/2$, giving +the term $D/[2(q-1)]$. Finally, for nonzero $z$ the point $a+zv$ is +uniform, so replacing its points-table answer costs at most $\delta$. -We can now return to the two identities for the vanishing certificate: +Return to the two identities for the vanishing certificate: $$ M(x,0)=0, \qquad M(x,Z_H(x))=P(x). $$ -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. -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. - -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, -one of the few answers used in the comparison must be wrong. -The correction bounds control that probability. If $P$ fails to -vanish on the grid, the ideal test has a positive rejection rate -by the polynomial distance estimate from Section 5. After deducting -the controlled errors, a positive rejection rate remains for the -actual test. Section 9 gives the exact inequality and the error -budget making it positive; the full argument proves the estimates. - -Global closeness by itself would not justify either certificate -read. At each requested point, the correction theorem bounds rejection -or a wrong answer using both the global error fraction and the -corrector's actual rejection rate. +The **zero-on-grid test**, cf. [ABSSW26, Theorem 6.1], written ZERO there, +chooses a uniform point $x$ and homogeneous label $L$, obtains a +constraint bit $p(x,L)$, and calls the local corrector of the certificate +tables at $(x,0)$ and $(x,Z_H(x))$ with this $L$ and independent +remaining seeds. It accepts when the calls return $b_0=0$ and +$b_Z=p(x,L)$, and rejects if either call rejects, so its rejection rate +bounds each correction's rejection *averaged over its requested targets*, +though not for every fixed target. + +*Remark (formalization).* In [ABSSW26, Algorithm 7] the two corrector +calls share one seed; Lee's calls have independent seeds. + +For colouring, the constraint bit $p(x,L)$ is a self-corrected read of +the colour table (vertex check) or difference table (edge check), with +the public adjacency value incorporated into the edge label. Honest +encodings and their certificates pass for every seed. The **ideal test** +reads the values of the nearby polynomials in place of the received +answers; a failed grid condition forces it to reject through Lemma 3.1, +and the cost of the replacement is bounded in Section 9. - -### Following the one-edge certificate to bits +### The one-edge vanishing certificate in 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 +Take the homogeneous label $L$ with $L(a+b\omega)=a$. The desired bit is +$L(P(\omega))=1$, obtained from +$\Lambda=1+Z_1+Z_2+Z_1Z_2$. With fresh random label $R=Z_1$, the two +colour-table reads are -| Address | Bit on the honest row, where $\chi(\omega)=0$ | -| --- | ---: | +| Address | Bit of the honest word, 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. +Their sum is the required bit; on honest data every choice of $R$ gives +it. The certificate targets are $A=(\omega,0)$ and $B=(\omega,1)$. -Consider a run where both independently chosen outer directions equal +Consider a run where both independently chosen slopes equal $v=(1,1)$ and both nonzero comparison parameters equal $z=1$. The honest line restrictions are @@ -977,416 +909,341 @@ 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. +Both have value zero at the comparison parameter $1$. Thus the +points-table comparison reads at $((\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 +Take $b=3,c=1$. The set-multilinear 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). +T(\xi)=\omega^2T(\xi+\omega e)+\omega T(\xi+\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. +Take the inner slope $e=(0,1,0)$ in each call. For $u=a+b\omega$ the +weights become bit labels: $L(\omega^2u)=a+b$ and $L(\omega u)=b$. The +table lists the eight correction reads. Each call also runs the inner +low-degree test, which chooses by a fair coin between the Hadamard test +and the standard low-degree test; those test reads are omitted. Each +address includes its call's base point $A$ or $B$ and slope $v$; the +labelled columns specify the inner point and label. | 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. +The comparison bits agree with the two points-table reads. The inner +low-degree tests pass on honest data, and the calls return +$b_0=0,b_Z=1$. The zero-on-grid test accepts because $b_0=0$ and +$b_Z=1=p(\omega,L)$. + +The two calls' remaining seeds are independent given $x,L$; the +displayed run has equal outcomes. The small field and $c=1$ do not satisfy +the parameter conditions of the $c=4$ verifier. -## 9. From the seven checks to a colouring - -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. - -![Which of the eight stored tables each of the seven checks may query. A dot marks table use, not the number of queries. The shaded vertex ZERO column is the branch illustrated in Section 8.](table-checks.png) - -The line tables used for correction are the same ones used in the low-degree tests. In check 5, the colour table supplies a derived observation of $\chi(x)^3-1$, while the vertex-certificate tables supply corrected observations at $(x,0)$ and $(x,Z_H(x))$. This is the path followed by the one-edge example. Its displayed reads illustrate that branch; they omit the inner-test queries and do not run the complete seven-check verifier. Check 6 also uses the public adjacency polynomial, which is computed from the input graph and is not a ninth proof table. - - -The separate difference table lets the verifier obtain binary -observations of the cube of a difference using the same local -operations as for the colouring table. If the verifier accepts sufficiently often, the difference check forces -its decoded polynomial to equal the difference of the decoded colouring -values. - -For perfect completeness, start with a proper colouring, interpolate it, -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. Appendix A checks the -sufficient condition $5m(h-1) ## 10. Randomness, proof length and repetition -The table sizes and the randomness budget have to be controlled -alongside the query count: the PCP theorem requires polynomial proof -length and logarithmic randomness as well as constant queries. - -Choose a fixed inner degree $c=4$, a grid dimension and digit base $s$, -and a characteristic-two field with $t$ binary coordinates. The -[parameter calculation](#parameter-calculation) chooses these so that -$st=O(\log N)$ and $t^3=O(\log N)$, while the grid holds all $N$ vertices -and the field satisfies the degree and error bounds from Section 9. - -A point address uses $O(st)$ bits. A degree-three label is specified by -the coefficients of $1+t+\binom t2+\binom t3$ monomials, using $O(t^3)$ -bits. Only a fixed number of field vectors and labels occur in each -address or seed. Both therefore have $O(\log N)$ bits. There are -$2^{O(\log N)}=N^{O(1)}$ addresses, giving polynomial proof length. -The appendix treats $N=0,1$ separately and verifies the honest degree capacity. - -Fair random bits give uniform field elements directly, -since $|F|$ is a power of two. Each of the two ZERO tests makes two certificate-correction calls. -These four calls have one nonzero comparison parameter apiece. The -implementation instead samples each from the whole field -and accepts immediately if any of these four is zero. -Conditioned on all four being nonzero, the distribution -is exactly the original one. The rejection probability -is multiplied by $(1-1/|F|)^4\geq1/16$, so a fixed -positive gap survives. - -The running-time claim requires more than short addresses. -The formal implementation computes the field, its arithmetic, -the public adjacency extension, the queries and their -acceptance condition in polynomial time, and compiles -these operations to a concrete machine model. The [full -argument][long] separates this implementation proof from -the information-theoretic query and randomness bounds. - -The seven query caps at $c=4$ are $26,22,26,22,44,44,3$, in the order -colour, vertex certificate, difference, edge certificate, vertex ZERO, -edge ZERO and difference consistency. Their sum is 187, an upper bound -for one unamplified run; some seeds read fewer bits. The proved gap is -positive but very small. Repeating independently a fixed number of -times reduces soundness error to one half; the exact constants are -given with the [parameter calculation](#parameter-calculation). - -The elementary calculation is easier with a toy gap. -Suppose one run accepts any fixed false proof with -probability at most $3/4$. Three independent runs accept -that same proof with probability at most +In the [parameter calculation](#parameter-calculation) we fix $c=4$ and +choose the grid dimension and digit base $s$ and the number $t$ of +binary coordinates so that the grid holds all $N$ vertices, the +field-size bounds of Section 9 hold, and a point address ($O(st)$ bits) +and a full label ($O(t^3)$ bits) both take $O(\log N)$ bits. So does +every address and seed, and the $2^{O(\log N)}=N^{O(1)}$ possible +addresses give polynomial proof length. Fair random bits give uniform +field elements directly, since $|F|$ is a power of two; the exception is +the nonzero comparison parameter needed by each of the four corrector +calls in the two zero-on-grid tests. + +*Remark (formalization).* Lee's verifier samples each of these four +parameters from the whole field and accepts if any is zero. Conditioned +on all four being nonzero, the distribution is the original one, so the +rejection probability is multiplied by $(1-1/|F|)^4\geq1/16$ and a +positive gap survives. Lee also implements the field, arithmetic, +adjacency extension, queries and acceptance predicate in polynomial time +on a concrete machine model; this proof is in the [full argument][long]. + +One unamplified run reads at most 187 bits at $c=4$, but its proved +rejection probability on a false proof is small, so the verifier runs +a fixed number of times on the same proof with independent seeds. If +each run accepts a fixed false proof with probability at most $3/4$, +three runs all accept with probability at most $$ (3/4)^3=27/64<1/2. $$ -The proof string is fixed throughout. The random seeds are -independent, so the acceptance events for that fixed -string multiply. Reusing the same seed would not justify -the product: all three runs might repeat exactly the -same decision. - -For any actual gap $0<\gamma<1$, $(1-\gamma)^R\leq1/2$ follows from -$R\gamma\geq1$. One algebraic proof uses +The probabilities multiply because the proof is fixed and the seeds are +independent. In general, if each run rejects with probability at least +$\gamma\in(0,1)$, then $R$ independent runs (here $R$ counts repetitions) all accept +with probability at most $(1-\gamma)^R$, and $R\gamma\geq1$ implies +$(1-\gamma)^R\leq1/2$: indeed, $(1-\gamma)^{-1}\geq1+\gamma$ and -$(1+\gamma)^R\geq1+R\gamma$, giving +$(1+\gamma)^R\geq1+R\gamma$, so $(1-\gamma)^R\leq1/(1+R\gamma)\leq1/2$. -The value of $R$ is enormous but fixed, so repetition -preserves constant query complexity and logarithmic -randomness. - -### From an arbitrary certificate checker to a graph - -For any problem in NP, write a candidate accepting -computation of its certificate checker as a table: -one configuration per time step. Polynomial time gives -polynomially many rows and cells. Constraints require -the first row to contain the input and a permitted -witness, each subsequent row to follow the machine's -transition rule, and the last row to accept. The -machine has a fixed finite alphabet and reads a fixed -number of symbols per transition. Each constraint -therefore involves a bounded number of finite choices. -Their simultaneous satisfaction is equivalent to an -accepting computation with some witness. - -An explicit polynomial-time reduction encodes these fixed-arity constraints -as Boolean clauses of width at most three, and then as a graph. The -[long record's clause construction](../long/reasoning-record.md#from-every-np-verifier-to-a-graph) -proves the first conversion; the [optional clause calculation](#optional-calculation-converting-a-finite-relation-to-clauses) -shows its finite-pattern method. Appendix B checks the final colouring gadget. -The graph is three-colourable exactly when all the original constraints can be satisfied. - -The graph is therefore three-colourable exactly when -the original input has an accepting certificate. -The formal reduction also implements its construction -in polynomial time. Its polynomial output length -changes $O(\log N)$ random bits into $O(\log n)$, -because the logarithm of a polynomial is logarithmic. -Composing this reduction with the graph verifier -proves the forward direction of Section 2; exhaustive -seed checking proves the reverse direction. - -**Question 4.** If the verifier were allowed to use +Since $R$ is fixed, repetition preserves constant queries and +logarithmic randomness. The count for each check, the proved gap and the +repetition count are in [Appendix A](#parameter-calculation). + +### Reduction from NP to three-colouring + +The standard Cook–Levin construction expresses an accepting computation +by local constraints [AB07, §2.3]. Write the computation of an NP +witness checker as a table, with one row per time step holding the +machine's state, head position and memory. Polynomial time gives polynomially many +rows and cells. Constraints prescribe the input and a permitted witness, +legal transitions, and final acceptance. The machine has a fixed finite +alphabet and reads a fixed number of symbols per transition, so each +constraint involves boundedly many finite choices. All constraints hold +exactly when the table describes an accepting computation with some +witness. + +An explicit polynomial-time reduction turns these fixed-arity constraints +into **clauses**, ORs of at most three bits or negated bits, then into +a graph. The first conversion is proved in the [full clause construction](../long/reasoning-record.md#310-the-reduction-from-np-to-three-colourability); +its finite-pattern method is illustrated by the [calculation in Appendix B](#clauses-for-a-finite-relation), +where the colouring gadget is also checked. The graph is three-colourable exactly when the +constraints are simultaneously satisfiable, that is, exactly when the +input has an accepted witness. Its polynomial output length converts the graph +verifier's $O(\log N)$ randomness into $O(\log n)$ randomness. +Composing the reduction with that verifier proves the forward inclusion +in Section 2; exhaustive seed checking proved the reverse inclusion. + + + + +## 11. Exercises + +**Exercise 1 (Section 5).** Could the verifier omit the first identity +and test only $M(X,Z_H(X))=P(X)$? Test your answer with the nonvanishing +polynomial $P=1$. + +**Exercise 2 (Section 7).** Why would choosing $r=x$ deterministically +fail to give the same guarantee against an arbitrary corrupt word? Which +property of the random choice was used in the proof? + +**Exercise 3 (Section 9).** Suppose the analysis of the low-degree tests +supplied one nearby polynomial for the cubic labels of the colour table +and a different one for its homogeneous linear labels. Which step of the +soundness argument would need repair? + +**Exercise 4 (Section 2).** If the verifier were allowed to use $\sqrt n$ random bits instead, would the exhaustive-seed argument still prove that its language is in NP? Identify the step that changes. -**Question 5.** Consider a smaller hypothetical error budget of the -kind used in Section 9. A false grid condition makes an ideal test -reject with probability at least $3/8$. The actual test rejects with +**Exercise 5 (Section 9).** In a hypothetical estimate of the kind used +in Section 9, a false grid condition makes an ideal test reject with +probability at least $3/8$. The actual test rejects with probability at most $\kappa$, and replacing its answers by ideal answers changes the verdict with probability at most $4\kappa+1/16$. Does $\kappa\leq1/32$ rule out a false grid condition? Does $\kappa\leq1/16$ do so by the same estimates? Explain what follows -at the boundary; these toy constants do not replace the construction's -proved constants. - - - -## 11. A reconstruction task and answers - -**Reconstruction task.** A received table is close to -a low-degree polynomial $M$, but all its erroneous -entries might lie among points $(x,0)$. Explain why -reading those entries directly cannot establish the -identity $M(x,0)=0$. Then reconstruct the repair, -including the role of line data, the possibility of -rejection, and the final use of a polynomial identity. -The answer requires the connections between Sections -5, 6, 8 and 9 rather than one numerical calculation. -An account of the general proof is successful only -if it explains why the same decoded polynomial is -used at each of these steps. - -**Question 6.** Corrupt only the zero label in a 256-position evaluation -word. Draw a uniform label $U$, use it as the request and also as the -mask. Both are uniform individually. Does the $2/256$ correction bound -still follow? Compare this with a fixed nonzero request and a fresh mask. - -**Question 7.** Corrupt all auxiliary rows with one fixed anchor in -$\mathbb F_4^2$. What are the global and conditional fractions of bad -rows? Which step protects the corrector at that anchor? - -Try these tasks before reading the solutions below. - -**Answer 1.** The second identity alone is insufficient. -Take $P=1$ and let $M(X,U)=1$ independently of $U$. -Then $M(X,Z_H(X))=P(X)$ holds everywhere, although -$P$ never vanishes. The first identity excludes this -choice. With both identities, substituting a grid point -forces $P(x)=M(x,0)=0$. - -**Answer 2.** For nonzero $x$, with $r=x$ fixed, the answer uses only the -entries at $x$ and zero. A corrupt word can put an error -at one of precisely those positions. A small global -error fraction does not make either fixed position -reliable. At $x=0$ the answer is always zero because -the two reads cancel, as in the worked example. -For arbitrary $x$, the random choice made both query locations -uniform; the union bound then converted global error +at the boundary. + +**Exercise 6 (Section 7).** Corrupt only the zero label in the encoding +on the 256 full labels. Draw a uniform label $U$ and use it both as the +requested label and as the fresh random label. Both are uniform +individually. Does the $2/256$ correction bound still follow? Compare +this with a fixed nonzero request and an independent fresh label. + +**Exercise 7 (Section 8).** Corrupt all lines-table entries with one +fixed base point in $\mathbb F_4^2$. What are the global and conditional +fractions of bad entries? Which step protects the local corrector at that +base point? + +**Exercise 8 (reconstruction).** Assume the parameter and rejection +bounds of Section 9, and fix the nearby certificate polynomial $M$ from +that argument. Its received table is close to $M$, but the erroneous +entries may be concentrated at points $(x,0)$. Why can direct reads there +not establish $M(x,0)=0$? Reconstruct the repair using line data, +correction with possible rejection, and the final polynomial-identity +argument. Explain why every step concerns the same $M$. + +## 12. Solutions + +**Solution 1.** No. Take $P=1$ and $M(X,U)=1$: then $M(X,Z_H(X))=P(X)$ +holds everywhere although $P$ never vanishes. The first identity excludes +this choice; with both, substituting a grid point forces +$P(x)=M(x,0)=0$. + +**Solution 2.** For nonzero $x$, with $r=x$ fixed, the answer uses only +the entries at $x$ and zero, and a corrupt word can put an error at one +of precisely those positions; a small global error fraction does not make +either fixed position reliable. The random choice made both query +locations uniform, and the union bound then converted global error fractions into a bound on this particular request. -**Answer 3.** The difference check would relate the -linearly decoded values, while the ZERO checks for the -cubic expressions could concern different values. -There would be no single colouring polynomial known -to satisfy both the difference identity and the two -grid conditions. The soundness proof needs simultaneous -guarantees for one decoded object, not separate existence -statements with unrelated witnesses. - -**Answer 4.** The number of seeds would be -$2^{\sqrt n}$, which is not bounded by any fixed -polynomial in $n$. The exhaustive verification could -take more than polynomial time. This shows why that -argument fails; it does not prove that the language -is outside NP. - -**Answer 5.** Ideal rejection is at most actual rejection plus -the probability that the verdict changes, hence at most -$5\kappa+1/16$. At $\kappa\leq1/32$, this is at most -$7/32<12/32=3/8$, which contradicts a false grid condition. -At $\kappa\leq1/16$, the upper bound is $3/8$; equality -gives no contradiction. These estimates then neither certify -grid vanishing nor demonstrate its failure. The strict bound -$\kappa<1/16$ would suffice for this hypothetical budget. - -**Answer 6.** The translated query is always zero. Except when $U=0$, -exactly one of the two reads is corrupt, giving error $255/256$. -For a fixed nonzero request with a fresh uniform mask, exactly two masks -cause error, giving $2/256$. Uniformity must hold after fixing the request. - -**Answer 7.** There are $16\cdot16=256$ oriented line indices; 16 have -the chosen anchor. Their global fraction is $1/16$, but the fraction -among the corrector's possible rows is one. Retesting the selected row -and retaining actual rejection in the correction bound avoids this -invalid inference from global error. It does not assert that every -corruption changes the answer. - -**Reconstruction solution.** Fix the certificate polynomial $M$ chosen -by the low-degree test. At a target $(x,0)$, direct table error is uncontrolled, -so use a random line through that target and the encoded auxiliary row. -Test the row, compare a corrected answer at a random nonzero point, -and either reject or return the corrected origin bit. The correction -theorem bounds rejection-or-wrong relative to this same $M$. - -ZERO rejects whenever either correction rejects. Averaging over the targets -ZERO requests therefore bounds the correction rejection terms by its own -rejection rate. Coupling to the ideal checks on $M$ bounds ideal rejection -by actual rejection plus the answer-replacement errors. If $M(X,0)$ were -a nonzero polynomial, the root bound and a random homogeneous observation -would force larger ideal rejection than this budget allows. Thus -$M(X,0)=0$ as a polynomial identity. The second certificate identity -must be established for the same $M$ and the same decoded constraint -polynomial. A reconstruction missing the fixed witness, the rejection -event, or the averaging over requested targets has omitted a necessary step. +**Solution 3.** The difference check would constrain the polynomial +chosen for the homogeneous labels and the zero-on-grid test a different +one chosen for the degree-three labels, so no single colouring polynomial +would be known to satisfy both the difference identity and the grid +conditions. + +**Solution 4.** The $2^{\sqrt n}$ seeds are not bounded by any fixed +polynomial in $n$, so exhaustive verification could take more than +polynomial time. The argument fails; this does not prove that the +language is outside NP. + +**Solution 5.** Ideal rejection is at most actual rejection plus the +probability that the verdict changes, hence at most $5\kappa+1/16$. At +$\kappa\leq1/32$ this is at most $7/32<12/32=3/8$, contradicting a false +grid condition. At $\kappa\leq1/16$ the upper bound is $3/8$, and +equality gives no contradiction: the estimates neither certify grid +vanishing nor demonstrate its failure. The strict bound $\kappa<1/16$ +would suffice. + +**Solution 6.** The translated query $U+U$ is always the zero label, so +except when $U=0$ exactly one of the two reads is corrupt: the error is +$255/256$. For a fixed nonzero request and an independent fresh label, +exactly two choices cause error, giving $2/256$. Uniformity must hold +after fixing the request. + +**Solution 7.** Of $16\cdot16=256$ line indices, 16 have the chosen base +point: the global fraction is $1/16$, but among entries the corrector can +select it is one. Retesting the selected entry puts its rejection rate +into Theorem 8.2, whose bound allows rejection or a wrong answer. + +**Solution 8.** Use the same polynomial $M$ throughout. At $(x,0)$, the +local corrector tests the encoded entry of a random line through the +target, compares a corrected answer at a random nonzero parameter with +the points-table answer, and rejects or returns the corrected bit at the +origin; Theorem 8.2 bounds rejection or a wrong bit relative to $M$. + +The zero-on-grid test rejects whenever either correction rejects, so each +correction's target-averaged rejection is bounded by the test's rejection +rate. The ideal checks on $M$ can reject only when the actual test +rejects or an answer replacement fails. If $M(X,0)$ were a nonzero +polynomial, the Schwartz–Zippel lemma and a uniform homogeneous label +would force ideal rejection above the error budget assumed from +Section 9. Hence $M(X,0)=0$ as a polynomial identity. The second identity +must be established for the same $M$ and the same nearby constraint +polynomial. @@ -1394,37 +1251,30 @@ event, or the averaging over requested targets has omitted a necessary step. ### 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 +For a graph with $N\geq2$ vertices, choose the least integer $\nu\geq2$ +such that $\lceil\log_2 N\rceil\leq \nu2^\nu$. Put $$ -s=2^a,\qquad |H|=m=s,\qquad c=4,\qquad -|F|=2^{12a+32}=2^{32}s^{12}. +s=2^\nu,\qquad |H|=m=s,\qquad c=4,\qquad +|F|=2^{12\nu+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$ +The grid $H^m$ contains $s^s=2^{\nu2^\nu}$ points, enough for +the vertices. Minimality of $\nu$ gives $\nu2^\nu=O(\log N)$: +if $\nu>2$, the preceding value $(\nu-1)2^{\nu-1}$ was too small, +and $\nu2^\nu\leq4(\nu-1)2^{\nu-1}$. The boundary value $\nu=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 +$N=0,1$ by taking $\nu=2$. + +A point of $F^m$ takes $m\log_2|F|=s(12\nu+32)=O(\log N)$ bits, and +the encoded line data uses $cs=4s$ further field coordinates. + +A degree-three label specifies one bit per multilinear monomial, using +$1+t+\binom t2+\binom t3$ bits for $t=12\nu+32$. This is $O(\nu^3)$, +and $\nu^3=O(\nu2^\nu)$ since $\nu^2=O(2^\nu)$. Every address and seed +therefore has $O(\log N)$ bits. + +The set-multilinear 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$, @@ -1433,50 +1283,51 @@ $$ 5s(s-1) ### The error constants -The constants used in Sections 8–9 depend only on the fixed inner degree $c$: +The constants used in Sections 8 and 9 depend only on the fixed inner +degree $c$: $$ \begin{aligned} K&=4(c+2)^2\bigl(112(c+2)+60\bigr),\\ -E&=2\bigl((c+1)K+29\bigr),\qquad S=28+E,\\ +J&=2\bigl((c+1)K+29\bigr),\qquad S=28+J,\\ C&=2+2(c+1)K. \end{aligned} $$ -Here $K$ bounds inner decoding error, $E$ the line discrepancy, $S$ the -combined code distance and $C$ the rejection contribution to correction -failure. The [full correction argument](../long/reasoning-record.md#correcting-an-outer-value-at-a-prescribed-point) -derives these coefficients. Their expansions are not additional choices of -parameters; the same constants were used throughout the preceding proof. +Here $K$ bounds the inner-test distance; $J,S,C$ have the roles given in +Section 8. Their derivation is in the [full correction argument](../long/reasoning-record.md#56-local-correction-with-a-lines-table). ## 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 +Boolean values are $0$ and $1$; $a\lor b$ is their OR, and $\neg a$ +is the opposite bit. Write $\operatorname{NAE}(a,b,c)$ when the three +values are **not all equal**. The clause $a\lor b\lor c$ holds exactly +when there is a bit $z$ satisfying $$ \operatorname{NAE}(a,b,z),\qquad @@ -1486,15 +1337,14 @@ $$ 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 +Make a palette triangle with colours named $0,1,2$, represented by +$1,\omega,\omega^2$ in the field encoding. For each Boolean variable, +add adjacent vertices for it and its negation, both joined to palette +vertex $2$; they must receive opposite colours $0,1$. A literal uses +its variable or negation vertex, and constant false uses palette vertex +$0$. 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\}. @@ -1512,26 +1362,22 @@ the literal colours covers every other NAE case. -### Optional calculation: converting a finite relation to clauses +### Clauses for a finite relation -The formal reduction represents each finite choice by -a block of bits with exactly one bit equal to one, -then converts the fixed-arity relations into Boolean -clauses of width at most three. Here is how that last -step works. For a relation $R$ on $k$ bits, consider -each possible input pattern $p$ and introduce flags +The formal reduction represents a finite choice by a block of bits with +exactly one bit equal to one. For a relation $R:\{0,1\}^k\to\{0,1\}$, +where $k$ is fixed, introduce a fresh sequence of flags for each pattern +$p\in\{0,1\}^k$. Here $\mathrm{xor}$ means addition modulo two: $$ z_0=0,\qquad z_{i+1}=z_i\lor(x_i\mathbin{\mathrm{xor}}p_i), \qquad R(p)\lor z_k=1. $$ -The flags record whether the actual input has yet -differed from $p$. The last condition imposes $R(p)$ -only when the actual input equals $p$. Because $p_i$ -is fixed, $x_i\mathbin{\mathrm{xor}}p_i$ is a literal, -either $x_i$ or its negation. An OR equation $z=u\lor v$ -is enforced by three clauses: +The flags record whether the input has differed from $p$. The final +condition permits input $p$ only if $R(p)=1$. Since $p_i$ is fixed, +$x_i\mathbin{\mathrm{xor}}p_i$ is either $x_i$ or its negation. +An OR equation $z=u\lor v$ is enforced by three clauses: $$ (z\lor\neg u),\qquad(z\lor\neg v),\qquad @@ -1547,18 +1393,20 @@ output remains polynomial in size. -## Appendix C. Why the low-degree test needed correction +## Appendix C. The version-1 test -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 -$F$ of characteristic two. The old condition was +Version 1 of [ABSSW26] used unit weights in the same identity, with an +element of order $c+1$ as node [ABSSW26v1, Fact 2.7, Lemma 3.3]; Lee +showed that this **version-1 test** accepts $X^4$. For $c=2$, let +$\zeta$ have order three in a field $F$ of characteristic two. The +version-1 condition is $$ f(u)=f(u+\zeta v)+f(u+\zeta^2v)+f(u+v). $$ -It holds for quadratic polynomials, but its converse -fails. Take $f(X)=X^4$. In characteristic two, +It holds for quadratic polynomials, but the converse fails for +$f(X)=X^4$. In characteristic two, $(u+av)^4=u^4+a^4v^4$. Since $\zeta^4=\zeta$ and $1+\zeta+\zeta^2=0$, the right-hand side is @@ -1566,99 +1414,98 @@ $$ 3u^4+(\zeta+\zeta^2+1)v^4=u^4. $$ -The test accepts every pair $(u,v)$, although -$X^4$ cannot agree everywhere with a quadratic -when $|F|>4$: their difference is a nonzero -degree-four polynomial with at most four roots. -In fact, their disagreement fraction is at least -$1-4/|F|$. - -The failure persists in arbitrarily large fields. -Fields $F=\mathbb F_{2^{2k}}$, for $k\geq2$, contain elements of order -three and have unbounded size. The example therefore survives any fixed -field-size threshold for this old degree-two test. It identifies a -defect in the old test's characterisation, not in the PCP theorem or -the corrected formal proof. +The test accepts every pair $(u,v)$, although $X^4$ disagrees with every +quadratic on at least a fraction $1-4/|F|$ of $F$, since their difference +is a nonzero polynomial of degree four. The fields +$F=\mathbb F_{2^{2k}}$ for $k\geq2$ contain elements of order three and +have unbounded size, so no fixed field-size threshold repairs the +version-1 test at degree two. For a concrete comparison, take $\mathbb F_{16}=\mathbb F_2[t]/(t^4+t+1)$. -This notation means that elements are binary polynomials -of degree below four. Add their coefficients modulo two; -multiply them and reduce using $t^4=t+1$ until the degree -is below four again. The modulus is irreducible: it has no binary root, and its remainder +Here $t$ is a polynomial variable; the elements are binary polynomials +in $t$ of degree below four, added coefficientwise modulo two and +multiplied with the reduction $t^4=t+1$. The modulus is irreducible: it has no binary root, and its remainder modulo the only monic irreducible binary quadratic, $t^2+t+1$, is one. A reducible quartic without a linear factor would have a quadratic factor. Thus these 16 elements form a field. -The old order-three nodes accept $X^4$ on all -$256$ pairs $(u,v)$. The corrected test uses -the generator $t$ and interpolation weights -at $t,t^2,t^3$; it accepts only $16$ pairs. -The accompanying [finite-field checker][example-checker] verifies that -$t$ has order 15, enumerates these cases, and checks the interpolation -identity. The enumeration illustrates the test; the preceding family -argument establishes failure for unbounded field sizes. - -Completeness requires honest low-degree polynomials -to pass; the interpolation identity proves that -they do. Soundness must also rule out other -functions that pass too often. The generator -and its weights support that converse. -The corrected paper acknowledges Troy Lee -for finding an error in the earlier lemma; -no priority claim for the example above is -made here. +The version-1 nodes of order three accept $X^4$ on all +$256$ pairs $(u,v)$. The standard low-degree test, with the generator $t$ +of order 15 and interpolation weights at $t,t^2,t^3$, accepts only $16$ +pairs; its completeness follows from interpolation and its soundness from +Theorem 6.2. Troy Lee found the error in [ABSSW26v1, Lemma 3.3], as +acknowledged in [ABSSW26]; no priority claim for the example is made here. -## Sources and verification - -The mathematical construction is from -[Amireddy, Behera, Srinivasan, Sudan and -Willumsgaard, version 2][paper-v2]. The -formal development discussed here is -[Troy Lee's pinned PCP development][lean-project]. It includes the -concrete complexity argument as well as -the algebraic verifier. The full account -records exact statements, proof correspondences -and verification evidence; a Lean source -link by itself does not certify that every -sentence of this exposition says the same -thing as the formal statement. - -AI agents wrote this exposition under Will -Cook's direction. The finite calculations -were checked by the accompanying Python -program. They illustrate individual -operations, and their small parameters do -not instantiate the large-field parameter -regime of the complete PCP construction. -The family argument about the earlier test -is an ordinary mathematical deduction, -not a Lean-checked theorem in this project. -No claim of independent human review or -measured reader understanding is made. - -Further reading: - -* [The full argument][long] develops the - low-degree tests, the binary correction - bounds and the final assembly in detail. -* [The specialist paper][short] gives the - construction and formalisation differences - in a shorter account. -* [Troy Lee's original reading guide][troy-guide] - explains how to read the main Lean statement - and its definitions. -* Arora and Barak, [*Computational Complexity: - A Modern Approach*][arora-barak], provides - textbook background. The publicly retained - January 2007 draft numbers its PCP definition - differently from the published edition. -* The original [BLR paper][blr] develops - self-testing and self-correction. The - [corrected PCP paper][paper-v2] gives - the precise versions used in this - construction. +## Formalization and sources + +The construction is due to Amireddy, Behera, Srinivasan, Sudan and +Willumsgaard [ABSSW26]. [Troy Lee's formal development][lean-project] +[Lee26] contains the algebraic verifier and the concrete complexity +proof. Its endpoints are the [forward theorem][lean-theorem], stated +with the formal [verifier definitions][verifier-definitions], the +[reverse inclusion][lean-reverse] for a concrete machine model, and the +[agreement of its NP class with a reference definition][lean-reference-np]. +Lee's variants of statements in [ABSSW26], each noted in a remark, are: +the exact randomness formula (Theorem 2.1); whole-field sampling +(Theorems 6.1 and 8.1, Section 10); the hypothesis $q>2c$ +(Theorem 6.2); ten Hadamard-test queries (Theorem 7.2); affine labels on +every lines table, a fair coin in the inner low-degree test and independent +corrector seeds in the zero-on-grid test (Section 8); the +homogeneous conclusion of Theorem 8.1 and hypothesis of Theorem 8.2; and explicit constants +(Appendix A). The +formalization also contains the Fourier-analytic proof of Theorem 7.1. +Lee identified the error in the version-1 test, as acknowledged in +[ABSSW26]. Lee's +[reading guide][troy-guide] introduces the main Lean statement, and +[AB07, Chapter 18] is a textbook account. + +Statements, source correspondences and proofs of the testing theorems +are in the [full argument][long]. +A Lean theorem establishes its own formal statement; agreement with this +exposition is a separate comparison. The finite calculations were +checked by computer: the order 15 of $t$ in $\mathbb F_{16}$, the cases +of Appendix C and the interpolation identity with the +[finite-field checker][example-checker], and the identities and +addresses of the one-edge example with the [trace checker][trace-checker]. +The unbounded-family argument in Appendix C is an ordinary mathematical +deduction and is not formalized. + +## References + +**[AB07]** S. Arora and B. Barak. *Computational Complexity: A Modern +Approach*. [Draft of January 2007][arora-barak]; section numbers refer to +this draft, which numbers its PCP definition differently from the +published edition. + +**[ABSSW26]** P. Amireddy, A. R. Behera, S. Srinivasan, M. Sudan and +S. V. Willumsgaard. *A Simple Algebraic Proof of the PCP Theorem*. +[arXiv:2608.17429v2][paper-v2], October 2026. + +**[ABSSW26v1]** The same, [version 1][paper-v1]. + +**[ALMSS98]** S. Arora, C. Lund, R. Motwani, M. Sudan and M. Szegedy. +Proof verification and the hardness of approximation problems. *J. ACM* +**45**(3), 1998. [Manuscript][almss]. + +**[AS98]** S. Arora and S. Safra. Probabilistic checking of proofs: a new +characterization of NP. *J. ACM* **45**(1), 70–122, 1998. +[Journal text][arora-safra]. + +**[BCHKS96]** M. Bellare, D. Coppersmith, J. Håstad, M. Kiwi and +M. Sudan. Linearity testing in characteristic two. *IEEE Trans. Inform. +Theory* **42**(6), 1781–1795, 1996. [Manuscript][bchks]. + +**[BLR93]** M. Blum, M. Luby and R. Rubinfeld. Self-testing/correcting +with applications to numerical problems. *J. Comput. System Sci.* +**47**(3), 549–595, 1993. [DOI][blr]. + +**[Lee26]** T. Lee. *tcs-formalizations: PCP development*. Lean source, +2026. [Pinned revision][lean-project]. + +**[Shoup05]** V. Shoup. *A Computational Introduction to Number Theory +and Algebra*. Cambridge University Press, 2005. [Version 1][shoup]. [paper-v2]: https://arxiv.org/abs/2608.17429v2 @@ -1672,6 +1519,10 @@ Further reading: [troy-guide]: https://wcook04.github.io/proof-reader/#/pcp-reading-guide [long]: ../long/reasoning-record.md [short]: ../short/paper.md +[paper-v1]: https://arxiv.org/abs/2608.17429v1 +[shoup]: https://shoup.net/ntb/ntb-v1.pdf +[lean-reverse]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/ReverseConcrete.lean#L33-L39 +[lean-reference-np]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/ReferenceNPConverse.lean#L39-L41 [bchks]: https://www.csc.kth.se/tcs/projects/publications/bchks.pdf diff --git a/papers/pcp-exposition/table-checks.png b/papers/pcp-exposition/table-checks.png index a38b906..195b5df 100644 Binary files a/papers/pcp-exposition/table-checks.png and b/papers/pcp-exposition/table-checks.png differ diff --git a/papers/pcp-exposition/table-checks.svg b/papers/pcp-exposition/table-checks.svg index 1ff9426..85e6402 100644 --- a/papers/pcp-exposition/table-checks.svg +++ b/papers/pcp-exposition/table-checks.svg @@ -1,19 +1,19 @@ -Eight tables and seven checksDots show which physical tables each check may query. Column five is vertex ZERO, the branch illustrated by the worked trace. +Eight tables and seven checksDots show which physical tables each check may query. Column five is the vertex zero-on-grid test, the branch illustrated by the worked trace. Eight tables and seven checks Eight tables and seven checks - 2026-11-15T22:58:37.929436 - Incidence matrix showing which stored tables each verifier check may query. The worked trace follows vertex ZERO, column five. + 2026-11-16T19:45:18.476529 + Incidence matrix showing which stored tables each verifier check may query. The worked trace follows the vertex zero-on-grid test, column five. image/svg+xml - Matplotlib v3.10.3, https://matplotlib.org/ + Matplotlib v3.11.2, https://matplotlib.org/ @@ -34,118 +34,125 @@ z - - Stored table + Stored table - - 1 - Colour - LDT + 1 + Colour + LDT + - - 2 - Vertex - LDT + 2 + Vertex + LDT + - - 3 - Difference - LDT + 3 + Difference + LDT + - - 4 - Edge - LDT + 4 + Edge + LDT + - - 5 - Vertex - ZERO + 5 + Vertex + zero on + grid - - 6 - Edge - ZERO + 6 + Edge + zero on + grid - - 7 - Difference - check + 7 + Difference + check + - - - + + C o @@ -158,92 +165,91 @@ z ·   p - r - i - m - a - r - y + o + i + n + t + s χ - - • + • - - - - - • + • - - - • + • - - + C o @@ -265,463 +271,461 @@ z - - • + • - - - - - - - - - + + V - e - r - t - e - x -   -   - · -   - p - r - i - m - a - r - y - M - V + e + r + t + e + x +   +   + · +   + p + o + i + n + t + s + M + V - - - • + • - - - - • + • - - - - + V - e - r - t - e - x -   -   - · -   - l - i - n - e - s - M - V + e + r + t + e + x +   +   + · +   + l + i + n + e + s + M + V - - - • + • - - - - • + • - - - - - + + - D - i - f - f - e - r - e - n - c - e -   -   - · -   - p - r - i - m - a - r - y - χ + D + i + f + f + e + r + e + n + c + e +   +   + · +   + p + o + i + n + t + s + χ 0 - - - - • + • - - - - • + • - - • + • - - + - D - i - f - f - e - r - e - n - c - e -   -   - · -   - l - i - n - e - s - χ + D + i + f + f + e + r + e + n + c + e +   +   + · +   + l + i + n + e + s + χ 0 - - - - • + • - - - - - - - + + E d @@ -732,90 +736,89 @@ z ·   p - r - i - m - a - r - y + o + i + n + t + s M - E + E - - - - - • + • - - - • + • - - + E d @@ -831,81 +834,81 @@ z e s M - E + E - • + • - • + • - EIGHT TABLES, SEVEN CHECKS + EIGHT TABLES, SEVEN CHECKS - Each dot marks a table the check may query. LDT = low-degree test. + Each dot marks a table the check may query. LDT = binary low-degree test. - Worked trace: check 5 follows the colour bit and two vertex-certificate corrections. + Worked trace: check 5 follows the colour bit and two local corrections of the vertex certificate. All seven checks must pass. Public adjacency is computed from the input graph. diff --git a/papers/pcp-full-argument/links.json b/papers/pcp-full-argument/links.json index 79a790f..96ce971 100644 --- a/papers/pcp-full-argument/links.json +++ b/papers/pcp-full-argument/links.json @@ -3,8 +3,8 @@ "claims": [ { "id": "claim-1", - "title": "The forward PCP theorem", - "section": "The algebraic PCP theorem: a detailed account of the Lean proof", + "title": "The PCP theorem", + "section": "1", "passage": "pcp-long-forward-statement", "lean": [ "PCP.np_subset_pcp" @@ -12,8 +12,8 @@ }, { "id": "claim-2", - "title": "A certificate for grid vanishing", - "section": "How the proof is organized", + "title": "Vanishing certificate", + "section": "3.1", "passage": "pcp-long-intro-roadmap", "lean": [ "PCP.Algebraic.GridVanishing.vanishesOn_iff_exists_certificate" @@ -21,8 +21,8 @@ }, { "id": "claim-4", - "title": "Interpolation from a grid", - "section": "1", + "title": "Low-degree extension", + "section": "2.1", "passage": "pcp-long-algebra-grid-interpolation", "lean": [ "PCP.Algebraic.GridInterpolation.existsUnique_extension" @@ -30,8 +30,8 @@ }, { "id": "claim-6", - "title": "Exact lines imply low total degree", - "section": "1", + "title": "Lines determine the degree", + "section": "4.1", "passage": "pcp-long-algebra-line-characterization", "lean": [ "PCP.Algebraic.PolynomialLine.exists_polynomial_of_hasLowDegreeLines_finite" @@ -39,8 +39,8 @@ }, { "id": "claim-8", - "title": "Correcting a line table", - "section": "3", + "title": "Local correction with a lines table", + "section": "4.4", "passage": "pcp-long-algebra-line-table-correction", "lean": [ "PCP.Algebraic.LineTableLocalCorrection.correct_wrong_le" @@ -48,8 +48,8 @@ }, { "id": "claim-9", - "title": "Agreement on rows and columns", - "section": "4", + "title": "Bivariate agreement", + "section": "4.5", "passage": "pcp-long-algebra-bivariate-statement", "lean": [ "PCP.Algebraic.BivariateAgreement.exists_polynomial_of_row_column_agreement" @@ -57,8 +57,8 @@ }, { "id": "claim-10", - "title": "Point and line agreement", - "section": "5", + "title": "Point-versus-line test", + "section": "4.6", "passage": "pcp-long-algebra-point-line-statement", "lean": [ "PCP.Algebraic.PointLineTest.exists_close_of_small_rejection" @@ -66,8 +66,8 @@ }, { "id": "claim-11", - "title": "Recovery after digit encoding", - "section": "A high-degree univariate polynomial as a low-degree multivariate polynomial", + "title": "Set-multilinear recovery identity", + "section": "5.1", "passage": "pcp-long-set-multilinear", "lean": [ "PCP.Algebraic.SetMultilinear.decode_encode" @@ -75,8 +75,8 @@ }, { "id": "digit-injectivity", - "title": "Digit encoding is injective", - "section": "A high-degree univariate polynomial as a low-degree multivariate polynomial", + "title": "Set-multilinear encoding is injective", + "section": "5.1", "passage": "pcp-long-digit-injectivity", "lean": [ "PCP.Algebraic.SetMultilinear.encode_injective_on" @@ -84,8 +84,8 @@ }, { "id": "digit-evaluation", - "title": "Evaluation after digit encoding", - "section": "A high-degree univariate polynomial as a low-degree multivariate polynomial", + "title": "Set-multilinear encoding: evaluation", + "section": "5.1", "passage": "pcp-long-digit-evaluation", "lean": [ "PCP.Algebraic.SetMultilinear.eval_encode" @@ -93,8 +93,8 @@ }, { "id": "claim-12", - "title": "Distance between encoded values", - "section": "Binary labels for field elements", + "title": "Half-distance identity", + "section": "2.2", "passage": "pcp-long-hadamard-labels", "lean": [ "PCP.Algebraic.Hadamard.relativeDistance_encodeFunction_map" @@ -102,8 +102,8 @@ }, { "id": "claim-13", - "title": "Encoding a query", - "section": "Binary labels for field elements", + "title": "Label composition", + "section": "5.2", "passage": "pcp-long-hadamard-composition", "lean": [ "PCP.Algebraic.HadamardComposition.encode_query" @@ -111,8 +111,8 @@ }, { "id": "claim-14", - "title": "Linearity from the BLR test", - "section": "Testing a received Hadamard word", + "title": "BLR linearity test", + "section": "5.3", "passage": "pcp-long-blr-proof", "lean": [ "PCP.Algebraic.BLR.exists_linearMap_distance_le_of_rejection_le" @@ -120,8 +120,8 @@ }, { "id": "claim-15", - "title": "Soundness of the Hadamard test", - "section": "Testing a received Hadamard word", + "title": "Hadamard test", + "section": "5.3", "passage": "pcp-long-hadamard-soundness", "lean": [ "PCP.Algebraic.Hadamard.test_soundness" @@ -129,8 +129,8 @@ }, { "id": "claim-16", - "title": "Decoding Hadamard rows", - "section": "Testing a received Hadamard word", + "title": "Hadamard test on a points table", + "section": "5.3", "passage": "pcp-long-hadamard-row-decoding", "lean": [ "PCP.Algebraic.Hadamard.exists_field_function_of_average_rejectionRate" @@ -138,8 +138,8 @@ }, { "id": "claim-17", - "title": "Encoded-line test query count", - "section": "Testing a high-degree outer polynomial", + "title": "Binary low-degree test query count", + "section": "5.5", "passage": "pcp-long-encoded-line-test", "lean": [ "PCP.Algebraic.EncodedLineLowDegreeTest.queries_length_le" @@ -147,8 +147,8 @@ }, { "id": "claim-18", - "title": "Local correction error bound", - "section": "Correcting an outer value at a prescribed point", + "title": "Local correction", + "section": "5.6", "passage": "pcp-long-outer-correction-soundness", "lean": [ "PCP.Algebraic.BinaryLocalCorrection.failure_le" @@ -156,8 +156,8 @@ }, { "id": "claim-22", - "title": "Different colours and cube equations", - "section": "Three colours as polynomial equations", + "title": "Colour equations", + "section": "3.1", "passage": "pcp-long-colour-equations", "lean": [ "PCP.Algebraic.ThreeColorAlgebra.sub_cube_eq_one_iff_ne" @@ -165,8 +165,8 @@ }, { "id": "claim-23", - "title": "Grid constraints and colouring", - "section": "Three colours as polynomial equations", + "title": "Colouring constraints on the grid", + "section": "3.1", "passage": "pcp-long-grid-constraints", "lean": [ "PCP.Algebraic.ThreeColorGrid.colorable_iff_exists_constraints" @@ -174,8 +174,8 @@ }, { "id": "claim-25", - "title": "Correct derived Hadamard answers", - "section": "The eight tables and seven checks", + "title": "Exact self-corrected reads", + "section": "3.2", "passage": "pcp-long-derived-constraints", "lean": [ "PCP.Algebraic.HadamardDerivedOracle.answer_encode" @@ -183,8 +183,8 @@ }, { "id": "claim-26", - "title": "The graph verifier query bound", - "section": "The eight tables and seven checks", + "title": "The seven-check query bound", + "section": "3.2", "passage": "pcp-long-query-budget", "lean": [ "PCP.Algebraic.ThreeColorVerifier.queries_length_le" @@ -193,7 +193,7 @@ { "id": "query-verdict-congruence", "title": "Listed answers determine the verdict", - "section": "The eight tables and seven checks", + "section": "3.2", "passage": "pcp-long-query-congruence", "lean": [ "PCP.Algebraic.ThreeColorVerifier.test_congr" @@ -201,8 +201,8 @@ }, { "id": "claim-27", - "title": "The honest verifier always accepts", - "section": "Perfect completeness", + "title": "Perfect completeness", + "section": "3.4", "passage": "pcp-long-completeness", "lean": [ "PCP.Algebraic.ThreeColorVerifier.exists_proof_test_eq_true" @@ -210,8 +210,8 @@ }, { "id": "claim-30", - "title": "Verifier resource and soundness bounds", - "section": "Repetition on one fixed proof", + "title": "Amplification", + "section": "3.8", "passage": "pcp-long-amplification", "lean": [ "PCP.Algebraic.ThreeColorAmplifiedVerifier.verification_guarantees" @@ -219,8 +219,8 @@ }, { "id": "claim-31", - "title": "The verifier runs in polynomial time", - "section": "The polynomial-time implementation", + "title": "Polynomial-time implementation", + "section": "3.9", "passage": "pcp-long-runtime", "lean": [ "PCP.Lang.ThreeColorRuntime.polyTimeAlg" @@ -229,7 +229,7 @@ { "id": "claim-32", "title": "Computation tableau equivalence", - "section": "From every NP verifier to a graph", + "section": "3.10", "passage": "pcp-long-np-tableau", "lean": [ "PCP.Machine.NPTableau.exists_accepts_iff" @@ -237,9 +237,9 @@ }, { "id": "claim-33", - "title": "The converse PCP theorem", - "section": "The reverse inclusion", - "passage": "pcp-long-converse", + "title": "Reverse inclusion", + "section": "1", + "passage": "pcp-long-reverse-statement", "lean": [ "PCP.pcp_subset_np_concrete" ] @@ -247,11 +247,74 @@ { "id": "reference-np-equivalence", "title": "Equivalence with the reference NP class", - "section": "The reverse inclusion", + "section": "3.12", "passage": "pcp-long-reference-np", "lean": [ "PCP.ReferenceNP.inNP_iff_mem" ] + }, + { + "id": "schwartz-zippel", + "title": "Schwartz–Zippel lemma", + "passage": "pcp-long-schwartz-zippel", + "lean": [ + "PCP.Algebraic.eval_zero_agreement_le" + ], + "section": "2.1" + }, + { + "id": "binary-low-degree-test", + "title": "Binary low-degree test", + "passage": "pcp-long-binary-test-statement", + "lean": [ + "PCP.Algebraic.EncodedLineLowDegreeTest.exists_close" + ], + "section": "3.3" + }, + { + "id": "zero-on-grid-test", + "title": "Zero-on-grid test", + "passage": "pcp-long-zero-on-grid-statement", + "lean": [ + "PCP.Algebraic.DerivedZeroOnGrid.rejectionRate_lower_bound" + ], + "section": "3.3" + }, + { + "id": "verifier-soundness", + "title": "Soundness of the seven-check verifier", + "passage": "pcp-long-soundness-statement", + "lean": [ + "PCP.Algebraic.ThreeColorVerifier.rejectionRate_ge_of_not_colorable" + ], + "section": "3.5" + }, + { + "id": "base-verifier", + "title": "Base verifier", + "passage": "pcp-long-base-verifier", + "lean": [ + "PCP.Algebraic.ThreeColorCanonicalVerifier.verification_guarantees" + ], + "section": "3.7" + }, + { + "id": "standard-local-correction", + "title": "Standard local correction", + "passage": "pcp-long-standard-correction", + "lean": [ + "PCP.Algebraic.StandardLocalCorrection.failure_le" + ], + "section": "4.4" + }, + { + "id": "zero-on-grid-soundness", + "title": "Soundness of the zero-on-grid test", + "passage": "pcp-long-zero-on-grid-soundness", + "lean": [ + "PCP.Algebraic.BinaryZeroOnGridCorrection.rejectionRate_ge" + ], + "section": "5.7" } ], "passages": [ @@ -259,7 +322,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. We reconstruct the algebraic argument in Troy Lee's Lean formalization and explain how its implementation and machine-simulation theorems establish these resource bounds.", + "quote": "The PCP theorem [AS98, ALMSS98] states that every language in NP has a polynomial-time verifier using $O(\\log n)$ random bits and $O(1)$ proof-bit queries, with perfect completeness and soundness error at most one half.", "lean": [ "PCP.np_subset_pcp" ], @@ -270,473 +333,473 @@ }, { "id": "pcp-long-intro-roadmap", - "section": "From the algebraic tests to the PCP theorem", + "section": "3.1", "role": "explains", - "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$.", + "quote": "**Lemma 3.2 (vanishing certificate; [[ABSSW26, Lemma 2.9 and Corollary 2.10]][paper]).** A polynomial $A\\in F[X_1,\\ldots,X_k]$ vanishes on $H^k$ if and only if $A=\\sum_i Z_H(X_i)U_i(X)$ for some polynomials $U_i$. The $U_i$ can be chosen so that the vanishing certificate $M(X,Y)=\\sum_iY_iU_i(X)$ has $\\deg M\\le\\deg A$; it satisfies $M(X,0)=0$ and $M(X,Z_H(X_1),\\ldots,Z_H(X_k))=A(X)$. Conversely, if any polynomial $M$, linear in $Y$ or not, satisfies these two identities, then $A$ vanishes on $H^k$.", "lean": [ "PCP.Algebraic.GridVanishing.vanishesOn_iff_exists_certificate" ], "anchor": { - "heading": "Three colours as polynomial equations", - "block": 19 + "heading": "3.1 Three-colourability as polynomial equations", + "block": 22 } }, { "id": "pcp-long-algebra-grid-interpolation", - "section": "1", + "section": "2.1", "role": "explains", - "quote": "It is the unique polynomial with these individual degree bounds and these evaluations.", + "quote": "Every function $H^k\\to F$ is the restriction of exactly one polynomial of degree at most $h-1$ in each variable.", "lean": [ "PCP.Algebraic.GridInterpolation.existsUnique_extension" ], "anchor": { - "heading": "1. Polynomial distance, interpolation, and grid certificates", - "block": 14 + "heading": "2.1 Notation and conventions", + "block": 7 } }, { "id": "pcp-long-algebra-line-characterization", - "section": "1", + "section": "4.1", "role": "explains", - "quote": "Then $f$ is represented by a multivariate polynomial of total degree at most $d$.", + "quote": "Then $f$ is a polynomial function of total degree at most $d$.", "lean": [ "PCP.Algebraic.PolynomialLine.exists_polynomial_of_hasLowDegreeLines_finite" ], "anchor": { - "heading": "1. Polynomial distance, interpolation, and grid certificates", - "block": 33 + "heading": "4.1 The Schwartz–Zippel lemma, low-degree extension and vanishing certificates", + "block": 38 } }, { "id": "pcp-long-algebra-weighted-plurality", - "section": "2", + "section": "4.2", "role": "explains", - "quote": "This proves that the corrected word $g$ satisfies every weighted constraint.", + "quote": "If moreover (A10) below holds, then $g(x)=\\sum_iw_ig(x+a_iv)$ for all $x,v$.", "lean": [ "PCP.Algebraic.WeightedConstraint.correction_satisfies" ], "anchor": { - "heading": "2. The corrected short low-degree test", - "block": 33 + "heading": "4.2 The standard low-degree test", + "block": 20 } }, { "id": "pcp-long-algebra-generator-soundness", - "section": "2", + "section": "4.2", "role": "explains", - "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$.", + "quote": "Suppose $q>2c$. If the standard low-degree test rejects $f$ with probability $\\delta<1/[2(c+2)^2]$, then a 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" ], "anchor": { - "heading": "2. The corrected short low-degree test", - "block": 37 + "heading": "4.2 The standard low-degree test", + "block": 41 } }, { "id": "pcp-long-algebra-line-table-correction", - "section": "3", + "section": "4.4", "role": "explains", - "quote": "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", + "quote": "**Lemma 4.6 (local correction with a lines table; cf. [[ABSSW26, Theorem 2.14]][paper]).** Let $P$ have degree at most $d$, let $\\Delta(f,P)=\\eta$, and fix a point $u\\in V$. For each slope $v\\in V$, let $T_v\\in F[T]$ be any polynomial of degree at most $d$. Choose $v$ uniformly and independently choose $z$ uniformly in $F^\\times$.", "lean": [ "PCP.Algebraic.LineTableLocalCorrection.correct_wrong_le" ], "anchor": { - "heading": "3. Recovering a specified value", - "block": 7 + "heading": "4.4 Local correction", + "block": 10 } }, { "id": "pcp-long-algebra-bivariate-statement", - "section": "4", + "section": "4.5", "role": "explains", - "quote": "Then there exists $P\\in F[X,Y]$, of degree at most $d$ in **each** variable, such that $\\Delta(f,P)\\le4\\varepsilon$.", + "quote": "Then there exists $P\\in F[X,Y]$, of degree at most $d$ in each variable, such that $\\Delta(f,P)\\le4\\varepsilon$.", "lean": [ "PCP.Algebraic.BivariateAgreement.exists_polynomial_of_row_column_agreement" ], "anchor": { - "heading": "4. Bivariate agreement", - "block": 5 + "heading": "4.5 Bivariate agreement", + "block": 4 } }, { "id": "pcp-long-algebra-column-selection", - "section": "4", + "section": "4.5", "role": "explains", - "quote": "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", + "quote": "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}$.", "lean": [ "PCP.Algebraic.BivariateColumnSelection.exists_good_columns" ], "anchor": { - "heading": "4. Bivariate agreement", - "block": 8 + "heading": "4.5 Bivariate agreement", + "block": 9 } }, { "id": "pcp-long-algebra-error-locator", - "section": "4", + "section": "4.5", "role": "explains", - "quote": "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", + "quote": "Following [[AS98, Lemma 5.2.5 and its polynomial extension, Lemma 5.2.7]][arora-safra], seek bivariate polynomials $E,N$ satisfying", "lean": [ "PCP.Algebraic.BerlekampWelchCertificate.exists_certificate_of_good_specializations" ], "anchor": { - "heading": "4. Bivariate agreement", - "block": 14 + "heading": "4.5 Bivariate agreement", + "block": 16 } }, { "id": "pcp-long-algebra-clean-rectangle", - "section": "4", + "section": "4.5", "role": "explains", - "quote": "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", + "quote": "At most $2d$ of the $10d$ selected columns have $E(a_i,Y)=0$ as a polynomial, again by counting roots over $F[Y]$. Choose $d+1$ columns $J$ on which this polynomial is nonzero.", "lean": [ "PCP.Algebraic.BivariateCleanRectangle.exists_nonzero_columns" ], "anchor": { - "heading": "4. Bivariate agreement", - "block": 26 + "heading": "4.5 Bivariate agreement", + "block": 29 } }, { "id": "pcp-long-algebra-agreement-boost", - "section": "4", + "section": "4.5", "role": "explains", "quote": "Adding the initial row error gives $\\Delta(f,P)\\le\\varepsilon+3\\varepsilon=4\\varepsilon$, as asserted.", "lean": [ "PCP.Algebraic.BivariateAgreementBoost.distance_le_four_mul" ], "anchor": { - "heading": "4. Bivariate agreement", - "block": 47 + "heading": "4.5 Bivariate agreement", + "block": 51 } }, { "id": "pcp-long-algebra-point-line-statement", - "section": "5", + "section": "4.6", "role": "explains", - "quote": "then there is a polynomial $P$ of total degree at most $d$ with $\\Delta(f,P)\\le2\\delta$.", + "quote": "then there is a polynomial $P$ of total degree at most $d$ with $\\Delta(f,P)\\le2\\delta$, including $d=0$ and $m=0$.", "lean": [ "PCP.Algebraic.PointLineTest.exists_close_of_small_rejection" ], "anchor": { - "heading": "5. Point-versus-line soundness", + "heading": "4.6 The point-versus-line test", "block": 6 } }, { "id": "pcp-long-algebra-fixed-parameter", - "section": "5", + "section": "4.6", "role": "explains", - "quote": "First obtain an error bound for a **fixed** line parameter $t$. Let", + "quote": "First bound the error at a fixed line parameter $t$.", "lean": [ "PCP.Algebraic.PointLineTest.rejectionAt_le_four_mul" ], "anchor": { - "heading": "5. Point-versus-line soundness", - "block": 16 + "heading": "4.6 The point-versus-line test", + "block": 19 } }, { "id": "pcp-long-algebra-crossing", - "section": "5", + "section": "4.6", "role": "explains", - "quote": "If the selected row and column polynomials are nearest approximations, their values at the crossing agree.", + "quote": "If the selected row and column polynomials are nearest to that row and that column, their values at the crossing agree.", "lean": [ "PCP.Algebraic.PointLineCrossing.crossing_eq_of_nearby_polynomial", "PCP.Algebraic.BivariateCrossingSoundness.crossing_bestApproximation_eq" ], "anchor": { - "heading": "5. Point-versus-line soundness", - "block": 27 + "heading": "4.6 The point-versus-line test", + "block": 31 } }, { "id": "pcp-long-algebra-ruled-surface", - "section": "5", + "section": "4.6", "role": "explains", - "quote": "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", + "quote": "Fix a line $y\\mapsto x+yh$, and choose once and for all a polynomial $Q(y)$ of degree at most $d$ nearest to $g$ on this line. We prove that $Q$ equals $g$ on the whole line.", "lean": [ "PCP.Algebraic.RuledSurface.hasLowDegreeLines_of_endpoint_bounds" ], "anchor": { - "heading": "5. Point-versus-line soundness", - "block": 45 + "heading": "4.6 The point-versus-line test", + "block": 51 } }, { "id": "pcp-long-algebra-point-line-constants", - "section": "5", + "section": "4.6", "role": "explains", - "quote": "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", + "quote": "Since $d>0$, (A22) gives $q\\ge10^6$ and $q\\ge1000d^3$.", "lean": [ "PCP.Algebraic.PointLineConstants.field_bounds" ], "anchor": { - "heading": "5. Point-versus-line soundness", - "block": 62 + "heading": "4.6 The point-versus-line test", + "block": 69 } }, { "id": "pcp-long-algebra-degree-zero", - "section": "5", + "section": "4.6", "role": "explains", - "quote": "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", + "quote": "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.", "lean": [ "PCP.Algebraic.PointLineTest.exists_close_degree_zero" ], "anchor": { - "heading": "5. Point-versus-line soundness", - "block": 69 + "heading": "4.6 The point-versus-line test", + "block": 79 } }, { "id": "pcp-long-set-multilinear", - "section": "A high-degree univariate polynomial as a low-degree multivariate polynomial", + "section": "5.1", "role": "states", - "quote": "$$\n\\operatorname{Dec}(\\operatorname{Enc}(p))=p\\qquad\\text{in }F[Y].\n$$", + "quote": "$$\n\\Psi(p)\\circ\\Phi=p\\qquad\\text{in }F[Y].\n$$", "lean": [ "PCP.Algebraic.SetMultilinear.decode_encode" ], "anchor": { - "heading": "A high-degree univariate polynomial as a low-degree multivariate polynomial", + "heading": "5.1 The set-multilinear encoding", "block": 9 } }, { "id": "pcp-long-hadamard-labels", - "section": "Binary labels for field elements", + "section": "2.2", "role": "explains", - "quote": "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.", + "quote": "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, and the pairing preserves the homogeneous labels. Averaging over the point gives (B1).", "lean": [ "PCP.Algebraic.Hadamard.relativeDistance_encodeFunction_map" ], "anchor": { - "heading": "Binary labels for field elements", - "block": 7 + "heading": "2.2 Labels and the Hadamard encoding", + "block": 12 } }, { "id": "pcp-long-hadamard-composition", - "section": "Binary labels for field elements", + "section": "5.2", "role": "explains", - "quote": "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", + "quote": "Composing with $L$ therefore gives a label $\\Lambda_{A,L}\\in\\mathcal B_r$ satisfying", "lean": [ "PCP.Algebraic.HadamardComposition.encode_query" ], "anchor": { - "heading": "Binary labels for field elements", - "block": 15 + "heading": "5.2 Label composition", + "block": 2 } }, { "id": "pcp-long-blr-proof", - "section": "Testing a received Hadamard word", + "section": "5.3", "role": "explains", - "quote": "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", + "quote": "If the test rejects with probability $\\epsilon$, some linear functional $\\varphi$ satisfies $\\Delta(w,\\varphi)\\leq\\epsilon$.", "lean": [ "PCP.Algebraic.BLR.exists_linearMap_distance_le_of_rejection_le" ], "anchor": { - "heading": "Testing a received Hadamard word", - "block": 2 + "heading": "5.3 The Hadamard test", + "block": 4 } }, { "id": "pcp-long-hadamard-self-correction", - "section": "Testing a received Hadamard word", + "section": "5.3", "role": "explains", - "quote": "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", + "quote": "If $\\Delta(w,\\varphi)\\leq\\epsilon$ for a linear $\\varphi$, both arguments $R$ and $\\Lambda+R$ are uniform, for every fixed $\\Lambda$. Outside two events of probability at most $\\epsilon$ each, the read equals $\\varphi(\\Lambda)$.", "lean": [ "PCP.Algebraic.Hadamard.selfCorrect_failure_le" ], "anchor": { - "heading": "Testing a received Hadamard word", - "block": 15 + "heading": "5.3 The Hadamard test", + "block": 18 } }, { "id": "pcp-long-hadamard-soundness", - "section": "Testing a received Hadamard word", + "section": "5.3", "role": "explains", - "quote": "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$.", + "quote": "Suppose the Hadamard test rejects $w$ with probability at most $\\epsilon<1/28$. Then there is a field element $u$ with $\\Delta(w,\\mathcal H_r(u))\\le\\epsilon$ and, on affine labels, (B6) below.", "lean": [ "PCP.Algebraic.Hadamard.test_soundness" ], "anchor": { - "heading": "Testing a received Hadamard word", - "block": 23 + "heading": "5.3 The Hadamard test", + "block": 27 } }, { "id": "pcp-long-hadamard-row-decoding", - "section": "Testing a received Hadamard word", + "section": "5.3", "role": "explains", - "quote": "The same $g$ occurs in both conclusions.", + "quote": "**Corollary 5.3 (Hadamard test on a points table).** Let $w:F^k\\times\\mathcal B_r\\to\\mathbb F_2$, and let $\\overline e$ be the rejection probability of the Hadamard test on the word $w(x,\\cdot)$, averaged over uniform $x$. Then there is a function $g:F^k\\to F$ with", "lean": [ "PCP.Algebraic.Hadamard.exists_field_function_of_average_rejectionRate" ], "anchor": { - "heading": "Testing a received Hadamard word", - "block": 38 + "heading": "5.3 The Hadamard test", + "block": 43 } }, { "id": "pcp-long-binary-weighted-test", - "section": "A binary version of the weighted low-degree test", + "section": "5.4", "role": "explains", - "quote": "This proves a uniform row-decoding statement with no smallness assumption. The decoded polynomial is again the same in both conclusions.", + "quote": "If the inner low-degree test rejects $w$ with probability $\\kappa$, then some polynomial $U$ of total degree at most $c$ satisfies (B11) below. No bound on $\\kappa$ is assumed.", "lean": [ "PCP.Algebraic.BinaryLocalRowDecoding.exists_polynomial_distance_le" ], "anchor": { - "heading": "A binary version of the weighted low-degree test", - "block": 17 + "heading": "5.4 The inner low-degree test", + "block": 10 } }, { "id": "pcp-long-binary-inner-correction", - "section": "A binary version of the weighted low-degree test", + "section": "5.4", "role": "explains", - "quote": "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", + "quote": "If $\\Delta_{\\rm hom}(w,\\mathcal H_1(U))=\\tau$, then for every fixed $u$, over uniform $v$ and uniform homogeneous $L$,", "lean": [ "PCP.Algebraic.BinaryStandardLocalCorrection.failure_le" ], "anchor": { - "heading": "A binary version of the weighted low-degree test", - "block": 20 + "heading": "5.4 The inner low-degree test", + "block": 26 } }, { "id": "pcp-long-encoded-line-test", - "section": "Testing a high-degree outer polynomial", + "section": "5.5", "role": "explains", - "quote": "The query list has length at most $2r+2c+12$", + "quote": "The test makes at most $2r+2c+12$ queries.", "lean": [ "PCP.Algebraic.EncodedLineLowDegreeTest.queries_length_le" ], "anchor": { - "heading": "Testing a high-degree outer polynomial", + "heading": "5.5 The binary low-degree test", "block": 4 } }, { "id": "pcp-long-encoded-line-soundness", - "section": "Testing a high-degree outer polynomial", + "section": "5.5", "role": "explains", - "quote": "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.", + "quote": "There is then a polynomial $P\\in F[X_1,\\ldots,X_k]$ of total degree at most $D$ with $\\Delta(g,P)\\leq2J_c\\kappa$.", "lean": [ "PCP.Algebraic.EncodedLineLowDegreeTest.exists_close" ], "anchor": { - "heading": "Testing a high-degree outer polynomial", + "heading": "5.5 The binary low-degree test", "block": 15 } }, { "id": "pcp-long-outer-local-corrector", - "section": "Correcting an outer value at a prescribed point", + "section": "5.6", "role": "explains", - "quote": "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.", + "quote": "Fix a target $a\\in F^k$. The local corrector queries a points table $f$ with affine labels and the lines-table entries $f'_{a,v}$ of the lines through $a$. It chooses a uniform slope $v\\in F^k$, a uniform parameter $z\\in F^\\times$, a uniform homogeneous label $L$, a slope in $F^{cb}$ for standard local correction, and an independent seed for the inner low-degree test. It runs the inner low-degree test on $f'_{a,v}$ and rejects if that test fails. Otherwise it corrects the entry at $\\Phi(z)$ by (B12) and compares the answer with $f(a+zv,L)$, rejecting if they differ. If both checks pass, it returns the correction at $\\Phi(0)$, computed with the same inner slope and label.", "lean": [ "PCP.Algebraic.BinaryLocalCorrection.run", "PCP.Algebraic.BinaryLocalCorrection.sample" ], "anchor": { - "heading": "Correcting an outer value at a prescribed point", + "heading": "5.6 Local correction with a lines table", "block": 2 } }, { "id": "pcp-long-final-target", - "section": "The algebraic PCP theorem: a detailed account of the Lean proof", + "section": "1", "role": "explains", - "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.", + "quote": "The implementation, the constants and the polynomial $p$ are fixed for $\\mathcal L$ before the input. The proof may depend on the input and is fixed before the random seed is drawn.", "lean": [ "PCP.np_subset_pcp" ], "anchor": { - "heading": "The algebraic PCP theorem: a detailed account of the Lean proof", - "block": 9 + "heading": "1. Introduction", + "block": 6 } }, { "id": "pcp-long-colour-equations", - "section": "Three colours as polynomial equations", + "section": "3.1", "role": "explains", "quote": "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.", "lean": [ "PCP.Algebraic.ThreeColorAlgebra.sub_cube_eq_one_iff_ne" ], "anchor": { - "heading": "Three colours as polynomial equations", - "block": 8 + "heading": "3.1 Three-colourability as polynomial equations", + "block": 11 } }, { "id": "pcp-long-grid-constraints", - "section": "Three colours as polynomial equations", + "section": "3.1", "role": "explains", - "quote": "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.", + "quote": "A proper colouring makes $A_P$ vanish on $H^m$ and $B_P$ vanish on $H^{2m}$. Conversely, these two vanishing conditions, together with $Q_P(X,Y)=P(X)-P(Y)$, recover a proper colouring by Lemma 3.1.", "lean": [ "PCP.Algebraic.ThreeColorGrid.colorable_iff_exists_constraints" ], "anchor": { - "heading": "Three colours as polynomial equations", - "block": 18 + "heading": "3.1 Three-colourability as polynomial equations", + "block": 21 } }, { "id": "pcp-long-derived-constraints", - "section": "The eight tables and seven checks", + "section": "3.2", "role": "explains", - "quote": "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.", + "quote": "For an exact Hadamard encoding, linearity in the label gives the requested bit for every $R$, even though $Z\\mapsto Z^3-1$ is nonlinear in the field value.", "lean": [ "PCP.Algebraic.HadamardDerivedOracle.answer_encode" ], "anchor": { - "heading": "The eight tables and seven checks", - "block": 12 + "heading": "3.2 The proof tables and the verifier", + "block": 19 } }, { "id": "pcp-long-query-budget", - "section": "The eight tables and seven checks", + "section": "3.2", "role": "states", - "quote": "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.", + "quote": "Their sum is $20c+107$, independent of the graph; it includes both queries of each self-corrected read.", "lean": [ "PCP.Algebraic.ThreeColorVerifier.queries_length_le" ], "anchor": { - "heading": "The eight tables and seven checks", - "block": 18 + "heading": "3.2 The proof tables and the verifier", + "block": 25 } }, { "id": "pcp-long-completeness", - "section": "Perfect completeness", + "section": "3.4", "role": "explains", - "quote": "The same eight tables satisfy all these statements simultaneously. Consequently every seven-component random seed accepts. This proves perfect completeness.", + "quote": "If $G$ is three-colourable, some proof is accepted on every seed.", "lean": [ "PCP.Algebraic.ThreeColorVerifier.exists_proof_test_eq_true" ], "anchor": { - "heading": "Perfect completeness", - "block": 7 + "heading": "3.4 Perfect completeness", + "block": 4 } }, { "id": "pcp-long-decoding-contract", - "section": "Soundness of the seven-check verifier", + "section": "3.5", "role": "explains", - "quote": "the four outer tests supply four actual polynomials $P,Q_*,M_A,M_B$, each of total degree at most $D$.", + "quote": "Let $\\kappa$ be the rejection probability of an arbitrary received proof; we show that $\\kappa -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. +**Abstract.** The PCP theorem [AS98, ALMSS98] states that every language in NP has a polynomial-time verifier using $O(\log n)$ random bits and $O(1)$ proof-bit queries, with perfect completeness and soundness error at most one half. We give a detailed exposition of Troy Lee's Lean formalization of the algebraic construction of Amireddy, Behera, Srinivasan, Sudan and Willumsgaard. Set-multilinear encoding reduces the degree of line polynomials, and low-degree Hadamard encoding permits binary tests. We reconstruct the algebraic estimates and the machine-model arguments establishing the query, randomness and running-time 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 +## 1. Introduction + +Let $\mathcal L$ be a language of finite binary strings. Say that $\mathcal L$ is in NP if there are a polynomial $p_{\rm w}$ and a deterministic polynomial-time Boolean relation $\mathcal R(x,w)$, the witness relation, such that $$ -x\in L +x\in \mathcal L \quad\Longleftrightarrow\quad -\exists w\in\{0,1\}^{*},\quad |w|\le p_0(|x|)\ \text{and}\ R(x,w)=1. +\exists w\in\{0,1\}^{*},\quad |w|\le p_{\rm w}(|x|)\ \text{and}\ \mathcal R(x,w)=1. $$ -Then there exist a single probabilistic proof verifier $V$, a polynomial-time implementation of its query protocol, constants $a,b,\ell\in\mathbb N$, and a polynomial $p\in\mathbb N[X]$, with the following properties for every input $x$ of length $n$. +A verifier receives an input $x$ and a random seed, and has query access to a bit string $\pi:\mathbb N\to\{0,1\}$, called the proof. It reads bits of $\pi$, each address possibly depending on the bits already read, and then accepts or rejects. + +**Theorem 1.1 (PCP theorem; [AS98], [ALMSS98]).** If $\mathcal L$ is in NP, there exist a single verifier $V$, a polynomial-time implementation of its query protocol, constants $\alpha,\beta,\ell\in\mathbb N$, and a polynomial $p\in\mathbb N[X]$, with the following properties for every input $x$ of length $n$. -1. The verifier draws exactly $r(n)=a\lceil\log_2(n+2)\rceil+b$ independent fair bits. +1. The verifier draws exactly $r(n)=\alpha\lceil\log_2(n+2)\rceil+\beta$ independent fair bits. 2. On every random seed and every branch of its query protocol, it reads at most $\ell$ bits of the proof, all at addresses less than $p(n)$. -3. If $x\in L$, there is one proof $\pi$ for which every random seed makes $V$ accept. -4. If $x\notin L$, then for every proof $\pi$, at most half of the random seeds make $V$ accept. +3. Perfect completeness: if $x\in \mathcal L$, there is one proof $\pi$ for which every random seed makes $V$ accept. +4. Soundness error one half: if $x\notin \mathcal L$, then for every proof $\pi$, at most half of the random seeds make $V$ accept. -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. This is the forward inclusion +The implementation, the constants and the polynomial $p$ are fixed for $\mathcal L$ before the input. The proof may depend on the input and is fixed before the random seed is drawn. This gives $$ \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 first chapter supplies the implementation and witness-checker arguments in both directions, using the machine results identified below. Together the inclusions give +**Theorem 1.2 (reverse inclusion).** If a language has a verifier with a polynomial-time implementation and properties 1 to 4 of Theorem 1.1, for some constants $\alpha,\beta,\ell$ and some polynomial $p$, then it is in NP. + +The proof is in Section 3.12. Hence $$ \mathrm{NP}=\mathrm{PCP}(O(\log n),O(1)). $$ -The formal statement uses an infinite Boolean oracle $\pi:\mathbb N\to\{0,1\}$ and bounds every reachable address by $p(n)$; only that finite prefix can affect acceptance. Its exact randomness formula makes the budget computable, and unused random bits may be ignored. The definition of NP is tied to the formalization's concrete machine model and is proved equivalent to the pinned ComplexityLib nondeterministic-machine class. See the [verifier definitions][intro-verifier], [forward theorem][intro-theorem], [concrete reverse theorem][intro-reverse], and [reference NP equivalence][intro-reference]. +*Remark (formalization).* Lee bounds every reachable address of the infinite proof by $p(n)$, so only that prefix affects acceptance. His verifier model permits adaptive queries; the verifier constructed here is nonadaptive, as in [[ABSSW26, Definition 2.1]][intro-paper]. Property 1 is an exact randomness formula, where [ABSSW26] states $O(\log n)$; surplus random bits are ignored. NP is defined in the machine model of Section 2.3 and is proved equivalent to the nondeterministic-machine class of ComplexityLib. + +Lean: [verifier][intro-verifier], [Theorem 1.1][intro-theorem], [Theorem 1.2][intro-reverse], [reference class NP][intro-reference]. -## How the proof is organized +The construction and its two encodings are due to Amireddy, Behera, Srinivasan, Sudan and Willumsgaard [ABSSW26]: the set-multilinear encoding lowers the degree of the restriction of a polynomial to a line, and the degree-$r$ Hadamard encoding turns tests on field values into tests on bits. The formalization is Troy Lee's [Lee26]. It adds explicit constants, a weaker field-size hypothesis for the low-degree test of [ABSSW26, Lemma 3.3], a sampler from fair bits, the reduction from an arbitrary NP language and a polynomial-time machine. The classical ingredients are the point-versus-line test [ALMSS98], bivariate agreement [AS98], the linearity test [BLR93, BCHKS96] and the low-degree tests of [RS96], [FS95/13] and [KS08]. Our contribution is the explanation: prose proofs of the statements Lee formalized, in the order of his assembly. -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. - -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. +In Section 2 we fix notation, the Hadamard encoding and the machine model. In Section 3 we construct the verifier and prove Theorems 1.1 and 1.2 from Lemmas 3.2 to 3.6, which are stated there and proved later. Section 4 contains the field-valued results: the standard low-degree test, local correction, bivariate agreement and the point-versus-line test. In Section 5 we construct the binary tests and prove Lemmas 3.3 to 3.6. Section 6 lists what the formalization proves and where it differs from [ABSSW26]. -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. +![Main implications in the soundness argument and theorem assembly. Each arrow names the guarantee used at its destination.](proof-map.png) -![Main implications in the soundness argument and theorem assembly. Each arrow names the guarantee used at its destination. This is an authored proof map, not an extracted Lean dependency graph.](proof-map.png) - -The encoded-line theorem supplies the four polynomial witnesses. Correction and the derived grid tests constrain these same witnesses at the certificate points; the difference check connects the colour and difference witnesses. The resource and reduction arguments then give the forward PCP inclusion. For the reverse inclusion, a nondeterministic machine guesses the finite proof prefix and checks every random seed. The implementation results in the next table supply the machine-level contracts. -## Reading this account +## 2. Preliminaries + +### 2.1 Notation and conventions -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. +The [specialist paper](../short/paper.md) gives the theorem and the main proof structure; the [exposition with worked examples](../expository/main.md) develops the construction through calculations. + +Throughout, $F$ is a finite field with $q$ elements. Outside Section 4, $F$ has characteristic two, $q=2^t$, and $\rho:F\to\mathbb F_2^t$ is a fixed $\mathbb F_2$-linear isomorphism. A polynomial is a formal object in $F[X_1,\ldots,X_k]$; over a finite field, distinct polynomials can have the same evaluation function. Degree means total degree unless the degree in each variable is specified, and the zero polynomial satisfies every degree bound. Probabilities are uniform over the displayed finite set. For two functions $f,g$ on the same finite domain, $\Delta(f,g)$ is the fraction of inputs at which they differ, their relative Hamming distance; $f$ is $\delta$-close to $g$ when $\Delta(f,g)\le\delta$. + +For $u,v\in F^k$ the line through $u$ with slope $v$ is $z\mapsto u+zv$; $v=0$ is allowed. The pair $(u,v)$ is the index of the line and $u$ its base point. -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. +A grid is a power $H^k$ of a nonempty set $H\subseteq F$; we write $h=|H|$ and $Z_H(T)=\prod_{a\in H}(T-a)$. Two standard facts are proved in Section 4.1. +**Lemma 2.1 (Schwartz–Zippel lemma; [[ABSSW26, Theorem 2.5]][paper]).** A nonzero polynomial of total degree at most $d$ in $k$ variables vanishes at no more than a fraction $d/q$ of the points of $F^k$. + +**Lemma 2.2 (low-degree extension; [[ABSSW26, Fact 2.4]][paper]).** Every function $H^k\to F$ is the restriction of exactly one polynomial of degree at most $h-1$ in each variable. This polynomial, the low-degree extension of the function, has total degree at most $k(h-1)$. + +For the seven polynomials of Section 3.1 we write $P,Q_P,A_P,B_P,E,M_A,M_B$, as Lee does; [[ABSSW26, Section 7]][paper-pcp] writes $\chi,\chi',\mathsf{Val},\mathsf{Prop},\widehat E,\mathcal M_{\mathsf{Val}},\mathcal M_{\mathsf{Prop}}$. +### 2.2 Labels and the Hadamard encoding + + + +For $r\geq1$, let $\mathcal B_r$ be the vector space of multilinear polynomials over $\mathbb F_2$ in $t$ variables $Z_1,\ldots,Z_t$ of degree at most $r$. A label is an element of $\mathcal B_r$. Labels are evaluated on $\mathbb F_2^t$, where reducing $Z_i^2$ to $Z_i$ preserves evaluations, so monomials are indexed by subsets of coordinates. The degree-$r$ Hadamard encoding [[ABSSW26, Definition 3.5]][paper] of a field element $u$ is the binary word + +$$ +\mathcal H_r(u)(R)=R(\rho(u)),\qquad R\in\mathcal B_r. +$$ + +A word is an arbitrary function $\mathcal B_r\to\mathbb F_2$. Labels in $\mathcal B_1$ are affine. Affine labels without constant term are homogeneous; they have the form + +$$ +L_w(z)=\sum_{i=1}^t w_i z_i,\qquad w\in\mathbb F_2^t. +$$ + +We identify a label $R$ with the map $u\mapsto R(\rho(u))$ on $F$, so that the homogeneous labels are the $\mathbb F_2$-linear functionals $F\to\mathbb F_2$. For a field-valued function $g$, write $\mathcal H_r(g)(x,R)=\mathcal H_r(g(x))(R)$. For two functions of a point and a label, $\Delta_{\rm full}$ is their distance over all labels in $\mathcal B_r$, and $\Delta_{\rm hom}$ their distance over homogeneous labels only. + +**Lemma 2.3 (half-distance identity; [[ABSSW26, Observation 3.8]][paper]).** If $u\neq v$ and $r\geq1$, then + +$$ +\Delta(\mathcal H_r(u),\mathcal H_r(v))=\frac12. +$$ + +Exactly half of the homogeneous labels also separate $u$ from $v$. Consequently, for field-valued functions $g,h$ on one domain, + +$$ +\Delta(\mathcal H_r(g),\mathcal H_r(h)) +=\frac12\Delta(g,h), +\tag{B1} +$$ + +and the same identity holds when distance is measured only on homogeneous labels. + +*Proof.* 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, and the pairing preserves the homogeneous labels. Averaging over the point gives (B1). $\square$ + +Closeness of a word to an encoding over all of $\mathcal B_r$ need not control its error on homogeneous labels, so the soundness statements below give both bounds for one polynomial. When the label domain is $\mathcal B_1$, homogeneous labels occupy half of it, and their error is at most twice the affine-label error. For $r>1$, this restriction gives no dimension-independent proportional bound in terms of the distance over $\mathcal B_r$. + + [intro-paper]: https://arxiv.org/abs/2608.17429v2 @@ -76,68 +129,67 @@ The detailed proofs include the intermediate estimates, parameter substitutions [intro-reference]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Complexity/ReferenceNPConverse.lean -### Implementation results used in the argument +### 2.3 The machine model -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. +Lee's machines are deterministic finite multi-stack machines with fixed public encodings. A verifier step takes an input, a seed and the history of answers, and either returns a verdict or requests the next proof address. The 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 request at depth zero becomes rejection. This condition alone does not assert that the step halts within that depth. Polynomial running time is a separate property of the machine. -| 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 | +The transition-level proofs about these machines are not reproduced; Section 3 uses five of their conclusions. The program for the seven-check verifier computes the query list and verdict for every input, seed and answer history, and polynomial bounds on its charged cost, its storage and the repetition protocol give a polynomial-time machine (Section 3.9). A witness checker for an NP language yields a polynomial-time map to graphs (Section 3.10). Randomness of the form in Theorem 1.1 and a polynomial address bound permit polynomial-time checking of every seed against a finite prefix of the proof, and the class defined by witness checkers equals the nondeterministic-machine definition of NP in ComplexityLib (Section 3.12). -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. +Lean: [verifier step][lean-runtime-correct], [cost][lean-runtime-cost], [compilation][lean-runtime], [NP reduction][lean-np-runtime], [finite-witness checker][intro-reverse], [reference machines][intro-reference]. -## 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_*$. +## 3. The three-colourability verifier and the proof of the PCP theorem -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. + +The verifier is that of [[ABSSW26, Section 7]][paper-pcp], with Lee's parameter choices; Sections 3.6 to 3.11 add the sampler from fair bits, the polynomial-time machine and the reduction from NP. Throughout the section, $m$ is the grid dimension, $b$ the radix and $c$ the degree of the set-multilinear encoding, and $D=cb^c$. The letter $Q_*$ denotes a polynomial close to the received difference table, to be compared with $Q_P$. -### Three colours as polynomial equations +### 3.1 Three-colourability 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 +Let $F$ contain a primitive cube root of unity $\omega$. The three colours will be $$ \mathcal C=\{1,\omega,\omega^2\}. $$ -These are distinct, and they are exactly the roots of $Z^3-1$. For two valid colours $u,v$, the equation +These are distinct, and they are exactly the roots of $Z^3-1$. + +**Lemma 3.1 (colour equations).** For two colours $u,v\in\mathcal C$, the equation $$ (u-v)^3=1 $$ -holds exactly when $u\ne v$. To prove the nontrivial direction, characteristic two gives +holds exactly when $u\ne v$. Consequently an assignment $f:V(G)\to F$ is a proper three-colouring precisely when $$ -(u-v)^4=u^4-v^4=u-v, +f(v)^3-1=0\quad(v\in V(G)),\qquad +(f(v)-f(w))^3-1=0\quad(vw\in E(G)). $$ -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 +*Proof.* Characteristic two gives $$ -f(v)^3-1=0\quad(v\in V(G)),\qquad -(f(v)-f(w))^3-1=0\quad(vw\in E(G)). +(u-v)^4=u^4-v^4=u-v, $$ -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. +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. $\square$ + +Both families of equations are needed: assigning the four elements of $\mathbb F_4$ to the vertices of $K_4$ satisfies every edge equation, since a nonzero element of $\mathbb F_4$ has cube one, although $K_4$ is not three-colourable. + +Lean: [colour algebra][lean-colour-algebra]. -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. +Choose a nonempty set $H\subseteq F$, of size $h$, and a dimension $m$ with $|V(G)|\le h^m$. Place the vertices in $H^m$ and treat unused grid points as isolated vertices. Extending a colouring to those points preserves three-colourability in both directions. -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 +Let $P$ be the low-degree extension of the colour assignment on $H^m$, and let $E$ be the low-degree extension of the graph's zero-one adjacency function on $H^m\times H^m$ (Lemma 2.2). Writing $$ -d_0=d(h-1), +d_0=m(h-1), $$ we have $\deg P\le d_0$ and $\deg E\le2d_0$. Form the difference and constraint polynomials @@ -150,155 +202,185 @@ B_P(X,Y)&=E(X,Y)\bigl(Q_P(X,Y)^3-1\bigr). \end{aligned} $$ -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. +Their total degrees are at most $d_0,3d_0,5d_0$, respectively. A proper colouring makes $A_P$ vanish on $H^m$ and $B_P$ vanish on $H^{2m}$. Conversely, these two vanishing conditions, together with $Q_P(X,Y)=P(X)-P(Y)$, recover a proper colouring by Lemma 3.1. The factor $E$ is computed from the input adjacency table; at grid points it is one on edges and zero on nonedges. + +**Lemma 3.2 (vanishing certificate; [[ABSSW26, Lemma 2.9 and Corollary 2.10]][paper]).** A polynomial $A\in F[X_1,\ldots,X_k]$ vanishes on $H^k$ if and only if $A=\sum_i Z_H(X_i)U_i(X)$ for some polynomials $U_i$. The $U_i$ can be chosen so that the vanishing certificate $M(X,Y)=\sum_iY_iU_i(X)$ has $\deg M\le\deg A$; it satisfies $M(X,0)=0$ and $M(X,Z_H(X_1),\ldots,Z_H(X_k))=A(X)$. Conversely, if any polynomial $M$, linear in $Y$ or not, satisfies these two identities, then $A$ vanishes on $H^k$. + +The first assertion is the Combinatorial Nullstellensatz for a grid; the lemma is proved in Section 4.1. Vanishing on $H^k$ thereby becomes two identities that can be tested at random points of $F^k$. Apply it to $A_P$ and $B_P$ to obtain $M_A$ and $M_B$. The degree bound $5d_0$ covers $P$, $Q_P$ and both certificates. -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. +*Remark (formalization).* Lee's implementation flattens the two blocks of vertex coordinates of $B_P$ and $M_B$ into one. This coordinate bijection preserves evaluations, total degree and relative distances. + +Lean: [grid construction][lean-colour-grid]. -### The eight tables and seven checks +### 3.2 The proof tables and the verifier -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. +The proof is the bit string the verifier queries; it consists of eight tables, which [ABSSW26] call proof oracles. Each of the four polynomials $P,M_A,Q_P,M_B$ has a points table and a lines table. For a polynomial $W$ on $F^k$, the honest points table is $\mathcal H_r(W):F^k\times\mathcal B_r\to\mathbb F_2$, with $k$ and $r$ as follows. + +| Polynomial | Coordinates $k$ | Honest points table | +| :---------------------------------------------- | :-------------- | :------------------- | +| $P$, the low-degree extension of the colouring | $m$ | $\mathcal H_3(P)$ | +| $M_A$, the vertex vanishing certificate | $2m$ | $\mathcal H_1(M_A)$ | +| $Q_P$, the difference polynomial | $2m$ | $\mathcal H_3(Q_P)$ | +| $M_B$, the edge vanishing certificate | $4m$ | $\mathcal H_1(M_B)$ | + +The lines table of $W$ assigns to each pair $(u,v)\in F^k\times F^k$ the restriction $z\mapsto W(u+zv)$; the proof stores it after set-multilinear and Hadamard encoding. The degree of the restriction grows with the graph. The set-multilinear encoding replaces it by a polynomial of degree $c$ in $cb$ variables, obtained by writing each exponent below $b^c$ in base $b$. + +**Lemma 3.3 (set-multilinear encoding; [[ABSSW26, Definition 3.1 and Claim 3.2]][paper]).** Let $b\ge1$ and $c\ge0$. There is a linear map $\Psi$ from univariate polynomials of degree less than $b^c$ to polynomials of total degree at most $c$ in $cb$ variables such that $\Psi(p)(\Phi(z))=p(z)$ for every $z\in F$, where $\Phi(z)_{i,k}=z^{kb^i}$ for $0\le i -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 constraint polynomials $A_P$ and $B_P$ have no tables. A zero-on-grid test obtains the bit $L(A_P(x))$, for a homogeneous label $L$, from the points table of $P$. + +**Lemma 3.4 (label composition; [[ABSSW26, Claim 3.7]][paper]).** Let $A\in F[Y]$ have degree at most $r$ and let $L$ be an affine label. There is a label $\Lambda_{A,L}\in\mathcal B_r$ with $L(A(u))=\Lambda_{A,L}(u)$ for every $u\in F$. + +The lemma is proved in Section 5.2. Suppose $p(x,\cdot)$ is the received word intended to be $\mathcal H_3(P(x))$. To request the bit $L(P(x)^3-1)$, draw a fresh random label $R$, uniform in $\mathcal B_3$, and return $$ p(x,R+\Lambda_{Z^3-1,L})+p(x,R), $$ -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. +in $\mathbb F_2$, using two queries. This is a self-corrected read. The edge constraint is read in the same way from the difference table, with the label for $Z\mapsto E(x,y)(Z^3-1)$. -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. +For an exact Hadamard encoding, linearity in the label gives the requested bit for every $R$, even though $Z\mapsto Z^3-1$ is nonlinear in the field value. For a fixed received word, both queried labels are uniform, so the error probability is at most twice the distance of that word from the exact encoding. Each self-corrected read uses a fresh random label, and this error is retained in Lemma 3.6. -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 difference check samples $x,y\in F^m$ and a homogeneous label $L$ independently and uniformly. It checks that the difference table agrees with the colour table: the bit of the difference table at $((x,y),L)$ must equal the sum of the bits of the colour table at $(x,L)$ and $(y,L)$. -The seven physical query bounds, in the order colour, vertex certificate, difference, edge certificate, vertex ZERO, edge ZERO, and difference check, are +The seven query bounds, in the order colour, vertex certificate, difference, edge certificate, vertex zero-on-grid, edge zero-on-grid, and difference check, are $$ 2c+18,\quad2c+14,\quad2c+18,\quad2c+14, \quad6c+20,\quad6c+20,\quad3. $$ -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. +Their sum is $20c+107$, independent of the graph; it includes both queries of each self-corrected read. Two proofs agreeing on the listed addresses give the same verdict. + +Lean: [query list][lean-query-budget]. -### Perfect completeness +### 3.3 Guarantees of the tests - -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 + +The tests of Section 5 depend on two lists of $c+1$ nodes in $F$. The test nodes $a_i$ serve the standard low-degree test [[ABSSW26, Lemma 3.3]][paper], which accepts a function $f$ when $f(u)=\sum_{i}\eta_i f(u+a_iv)$ at uniform $u,v$, with Lagrange weights $\eta_i$. The correction nodes are the powers $\zeta,\zeta^2,\ldots,\zeta^{c+1}$ of a nonzero $\zeta$. The completeness clauses below need $b\ge1$ and distinct nodes in each list. The soundness clauses assume in addition that $q>2c$ and that the test nodes are the powers $\theta,\ldots,\theta^{c+1}$ of a generator $\theta$ of $F^\times$; then $\zeta=\theta$ is admissible. + +The constants in the soundness clauses are $$ -5d(h-1) +In Section 3.5 the hypothesis that $A$ is a polynomial holds because $A$ is $P^3-1$ or $E\,((P(X)-P(Y))^3-1)$. + -### Soundness of the seven-check verifier +### 3.4 Perfect completeness - -Set $D=cm^c$. Suppose the field and grid satisfy + +**Proposition 3.7 (perfect completeness).** Use a radix $b\ge1$, $c+1$ distinct test nodes, and a nonzero correction parameter $\zeta$ whose powers $\zeta,\zeta^2,\ldots,\zeta^{c+1}$ are distinct. Assume $$ -Q\ge10^6D^3,\qquad Q\ge100Dh, -\qquad d(h-1)\le D, +5m(h-1) + +### 3.5 Soundness + + +**Theorem 3.8 (soundness of the seven-check verifier).** Suppose the field and grid satisfy + +$$ +q\ge10^6D^3,\qquad q\ge100Dh, +\qquad m(h-1)\le D, +$$ -| 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. | +with $c,b,h\ge1$, that $F$ contains a primitive cube root of unity, and that the nodes satisfy the soundness conditions of Section 3.3. Then every proof for a graph that is not three-colourable is rejected with probability at least $g_c$, a positive constant depending only on $c$ and defined at the end of the proof. -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 +*Proof.* Let $\kappa$ be the rejection probability of an arbitrary received proof; we show that $\kappa +from the corresponding points tables: over all labels in $\mathcal B_3$ for $P$ and $Q_*$, and over homogeneous labels for all four. We call them the nearby polynomials; the analysis chooses them, and the verifier never computes them. - -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$. +First identify $Q_*$. Replace the three received bits in the difference check by the bits $L(Q_*(x,y))$, $L(P(x))$ and $L(P(y))$ of the nearby polynomials. The replacement can change the verdict only if one of these three bits differs, an event of probability at most $3\varepsilon$. Hence the check on the exact encodings 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 +For a nonzero field element $z$, exactly half of the homogeneous labels satisfy $L(z)=1$ (Lemma 2.3). Therefore the rejection probability on the exact encodings 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 Lemma 2.1 would give relative distance at least $1-D/q$. It follows that $$ -\kappa+3\varepsilon<\frac{1-D/Q}{2} +\kappa+3\varepsilon<\frac{1-D/q}{2} $$ -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. +forces the formal polynomial identity $Q_*(X,Y)=P(X)-P(Y)$. -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 +Now consider the vertex constraint $A_P=P^3-1$ of the nearby polynomial $P$. Its degree is at most $3D$. For the edge constraint, the adjacency polynomial $E$ has degree at most $2D$; by the identity just proved, the edge constraint $$ B_P=E\bigl((P(X)-P(Y))^3-1\bigr) $$ -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. +has degree at most $5D$. Both certificates $M_A,M_B$ have degree at most $D$, so the common degree bound $5D$ suffices for the two zero-on-grid tests. -The derived-ZERO inequality (B25) says that if either decoded constraint fails to vanish on its grid, then +Apply Lemma 3.6 with $D_1=5D$. If either constraint fails to vanish on its grid, then $$ -\frac{1-5Dh/Q}{2} +\frac{1-5Dh/q}{2} \le (1+2C_c)(\kappa+2\varepsilon) -+2\varepsilon+\frac{5D}{Q-1}. ++2\varepsilon+\frac{5D}{q-1}. $$ -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. +Here $2\varepsilon$ inside the parentheses is the loss from the self-corrected read; it is multiplied by $1+2C_c$ because it enters through the rejection probability of the test. The other $2\varepsilon$ comes from the two values read from the certificate, and the last term from reading them at a nonzero line parameter (Section 5.6). -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. +Consequently, the strict reverse inequality forces $A_P$ to vanish on $H^m$ and $B_P$ to vanish on $H^{2m}$. By Lemma 3.1, $P|_{H^m}$ is then a proper colouring. -An explicit positive gap makes all three inequalities hold at once. Define +To satisfy the three inequalities simultaneously, define $$ \begin{aligned} @@ -306,144 +388,146 @@ 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}{4\,000\,000(J_c+1)}, \frac{1}{16B_c}, \frac{1}{16(T_c+1)}\right\}. \end{aligned} $$ -At the chosen value $c=4$, the constants evaluate to - -| $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\kappa0$. If $0\le\kappa -### Parameters for every finite graph +### 3.6 Parameters -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 +Lee chooses one explicit parameter family, where [ABSSW26] gives an asymptotic choice. For a graph with $N$ vertices, let $\nu$ be the least integer at least two with $$ -\lceil\log _2N\rceil\le a2^a. +\lceil\log _2N\rceil\le \nu2^\nu. $$ -Use the natural ceiling-log convention at $N=0,1$; the definition still selects $a=2$. Put +Use the natural ceiling-log convention at $N=0,1$; the definition still selects $\nu=2$. Put $$ -s=2^a,\quad d=m=h=s,\quad c=4, -\quad t=12a+32,\quad Q=2^t=2^{32}s^{12}. +s=2^\nu,\quad m=b=h=s,\quad c=4, +\quad t=12\nu+32,\quad q=2^t=2^{32}s^{12}. $$ -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 field $F$ is $\mathbb F_2[T]$ modulo a computed monic irreducible polynomial of degree $t$, and $\rho$ reads the $t$ coefficients of a residue. Since $t$ is divisible by four, $3\mid q-1$; bounded searches in a fixed numeric order of the field supply a primitive cube root of unity and a generator of $F^{\times}$. The grid $H$ consists of the first $s$ field elements in this order. It need not be a subfield. -The grid has $h^d=s^s=2^{a2^a}\ge N$ points. With $D=4s^4$, the soundness field requirement holds because +**Lemma 3.9 (parameter choice).** For every $N$, these parameters satisfy $h^m\ge N$ and the hypotheses of Proposition 3.7 and Theorem 3.8, and $$ -10^6D^3=64\,000\,000s^{12}\le2^{32}s^{12}=Q. +\nu2^\nu\le4\max\{8,\lceil\log _2N\rceil\} +\le32(\lceil\log _2N\rceil+1). $$ -Also $100Dh=400s^5\le Q$. Since $s\ge4$, +*Proof.* The grid has $h^m=s^s=2^{\nu2^\nu}\ge N$ points. With $D=4s^4$, the field-size hypothesis of Theorem 3.8 holds because $$ -5s(s-1)2$, then +Also $100Dh=400s^5\le q$. Since $s\ge4$, $$ -(a-1)2^{a-1}<\lceil\log _2N\rceil, -\qquad -a2^a\le4(a-1)2^{a-1}. +5s(s-1)2c$, the powers of the generator serve as both lists of nodes. Thus completeness and soundness hold for the same field, grid, cube root and generator. + +By minimality of $\nu$, if $\nu>2$, then $$ -a2^a\le4\max\{8,\lceil\log _2N\rceil\} -\le32(\lceil\log _2N\rceil+1). +(\nu-1)2^{\nu-1}<\lceil\log _2N\rceil, +\qquad +\nu2^\nu\le4(\nu-1)2^{\nu-1}. $$ -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. +If $\nu=2$, then $\nu2^\nu=8$. Both cases yield the displayed bound. $\square$ + +Thus a quantity bounded by a fixed multiple of $\nu2^\nu$ is logarithmic in $N$, and one bounded by $2^{O(\nu2^\nu)}$ is polynomial in $N$. + +Lean: [parameters][lean-parameters], [choice of $\nu$][lean-choice]. -### From finite samples to fair random bits +### 3.7 Fair random bits and proof length -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. +Each zero-on-grid test reads two values of its certificate along lines, at a line parameter uniform on $F^\times$ (Section 5.6); the seven checks use four such parameters. No fixed number of fair bits samples $F^\times$ uniformly when $q>2$, because $q-1$ is then not a power of two, so Lee's verifier draws all four from $F$. If any is zero, it accepts immediately and makes no queries; otherwise it runs the seven-check verifier. -Conditioned on all four being nonzero, the decoded seed has exactly the original product-uniform distribution. Every other coordinate is unchanged. Therefore +Conditioned on all four being nonzero, the 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 +=\left(\frac{q-1}{q}\right)^4 \Pr[\text{original verifier rejects}]. $$ -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. +Since $q\ge2$, the factor is at least $1/16$. Perfect completeness survives, and every proof for a graph that is not three-colourable is rejected with probability at least $\delta=g_4/16$. -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. +Every remaining random coordinate is a field vector, a vector of label coefficients or a finite product of such objects. The map $\rho$ and explicit product codecs give a bijection between the seed space and the bit strings of a fixed length, so uniform bit strings induce exactly the required distribution. Likewise, an invertible tagged mixed-radix codec packs the eight tables into one binary string, and the query list is translated through it. + +Lean: [whole-field sampling][lean-sampling]. -Here is how polynomial proof length follows for the actual eight-table address space. A degree-$r$ Boolean label on $t$ coordinates has +It remains to count proof bits and random bits. The dimension $$ -b_r(t)=\sum_{j=0}^{r}\binom tj +\dim\mathcal B_r=\sum_{j=0}^{r}\binom tj $$ -binary coefficients, so there are $C_r=2^{b_r(t)}$ labels. The four primary-table lengths are +gives $|\mathcal B_r|=2^{\dim\mathcal B_r}$ labels. The lengths of the four points tables are $$ -Q^dC_3,\quad Q^{2d}C_1,\quad Q^{2d}C_3,\quad Q^{4d}C_1. +q^m|\mathcal B_3|,\quad q^{2m}|\mathcal B_1|,\quad q^{2m}|\mathcal B_3|,\quad q^{4m}|\mathcal B_1|. $$ -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 +An address of the lines table of a polynomial on $F^j$ consists of an index in $F^j\times F^j$, an inner point in $F^{cb}$ and an affine label, so that table has length $q^{2j+cb}|\mathcal B_1|$. The lengths of the four lines tables are $$ -Q^{2d+cm}C_1,\quad Q^{4d+cm}C_1,\quad -Q^{4d+cm}C_1,\quad Q^{8d+cm}C_1. +q^{2m+cb}|\mathcal B_1|,\quad q^{4m+cb}|\mathcal B_1|,\quad +q^{4m+cb}|\mathcal B_1|,\quad q^{8m+cb}|\mathcal B_1|. $$ -Since $b_1(t)\le b_3(t)\le(t+1)^3$, the sum of these eight lengths is at most +Since $\dim\mathcal B_1\le\dim\mathcal B_3\le(t+1)^3$, the sum of these eight lengths is at most $$ -2^{(8d+cm)t+(t+1)^3+3}. +2^{(8m+cb)t+(t+1)^3+3}. $$ -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. +For $m=b=2^\nu$, $c=4$ and $t=12\nu+32$, the exponent is at most $132\,000\nu2^\nu$. One elementary estimate controls the cubic term: $\nu^2\le4\cdot2^\nu$ for every natural $\nu$, and $12\nu+33\le32\nu$ for $\nu\ge2$. Hence $(t+1)^3\le131\,072\nu2^\nu$; the remaining linear terms fit within the stated bound. -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: +For the seed count, write $u=\binom t2$ and $v=\binom t3$ until the display of $r$. The Hadamard tests of Section 5.3 on affine and on degree-three labels use $3(1+t)$ and $5+5t+3u+2v$ bits. The inner low-degree test of Section 5.4 uses $1+3tcb+2t+3(1+t)=4+3tcb+5t$ bits, including its fair coin and the data sampled for both of its alternatives. Expanding the seven product seeds gives the following counts. | 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$ | +| :------------------------------ | :---------------------- | --------------------: | +| Colour low-degree | $2tm+4tcb+12t+9+3u+2v$ | $0$ | +| Vertex-certificate low-degree | $4tm+4tcb+10t+7$ | $0$ | +| Difference low-degree | $4tm+4tcb+12t+9+3u+2v$ | $0$ | +| Edge-certificate low-degree | $8tm+4tcb+10t+7$ | $0$ | +| Vertex zero-on-grid | $5tm+8tcb+12t+9+u+v$ | $2$ | +| Edge zero-on-grid | $10tm+8tcb+12t+9+u+v$ | $2$ | +| Difference check | $2tm+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 +The original seed space therefore has size $(q-1)^4 2^{35tm+32tcb+69t+50+8u+6v}$. Replacing the four nonzero-field draws by whole-field draws adds $4t$ bits. The exact fair-bit seed length is $$ -r=35td+32tcm+73t+50+8\binom t2+6\binom t3. +r=35tm+32tcb+73t+50+8\binom t2+6\binom t3. $$ -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 +This counts every product coordinate, even when a check ignores it or the verifier accepts early on a zero parameter. The same elementary estimates bound $r$ by $10^6\nu2^\nu$. Combining both estimates with $\nu2^\nu\le32(\lceil\log_2N\rceil+1)$, and using $2^{\lceil\log_2N\rceil}\le2\max\{1,N\}$, gives $$ \begin{aligned} @@ -453,36 +537,33 @@ r(N)&\le32\,000\,000(\lceil\log _2N\rceil+1),\\ \end{aligned} $$ -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. - -For an encoded graph input $x$, its decoded vertex count is at most $n=|x|$. The verifier uses the canonical budget +Here $\operatorname{proofLength}(N)$ is the length of the packed proof. A graph encoded by an input $x$ has at most $n=|x|$ vertices. The verifier draws $$ 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 +fair bits and ignores those beyond the exact seed length $r$. Every shorter bit string has the same number of extensions, so this preserves the acceptance probability. Every address is below the value of the polynomial $$ -p_0(n)=\bigl(4(n+1)\bigr)^{4\,224\,000}. +p_G(n)=\bigl(4(n+1)\bigr)^{4\,224\,000}. $$ -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 nonadaptive list of at most 187 queries is compiled into a decision tree of that depth, whose evaluation equals the verdict of the seven checks for every proof. This is the base verifier. + +**Proposition 3.10 (base verifier).** A fixed convention reads every input, well formed or not, as a graph. On an input of length $n$ the base verifier draws exactly $r_0(n)$ fair bits and reads at most 187 proof bits, at addresses below $p_G(n)$. It has perfect completeness, and rejects every proof for a graph that is not three-colourable with probability at least $\delta=g_4/16$. + +Lean: [seed length][lean-seed-size], [proof length][lean-resources], [binary verifier][lean-binary], [base verifier][lean-canonical]. -### Repetition on one fixed proof +### 3.8 Amplification and explicit constants -With the constants fixed above, exact rational arithmetic gives +**Lemma 3.11 (amplification).** Let $0<\delta\le1$ and $R=\lceil1/\delta\rceil$. Suppose a verifier rejects every proof for a no-instance with probability at least $\delta$. Run it $R$ times with independent seeds on the same proof, and accept only if every run accepts. Then every proof for a no-instance is accepted with probability at most one half. Perfect completeness and the address bound are unchanged, and the numbers of queries and of random bits are multiplied by $R$. -$$ -g_4=\frac1{71\,115\,455\,156\,448},\qquad -\delta=\frac1{1\,137\,847\,282\,503\,168}. -$$ - -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$. +*Proof.* For a fixed proof with single-run acceptance probability $u$, independence gives acceptance probability $u^R$. For a no-instance, $u\le1-\delta$, so it remains to show $(1-\delta)^R\le1/2$. -An elementary inequality proves this without logarithmic approximation: +We prove by induction that $$ (1+k\delta)(1-\delta)^k\le1 @@ -502,88 +583,113 @@ $$ (1-\delta)^R\le\frac1{1+R\delta}\le\frac12. $$ -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 remaining assertions are immediate. $\square$ + +Lean: [repetition bound][lean-repetition-bound], [amplified verifier][lean-amplified]. + +**Explicit constants.** The amplified verifier applies Lemma 3.11 to the base verifier of Proposition 3.10, with $c=4$. At that value the constants of Sections 3.3 and 3.5 are + +| $K_4$ | $J_4$ | $S_4$ | $C_4$ | $T_4$ | +| -----------: | -------------: | -------------: | -------------: | -----------------------: | +| $105408$ | $1054138$ | $1054166$ | $1054082$ | $4444715947277$ | + +and exact rational arithmetic gives + +$$ +g_4=\frac1{71\,115\,455\,156\,448},\qquad +\delta=\frac1{1\,137\,847\,282\,503\,168}. +$$ + +Thus $R=1/\delta=1\,137\,847\,282\,503\,168$. The base verifier makes at most $20c+107=26+22+26+22+44+44+3=187$ queries, and the amplified verifier at most $187R=212\,777\,441\,828\,092\,416$. The seed length $r$, its bound $r_0(n)$ and the address bound $p_G(n)$ are displayed in Section 3.7. -### The polynomial-time implementation +### 3.9 The polynomial-time implementation -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. +**Proposition 3.12 (polynomial-time implementation).** The amplified verifier has a polynomial-time implementation in the machine model of [Section 2.3](#23-the-machine-model). + +*Proof.* Lee writes the verifier in a fixed program language and compiles it to the machines of Section 2.3. It remains to bound the cost of each operation. -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. +Parameter selection is a bounded search for the least admissible $\nu$. Field arithmetic reduces polynomials of degree below $t=12\nu+32$ modulo the irreducible modulus, and inversion uses powering. The modulus, the cube root of unity and the generator of $F^\times$ are found by bounded searches whose ranges are polynomial in $q$, and $q=2^{32}s^{12}$ is polynomially bounded in the input length. With candidate tests and storage included, the charged cost is at most $7\,000\,000(q+1)^7$ for the modulus, $400\,000\,000(q+4)^6$ for each root search and $10^9(q+4)^7$ for the whole field setup. The existence of an irreducible polynomial of each degree is [[Shoup05, Theorem 20.11]][shoup]; Sections 20.2 and 21.1 there analyse irreducibility testing and randomized construction. The deterministic searches and these cost bounds are Lee's. -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. +The adjacency polynomial $E$ is evaluated from the input adjacency matrix by interpolation sums over $H^m\times H^m$, which has polynomial size because $|H^m|=2^{\nu2^\nu}$ and Lemma 3.9 applies. Lagrange weights, the coordinates of $\Phi$ and the labels $\Lambda_{A,L}$ are computed by bounded loops. Addresses are below $p_G(n)$, and the sizes of their stored representations are bounded as well. -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. +The verifier step of the base verifier has two passes: the first constructs the list of queries, and the second evaluates the verdict of the seven checks from the answers. A seed in which one of the four line parameters is zero yields no queries and acceptance. These outputs agree with the mathematical query list and verdict for every input, seed and answer history. -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 +For the cost, polynomial bounds on the setup, on the storage of the generated queries and on the seven checks are substituted into the routines that consume them. If the query storage is bounded by $C_q(n+1)^{d_q}$ and the cost of a check has degree $d_b$ in the size of its input and answer history, the combined bound has exponent at least $$ \max\{84,d_q,(d_q+1)d_b\}. $$ -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. +Constants are enlarged to absorb the two passes, the fixed overhead of seven checks and the setup. The charged cost is then at most $C(|x|+|r|+|u|+1)^e$ for every seed $r$ and answer history $u$, for constants $C,e$. -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. +The repetition protocol of Lemma 3.11 cuts the random string into $R$ blocks, runs the same verifier step on each, and manages the answer history. Because $R$ is fixed, its loop and storage overhead are polynomial. The compiler and the public input and output codecs preserve the semantics of the verifier step and translate the charged cost into a bound on the number of machine steps. $\square$ + +Lean: [field setup][lean-field-cost], [verifier step][lean-runtime-correct], [cost][lean-runtime-cost], [runtime][lean-runtime]. -### From every NP verifier to a graph +### 3.10 The reduction from NP to three-colourability -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 +We construct the polynomial-time map $f$ from inputs to encoded graphs of Proposition 3.13, stated at the end of the subsection. Fix an NP language $\mathcal L$, a witness relation $\mathcal R(x,w)$, a witness bound $p_{\rm w}\in\mathbb N[X]$, and a polynomial-time machine checking $\mathcal R$. Then $$ -x\in L\iff\exists w\ (|w|\le q(|x|)\ \text{and}\ R(x,w)=1). +x\in\mathcal L\iff\exists w\ (|w|\le p_{\rm w}(|x|)\ \text{and}\ \mathcal R(x,w)=1). $$ Let $T_0$ be the checker's time polynomial. At input length $n$, one bound valid for all permitted witnesses is $$ -T(n)=T_0(n+q(n)+1). +T(n)=T_0(n+p_{\rm w}(n)+1). $$ 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 $$ -S(n)=n+q(n)+1+B T(n). +S(n)=n+p_{\rm w}(n)+1+B T(n). $$ -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)$. +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 $\mathcal R(x,w)=1$. This equivalence holds for all witness lengths from zero through $p_{\rm w}(n)$. + +Lean: [tableau][lean-tableau]. 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 +By the locality theorem for the machine, 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 $$ w_0+(j-\lambda), $$ -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. +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. Consequently, if a row represents a real configuration, its prefix is linked and the cell constraints hold, then the next row represents exactly the successor configuration. The growth bound of the machine ensures that no 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. +Initial constraints fix the input bits, delimiter and all other stacks. In the next $p_{\rm w}(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 $p_{\rm w}(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 +For $k$ stacks, the number of variables is $$ v(n)=(T(n)+1)(1+kS(n))+1, $$ -including a blank variable. The constraint count is +including a blank variable, and the number of constraints is $$ c(n)=1+(T(n)+1)kw_0+T(n)+T(n)kS(n) -+2(1+kS(n))+q(n). ++2(1+kS(n))+p_{\rm w}(n). $$ -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. +Both are polynomials: the terms count the blank test, prefix links, control steps, cell steps, two boundaries and witness-adjacency tests respectively. One degenerate case is fixed by the machine: 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 graph that is not three-colourable, so no assumption that acceptance is possible is needed. + +Lean: [cell steps][lean-tableau-cells], [cell constraints][lean-cell-constraints], [reduction][lean-np-reduction]. -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. +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. Reading the true indices of a satisfying one-hot assignment, and encoding a source assignment, both 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 +For a Boolean relation $R_e$ on $k_0$ input bits and each pattern $p\in\{0,1\}^{k_0}$, introduce flags $z_0,\ldots,z_{k_0}$ with $$ z_0=0,\qquad z_{i+1}=z_i\lor(x_i\mathbin{\mathrm{xor}}p_i), @@ -596,7 +702,9 @@ $$ (z\lor\neg x),\qquad(z\lor\neg y),\qquad(\neg z\lor x\lor y), $$ -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. +padding short clauses with false. The flags 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. Since $k_0$ is fixed by the source machine, this is a constant number per relation. + +Lean: [one-hot encoding][lean-one-hot], [clauses][lean-boolean-clauses]. @@ -609,72 +717,84 @@ $$ 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. +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 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 $$ -G_{f(x)}\text{ is three-colourable}\iff x\in L. +G_{f(x)}\text{ is three-colourable}\iff x\in\mathcal L. $$ + +Lean: [NAE gadget][lean-nae]. -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. +The reduction 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. + +The cost of the program follows from polynomial preprocessing and a sixth-degree bound in its size and in the numbers of variables and constraints; substituting their polynomial bounds gives a polynomial. The compiler and the fixed public symbol codecs give the corresponding machine, which preprocesses the input of the final verifier. -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. +**Proposition 3.13 (reduction to three-colourability).** For every NP language $\mathcal L$ there are a map $f$ on bit strings, a polynomial $p_f\in\mathbb N[X]$, a program and constants $C,e$, depending only on the witness relation, its length bound and its checker, such that for every input $x$ the program emits $f(x)$ at charged cost at most $C(|x|+1)^e$, the output has length at most $p_f(|x|)$, and $G_{f(x)}$ is three-colourable if and only if $x\in\mathcal L$. + +Lean: [reduction program][lean-np-runtime]. -### Transporting the verifier through the reduction +### 3.11 Transport through the reduction -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, +*Proof of Theorem 1.1.* By Proposition 3.10 and Lemma 3.11, the amplified verifier for graphs draws exactly $A\lceil\log _2(n+2)\rceil+B$ random bits on inputs of length $n$, for fixed $A,B\in\mathbb N$. Let $f$ and $p_f$ be as in Proposition 3.13, so that $|f(x)|\le p_f(|x|)$. Put $e=\deg p_f$, with degree zero for the zero polynomial. Since the coefficients are nonnegative, $$ -p(n)\le p(1)(n+2)^e, +p_f(n)\le p_f(1)(n+2)^e, \qquad -p(n)+2\le(p(1)+2)(n+2)^e. +p_f(n)+2\le(p_f(1)+2)(n+2)^e. $$ 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 $$ -\lceil\log _2(p(n)+2)\rceil +\lceil\log _2(p_f(n)+2)\rceil \le e\lceil\log _2(n+2)\rceil -+\lceil\log _2(p(1)+2)\rceil. ++\lceil\log _2(p_f(1)+2)\rceil. $$ -Choose source randomness +Choose $$ -a=Ae,\qquad b=A\lceil\log _2(p(1)+2)\rceil+B. +\alpha=Ae,\qquad \beta=A\lceil\log _2(p_f(1)+2)\rceil+B. $$ -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. +These formulas remain valid for constant and zero polynomials, where $\alpha$ can be zero. On input $x$, the verifier computes $f(x)$, runs the amplified verifier for graphs on the initial segment of the random string that it needs, and ignores the rest. All fibres of the prefix map have equal size, so the acceptance probability is unchanged. Addresses are below $p_G(p_f(n))$, because polynomials with natural coefficients are monotone. The number of queries is unchanged. + +If $x\in\mathcal L$, the graph $G_{f(x)}$ is three-colourable and has a proof accepted on every seed. If $x\notin\mathcal L$, it is not three-colourable, and every proof is accepted with probability at most $1/2$. The polynomial-time reduction composed with the polynomial-time implementation of Proposition 3.12 is polynomial-time. All constants depend only on the witness relation, its length bound and its checker. $\square$ -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. +Lean: [transport][lean-transport], [assembly][lean-assembly], [Theorem 1.1][lean-theorem]. -### The reverse inclusion +### 3.12 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. +*Proof of Theorem 1.2.* Suppose a language $\mathcal L$ has a verifier with a polynomial-time implementation and properties 1 to 4 of Theorem 1.1. Take as witness the first $p(n)$ bits of a proof. The witness relation runs the verifier on every random seed and accepts exactly if all runs accept. -There are polynomially many seeds. Indeed, +The number of seeds satisfies $$ -2^{a\lceil\log _2(n+2)\rceil+b} -\le2^b\bigl(2(n+2)\bigr)^a. +2^{\alpha\lceil\log _2(n+2)\rceil+\beta} +\le2^\beta\bigl(2(n+2)\bigr)^\alpha. $$ -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. +For each seed, at most $\ell$ answers are requested. Each address is below $p(n)$, and looking up a bit of the witness takes polynomial time even by a linear scan. The implementation of each verifier 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 in the machine model of Section 2.3. + +If $x\in\mathcal 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 proof, which is accepted with probability one. If $x\notin\mathcal L$, soundness would make it at most $1/2$, a contradiction. Thus the witness relation characterizes $\mathcal L$. $\square$ + +Lean: [finite-witness checker][lean-concrete-converse]. -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. +*Remark (formalization).* The class defined by witness checkers in Lee's machine model equals the nondeterministic-machine definition of NP in ComplexityLib, by two simulations. -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. +Given a polynomial-time nondeterministic machine, a witness records the sequence of nondeterministic choices, whose length the time bound limits. A deterministic checker follows these choices and checks that the machine has accepted when the list ends; its compiled program has polynomial cost. -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. +Conversely, a witness checker is translated into a nondeterministic machine that computes the bound on the witness length, guesses a witness within it, and runs the checker in polynomial time. An accepting branch exists exactly when an accepted witness does. -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. +Lean: [reference class NP][lean-reference-np]. [paper-pcp]: https://arxiv.org/html/2608.17429v2#S7 @@ -715,90 +835,94 @@ For the converse, translate the concrete certificate checker into a reference de [lean-one-hot]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Reduction/FiniteDomainConstraints.lean#L119 -## Algebraic tests and correction +## 4. Algebraic tests and local 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. +A low-degree test shows that a function is close to a polynomial; a local corrector recovers a prescribed value of that polynomial from a function already known to be close to it. This section proves both kinds of statement for field-valued functions, in the forms Lee formalized from [[ABSSW26, Sections 2 and 3]][paper], and proves Lemmas 2.1, 2.2 and 3.2. -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 +In this section $F$ is any finite field with $q$ elements, $V=F^m$ for an arbitrary dimension $m\ge0$, and $s,t$ denote line parameters. Recall that $$ \Delta(f,g)=\Pr_x[f(x)\ne g(x)]. $$ -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 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$. +We use repeatedly that a nonzero polynomial of degree at most $d$ in one variable over an integral domain has at most $d$ roots. -### 1. Polynomial distance, interpolation, and grid certificates +### 4.1 The Schwartz–Zippel lemma, low-degree extension and vanishing certificates -**Polynomial distance.** If $P\ne0$ has total degree at most $d$, then +*Proof of Lemma 2.1 (Schwartz–Zippel lemma).* The assertion is that if $P\ne0$ has total degree at most $d$, then $$ \Pr_{x\in F^m}[P(x)=0]\le d/q. \tag{A1} $$ -For completeness, induct on $m$. For $m=0$, a nonzero polynomial is a nonzero constant. In the induction step write +Induct on $m$. For $m=0$, a nonzero polynomial is a nonzero constant. In the induction step write $$ P(X,T)=\sum_{j=0}^r P_j(X)T^j,\qquad P_r\ne0. $$ -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$. +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. The total zero probability is therefore at most $(d-r)/q+r/q=d/q$. + +This proves the lemma. $\square$ -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 +*Proof of Lemma 2.2 (low-degree extension).* For $a\in H$, define the Lagrange basis polynomial $$ \ell_a(T)=\prod_{b\in H\setminus\{a\}}\frac{T-b}{a-b}. $$ -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 +The denominators are nonzero, and $\ell_a(b)$ is one for $b=a$ and zero for all other $b\in H$. Therefore a function $f:H^m\to F$ has the extension $$ \widetilde f(X)=\sum_{z\in H^m}f(z)\prod_{i=1}^m\ell_{z_i}(X_i). \tag{A2} $$ -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]. +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. For uniqueness, the difference of two such extensions vanishes on $H^m$; regarded as a polynomial in its last variable, it 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 the one-point grid give the same assertion when $m=0$. $\square$ + +Lean: [grid interpolation][lean-interpolation]. -**Vanishing on the grid.** Set +*Proof of Lemma 3.2 (vanishing certificate).* Set $$ Z_i(X)=\prod_{a\in H}(X_i-a). $$ -A polynomial $P$ vanishes on $H^m$ if and only if it admits the formal identity +Thus $Z_i(X)=Z_H(X_i)$. By the Combinatorial Nullstellensatz [[ABSSW26, Lemma 2.9]][paper], a polynomial $P$ vanishes on $H^m$ if and only if there are polynomials $U_i$ with $$ -P=\sum_{i=1}^m Q_i Z_i. +P=\sum_{i=1}^m U_i Z_i. \tag{A3} $$ -Moreover, the coefficients can be chosen so that every nonzero $Q_i$ satisfies +Moreover, they can be chosen so that every nonzero $U_i$ satisfies $$ -\deg Q_i+h\le\deg P. +\deg U_i+h\le\deg P. \tag{A4} $$ -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]. +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 U_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. In dimension zero a vanishing constant is zero and the sum is empty. -Package (A3) as one polynomial in two blocks of variables: +Now combine the $U_i$ into one polynomial in two blocks of variables: $$ -M(X,Y)=\sum_i Q_i(X)Y_i. +M(X,Y)=\sum_i U_i(X)Y_i. $$ It satisfies the formal identities @@ -808,35 +932,43 @@ M(X,0)=0,\qquad M(X,Z_1(X),\ldots,Z_m(X))=P(X), \tag{A5} $$ -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]. +and $\deg M\le\deg P$, since $h\ge1$ and (A4) gives $\deg U_i+1\le\deg P$. Conversely, if a polynomial $M$, including one nonlinear in $Y$, satisfies (A5), then $P$ vanishes on the grid, since the two substitutions agree at every grid point. This proves Lemma 3.2. $\square$ + +Nonemptiness of $H$ is needed for the degree bound. On an empty grid of positive dimension, the constant one vanishes vacuously but has no degree-zero certificate whose zero substitution is zero. Finally, substituting the $Z_i$ into an arbitrary polynomial $M$ of degree $D$ gives a polynomial of degree at most $hD$: each substituted variable has degree at most $h$, so the degree of each monomial grows by at most that factor. + +Lean: [Nullstellensatz][lean-grid], [certificate][lean-certificate]. -**From exact lines to total degree.** Suppose $q>2d$, and every function +**Lemma 4.1 (lines determine the degree; cf. [[FS95/13, Lemma 4]][friedl-sudan]).** Suppose $q>2d$, and every function $$ t\longmapsto f(u+tv),\qquad u,v\in V, $$ -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$. +is a polynomial function of degree at most $d$. Then $f$ is a polynomial function 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: +*Proof.* In this proof $Q$ denotes the interpolant defined below. Induct 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)$ satisfies the same hypothesis in one dimension less and therefore, by induction, is represented by a total-degree-$d$ polynomial $P_i(y)$. Interpolate the slices: $$ 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. +This polynomial has total degree at most $2d$. For fixed $y$, both $Q(\cdot,y)$ and the polynomial $x\mapsto f(x,y)$ have degree at most $d$ and agree at $d+1$ nodes, so $Q$ represents $f$ everywhere. + +It remains to improve total degree from $2d$ to $d$. For every slope $v$, the polynomial $Q(tv)$ has degree at most $2dd$. Each such component has degree at most $2dd$. Each such component has degree at most $2d2d$ permits the direct interpolation proof above. + +Lean: [line characterization][lean-lines]. -### 2. The corrected short low-degree test +### 4.2 The standard low-degree test -Let $c\ge0$, assume $q>2c$, and choose a generator $\zeta$ of $F^\times$. Put +Let $c\ge0$, assume $q>2c$, and choose a generator $\zeta$ of $F^\times$. The standard low-degree test [[ABSSW26, Fact 2.7 and Lemma 3.3]][paper] uses the nodes and weights $$ a_i=\zeta^i\quad(1\le i\le c+1),\qquad @@ -845,17 +977,19 @@ w_i=\prod_{\substack{1\le j\le c+1\\j\ne i}} \tag{A6} $$ -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$. +These nodes are distinct and nonzero, because $c+1\le q-1$ for $c>0$ and there is only one node for $c=0$. The weights are the Lagrange interpolation coefficients for evaluation at zero; they are nonzero, and $\sum_i w_i=1$. -For a word $f:V\to F$, define +For a function $f:V\to F$, define $$ A_f(x,v)=\sum_{i=1}^{c+1}w_i f(x+a_iv). $$ -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. +The test chooses $x,v\in V$ uniformly and accepts if $f(x)=A_f(x,v)$. It makes $c+2$ queries, including the one at $x$; the queried points need not be distinct, for example when $v=0$. Every polynomial of total degree at most $c$ is accepted for every $x,v$: restrict it to the line through $x$ with slope $v$ and apply Lagrange interpolation at zero. + +**Lemma 4.2 (exact characterization).** If the test accepts $f$ for every $x,v$, then $f$ is a polynomial function of total degree at most $c$. -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)}$: +*Proof.* First let $V=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 at $x=0$, $v=1$ gives $h(0)=0$. For $n>c+1$, use $x=0$ and $v=\zeta^{n-(c+1)}$: $$ 0=\sum_{i=1}^{c+1}w_i h\bigl(\zeta^{n-(c+1)+i}\bigr). @@ -863,12 +997,14 @@ $$ 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]. +For a function on $V$, fix a line through $u$ with slope $v$ and apply the same argument to the restriction. Its constraint at parameters $r,s\in F$ is the original constraint at the point $u+rv$ with slope $sv$. Hence the restriction to every line has degree at most $c$, and Lemma 4.1 applies because $q>2c$. The proof covers $c=0$ and every characteristic. $\square$ + +Lean: [exact characterization][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 +**Lemma 4.3 (plurality correction).** Let $a_1,\ldots,a_n\in F^\times$ and $w_1,\ldots,w_n\in F$, and define $A_f$ by the same formula with $n$ terms. The nodes may repeat and the weights may vanish. Set $$ \delta=\Pr_{x,v}[f(x)\ne A_f(x,v)],\qquad @@ -882,9 +1018,11 @@ $$ \tag{A7} $$ -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). +If moreover (A10) below holds, then $g(x)=\sum_iw_ig(x+a_iv)$ for all $x,v$. + +*Proof.* In this proof $D$ denotes the sum (A8) and $y,z,b$ are points of $V$. 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). -We next bound predictions at **each** center. Introduce the weighted grid +We next bound the predictions at each point $x$. Introduce $$ D(x;y,z,b)=\sum_{i,j}w_iw_j @@ -912,59 +1050,94 @@ $$ \tag{A9} $$ -Now fix **both** $x,v$. With random $y,b$, compare the following four values: +Now fix both $x$ and $v$. With uniform $y,b$, compare the four values $$ g(x),\quad A_f(x,y),\quad D(x;y,v,b),\quad \sum_iw_i g(x+a_i v). $$ -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 +The first comparison fails with probability at most $2n\delta$, by (A9). The second fails with probability at most $n\delta$, by the argument just given. For the third, rewrite $D$ as $$ D(x;y,v,b)=\sum_iw_i A_f(x+a_i v,\ y+a_i b). $$ -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 +For each $i$, the slope $y+a_i b$ is uniform; (A9) and a union bound give failure probability at most $2n^2\delta$. The first and last of the four values do not depend on $y,b$. If $$ (2n^2+3n)\delta<1, \tag{A10} $$ -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]. +their disagreement probability is less than one, so they are equal. $\square$ -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). +Lean: [plurality correction][lean-weighted]. + +Plurality correction and the double-sampling argument follow Rubinfeld and Sudan [[RS96, Section 4, Theorem 5 and Lemmas 6–8 of the manuscript]][rubinfeld-sudan], which [ABSSW26] cite after their Lemma 3.3 as Theorem 4.1 of the published paper. The pointwise bound (A9) is also [KS08, Lemma 3.1]. [ABSSW26] relate the test to [[KS08, Theorem 2.9]][kaufman-sudan], which assumes a 2-ary independent local formal characterization; for the $k=c+2$ forms $(u,v)\mapsto u$ and $(u,v)\mapsto u+a_iv$ its threshold $1/[(2k+1)(k-1)]$ is $1/(2c^2+7c+5)$, the threshold in (A10) at $n=c+1$. -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$. +**Theorem 4.4 (soundness of the standard low-degree test; cf. [[ABSSW26, Lemma 3.3]][paper]).** Suppose $q>2c$. If the standard low-degree test rejects $f$ with probability $\delta<1/[2(c+2)^2]$, then a polynomial of total degree at most $c$ agrees with $f$ outside a set of relative size at most $2\delta$. -Indeed, apply the preceding robustness result to (A6), with $n=c+1$. Its hypothesis is +*Proof.* Apply Lemma 4.3 to the nodes and weights (A6), with $n=c+1$. The assumed bound $$ \delta<\frac{1}{2(c+2)^2}, \tag{A11} $$ -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 +implies (A10), since $2(c+1)^2+3(c+1)=2c^2+7c+5<2(c+2)^2$. By Lemma 4.2, $g$ is a polynomial $P$ of total degree at most $c$, and (A7) gives $$ \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]. +This proves the theorem. $\square$ + +*Remark (formalization).* The proof uses only $q>2c$; [[ABSSW26, Lemma 3.3]][paper] assumes that $q$ exceeds a constant multiple of $c^3$. + +Lean: [standard low-degree test][lean-generator]. +### 4.3 The version-1 test + + +Version 1 of [ABSSW26] used the same identity with unit weights and, as nodes, the powers of an element of order $c+1$ [[ABSSW26v1, Fact 2.7 and Lemma 3.3]][paper-v1]. We call this the version-1 test and show that its soundness lemma fails. Let $q=2^{2k}$ for any $k\ge2$, set $c=2$, and choose $\omega$ of order three in $F^\times$; such an element exists because $3$ divides $q-1$. In any dimension $m\ge1$, put $f(x)=x_1^4$. The version-1 test accepts when + +$$ +f(u)+\sum_{i=1}^3 f(u+\omega^i v)=0. +$$ + +The characteristic-two Frobenius identity $(a+b)^4=a^4+b^4$ gives, for every pair $u,v$, + +$$ +f(u)+\sum_{i=1}^3 f(u+\omega^i v) +=4u_1^4+v_1^4\sum_{i=1}^3\omega^{4i}=0. +$$ -### 3. Recovering a specified value +Here $4=0$, $\omega^4=\omega$, and $1+\omega+\omega^2=0$. Thus the test accepts with probability one. Now let $P$ be any polynomial of total degree at most two, and fix the coordinates $x_2,\ldots,x_m$. The polynomial + +$$ +X^4-P(X,x_2,\ldots,x_m) +$$ + +has degree exactly four, hence at most four roots, so averaging over the fixed coordinates proves $\Delta(f,P)\ge1-4/q$. The same argument excludes polynomials of degree at most two in each variable. + +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 function $f$ is accepted for every $u,v$ but violates the conclusion of Lemma 3.3 of version 1 under its condition on the field size. Thus the characterization and the soundness lemma of version 1 fail; this does not construct a proof that deceives the PCP verifier. + +In version 2, Fact 2.7 and Lemma 3.3 use a generator of $F^\times$ and the weights (A6), and the acknowledgments thank Troy Lee for pointing out the mistake in Lemma 3.3 of version 1 [[ABSSW26]][paper]. The calculation above is our illustration; it has no Lean counterpart, and we neither attribute this example to Lee nor claim it as new. + + + +### 4.4 Local correction -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 +**Lemma 4.5 (standard local correction; cf. [[ABSSW26, Fact 2.8 and Lemma 3.4]][paper]).** Suppose $P$ has total degree at most $c$, $\Delta(f,P)=\eta$, and $\zeta\in F$ is any element for which the nodes in (A6) are distinct and nonzero. To recover $P(u)$, choose a uniform slope $v\in V$ and return $A_f(u,v)$. Then $$ \Pr_v[A_f(u,v)\ne P(u)]\le(c+1)\eta @@ -972,18 +1145,24 @@ $$ \tag{A13} $$ -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]. +*Proof.* If all $c+1$ queried 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 (A13); it requires no independence among the queried points. $\square$ + +The corrector makes $c+1$ queries and is exact when $f=P$. + +*Remark (formalization).* The lemma needs no bound on $\eta$ and no assumption on the field beyond the existence of the nodes; the source lemma assumes that $q$ exceeds a constant multiple of $c^3$. + +Lean: [standard local correction][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 +**Lemma 4.6 (local correction with a lines table; cf. [[ABSSW26, Theorem 2.14]][paper]).** Let $P$ have degree at most $d$, let $\Delta(f,P)=\eta$, and fix a point $u\in V$. For each slope $v\in V$, let $T_v\in F[T]$ be any polynomial of degree at most $d$. Choose $v$ uniformly and independently choose $z$ uniformly in $F^\times$. If $$ -T_b(\lambda)=f(u+\lambda b), +T_v(z)=f(u+zv), $$ -output $T_b(0)$; otherwise reject. Then +output $T_v(0)$; otherwise reject. Then $$ \Pr[\text{accept and output a value different from }P(u)] @@ -991,22 +1170,28 @@ $$ \tag{A14} $$ -An accepted wrong answer requires either corruption at the tested point, or +*Proof.* An accepted wrong answer requires either $f\ne P$ at the tested point $u+zv$, or $$ -T_b(0)\ne P(u),\qquad T_b(\lambda)=P(u+\lambda b). +T_v(0)\ne P(u),\qquad T_v(z)=P(u+zv). $$ -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]. +For each nonzero $z$, the tested point is uniform as $v$ varies, so the first event has probability $\eta$. For fixed $v$ in the second event, $T_v(T)-P(u+Tv)$ has nonzero constant coefficient and degree at most $d$, so at most $d$ nonzero parameters are roots. Averaging proves (A14). $\square$ + +The lemma bounds accepted wrong answers; it does not guarantee frequent acceptance. + +*Remark (formalization).* The source theorem gives $2\sqrt\eta+d/(q-1)$ under additional field-size and small-error assumptions; (A14) is sharper. + +Lean: [lines-table correction][lean-line-correction]. -### 4. Bivariate agreement +### 4.5 Bivariate agreement -The point-versus-line theorem below needs a substantial agreement result. We prove the explicit form implemented in the formalization: -**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 + +**Theorem 4.7 (bivariate agreement; cf. [[ALMSS98, Theorem 69]][almss]).** 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_{x,y}[f(x,y)\ne R_y(x)]\le\varepsilon,\qquad @@ -1015,26 +1200,32 @@ $$ \tag{A15} $$ -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]. +Then there exists $P\in F[X,Y]$, of degree at most $d$ in each variable, such that $\Delta(f,P)\le4\varepsilon$. + +The polynomials $R_y$ and $C_x$ need not be nearest to the rows and columns of $f$. Degree at most $d$ in each variable allows total degree $2d$, which suffices in Section 4.6. The theorem of Arora, Lund, Motwani, Sudan and Szegedy uses nearest row and column polynomials and unspecified absolute constants. The proof below, which allows arbitrary approximants and gives the numerical bounds in (A15), adapts the construction of [[AS98, §5.2, Lemmas 5.2.2 and 5.2.7 and Corollary 5.2.3]][arora-safra]. In it $E$ and $N$ denote the error locator and the numerator, and $K$ the degree bound (A18). + +Lean: [bivariate agreement][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 +*Proof. Step 1 (column selection).* 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 $$ \Pr_y[R_y(a_i)\ne C_i(y)]\le1/10\quad\text{for each }i. \tag{A16} $$ -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]. +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$. + +Lean: [column selection][lean-column-selection]. -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. +*Step 2 (error locator).* We seek $d+1$ columns and at least $2q/5$ rows on which the chosen row and column polynomials agree. The columns determine a polynomial of degree at most $d$ in $X$, and agreement on these rows will identify most $R_y$ with its restrictions. -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 +Following [[AS98, Lemma 5.2.5 and its polynomial extension, Lemma 5.2.7]][arora-safra], seek bivariate polynomials $E,N$ satisfying $$ \deg_X E\le2d,\qquad\deg_X N\le3d,\qquad @@ -1050,9 +1241,9 @@ $$ |S|\ge q/2>(5d+2)d, $$ -so the root bound makes every maximal minor the zero polynomial. +so every maximal minor is the zero polynomial. -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$. +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. If that row is one of the chosen $k$ rows, the determinant has two equal rows and is zero. Otherwise it 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 @@ -1061,12 +1252,14 @@ $$ \tag{A18} $$ -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]. +Also $E\ne0$. If $E=0$, then $N(a_i,Y)=0$ for $10d>3d$ distinct values $a_i$. Regarded as a polynomial in $X$ of degree at most $3d$ over the integral domain $F[Y]$, $N$ then has too many roots, so $N=0$, contradicting the nonzero kernel vector. + +Lean: [polynomial kernel][lean-matrix], [error locator][lean-locator]. -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 +*Step 3 (clean rectangle).* At most $2d$ of the $10d$ selected columns have $E(a_i,Y)=0$ as a polynomial, again by counting roots over $F[Y]$. Choose $d+1$ columns $J$ on which this polynomial is nonzero. For $y\in S$, the polynomial $$ N(X,y)-E(X,y)R_y(X) @@ -1078,12 +1271,14 @@ $$ E(a_i,y)\bigl(C_i(y)-R_y(a_i)\bigr)=0. $$ -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]. +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$. On the rectangle $J\times B$ the row and column polynomials agree. + +Lean: [clean rectangle][lean-rectangle]. -Interpolate the $d+1$ columns in $J$: +*Step 4 (coarse agreement).* Interpolate the $d+1$ columns in $J$: $$ P(X,Y)=\sum_{i\in J}\ell_i(X)C_i(Y). @@ -1091,7 +1286,7 @@ $$ 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 +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 $R_y\ne P(\cdot,y)$ for at most $1/9$ of the rows, and therefore $$ \Delta\bigl((x,y)\mapsto R_y(x),P\bigr)\le1/9, @@ -1099,19 +1294,19 @@ $$ \tag{A19} $$ -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]. +Lean: [coarse agreement][lean-coarse]. -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 +*Step 5 (sharpening).* To sharpen (A19), put $\tau=d/q$ and, in this step only, $\rho=\Delta(f,P)$. For two finite families of univariate polynomials $A_z,B_z$ of degree at most $d$, let $\gamma_1$ be the fraction of their common indices $z$ for which they differ as polynomials. Their mean evaluation distance is at least $\gamma_1(1-\tau)\ge\gamma_1-\tau$, so $$ -\alpha\le \mathbb E_z\Delta(A_z,B_z)+\tau. +\gamma_1\le \mathbb E_z\Delta(A_z,B_z)+\tau. \tag{A20} $$ -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$, +At any fixed evaluation parameter, the disagreement fraction is at most $\gamma_1$. 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_x[C_x(y)\ne P(x,y)]\le\varepsilon+\rho+\tau. @@ -1124,14 +1319,16 @@ $$ \ge1-\tau-(\varepsilon+\rho+\tau). $$ -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]. +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 $R_y\ne P(\cdot,y)$ for at most a fraction $3\varepsilon$ of the rows. Adding the initial row error gives $\Delta(f,P)\le\varepsilon+3\varepsilon=4\varepsilon$, as asserted. $\square$ + +Lean: [sharpening][lean-boost]. -### 5. Point-versus-line soundness +### 4.6 The point-versus-line test -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 +A lines table of degree $d$ assigns a polynomial $T_{u,v}\in F[T]$ of degree at most $d$ to each index $(u,v)\in V\times V$. It need not assign compatible polynomials to different indices of the same line, and the slope $v=0$ is allowed. The point-versus-line test, also called the line-point test, compares $f$ with the table at a random point of a random line; its rejection probability is $$ \delta=\Pr_{u,v\in V,\ t\in F} @@ -1139,98 +1336,110 @@ $$ \tag{A21} $$ -**Point-versus-line theorem.** If +**Theorem 4.8 (point-versus-line test; cf. [[ALMSS98, Theorem 45]][almss]).** If $$ q\ge10^6d^3,\qquad\delta\le1/(4\cdot10^6), \tag{A22} $$ -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]. +then there is a polynomial $P$ of total degree at most $d$ with $\Delta(f,P)\le2\delta$, including $d=0$ and $m=0$. + +*Remark (formalization).* This is the whole-field test of Arora, Lund, Motwani, Sudan and Szegedy, with explicit sufficient constants. [[ABSSW26, Theorem 2.12]][paper] samples nonzero parameters and concludes distance at most $4\delta$. + +Lean: [test][lean-point-test], [soundness][lean-point-soundness]. -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 +*Proof for $d>0$. Step 1 (plurality correction).* Replace each $T_{u,v}$ by a polynomial $\widetilde T_{u,v}$ of degree at most $d$ nearest to the function $t\mapsto f(u+tv)$, choosing arbitrarily among ties. A nearest polynomial exists because there are finitely many candidates. The replacement can only decrease the rejection probability; denote the new value by $\delta'\le\delta$. For every $x\in V$, define predictions and a corrected function by $$ -\pi_x(v,t)=L_{x-tv,v}(t),\qquad +\pi_x(v,t)=\widetilde T_{x-tv,v}(t),\qquad g(x)=\mathop{\mathrm{plurality}}_{v,t}\pi_x(v,t). \tag{A23} $$ -The change of variables $(x,v,t)\leftrightarrow(u=x-tv,v,t)$ is a bijection. The plurality argument of (A7) therefore gives +The change of variables $(x,v,t)\leftrightarrow(u=x-tv,v,t)$ is a bijection. The argument for (A7) therefore gives $$ \Delta(f,g)\le2\delta'. \tag{A24} $$ -We must show that $g$ is an actual polynomial of the required total degree. See the [all-parameter correction definition][lean-point-correction]. +It remains to show that $g$ is a polynomial of total degree at most $d$. + +Lean: [corrected function][lean-point-correction]. -First obtain an error bound for a **fixed** line parameter $t$. Let +*Step 2 (a fixed parameter).* First bound the error at a fixed line parameter $t$. Let $$ -e(u,v)=\Pr_s[f(u+sv)\ne L_{u,v}(s)]. +e(u,v)=\Pr_s[f(u+sv)\ne \widetilde T_{u,v}(s)]. $$ -Its mean is $\delta'$. If $e(u,v)0$ with $2r\le1-d/q$. If $e(u,v) -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 +*Step 3 (crossing).* We need a consequence of Theorem 4.7 at one crossing. + +**Lemma 4.9 (crossing; cf. [[ALMSS98, Corollary 70]][almss]).** Assume $d>0$ and $q\ge1000d^3$. Suppose a function on $F^2$ has approximating row and column polynomials of degree at most $d$, as in Theorem 4.7, with both errors in (A15) at most $\varepsilon\le1/100$. Suppose also that, at the selected crossing $(x_0,y_0)$, the row of the function is within $\varepsilon$ of the values of the column polynomials along it, and its column is within $\varepsilon$ of the values of the row polynomials. Assume $$ 6\varepsilon+2d/q<1/2. \tag{A26} $$ -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. +If the selected row and column polynomials are nearest to that row and that column, their values at the crossing agree. The same holds if the selected row polynomial is any polynomial of degree at most $d$ within $\varepsilon$ of its row, the column polynomial still being nearest. + +*Proof.* Theorem 4.7 supplies $P$ within $4\varepsilon$ of the function. Each polynomial family is within $5\varepsilon$ of $P$ in mean evaluation distance, so (A20) bounds its transverse distance at every parameter by $5\varepsilon+d/q$. The selected row of the function is within $6\varepsilon+d/q$ of the corresponding row of $P$. Its nearest polynomial is no farther from the row, so it lies within $12\varepsilon+2d/q<1-d/q$ of that row of $P$, by (A26). Two distinct polynomials of degree at most $d$ are at distance at least $1-d/q$, so the two coincide; the same argument applies to the column. -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]. +In the variant, the selected row polynomial is within $7\varepsilon+d/q<1-d/q$ of the row of $P$, again by (A26), so the same conclusion holds. Thus four small errors suffice when both polynomials are nearest, and five in the variant. $\square$ + +Lean: [crossing with a supplied polynomial](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/PointLineCrossing.lean#L246), which requires nearestness only at the selected crossing; [all-nearest case][lean-crossing]; [variant][lean-candidate]. -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 +*Step 4 (consistency at an endpoint).* Fix a point $u\in V$ and a parameter $t\in F$. Choose $0<\varepsilon\le1/100$ satisfying (A26). Choose independent uniform $v,w\in V$ and $s\in F$, and consider the function on $F^2$ given by $$ M(y,z)=f\bigl(u+yv+(z-s)w\bigr). \tag{A27} $$ -Here a row fixes $y$ and varies $z$; a column fixes $z$ and varies $y$. Use the nearest line polynomials +In this step and the next, $M$ denotes such a function. A row fixes $y$ and varies $z$; a column fixes $z$ and varies $y$. Use the nearest line polynomials $$ -R_y(z)=L_{u+yv-sw,w}(z),\qquad -C_z(y)=L_{u+(z-s)w,v}(y). +R_y(z)=\widetilde T_{u+yv-sw,w}(z),\qquad +C_z(y)=\widetilde T_{u+(z-s)w,v}(y). $$ -At crossing $(t,s)$, the column prediction is $C_s(t)=L_{u,v}(t)$, and the row prediction is +At crossing $(t,s)$, the column prediction is $C_s(t)=\widetilde T_{u,v}(t)$, and the row prediction is $$ -L_{u+tv-sw,w}(s)=\pi_{u+tv}(w,s). +\widetilde T_{u+tv-sw,w}(s)=\pi_{u+tv}(w,s). $$ -The four discrepancies needed for crossing consistency are +The four errors in the hypotheses of Lemma 4.9 are $$ \begin{aligned} @@ -1241,23 +1450,23 @@ 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$. +The last two compare a row or column of $M$ with the polynomials that cross it. Each quantity depends on the sampled $v,w,s$; we bound its mean over those choices. A point $a+zb$ is uniform in $V$ when $b$ is uniform and $z\ne0$. In $e_{\rm row}$, the base point of row $y$ contains $yv$; every $y\ne0$ therefore gives the distribution of the test, while the exceptional row $y=0$ contributes at most $1/q$. In $e_{\rm col}$ the exceptional column is $z=s$, and $e_{\rm cross,col}$ has the same exception $y=0$. These three means are at most $\delta'+1/q$. In $e_{\rm cross,row}$, $z\ne s$ makes the base point uniform, but the line parameter is the fixed $t$; (A25) bounds this contribution by $4\delta'$, and the exceptional column contributes at most $1/q$. Thus all four means are at most $4\delta'+1/q$. -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 +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 two predictions agree by Lemma 4.9. For each $v$, plurality minimizes the probability of disagreeing with the independent prediction $\pi_{u+tv}(w,s)$; comparing it with $\widetilde T_{u,v}(t)$ costs at most a factor two, exactly as in (A7). Hence $$ -\Pr_v[L_{u,v}(t)\ne g(u+tv)]\le +\Pr_v[\widetilde T_{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]. +Lean: [sampling][lean-mixed], [endpoint consistency][lean-endpoint]. -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 +*Step 5 (every line of $g$ has degree at most $d$).* In this step $h\in V$ is a slope and $Q$ a univariate polynomial. Fix a line $y\mapsto x+yh$, and choose once and for all a polynomial $Q(y)$ of degree at most $d$ nearest to $g$ on this line. We prove that $Q$ equals $g$ on the whole line. Fix a parameter $y_0$. For independent uniform $v,w\in V$, use $$ M(y,z)= @@ -1268,56 +1477,58 @@ f\bigl(x+yh+z(v+yw)\bigr),&z\ne0. \tag{A29} $$ -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 +The column $z=0$ is $g$ on the fixed line. For each fixed $z\ne0$, the base point $x+zv$ and the slope $h+zw$ are uniform and independent. For fixed $y$, the point $x+yh+z(v+yw)$ is affine in $z$. Give row $y$ the polynomial $$ -R_y(z)=L_{x+yh,\,v+yw}(z). +R_y(z)=\widetilde T_{x+yh,\,v+yw}(z). $$ For $z\ne0$, give column $z$ its nearest polynomial $$ -C_z(y)=L_{x+zv,\,h+zw}(y), +C_z(y)=\widetilde T_{x+zv,\,h+zw}(y), $$ -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. +and put $C_0=Q$. By its choice, $Q$ is nearest to the column $z=0$ of $M$. The row polynomials may cease to be nearest after $f(x+yh)$ is replaced by $g(x+yh)$, so we use the variant in Lemma 4.9. -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$: +Put $\eta=\Delta(f,g)\le2\delta'$, and $\mu=4\delta'$, the bound in (A25). The five errors at crossing $(y_0,0)$ have the following mean bounds over $v,w$: | 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$ | +| :---------------------------------------------------- | --------------------: | +| rows of $M$ against the row polynomials | $\gamma+\eta$ | +| columns of $M$ against the column polynomials | $\delta'+1/q$ | +| row $y_0$ of $M$ against the column polynomials | $\mu+1/q$ | +| column $0$ of $M$ against the row polynomials | $\gamma$ | +| row $y_0$ of $M$ against its own polynomial | $\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]. +For fixed $y$, $v+yw$ is a uniform slope. Equation (A28) bounds the disagreement of its line polynomial with $g$ at each parameter by $\gamma$; at nonzero parameters the point is uniform, which adds at most $\eta$ for replacing $g$ by $f$. At parameter zero the value of $M$ 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'$; the column $z=0$ costs at most $1/q$. For the third entry, the same uniform pair is evaluated at the fixed parameter $y_0$, so (A25) gives $\mu$ away from the column $z=0$. For the fourth entry, apply (A28) with parameter zero at each base point $x+yh$. No independence among the entries of $M$ is used. Let $$ -B=2(\gamma+\eta)+\delta'+\ell+\gamma+2/q. +B=2(\gamma+\eta)+\delta'+\mu+\gamma+2/q. \tag{A30} $$ -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 +Markov and the union bound show that one of the five errors exceeds $\varepsilon$ with probability at most $B/\varepsilon$. Otherwise Lemma 4.9 gives $R_{y_0}(0)=Q(y_0)$. Separately, (A28) gives $$ \Pr[R_{y_0}(0)\ne g(x+y_0h)]\le\gamma. $$ -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]. +If $B/\varepsilon+\gamma<1$, some choice of $v,w$ satisfies both equalities. Both $Q(y_0)$ and $g(x+y_0h)$ are independent of $v,w$, so $Q(y_0)=g(x+y_0h)$. This holds for each $y_0$, with the same previously chosen $Q$; hence $g$ has degree at most $d$ on this line. Since the line was arbitrary, Lemma 4.1 makes $g$ a polynomial of total degree at most $d$. + +Lean: [sampling][lean-ruled-sampling], [lines of $g$][lean-ruled]. -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 +*Step 6 (constants).* Since $d>0$, (A22) gives $q\ge10^6$ and $q\ge1000d^3$. Take $\varepsilon=1/100$. Then $$ \gamma\le0.0016,\qquad \eta\le0.0000005,\qquad -\ell\le0.000001. +\mu\le0.000001. $$ Equation (A30) gives $B\le0.00480425$, and therefore @@ -1326,27 +1537,29 @@ $$ B/\varepsilon+\gamma\le0.482025<1. $$ -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]. +Also $d/q\le10^{-6}$, so (A26) holds and every use of Lemma 4.9 is valid; the bound $q>2d$ needed for Lemma 4.1 holds as well. Thus $g$ is a polynomial $P$ of total degree at most $d$, and (A24) gives $\Delta(f,P)\le2\delta'\le2\delta$. $\square$ + +Lean: [constants][lean-point-constants]. -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 +*Proof for $d=0$.* This case needs no hypothesis on the field size. 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 $$ (u,v)\longmapsto(u+tv,\ u+(t+1)v) $$ -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]. +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. The argument is valid in every characteristic and in dimension zero. $\square$ + +Lean: [degree-zero case][lean-constant]. -### Source correspondence and scope -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. -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. +*Remark (sources).* The proof for $d>0$ follows the sequence of [[ALMSS98, Appendix A]][almss]: plurality correction (Lemma 66), bivariate agreement and crossing (Theorem 69 and Corollary 70), then consistency on randomly sampled surfaces (Lemma 71, Corollary 72 and Lemma 73). Step 2 handles arbitrary choices among tied nearest polynomials, and the variant in Lemma 4.9 handles the modified column $z=0$ in (A29). @@ -1383,139 +1596,110 @@ The point-versus-line argument follows the sequence in [ALMSS Appendix A][almss] [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 -## From polynomial values to a constant number of bits +## 5. Binary encodings and constant-query tests -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. +The tests of Section 4 read field elements of $t$ bits each, and the restriction of a polynomial to a line can have degree growing with the input. The set-multilinear encoding and the Hadamard encoding of Section 2.2 yield tests that read a constant number of bits. This section builds the tests of Section 3.3 from them and proves Lemmas 3.3 to 3.6. -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. +The construction is that of [[ABSSW26, Sections 3–6 and Appendices B–D]](https://arxiv.org/abs/2608.17429v2); the constants and sampling distributions are Lee's. -Throughout, $F$ is a finite field of characteristic two, $q=|F|=2^t$, and +As in Section 2.1, $F$ has characteristic two, $q=2^t$, and $$ \rho:F\longrightarrow\mathbb F_2^t $$ -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 the fixed $\mathbb F_2$-linear isomorphism. The parameters $b,c,r$ are integers with $b\geq1$, $c\geq0$ and $r\geq1$; the verifier takes $c=4$. Points tables are defined on $F^k\times\mathcal B_r$. In every soundness statement the lines table is an arbitrary received table. -### A high-degree univariate polynomial as a low-degree multivariate polynomial +### 5.1 The set-multilinear encoding -Let $p(Y)=\sum_{j -### Binary labels for field elements - - - -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 H_r(u)(R)=R(\rho(u)),\qquad R\in\mathcal B_r. -$$ - -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 - -$$ -L_w(z)=\sum_{i=1}^t w_i z_i,\qquad w\in\mathbb F_2^t. -$$ - -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$, - -$$ -\Delta(\mathcal H_r(u),\mathcal H_r(v))=\frac12. -$$ - -The same pairing works among homogeneous linear labels. Averaging over the outer input gives - -$$ -\Delta(\mathcal H_r(g),\mathcal H_r(h)) -=\frac12\Delta(g,h), -\tag{B1} -$$ - -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. - -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$. - - +### 5.2 Label composition -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 +*Proof of Lemma 3.4.* Let $A(Y)\in F[Y]$ have degree at most $r$, and let $L$ be an affine label. Let $e_1,\ldots,e_t$ be the basis of $F$ that $\rho$ maps to the standard basis, and write $e_ie_j=\sum_k\mu_{ijk}e_k$ with $\mu_{ijk}\in\mathbb F_2$. The $k$-th coordinate of the product of the elements with coordinates $z$ and $z'$ is then $\sum_{i,j}\mu_{ijk}z_iz'_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 label $\Lambda_{A,L}\in\mathcal B_r$ satisfying $$ \mathcal H_1(A(u))(L)=\mathcal H_r(u)(\Lambda_{A,L}). \tag{B2} $$ -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. +This proves Lemma 3.4. $\square$ -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. +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. A zero coefficient $\eta$ is treated separately: the summand is zero and needs no query. This is the homogeneous scalar case of [[ABSSW26, Claim 3.7]][paper]. + +Lean: [composition identity](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/HadamardComposition.lean), [relabelling by a scalar](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/HadamardWeights.lean). -### Testing a received Hadamard word +### 5.3 The Hadamard test -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 +The Hadamard test decides whether a word $w:\mathcal B_r\to\mathbb F_2$ is close to an encoding $\mathcal H_r(u)$. Its first part is the BLR linearity test: choose uniform independent labels $x,y$ and check $$ -h(x+y)=h(x)+h(y). +w(x+y)=w(x)+w(y). $$ -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 +**Theorem 5.1 (BLR linearity test; [[BLR93, Section 4.2]][blr], [[BCHKS96, Theorem 1.2 and Section 2]][bchks]).** Let $w$ be an $\mathbb F_2$-valued function on a finite-dimensional vector space over $\mathbb F_2$. If the test rejects with probability $\epsilon$, some linear functional $\varphi$ satisfies $\Delta(w,\varphi)\leq\epsilon$. + +The test is due to Blum, Luby and Rubinfeld; the bound in characteristic two is that of Bellare, Coppersmith, Håstad, Kiwi and Sudan, cited as [[ABSSW26, Theorem B.1]][paper]. + +*Proof.* Choose coordinates for the space, put $s(x)=(-1)^{w(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 $$ \widehat s(a)=\mathbb E_x s(x)\chi_a(x), @@ -1528,7 +1712,7 @@ s(x)=\sum_a\widehat s(a)\chi_a(x),\qquad \sum_a\widehat s(a)^2=\mathbb E_xs(x)^2=1. $$ -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 +Expanding each of the three factors in the acceptance bias and averaging first over $x$ and then over $y$ leaves only terms with the same character in all three positions. Hence $$ 1-2\epsilon @@ -1538,124 +1722,140 @@ $$ =\max_a\widehat s(a). $$ -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). +Choose a maximising $a$. Since $\widehat s(a)=1-2\Delta(w,a)$, rearrangement gives the claim, for every value of $\epsilon$. $\square$ + +Lean: [linearity test](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BLR.lean). -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 +A linear functional on $\mathcal B_r$ is evaluation at a point only if it also preserves the unit and products. To test these laws on a word that is merely close to linear, define the self-corrected read of $w$ at a requested label $\Lambda$, $$ -\operatorname{SC}_h(Q;R)=h(Q+R)-h(R), +\operatorname{SC}_w(\Lambda;R)=w(\Lambda+R)-w(R), $$ -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 +where $R$ is a fresh random label, uniform on $\mathcal B_r$. This is self-correction in the sense of [[BLR93, Definition 2.5]][blr]. If $\Delta(w,\varphi)\leq\epsilon$ for a linear $\varphi$, both arguments $R$ and $\Lambda+R$ are uniform, for every fixed $\Lambda$. Outside two events of probability at most $\epsilon$ each, the read equals $\varphi(\Lambda)$. Therefore $$ -\Pr_R[\operatorname{SC}_h(Q;R)\neq\ell(Q)]\leq2\epsilon. +\Pr_R[\operatorname{SC}_w(\Lambda;R)\neq\varphi(\Lambda)]\leq2\epsilon. \tag{B3} $$ -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 bound remains valid after averaging over any distribution of requested labels chosen independently of $R$. -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 +The Hadamard test samples independent uniform labels $R,R'\in\mathcal B_r$, $L\in\mathcal B_1$, and $P_{j-1}\in\mathcal B_{j-1}$ for each $j=2,\ldots,r$. It checks $$ \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) +w(R+R')&=w(R)+w(R'),\\ +\operatorname{SC}_w(1;R)&=1,\\ +\operatorname{SC}_w(L;R)&=w(L),\\ +\operatorname{SC}_w(LP_{j-1};R) +&=\operatorname{SC}_w(L;R)\operatorname{SC}_w(P_{j-1};R) \quad(2\leq j\leq r). \end{aligned} \tag{B4} $$ -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. +Products of labels are reduced to multilinear form. Answers are reused, so the test makes $2r+4$ queries, ten at $r=3$. + +*Remark (formalization).* The test of [[ABSSW26, Lemma 3.10]][paper], there called HadTest, keeps only the last product check and makes eight queries. Lee's test keeps the product checks of lower degree as well. The soundness proof uses only the check of top degree, so the extra checks do not weaken it. The source lemma gives distances $\delta$ and $3\delta$ below a rejection threshold; Corollary 5.3 below gives the factor 28 with no threshold. -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$. +**Theorem 5.2 (Hadamard test; cf. [[ABSSW26, Lemma 3.10]][paper]).** Suppose the Hadamard test rejects $w$ with probability at most $\epsilon<1/28$. Then there is a field element $u$ with $\Delta(w,\mathcal H_r(u))\le\epsilon$ and, on affine labels, (B6) below. -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$. +*Proof.* Each of the checks in (B4) rejects with probability at most $\epsilon$. Theorem 5.1 supplies a linear functional $\varphi$ with $\Delta(w,\varphi)\leq\epsilon$. -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 +If $\varphi(1)\ne1$, the self-corrected read $\operatorname{SC}_w(1;R)$ differs from $\varphi(1)$ or $1$ for every $R$. By (B3) and the unit check, these events have probabilities at most $2\epsilon$ and $\epsilon$, respectively. Their union would give $1\le3\epsilon<1$. Thus $\varphi(1)=1$. + +For $r\ge2$, use the product check with $j=r$ and replace its three self-corrected reads by the corresponding values of $\varphi$. The three replacements cost at most $6\epsilon$, and test failure costs at most another $\epsilon$. Thus $$ -\Pr_{L,P}\bigl[\ell(LP)\neq\ell(L)\ell(P)\bigr] +\Pr_{L,P}\bigl[\varphi(LP)\neq\varphi(L)\varphi(P)\bigr] \leq7\epsilon<\frac14, \tag{B5} $$ -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. +where $L\in\mathcal B_1$ and, in this proof only, $P$ denotes a label in $\mathcal B_{r-1}$. The defect $\varphi(LP)-\varphi(L)\varphi(P)$ is bilinear in $(L,P)$. 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. -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 +Set $z_i=\varphi(Z_i)$. For a multilinear monomial, repeatedly separate one variable from the remaining product. The exact product law and $\varphi(1)=1$ give $$ -\ell\Bigl(\prod_{i\in S}Z_i\Bigr)=\prod_{i\in S}z_i. +\varphi\Bigl(\prod_{i\in S}Z_i\Bigr)=\prod_{i\in S}z_i. $$ -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)$. +Linearity then gives $\varphi(R)=R(z)$ for every label. For $r=1$, unit preservation and linearity already give this conclusion without a product check. Thus $w$ is $\epsilon$-close to the encoding $\mathcal H_r(u)$ of $u=\rho^{-1}(z)$. -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 +For the same $z$, the third check in (B4) compares $w(L)$ with a self-corrected read, which differs from $\varphi(L)$ with probability at most $2\epsilon$ by (B3). A union bound gives $$ -\Delta\bigl(h|_{\mathcal B_1},\mathcal H_1(\rho^{-1}z)\bigr) +\Delta\bigl(w|_{\mathcal B_1},\mathcal H_1(\rho^{-1}z)\bigr) \leq3\epsilon. \tag{B6} $$ -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. +This proves the theorem. $\square$ + +[ABSSW26] note that the proof of their Lemma 3.10 is analogous to the analysis of the quadratic Hadamard test in [[ALMSS98, Proposition 34]][almss]. + +Lean: [Hadamard test](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/HadamardSoundness.lean), [bilinear forms](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BilinearHadamard.lean). -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 +**Corollary 5.3 (Hadamard test on a points table).** Let $w:F^k\times\mathcal B_r\to\mathbb F_2$, and let $\overline e$ be the rejection probability of the Hadamard test on the word $w(x,\cdot)$, averaged over uniform $x$. Then there is a function $g:F^k\to F$ with $$ -\Delta_{\rm full}(h,\mathcal H_r(g))\leq28\overline e, +\Delta_{\rm full}(w,\mathcal H_r(g))\leq28\overline e, \qquad -\Delta_{\rm hom}(h,\mathcal H_r(g))\leq28\overline e. +\Delta_{\rm hom}(w,\mathcal H_r(g))\leq28\overline e. \tag{B7} $$ -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. +*Proof.* If the word at $x$ is rejected with probability $e<1/28$, let $g(x)$ be the element given by Theorem 5.2. Its distance over $\mathcal B_r$ is at most $e$, and its distance over homogeneous labels is at most $2\cdot3e=6e$. If $e\geq1/28$, choose $g(x)$ arbitrarily; each distance is at most $1\leq28e$. Averaging over $x$ gives (B7). $\square$ + +Lean: [choice of $g$](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/HadamardRowDecoding.lean). -### A binary version of the weighted low-degree test +### 5.4 The inner low-degree test -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 +Here $w$ is a table of bits indexed by a point and a label, such as one entry of a lines table. 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 $$ \eta_i=\prod_{j\ne i}\frac{-a_j}{a_i-a_j}. $$ -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 +Each weight is nonzero. The standard low-degree test of Section 4.2, with these nodes, accepts a field-valued function $g$ at $(u,v)$ when $$ g(u)=\sum_{i=0}^c\eta_i g(u+a_i v). \tag{B8} $$ -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 one-bit version of this test samples $u,v$ and a homogeneous label $L$ independently and uniformly, queries $w$ at $(u,L)$ and at $(u+a_iv,\ L\circ(\eta_i\cdot))$ for each $i$, and accepts when the first bit equals the sum of the others. It reads at most $c+2$ bits. On an exact encoding $\mathcal H_r(g)$, Lemma 2.3 shows that it 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 +In general, suppose $\Delta_{\rm hom}(w,\mathcal H_r(g))=\tau$. For each $i$, the map $L\mapsto L\circ(\eta_i\cdot)$ permutes the homogeneous labels because $\eta_i\ne0$, and the points $u$ and $u+a_iv$ are uniform. Replacing the at most $c+2$ answers by those of $\mathcal H_r(g)$ therefore changes the decision on at most a fraction $(c+2)\tau$ of the seeds. If the one-bit test rejects $w$ with probability $\gamma_2$, then $$ \Pr[(\mathrm{B8})\text{ fails}] -\leq2\beta+2(c+2)\tau. +\leq2\gamma_2+2(c+2)\tau. \tag{B9} $$ -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 +In the inner low-degree test, a fair coin chooses between the Hadamard test on the word $w(x,\cdot)$ at a uniform point $x$ and the one-bit version of the standard low-degree test. + +**Proposition 5.4 (inner low-degree test; cf. [[ABSSW26, Lemma 4.3]][paper]).** Assume $q>2c$ and the nodes above. If the inner low-degree test rejects $w$ with probability $\kappa$, then some polynomial $U$ of total degree at most $c$ satisfies (B11) below. No bound on $\kappa$ is assumed. + +*Proof.* Each alternative rejects with probability at most $2\kappa$. Corollary 5.3 gives a function $g$ with $\Delta_{\rm full}(w,\mathcal H_r(g))$ and $\Delta_{\rm hom}(w,\mathcal H_r(g))$ at most $56\kappa$. Inequality (B9) then gives $$ \Pr[(\mathrm{B8})\text{ fails}] @@ -1663,148 +1863,161 @@ $$ \tag{B10} $$ -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 +Since $q>2c$ and the nodes are powers of a generator, Theorem 4.4 applies when the rejection probability in (B10) is below its threshold. The sufficient condition used here is $$ \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 +which is strictly below $1/[2(c+2)^2]$. It gives a polynomial $U$ of total degree at most $c$ with $\Delta(g,U)$ at most twice the right-hand side of (B10). By (B1), $\mathcal H_r(g)$ and $\mathcal H_r(U)$ are at half that distance. The triangle inequality therefore bounds both distances from $w$ to $\mathcal H_r(U)$ by $$ \bigl(112(c+2)+60\bigr)\kappa. $$ -For a row above this threshold, use the zero polynomial and the universal distance bound one. Both cases are covered by +If the sufficient condition fails, take $U=0$ and bound each distance by one. Both cases are covered by $$ -K(c)=4(c+2)^2\bigl(112(c+2)+60\bigr): +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. +\Delta_{\rm full}(w,\mathcal H_r(U)),\ +\Delta_{\rm hom}(w,\mathcal H_r(U)) +\leq K_c\kappa. \tag{B11} $$ -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). +Indeed, in the second case, +$K_c\kappa>[112(c+2)+60]/[112(c+2)+4]>1$. +This proves the proposition. $\square$ + +*Remark (formalization).* The source test runs both checks; Lee's chooses one by a fair coin. + +Lean: [inner low-degree test](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryLocalRowDecoding.lean). -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 +**Lemma 5.5 (standard local correction on bits; cf. [[ABSSW26, Lemma 3.4]][paper]).** Choose $\zeta\ne0$ so that the correction nodes $\alpha_i=\zeta^{i+1}$, $0\le i\le c$, are distinct. The generator $\theta$ satisfies this condition, but $\zeta$ need not equal $\theta$. Let $\omega_i=\prod_{j\ne i}(-\alpha_j)/(\alpha_i-\alpha_j)$. To recover the bit $L(U(u))$ of a polynomial $U$ of degree at most $c$, the corrector chooses a uniform slope $v$ and returns $$ \sum_{i=0}^c -h\bigl(u+\alpha_i v,\ L\circ(\omega_i\cdot)\bigr). +w\bigl(u+\alpha_i v,\ L\circ(\omega_i\cdot)\bigr). \tag{B12} $$ -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 +If $w=\mathcal H_1(U)$ this is exactly $L(U(u))$, by interpolation. If $\Delta_{\rm hom}(w,\mathcal H_1(U))=\tau$, then for every fixed $u$, over uniform $v$ and uniform homogeneous $L$, $$ -\Pr[(\mathrm{B12})\neq L(Q(u))]\leq(c+1)\tau. +\Pr[(\mathrm{B12})\neq L(U(u))]\leq(c+1)\tau. \tag{B13} $$ -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). +*Proof.* Each queried pair of a point and a label is uniform: $\alpha_i\ne0$ makes $v\mapsto u+\alpha_iv$ bijective, and $\omega_i\ne0$ makes the map of labels bijective. A wrong sum requires at least one wrong answer. $\square$ + +The bound (B13) averages over both $v$ and $L$; it does not hold for each fixed label of an arbitrary table. + +Lean: [correction on bits](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryStandardLocalCorrection.lean). -### Testing a high-degree outer polynomial +### 5.5 The binary low-degree test -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: +Let $f:F^k\times\mathcal B_r\to\mathbb F_2$ be a points table, and let the lines table have entries $f'_{u,v}:F^{cb}\times\mathcal B_1\to\mathbb F_2$; for a polynomial $P$ the honest entry is $\mathcal H_1(\Psi(P(u+Yv)))$. Use generator nodes for the inner low-degree test and distinct nonzero correction nodes, as in Section 5.4. The binary low-degree test chooses uniform $u,v\in F^k$ and $z\in F$, a uniform homogeneous label $L$, a slope in $F^{cb}$ for standard local correction, and independent seeds for the two tests below. It -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)$. +1. runs the Hadamard test on the word $f(u,\cdot)$; +2. runs the inner low-degree test on the entry $f'_{u,v}$; +3. corrects that entry at the inner point $\Phi(z)$, using (B12), and compares the answer with $f(u+zv,L)$. -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). +All three checks must pass. The test makes at most $2r+2c+12$ queries. If $f=\mathcal H_r(P)$ with $\deg P -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 +*Proof of the soundness clause of Lemma 3.5.* Each of the three checks rejects with probability at most $\kappa$. By Corollary 5.3, choose one function $g:F^k\to F$ with $\Delta_{\rm full}(f,\mathcal H_r(g))$ and $\Delta_{\rm hom}(f,\mathcal H_r(g))$ at most $28\kappa$. Apply Proposition 5.4 to every entry $f'_{u,v}$, obtaining polynomials $U_{u,v}$ of degree at most $c$ whose distance from $f'_{u,v}$ over homogeneous labels is at most $K_c\kappa$ on average over $(u,v)$. Define the line polynomials $$ -T_{u,v}=\operatorname{Dec}(Q_{u,v}),\qquad +T_{u,v}=U_{u,v}\circ\Phi,\qquad \deg T_{u,v}\leq D:=c b^c. $$ -There are three discrepancies between the binary observations of $T_{u,v}(z)$ and $g(u+zv)$: +Three replacements lead from the bit $L(T_{u,v}(z))$ to the bit $L(g(u+zv))$. Replacing $L(T_{u,v}(z))$ by the locally corrected answer costs at most $(c+1)K_c\kappa$ by (B13). The comparison made by the test fails with probability at most $\kappa$. Replacing the received bit $f(u+zv,L)$ by $L(g(u+zv))$ costs at most $28\kappa$. -- 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$. -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 +The last bound uses that $u+zv$ is uniform when $u$ is, even for $z=0$. Combining the three and applying Lemma 2.3 gives $$ \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). +\leq J_c\kappa, +\quad J_c=2\bigl((c+1)K_c+29\bigr). \tag{B14} $$ -Now use the field-valued point-versus-line theorem proved in the algebraic part. Its explicit formal hypotheses are +Apply Theorem 4.8 with degree $D$, assuming $$ -q\geq10^6D^3,\qquad E(c)\kappa\leq\frac1{4\cdot10^6}. +q\geq10^6D^3,\qquad J_c\kappa\leq\frac1{4\cdot10^6}. $$ -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 +There is then a polynomial $P\in F[X_1,\ldots,X_k]$ of total degree at most $D$ with $\Delta(g,P)\leq2J_c\kappa$. By (B1) the encodings are at half this distance, and the triangle inequality proves $$ \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). +\leq S_c\kappa, +\qquad S_c=28+J_c. \tag{B15} $$ -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. +This proves Lemma 3.5. $\square$ + +*Remark (formalization).* Lee's test samples $z$ from all of $F$, the source test from $F^\times$, and the second distance in (B15) is over homogeneous labels. The source theorem bounds the distance on all affine labels for its test; restricting such a bound to homogeneous labels may double it. The difference check uses the homogeneous bound. For a certificate table, whose label domain is $\mathcal B_1$, the first bound in (B15) is its distance over affine labels. + +Lean: [soundness](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/EncodedLineLowDegreeSoundness.lean). -### Correcting an outer value at a prescribed point +### 5.6 Local correction with a lines table -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. +Fix a target $a\in F^k$. The local corrector queries a points table $f$ with affine labels and the lines-table entries $f'_{a,v}$ of the lines through $a$. It chooses a uniform slope $v\in F^k$, a uniform parameter $z\in F^\times$, a uniform homogeneous label $L$, a slope in $F^{cb}$ for standard local correction, and an independent seed for the inner low-degree test. It runs the inner low-degree test on $f'_{a,v}$ and rejects if that test fails. Otherwise it corrects the entry at $\Phi(z)$ by (B12) and compares the answer with $f(a+zv,L)$, rejecting if they differ. If both checks pass, it returns the correction at $\Phi(0)$, computed with the same inner slope and label. + +The corrector makes at most $3c+9$ queries. On the honest tables of a polynomial $P$ of degree strictly below $b^c$, it returns $L(P(a))$ on every seed. -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). +Lean: [local corrector](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryLocalCorrection.lean). -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 +**Proposition 5.6 (local correction; cf. [[ABSSW26, Theorem 5.1]][paper]).** In this subsection $D$ is any degree bound with $D\geq cb^c$. Let $P$ have total degree at most $D$, and suppose $\Delta_{\rm hom}(f,\mathcal H_1(P))\le\delta$. Assume $q>2c$, generator nodes for the inner low-degree test, and distinct nonzero correction nodes. Let $\kappa_a$ be the probability that the corrector rejects at target $a$. Define $$ -C(c)=2+2(c+1)K(c). +C_c=2+2(c+1)K_c. $$ -Then the probability of either rejection or a wrong returned bit is at most +Then the probability of rejection or of a returned bit other than $L(P(a))$ is at most $$ -C(c)R_a+\delta+\frac{D}{2(q-1)}. +C_c\kappa_a+\delta+\frac{D}{2(q-1)}. \tag{B16} $$ -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 +*Proof.* For each $v$, let $U_v$ be the polynomial that Proposition 5.4 gives for the entry $f'_{a,v}$, and put $T_v=U_v\circ\Phi$. Since failure of the inner low-degree test forces rejection, the distance of $f'_{a,v}$ from $\mathcal H_1(U_v)$ over homogeneous labels is at most $K_c\kappa_a$ on average over $v$. Let $e=(c+1)K_c\kappa_a$. By (B13), replacing the corrected answers at $\Phi(z)$ and $\Phi(0)$ by $L(T_v(z))$ and $L(T_v(0))$, respectively, costs at most $e$ each. The comparison check then gives $$ -\Pr[L(T_v(z))\neq f(a+zv,L)]\leq e+R_a. +\Pr[L(T_v(z))\neq f(a+zv,L)]\leq e+\kappa_a. \tag{B17} $$ -We next relate the decoded line's origin to its random nonzero point. If $T_v(0)\neq P(a)$, the polynomial +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, $$ @@ -1815,24 +2028,26 @@ $$ \tag{B18} $$ -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 factor one half is the homogeneous-label form of (B1). For each fixed nonzero $z$, the map $v\mapsto a+zv$ is a bijection, so replacing the received bit $f(a+zv,L)$ in (B17) by $L(P(a+zv))$ costs at most $\delta$. Combining (B17) and (B18) bounds the probability that $L(T_v(0))\ne L(P(a))$ by $e+\kappa_a+\delta+D/[2(q-1)]$. Replacing $L(T_v(0))$ by the returned correction at $\Phi(0)$ costs another $e$, and rejection costs another $\kappa_a$. This is (B16). $\square$ + +The proposition gives no bound on $\kappa_a$ itself. If only the distance $\delta$ over all affine labels is known, replace $\delta$ in (B16) by $2\delta$. The bound averages over the label $L$ and gives nothing for a fixed label. -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. +Lean: [soundness](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryLocalCorrectionSoundness.lean). -### Checking that a polynomial vanishes on a grid +### 5.7 The zero-on-grid test -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 +In this subsection $D$ is again any degree bound with $D\ge cb^c$. By Lemma 3.2, a polynomial $P$ vanishes on $H^k$ exactly when there is a vanishing certificate $M(X,Y)$, with $k$ coordinates of each kind, such that $$ M(X,0)=0,\qquad M(X,Z_H(X))=P(X), \tag{B19} $$ -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$. +where $Z_H$ is applied coordinatewise, and $M$ can be chosen with $\deg M\leq\deg P$. 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 @@ -1840,167 +2055,153 @@ $$ M(X,0),\qquad M(X,Z_H(X))-P(X) $$ -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$. +is a nonzero polynomial. Their degrees are at most $D$ and $Dh$, respectively. The latter bound uses $h\geq1$. By Lemma 2.1, the test that evaluates both at a uniform point $x$ and requires both values to vanish 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 +Now apply one uniform homogeneous label $L$ to both values. Whenever at least one value is nonzero, the pair of bits is nonzero with probability at least one half, by Lemma 2.3 applied to one nonzero value. Hence this one-bit test on the exact encodings $\mathcal H_1(P)$ and $\mathcal H_1(M)$, which we call the ideal test, rejects with probability at least $$ \frac{1-Dh/q}{2}. \tag{B20} $$ -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). +No independence between the two bits is needed. + +Lean: [check over the field](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 +The distance of a certificate table from $\mathcal H_1(M)$ is an average over all of $F^{2k}$. Its errors could be concentrated at the points $(x,0)$ and $(x,Z_H(x))$, so direct queries there carry no guarantee. The zero-on-grid test [[ABSSW26, Theorem 6.1]][paper] therefore reads one bit $p(x,L)$ of a points table $p$ for $P$, at uniform $x$ and uniform homogeneous $L$. It then calls the local corrector of Section 5.6 on the certificate tables at the target $(x,0)$ and requires the bit zero, and at the target $(x,Z_H(x))$ and requires the bit $p(x,L)$. It rejects if either call rejects. The two calls share $x$ and $L$ and use independent seeds otherwise. The number of queries is at most $$ 1+2(3c+9)=6c+19. $$ -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 -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 +**Proposition 5.7 (soundness of the zero-on-grid test).** Let $\delta_P$ and $\delta_M$ bound the distances over homogeneous labels of the received table $p$ from $\mathcal H_1(P)$ and of the received certificate points table from $\mathcal H_1(M)$. Let $\kappa$ be the rejection probability of the test. Assume $q>2c$, generator nodes for the inner low-degree test, and distinct nonzero correction nodes. If $P$ and $M$ have degree at most $D$ and $P$ does not vanish on $H^k$, then (B21) below holds. + +*Proof.* Rejection by either call of the corrector implies rejection by the test. The rejection probability of each call, averaged over the sampled $x$, is therefore at most $\kappa$. Applying (B16) at each target and averaging over $x$ bounds the probability that a call rejects or returns a wrong bit by $$ -C(c)\kappa+\delta_M+\frac{D}{2(q-1)}. +C_c\kappa+\delta_M+\frac{D}{2(q-1)}. $$ -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 +Run the ideal test and the actual test with the same $x$ and $L$. If their verdicts differ, then either $p(x,L)\ne L(P(x))$ or one of the two calls fails to return the bit of $M$. The union bound, followed by (B20), gives $$ \frac{1-Dh/q}{2} -\leq (1+2C(c))\kappa+\delta_P+2\delta_M+\frac{D}{q-1}. +\leq (1+2C_c)\kappa+\delta_P+2\delta_M+\frac{D}{q-1}. \tag{B21} $$ -The denominator $1+2C(c)$ is positive, so equivalently +The denominator $1+2C_c$ is positive, so equivalently $$ \kappa\geq -\frac{(1-Dh/q)/2-\delta_P-2\delta_M-D/(q-1)}{1+2C(c)}. +\frac{(1-Dh/q)/2-\delta_P-2\delta_M-D/(q-1)}{1+2C_c}. \tag{B22} $$ -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. +This proves the proposition. $\square$ + +A negative numerator in (B22) gives no information. For distances over all affine labels, use $2\delta_P+4\delta_M$ in place of $\delta_P+2\delta_M$. + +*Remark (formalization).* The bounds make explicit the constant that [ABSSW26, Theorem 6.1] states as $O_c(\cdot)$. Lee's two calls of the corrector use independent seeds; the source test shares one. + +Lean: [soundness](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/BinaryZeroOnGridSoundness.lean). -### Derived polynomial oracles and fresh correction randomness +### 5.8 Self-corrected reads of derived polynomials -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$: +The verifier applies the zero-on-grid test to polynomials such as $g(x)^3-1$, while the proof contains only a table $w$ intended to be $\mathcal H_r(g)$. Equation (B2) converts the requested bit into the value of the word $w(x,\cdot)$ at one label. A received word may be wrong at exactly that label, so the verifier uses a self-corrected read with a fresh random label $R$, uniform in $\mathcal B_r$: $$ -h(x,\Lambda_{A_x,L}+R)-h(x,R). +w(x,\Lambda_{A_x,L}+R)-w(x,R). \tag{B23} $$ -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 +Here $A_x\in F[Y]$ may depend on the point $x$, with $\deg A_x\leq r$ for every $x$. For a fixed point and a fixed label $L$, (B3) bounds the probability that (B23) differs from $L(A_x(g(x)))$ by twice the distance of the word $w(x,\cdot)$ from $\mathcal H_r(g(x))$. Averaging over uniform $x$ and over any distribution of $L$ chosen independently of $R$ gives an error at most $2\epsilon$, where $$ -\epsilon=\Delta_{\rm full}(h,\mathcal H_r(g)). +\epsilon=\Delta_{\rm full}(w,\mathcal H_r(g)). $$ -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. +The map $L\mapsto\Lambda_{A_x,L}$ need not be a bijection, so the bound remains valid when $A_x$ is zero. -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 +Consider a test that uses the bit (B23), and the same test with (B23) replaced by the exact bit $L(A_x(g(x)))$. Run both with the same point $x$, label $L$ and other seeds. Their decisions can differ only when the two bits differ. Average over the uniform point, the other seeds and the independent fresh random label $R$. Writing $\kappa_{\rm actual}$ and $\kappa_{\rm ideal}$ for the two rejection probabilities gives $$ \kappa_{\rm ideal}\leq\kappa_{\rm actual}+2\epsilon. \tag{B24} $$ -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. -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 +The fresh random label remains part of the seed throughout, so the two decisions are compared under the joint distribution of the verifier's randomness. + +*Proof of Lemma 3.6.* The test of Lemma 3.6, whose points table $p$ is the table $w$ here, is the zero-on-grid test of Section 5.7 with its read $p(x,L)$ replaced by (B23), which adds one query. Its completeness clause follows from Section 5.7, because on $w=\mathcal H_r(g)$ the read (B23) is exact for every $R$. For soundness, suppose there is a polynomial $P$ of total degree at most $D$ such that $P(x)=A_x(g(x))$ at every point; this is the polynomial $A$ of Lemma 3.6, with $D=D_1\ge cb^c$. That $P$ is a polynomial is a hypothesis: arbitrary dependence of $A_x$ on $x$ does not imply it. Assume also that $P$ does not vanish on $H^k$, that $M$ has degree at most $D$, and the hypotheses of Proposition 5.7. Apply Proposition 5.7 to the ideal test, whose table for $P$ is exactly $\mathcal H_1(P)$, so that $\delta_P=0$. Substituting (B24) into (B21) gives $$ \frac{1-Dh/q}{2} \leq -(1+2C(c))\bigl(\kappa_{\rm actual}+2\epsilon\bigr) +(1+2C_c)\bigl(\kappa_{\rm actual}+2\epsilon\bigr) +2\delta_M+\frac{D}{q-1}. \tag{B25} $$ -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). +This proves Lemma 3.6. $\square$ -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. +Lean: [self-corrected reads](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/HadamardDerivedOracle.lean), [zero-on-grid test](https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Algebraic/DerivedZeroOnGridSoundness.lean). - -## Appendix. Failure of the earlier scalar test - - -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 - -$$ -f(u)+\sum_{i=1}^3 f(u+\omega^i v)=0. -$$ - -The characteristic-two Frobenius identity $(a+b)^4=a^4+b^4$ gives, for every pair $u,v$, - -$$ -f(u)+\sum_{i=1}^3 f(u+\omega^i v) -=4u_1^4+v_1^4\sum_{i=1}^3\omega^{4i}=0. -$$ - -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 - -$$ -X^4-P(X,x_2,\ldots,x_m) -$$ - -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. - -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. + -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]. +## 6. Formalization and sources - + +**What the Lean development proves.** [Lee's PCP development][formal-source], at the revision linked throughout, proves three final statements: Theorem 1.1 (`np_subset_pcp`), Theorem 1.2 in the machine model of Section 2.3 (`pcp_subset_np_concrete`), and the equivalence of that model's class NP with the nondeterministic-machine class of ComplexityLib (`inNP_iff_mem`). The `Lean:` lines identify the declarations behind each numbered result. -## Source and verification account +**Differences from [ABSSW26].** The primary paper is [arXiv version 2 of *A Simple Algebraic Proof of the PCP Theorem*][intro-paper], dated 22 October 2026; we have not checked it against a SOSA proceedings edition. Where Lee's statement differs from the paper's, we state Lee's and mark the place with a remark. The point-versus-line test and the binary low-degree test draw the line parameter from all of $F$ (Theorem 4.8, Section 5.5); the verifier draws the four line parameters of the zero-on-grid tests from $F$ and accepts when one is zero (Section 3.7). The standard low-degree test is sound whenever $q>2c$ (Theorem 4.4), standard local correction needs only distinct nonzero nodes (Lemma 4.5), and local correction with a lines table needs no small-error hypothesis (Lemma 4.6). The Hadamard test makes ten queries at $r=3$, and its distance bound holds with the factor 28 at every rejection probability (Section 5.3). Every lines table has affine labels (Section 3.2), the inner low-degree test chooses between its two parts by a fair coin (Section 5.4), the binary low-degree test bounds the distance over homogeneous labels (Section 5.5), and the two corrector calls of a zero-on-grid test use independent seeds (Section 5.7). The constants, the exact randomness formula, the query count and the rejection probability $g_4$ are explicit (Section 3.8). The reduction from NP, the sampler from fair bits and the machine are constructed, where [ABSSW26] cites NP-completeness. - -The fixed formal source is [Lee's PCP development at the revision linked throughout this account][formal-source]. The primary paper is the corrected [arXiv v2 of *A Simple Algebraic Proof of the PCP Theorem*][intro-paper], dated 22 October 2026. That public revision corrects the short low-degree test and acknowledges Lee's identification of an earlier mistake. A separate final SOSA proceedings edition has not been established identical to v2. Nor are the paper and Lean development asserted to be textually or parametrically identical: the chapters state the formalization's exact tests, constants and resource guarantees where these differ. Public links identify the supporting statements at the fixed revision. The linked declarations identify the formal statements explained here. The ordinary proofs and illustrative calculations in this account are explanatory reconstructions; they do not constitute a separate kernel check of the prose. +**Credits.** The algebraic construction is due to Amireddy, Behera, Srinivasan, Sudan and Willumsgaard, and its Lean formalization to Troy Lee, who also pointed out the mistake in Lemma 3.3 of version 1 (Section 4.3). Credit for the earlier results belongs to the researchers cited where each is used. Will Cook directed the AI-assisted preparation of this exposition. The explanatory authors claim the presentation only; no endorsement by the original authors is implied. -The new prose was prepared by AI agents directed by Will Cook. The underlying algebraic argument is due to Prashanth Amireddy, Amik Raj Behera, Srikanth Srinivasan, Madhu Sudan and Sophus Valentin Willumsgaard; the Lean formalization is Troy Lee's. This account is an explanation of that work, not a new proof claimed by its explanatory authors. It does not imply the original authors' endorsement or human review. +**What was checked.** The links identify the formal statements being explained. The prose proofs and calculations are reconstructions with no kernel check of their own, and no independent expert has accepted this account. ## References -The version notes identify the copies consulted. Theorem and section numbers refer to those copies; a linked author manuscript is not assumed to have the published article's pagination. +Theorem and section numbers refer to the consulted copies named below. -**[ABSSW26]** 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. Primary paper for the construction; the corrected weighted test is in Fact 2.7 and Lemma 3.3. This public revision has not been identified with a separate final SOSA proceedings edition. +**[ABSSW26]** 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. -**[ABSSW26v1]** Prashanth Amireddy, Amik Raj Behera, Srikanth Srinivasan, Madhu Sudan and Sophus Valentin Willumsgaard. *A Simple Algebraic Proof of the PCP Theorem*. [arXiv:2608.17429v1](https://arxiv.org/abs/2608.17429v1), 18 August 2026. Historical version used only to state and analyse the earlier unit-weight test in Fact 2.7 and Lemma 3.3. +**[ABSSW26v1]** Prashanth Amireddy, Amik Raj Behera, Srikanth Srinivasan, Madhu Sudan and Sophus Valentin Willumsgaard. *A Simple Algebraic Proof of the PCP Theorem*. [arXiv:2608.17429v1](https://arxiv.org/abs/2608.17429v1), 18 August 2026. Used only for the version-1 test in Fact 2.7 and Lemma 3.3. -**[ALMSS98]** 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), 501–555, 1998. [DOI: 10.1145/278298.278306](https://doi.org/10.1145/278298.278306). Consulted version: the [author-hosted journal manuscript](https://people.seas.harvard.edu/~madhusudan/papers/1992/almss-journ.pdf), especially Theorem 45 on point-versus-line testing and Theorem 69 on bivariate agreement. +**[ALMSS98]** 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), 501–555, 1998. [DOI: 10.1145/278298.278306](https://doi.org/10.1145/278298.278306). Consulted version: the [author-hosted journal manuscript](https://people.seas.harvard.edu/~madhusudan/papers/1992/almss-journ.pdf), especially Proposition 34, Theorem 45 and Appendix A. -**[AS98]** Sanjeev Arora and Shmuel Safra. “Probabilistic Checking of Proofs: A New Characterization of NP.” *Journal of the ACM* **45**(1), 70–122, 1998. [Journal-format copy](https://www.cs.umd.edu/~gasarch/TOPICS/pcp/AS.pdf). Section 5.2 supplies the bivariate agreement antecedent, including the error-locator and interpolation construction. +**[AS98]** Sanjeev Arora and Shmuel Safra. “Probabilistic Checking of Proofs: A New Characterization of NP.” *Journal of the ACM* **45**(1), 70–122, 1998. [Journal-format copy](https://www.cs.umd.edu/~gasarch/TOPICS/pcp/AS.pdf). Section 5.2 is the antecedent of the bivariate agreement proof. -**[BCHKS96]** M. Bellare, D. Coppersmith, J. Håstad, M. Kiwi and M. Sudan. “Linearity Testing in Characteristic Two.” *IEEE Transactions on Information Theory* **42**(6), 1781–1795, 1996. [DOI: 10.1109/18.556674](https://doi.org/10.1109/18.556674). Consulted version: the [author manuscript](https://www.csc.kth.se/tcs/projects/publications/bchks.pdf). The characteristic-two Fourier analysis is the quantitative linearity-testing antecedent used in the primary paper's Appendix B and reconstructed in the binary chapter. +**[BCHKS96]** M. Bellare, D. Coppersmith, J. Håstad, M. Kiwi and M. Sudan. “Linearity Testing in Characteristic Two.” *IEEE Transactions on Information Theory* **42**(6), 1781–1795, 1996. [DOI: 10.1109/18.556674](https://doi.org/10.1109/18.556674). Consulted version: the [author manuscript](https://www.csc.kth.se/tcs/projects/publications/bchks.pdf). -**[BLR93]** 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. [DOI: 10.1016/0022-0000(93)90044-W](https://doi.org/10.1016/0022-0000(93)90044-W). Consulted version: the [author-hosted manuscript](https://people.csail.mit.edu/ronitt/papers/selftestcorrect.pdf), including Section 4.2 on linear self-testing. This is the source of the BLR test used in the Hadamard analysis. +**[BLR93]** 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. [DOI: 10.1016/0022-0000(93)90044-W](https://doi.org/10.1016/0022-0000(93)90044-W). Consulted version: the [author-hosted manuscript](https://people.csail.mit.edu/ronitt/papers/selftestcorrect.pdf), Section 4.2. -**[FS95/13]** Katalin Friedl and Madhu Sudan. “Some Improvements to Total Degree Tests.” In *Proceedings of the Third Israel Symposium on Theory of Computing and Systems*, 190–198. IEEE Computer Society, 1995. [DOI: 10.1109/ISTCS.1995.377032](https://doi.org/10.1109/ISTCS.1995.377032). Consulted version: [arXiv:1307.3975v1](https://arxiv.org/abs/1307.3975v1), 15 July 2013, which corrects typographical errors in the conference version. Lemma 4 is the exact-line characterization cited in the primary paper's Appendix A; the algebra chapter gives the pinned formalization's explicit degree-bound argument. +**[FS95/13]** Katalin Friedl and Madhu Sudan. “Some Improvements to Total Degree Tests.” In *Proceedings of the Third Israel Symposium on Theory of Computing and Systems*, 190–198. IEEE Computer Society, 1995. [DOI: 10.1109/ISTCS.1995.377032](https://doi.org/10.1109/ISTCS.1995.377032). Consulted version: [arXiv:1307.3975v1](https://arxiv.org/abs/1307.3975v1), 15 July 2013, which corrects typographical errors in the conference version. Lemma 4 is cited in Appendix A of [ABSSW26]. -**[KS08]** Tali Kaufman and Madhu Sudan. “Algebraic Property Testing: The Role of Invariance.” In *Proceedings of the 40th Annual ACM Symposium on Theory of Computing*, 403–412, 2008. [DOI: 10.1145/1374376.1374434](https://doi.org/10.1145/1374376.1374434). Consulted version: the [conference manuscript](https://people.csail.mit.edu/madhu/papers/2007/apt-conf.pdf), especially Theorem 2.9. The weighted affine-constraint argument is the specialization used in the corrected short test. +**[KS08]** Tali Kaufman and Madhu Sudan. “Algebraic Property Testing: The Role of Invariance.” In *Proceedings of the 40th Annual ACM Symposium on Theory of Computing*, 403–412, 2008. [DOI: 10.1145/1374376.1374434](https://doi.org/10.1145/1374376.1374434). Consulted version: the [conference manuscript](https://people.csail.mit.edu/madhu/papers/2007/apt-conf.pdf), Theorem 2.9 and Lemma 3.1. -**[RS96]** Ronitt Rubinfeld and Madhu Sudan. “Robust Characterizations of Polynomials with Applications to Program Testing.” *SIAM Journal on Computing* **25**(2), 252–271, 1996. [DOI: 10.1137/S0097539793255151](https://doi.org/10.1137/S0097539793255151). Consulted version: the [retained manuscript][rubinfeld-sudan], Section 4, Theorem 5 and Lemmas 6–8, pp. 10–12. The primary PCP paper cites the corresponding published result as Theorem 4.1; numbering differs between these editions. +**[RS96]** Ronitt Rubinfeld and Madhu Sudan. “Robust Characterizations of Polynomials with Applications to Program Testing.” *SIAM Journal on Computing* **25**(2), 252–271, 1996. [DOI: 10.1137/S0097539793255151](https://doi.org/10.1137/S0097539793255151). Consulted version: the [retained manuscript][rubinfeld-sudan], Section 4, Theorem 5 and Lemmas 6–8, pp. 10–12. -**[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. +**[Lee26]** Troy Lee. *tcs-formalizations: PCP development*. Lean source, 2026. [Pinned PCP development](https://github.com/troyjlee/tcs-formalizations/tree/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP). -**[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. +**[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 are the finite-field background cited in [ABSSW26, Fact 2.3]. [friedl-sudan]: https://arxiv.org/abs/1307.3975v1 diff --git a/papers/pcp-full-argument/proof-map.png b/papers/pcp-full-argument/proof-map.png index 6efbdda..9db7e94 100644 Binary files a/papers/pcp-full-argument/proof-map.png and b/papers/pcp-full-argument/proof-map.png differ diff --git a/papers/pcp-full-argument/proof-map.svg b/papers/pcp-full-argument/proof-map.svg index 5da0d0a..ade048e 100644 --- a/papers/pcp-full-argument/proof-map.svg +++ b/papers/pcp-full-argument/proof-map.svg @@ -1,34 +1,34 @@ -From algebraic tests to the PCP theoremAlgebraic tests and binary encodings supply encoded-line soundness. Its witnesses and the correction bounds feed the three-colouring verifier. The verifier combines with machine and reduction contracts to give the PCP theorem. This is a selected mathematical-use map, not an extracted Lean graph.FROM THE TESTS TO THE THEOREMpoint–line boundbinary error boundsdistanceboundsfour fixed witnessesgrid-constraint boundscompleteness + soundnesstime, randomnessand NP reduction +From algebraic tests to the PCP theoremLow-degree tests and binary encodings supply soundness of the binary low-degree test. Its four nearby polynomials and the local-correction and zero-on-grid bounds feed the three-colouring verifier. The verifier combines with machine and reduction contracts to give the PCP theorem. This is a selected mathematical-use map, not an extracted Lean graph.FROM THE TESTS TO THE THEOREMpoint-versus-lineboundbinary error boundsdistanceboundsfour fixed nearby polynomialsgrid-constraint boundscompleteness + soundnesstime, randomnessand NP reduction ALGEBRAIC CHAPTER - Algebraic testing - Weighted test; point–line agreement + Low-degree tests + Standard; point-versus-line BINARY CHAPTER Binary encodings - Digit substitution; Hadamard tests + Set-multilinear encoding; Hadamard test - BOUND (B15) - Encoded-line soundness - One polynomial; two distances + SOUNDNESS BOUND (B15) + Binary low-degree test + One nearby polynomial; two distances BOUNDS (B16), (B25) - Correction and ZERO - Bounds at prescribed points + Local correction + and the zero-on-grid test ASSEMBLED VERIFIER Three-colouring - Four witnesses; seven checks + Four nearby polynomials; seven checks diff --git a/papers/pcp-full-argument/source-review.md b/papers/pcp-full-argument/source-review.md index 4e6c40b..c20c473 100644 --- a/papers/pcp-full-argument/source-review.md +++ b/papers/pcp-full-argument/source-review.md @@ -51,3 +51,7 @@ The reading-copy highlighter requires a quotation within one supported Markdown The detailed account now gives the digit substitution identity, bounded-degree injectivity, and evaluation at the power substitution point three separate statement entries. Each points to its own assertion in the account and to one declaration: `SetMultilinear.decode_encode`, `SetMultilinear.encode_injective_on`, or `SetMultilinear.eval_encode`. In all three, the bound on the degree of the input polynomials is `natDegree < m ^ c` in Lean (the prose uses `b` for the base). The whole-verifier query list bound and verdict congruence also have separate entries: `ThreeColorVerifier.queries_length_le` proves the length bound; `ThreeColorVerifier.test_congr` proves that agreeing on answers to the listed queries preserves the verdict for the same seed. The latter does not give a count of distinct addresses. The forward and converse entries in the three companions lead to their respective arguments. The forward declaration packages a chosen verifier with its polynomial-time implementation, a fixed query bound, the canonical random-bit budget, the polynomial address bound, perfect completeness, and soundness at most one half. The converse takes these effectiveness, randomness, address, completeness and soundness premises and concludes membership in the concrete witness class; it does not need a separate premise fixing a constant query bound. The detailed and specialist accounts now separately link the equivalence of that concrete class and the vendored ComplexityLib class to `PCP.ReferenceNP.inNP_iff_mem`. These are source-level correspondences. The comparisons for the rest of the statements remain held; the Comparator receipt above applies only to its three Lean challenges. + +### Third edition of the three accounts + +The three companions now carry the edition of 16 November 2026, with SHA-256 `a703894c605a72e35f4888523bc0b0f64ce7d3fd3861a634ac1e0cd073328882` (long), `c02d8524d0b5c355ab6432c518af335a1a55a57e0d6f75ffd481811f5d3575f2` (specialist) and `355ba9e48e53043f8e08a5e32030c779f50b37989c4e6b79ef90f2dbc432f2af` (exposition); the two figures were regenerated with the texts. This edition refines the writing. Results are numbered and named, several sections were renamed or moved, terms and notation follow the literature, and repeated passages were cut. The mathematical statements were checked against the pinned Lean source by reading. Every quotation was rebound to the new wording, and the passages whose claims moved to another place in the text now point there. Where the new edition states a numbered result whose declaration was already in a page's index, that result received its own entry. The Lean files are unchanged, so Lean was not run again for this edition, and the Comparator receipt above still applies to the same three statements. diff --git a/papers/pcp-specialist/links.json b/papers/pcp-specialist/links.json index eb70009..f1e61b8 100644 --- a/papers/pcp-specialist/links.json +++ b/papers/pcp-specialist/links.json @@ -3,8 +3,8 @@ "claims": [ { "id": "claim-1", - "title": "The forward PCP theorem", - "section": "1. The theorem and the encoding problem", + "title": "The PCP theorem", + "section": "1", "passage": "pcp-short-forward-statement", "lean": [ "PCP.np_subset_pcp" @@ -12,7 +12,7 @@ }, { "id": "claim-2", - "title": "Grid constraints and colouring", + "title": "Colouring constraints", "section": "2", "passage": "pcp-short-colour-constraints", "lean": [ @@ -21,7 +21,7 @@ }, { "id": "claim-4", - "title": "Decoding the inner weighted test", + "title": "Standard low-degree test", "section": "4", "passage": "pcp-short-weighted-test", "lean": [ @@ -30,7 +30,7 @@ }, { "id": "claim-5", - "title": "Decoding the inner binary polynomial test", + "title": "Inner low-degree test", "section": "4", "passage": "pcp-short-binary-decoding", "lean": [ @@ -39,7 +39,7 @@ }, { "id": "claim-6", - "title": "Decoding the outer encoded-line test", + "title": "Binary low-degree test", "section": "4", "passage": "pcp-short-outer-decoding", "lean": [ @@ -48,7 +48,7 @@ }, { "id": "claim-7", - "title": "Local correction error bound", + "title": "Local correction at a prescribed point", "section": "5", "passage": "pcp-short-outer-correction", "lean": [ @@ -57,7 +57,7 @@ }, { "id": "claim-8", - "title": "ZERO rejection lower bound", + "title": "Zero-on-grid test", "section": "5", "passage": "pcp-short-zero", "lean": [ @@ -66,8 +66,8 @@ }, { "id": "source-11", - "title": "The honest verifier always accepts", - "section": "6. One decoding for all seven checks", + "title": "Perfect completeness", + "section": "6", "passage": "linked-source-12", "lean": [ "PCP.Algebraic.ThreeColorVerifier.exists_proof_test_eq_true" @@ -75,8 +75,8 @@ }, { "id": "source-12", - "title": "Verifier resource and soundness bounds", - "section": "7. Resources, implementation and the reverse inclusion", + "title": "Repetition on the same proof", + "section": "7", "passage": "linked-source-13", "lean": [ "PCP.Algebraic.ThreeColorAmplifiedVerifier.verification_guarantees" @@ -84,7 +84,7 @@ }, { "id": "claim-10", - "title": "Polynomial-time graph verifier", + "title": "Polynomial-time implementation", "section": "7", "passage": "pcp-short-complexity", "lean": [ @@ -93,8 +93,8 @@ }, { "id": "source-13", - "title": "The converse PCP theorem", - "section": "7. Resources, implementation and the reverse inclusion", + "title": "The reverse inclusion", + "section": "7", "passage": "linked-source-14", "lean": [ "PCP.pcp_subset_np_concrete" @@ -103,7 +103,7 @@ { "id": "reference-np-equivalence", "title": "Equivalence with the reference NP class", - "section": "Formal correspondence and credits", + "section": "Formalization and sources", "passage": "pcp-short-concrete-reference-np", "lean": [ "PCP.ReferenceNP.inNP_iff_mem" @@ -111,12 +111,30 @@ }, { "id": "derived-zero", - "title": "Derived ZERO rejection bound", + "title": "Grid test with self-corrected reads", "section": "5", "passage": "pcp-short-derived-zero", "lean": [ "PCP.Algebraic.DerivedZeroOnGrid.rejectionRate_lower_bound" ] + }, + { + "id": "vanishing-certificate", + "title": "Vanishing certificate", + "passage": "pcp-short-vanishing-certificate", + "lean": [ + "PCP.Algebraic.GridVanishing.vanishesOn_iff_exists_certificate" + ], + "section": "2" + }, + { + "id": "point-line", + "title": "Point-versus-line test", + "passage": "pcp-short-point-line", + "lean": [ + "PCP.Algebraic.PointLineTest.exists_close_of_small_rejection" + ], + "section": "4" } ], "passages": [ @@ -137,12 +155,12 @@ "id": "pcp-short-theorem", "section": "1", "role": "explains", - "quote": "If $x\\in L$, there is one proof accepted for every random seed. If $x\\notin L$, every proof is accepted with probability at most $1/2$.", + "quote": "If $x\\in\\mathcal L$, there is one proof accepted for every random seed. If $x\\notin\\mathcal L$, every proof is accepted with probability at most $1/2$.", "lean": [ "PCP.np_subset_pcp" ], "anchor": { - "heading": "1. The theorem and the encoding problem", + "heading": "1. Introduction", "block": 4 } }, @@ -150,38 +168,38 @@ "id": "pcp-short-colour-constraints", "section": "2", "role": "explains", - "quote": "An honest colouring makes $A_P$ vanish on $H^m$ and $B_P$ vanish on $H^{2m}$. Conversely, these vanishing conditions recover a proper colouring: the first restricts every vertex to the three allowed values, and the second separates the values across each edge.", + "quote": "**Lemma 2.1 (colouring constraints).** The restriction $P|_{H^m}$ is a proper colouring of the padded graph exactly when $A_P|_{H^m}=0$ and $B_P|_{H^{2m}}=0$, and $Q_P,A_P,B_P$ have degrees at most $d_0,3d_0,5d_0$.", "lean": [ "PCP.Algebraic.ThreeColorGrid.colorable_iff_exists_constraints" ], "anchor": { - "heading": "2. Four polynomials and seven checks", - "block": 8 + "heading": "2. Preliminaries", + "block": 10 } }, { "id": "pcp-short-weighted-test", "section": "4", "role": "explains", - "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$.", + "quote": "If (10) fails on a fraction $\\delta<1/[2(c+2)^2]$ of pairs $(u,v)$, then $f$ is $2\\delta$-close to such a polynomial", "lean": [ "PCP.Algebraic.GeneratorLowDegreeTest.exists_close" ], "anchor": { - "heading": "4. What the low-degree tests supply", - "block": 6 + "heading": "4. Low-degree tests over the binary alphabet", + "block": 7 } }, { "id": "pcp-short-binary-decoding", "section": "4", "role": "explains", - "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.", + "quote": "If $q>2c$ and the test rejects with probability $\\kappa$, some polynomial $U$ of total degree at most $c$ satisfies", "lean": [ "PCP.Algebraic.BinaryLocalRowDecoding.exists_polynomial_distance_le" ], "anchor": { - "heading": "4. What the low-degree tests supply", + "heading": "4. Low-degree tests over the binary alphabet", "block": 16 } }, @@ -189,91 +207,91 @@ "id": "pcp-short-outer-decoding", "section": "4", "role": "explains", - "quote": "The restricted conclusion is for homogeneous linear labels.", + "quote": "If this test rejects $(f,f')$ with probability $\\kappa$ and $J\\kappa\\le1/(4\\cdot10^6)$, then some polynomial $P$ of total degree at most $D$ has $\\Delta_{\\rm full}(f,\\mathcal H_r(P))\\le S\\kappa$ and $\\Delta_{\\rm hom}(f,\\mathcal H_r(P))\\le S\\kappa$.", "lean": [ "PCP.Algebraic.EncodedLineLowDegreeTest.exists_close" ], "anchor": { - "heading": "4. What the low-degree tests supply", - "block": 32 + "heading": "4. Low-degree tests over the binary alphabet", + "block": 30 } }, { "id": "pcp-short-outer-correction", "section": "5", "role": "explains", - "quote": "This statement allows an arbitrary auxiliary table. Such a table may cause frequent rejection; (14) says that a corrector which seldom rejects cannot often return the wrong bit.", + "quote": "If the local corrector rejects at $a$ with probability $\\kappa_a$, the probability over all its randomness, $L$ included, of rejection or a returned bit other than $L(P(a))$ satisfies", "lean": [ "PCP.Algebraic.BinaryLocalCorrection.failure_le" ], "anchor": { - "heading": "5. Correcting the nonuniform certificate queries", - "block": 11 + "heading": "5. Local correction and the zero-on-grid test", + "block": 4 } }, { "id": "pcp-short-zero", "section": "5", "role": "explains", - "quote": "Thus small observed rejection forces the decoded polynomial to vanish on the grid, once the error terms are below the left side.", + "quote": "If $A$ does not vanish on $H^k$ and the test rejects with probability $\\kappa$, then (15) holds.", "lean": [ "PCP.Algebraic.BinaryZeroOnGridCorrection.rejectionRate_lower_bound" ], "anchor": { - "heading": "5. Correcting the nonuniform certificate queries", - "block": 19 + "heading": "5. Local correction and the zero-on-grid test", + "block": 13 } }, { "id": "linked-source-12", - "section": "6. One decoding for all seven checks", + "section": "6", "role": "explains", - "quote": "For completeness, start with a proper colouring, its exact interpolants and exact certificates, and the honest encoded line restrictions. If their degrees are below $b^c$, every component test accepts for every seed. This supplies one fixed eight-table proof with perfect completeness.", + "quote": "For completeness, a proper colouring, its low-degree extension, exact vanishing certificates and honest lines tables, with degrees below $b^c$, pass every check for every seed: one fixed eight-table proof with perfect completeness.", "lean": [ "PCP.Algebraic.ThreeColorVerifier.exists_proof_test_eq_true" ], "anchor": { - "heading": "6. One decoding for all seven checks", + "heading": "6. Soundness of the verifier", "block": 13 } }, { "id": "linked-source-13", - "section": "7. Resources, implementation and the reverse inclusion", + "section": "7", "role": "explains", - "quote": "Repeating independently a constant number of times against the same fixed proof reduces soundness error to at most $1/2$, preserving logarithmic randomness and constant query complexity.", + "quote": "After fair-bit sampling the rejection gap is at least $g_c/16$, and constantly many independent repetitions on the same proof reduce soundness error to $1/2$, keeping logarithmic randomness and constant queries.", "lean": [ "PCP.Algebraic.ThreeColorAmplifiedVerifier.verification_guarantees" ], "anchor": { "heading": "7. Resources, implementation and the reverse inclusion", - "block": 12 + "block": 10 } }, { "id": "pcp-short-complexity", "section": "7", "role": "explains", - "quote": "The operations behind these queries are polynomial-time computations.", + "quote": "Lee's implementation finds the field, generators and cube roots by bounded search in time polynomial in $q$, hence in the input length, and compiles the verifier into Mathlib's finite multi-stack machine model with a polynomial cost bound.", "lean": [ "PCP.Lang.ThreeColorRuntime.polyTimeAlg" ], "anchor": { "heading": "7. Resources, implementation and the reverse inclusion", - "block": 15 + "block": 13 } }, { "id": "linked-source-14", - "section": "7. Resources, implementation and the reverse inclusion", + "section": "7", "role": "explains", - "quote": "For the converse, guess the first $p(n)$ proof bits and simulate the verifier on every random string. There are at most $2^b(2(n+2))^a$ such strings, and each simulation takes polynomial time. Perfect completeness gives a prefix for which every run accepts. If a prefix were accepted for a no-instance, its zero extension would be a fixed proof with acceptance probability one, contradicting soundness. Thus this finite witness relation is an NP relation, completing the equality in the theorem.", + "quote": "For the converse, take the verifier and bounds $p,\\alpha,\\beta$ of Theorem 1.1, guess the first $p(n)$ proof bits and simulate the verifier, in polynomial time, on each of the at most $2^\\beta(2(n+2))^\\alpha$ random strings. Perfect completeness gives a prefix accepted on every run. If such a prefix existed for a no-instance, its zero extension would have acceptance probability one, contradicting soundness. The resulting witness relation is decidable in polynomial time, so the language lies in NP.", "lean": [ "PCP.pcp_subset_np_concrete" ], "anchor": { "heading": "7. Resources, implementation and the reverse inclusion", - "block": 19 + "block": 17 } }, { @@ -288,98 +306,124 @@ 264 ], "anchor": { - "heading": "5. Correcting the nonuniform certificate queries", - "block": 21 + "heading": "5. Local correction and the zero-on-grid test", + "block": 20 }, - "section": "5. Correcting the nonuniform certificate queries" + "section": "5" }, { "id": "pcp-short-reference-np", "role": "explains", - "quote": "Explicit machine simulations identify the concrete witness class with [the NP class in the unchanged vendored ComplexityLib][lean-reference-np].", + "quote": "explicit simulations identify its witness class with [the NP class in the unchanged vendored ComplexityLib][lean-reference-np].", "lean": [ "PCP.ReferenceNP.inNP_iff_mem" ], "anchor": { - "heading": "Formal correspondence and credits", + "heading": "Formalization and sources", "block": 2 }, - "section": "Formal correspondence and credits" + "section": "Formalization and sources" }, { "id": "pcp-short-reference-np-context", "role": "uses", - "quote": "For every language $L\\subseteq\\{0,1\\}^{*}$ in NP", + "quote": "For every language $\\mathcal L\\subseteq\\{0,1\\}^{*}$ in NP", "lean": [ "PCP.ReferenceNP.inNP_iff_mem" ], "anchor": { - "heading": "1. The theorem and the encoding problem", + "heading": "1. Introduction", "block": 2 }, - "section": "1. The theorem and the encoding problem" + "section": "1" }, { "id": "pcp-short-proof-table-type", - "section": "2", + "section": "3", "role": "explains", - "quote": "The received proof consists of eight arbitrary binary tables.", + "quote": "The proof is the bit string the verifier queries; it consists of eight tables, which [ABSSW26, §7] call proof oracles.", "lean": [ "PCP.Algebraic.ThreeColorVerifier.Proof" ], "anchor": { - "heading": "2. Four polynomials and seven checks", - "block": 18 + "heading": "3. Set-multilinear and Hadamard encodings", + "block": 29 } }, { "id": "pcp-short-query-type", - "section": "2", + "section": "3", "role": "uses", - "quote": "A primary address consists of a point and a label.", + "quote": "An address is a point $x$ and a label $R\\in\\mathcal B_r$; an honest table stores $R(\\rho(u))$ for the encoded value $u$.", "lean": [ "PCP.Algebraic.ThreeColorVerifier.Query", "PCP.Algebraic.ThreeColorVerifier.read" ], "anchor": { - "heading": "2. Four polynomials and seven checks", - "block": 21 + "heading": "3. Set-multilinear and Hadamard encodings", + "block": 31 } }, { "id": "pcp-short-forward-statement", - "section": "1. The theorem and the encoding problem", + "section": "1", "role": "explains", - "quote": "**Theorem (PCP).** For every language $L\\subseteq\\{0,1\\}^{*}$ in NP, there are a polynomial-time verifier $V$, natural numbers $a,b,q_0$, and a polynomial $p\\in\\mathbb N[X]$ with the following properties.", + "quote": "**Theorem 1.1 (PCP theorem; [AS98, ALMSS98]).** For every language $\\mathcal L\\subseteq\\{0,1\\}^{*}$ in NP, there are a polynomial-time verifier $V$, natural numbers $\\alpha,\\beta,\\ell$, and a polynomial $p\\in\\mathbb N[X]$ with the following properties.", "lean": [ "PCP.np_subset_pcp" ], "anchor": { - "heading": "1. The theorem and the encoding problem", + "heading": "1. Introduction", "block": 2 } }, { "id": "pcp-short-concrete-reference-np", - "section": "Formal correspondence and credits", + "section": "Formalization and sources", "role": "states", - "quote": "Explicit machine simulations identify the concrete witness class with [the NP class in the unchanged vendored ComplexityLib][lean-reference-np].", + "quote": "explicit simulations identify its witness class with [the NP class in the unchanged vendored ComplexityLib][lean-reference-np].", "lean": [ "PCP.ReferenceNP.inNP_iff_mem" ], "anchor": { - "heading": "Formal correspondence and credits", + "heading": "Formalization and sources", "block": 2 } + }, + { + "id": "pcp-short-vanishing-certificate", + "role": "states", + "quote": "Equivalently, some polynomial $M(X,Y)$ of degree at most $\\deg A$, a vanishing certificate, satisfies", + "lean": [ + "PCP.Algebraic.GridVanishing.vanishesOn_iff_exists_certificate" + ], + "anchor": { + "heading": "2. Preliminaries", + "block": 14 + }, + "section": "2" + }, + { + "id": "pcp-short-point-line", + "role": "states", + "quote": "Then the point function is within $2\\theta$ of one polynomial of total degree at most $D$.", + "lean": [ + "PCP.Algebraic.PointLineTest.exists_close_of_small_rejection" + ], + "anchor": { + "heading": "4. Low-degree tests over the binary alphabet", + "block": 25 + }, + "section": "4" } ], "plain": { "PCP.np_subset_pcp": "The forward PCP theorem", "PCP.Algebraic.ThreeColorGrid.constraints_iff_satisfies": "Colouring constraints on the grid", - "PCP.Algebraic.SetMultilinear.eval_encode": "Evaluation after digit encoding", - "PCP.Algebraic.GeneratorLowDegreeTest.exists_close": "Decoding the inner weighted test", - "PCP.Algebraic.BinaryLocalRowDecoding.exists_polynomial_distance_le": "Decoding the inner polynomial test", - "PCP.Algebraic.EncodedLineLowDegreeTest.exists_close": "Decoding the outer encoded-line test", + "PCP.Algebraic.SetMultilinear.eval_encode": "Set-multilinear encoding: evaluation", + "PCP.Algebraic.GeneratorLowDegreeTest.exists_close": "Standard low-degree test", + "PCP.Algebraic.BinaryLocalRowDecoding.exists_polynomial_distance_le": "Inner low-degree test", + "PCP.Algebraic.EncodedLineLowDegreeTest.exists_close": "Binary low-degree test", "PCP.Algebraic.BinaryLocalCorrection.failure_le": "Local correction error bound", "PCP.Algebraic.BinaryZeroOnGridCorrection.rejectionRate_ge": "Soundness of the grid test", "PCP.Algebraic.ThreeColorFields.chosen_parameters": "Choosing field parameters", @@ -419,45 +463,45 @@ "PCP.Algebraic.ThreeColorParameterChoice.volume_le_log_add_one": "Logarithmic parameter volume", "PCP.Lang.ThreeColorRuntime.polyTimeAlg": "Polynomial-time graph verifier", "PCP.Algebraic.ThreeColorVerifier.exists_proof_test_eq_true": "The honest verifier always accepts", - "PCP.Algebraic.BinaryZeroOnGridCorrection.rejectionRate_lower_bound": "ZERO rejection lower bound", + "PCP.Algebraic.BinaryZeroOnGridCorrection.rejectionRate_lower_bound": "Zero-on-grid rejection lower bound", "PCP.Algebraic.GridVanishing.vanishesOn_iff_exists_decomposition": "Grid vanishing decomposition", - "PCP.Algebraic.DerivedZeroOnGrid.rejectionRate_lower_bound": "Derived ZERO rejection bound", + "PCP.Algebraic.DerivedZeroOnGrid.rejectionRate_lower_bound": "Grid test with self-corrected reads", "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.SetMultilinear.evaluationPoint": "The substitution point for a parameter", + "PCP.Algebraic.EncodedLineLowDegreeTest.Auxiliary": "Lines-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", "PCP.Algebraic.BinaryLocalCorrection.soundnessConstant": "Loss constant of local correction", "PCP.Algebraic.BinaryLocalCorrection.rejectionRate": "Rejection rate of local correction", - "PCP.Algebraic.BinaryLocalRowDecoding.decodingConstant": "Inner decoding constant", - "PCP.Algebraic.DerivedZeroOnGrid.GridRandomness": "ZERO randomness apart from the point", - "PCP.Algebraic.DerivedZeroOnGrid.TestSample": "Randomness of the derived ZERO test", + "PCP.Algebraic.BinaryLocalRowDecoding.decodingConstant": "Inner low-degree test constant", + "PCP.Algebraic.DerivedZeroOnGrid.GridRandomness": "Grid-test randomness besides the point", + "PCP.Algebraic.DerivedZeroOnGrid.TestSample": "Randomness of the grid test with reads", "PCP.Algebraic.DerivedZeroOnGrid.gridSeed": "Drop the fresh correction seed", - "PCP.Algebraic.DerivedZeroOnGrid.withPrimaryBit": "ZERO test given its primary bit", - "PCP.Algebraic.DerivedZeroOnGrid.check": "The derived ZERO check", - "PCP.Algebraic.DerivedZeroOnGrid.instFintypeInnerPoint": "Finitely many inner points (ZERO)", - "PCP.Algebraic.DerivedZeroOnGrid.instFintypeInnerSeed": "Finitely many inner seeds (ZERO)", - "PCP.Algebraic.DerivedZeroOnGrid.instFintypeCallSeedSumFin": "Finitely many call seeds (ZERO)", - "PCP.Algebraic.DerivedZeroOnGrid.instFintypeGridRandomness": "Finitely many grid seeds (ZERO)", - "PCP.Algebraic.DerivedZeroOnGrid.rejectionRate": "Rejection rate of the derived ZERO test", + "PCP.Algebraic.DerivedZeroOnGrid.withPrimaryBit": "Grid test given its constraint bit", + "PCP.Algebraic.DerivedZeroOnGrid.check": "The grid check with self-corrected reads", + "PCP.Algebraic.DerivedZeroOnGrid.instFintypeInnerPoint": "Finitely many inner points (grid test)", + "PCP.Algebraic.DerivedZeroOnGrid.instFintypeInnerSeed": "Finitely many inner seeds (grid test)", + "PCP.Algebraic.DerivedZeroOnGrid.instFintypeCallSeedSumFin": "Finitely many call seeds (grid test)", + "PCP.Algebraic.DerivedZeroOnGrid.instFintypeGridRandomness": "Finitely many grid seeds (grid test)", + "PCP.Algebraic.DerivedZeroOnGrid.rejectionRate": "Rejection rate of the grid test", "PCP.Algebraic.EncodedLineLowDegreeTest.lineErrorConstant": "Line error factor of the line test", - "PCP.Algebraic.EncodedLineLowDegreeTest.soundnessConstant": "Proximity factor of the line test", + "PCP.Algebraic.EncodedLineLowDegreeTest.soundnessConstant": "Distance factor of the binary test", "PCP.Algebraic.EncodedLineLowDegreeTest.Lines": "Lines as point and direction", - "PCP.Algebraic.EncodedLineLowDegreeTest.Sample": "Randomness of the encoded-line test", + "PCP.Algebraic.EncodedLineLowDegreeTest.Sample": "Randomness of the binary low-degree test", "PCP.Algebraic.EncodedLineLowDegreeTest.corrected": "Corrected comparison bit", - "PCP.Algebraic.EncodedLineLowDegreeTest.test": "The encoded-line test", + "PCP.Algebraic.EncodedLineLowDegreeTest.test": "The binary low-degree test", "PCP.Algebraic.EncodedLineLowDegreeTest.instFintypeInnerPoint": "Finitely many inner points (line test)", "PCP.Algebraic.EncodedLineLowDegreeTest.instFintypeInnerSeed": "Finitely many inner seeds (line test)", "PCP.Algebraic.EncodedLineLowDegreeTest.instFintypeProdTestRandomnessInnerSeed": "Finitely many seed pairs (line test)", "PCP.Algebraic.EncodedLineLowDegreeTest.instFintypeSample": "Finitely many samples (line test)", - "PCP.Algebraic.EncodedLineLowDegreeTest.rejectionRate": "Rejection rate of the encoded-line test", + "PCP.Algebraic.EncodedLineLowDegreeTest.rejectionRate": "Rejection rate of the binary test", "PCP.Algebraic.GeneratorLowDegreeTest.nodes": "Powers of the generator as nodes", "PCP.Algebraic.GeneratorLowDegreeTest.weights": "Lagrange weights at zero", "PCP.Algebraic.GeneratorLowDegreeTest.IsGeneratorNodes": "Nodes from a primitive root", - "PCP.Algebraic.GeneratorLowDegreeTest.rejectionRate": "Inner weighted test rejection rate", + "PCP.Algebraic.GeneratorLowDegreeTest.rejectionRate": "Standard low-degree test rejection rate", "PCP.Algebraic.GridVanishing.VanishesOn": "Vanishing on the grid", - "PCP.Algebraic.SetMultilinear.Variables": "Variables of the digit encoding", + "PCP.Algebraic.SetMultilinear.Variables": "Set-multilinear encoding variables", "PCP.Algebraic.ThreeColorAmplifiedVerifier.repetitions": "Fixed repetition count", "PCP.Algebraic.ThreeColorAmplifiedVerifier.verifier": "The amplified verifier", "PCP.Algebraic.ThreeColorGrid.validPolynomial": "Vertex constraint polynomial", @@ -469,12 +513,15 @@ "PCP.Algebraic.ThreeColorVerifier.flatten": "Flattening two vertex blocks", "PCP.Algebraic.ThreeColorVerifier.edgeValue": "Adjacency extension at a point", "PCP.Algebraic.ThreeColorVerifier.flatDifference": "Difference table on flat coordinates", - "PCP.Algebraic.ThreeColorVerifier.validAuxiliary": "Line tables for the vertex certificate", - "PCP.Algebraic.ThreeColorVerifier.properAuxiliary": "Line tables for the edge certificate", + "PCP.Algebraic.ThreeColorVerifier.validAuxiliary": "Lines tables for the vertex certificate", + "PCP.Algebraic.ThreeColorVerifier.properAuxiliary": "Lines tables for the edge certificate", "PCP.Algebraic.ThreeColorVerifier.BranchSeed": "Seven branch seed types", "PCP.Algebraic.ThreeColorVerifier.Sample": "Randomness of the graph verifier", "PCP.Algebraic.ThreeColorVerifier.branchTest": "Seven concrete branch tests", - "PCP.Algebraic.ThreeColorVerifier.test": "Conjunction of the seven checks" + "PCP.Algebraic.ThreeColorVerifier.test": "Conjunction of the seven checks", + "PCP.Algebraic.GridVanishing.IsCertificate": "Conditions for a vanishing certificate", + "PCP.Algebraic.GridVanishing.coordinate": "Vanishing polynomial of one coordinate", + "PCP.Algebraic.GridVanishing.substitute": "Substitute into the second block" }, "fidelity_held": "Sentence-by-sentence comparisons of this page's statements with their Lean have not been written yet. Comparator has judged the three headline statements; papers/pcp-full-argument/source-review.md records that run." } diff --git a/papers/pcp-specialist/paper.md b/papers/pcp-specialist/paper.md index 1a01b1e..68b765e 100644 --- a/papers/pcp-specialist/paper.md +++ b/papers/pcp-specialist/paper.md @@ -1,47 +1,47 @@ # Constant-query verification by algebraic encoding -*Explanatory reconstruction prepared by Will Cook with AI assistance · 15 November 2026.* +*Explanatory reconstruction prepared by Will Cook with AI assistance · 16 November 2026.* Algebraic construction: Amireddy, Behera, Srinivasan, Sudan and Willumsgaard. Lean formalization: Troy Lee. ## Abstract -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. This account isolates the encoding, fixed-target correction and soundness estimates in Troy Lee's formalization of the algebraic construction of Amireddy, Behera, Srinivasan, Sudan and Willumsgaard. 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 accounting makes explicit where the formal variant uses different sampling conventions or query counts from the source 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 Troy Lee's Lean formalization of the algebraic proof of Amireddy, Behera, Srinivasan, Sudan and Willumsgaard. In the soundness proof the verifier's checks force four fixed nearby polynomials to encode a proper colouring. Its central step is local correction at prescribed points, where closeness on average gives no guarantee; we bound the error by the corrector's own rejection probability. -## 1. The theorem and the encoding problem +## 1. Introduction -**Theorem (PCP).** For every language $L\subseteq\{0,1\}^{*}$ in NP, there are a polynomial-time verifier $V$, natural numbers $a,b,q_0$, and a polynomial $p\in\mathbb N[X]$ with the following properties. On an input $x$ of length $n$, the verifier uses exactly +**Theorem 1.1 (PCP theorem; [AS98, ALMSS98]).** For every language $\mathcal L\subseteq\{0,1\}^{*}$ in NP, there are a polynomial-time verifier $V$, natural numbers $\alpha,\beta,\ell$, and a polynomial $p\in\mathbb N[X]$ with the following properties. On an input $x$ of length $n$, the verifier uses exactly $$ -a\lceil\log_2(n+2)\rceil+b +\alpha\lceil\log_2(n+2)\rceil+\beta $$ -fair random bits, makes at most $q_0$ proof-bit queries on every run, and reads only addresses below $p(n)$. If $x\in L$, there is one proof accepted for every random seed. If $x\notin L$, every proof is accepted with probability at most $1/2$. +fair random bits (the exact randomness formula), makes at most $\ell$ proof-bit queries on every run, and reads only addresses below $p(n)$. If $x\in\mathcal L$, there is one proof accepted for every random seed. If $x\notin\mathcal L$, every proof is accepted with probability at most $1/2$. -The verifier, implementation, constants and polynomial are fixed for $L$ before the input is chosen. A proof may depend on $x$, but it is fixed before the random seed. Conversely, every language admitting such a verifier lies in NP. Thus, with the usual resource notation, +The verifier, its implementation, the constants and $p$ are fixed for $\mathcal L$ before $x$ is chosen. The proof may depend on $x$ and is fixed before the seed. Conversely, every language with such a verifier lies in NP (Section 7). Hence $$ \mathrm{NP}=\mathrm{PCP}(O(\log n),O(1)). $$ -Arora–Lund–Motwani–Sudan–Szegedy [3] proved the constant-query theorem, building on Arora–Safra [2]. We consider the algebraic proof in the corrected version of [1], as implemented by Lee [5]. The cost of reading a field value is already an obstacle in the usual point-versus-line test: a field value takes several bits, and a line polynomial's coefficient vector takes its degree times as many. Treating either object as one oracle symbol does not prove constant **bit** query complexity. +*Remark (formalization).* Lee proves Theorem 1.1 in this form, for a verifier implemented in a concrete machine model; surplus random bits may be ignored. [ABSSW26, Theorem 2.2] states $O(\log n)$ randomness. -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. +The theorem is due to Arora, Lund, Motwani, Sudan and Szegedy [ALMSS98], building on Arora and Safra [AS98]. In a field of size $2^t$, a field value takes $t$ bits, and the coefficient vector of a line polynomial of degree at most $d$ takes $(d+1)t$ bits. Counting either as one symbol, as the point-versus-line test of [ALMSS98] does, does not establish constant bit-query complexity, and binary encoding of whole coefficient vectors can need quasipolynomial proof length. The construction maps a line polynomial of degree below $b^c$ to one of total degree at most $c$ in $cb$ variables, $c$ fixed, and Hadamard-encodes single field values for one-bit queries, without PCP composition [ABSSW26, §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]. +If the low-degree tests reject rarely, four nearby polynomials have encodings close to the received tables; the analysis chooses them and the verifier never computes them. The other checks force them to encode a proper colouring, the difficulty being local correction at prescribed points. The construction and analysis are those of [ABSSW26]; Lee [Lee26] formalized them, added explicit constants and a weaker field-size hypothesis for the low-degree test over $F$, and identified the error in version 1 of [ABSSW26]. We contribute an explanation of the correction bound and the soundness argument with those constants. -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. +Sections 2 to 7 give notation, the encodings and the proof, testing, correction, soundness, resources and the converse. The [full argument](../long/reasoning-record.md) proves the testing results; the [worked exposition](../expository/main.md) gives examples. -## 2. Four polynomials and seven checks +## 2. Preliminaries -Let $F$ be a field of characteristic two, of cardinality $q$, containing a primitive cube root of unity $\omega$. Represent the three colours by +Throughout, $F$ is a field of characteristic two with $q=2^t$ elements and a primitive cube root of unity $\omega$. We write $\Delta$ for relative Hamming distance; $f$ is $\delta$-close to $g$ if $\Delta(f,g)\le\delta$. Probabilities are uniform on the indicated finite sets, rejection probabilities over a test's seed. For $u,v\in F^k$ the line through $u$ with slope $v$ is $z\mapsto u+zv$, with $v=0$ allowed, index $(u,v)$ and base point $u$. By the Schwartz–Zippel lemma [ABSSW26, Theorem 2.5], a nonzero polynomial of total degree at most $d$ vanishes on at most a fraction $d/q$ of $F^k$. + +The verifier tests three-colourability of a graph on $N$ vertices. Represent the colours by $$ \mathcal C=\{1,\omega,\omega^2\}. @@ -49,7 +49,7 @@ $$ 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. +Choose a nonempty grid $H^m\subseteq F^m$ with $|H|^m\ge N$, pad the graph with isolated vertices, and write $h=|H|$. Interpolation gives low-degree extensions [ABSSW26, Fact 2.4]: $P$ of the colouring, of degree at most $d_0=m(h-1)$, and $E$ of the adjacency function on $H^{2m}$, of degree at most $2d_0$, which the verifier computes. Set @@ -62,57 +62,38 @@ B_P(X,Y)&=E(X,Y)\bigl(Q_P(X,Y)^3-1\bigr). \tag{1} $$ -An honest colouring makes $A_P$ vanish on $H^m$ and $B_P$ vanish on $H^{2m}$. Conversely, these vanishing conditions recover a proper colouring: the first restricts every vertex to the three allowed values, and the second separates the values across each edge. Both are needed. For example, assigning the four elements of $\mathbb F_4$ to $K_4$ satisfies every edge equation, since every nonzero field element has cube one; the vertex assigned zero fails the vertex equation. The degree bounds in (1) are $d_0,3d_0,5d_0$. +These are the polynomials $\chi',\mathsf{Val},\mathsf{Prop}$ of [ABSSW26, §7], where $P$ and $E$ are written $\chi$ and $\widehat E$, and the vanishing certificates $M_A,M_B$ below are their $\mathcal M_{\mathsf{Val}},\mathcal M_{\mathsf{Prop}}$. -To certify vanishing on a grid, put $Z_H(T)=\prod_{u\in H}(T-u)$. Repeated monic division in the separate coordinates shows that a polynomial $A$ vanishes on $H^k$ precisely when [1, Lemma 2.9] +**Lemma 2.1 (colouring constraints).** The restriction $P|_{H^m}$ is a proper colouring of the padded graph exactly when $A_P|_{H^m}=0$ and $B_P|_{H^{2m}}=0$, and $Q_P,A_P,B_P$ have degrees at most $d_0,3d_0,5d_0$. -$$ -A(X)=\sum_{i=1}^{k} Z_H(X_i)U_i(X). -$$ +The first condition restricts vertex values to $\mathcal C$, the second separates values across edges. Both are needed: colouring $K_4$ by $\mathbb F_4$ satisfies every edge equation, as nonzero elements have cube one, but the vertex coloured zero fails. -The remainder has degree below $h$ in every variable; if it vanishes on the grid, interpolation makes it zero. Packing the quotients into +**Lemma 2.2 (Combinatorial Nullstellensatz; [ABSSW26, Lemma 2.9 and Corollary 2.10]).** Put $Z_H(T)=\prod_{u\in H}(T-u)$, applied coordinatewise. A polynomial $A$ vanishes on $H^k$ precisely when, for some polynomials $U_i$ each zero or of degree at most $\deg A-h$, $$ -M(X,Y)=\sum_iY_iU_i(X) +A(X)=\sum_{i=1}^{k} Z_H(X_i)U_i(X). $$ -gives the two polynomial identities +Equivalently, some polynomial $M(X,Y)$ of degree at most $\deg A$, a vanishing certificate, satisfies $$ 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 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 +*Proof.* Monic division by $Z_H$ in each coordinate leaves a remainder of degree below $h$ in every variable; if $A$ vanishes on the grid, so does the remainder, and interpolation makes it zero. Packing the quotients into $$ -h_{u,v}:F^{cb}\times\mathcal B_1\longrightarrow\mathbb F_2. +M(X,Y)=\sum_iY_iU_i(X) $$ -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. - +gives (2), and each $Y_iU_i$, hence $M$, has degree at most $\deg A$ because $h\ge1$. Conversely, (2) implies grid vanishing even when $M$ is nonlinear in $Y$, since $Z_H(X)=0$ on the grid. $\square$ + -## 3. Why two encodings are needed +## 3. Set-multilinear and Hadamard encodings -Fix positive integers $b,c$, and consider a univariate polynomial $T(Y)=\sum_{j -Fix a linear isomorphism $\rho:F\to\mathbb F_2^t$, where $q=2^t$. Let $\mathcal B_r$ be the binary vector space of squarefree Boolean polynomials in $t$ variables of degree at most $r$. For $r\ge1$, encode $u\in F$ by [1, Definitions 3.5–3.6] +Fix a linear isomorphism $\rho:F\to\mathbb F_2^t$. + +**Definition 3.2 (labels and Hadamard encoding; [ABSSW26, Definitions 3.5–3.6]).** A label is a multilinear polynomial over $\mathbb F_2$ in $Z_1,\dots,Z_t$ of degree at most $r$; labels form a vector space $\mathcal B_r$. Affine labels $\lambda_0+\lambda\cdot Z$ have degree at most one, constants included; homogeneous labels $\lambda\cdot Z$ have no constant term. For $r\ge1$, the degree-$r$ Hadamard encoding of $u\in F$ stores $R(\rho(u))$ at label $R$: $$ \mathcal H_r(u)(R)=R(\rho(u)),\qquad R\in\mathcal B_r. \tag{6} $$ -A label $R$ is an address within the row; the stored bit is $R(\rho(u))$. The label degree $r$ is independent of the degree of the field polynomial whose values are encoded. The word has $2^{\sum_{j=0}^{\min(r,t)}\binom tj}$ bits. Distinct field values disagree on exactly half its positions: adding a coordinate label on which the values differ pairs agreeing labels with disagreeing ones. The same argument applies to homogeneous linear labels $L:F\to\mathbb F_2$. Consequently, for field-valued functions $f,g$, +Any $w:\mathcal B_r\to\mathbb F_2$ is a word, and $\mathcal H_r(f)$ encodes each value of a function $f$; the label degree $r$ is independent of the degree of $f$. + +**Lemma 3.3 (half-distance identity; [ABSSW26, Observation 3.8]).** For field-valued functions $f,g$ on one finite point domain, $$ \Delta(\mathcal H_r(f),\mathcal H_r(g))=\tfrac12\Delta(f,g), \tag{7} $$ -where both distances use the same finite point domain. The encoded distance also averages over a label domain, which may be either all labels or homogeneous linear labels. Throughout, $\Delta$ and all probabilities are uniform finite averages over the indicated domains. +where the encoded distance averages over points and all labels, or homogeneous labels, as subscripts $\mathrm{full}$ and $\mathrm{hom}$ indicate. + +*Proof.* Adding a coordinate label $Z_i$ on which two distinct values differ pairs agreeing labels with disagreeing ones, and preserves homogeneous labels. $\square$ -Identify affine binary labels with maps $L:F\to\mathbb F_2$ through $\rho$. Higher-degree labels permit nonlinear field checks. Multiplication in $F$ is bilinear in binary coordinates. If $A\in F[Y]$ has degree at most $r$ and $L$ is such an affine label, squarefree reduction produces a label $\Lambda_{A,L}\in\mathcal B_r$ such that +Identify affine labels with maps $L:F\to\mathbb F_2$ through $\rho$. Multiplication in $F$ is bilinear in binary coordinates. For $A\in F[Y]$ of degree at most $r$ and an affine label $L$, reduction modulo $Z_i^2-Z_i$ gives a label $\Lambda_{A,L}\in\mathcal B_r$ satisfying $$ L(A(u))=\mathcal H_r(u)(\Lambda_{A,L}). \tag{8} $$ -Cubic labels suffice for the constraints in (1). To take a weighted sum of field values, the verifier uses homogeneous linear labels: their constant term is zero, so they preserve sums. The scalar multiple $\eta u$ is observed by relabelling $L$ as $L\circ(\eta\cdot)$; for $\eta\ne0$ this permutes the homogeneous labels. +Cubic labels suffice for (1). Homogeneous labels preserve sums, so the verifier uses them for weighted sums: $\eta u$ is observed through the label $L\circ(\eta\cdot)$, and for $\eta\ne0$ this permutes the homogeneous labels. -A corrupted word can be wrong at every label produced by a special substitution. For any requested label $Q$, use the two-query answer +**Lemma 3.4 (self-correction; [BLR93]).** Let $w$ be a word and $\Lambda\in\mathcal B_r$ a requested label. The self-corrected read is $$ -\operatorname{SC}_w(Q;R)=w(Q+R)-w(R), +\operatorname{SC}_w(\Lambda;R)=w(\Lambda+R)-w(R), \tag{9} $$ -where $R$ is a fresh uniform full label. If $w$ is $\epsilon$-close to a linear functional $\ell$ on labels, (9) differs from $\ell(Q)$ with probability at most $2\epsilon$, for every fixed $Q$: both read positions are individually uniform. Evaluation words are linear functionals on labels, so this observation will justify the derived cubic reads without any assumption that the relabelling in (8) preserves uniformity. - -The three label domains have different roles: +where $R$ is a fresh random label, uniform in $\mathcal B_r$. If $w$ is $\epsilon$-close to a linear functional $\varphi$ on labels, (9) differs from $\varphi(\Lambda)$ with probability at most $2\epsilon$ for every fixed $\Lambda$, since both read positions are uniform and $\varphi(\Lambda+R)-\varphi(R)=\varphi(\Lambda)$. -| Domain | Form of a label | Role in the proof | -| --- | --- | --- | -| Full $\mathcal B_r$ | Any squarefree polynomial of degree at most $r$ | Fresh masks for requested nonlinear observations; full-table proximity | -| Affine $\mathcal B_1$ | $\alpha+\lambda\cdot z$ | Row consistency bridges full-label decoding to the homogeneous restriction | -| Homogeneous linear | $\lambda\cdot z$ | Sum-preserving comparisons and the half-distance identity | +Encodings are linear on labels, so Lemma 3.4 applies to the possibly nonuniform labels of (8). -Full-label proximity does not by itself control the homogeneous restriction. The decoding result below supplies both bounds for the same field value or polynomial. +We call the distance of a word or table from an encoding its full-label or homogeneous error. For $r=1$ the homogeneous error is at most twice the full-label error. For $r>1$, a full-label distance bound alone gives no bound on the homogeneous error by a constant multiple independent of $t$. Lemmas 4.2 and 4.3 below supply both bounds for the same field value or polynomial. -## 4. What the low-degree tests supply + +**The proof.** The proof is the bit string the verifier queries; it consists of eight tables, which [ABSSW26, §7] call proof oracles. Four are points tables, honestly the degree-$r$ Hadamard encodings of polynomials: + +| Points table | Honest polynomial | Point domain | Label degree $r$ | +| :--------------- | :------------------------- | :--------------- | :----------------- | +| $f_P$ | $P$ | $F^m$ | $3$ | +| $f_Q$ | $Q_P$ | $F^{2m}$ | $3$ | +| $f_A$ | certificate $M_A$ of $A_P$ | $F^{2m}$ | $1$ | +| $f_B$ | certificate $M_B$ of $B_P$ | $F^{4m}$ | $1$ | + +An address is a point $x$ and a label $R\in\mathcal B_r$; an honest table stores $R(\rho(u))$ for the encoded value $u$. The lines table of $P$ on $F^k$ assigns to each index $(u,v)$ the restriction $z\mapsto P(u+zv)$; stored after both encodings, it gives each points table $f$ on $F^k$ a lines table $f'$ with entries + +$$ +f'_{u,v}:F^{cb}\times\mathcal B_1\longrightarrow\mathbb F_2. +$$ + +The argument $\xi\in F^{cb}$ of $\Psi(T)$ is the inner point, $\Phi(z)$ that for parameter $z$; honestly $f'_{u,v}(\xi,L)$ is the affine observation $L$ of $\Psi(T)(\xi)$. Received tables are arbitrary. The verifier accepts if seven checks with independent seeds pass: a low-degree test on each pair $(f,f')$ (Theorem 4.6), a zero-on-grid test for each certificate (Section 5), correcting through the same lines tables, and a consistency check (17). + + +## 4. Low-degree tests over the binary alphabet -The inner polynomial has constant degree $c$. Assume $q>2c$, take a generator $\zeta$ of the full group $F^\times$, and let +The standard low-degree test on the inner domain $F^{cb}$, with constant degree bound $c$, accepts when (10) holds at uniform $u,v$. + +**Lemma 4.1 (standard low-degree test; [ABSSW26, Fact 2.7 and Lemma 3.3]).** Assume $q>2c$, let $\zeta$ generate $F^\times$, and let $$ a_i=\zeta^i,\qquad @@ -196,31 +198,33 @@ a_i=\zeta^i,\qquad \quad(1\le i\le c+1). $$ -The nodes and weights are nonzero. Lagrange interpolation gives, for every degree-at-most-$c$ polynomial, +The nodes and weights are nonzero, and by Lagrange interpolation every polynomial $f$ on $F^{cb}$ of total degree at most $c$ satisfies $$ f(u)=\sum_{i=1}^{c+1}\eta_i f(u+a_iv). \tag{10} $$ -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 +Conversely, a function satisfying (10) for all $u,v$ is such a polynomial. If (10) fails on a fraction $\delta<1/[2(c+2)^2]$ of pairs $(u,v)$, then $f$ is $2\delta$-close to such a polynomial, and the plurality correction $g$ [KS08, Lemma 3.1], with $g(x)$ a most frequent value of $\sum_i\eta_i f(x+a_iv)$ over $v\in F^{cb}$, satisfies $$ \Pr_v\left[\sum_i\eta_i f(x+a_iv)\ne g(x)\right] \le2(c+1)\delta\quad\text{for every }x. $$ -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. +The [proof of Lemma 4.1](../long/reasoning-record.md#42-the-standard-low-degree-test) derives the pointwise estimate and shows that $g$ satisfies (10) exactly. As $\zeta$ generates $F^\times$, exact satisfaction gives line restrictions of degree at most $c$, and [FS95/13, Lemma 4] applies since in characteristic two $q>2c$ gives $q/2-1\ge c$. Earlier robust characterisations are [RS96, §4] and, for linear-invariant families, [KS08, Theorem 2.9]. Unit weights fail (Appendix A). + +*Remark (formalization).* [ABSSW26, Lemma 3.3] assumes $q$ larger than a constant multiple of $c^3$; Lee assumes only $q>2c$ and makes the constants explicit. -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. +**Lemma 4.2 (Hadamard test; [ABSSW26, Lemma 3.10]).** The Hadamard test on a word $w:\mathcal B_r\to\mathbb F_2$ combines the BLR linearity test [BLR93], a unit check at the constant label, product checks and affine consistency checks. For every $w$ there is one field value $u$, chosen in the analysis, such that $\mathcal H_r(u)$ has full-label and homogeneous error at most $28$ times the test's rejection probability. -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. +*Proof sketch.* For rejection probability $\epsilon<1/28$, the characteristic-two linearity estimate [BCHKS96, Theorem 1.2; ABSSW26, Theorem B.1] and the unit and product checks give $u$ with full-label error at most $\epsilon$. Affine consistency costs $\epsilon$ for the check and $2\epsilon$ for self-correction, so the affine error is at most $3\epsilon$ and the homogeneous error, on half that domain, at most $6\epsilon$. If $\epsilon\ge1/28$, any $u$ works since $1\le28\epsilon$. See the [complete proof](../long/reasoning-record.md#53-the-hadamard-test). $\square$ -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. +*Remark (formalization).* Lee's test keeps product checks at every degree from two to $r$, sharing reads, and makes at most $2r+4$ queries, ten for cubic labels; [ABSSW26, Lemma 3.10] checks only the top degree, with eight. The factor 28 is Lee's. -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 +**Lemma 4.3 (inner low-degree test; cf. [ABSSW26, Lemma 4.3]).** On a table $w:F^{cb}\times\mathcal B_r\to\mathbb F_2$, the inner low-degree test flips a fair coin between the Hadamard test on $w(\xi,\cdot)$ at a uniform inner point $\xi$ and a one-bit observation of the standard low-degree test, (10) read through a uniform homogeneous label at uniform $u,v$. If $q>2c$ and the test rejects with probability $\kappa$, some polynomial $U$ of total degree at most $c$ satisfies $$ \Delta_{\rm full}(w,\mathcal H_r(U)),\quad @@ -229,21 +233,35 @@ $$ \tag{11} $$ -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. +*Proof sketch.* Each branch rejects with probability at most $2\kappa$, and Lemmas 4.2, 4.1 and 3.3 give (11). No small-rejection hypothesis is needed: outside the small-error regime of Lemma 4.1 the trivial bound suffices. See the [complete proof](../long/reasoning-record.md#54-the-inner-low-degree-test). $\square$ -The outer test has a primary table $f(x,R)$ and an auxiliary row $h_{u,v}$ for each oriented line $u+Yv$. Choose uniform $u,v,z$ (including $z=0$), a uniform homogeneous label $L$, an inner correction direction, and independent tester seeds. Require all three checks to pass: +**Lemma 4.4 (standard local correction; cf. [ABSSW26, Lemma 3.4]).** At a prescribed inner point $\xi$, the standard local corrector for $w:F^{cb}\times\mathcal B_1\to\mathbb F_2$ samples a uniform direction $v$, possibly zero, and homogeneous label $L$, and returns $\sum_i w(\xi+a_iv,L\circ(\eta_i\cdot))$, with no separate query at $\xi$. If $w$ has homogeneous distance $\tau$ from the encoding of $U$ of total degree at most $c$, the answer differs from $L(U(\xi))$ with probability at most $(c+1)\tau$. -1. The Hadamard test on the primary row $f(u,\cdot)$. -2. The inner binary polynomial test on $h_{u,v}$. -3. Equality between $f(u+zv,L)$ and the inner correction of that same row $h_{u,v}$ at $\Phi(z)$ with label $L$. +*Proof.* As $a_i,\eta_i\ne0$, each queried point and each label $L\circ(\eta_i\cdot)$ is uniform, although $\xi$ is prescribed. Correct reads sum to $L(U(\xi))$ by (10); take a union bound. $\square$ -The auxiliary row in the second and third checks belongs to the same sampled pair $(u,v)$. +**Theorem 4.5 (point-versus-line test; [ALMSS98, Theorem 45]).** Suppose -The inner corrector uses (10) without a separate query at its centre (the sampled direction may be zero). At a prescribed inner point $a$, it sums the $c+1$ weighted observations at $a+a_iv$. For a received row of homogeneous error $\tau$, its wrong-answer probability is at most $(c+1)\tau$, averaged over the uniform direction and homogeneous label. Each point and weighted label is uniform, even though the requested centre need not be. This is why a direct query at $\Phi(z)$ can be replaced safely. +$$ +q\ge10^6D^3,\qquad \theta\le\frac1{4\cdot10^6}, +$$ -Suppose the outer test rejects with probability $\kappa$. By the primary Hadamard bound, choose one field function $g$ with both binary errors at most $28\kappa$. Decode each auxiliary row using (11) and substitute (3) to obtain a line polynomial $T_{u,v}$ of degree at most $D=cb^c$. Replacing the corrected auxiliary answer costs at most $(c+1)K\kappa$, the tested comparison fails on at most $\kappa$, and replacing the primary answer costs at most $28\kappa$. The half-distance identity (7) therefore gives +and arbitrary degree-at-most-$D$ line polynomials, one for each line index, 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$. + +Here $z\in F$, slopes may be zero, and different indices of one line may carry inconsistent polynomials. The test is also called the line-point test [ABSSW26, §1]. The [bivariate argument](../long/reasoning-record.md#45-bivariate-agreement) follows [AS98, §5.2] and [ALMSS98, Appendix A]; the [point-versus-line proof](../long/reasoning-record.md#46-the-point-versus-line-test) gives the constants. + +*Remark (formalization).* The constants are Lee's. [ABSSW26, Theorem 2.12] samples nonzero parameters and concludes $4\theta$-closeness. + +The binary low-degree test on $f$ and its lines table $f'$ samples uniform $u,v\in F^k$, $z\in F$ (including $z=0$), a homogeneous label $L$, a corrector direction and independent inner-test seeds, and accepts if: + +1. the Hadamard test accepts the word $f(u,\cdot)$; +2. the inner low-degree test accepts $f'_{u,v}$; +3. $f(u+zv,L)$ equals the standard local correction of the same entry $f'_{u,v}$ at $\Phi(z)$ with label $L$. + +**Theorem 4.6 (binary low-degree test; [ABSSW26, Theorem 4.1]).** Let $D=cb^c$ and $q\ge10^6D^3$, and with $K$ as in (11) put $J=2((c+1)K+29)$ and $S=28+J$. If this test rejects $(f,f')$ with probability $\kappa$ and $J\kappa\le1/(4\cdot10^6)$, then some polynomial $P$ of total degree at most $D$ has $\Delta_{\rm full}(f,\mathcal H_r(P))\le S\kappa$ and $\Delta_{\rm hom}(f,\mathcal H_r(P))\le S\kappa$. + +*Proof.* Lemma 4.2 on each word $f(x,\cdot)$ gives a function $g$ whose encoding has full-label and homogeneous error at most $28\kappa$. Lemma 4.3 and (5) give each entry $f'_{u,v}$ a line polynomial $T_{u,v}$ of degree at most $D$. Replacing the corrected answer in check 3 by $L(T_{u,v}(z))$ costs at most $(c+1)K\kappa$ by Lemma 4.4, the comparison fails with probability at most $\kappa$, and replacing $f(u+zv,L)$ by $L(g(u+zv))$ costs at most $28\kappa$. Hence $$ \Pr_{u,v,z}[T_{u,v}(z)\ne g(u+zv)] @@ -252,19 +270,7 @@ $$ \tag{12} $$ -The factor two is exactly (7). No polynomial consistency among different auxiliary rows has been assumed. - -We import the following point-versus-line contract. Suppose - -$$ -q\ge10^6D^3,\qquad \theta\le\frac1{4\cdot10^6}, -$$ - -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 +The factor two is exactly (7). No consistency among different entries has been assumed. Theorem 4.5 with $\theta=J\kappa$ gives $P$ with $\Delta(g,P)\le2J\kappa$, and encoding by (7) yields $$ \Delta_{\rm full}(f,\mathcal H_r(P)),\quad @@ -274,52 +280,52 @@ $$ \tag{13} $$ -provided $J\kappa\le1/(4\cdot10^6)$. The restricted conclusion is for homogeneous linear labels. The stronger affine-label conclusion stated for the corresponding tester in [1] is not needed here. For a certificate whose full label domain is already degree one, the first bound in (13) also controls its affine labels. +which proves the theorem. $\square$ + +*Remark (formalization).* The restricted bound concerns homogeneous linear labels. For its own tester, [ABSSW26, Theorem 4.1] bounds the distance on all affine labels; restricting such a bound to homogeneous labels can double it, and it is not needed here. For a certificate, whose full domain is $\mathcal B_1$, the full-label bound also controls affine labels. Lee's lines tables all use affine labels; [ABSSW26, §7] uses cubic labels on those of $P$ and $Q_P$. -## 5. Correcting the nonuniform certificate queries +## 5. Local correction and the zero-on-grid test -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. +The points $(x,0)$ and $(x,Z_H(x))$ of (2) lie in prescribed subsets, where a table close on average can be wrong everywhere. The binary low-degree test need not control entries with a prescribed base point, so the local corrector retests its entry. -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. +At a target $a$, the local corrector for $(f,f')$ samples independent uniform homogeneous label $L$, slope $v$, $z\in F^\times$, corrector direction and inner-test seed. It tests $f'_{a,v}$, corrects it at $\Phi(z)$ and compares with $f(a+zv,L)$, rejecting if either fails, and otherwise returns the correction at $\Phi(0)$ with the same direction and label. It reads at most $3c+9$ bits; exact encodings of $P$ of degree below $b^c$ give $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 +**Theorem 5.1 (local correction at a prescribed point; cf. [ABSSW26, Theorem 5.1]).** Let $q>2c$, let $P$ have total degree at most $D\ge cb^c$ with $\Delta_{\rm hom}(f,\mathcal H_1(P))\le\delta$, and let $f'$ be arbitrary. If the local corrector rejects at $a$ with probability $\kappa_a$, the probability over all its randomness, $L$ included, of rejection or a returned bit other than $L(P(a))$ satisfies $$ \Pr[\text{failure at }a] -\le C R_a+\delta+\frac{D}{2(q-1)}, +\le C \kappa_a+\delta+\frac{D}{2(q-1)}, \qquad C=2+2(c+1)K. \tag{14} $$ -Decode each auxiliary row by (11), and let $T_v$ be its decoded line polynomial. Inner-test failure forces rejection, so the average decoding error is at most $KR_a$. Put $e=(c+1)KR_a$; each corrected auxiliary answer can be replaced by $L(T_v(\cdot))$ at cost at most $e$. +*Proof* (see the [full proof](../long/reasoning-record.md#56-local-correction-with-a-lines-table)). Lemma 4.3 and (5) give each $f'_{a,v}$ a line polynomial $T_{a,v}$ of degree at most $D$. Inner-test failure implies rejection, so the mean homogeneous error of the nearby polynomials is at most $K\kappa_a$; with $e=(c+1)K\kappa_a$, Lemma 4.4 replaces each correction by $L(T_{a,v}(\cdot))$ at cost at most $e$. -If $T_v(0)\ne P(a)$, the difference $T_v(Y)-P(a+Yv)$ is a nonzero polynomial of degree at most $D$. Among the $q-1$ nonzero parameters it has at most $D$ roots. Applying the half-distance identity gives +If $T_{a,v}(0)\ne P(a)$, the difference $T_{a,v}(Y)-P(a+Yv)$ is a nonzero polynomial of degree at most $D$. Among the $q-1$ nonzero parameters it has at most $D$ roots. Applying Lemma 3.3 gives $$ -\Pr_{v,L}[L(T_v(0))\ne L(P(a))] -\le \Pr_{v,z,L}[L(T_v(z))\ne L(P(a+zv))] +\Pr_{v,L}[L(T_{a,v}(0))\ne L(P(a))] +\le \Pr_{v,z,L}[L(T_{a,v}(z))\ne L(P(a+zv))] +\frac{D}{2(q-1)}. $$ -At the sampled point, replacing the auxiliary correction, using the tested comparison, and replacing the primary bit cost at most $e$, $R_a$ and $\delta$. The last bound holds because $a+zv$ is uniform for each nonzero $z$. At the origin, replacing the decoded bit by the actual correction costs another $e$; including rejection costs another $R_a$. The total is $2e+2R_a+\delta+D/[2(q-1)]$, which is (14). +At the sampled point, replacing the correction, using the tested comparison and replacing the bit of $f$ cost at most $e$, $\kappa_a$ and $\delta$, the last as $a+zv$ is uniform for each nonzero $z$. At the origin, replacing $L(T_{a,v}(0))$ by the actual correction costs another $e$, and including rejection another $\kappa_a$. The total $2e+2\kappa_a+\delta+D/[2(q-1)]$ is (14). $\square$ -This statement allows an arbitrary auxiliary table. Such a table may cause frequent rejection; (14) says that a corrector which seldom rejects cannot often return the wrong bit. It holds at every target, averaged over the random homogeneous label, and is therefore usable at the nonuniform targets in (2). The [full correction proof](../long/reasoning-record.md#correcting-an-outer-value-at-a-prescribed-point) makes these quantifiers explicit. +Bound (14) holds at every target $a$, so it applies at the certificate points in (2). -Now suppose $A$ and a proposed certificate $M$ have degree at most $D$, but $A$ fails to vanish on $H^k$. At least one residual in (2) is a nonzero polynomial; after substituting $Z_H$, its degree is at most $Dh$. The polynomial root bound shows that a uniform $x$ violates at least one field identity with probability at least $1-Dh/q$. A random homogeneous label detects a nonzero residual with probability $1/2$, so the ideal binary check rejects with probability at least +**Lemma 5.2 (zero-on-grid test; cf. [ABSSW26, Theorem 6.1]).** The zero-on-grid test checks (2) on tables of $A$ and a certificate. It samples uniform $x,L$, reads the bit $a_{\rm bit}$ of $A$'s table at $(x,L)$ and, with the same $x,L$ and independent seeds, gets $b_0,b_Z$ or rejection from the certificate's local corrector at $(x,0)$ and $(x,Z_H(x))$; it accepts exactly when neither rejects, $b_0=0$ and $b_Z=a_{\rm bit}$. Under the hypotheses of Theorem 5.1, let $A$ and a proposed certificate $M$ have degree at most $D$, with tables at homogeneous distances $\delta_A,\delta_M$ from their encodings. If $A$ does not vanish on $H^k$ and the test rejects with probability $\kappa$, then (15) holds. + +*Proof.* By Lemma 2.2, $M(X,0)$ or $M(X,Z_H(X))-A(X)$ is a nonzero polynomial, of degree at most $Dh$, so by the Schwartz–Zippel lemma a uniform $x$ violates the corresponding identity with probability at least $1-Dh/q$. A uniform homogeneous label detects a nonzero residual with probability $1/2$, so the ideal test, reading exact encodings of $A$ and $M$, rejects with probability at least $$ \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 +This needs one nonzero residual and no independence between detections. Each correction's rejection event lies in the test's, which bounds its rejection averaged over requested targets; it need not bound rejection at each fixed target. Coupling the ideal and actual tests and using (14) twice gives $$ \frac{1-Dh/q}{2} @@ -327,9 +333,9 @@ $$ \tag{15} $$ -Thus small observed rejection forces the decoded polynomial to vanish on the grid, once the error terms are below the left side. +$\square$ -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$: +The proof stores no tables for $A_P,B_P$: $a_{\rm bit}$ is a self-corrected read (9) of $f_P$ or $f_Q$ at the label given by (8). If $\epsilon_x$ is that word's full-label error at $x$, replacing this read costs at most $2\epsilon_x$ for every requested label (Lemma 3.4), so for uniform $x$ at most $2\mathbb E_x\epsilon_x\le2\epsilon$, the full-table bound from (13). Coupling to exact answers for $a_{\rm bit}$, keeping the certificate calls and all other randomness, gives $\delta_A=0$ and rejection probability at most $\kappa+2\epsilon$. Applying (15) gives $$ \frac{1-Dh/q}{2} @@ -337,22 +343,36 @@ $$ \tag{16} $$ -The factor $1+2C$ multiplies the derived-read error because that error enters through rejection. The argument averages over the actual fresh randomness; it does not select a favourable fixed mask and treat it as a deterministic oracle. See the [full ZERO analysis](../long/reasoning-record.md#checking-that-a-polynomial-vanishes-on-a-grid). +The coefficient $1+2C$ multiplies the self-correction error because it enters through rejection, and the averaging includes the fresh label $R$ of (9); see the [full analysis](../long/reasoning-record.md#57-the-zero-on-grid-test). -## 6. One decoding for all seven checks +## 6. Soundness of the verifier -For the eight arbitrary tables introduced in Section 2, the received-bit difference check is +The difference check samples independent uniform points $x,y$ and a uniform homogeneous label $L$, and tests $$ f_Q((x,y),L)=f_P(x,L)+f_P(y,L). \tag{17} $$ -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. +The constants $J,S,C$ depend only on the fixed $c$. Set -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 +$$ +\begin{aligned} +T_c&=(1+2C)(1+2S)+2S,\\ +g_c&=\min\left\{ +\frac1{4\cdot10^6(J+1)},\, +\frac1{16(1+3S)},\, +\frac1{16(T_c+1)} +\right\}. +\end{aligned} +\tag{20} +$$ + +**Theorem 6.1 (soundness).** Let $D=cb^c$, $q\ge10^6D^3$, $q\ge100Dh$ and $m(h-1)\le D$. Every proof for a graph that is not three-colourable is rejected with probability at least $g_c$. + +*Proof.* Let a fixed proof be rejected with probability $\kappa ## 7. Resources, implementation and the reverse inclusion -Take $c=4$. For a graph on $N$ vertices, let $a\ge2$ be least with $\lceil\log_2N\rceil\le a2^a$, with natural-number ceiling log equal to zero at $N=0,1$. Set +Take $c=4$. For a graph on $N$ vertices, let $\nu\ge2$ be least with $\lceil\log_2N\rceil\le \nu2^\nu$, with natural-number ceiling log equal to zero at $N=0,1$. Set $$ -s=2^a,\qquad m=b=h=s,\qquad -t=12a+32,\qquad q=2^t=2^{32}s^{12}. +s=2^\nu,\qquad m=b=h=s,\qquad +t=12\nu+32,\qquad q=2^t=2^{32}s^{12}. \tag{21} $$ -The grid contains $s^s=2^{a2^a}\ge N$ points. Also $D=4s^4$ and +The grid contains $s^s=2^{\nu2^\nu}\ge N$ points. Also $D=4s^4$ and $$ 10^6D^3=64\cdot10^6s^{12}\le q, \qquad100Dh\le q. $$ -Since $s\ge4$, the honest degrees satisfy $5s(s-1) -The operations behind these queries are polynomial-time computations. The formal implementation constructs the field through a computed irreducible polynomial and obtains generators and cube roots by bounded search. These searches are polynomial in $q$, which is polynomially bounded in the input length. The public adjacency extension, label substitutions, seed codecs and packed proof addresses are computed explicitly. The program producing the queries and verdict is compiled into Mathlib's finite multi-stack machine model with a polynomial cost bound; constant query complexity alone would not establish this runtime statement. +*Remark (formalization).* Lee's implementation finds the field, generators and cube roots by bounded search in time polynomial in $q$, hence in the input length, and compiles the verifier into Mathlib's finite multi-stack machine model with a polynomial cost bound. -For a fixed NP language, a bounded accepting computation tableau gives a finite constraint system of fixed arity. One-hot coding, Boolean clauses and three-colouring gadgets yield an executable polynomial-time reduction to a graph of polynomial encoded size. Composing this reduction with the amplified verifier preserves constant queries and polynomial proof length. If the reduction has output bound $p(n)$, then +For a fixed NP language, a bounded accepting computation tableau gives a finite constraint system of fixed arity; one-hot coding, Boolean clauses and three-colouring gadgets reduce it in polynomial time to a graph of polynomial size, and composing with the amplified verifier preserves constant queries and polynomial proof length. Writing $p_f\in\mathbb N[X]$ for an output-length bound of this reduction, $$ -\lceil\log_2(p(n)+2)\rceil -\le (\deg p)\lceil\log_2(n+2)\rceil -+\lceil\log_2(p(1)+2)\rceil. +\lceil\log_2(p_f(n)+2)\rceil +\le (\deg p_f)\lceil\log_2(n+2)\rceil ++\lceil\log_2(p_f(1)+2)\rceil. $$ -Padding the random string to the resulting fixed canonical length preserves its prefix distribution. This gives the exact quantifier order and randomness format in the theorem. The long record separates the [machine implementation](../long/reasoning-record.md#the-polynomial-time-implementation), [graph reduction](../long/reasoning-record.md#from-every-np-verifier-to-a-graph), and [transport of the resource bounds](../long/reasoning-record.md#transporting-the-verifier-through-the-reduction). +Padding the random string to the resulting fixed length preserves its prefix distribution and gives the exact randomness formula. See the full argument on [machine implementation](../long/reasoning-record.md#39-the-polynomial-time-implementation), [graph reduction](../long/reasoning-record.md#310-the-reduction-from-np-to-three-colourability) and [transport](../long/reasoning-record.md#311-transport-through-the-reduction). -For the converse, guess the first $p(n)$ proof bits and simulate the verifier on every random string. There are at most $2^b(2(n+2))^a$ such strings, and each simulation takes polynomial time. Perfect completeness gives a prefix for which every run accepts. If a prefix were accepted for a no-instance, its zero extension would be a fixed proof with acceptance probability one, contradicting soundness. Thus this finite witness relation is an NP relation, completing the equality in the theorem. +For the converse, take the verifier and bounds $p,\alpha,\beta$ of Theorem 1.1, guess the first $p(n)$ proof bits and simulate the verifier, in polynomial time, on each of the at most $2^\beta(2(n+2))^\alpha$ random strings. Perfect completeness gives a prefix accepted on every run. If such a prefix existed for a no-instance, its zero extension would have acceptance probability one, contradicting soundness. The resulting witness relation is decidable in polynomial time, so the language lies in NP. -## Formal correspondence and credits +## Formalization and sources -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. +Lee proved the [forward PCP theorem][lean-forward] and the [reverse inclusion][lean-reverse] in Lean for a concrete finite-machine model, and explicit simulations identify its witness class with [the NP class in the unchanged vendored ComplexityLib][lean-reference-np]. The quantitative bounds of Sections 4 to 6 follow his [encoded-line low-degree theorem][lean-line] (Theorem 4.6), [local-correction guarantee][lean-correction] (Theorem 5.1) and [three-colouring soundness proof][lean-assembly] (Theorem 6.1). The [source and verification account](../long/reasoning-record.md#6-formalization-and-sources) records the source revision and validation evidence. + +Besides the formalization remarks, Lee's verifier differs from [ABSSW26, §7] as follows: the inner low-degree test flips a fair coin, the binary low-degree test samples $z$ from all of $F$, and the two corrector calls in each zero-on-grid test use independent seeds. -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. +The construction of [ABSSW26] combines its authors' set-multilinear form of inverse-Kronecker degree reduction with the established low-degree Hadamard encoding [ABSSW26, §1]. The formal proof is due to Troy Lee, whom version 2 of [ABSSW26] credits with identifying the version-1 error. No new PCP theorem is claimed; the prose proofs and Appendix A were not checked in Lean. -## Appendix A. Why the corrected weighted test matters +## Appendix A. The version-1 low-degree test -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, +Lemma 4.1 uses Lagrange weights and a generator of $F^\times$ [ABSSW26, Fact 2.7 and Lemma 3.3]. The version-1 test, with unit weights [ABSSW26v1, Fact 2.7 and Lemma 3.3], fails over arbitrarily large fields. For target degree two, take $q=2^{2k}$ with $k\ge2$, an element $\omega$ of order three and, in dimension $m\ge1$, $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. +for every $u,v$. 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$. Enlarging the field cannot repair the version-1 test. This counterexample concerns only that test. ## 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 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). -5. Troy Lee. *Formalization of the PCP theorem*. [Source and mathematical guide](https://github.com/troyjlee/tcs-formalizations/tree/a0ce13ed0fa264f051c1278e039596ce65557fa4/docs/pcp). -6. Mihir Bellare, Don Coppersmith, Johan Håstad, Marcos Kiwi and Madhu Sudan. *Linearity Testing in Characteristic Two*. IEEE Transactions on Information Theory **42**(6), 1781–1795, 1996. [Author-hosted manuscript](https://www.csc.kth.se/tcs/projects/publications/bchks.pdf), Theorem 1.2. -7. Ronitt Rubinfeld and Madhu Sudan. *Robust Characterizations of Polynomials with Applications to Program Testing*. SIAM Journal on Computing **25**(2), 252–271, 1996. [Prepublication manuscript](https://www.cs.princeton.edu/courses/archive/spring04/cos598B/bib/RubinfeldS.pdf), §4, Theorem 5; cited as Theorem 4.1 of the published paper in [1, §3.2]. -8. Tali Kaufman and Madhu Sudan. *Algebraic Property Testing: The Role of Invariance*. STOC 2008, 403–412. [Conference manuscript](https://people.csail.mit.edu/madhu/papers/2007/apt-conf.pdf), Theorem 2.9. -9. Katalin Friedl and Madhu Sudan. *Some Improvements to Total Degree Tests*. Proceedings of the Third Israel Symposium on Theory of Computing and Systems, 1995. [Corrected manuscript, arXiv:1307.3975v1](https://arxiv.org/abs/1307.3975v1), Lemma 4. +**[ABSSW26]** 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. + +**[ABSSW26v1]** Version 1 of [ABSSW26]: [arXiv:2608.17429v1](https://arxiv.org/abs/2608.17429v1). + +**[ALMSS98]** 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). + +**[AS98]** 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). + +**[BCHKS96]** Mihir Bellare, Don Coppersmith, Johan Håstad, Marcos Kiwi and Madhu Sudan. *Linearity Testing in Characteristic Two*. IEEE Transactions on Information Theory **42**(6), 1781–1795, 1996. [Author-hosted manuscript](https://www.csc.kth.se/tcs/projects/publications/bchks.pdf). + +**[BLR93]** 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). + +**[FS95/13]** Katalin Friedl and Madhu Sudan. *Some Improvements to Total Degree Tests*. ISTCS 1995. [Corrected manuscript, arXiv:1307.3975v1](https://arxiv.org/abs/1307.3975v1), 2013. + +**[KS08]** Tali Kaufman and Madhu Sudan. *Algebraic Property Testing: The Role of Invariance*. STOC 2008, 403–412. [Conference manuscript](https://people.csail.mit.edu/madhu/papers/2007/apt-conf.pdf). + +**[Lee26]** Troy Lee. *Formalization of the PCP theorem*. 2026. [Source and mathematical guide](https://github.com/troyjlee/tcs-formalizations/tree/a0ce13ed0fa264f051c1278e039596ce65557fa4/docs/pcp). + +**[RS96]** Ronitt Rubinfeld and Madhu Sudan. *Robust Characterizations of Polynomials with Applications to Program Testing*. SIAM Journal on Computing **25**(2), 252–271, 1996. [Prepublication manuscript](https://www.cs.princeton.edu/courses/archive/spring04/cos598B/bib/RubinfeldS.pdf). [lean-forward]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/Theorem.lean#L24-L35 [lean-reverse]: https://github.com/troyjlee/tcs-formalizations/blob/a0ce13ed0fa264f051c1278e039596ce65557fa4/PCP/ReverseConcrete.lean#L33-L39 diff --git a/tests/journey.py b/tests/journey.py index 232b90f..6af4091 100644 --- a/tests/journey.py +++ b/tests/journey.py @@ -1353,7 +1353,7 @@ def check_columns() -> None: page.wait_for_url(f"{specialist}*") page.locator(".sheet__text h1").wait_for() check_columns() - section = "2-the-corrected-short-low-degree-test" + section = "42-the-standard-low-degree-test" link = page.locator(f'.sheet__text a[href="./#/pcp-full-argument/@{section}"]') # Clicking can scroll the link into view. Measure the origin at the click itself. link.evaluate("el => el.addEventListener('click', () => { window.companionSourceTop = el.closest('[data-paper-pane]').scrollTop; }, { once: true })") @@ -1363,11 +1363,12 @@ def check_columns() -> None: def at_heading() -> bool: if not page.url.startswith(full): return False - box = page.locator(".sheet__text #s-2").bounding_box(timeout=500) if page.locator(".sheet__text #s-2").count() else None + heading = page.locator('.sheet__text [id="s-4.2"]') + box = heading.bounding_box(timeout=500) if heading.count() else None pane = page.locator("[data-paper-pane]").bounding_box() return box is not None and pane is not None and pane["y"] <= box["y"] < pane["y"] + 150 - wait_until(page, at_heading, "the anchored companion opens at the corrected short low-degree test") + wait_until(page, at_heading, "the anchored companion opens at the standard low-degree test") page.go_back() page.wait_for_url(f"{specialist}*") page.locator(".sheet__text h1").wait_for() @@ -1423,14 +1424,14 @@ def at_heading() -> bool: 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 = page.locator('.sheet__text a[href="./#/pcp-full-argument/@45-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 + (box := page.locator('.sheet__text [id="s-4.5"]').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") @@ -1444,15 +1445,15 @@ def at_heading() -> bool: 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.goto(f"{url}#/pcp-exposition", 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() + items.filter(has_text="The standard low-degree test and local correction").click() + items.filter(has_text="The one-edge vanishing certificate in bits").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") + check("The standard low-degree test and local correction" 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"],