Reading library Constant-query verification by algebraic encoding

Auto select follows the paper as you scroll. Hover over a marked phrase to preview its Lean and see how the two compare. Click a phrase to keep it selected in Manual.

Checking a long proof by reading a few bits

An algebraic proof of the PCP theorem, through worked examples

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

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)kC(n+1)^k for fixed constants C,kC,k, where nn 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; the specialist paper is a shorter account.

1. Sampling the edges of a colouring

Consider the complete graph on four vertices, K4K_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 (red,red,green,blue)({\rm red},{\rm red},{\rm green},{\rm blue}). Exactly one edge has equal colours at its ends, so sampling one edge uniformly catches this failure with probability 1/61/6.

Now add tt disjoint triangles, each properly coloured. The graph is still not three-colourable, because it still contains K4K_4, but the displayed assignment has only one bad edge among 6+3t6+3t edges. Uniform edge sampling rejects with probability

16+3t.\frac{1}{6+3t}.

Three added triangles reduce this probability to 1/151/15. For any fixed number of uniform edge samples, the probability of finding the bad edge tends to zero as tt grows.

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 K4K_4 is impossible.