Expanders, Codes and Property Testing

Made from the LaTeX source on 2026-11-19; chapter, section, statement and exercise numbers are those of the PDF.

Lecture notes for a full-year graduate seminar of twenty-four meetings, written for students who know some expander graphs and want to see what expansion — of graphs, and of high-dimensional complexes — has done for error-correcting codes and property testing: from Gallager's parity checks and the Sipser–Spielman expander codes, through property testing and Dinur's PCP theorem, to cosystolic expansion, the good locally testable codes of 2022, good quantum LDPC codes, the good quantum locally testable codes of 2026, and the quantum PCP question.

the combinatorial face the coding face the testing face
A graph or complex whose small sets have large boundary: spectral gap, vertex expansion, coboundary and cosystolic expansion. A linear code whose bits sit on edges, squares or faces, with constraints at vertices; distance is a statement about small sets. A local test that reads a few bits and rejects in proportion to the distance from the code; soundness is a statement about small coboundaries.

How to use these notes

Fourteen chapters, twenty-four meetings. Each chapter has a stated goal, the mathematics with proofs where they are short and honest outlines where they are not, a few Try it exercises with folded answers, and the sources for that chapter. A meeting is one talk of about ninety minutes. The first semester has thirteen weeks and holds the twelve meetings of Parts A–D (§1–§9), so one week is spare in case the pace slips; the second semester has twelve weeks and holds the twelve meetings of Part E (§10–§14). Six chapters take one meeting each, six take two and two take three. The longer chapters carry the most material, or the most that is new to a mathematician: §4 (property testing, then locally testable codes), §5 (the language of complexity theory, then Dinur's proof), §7 (cosystolic expansion as testing, then a proof), §10 (quantum mechanics and stabilizer codes, then chain complexes), §11 (the quantum Tanner code, then its distance), §12 (the small-set lemma, then the codes), §13 (quantum LTCs and why they are hard, then the spectral route, then the lossless route) and §14 (the physics and complexity background, then quantum PCP and NLTS, then qLTCs, games and open problems). In a chapter of several meetings the goal names each meeting, and a Week box marks where each later one starts and recaps what came before.

For mathematicians. The audience is assumed to know some expander graphs, not computer science or physics; buildings and Ramanujan complexes appear only as sources of examples, and the facts used about them are quoted with references. Wherever a chapter needs a notion from complexity theory (polynomial time, NP, reductions, PCPs) or from physics (Hamiltonians, ground states, entanglement), the chapter defines it and says why people in that field care about it: §5.1–§5.3 for complexity, §10.1 for quantum mechanics, §14.1–§14.3 for Hamiltonians and quantum complexity.

The chapters come in five parts:

week chapter topic
Semester 1 (thirteen weeks): Parts A–D
1 §1 Codes and expanders (skim §1.2–§1.3 if the audience knows them)
2 §2 LDPC codes and examples; Gallager's theorem that random ones are good; Tanner codes and their rate
3 §3 Sipser–Spielman's two routes: lossless expanders and the flip decoder, then Tanner codes on spectral expanders
4 §4 Property testing: local testability, BLR proved twice, testing homomorphisms of finite groups; stability (§4.1–§4.4)
5 §4 Locally testable codes, the obstruction for expander codes, tensor codes and robustness; the Polishchuk–Spielman theorem and its tightness (§4.5–§4.7)
6 §5 Complexity for mathematicians: NP, reductions, gap problems, PCPs; Dinur's theorem and plan (§5.1–§5.4)
7 §5 Dinur's proof: the four steps and the amplification lemma; LTCs and PCPs (§5.5–§5.9)
8 §6 Cochains, coboundary expansion, testability as expansion
9 §7 Cosystolic expansion as property testing; the theorems of KKL and Evra–Kaufman (§7.1–§7.4)
10 §7 Proof of the first case: local minimality and small-set expansion; what Evra–Kaufman add (§7.5–§7.8)
11 §8 Left-right Cayley complexes and their codes
12 §9 Local testability of the square-complex codes
— — Spare week, in case the pace slips
Semester 2 (twelve weeks): Part E
13 §10 Quantum mechanics for mathematicians; the Pauli group; stabilizer and CSS codes (§10.1–§10.3)
14 §10 CSS codes as chain complexes; the toric code as a code and as a Hamiltonian; the \sqrt n barrier (§10.4–§10.6)
15 §11 The quantum Tanner code: the quadripartite complex, commutation, rate, two Tanner codes on one edge set (§11.1–§11.2)
16 §11 Product expansion and the distance theorem; the lifted product; since 2022 (§11.3–§11.5)
17 §12 The lossless route: balanced products, lossless expansion, the small-set lemma (§12.1–§12.3)
18 §12 The Lin–Hsieh codes: a c^3-LTC and good qLDPC codes with a linear-time decoder; the two routes compared (§12.4–§12.6)
19 §13 Quantum LTCs: the definition, the CSS case, why they are hard (§13.1–§13.2)
20 §13 Quantum LTCs by the spectral route, from Dinur–Lin–Vidick to the good qLTCs of 2026 (§13.3–§13.5)
21 §13 Quantum LTCs by the lossless route (Cohen–Leigh–Reiner–Ta-Shma–Tzalik); the two routes compared; what is open (§13.6–§13.8)
22 §14 Hamiltonians and ground states; QMA and Kitaev's theorem (§14.1–§14.2)
23 §14 The quantum PCP conjecture and its obstacles; NLTS (§14.3–§14.4)
24 §14 qLTCs and quantum PCP; the games version; the year in one table and open problems (§14.5–§14.7)

The one storyline. §3 shows that expansion gives codes with linear distance. §4 shows that such codes are, in general, not locally testable: graph expansion says nothing about how a far-from-the-code word looks locally. §5 shows what testability buys in complexity theory, the PCP theorem, and that Dinur's proof of it is again an expansion argument. §6 shows that local testability is itself an expansion property — of a complex one dimension up. §7–§9 build complexes with that property and obtain the codes. §10–§11 do the same for quantum codes. §12 shows that the unique-neighbour argument of §3, run on a two-dimensional complex, gives both results again. §13–§14 are about quantum testability, where good codes appeared in September 2026 and the quantum PCP conjecture is still open.

Assumed. Linear algebra over finite fields; spectral graph theory (adjacency operators, the spectral gap, Ramanujan graphs); simplicial complexes and their links. No coding theory, complexity theory, physics or quantum information is assumed: what is needed is built in §1, §4, §5, §10 and §14. §1, §6, §7, §8 and §13 quote facts about Ramanujan graphs and complexes without proof; Davidoff–Sarnak–Valette, Elementary Number Theory, Group Theory and Ramanujan Graphs (CUP 2003), and Lubotzky, Ramanujan complexes and high dimensional expanders, Jpn. J. Math. 9 (2014), are readable introductions.

Conventions. Codes are linear over a finite field \mathbb{F}, usually \mathbb{F}_2. Distances between words are Hamming distances, and \mathrm{dist} with a bar or the word “relative” means divided by the length. Graphs are X, like the complexes of later chapters (a graph is a 1-dimensional complex), and graph degrees are r, never d, because d is the minimum distance of a code. Boxes marked Idea carry motivation, Try it boxes are exercises whose answers fold out underneath, and Sources boxes close each chapter.

Standing notation

symbol meaning
\mathbb{F}, \htmlData{n=c1-Fq}{\mathbb{F}_q}, \mathbb{F}_2 a finite field; the field with q elements; the binary field
\htmlData{n=c1-nkd}{[n,k,d]_q}, [n,k,d] a linear code over \mathbb{F}_q of length n, dimension k and minimum distance d; without the subscript, q = 2; \htmlData{n=c10-nkd}{[[n,k,d]]} for a quantum code
R = k/n, \delta = d/n rate and relative distance
\lvert x\rvert, \mathrm{dist}(x,y) Hamming weight, and Hamming distance \lvert x - y\rvert; \mathrm{dist}(x,S) = \min_{s\in S}\mathrm{dist}(x,s)
C^\perp the dual code \{y : \langle x,y\rangle = 0 \ \forall x \in C\}
H a parity-check matrix, C = \ker H; \htmlData{n=c10-HX}{H_X}, \htmlData{n=c10-HZ}{H_Z} for the two check matrices of a CSS code
H(p), H_q(p) the binary entropy -p\log_2 p - (1-p)\log_2(1-p); the q-ary entropy (Definition 1.5)
X, r, \htmlData{n=c1-lambdaX}{\lambda(X)} a graph, its degree, and the largest absolute value of a non-trivial eigenvalue (Definition 1.10)
h(X) the edge expansion (Cheeger constant) of a graph
\Gamma = \langle S \mid R\rangle, \htmlData{n=c4-Sym}{\mathrm{Sym}(n)} a finitely presented group (§4.4 and §7.3); the symmetric group of \{1,\dots,n\} with the normalized Hamming distance
\htmlData{n=c1-EST}{E(S,T)} the number of ordered pairs (s,t) \in S\times T that are edges
C_0, \htmlData{n=c2-rho0}{\rho_0}, \htmlData{n=c2-delta0}{\delta_0} a local (inner) code of length r, its rate and its relative distance
T(\mathcal{F},\{\htmlData{n=c2-Cv}{C_v}\}), \htmlData{n=c2-TXC0}{T(X, C_0)} the Tanner code: a local code C_v at every check vertex of a factor graph \mathcal{F}; on a graph X, bits on edges and the same local code at every vertex
X, \htmlData{n=c6-Xi}{X(i)} a simplicial (or square) complex and its i-dimensional faces; a graph is the case of dimension 1
C^i, \delta, Z^i, B^i, H^i \mathbb{F}_2-cochains on X(i), the coboundary, cocycles, coboundaries, cohomology
\lVert f\rVert the normalized weight \lvert\mathrm{supp} f\rvert / \lvert X(i)\rvert of an i-cochain
G, A, B a finite group and two symmetric generating sets of size r (§8–§11)
Q, \htmlData{n=c8-Qg}{Q(v)} the squares of a square complex, and the squares containing the vertex v
\htmlData{n=c8-CA}{C_A}, C_B local codes of length r, indexed by A and by B; \htmlData{n=c8-rho}{\rho_A}, \rho_B their rates
C_1 \otimes C_2, C_1 \boxplus C_2 the tensor code (every column in C_1, every row in C_2) and the dual tensor code C_1\otimes\mathbb{F}^{n_2} + \mathbb{F}^{n_1}\otimes C_2
q, \kappa the number of queries and the soundness of a tester
\htmlData{n=c5-UNSAT}{\mathrm{UNSAT}}(\cdot) the least fraction of violated constraints of a constraint graph

Six collisions to keep in mind: d is a minimum distance, but in the Reed–Solomon codes \htmlData{n=c4-RS}{\mathrm{RS}_d(S)} of §4.6 and §4.7 it bounds the degree of a polynomial; H is a parity-check matrix, but H^i is cohomology and a Hamiltonian is written \mathcal{H} (\mathcal{H}_m in §1 is a Hamming code); \delta is a relative distance, but \delta applied to a cochain is the coboundary; q is the field size \lvert{\htmlData{n=c1-Fq}{\mathbb{F}_q}}\rvert in §1 and the prime power of a Ramanujan construction, but from §4 on a number of queries; r is a graph degree, but \htmlData{n=c5-rn}{r(n)} in §5 is the randomness of a PCP verifier; and X is a graph or a complex, but in §10–§14 also the Pauli operator (as in \htmlData{n=c10-HX}{H_X}). The letter \Gamma is reserved for finitely presented groups (§4.4 and §7.3).

Part A — Codes from expanders

1. Two introductions: codes and expanders

Idea. A good code is a subspace in which every nonzero vector is heavy. A good expander is a graph in which every small set has many edges leaving it. Both are statements about all small sets at once, which is why random constructions give both and explicit constructions are hard; and why, later on, the second will be used to build the first.

Goal of the chapter (week 1). Set up the language of linear codes — rate, distance, parity checks, duals — with Reed–Solomon codes as an example; map out what is possible in the rate–distance plane, with the Singleton, Hamming and Plotkin bounds for every linear code and the Gilbert–Varshamov bound for random ones; define spectral and combinatorial expansion, prove the expander mixing lemma, and explain why \htmlData{n=c1-ram-bound}{2\sqrt{r-1}} is the best possible spectral bound.

1.1 Codes

A code of length n over an alphabet \Sigma is a subset C \subseteq \Sigma^n; its elements are codewords. The Hamming distance \mathrm{dist}(x,y) is the number of coordinates where x and y differ, and the minimum distance of C is d = \min\{\mathrm{dist}(x,y) : x \ne y \in C\}. A code with minimum distance d detects up to d-1 errors and corrects up to \lfloor (d-1)/2\rfloor: the Hamming balls of that radius around codewords are disjoint, so a word with that many errors has a unique nearest codeword.

Definition 1.1 (linear code). Let q be a prime power and \mathbb{F}_q the field with q elements. A linear code is a subspace C \subseteq \mathbb{F}_q^n. If C has dimension k and minimum distance d, it is an \boldsymbol{[n,k,d]_q} code. Its rate is R = k/n and its relative distance is \delta = d/n. Usually q = 2, and then the subscript is dropped: an [n,k,d] code is binary unless said otherwise.

For a linear code \htmlData{n=c1-dist}{\mathrm{dist}}(x,y) = \lvert x - y\rvert with x - y \in C, so d = \min\{\lvert x\rvert : 0 \ne x \in C\} is the least weight (number of nonzero coordinates) of a nonzero codeword.

A linear code is described either by a generator matrix M \in \mathbb{F}^{n\times k} with C = M\mathbb{F}^k, or by a parity-check matrix H \in \mathbb{F}^{m\times n} with C = \ker H; each row of H is a parity check, a linear constraint every codeword satisfies. The dual code C^\perp = \{y : \langle x,y\rangle = 0 \text{ for all } x \in C\} is the row space of H: the parity checks of C are the codewords of C^\perp. Always \dim C + \dim C^\perp = n (Try it (1)). Over a finite field this does not come from a direct sum: C and C^\perp may intersect, as for C = \{00, 11\} \subseteq \mathbb{F}_2^2, which equals its own dual.

Example 1.2 (repetition, parity, Hamming, Reed–Solomon).

  1. The repetition code \{0^n, 1^n\} is \htmlData{n=c1-nkd}{[n,1,n]}. The parity code \{x : \sum x_i = 0\} is [n, n-1, 2], the dual of repetition.

  2. The Hamming code \mathcal{H}_m has as parity-check matrix the m \times (2^m - 1) matrix whose columns are all nonzero vectors of \mathbb{F}_2^m; it is [2^m - 1, 2^m - 1 - m, 3], because no two columns are equal (so no codeword of weight \le 2) and some three columns sum to zero.

  3. Let n \le q, let \alpha_1,\dots,\alpha_n \in {\htmlData{n=c1-Fq}{\mathbb{F}_q}} be distinct, and let 1 \le k \le n. The Reed–Solomon code is

    \mathrm{RS}_q[n,k] = \bigl\{(f(\alpha_1),\dots,f(\alpha_n)) : f \in \mathbb{F}_q[x],\ \deg f < k\bigr\}.

    It is an [n, k, n-k+1]_q code. It is the image of the linear map f \mapsto (f(\alpha_i))_i on polynomials of degree < k. A nonzero such f has at most k - 1 roots, so its image has weight at least n - k + 1; in particular the map is injective, so the dimension is k. The polynomial \prod_{i<k}(x - \alpha_i) shows that the distance is exactly n - k + 1.

    The catch is the alphabet: there must be n distinct points, so q \ge n grows with the length. Writing each symbol of \mathbb{F}_{2^m} as m bits turns \mathrm{RS}_{2^m}[n,k] into a binary code of length nm whose distance is still only guaranteed to be n - k + 1, so its relative distance tends to 0.

Reed–Solomon codes are an important example and a useful one: they can be decoded efficiently up to (n-k)/2 errors (Berlekamp–Welch), they are the codes on CDs and in QR codes, and their polynomial structure is a recurring source of good local codes and of local testability. The dual of a Reed–Solomon code is again one (Try it (2)).

Definition 1.3 (asymptotically good codes). Fix q. A family of linear codes (C_i) over \htmlData{n=c1-Fq}{\mathbb{F}_q}, with lengths n_i \to \infty, is asymptotically good (or simply good) if there are constants R_0 > 0 and \htmlData{n=c2-delta0}{\delta_0} > 0 with \htmlData{n=c1-R}{R}(C_i) \ge R_0 and \htmlData{n=c1-delta}{\delta}(C_i) \ge \delta_0 for all i.

The field is fixed on purpose. The repetition codes have \htmlData{n=c1-delta}{\delta} = 1 and \htmlData{n=c1-R}{R} \to 0; the Hamming codes have R \to 1 and \delta \to 0; Reed–Solomon codes have both constant, but only because q grows. Good codes do exist: by the Gilbert–Varshamov theorem below, a random linear code is good. The difficulty is to construct them explicitly, and with extra structure: sparse parity checks, fast decoding, local testability.

1.2 The rate–distance tradeoff

The more codewords there are, the closer some two of them must be. This section asks: for which pairs (\htmlData{n=c1-delta}{\delta}, \htmlData{n=c1-R}{R}) are there families of linear codes over \htmlData{n=c1-Fq}{\mathbb{F}_q} with relative distance at least \delta and rate at least R? Upper bounds hold for every code and mark part of the plane as forbidden: we prove three, the Singleton, Hamming and Plotkin bounds. Lower bounds are existence statements: the Gilbert–Varshamov bound shows what random codes achieve. (All these bounds hold for non-linear codes too, with R = \log_q\lvert C\rvert/n, but we only need linear ones.)

Proposition 1.4 (Singleton bound). Every \htmlData{n=c1-nkd}{[n,k,d]_q} code satisfies d \le n - k + 1; asymptotically \htmlData{n=c1-R}{R} + \htmlData{n=c1-delta}{\delta} \le 1 + o(1).

Proof. Delete the first d-1 coordinates of every codeword. Two codewords with the same image differ only in the deleted coordinates, so their distance is at most d - 1 < d, and they are equal. So deletion maps the q^k codewords injectively into \htmlData{n=c1-Fq}{\mathbb{F}_q}^{n-d+1}, and q^k \le q^{n-d+1}, that is, d \le n - k + 1. Dividing by n gives \htmlData{n=c1-R}{R} + \htmlData{n=c1-delta}{\delta} \le 1 + 1/n. \square

Codes that meet the Singleton bound, d = n - k + 1, are called maximum distance separable (MDS). Reed–Solomon codes are MDS (Example 1.2), so the bound is tight when q \ge n. Over a fixed field, and in particular over \mathbb{F}_2, it is far from tight: no family of binary codes comes close to \htmlData{n=c1-R}{R} + \htmlData{n=c1-delta}{\delta} = 1, as the Hamming bound below shows. To state it we need the entropy function, which counts the words in a Hamming ball.

Definition 1.5 (entropy function). The \boldsymbol{q}-ary entropy function H_q : [0, 1 - 1/q] \to [0,1] is

H_q(x) = x\log_q(q-1) - x\log_q x - (1-x)\log_q(1-x), \qquad H_q(0) = 0 .

For q = 2 it is the binary entropy function H(x) = H_2(x) = -x\log_2 x - (1-x)\log_2(1-x).

\htmlData{n=c1-Hq}{H_q} is continuous and increasing on [0, 1-1/q], from 0 to H_q(1-1/q) = 1. Its role is to count: q^{H_q(p)n} is, up to a polynomial factor, the number of words of weight at most pn. Write

V_q(n,\rho) = \#\{x \in {\htmlData{n=c1-Fq}{\mathbb{F}_q}}^n : \htmlData{n=c1-weight}{\lvert x\rvert} \le \rho\} = \sum_{i=0}^{\lfloor\rho\rfloor}\binom{n}{i}(q-1)^i

for the volume of a Hamming ball of radius \rho.

Lemma 1.6 (volume of Hamming balls). Let 0 < p \le 1 - 1/q. Then V_q(n, pn) \le q^{\htmlData{n=c1-Hq}{H_q}(p)n}, and if pn is an integer, V_q(n, pn) \ge q^{H_q(p)n}/(n+1).

Proof. Upper bound. Expand 1 = (p + (1-p))^n and keep only the terms with i \le pn:

1 \ \ge\ \sum_{i \le pn}\binom{n}{i}p^i(1-p)^{n-i} = \sum_{i \le pn}\binom{n}{i}(q-1)^i\,(1-p)^n\theta^i, \qquad \theta = \frac{p}{(q-1)(1-p)} .

The hypothesis p \le 1 - 1/q says \theta \le 1, so \theta^i \ge \theta^{pn} for i \le pn, and (1-p)^n\theta^{pn} = \bigl(\frac{p}{q-1}\bigr)^{pn}(1-p)^{(1-p)n} = q^{-\htmlData{n=c1-Hq}{H_q}(p)n}. Hence 1 \ge q^{-H_q(p)n}\,\htmlData{n=c1-Vq}{V_q}(n,pn).

Lower bound. Let k = pn. The n+1 terms t_i = \binom{n}{i}p^i(1-p)^{n-i} sum to 1, and t_k is the largest: t_{i+1}/t_i = \frac{(n-i)p}{(i+1)(1-p)} \ge 1 exactly when i \le k - 1. So t_k \ge 1/(n+1), and \htmlData{n=c1-Vq}{V_q}(n,k) \ge \binom{n}{k}(q-1)^k = t_k\,q^{\htmlData{n=c1-Hq}{H_q}(p)n} \ge q^{H_q(p)n}/(n+1). \square

For q = 2 and \htmlData{n=c1-delta}{\delta} < 1/2: at most 2^{H(\delta)n} words have weight \le \delta n, an exponentially small fraction of \mathbb{F}_2^n.

Proposition 1.7 (Hamming bound). Every \htmlData{n=c1-nkd}{[n,k,d]_q} code satisfies q^k\cdot {\htmlData{n=c1-Vq}{V_q}}\bigl(n, \htmlData{n=c1-radius}{\lfloor (d-1)/2\rfloor}\bigr) \le q^n. Asymptotically \htmlData{n=c1-R}{R} \le 1 - \htmlData{n=c1-Hq}{H_q}(\htmlData{n=c1-delta}{\delta}/2) + o(1).

Proof. The balls of radius t = \htmlData{n=c1-radius}{\lfloor (d-1)/2\rfloor} around the q^k codewords are disjoint: a word in the balls of x and x' gives \htmlData{n=c1-dist}{\mathrm{dist}}(x,x') \le 2t < d, so x = x'. They all lie in \htmlData{n=c1-Fq}{\mathbb{F}_q}^n. For the asymptotic form apply the lower bound of Lemma 1.6 to t \approx {\htmlData{n=c1-delta}{\delta}} n/2, and use continuity of \htmlData{n=c1-Hq}{H_q}. \square

Codes with equality are perfect; the Hamming codes are perfect (Try it (3)). For binary codes the Hamming bound improves on Singleton for every 0 < \htmlData{n=c1-delta}{\delta} < 1: H is concave with \htmlData{n=c1-H}{H(0)} = 0 and H(1/2) = 1, so H(\delta/2) > \delta. But for binary codes of large distance it is still weak: at \delta = 1/2 it still allows rate 1 - H(1/4) \approx 0.19, while in fact every family of binary codes with \delta \ge 1/2 has rate tending to 0, by the Plotkin bound.

Proposition 1.8 (Plotkin bound). Every binary \htmlData{n=c1-nkd}{[n,k,d]} code satisfies d \le \dfrac{n\,2^{k-1}}{2^k - 1}, and k \le n - 2d + 2 + \log_2 d. Asymptotically \htmlData{n=c1-R}{R} \le 1 - 2\htmlData{n=c1-delta}{\delta} + o(1), and R \to 0 once \delta \ge 1/2.

Proof. Sum the weights of all codewords. For each coordinate j on which C is not identically zero, the map x \mapsto x_j is a nonzero linear functional on C, so exactly half of the 2^k codewords have x_j = 1. Hence the total weight is at most n2^{k-1}; it is at least (2^k - 1)d. This is the first inequality.

For the second, assume n \ge 2d - 1 and let C' be the subcode of codewords vanishing on the last n - (2d - 1) coordinates; it has dimension k' \ge k - (n - 2d + 1). Deleting those coordinates gives a code of length 2d - 1 and distance \ge d, and the first inequality for it, (2^{k'} - 1)d \le (2d-1)2^{k'-1}, simplifies to 2^{k'-1} \le d. So k \le k' + n - 2d + 1 \le n - 2d + 2 + \log_2 d. If \htmlData{n=c1-delta}{\delta} > 1/2 the first inequality gives 2^k \le 2d/(2d - n), a constant. \square

Over \htmlData{n=c1-Fq}{\mathbb{F}_q} the same averaging gives \htmlData{n=c1-R}{R} \le 1 - \frac{q}{q-1}{\htmlData{n=c1-delta}{\delta}} + o(1): positive rate forces \delta < 1 - 1/q.

So much for what no code can do. The Gilbert–Varshamov theorem goes the other way: random linear codes achieve a positive rate for every \htmlData{n=c1-delta}{\delta} < 1 - 1/q, the whole range that Plotkin's bound allows.

Theorem 1.9 (Gilbert–Varshamov). For every 0 < \htmlData{n=c1-delta}{\delta} < 1 - 1/q and every n there is an \htmlData{n=c1-nkd}{[n,k,d]_q} code with d \ge \delta n and k \ge (1 - \htmlData{n=c1-Hq}{H_q}(\delta))n - 1. So there are families of linear codes with relative distance \ge \delta and rate \ge 1 - H_q(\delta) - o(1).

Proof. Take \htmlData{n=c1-pcm}{H} \in {\htmlData{n=c1-Fq}{\mathbb{F}_q}}^{m\times n} uniformly at random, with m = \lceil {\htmlData{n=c1-Hq}{H_q}}(\htmlData{n=c1-delta}{\delta})n\rceil. A fixed nonzero x lies in \ker H with probability q^{-m}: if x_j \ne 0, then Hx is the uniform column H^{(j)} times x_j plus something independent of it, so Hx is uniform. By Lemma 1.6 there are fewer than q^{H_q(\delta)n} nonzero x with \htmlData{n=c1-weight}{\lvert x\rvert} < \delta n, so the expected number of them in \ker H is below q^{H_q(\delta)n - m} \le 1. Hence some H has none; its kernel has distance \ge \delta n and dimension \ge n - m. \square

Since 1 - \htmlData{n=c1-Hq}{H_q}(\htmlData{n=c1-delta}{\delta}) > 0 for \delta < 1 - 1/q, this shows that good codes exist, with any relative distance below 1 - 1/q. In fact a random linear code of rate 1 - H_q(\delta) - \varepsilon has relative distance \ge \delta with probability 1 - q^{-\varepsilon n}.

Figure 1.1. The binary rate–distance plane. Below the GV curve (green), random linear codes. Above the smaller of the Hamming and Plotkin curves (red), no family of binary codes. In between, unknown.

Reading the picture (Figure 1.1). Singleton, Hamming and Plotkin are statements about every code. Singleton is tight when the alphabet may grow (Reed–Solomon codes lie on it), but for binary codes it lies entirely above Plotkin's line. Gilbert–Varshamov is an existence statement: everything below its curve is attained by random linear codes. The region in between is not understood. The upper bound was later improved by the linear-programming bound of McEliece–Rodemich–Rumsey–Welch (1977), but it is a long-standing open problem whether GV is optimal for binary codes, that is, whether every family of binary codes with relative distance \htmlData{n=c1-delta}{\delta} has rate at most 1 - \htmlData{n=c1-H}{H(\delta)} + o(1). Over larger fields GV is not optimal: for q \ge 49 a square, algebraic-geometry codes (Tsfasman–Vlăduţ–Zink, 1982) have a strictly better rate on an interval of \delta.

1.3 Expanders

Let X = (V,E) be a finite r-regular graph on N vertices, viewed as a 1-dimensional complex (\htmlData{n=c6-Xi}{X(0)} = V, X(1) = E). Its adjacency matrix A is real symmetric, with eigenvalues r = \lambda_1 \ge \lambda_2 \ge \dots \ge \lambda_N \ge -r. Here \lambda_2 < r if and only if X is connected, and \lambda_N = -r if and only if X has a bipartite component. The eigenvalues r, and -r for bipartite graphs, are forced, and are called trivial.

Definition 1.10 (spectral expander). For an r-regular graph X let \lambda(X) = \max(\lvert{\htmlData{n=c1-eigs}{\lambda_2}}\rvert, \lvert\lambda_N\rvert), the largest absolute value of a non-trivial eigenvalue; for connected bipartite X, \lambda(X) = \max(\lvert\lambda_2\rvert,\lvert\lambda_{N-1}\rvert). For 0 \le \lambda < r, X is a \boldsymbol{\lambda}-spectral expander if \lambda(X) \le \lambda. A family of \boldsymbol{\lambda}-spectral expanders is a sequence of r-regular \lambda-spectral expanders, with r and \lambda < r fixed and the number of vertices tending to infinity.

The complete graph K_N is an excellent expander: it is (N-1)-regular with eigenvalues N - 1 and -1, so \lambda(K_N) = 1. But its degree grows with N; the point of a family of expanders is that the degree stays fixed.

Theorem 1.11 (expander mixing lemma). Let X be r-regular on n vertices, and for S, T \subseteq V let E(S,T) be the number of pairs (s,t) \in S \times T with st \in E. Then

\Bigl\lvert E(S,T) - \frac{r\lvert S\rvert\lvert T\rvert}{n}\Bigr\rvert \le {\htmlData{n=c1-lambdaX}{\lambda(X)}}\sqrt{\lvert S\rvert\lvert T\rvert}.

If X is bipartite with sides \lvert L\rvert = \lvert R\rvert = n, the same holds for S \subseteq L and T \subseteq R.

The term r\lvert S\rvert\lvert T\rvert/n is what a random graph of the same density would give: in both cases a vertex has r neighbours among n candidates.

Proof. Note \htmlData{n=c1-EST}{E(S,T)} = \langle\mathbf{1}_S, A\mathbf{1}_T\rangle. Take an orthonormal eigenbasis u_1, u_2, \dots of A with Au_i = \htmlData{n=c1-eigs}{\lambda_i}u_i and u_1 = \mathbf{1}/\sqrt n, and expand \mathbf{1}_S = \sum_i a_iu_i, \mathbf{1}_T = \sum_i b_iu_i. Then

\htmlData{n=c1-EST}{E(S,T)} = \Bigl\langle \sum_i a_iu_i,\ \sum_j \htmlData{n=c1-eigs}{\lambda_j}b_ju_j\Bigr\rangle = \sum_i \lambda_ia_ib_i .

Main term. a_1 = \langle\mathbf{1}_S,\mathbf{1}\rangle/\sqrt n = \lvert S\rvert/\sqrt n and b_1 = \lvert T\rvert/\sqrt n, so the term i = 1 is r\lvert S\rvert\lvert T\rvert/n.

Error term. The other eigenvalues have \lvert{\htmlData{n=c1-eigs}{\lambda_i}}\rvert \le {\htmlData{n=c1-lambdaX}{\lambda(X)}}, so by Cauchy–Schwarz

\Bigl\lvert\sum_{i\ge 2}{\htmlData{n=c1-eigs}{\lambda_i}}a_ib_i\Bigr\rvert \le {\htmlData{n=c1-lambdaX}{\lambda(X)}}\Bigl(\sum_{i\ge 2}a_i^2\Bigr)^{1/2}\Bigl(\sum_{i\ge2}b_i^2\Bigr)^{1/2} \le \lambda(X)\sqrt{\lvert S\rvert\lvert T\rvert},

since \sum_i a_i^2 = \lVert\mathbf{1}_S\rVert^2 = \lvert S\rvert and likewise for T.

Bipartite case. Now there are 2n vertices and two trivial eigenvectors, u_1 = \mathbf{1}/\sqrt{2n} and u_{2n} = (\mathbf{1}_L - \mathbf{1}_R)/\sqrt{2n}, with eigenvalues r and -r. For S \subseteq L, T \subseteq R: a_1 = a_{2n} = \lvert S\rvert/\sqrt{2n} and b_1 = -b_{2n} = \lvert T\rvert/\sqrt{2n}. The two trivial terms give \frac{r\lvert S\rvert\lvert T\rvert}{2n} + \frac{r\lvert S\rvert\lvert T\rvert}{2n} = \frac{r\lvert S\rvert\lvert T\rvert}{n}, and the remaining terms are bounded as before. \square

So in an expander the number of edges between any two sets is what a random graph of the same density would give, up to an error \lambda\sqrt{\lvert S\rvert\lvert T\rvert}. A typical consequence: a set in which every vertex has many neighbours inside the set must be large (Try it (4)).

Spectral expansion stands for a combinatorial property: every set of at most half the vertices has many edges leaving it.

Definition 1.12 (edge expansion). The edge expansion (Cheeger constant) of a graph X = (V,E) on N vertices is

h(X) = \min_{0 < \lvert S\rvert \le N/2}\frac{\lvert {\htmlData{n=c1-EST}{E(S, V\setminus S)}}\rvert}{\lvert S\rvert}.

A family of r-regular graphs with the number of vertices tending to infinity is a family of (edge) expanders if h(X) \ge h_0 for a fixed h_0 > 0.

Theorem 1.13 (Cheeger inequalities; Dodziuk, Alon–Milman, Alon). For every r-regular graph X,

\frac{r - \htmlData{n=c1-eigs}{\lambda_2}}{2} \ \le\ \htmlData{n=c1-h}{h(X)}\ \le\ \sqrt{2r(r - \lambda_2)}.

So for fixed r, a family is a family of edge expanders if and only if \lambda_2 \le \lambda_0 for a fixed \lambda_0 < r.

We do not prove this (Hoory–Linial–Wigderson, §4). Only \htmlData{n=c1-eigs}{\lambda_2} appears: a bipartite graph can be an excellent edge expander although \lambda_N = -r. The two-sided \htmlData{n=c1-lambdaX}{\lambda(X)} is what the mixing lemma needs, since it controls \htmlData{n=c1-EST}{E(S,T)} for all pairs of sets.

How small can \htmlData{n=c1-lambdaX}{\lambda(X)} be? The smaller \lambda(X), the better the expander; but in a family of r-regular graphs \lambda cannot be made as small as one likes.

Theorem 1.14 (Alon–Boppana). For every r \ge 3 and every r-regular graph X on N vertices, \htmlData{n=c1-eigs}{\lambda_2(X)} \ge {\htmlData{n=c1-ram-bound}{2\sqrt{r-1}}} - o(1), where o(1) \to 0 as N \to \infty.

The number 2\sqrt{r-1} is the spectral radius of the infinite r-regular tree T_r: the norm of its adjacency operator on \ell^2 (Kesten, 1959). The tree is the universal cover of every r-regular graph, so a large r-regular graph looks locally like T_r, and its non-trivial spectrum cannot be smaller than the tree's.

Definition 1.15 (Ramanujan graph). An r-regular graph X is Ramanujan if \htmlData{n=c1-lambdaX}{\lambda(X)} \le {\htmlData{n=c1-ram-bound}{2\sqrt{r-1}}}, with \lambda(X) as in Definition 1.10 (so for a bipartite graph, -r does not count).

By Theorem 1.14 Ramanujan graphs are the best possible spectral expanders, asymptotically.

1.4 The plan, as a dictionary

expansion notion what it gives chapter
lossless vertex expansion linear distance and linear-time decoding §3
spectral gap of a graph (mixing lemma) linear distance of Tanner codes §3
spectral gap under random walks gap amplification, the PCP theorem §5
coboundary expansion of a complex local testability of the code of coboundaries §6
cosystolic expansion testability plus large “cosystole”; one-sided quantum distance §7, §10
expansion of a square complex with robust local codes good locally testable codes §8–§9
two-sided product expansion good quantum LDPC codes §11
lossless expansion of a square complex c^3-LTCs and good quantum LDPC codes, with linear-time decoding §12
expansion in both directions of a chain complex quantum local testability §13

Try it (1). Show that \dim C + \dim {\htmlData{n=c1-dual}{C^\perp}} = n for every linear code C \subseteq \mathbb{F}^n, and deduce (C^\perp)^\perp = C. (Do not use a direct sum decomposition: C \cap C^\perp may be nonzero.)

Try it (2). Let n = q, with \alpha_1,\dots,\alpha_q all the elements of \htmlData{n=c1-Fq}{\mathbb{F}_q}. Show that \htmlData{n=c1-rs}{\mathrm{RS}_q[q,k]}^\perp = \mathrm{RS}_q[q,q-k]. Hint: \sum_{\alpha\in\mathbb{F}_q}\alpha^j = 0 for 0 \le j \le q-2.

Try it (3). Show that the Hamming code \mathcal{H}_m is perfect: the Hamming balls of radius 1 around its codewords partition \mathbb{F}_2^{2^m-1}.

Try it (4). Let X be r-regular on N vertices and S \subseteq V a set in which every vertex has at least \beta r neighbours inside S. Show \lvert S\rvert \ge (\beta - \htmlData{n=c1-lambdaX}{\lambda(X)}/r)N.

Sources. Codes. Guruswami–Rudra–Sudan, Essential Coding Theory (free draft), Ch. 1–5 (linear codes; the Hamming, Gilbert–Varshamov, Singleton and Plotkin bounds; Reed–Solomon codes); Hamming, Error detecting and error correcting codes, Bell Syst. Tech. J. 29 (1950); Reed–Solomon, Polynomial codes over certain finite fields, J. SIAM 8 (1960); Gilbert, A comparison of signalling alphabets, Bell Syst. Tech. J. 31 (1952); Varshamov, Dokl. Akad. Nauk SSSR 117 (1957); McEliece–Rodemich–Rumsey–Welch, New upper bounds on the rate of a code via the Delsarte–MacWilliams inequalities, IEEE Trans. Inf. Theory 23 (1977); Tsfasman–Vlăduţ–Zink, Modular curves, Shimura curves, and Goppa codes, better than Varshamov–Gilbert bound, Math. Nachr. 109 (1982).

Expanders. Hoory–Linial–Wigderson, Expander graphs and their applications, Bull. AMS 43 (2006), §§2–4 (spectral expansion, the mixing lemma §2.4, Cheeger §§4.4–4.5) and §5.2 (Alon–Boppana); Kesten, Symmetric random walks on groups, Trans. AMS 92 (1959); Lubotzky–Phillips–Sarnak, Ramanujan graphs, Combinatorica 8 (1988); Margulis, Probl. Inf. Transm. 24 (1988); Morgenstern, Existence and explicit constructions of q+1 regular Ramanujan graphs for every prime power q, J. Combin. Theory Ser. B 62 (1994); Davidoff–Sarnak–Valette, Elementary Number Theory, Group Theory and Ramanujan Graphs, LMS Student Texts 55 (CUP 2003); Friedman, A proof of Alon's second eigenvalue conjecture and related problems, Mem. AMS 195 (2008); Huang–McKenzie–Yau, Ramanujan property and edge universality of random regular graphs, arXiv:2412.20263 (2024); Marcus–Spielman–Srivastava, Interlacing families I: bipartite Ramanujan graphs of all degrees, Ann. of Math. 182 (2015); M. B. Cohen, Ramanujan graphs in polynomial time, FOCS 2016; OpenAI, Deterministic nonbipartite Ramanujan graphs in every fixed degree, preprint, 23 September 2026, https://github.com/openai/math/blob/main/preprints/Deterministic-nonbipartite-Ramanujan-graphs-in-every-fixed-degree-September-23-2026/paper.pdf.

Answers to the exercises

Answer (1). Let M \in \mathbb{F}^{n\times k} be a generator matrix. Then y \in {\htmlData{n=c1-dual}{C^\perp}} iff y is orthogonal to the columns of M, i.e. C^\perp = \ker M^{\mathsf T}. The k\times n matrix M^{\mathsf T} has rank k (row rank equals column rank over any field), so by rank–nullity \dim C^\perp = n - k. Clearly C \subseteq (C^\perp)^\perp, and both have dimension n - (n-k) = k.

Answer (3). The balls are disjoint because d = 3. Each has 1 + n = 2^m points, there are 2^{n-m} codewords, and 2^m\cdot 2^{n-m} = 2^n. Equivalently: every syndrome Hy \ne 0 equals exactly one column of H, which names the unique bit to flip.

Answer (2). For j = 0 the sum is q\cdot 1 = 0. For 1 \le j \le q-2, with \gamma a generator of \htmlData{n=c1-Fq}{\mathbb{F}_q}^\times, it is \sum_{i=0}^{q-2}\gamma^{ij} = (\gamma^{j(q-1)} - 1)/(\gamma^j - 1) = 0. If \deg f < k and \deg g < q-k, then \deg fg \le q-2, so \sum_\alpha f(\alpha)g(\alpha) = 0: the two codes are orthogonal. Their dimensions k and q-k add up to q, so by Try it (1) each is the dual of the other.

Answer (4). \beta r\lvert S\rvert \le {\htmlData{n=c1-EST}{E(S,S)}} \le \frac{r\lvert S\rvert^2}{N} + \htmlData{n=c1-lambdaX}{\lambda(X)}\lvert S\rvert by Theorem 1.11 (with N vertices); divide by r\lvert S\rvert.

2. LDPC codes: Gallager's theorem and Tanner codes

Idea. Gallager's insight (1962) was to use sparse parity checks: each bit in a few checks, each check on a few bits. Sparse checks are cheap to evaluate and to decode with, but no single check can see a heavy codeword, and an argument that looks only at the checks around one bit gives distance about c + 1, a constant. Gallager showed by counting that random sparse codes are good all the same. Tanner (1981) drew the checks as a bipartite graph and let each check vertex impose a small code of its own instead of a single parity. §3 uses that freedom to build good codes explicitly.

Goal of the chapter (week 2). Define LDPC codes and their factor graphs. Meet examples and non-examples: codes of graphs, where column weight 2 forces the rate or the relative distance to 0; codes with orthogonal checks, where a local argument gives distance c+1, a constant; codes from projective planes; and Hamming and Reed–Solomon codes, which have no sparse parity checks at all. Prove Gallager's theorem that random LDPC codes with column weight \ge 3 are asymptotically good, so that infinite good families of LDPC codes exist. Define Tanner codes in general, with a local code at every check vertex, and prove the rate bound. Their distance is the subject of §3.

2.1 Low-density parity checks

Definition 2.1 (LDPC code). A family of codes C = \htmlData{n=c1-pcm}{\ker H} is low-density parity-check (LDPC) if every row and every column of H has at most a constant number of nonzero entries. It is (c,r)-regular if every column has exactly c ones and every row exactly r. The factor graph (Tanner graph) of H is the bipartite graph with the n bits on one side, the m checks on the other, and an edge where H has a nonzero entry.

A \htmlData{n=c2-cr-regular}{(c,r)}-regular code has m = cn/r checks, so R \ge 1 - c/r. Being LDPC is a property of a parity-check matrix, i.e. of a chosen spanning set of \htmlData{n=c1-dual}{C^\perp}, and a code counts as LDPC if it has some sparse parity-check matrix. Gallager studied random (c,r)-regular codes and proved that for c \ge 3 they have linear minimum distance with high probability (§2.3). He also gave iterative (message-passing) decoders, the ancestors of belief propagation. The codes were then largely forgotten until MacKay–Neal and others rediscovered them in the 1990s and found that these decoders come close to Shannon's capacity (the best rate possible against random errors) in practice. Today LDPC codes are in the 5G and Wi-Fi standards.

2.2 Examples

Example 2.2 (codes of graphs: column weight 2). Let X = (V,E) be a graph. Put bits on the edges and a parity check at every vertex, so that H is the vertex–edge incidence matrix: every column has weight 2, and the row of v has weight \deg v. A set of edges is a codeword iff it meets every vertex in an even number of edges, i.e. iff it is an even subgraph. So the code is the cycle space of X, and its minimum distance is the girth of X (Try it (5)). Conversely, every code whose columns all have weight 2 is of this form, with X the multigraph whose vertices are the checks and whose edges are the bits.

The repetition code \htmlData{n=c1-nkd}{[n,1,n]} is the case of the n-cycle. Its parity-check matrix has the rows e_i + e_{i+1} (indices mod n), so it is LDPC with c = r = 2 and has distance n, but its rate is 1/n: being LDPC says nothing about rate or distance by itself. And column weight 2 cannot give both. For connected X on N vertices the cycle space has dimension \lvert E\rvert - N + 1 (a disconnected X gives a direct sum of such codes, which is no better). So a rate bounded below forces the average degree 2\lvert E\rvert/N to stay away from 2, and a graph whose average degree stays away from 2 has girth O(\log N): Try it (5) proves this for regular graphs, and Alon–Hoory–Linial in general. Column weight 2 is fatal: the rate or the relative distance tends to 0.

Proposition 2.3 (orthogonal checks). Suppose that every bit lies in at least c checks and that no two bits lie in two common checks, i.e. the factor graph has no cycle of length 4. Then d \ge c + 1.

Proof. Let x \ne 0 be a codeword and i \in \mathrm{supp}\,x. Each of the checks on bit i is satisfied by x, so it contains a second bit of \mathrm{supp}\,x. These bits are distinct, because two bits share at most one check. So \htmlData{n=c1-weight}{\lvert x\rvert} \ge c + 1. \square

For an LDPC code c is a constant, and so is this bound. That is typical: an argument that inspects the checks around one bit sees only boundedly many bits, and linear distance is invisible to it. Linear distance is a global property and needs a global argument: counting in §2.3, expansion in §3.

Example 2.4 (projective-plane codes). Let q = 2^s, and let H be the incidence matrix of lines against points of the projective plane \mathrm{PG}(2,q) over \htmlData{n=c1-Fq}{\mathbb{F}_q}. There are n = q^2 + q + 1 bits (the points) and as many checks (the lines). Every line has q+1 points, every point lies on q+1 lines, and two points lie on exactly one line, so Proposition 2.3 gives d \ge q + 2; in fact d = q + 2. The dimension is n - 3^s - 1, by the theorem of Graham–MacWilliams on the 2-rank of the incidence matrix, so the rate tends to 1. For q = 2, the Fano plane, the seven lines are the weight-3 words of the Hamming code \mathcal{H}_3 and span it, so the code is its dual, the \htmlData{n=c1-nkd}{[7,3,4]} simplex code. For q = 4 the code is [21,11,6].

These codes, and their relatives from other finite geometries (Kou–Lin–Fossorier), perform very well in practice. But they have R \to 1 and d \approx \sqrt n, and their column weight c = q + 1 \approx \sqrt n grows, so as a family they are neither LDPC in the sense of Definition 2.1 nor good.

Non-examples. A family of codes is LDPC exactly when each \htmlData{n=c1-dual}{C^\perp} is spanned by words of bounded weight in which every coordinate appears boundedly often. In particular, the dual of an LDPC code has bounded minimum distance. The Hamming codes are not LDPC: their duals are the simplex codes, all of whose nonzero words have weight 2^{m-1} = (n+1)/2, so every parity check of \mathcal{H}_m involves about half of the bits. Reed–Solomon codes are not LDPC either: the dual of an MDS code is MDS, so every nonzero parity check of an \htmlData{n=c1-nkd}{[n,k,n-k+1]} Reed–Solomon code has weight at least k + 1.

What column weight 3 changes. The support of a nonzero codeword meets every check an even number of times, hence at least twice when it meets it at all. So it has at most half as many check-neighbours as it has edges to checks. For column weight 2 this is no restriction: a cycle of X has exactly that many. For c \ge 3, small sets of bits in a random factor graph have many distinct check-neighbours, almost c per bit, and no small set is badly enough connected to be the support of a codeword. §2.3 proves by counting that small codewords are absent; §3 proves the expansion itself (Proposition 3.10) and turns it into a decoder.

2.3 Gallager's theorem: random LDPC codes are good

Gallager's ensemble makes “a random \htmlData{n=c2-cr-regular}{(c,r)}-regular code” precise. Let r divide n. A band is a partition of the n bits into n/r blocks of r bits, together with the n/r parity checks “each block has even weight”. The first band uses the consecutive blocks \{1,\dots,r\}, \{r+1,\dots,2r\},\dots, and the other bands are its images under random permutations of the coordinates.

Definition 2.5 (Gallager's ensemble). For c < r with r \mid n, a code of Gallager's ensemble \mathcal{E}(n,c,r) is C = \htmlData{n=c1-pcm}{\ker H}, where H \in \mathbb{F}_2^{(cn/r)\times n} stacks c bands: H_1 has the rows \mathbf{1}_{\{(i-1)r+1,\dots,ir\}} for 1 \le i \le n/r, and H_j = H_1P_{\pi_j} for 2 \le j \le c, with \pi_2,\dots,\pi_c independent uniformly random permutations of \{1,\dots,n\} and P_\pi the permutation matrix.

Every column of H has exactly c ones (one in each band) and every row exactly r, so C is a \htmlData{n=c2-cr-regular}{(c,r)}-regular LDPC code of rate at least 1 - c/r.

Theorem 2.6 (Gallager, 1962). Let 3 \le c < r. There is \alpha = \alpha(c,r) > 0 such that a code from \htmlData{n=c2-ensemble}{\mathcal{E}(n,c,r)} has minimum distance at least \alpha n with probability 1 - o(1) as n \to \infty. In particular, for all such c and r there are infinite families of \htmlData{n=c2-cr-regular}{(c,r)}-regular LDPC codes with rate at least 1 - c/r and relative distance at least \alpha: asymptotically good LDPC codes exist.

Proof. We bound the expected number of nonzero codewords of weight at most \htmlData{n=c2-alpha}{\alpha} n and show that it tends to 0. This is the probabilistic method of Theorem 1.9, with sparse checks in place of dense random ones.

One band. Let N(w) be the number of x \in \mathbb{F}_2^n of weight w that satisfy the first band, i.e. all of whose blocks have even weight. A uniformly random permutation maps a fixed x of weight w to a uniformly random vector of weight w, so x satisfies the band \htmlData{n=c2-Hj}{H_j} (j \ge 2) with probability N(w)/\binom nw, independently for different j. Summing over the N(w) words that satisfy the first band, the expected number of codewords of weight w is

E_w = \htmlData{n=c2-Nw}{N(w)}\Bigl(\frac{N(w)}{\binom nw}\Bigr)^{c-1} = \frac{N(w)^c}{\binom nw^{c-1}} .

Counting \htmlData{n=c2-Nw}{N(w)}. A block of even weight that meets the support has at least two of its ones, so the support of such an x meets at most w/2 blocks. Choose \lfloor w/2\rfloor blocks that contain the support, then the w positions inside their union. With \binom ab \le (ea/b)^b, and the fact that (ea/b)^b increases with b for b \le a,

\htmlData{n=c2-Nw}{N(w)} \le \binom{n/r}{\lfloor w/2\rfloor}\binom{r\lfloor w/2\rfloor}{w} \le \Bigl(\frac{2en}{rw}\Bigr)^{w/2}\Bigl(\frac{er}{2}\Bigr)^{w}.

The first moment. With \binom nw \ge (n/w)^w this gives

\htmlData{n=c2-Ew}{E_w} \le \Bigl(\frac{2en}{rw}\Bigr)^{cw/2}\Bigl(\frac{er}{2}\Bigr)^{cw}\Bigl(\frac wn\Bigr)^{(c-1)w} = \Bigl[\htmlData{n=c2-K}{K}\Bigl(\frac wn\Bigr)^{\htmlData{n=c2-beta}{\beta}}\Bigr]^{w},

where K = \bigl(\frac{e^3r}{2}\bigr)^{c/2} and \beta = \frac c2 - 1. Here c \ge 3 is used: \beta \ge 1/2 > 0. Choose \htmlData{n=c2-alpha}{\alpha} with K\alpha^\beta \le 1/2. For w \le \sqrt n the bracket is at most Kn^{-\beta/2}, and for w \le \alpha n it is at most 1/2. So

\begin{aligned} \Pr\bigl[C \text{ has a nonzero word of weight} \le {\htmlData{n=c2-alpha}{\alpha}} n\bigr] &\le \sum_{w=1}^{\alpha n}{\htmlData{n=c2-Ew}{E_w}} \le \sum_{w\ge1}\bigl(\htmlData{n=c2-K}{K}n^{-\htmlData{n=c2-beta}{\beta}/2}\bigr)^w + \sum_{w > \sqrt n}2^{-w}\\ &= O(n^{-1/4}) + 2^{1-\sqrt n}, \end{aligned}

which tends to 0. The rate bound holds for every code of the ensemble. \square

Three remarks:

2.4 Tanner codes

Gallager's theorem is an existence theorem, and explicit constructions came later. They are built in a framework that Tanner introduced: keep the factor graph, but let each check vertex impose a small code on its neighbours instead of a single parity.

Let \htmlData{n=c2-factor-graph}{\mathcal{F}} be a bipartite graph with the bits L on one side and the constraint vertices R on the other, and write N(v) \subseteq L for the set of neighbours of v \in R. At every v \in R fix a linear code C_v \subseteq \mathbb{F}^{N(v)}, the local code at v.

Definition 2.7 (Tanner code). The Tanner code of these data is

T(\htmlData{n=c2-factor-graph}{\mathcal{F}}, \{\htmlData{n=c2-Cv}{C_v}\}) = \{x \in \mathbb{F}^L : x|_{\htmlData{n=c2-Nv}{N(v)}} \in C_v \text{ for every } v \in R\}:

every constraint vertex sees a word of its local code.

The main case has bits of degree 2. Then the bits are the edges of a graph X = (V,E) with V = R, and \htmlData{n=c2-Nv}{N(v)} is the set E(v) of edges at v. Let X be r-regular, fix at every vertex v a bijection between E(v) and \{1,\dots,r\}, and let C_0 \subseteq \mathbb{F}^r be a linear code, the local code, with rate \rho_0 and relative distance \delta_0. Putting C_0 at every vertex, via the bijections, gives

T(X, \htmlData{n=c2-C0}{C_0}) = \{x \in \mathbb{F}^E : x|_{\htmlData{n=c2-Ev}{E(v)}} \in C_0 \text{ for every } v \in V\}:

bits on edges, and the word on the edges at each vertex must be a local codeword. Two cases are already familiar:

Proposition 2.8 (rate). \dim {\htmlData{n=c2-tanner}{T(\mathcal{F},\{C_v\})}} \ge \lvert L\rvert - \sum_{v\in R}\bigl(\lvert {\htmlData{n=c2-Nv}{N(v)}}\rvert - \dim {\htmlData{n=c2-Cv}{C_v}}\bigr). In particular \dim {\htmlData{n=c2-TXC0}{T(X, C_0)}} \ge (2\htmlData{n=c2-rho0}{\rho_0} - 1)\lvert E\rvert, and a \htmlData{n=c2-cr-regular}{(c,r)}-regular LDPC code has rate at least 1 - c/r.

Proof. A parity-check matrix of \htmlData{n=c2-Cv}{C_v}, placed on the coordinates \htmlData{n=c2-Nv}{N(v)}, gives \lvert N(v)\rvert - \dim C_v linear constraints, and T is cut out by all of them together. For \htmlData{n=c2-TXC0}{T(X,C_0)}, on N vertices, that is N(1-\htmlData{n=c2-rho0}{\rho_0})r = 2(1-\rho_0)\lvert E\rvert constraints; for a \htmlData{n=c2-cr-regular}{(c,r)}-regular code it is cn/r parity checks. \square

So \htmlData{n=c2-TXC0}{T(X, C_0)} has positive rate once \htmlData{n=c2-rho0}{\rho_0} > 1/2. The bound ignores linear relations among the constraints, and the actual rate can be much larger:

Example 2.9 (product codes). For C_1 \subseteq \mathbb{F}^{n_1} and C_2 \subseteq \mathbb{F}^{n_2}, of dimensions k_1 and k_2, the product code \htmlData{n=c4-tensor}{C_1\otimes C_2} consists of the n_1\times n_2 matrices whose columns lie in C_1 and whose rows lie in C_2. It is the Tanner code on the complete bipartite graph K_{n_1,n_2}: the bits are the entries (i,j), i.e. the edges, the row vertex i carries C_2, and the column vertex j carries C_1. Its dimension is k_1k_2. Proposition 2.8 gives only k_1n_2 + n_1k_2 - n_1n_2, which is smaller by (n_1-k_1)(n_2-k_2), and negative when the two rates add up to less than 1.

The two sides of \htmlData{n=c2-Kn1n2}{K_{n_1,n_2}} carry different local codes, which Definition 2.7 allows. The relative distance of C_1\otimes C_2 is \delta_1\delta_2. §4.6 returns to these codes as tensor codes, and §8 puts one at every vertex of a square complex.

Try it (5). Prove that the code of Example 2.2 is the cycle space of X and that its minimum distance is the girth of X. Show that if X is r-regular on N vertices, with r \ge 3, its girth g satisfies g \le 2\log_{r-1}N + 2.

Try it (6). Give a direct proof that \htmlData{n=c2-TXC0}{T(X, C_0)} is LDPC: write down a parity-check matrix with O(1) nonzero entries per row and column.

Try it (7). In Gallager's ensemble compute \htmlData{n=c2-Ew}{E_2}, the expected number of codewords of weight 2, exactly. Show that it is \Theta(n^{2-c}), so that it tends to 0 for c \ge 3, and that it tends to the constant (r-1)^2/2 for c = 2.

Try it (8). Show that the rows of each band of H sum to the all-ones vector. Deduce that \htmlData{n=c1-pcm}{\mathrm{rank}\,H} \le cn/r - c + 1, so that the rate of a Gallager code is at least 1 - c/r + (c-1)/n.

Sources. Gallager, Low-density parity-check codes, IRE Trans. Inform. Theory 8 (1962), and the monograph of the same name (MIT Press, 1963), Ch. 2 for the ensemble and Theorem 2.6; Richardson–Urbanke, Modern Coding Theory (CUP 2008), Ch. 3, for ensembles of LDPC codes in the modern language; MacKay–Neal, Near Shannon limit performance of low density parity check codes, Electron. Lett. 32 (1996); Alon–Hoory–Linial, The Moore bound for irregular graphs, Graphs Combin. 18 (2002); Kou–Lin–Fossorier, Low-density parity-check codes based on finite geometries: a rediscovery and new results, IEEE Trans. Inform. Theory 47 (2001); Graham–MacWilliams, On the number of information symbols in difference-set cyclic codes, Bell Syst. Tech. J. 45 (1966); Vardy, The intractability of computing the minimum distance of a code, IEEE Trans. Inform. Theory 43 (1997); Tanner, A recursive approach to low complexity codes, IEEE Trans. Inform. Theory 27 (1981); Guruswami–Rudra–Sudan, Ch. 11.

Answers to the exercises

Answer (5). A set of edges meets every vertex in an even number of edges iff it is an even subgraph, i.e. an element of the cycle space. A nonzero even subgraph contains a cycle, since each of its vertices has degree at least 2 in it, and every cycle is a codeword; so d = g. For the bound let t = \lfloor(g-1)/2\rfloor. Two different paths of length at most t from a vertex v to the same vertex would give a cycle of length at most 2t < g, so the ball of radius t around v is a tree. It has 1 + r\sum_{i<t}(r-1)^i \ge (r-1)^t vertices, so (r-1)^t \le N, and g \le 2t + 2 \le 2\log_{r-1}N + 2.

Answer (6). Let H_0 be a (1-\htmlData{n=c2-rho0}{\rho_0})r \times r parity-check matrix of \htmlData{n=c2-C0}{C_0}. For each vertex v and each row \eta of H_0 put the row “\eta placed on \htmlData{n=c2-Ev}{E(v)} via the fixed bijection, zero elsewhere”. Each row has at most r nonzeros, and each edge (column) appears in the rows of its two endpoints only, at most 2(1-\rho_0)r rows.

Answer (7). A weight-2 word satisfies a band iff its two ones lie in the same block: \htmlData{n=c2-Nw}{N(2)} = \frac nr\binom r2 = \frac{n(r-1)}2. So \htmlData{n=c2-Ew}{E_2} = N(2)^c/\binom n2^{c-1} = \frac{n(r-1)}{2}\bigl(\frac{r-1}{n-1}\bigr)^{c-1}, which is \Theta(n^{2-c}). For c = 2 it equals \frac{n(r-1)^2}{2(n-1)} \to \frac{(r-1)^2}{2}: a code with c = 2 has on average a constant number of weight-2 codewords — pairs of bits whose two checks coincide, cycles of length 2 in the check graph of Example 2.2. (A second-moment computation shows that their number is asymptotically Poisson with this mean, so the probability that one exists stays bounded away from 0.)

Answer (8). The blocks of a band partition \{1,\dots,n\}, so the sum of the band's rows is \mathbf{1}, and the same holds for \htmlData{n=c2-Hj}{H_j} = H_1\htmlData{n=c2-Ppi}{P_{\pi_j}} since \mathbf{1}P_\pi = \mathbf{1}. So for j = 2,\dots,c the sum of the rows of band 1 minus the sum of the rows of band j is 0: these are c-1 independent linear relations among the cn/r rows (each involves band j, which no other relation does). Hence \htmlData{n=c1-pcm}{\mathrm{rank}\,H} \le cn/r - (c-1) and \dim C \ge n - cn/r + c - 1.

3. Expander codes: the two routes of Sipser and Spielman

Idea. Gallager showed in 1962 that random LDPC codes are asymptotically good, but his proof is a counting argument and gives no explicit family. Sipser and Spielman (1996) found two routes from expander graphs to good LDPC codes. The lossless route uses vertex expansion of the factor graph: if every small set of bits has almost as many check-neighbours as it has edges, then many checks see the set exactly once. A check that sees exactly one bit of a word is violated, so a nonzero codeword cannot be small (distance), and the most naive decoder — flip any bit that sits in more violated than satisfied checks — must make progress (decoding). Random factor graphs are lossless, but explicit ones were out of reach in 1996 and are still rare. The spectral route puts the bits on the edges of a spectral expander and a local code of linear distance at every vertex, as in a Tanner code. Such a factor graph is never lossless, but the local code makes up for it, and the mixing lemma then forces every nonzero codeword to be heavy. Explicit spectral expanders, such as Ramanujan graphs, had been known since 1988, so the spectral route is the one that gave explicit codes.

Goal of the chapter (week 3). Present the two routes of Sipser and Spielman to explicit good LDPC codes. First the lossless route: define lossless expansion and prove the unique-neighbour lemma; deduce linear distance, bound the rate, and make the checks sparse by splitting heavy checks, so that every family of lossless expanders with fewer checks than bits gives good LDPC codes; prove the correctness and linear running time of the flip decoder; prove that random factor graphs are lossless, see why spectral expanders do not suffice, and where explicit lossless expanders come from today. Then the spectral route: prove the distance bound \htmlData{n=c3-tanner-distance}{\delta_0(\delta_0 - \lambda/r)}\lvert E\rvert for Tanner codes on spectral expanders, conclude with Ramanujan graphs that explicit good LDPC codes exist, and see Zémor's decoder. Note that in the spectral route the local code may change from vertex to vertex, a freedom that the later constructions of the year, such as the locally testable codes of §8, do not have.

3.1 Lossless expansion and unique neighbours

The question. Recall from §2 that a code C = \htmlData{n=c1-pcm}{\ker H} is LDPC if every row and every column of H has O(1) ones, and that its factor graph has the n bits on one side, the m checks on the other, and an edge wherever H has a 1; the rate is always at least 1 - m/n. Local arguments are too weak: with orthogonal checks one only gets d \ge c + 1 (Proposition 2.3), and codes of graphs (column weight 2) have distance equal to the girth, which is O(\log n) once the rate is bounded below (Example 2.2). Gallager's theorem (Theorem 2.6) says that random \htmlData{n=c2-cr-regular}{(c,r)}-regular LDPC codes with c \ge 3 are good with high probability, but its proof is a union bound, an existence statement. So: can we write down explicitly, that is, construct in time polynomial in n, a family of good LDPC codes? Sipser and Spielman (1996) answered yes, and expansion is the reason. There are two routes: lossless vertex expansion of the factor graph (§3.1–§3.4), or spectral expansion together with a good local code (§3.5–§3.6).

Setting. Throughout the lossless route, \htmlData{n=c2-factor-graph}{\mathcal{F}} is a bipartite graph with the bits L on one side and the checks R on the other, \lvert L\rvert = n, \lvert R\rvert = m, in which every bit has degree exactly c (\mathcal{F} is left c-regular). For S \subseteq L let

\begin{aligned} N(S) &= \{v \in R : v \text{ has a neighbour in } S\},\\ \htmlData{n=c3-US}{U(S)} &= \{v \in R : v \text{ has exactly one neighbour in } S\} \subseteq N(S). \end{aligned}

The elements of U(S) are the unique neighbours of S.

Definition 3.1 (lossless expansion). \htmlData{n=c2-factor-graph}{\mathcal{F}} is an (\alpha, \htmlData{n=c3-eps}{\varepsilon})-expander if \lvert {\htmlData{n=c3-NS}{N(S)}}\rvert \ge (1-\varepsilon)c\lvert S\rvert for every S \subseteq L with \lvert S\rvert \le \alpha n.

Four remarks on the definition:

Example 3.2 (why lossless is the right notion). If two bits of S share a check, that check is “wasted” for S. Lossless expansion says that small sets of bits have very few such collisions: around a small set, the factor graph looks almost like a tree. Compare with Gallager's setting (§2.2): the support S of a nonzero codeword meets every check an even number of times, hence at least twice when it meets it at all, so it has at most \frac c2\lvert S\rvert neighbours. A set with \lvert {\htmlData{n=c3-NS}{N(S)}}\rvert > \frac c2\lvert S\rvert therefore cannot be the support of a codeword, and lossless expansion with \htmlData{n=c3-eps}{\varepsilon} < 1/2 guarantees exactly this for every set of at most \htmlData{n=c3-alpha}{\alpha} n bits.

The example already shows that small codewords are absent. The next lemma says more, and it is what the decoder of §3.3 needs: it finds many checks that see S exactly once.

Lemma 3.3 (unique neighbours). If \lvert {\htmlData{n=c3-NS}{N(S)}}\rvert \ge (1-\htmlData{n=c3-eps}{\varepsilon})c\lvert S\rvert then \lvert U(S)\rvert \ge (1 - 2\varepsilon)c\lvert S\rvert.

Proof. Count the c\lvert S\rvert edges leaving S by their endpoint in R. Each unique neighbour receives exactly one of them, and every other vertex of \htmlData{n=c3-NS}{N(S)} receives at least two. Hence

c\lvert S\rvert \ge \lvert {\htmlData{n=c3-US}{U(S)}}\rvert + 2\bigl(\lvert {\htmlData{n=c3-NS}{N(S)}}\rvert - \lvert U(S)\rvert\bigr) = 2\lvert N(S)\rvert - \lvert U(S)\rvert,

so \lvert {\htmlData{n=c3-US}{U(S)}}\rvert \ge 2\lvert {\htmlData{n=c3-NS}{N(S)}}\rvert - c\lvert S\rvert \ge 2(1-\htmlData{n=c3-eps}{\varepsilon})c\lvert S\rvert - c\lvert S\rvert = (1 - 2\varepsilon)c\lvert S\rvert. \square

Figure 3.1. Unique neighbours in a toy factor graph with c = 3. The three bits of S (red) send out nine edges. Five checks see S exactly once (green, the unique neighbours) and two see it twice (orange). Here \lvert {\htmlData{n=c3-NS}{N(S)}}\rvert = 7 = (1 - \frac29)\cdot 9 and \lvert U(S)\rvert = 5 = (1 - \frac49)\cdot 9, so Lemma 3.3 is tight. In a lossless expander almost all neighbours of a small S are unique.

The point of the lemma (Figure 3.1): a unique neighbour of \mathrm{supp}(x) sees exactly one 1 of x, so its parity check is violated. Expansion with \htmlData{n=c3-eps}{\varepsilon} < 1/2 is therefore a certificate that small sets cannot hide from the checks.

3.2 Good codes from lossless expanders

Let C(\htmlData{n=c2-factor-graph}{\mathcal{F}}) = \ker H_{\mathcal{F}}, where H_{\mathcal{F}} \in \mathbb{F}_2^{m\times n} is the biadjacency matrix of \mathcal{F} (rows are checks, columns are bits). To get a good LDPC family we must check three things: linear distance, rate bounded below, and sparse parity checks. We take them one at a time.

Distance.

Theorem 3.4 (Sipser–Spielman, distance). If \htmlData{n=c2-factor-graph}{\mathcal{F}} is an \htmlData{n=c3-expander}{(\alpha,\varepsilon)}-expander with \htmlData{n=c3-eps}{\varepsilon} < 1/2, then every nonzero codeword of \htmlData{n=c3-CF}{C(\mathcal{F})} has weight greater than \htmlData{n=c3-alpha}{\alpha} n. That is, d(C(\mathcal{F})) > \alpha n.

Proof. Let 0 \ne x \in \mathbb{F}_2^n with \htmlData{n=c1-weight}{\lvert x\rvert} \le {\htmlData{n=c3-alpha}{\alpha}} n, and put S = \mathrm{supp}(x). By expansion and Lemma 3.3, \lvert {\htmlData{n=c3-US}{U(S)}}\rvert \ge (1 - 2\htmlData{n=c3-eps}{\varepsilon})c\lvert S\rvert > 0. Take v \in U(S): the check v meets S in exactly one bit, so (\htmlData{n=c3-HF}{H_{\mathcal{F}}}x)_v = 1. Hence x \notin \ker H_{\htmlData{n=c2-factor-graph}{\mathcal{F}}}. \square

Rate.

Proposition 3.5 (rate). \dim {\htmlData{n=c3-CF}{C(\mathcal{F})}} \ge n - m, i.e. the rate of C(\htmlData{n=c2-factor-graph}{\mathcal{F}}) is at least 1 - m/n. In particular, if m \le {\htmlData{n=c3-beta}{\beta}} n for a constant \beta < 1, the rate is at least 1 - \beta > 0.

Proof. \htmlData{n=c3-CF}{C(\mathcal{F})} is the kernel of the m \times n matrix \htmlData{n=c3-HF}{H_{\mathcal{F}}}, and \mathrm{rank}\,H_{\htmlData{n=c2-factor-graph}{\mathcal{F}}} \le m, since it has m rows. By rank–nullity, \dim\ker H_{\mathcal{F}} = n - \mathrm{rank}\,H_{\mathcal{F}} \ge n - m. \square

Two remarks:

LDPC. The column of \htmlData{n=c3-HF}{H_{\mathcal{F}}} belonging to the bit i has exactly \deg(i) = c ones, and the row of the check v has \deg(v) ones. So H_{\htmlData{n=c2-factor-graph}{\mathcal{F}}} is a sparse parity-check matrix (Definition 2.1) if and only if the check degrees are bounded by a constant r. Left-regularity gives the columns for free. For the rows we only know the average, \frac1m\sum_v\deg(v) = cn/m, which is a constant when m = \Theta(n). The maximum need not be bounded: in the random model of Proposition 3.10 it grows like \log n/\log\log n. The following lemma fixes this without losing anything.

Lemma 3.6 (splitting heavy checks). Let \htmlData{n=c2-factor-graph}{\mathcal{F}} be a left c-regular \htmlData{n=c3-expander}{(\alpha,\varepsilon)}-expander with n bits and m checks, and let r \ge 1 be an integer. Then there is a bipartite graph \htmlData{n=c3-Fprime}{\mathcal{F}'} on the same bits such that:

  • (i) every bit still has degree c, and every check of \mathcal{F}' has degree at most r;
  • (ii) \mathcal{F}' has m' \le m + cn/r checks;
  • (iii) \mathcal{F}' is again an (\htmlData{n=c3-alpha}{\alpha},\htmlData{n=c3-eps}{\varepsilon})-expander;
  • (iv) \mathcal{F}' is computable from \mathcal{F} in linear time, and \htmlData{n=c3-CF}{C(\mathcal{F}')} \subseteq C(\mathcal{F}).

Proof. For each check v, of degree d_v, partition its d_v edges into \lceil d_v/r\rceil blocks of size at most r, and replace v by \lceil d_v/r\rceil new checks, one for each block, each attached to the bits of its block.

(i) Every edge of \htmlData{n=c2-factor-graph}{\mathcal{F}} goes to exactly one new check, so the degrees of the bits do not change, and each new check has at most r edges.

(ii) m' = \sum_v\lceil {\htmlData{n=c3-dv}{d_v}}/r\rceil \le \sum_v\bigl(\frac{d_v}{r} + 1\bigr) = \frac{cn}{r} + m, since the d_v add up to the number cn of edges.

(iii) Write N'(S) for the neighbours of S in \htmlData{n=c3-Fprime}{\mathcal{F}'}, and let \pi send each new check to the old check it came from. If v \in {\htmlData{n=c3-NS}{N(S)}}, then some edge (i,v) with i \in S lies in some block of v, and the new check of that block is in N'(S) and is mapped to v. So \pi\colon N'(S) \to N(S) is onto, and \lvert N'(S)\rvert \ge \lvert N(S)\rvert \ge (1-\htmlData{n=c3-eps}{\varepsilon})c\lvert S\rvert for all \lvert S\rvert \le {\htmlData{n=c3-alpha}{\alpha}} n.

(iv) The parity check of v is the sum of the parity checks of its blocks, so every word that satisfies the new checks satisfies the old ones. \square

Putting it together.

Theorem 3.7 (good LDPC codes from lossless expanders). Fix constants c, \htmlData{n=c3-eps}{\varepsilon} < 1/2, \htmlData{n=c3-alpha}{\alpha} > 0 and \htmlData{n=c3-beta}{\beta} < 1, and let (\htmlData{n=c2-factor-graph}{\mathcal{F}}_n) be a family of left c-regular \htmlData{n=c3-expander}{(\alpha,\varepsilon)}-expanders with n \to \infty bits and m_n \le \beta n checks. Fix an integer r with \beta + c/r < 1, and let \htmlData{n=c3-Fprime}{\mathcal{F}_n'} be obtained from \mathcal{F}_n by Lemma 3.6. Then C_n = \htmlData{n=c3-CF}{C(\mathcal{F}_n')} is a good family of LDPC codes: it has relative distance greater than \alpha, rate at least 1 - \beta - c/r > 0, and a parity-check matrix with exactly c ones in every column and at most r in every row. If the \mathcal{F}_n are explicit, so are the C_n.

Proof. \htmlData{n=c3-Fprime}{\mathcal{F}_n'} is an \htmlData{n=c3-expander}{(\alpha,\varepsilon)}-expander by Lemma 3.6(iii), so the relative distance is greater than \htmlData{n=c3-alpha}{\alpha} by Theorem 3.4. It has at most \htmlData{n=c3-beta}{\beta} n + cn/r checks by (ii), so the rate is at least 1 - \beta - c/r by Proposition 3.5. The row and column weights are bounded by (i), and explicitness follows from (iv). \square

Two remarks:

3.3 The flip decoder

Expansion with \htmlData{n=c3-eps}{\varepsilon} < 1/4 gives more: a linear-time decoder.

Algorithm 3.8 (flip). Given a received word y: while some bit lies in more violated than satisfied checks, flip that bit. Output the result.

Theorem 3.9 (Sipser–Spielman, decoding). Let \htmlData{n=c2-factor-graph}{\mathcal{F}} be an \htmlData{n=c3-expander}{(\alpha,\varepsilon)}-expander with \htmlData{n=c3-eps}{\varepsilon} < 1/4. If y = x + e with x \in {\htmlData{n=c3-CF}{C(\mathcal{F})}} and \lvert e\rvert < (1-2\varepsilon)\htmlData{n=c3-alpha}{\alpha} n, the flip decoder outputs x, after at most c\lvert e\rvert flips. If every check has degree at most a constant r (as after Lemma 3.6), it runs in time O(n).

Proof. Let e_t be the error after t flips, so that the current word is x + e_t, and let u_t be the number of violated checks; since x is a codeword, a check is violated by x + e_t if and only if it is violated by e_t. Each flip strictly decreases u_t: the flipped bit had more violated than satisfied checks, and flipping it exchanges the two. Every violated check contains a bit of \mathrm{supp}\,e, so u_0 \le c\lvert e\rvert, and there are at most c\lvert e\rvert flips. For simplicity assume that \htmlData{n=c3-alpha}{\alpha} n is an integer.

Claim: if 0 < \lvert {\htmlData{n=c3-et}{e_t}}\rvert \le {\htmlData{n=c3-alpha}{\alpha}} n, some bit can be flipped. The unique neighbours of \mathrm{supp}\,e_t are violated checks, and by Lemma 3.3 there are at least (1-2\htmlData{n=c3-eps}{\varepsilon})c\lvert e_t\rvert > \frac{c}{2}\lvert e_t\rvert of them (as \varepsilon < 1/4). Each is adjacent to exactly one bit of e_t, so some bit of e_t has more than c/2 violated checks among its c checks, i.e. more violated than satisfied.

Claim: \lvert {\htmlData{n=c3-et}{e_t}}\rvert never exceeds \htmlData{n=c3-alpha}{\alpha} n. It starts below \alpha n and changes by 1 per flip, so otherwise \lvert e_t\rvert = \alpha n at some step t. At that moment every unique neighbour of \mathrm{supp}\,e_t is violated, so \htmlData{n=c3-ut}{u_t} \ge (1-2\htmlData{n=c3-eps}{\varepsilon})c\alpha n > c\lvert e\rvert \ge u_0 by Lemma 3.3, while u_t \le u_0. Contradiction.

So the algorithm cannot stop while \htmlData{n=c3-et}{e_t} \ne 0, and it stops after at most c\lvert e\rvert flips; it stops at e_t = 0, i.e. at x. For the running time keep, for each bit, the number of its violated checks, and a list of the flippable bits. Initializing them takes O(cn) steps. A flip changes the status of c checks, hence the counters of at most cr bits, so each flip costs O(cr), and the total is O(n). \square

3.4 Where lossless expanders come from

Random graphs: the union bound again. Random factor graphs are lossless, by the union bound of Gallager's proof applied to sets of bits instead of codewords.

Proposition 3.10 (random factor graphs are lossless). Let 0 < \htmlData{n=c3-eps}{\varepsilon} < 1, let c > 1/\varepsilon be an integer, and let \beta > 0. Take n bits and m = \lceil\beta n\rceil checks, and let every bit choose a set of c checks uniformly at random, independently of the other bits. Then there is \htmlData{n=c3-alpha}{\alpha} = \alpha(c,\varepsilon,\beta) > 0 such that the resulting factor graph is an \htmlData{n=c3-expander}{(\alpha,\varepsilon)}-expander with probability 1 - o(1) as n \to \infty.

Proof. Let 1 \le s \le {\htmlData{n=c3-alpha}{\alpha}} n, with \alpha \le {\htmlData{n=c3-beta}{\beta}}/c, and put t = \lfloor(1-\htmlData{n=c3-eps}{\varepsilon})cs\rfloor, so that t \le m. If a set S of s bits fails, i.e. \lvert {\htmlData{n=c3-NS}{N(S)}}\rvert < (1-\varepsilon)cs, then N(S) \subseteq T for some set T of t checks. For fixed S and T,

\Pr[\htmlData{n=c3-NS}{N(S)} \subseteq T] = \biggl(\binom tc\Big/\binom mc\biggr)^s \le \Bigl(\frac tm\Bigr)^{cs}.

A union bound over S and T, with \binom ab \le (ea/b)^b, gives

\begin{aligned} \Pr[\text{some } S \text{ of size } s \text{ fails}] &\le \binom ns\binom mt\Bigl(\frac tm\Bigr)^{cs} \le \Bigl(\frac{en}{s}\Bigr)^s e^t\Bigl(\frac tm\Bigr)^{cs-t}\\ &\le \Bigl[\htmlData{n=c3-K}{K}\Bigl(\frac sn\Bigr)^{\htmlData{n=c3-eps}{\varepsilon} c-1}\Bigr]^s, \end{aligned}

where K = e^{1+c}(c/\htmlData{n=c3-beta}{\beta})^{\htmlData{n=c3-eps}{\varepsilon} c}; here we used t \le cs, cs - t \ge \varepsilon cs and t/m \le cs/(\beta n) \le 1. Since c > 1/\varepsilon, the exponent \varepsilon c - 1 is positive. Now finish as in the proof of Theorem 2.6. Choose \htmlData{n=c3-alpha}{\alpha} with K\alpha^{\varepsilon c-1} \le 1/2. For s \le \sqrt n the bracket is at most Kn^{-(\varepsilon c-1)/2}, and for \sqrt n < s \le \alpha n it is at most 1/2. Summing over s,

\sum_{s \le \sqrt n}\bigl(\htmlData{n=c3-K}{K}n^{-(\htmlData{n=c3-eps}{\varepsilon} c-1)/2}\bigr)^s + \sum_{s > \sqrt n}2^{-s} \xrightarrow[n\to\infty]{} 0.

\square

Three remarks:

Why spectral expanders are not enough. Explicit spectral expanders (the Ramanujan graphs of Lubotzky–Phillips–Sarnak and Margulis, 1988) were known in 1996. Why not use them?

Explicit lossless expanders.

Summary of the lossless route. Lossless expansion is the natural route, but in 1996 it could be travelled only with random graphs. Sipser and Spielman therefore also took a second route, which needs only spectral expanders. Explicit lossless expanders are still rare, and most explicit constructions later in the year — the good LTCs and quantum codes of §8–§11 and §13 — take the spectral route too.

3.5 The spectral route: Tanner codes on spectral expanders

The idea. The edge–vertex incidence graph of a spectral expander X is never lossless, and with the parity check at every vertex the code is the cycle code, whose distance is the girth, O(\log N). The fix (Tanner 1981; Sipser–Spielman 1996): replace the parity check at each vertex by a local code of linear distance. A vertex touched by a nonzero codeword then sees not 2 but at least \htmlData{n=c2-delta0}{\delta_0}r of its edges. The local code supplies what losslessness supplied in the lossless route.

Setting and rate. Let X = (V,E) be an r-regular graph on N vertices, fix at every vertex v a bijection between the set \htmlData{n=c2-Ev}{E(v)} of edges at v and \{1,\dots,r\}, and let \htmlData{n=c2-C0}{C_0} \subseteq \mathbb{F}_2^r be a linear code with rate \htmlData{n=c2-rho0}{\rho_0} and relative distance \htmlData{n=c2-delta0}{\delta_0}. As in §2.4, the Tanner code is

\htmlData{n=c2-TXC0}{T(X, C_0)} = \{x \in \mathbb{F}_2^E : x|_{\htmlData{n=c2-Ev}{E(v)}} \in {\htmlData{n=c2-C0}{C_0}} \text{ for every } v \in V\}.

Bits live on edges, and each vertex demands that the word on its r edges be a local codeword. By Proposition 2.8, \dim {\htmlData{n=c2-TXC0}{T(X, C_0)}} \ge (\htmlData{n=c2-rate-bound}{2\rho_0 - 1})\lvert E\rvert: each vertex imposes r - \dim C_0 = (1-\htmlData{n=c2-rho0}{\rho_0})r linear constraints, so there are N(1-\rho_0)r = 2(1-\rho_0)\lvert E\rvert constraints in all. Moreover T(X, C_0) is LDPC: each vertex contributes (1-\rho_0)r checks of weight at most r, and each edge lies in the checks of its two endpoints only (Try it (6)). So we need \rho_0 > 1/2. The question is the distance.

The bipartite mixing lemma. Let X be r-regular and bipartite, with sides V_1 and V_2 of size \lvert V_1\rvert = \lvert V_2\rvert = M, so that N = 2M and \lvert E\rvert = rM. (Careful: V_1 and V_2 are not bits and checks; here all the bits are edges.) Let \lambda = \htmlData{n=c1-lambdaX}{\lambda(X)} as in Definition 1.10; for a bipartite graph this is the second largest singular value of the M \times M biadjacency matrix B, since the eigenvalues of the adjacency matrix are the singular values of B and their negatives. The bipartite case of Theorem 1.11 says that for all S \subseteq V_1 and T \subseteq V_2,

\Bigl\lvert {\htmlData{n=c1-EST}{E(S,T)}} - \frac{r\lvert S\rvert\lvert T\rvert}{\htmlData{n=c3-M}{M}}\Bigr\rvert \le {\htmlData{n=c3-lambda}{\lambda}}\sqrt{\lvert S\rvert\lvert T\rvert}.

In the language of singular values the proof is short: \htmlData{n=c1-EST}{E(S,T)} = \langle\mathbf{1}_S, B\mathbf{1}_T\rangle; decompose \mathbf{1}_S = \frac{\lvert S\rvert}{\htmlData{n=c3-M}{M}}\mathbf{1} + s and \mathbf{1}_T = \frac{\lvert T\rvert}{M}\mathbf{1} + t with s, t \perp \mathbf{1}. The constant parts give r\lvert S\rvert\lvert T\rvert/M, the cross terms vanish because B\mathbf{1} = B^{T}\mathbf{1} = r\mathbf{1}, and \lvert\langle s, Bt\rangle\rvert \le {\htmlData{n=c3-lambda}{\lambda}}\lVert s\rVert\lVert t\rVert \le \lambda\sqrt{\lvert S\rvert\lvert T\rvert} by the singular value decomposition. We use the lemma in one way only: a set in which every vertex has many neighbours inside the set must be large (Try it (4)).

The distance theorem.

Theorem 3.11 (distance of Tanner codes; Sipser–Spielman, Zémor). Let X be an r-regular bipartite graph as above, and let \htmlData{n=c2-C0}{C_0} \subseteq \mathbb{F}_2^r have relative distance \htmlData{n=c2-delta0}{\delta_0} > \htmlData{n=c3-lambda}{\lambda}/r. Then every nonzero x \in {\htmlData{n=c2-TXC0}{T(X, C_0)}} satisfies

\htmlData{n=c1-weight}{\lvert x\rvert} \ge \delta_0\Bigl(\delta_0 - \frac{\lambda}{r}\Bigr)\lvert E\rvert .

Proof. Let 0 \ne x \in {\htmlData{n=c2-TXC0}{T(X, C_0)}}, let S = \mathrm{supp}(x) \subseteq E, and let U_1 \subseteq {\htmlData{n=c3-V12}{V_1}} and U_2 \subseteq V_2 be the vertices touched by S on the two sides. Since x \ne 0, S contains an edge, whose endpoints lie in U_1 and in U_2; so both sets are nonempty, and u := \sqrt{\lvert U_1\rvert\lvert U_2\rvert} > 0.

Step 1 (local distance). If v \in {\htmlData{n=c3-ULUR}{U_1}} \cup U_2, then x|_{\htmlData{n=c2-Ev}{E(v)}} is a nonzero codeword of \htmlData{n=c2-C0}{C_0}, so v has at least \htmlData{n=c2-delta0}{\delta_0}r edges of S. Each edge of S has one endpoint in U_1 and one in U_2, hence

\lvert S\rvert \ge {\htmlData{n=c2-delta0}{\delta_0}}r\max(\lvert {\htmlData{n=c3-ULUR}{U_1}}\rvert, \lvert U_2\rvert) \ge \delta_0r\,\htmlData{n=c3-u}{u} .

Step 2 (mixing). Every edge of S joins \htmlData{n=c3-ULUR}{U_1} to U_2, so by the mixing lemma

\lvert S\rvert \le E(\htmlData{n=c3-ULUR}{U_1}, U_2) \le \frac{r\lvert U_1\rvert\lvert U_2\rvert}{\htmlData{n=c3-M}{M}} + \htmlData{n=c3-lambda}{\lambda}\sqrt{\lvert U_1\rvert\lvert U_2\rvert} = \frac{ru^2}{M} + \lambda {\htmlData{n=c3-u}{u}} .

Step 3 (combine). Steps 1 and 2 give a lower and an upper bound on the same quantity \lvert S\rvert, both in terms of the single variable \htmlData{n=c3-u}{u}: \htmlData{n=c2-delta0}{\delta_0}r\,u \le \lvert S\rvert \le \frac{ru^2}{\htmlData{n=c3-M}{M}} + \htmlData{n=c3-lambda}{\lambda} u. Dividing by ru > 0 and rearranging,

\htmlData{n=c2-delta0}{\delta_0} \le \frac uM + \frac{\htmlData{n=c3-lambda}{\lambda}} r \quad\Longrightarrow\quad {\htmlData{n=c3-u}{u}} \ge \Bigl(\delta_0 - \frac\lambda r\Bigr)\htmlData{n=c3-M}{M} .

Step 4 (back to the lower bound). Substituting this bound on \htmlData{n=c3-u}{u} into Step 1, and using \lvert E\rvert = rM,

\lvert S\rvert \ge {\htmlData{n=c2-delta0}{\delta_0}}r\,\htmlData{n=c3-u}{u} \ge \delta_0\Bigl(\delta_0 - \frac{\htmlData{n=c3-lambda}{\lambda}} r\Bigr)rM = \delta_0\Bigl(\delta_0 - \frac\lambda r\Bigr)\lvert E\rvert .

\square

Compare with the lossless route. There the graph certified that a small support has a violated check (unique neighbours). Here the local code certifies that each touched vertex sees many edges of the support, and the spectral gap says that such a dense set of vertices must be large.

For a non-bipartite X the same bound holds. One can run the argument on the bipartite double cover X \times K_2: a codeword x of \htmlData{n=c2-TXC0}{T(X, C_0)} lifts to a codeword of weight 2\lvert x\rvert of the Tanner code on X \times K_2, which has 2\lvert E\rvert edges, and the non-trivial eigenvalues of X \times K_2 are the \pm{\htmlData{n=c3-lambda}{\lambda}}_i with i \ge 2, so \lambda(X\times K_2) = \htmlData{n=c1-lambdaX}{\lambda(X)} for connected non-bipartite X. Or one can run it directly with the non-bipartite mixing lemma, counting each edge of S from both of its endpoints.

3.6 Explicit good LDPC codes

Corollary 3.12 (explicit good codes). Fix 0 < \htmlData{n=c2-delta0}{\delta_0} < 1/2 with \htmlData{n=c1-H}{H(\delta_0)} < 1/2. Choose a constant r with \htmlData{n=c1-ram-bound}{2\sqrt{r-1}}/r < \delta_0 and 1 - H(\delta_0) - 1/r > 1/2, and a linear code \htmlData{n=c2-C0}{C_0} \subseteq \mathbb{F}_2^r of relative distance at least \delta_0 and rate \htmlData{n=c2-rho0}{\rho_0} \ge 1 - H(\delta_0) - 1/r > 1/2. (It exists by Theorem 1.9, and it is found by brute force, since r is a constant.) Let (X_n) be an explicit family of r-regular bipartite Ramanujan graphs. Then T(X_n, C_0) is an explicit, asymptotically good family of LDPC codes, with

\text{rate} \ge {\htmlData{n=c2-rate-bound}{2\rho_0 - 1}} > 0, \qquad \text{relative distance} \ge \delta_0\Bigl(\delta_0 - \frac{2\sqrt{r-1}}{r}\Bigr) > 0 .

Proof. The rate is Proposition 2.8, the distance is Theorem 3.11 with \htmlData{n=c3-lambda}{\lambda} \le {\htmlData{n=c1-ram-bound}{2\sqrt{r-1}}} (Definition 1.15), and the LDPC property was noted at the start of §3.5. \square

Where the graphs come from (§1.3). For r - 1 = q a prime power, there are the Ramanujan graphs of Lubotzky–Phillips–Sarnak and Margulis (for q \equiv 1 \pmod 4 prime) and of Morgenstern (for every prime power q). Take the bipartite double cover if needed: its non-trivial eigenvalues are the \pm{\htmlData{n=c3-lambda}{\lambda}}_i of the original graph, so it is again Ramanujan. For every r: Marcus–Spielman–Srivastava (existence) and M. B. Cohen (polynomial-time construction).

Numbers. \htmlData{n=c2-delta0}{\delta_0} = 0.08 gives \htmlData{n=c1-H}{H(\delta_0)} \approx 0.402. With r = 7^4 + 1 = 2402 (Morgenstern) we may take \htmlData{n=c2-rho0}{\rho_0} \ge 0.597, and \htmlData{n=c3-lambda}{\lambda}/r \le 98/2402 \approx 0.041. Hence the rate is at least about 0.19 and the relative distance at least about 0.08\cdot 0.039 \approx 0.003. The constants are poor, but they are constants — and the construction is explicit.

The local code may change from vertex to vertex. The proof of Theorem 3.11 uses only that a nonzero local word has weight at least \htmlData{n=c2-delta0}{\delta_0}r, and Proposition 2.8 only counts constraints. So both hold verbatim for the general Tanner code of Definition 2.7 on the edges of X, with its own local code \htmlData{n=c2-Cv}{C_v} \subseteq \mathbb{F}_2^{\htmlData{n=c2-Ev}{E(v)}} at each vertex, as long as every C_v has relative distance at least \delta_0 and rate at least \htmlData{n=c2-rho0}{\rho_0}. In particular the bijections E(v) \to \{1,\dots,r\}, which were chosen arbitrarily, play no role. The spectral route needs no coherence between the local codes at neighbouring vertices, because two local views share only a single bit. The constructions later in the year lose this freedom (§3.8).

Decoding. Sipser and Spielman's decoder for these codes works at the level of vertices: each vertex looks at its local word and flips edges it is confident about. Zémor's decoder (2001), for bipartite X, alternates between the two sides: decode the local word at every vertex of \htmlData{n=c3-V12}{V_1} to the nearest codeword of C_0 (in parallel — the stars of the vertices of V_1 are disjoint), then the local word at every vertex of V_2, and so on. Zémor proved that this corrects every error pattern of weight up to a constant fraction of \lvert E\rvert, approaching \htmlData{n=c2-delta0}{\delta_0}^2/4 as \htmlData{n=c3-lambda}{\lambda}/r \to 0, in O(\log n) parallel rounds and linear total time.

3.7 The two routes side by side

lossless route (§3.1–§3.4) spectral route (§3.5–§3.6)
factor graph bits of degree c; small sets expand losslessly the edge–vertex incidence graph of an r-regular graph; never lossless
constraints single parities a local code of relative distance \htmlData{n=c2-delta0}{\delta_0} at every vertex, possibly different at different vertices
what certifies distance unique neighbours (Lemma 3.3) the local distance and the mixing lemma
distance \htmlData{n=c3-alpha}{\alpha} n (Theorem 3.4) \ge {\htmlData{n=c3-tanner-distance}{\delta_0(\delta_0 - \lambda/r)}}\lvert E\rvert (Theorem 3.11)
rate \ge 1 - \htmlData{n=c3-beta}{\beta} - c/r (Theorem 3.7) \ge {\htmlData{n=c2-rate-bound}{2\rho_0 - 1}} (Proposition 2.8)
LDPC column weight c, row weight \le r (Lemma 3.6) each check on \le r bits, each bit in \le 2(1-\htmlData{n=c2-rho0}{\rho_0})r checks
linear-time decoder the flip decoder (Theorem 3.9) Sipser–Spielman's, or Zémor's
explicit in 1996 no: random graphs (Proposition 3.10); explicit since 2002 (Capalbo–Reingold–Vadhan–Wigderson) yes: Ramanujan graphs

Linear-time encoding. Encoding a general linear code costs a matrix–vector product, O(n^2). Spielman (1996) gave asymptotically good codes that are linear-time encodable and decodable, by cascading expander-based error-reduction codes.

Looking ahead. Distance and decoding of expander codes are statements about small sets in a bipartite graph, and they follow from expansion by counting. Local testability will not: a word far from an expander code can look perfectly legal in every small window (§4). The split between the two routes runs through the rest of the year. §8–§11 follow the spectral route one dimension up, §12 the lossless route, and §13 both, in dimension four.

3.8 Why this shape matters later

A Tanner code on a graph is a code on a one-dimensional complex: bits on edges, constraints at vertices, and the constraint at a vertex is a code on its link (the set of edges at the vertex). §8 moves this up one dimension. The bits sit on the squares of a square complex and the constraints at vertices, and each vertex's link is a grid on which the constraint is a tensor code, the product code of Example 2.9. The extra dimension is what buys local testability. Keep the proof of Theorem 3.11 in mind: §8 repeats it verbatim with one Cayley graph of the square complex in place of X.

One thing does not survive the move: the freedom to choose the local codes independently. In the square complex every row of a local view is also a row of the local view at the other end of its edge, indexed the same way from both ends (Lemma 8.2), and the testability proof compares the two readings as words of one code (§9.2). So the row code must be the same at both ends of every edge. The edges that carry rows form the Cayley graph \htmlData{n=c8-cay}{\mathrm{Cay}(G,A)}, which is connected, so the row code is the same at every vertex, and likewise the column code: every vertex carries the same tensor code \htmlData{n=c8-CA}{C_A}\otimes C_B. The quantum Tanner codes of §11 are built the same way, and there the row codes at the two ends of an edge must be dual to each other: that is what makes the checks commute (Lemma 11.3). In the cubical Ramanujan complexes of §13 the local codes must moreover be invariant under the changes of coordinates that the complex imposes (§13.4). On a graph two local views share one bit and need not agree on anything; in a complex they share a piece of a code, and the codes must match.

Try it (9). Show that the edge–vertex incidence graph of an r-regular graph X (bits = edges, of degree 2; checks = vertices) is not an \htmlData{n=c3-expander}{(\alpha, \varepsilon)}-expander for any \htmlData{n=c3-eps}{\varepsilon} < 1/2 once X contains a cycle of length \le {\htmlData{n=c3-alpha}{\alpha}}\lvert E\rvert. Why does Theorem 3.11 say nothing when \htmlData{n=c2-C0}{C_0} is the parity code?

Try it (10). In the flip decoder (Theorem 3.9), correct bits may be flipped along the way. Show that nevertheless the total number of flips is at most c\lvert e\rvert.

Sources. Sipser–Spielman, Expander codes, IEEE Trans. Inform. Theory 42 (1996) — §§2–3 for the two routes; Tanner, A recursive approach to low complexity codes, IEEE Trans. Inform. Theory 27 (1981); Zémor, On expander codes, IEEE Trans. Inform. Theory 47 (2001); Spielman, Linear-time encodable and decodable error-correcting codes, IEEE Trans. Inform. Theory 42 (1996); Capalbo–Reingold–Vadhan–Wigderson, Randomness conductors and constant-degree lossless expanders, STOC 2002; Kahale, Eigenvalues and expansion of regular graphs, J. ACM 42 (1995); Hsieh–Lin–Mohanty–O'Donnell–Zhang, Explicit two-sided vertex expanders beyond the spectral barrier, STOC 2025, arXiv:2411.11627; Hsieh–Lubotzky–Mohanty–Reiner–Zhang, Explicit lossless vertex expanders, FOCS 2025, arXiv:2504.15087; Hoory–Linial–Wigderson §12 (expander codes) and §10 (lossless expanders); Guruswami–Rudra–Sudan, Ch. 11.

Answers to the exercises

Answer (9). The \ell edges of a cycle have exactly \ell vertex-neighbours, against c\ell = 2\ell edge-ends: \lvert {\htmlData{n=c3-NS}{N(S)}}\rvert = \frac12 c\lvert S\rvert, i.e. \htmlData{n=c3-eps}{\varepsilon} \ge 1/2. Bounded-degree graphs have cycles of length O(\log N) (Try it (5)), so this is always the case. With the parity code, Theorem 3.11 needs \htmlData{n=c2-delta0}{\delta_0} = 2/r > \htmlData{n=c3-lambda}{\lambda}/r, i.e. \lambda < 2, which no connected r-regular graph with r \ge 3 and many vertices satisfies (Theorem 1.14); and indeed the code is then the cycle code, whose distance is the girth. So Tanner codes need local codes of distance well above 2: in the spectral route the local code, not the graph, supplies what losslessness supplies in §3.1–§3.3.

Answer (10). Every flip lowers the number \htmlData{n=c3-ut}{u_t} of violated checks by at least one, whether the flipped bit was wrong or correct: the flip exchanges the violated and the satisfied checks of that bit, and it had more of the former. Since u_t \ge 0, there are at most u_0 flips. And u_0 \le c\lvert e\rvert, because every violated check contains a bit of \mathrm{supp}\,e, and each such bit lies in c checks.

Part B — Testing

4. Property testing and locally testable codes

Idea. The codes of the preceding chapters use small parity checks to obtain large distance and efficient decoding. Local testability asks for a further property: a word far from the code should violate a noticeable fraction of the checks, so that a few random queries detect a global defect. For the Hadamard code three queries suffice. Its test is the equation f(x) + f(y) = f(x+y), and the work is to show that satisfying this equation for most pairs forces agreement with one linear function on most inputs. For expander codes no constant number of queries suffices: their parity checks certify distance globally, through expansion, but a far-away word can look perfectly legal in every small window. The rest of the year is about codes whose local windows do see global distance. Testing is not only about codes, though: whether a map that almost respects a group law is close to a homomorphism, and whether permutations that almost satisfy the relations of a group are close to an action of the group, are testing questions too, and group theorists have studied the second for decades under the name stability.

Goal of the chapter (weeks 4–5). Week 4: define locally testable codes, and see on the repetition code that testability depends on the choice of checks, and that checks along an expander work; prove the BLR theorem twice, by self-correction (voting) and by Fourier analysis, see what each proof gives that the other does not, and combine them; extend the voting proof to homomorphisms between arbitrary finite groups, and see where Fourier analysis stops; see testing in group theory as stability of relations between permutations, and meet the group-theoretic results that §7 and §14 return to. Week 5: survey the history of short LTCs up to the c^3 question; state the Ben-Sasson–Harsha–Raskhodnikova theorem and understand its mechanism; introduce tensor codes and robust testability, the local ingredient of §8–§13; prove the Polishchuk–Spielman theorem (with the division lemma sketched) and the diagonal obstruction that makes its rate condition tight, and see why that condition shapes the c^3-codes and the quantum LTCs of 2026.

4.1 Local testability

Let \Sigma be a finite alphabet and let \htmlData{n=c1-code}{C \subseteq \Sigma^n} be a nonempty code. Given a received word w \in \Sigma^n, we would like to detect whether w is far from every codeword by reading only a few coordinates. Since a single altered coordinate can escape such a test, the rejection guarantee should depend on the distance from w to C. Write \mathrm{dist}(w, C) for the Hamming distance to the code, the number of coordinates that must be changed to obtain a codeword, and \overline{\mathrm{dist}}(w,C) = \mathrm{dist}(w,C)/n.

Definition 4.1 (locally testable code). A code \htmlData{n=c1-code}{C \subseteq \Sigma^n} is (q,\kappa)-locally testable if there is a randomized test that reads at most q coordinates of w, always accepts codewords, and satisfies

\Pr[\text{the tester rejects } w] \ge \kappa\cdot{\htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}}(w, C)

for every w \in \Sigma^n. Here q is the locality and \kappa > 0 the soundness. A family of codes is an LTC if these parameters can be chosen independently of the block length.

Soundness is what lets a constant number of queries tell codewords from far words. More generally, for any property P \subseteq \Sigma^n:

Definition 4.2 (tester). A q-query tester for P is a randomized algorithm that reads at most q positions of w and accepts or rejects. It has perfect completeness if it accepts every w \in P with probability 1, and it is an \varepsilon-tester if it rejects every w with \htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}(w,P) \ge \varepsilon with probability at least 2/3.

If C is (q,\htmlData{n=c4-soundness}{\kappa})-locally testable and \varepsilon > 0, run the test t times independently and reject if any trial rejects. Codewords are always accepted. If \htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}(w,C) \ge \varepsilon, all t trials accept with probability at most (1 - \kappa\varepsilon)^t \le e^{-t\kappa\varepsilon}. So t = \lceil\ln 3/(\kappa\varepsilon)\rceil repetitions give an \varepsilon-tester with at most qt queries, a number that does not depend on n when q, \kappa and \varepsilon are fixed.

Parity-check tests. For a binary linear code C = \htmlData{n=c1-pcm}{\ker H}, a natural test samples a row of H and checks its parity. If H has m rows, uniform sampling rejects with probability \lvert Hw\rvert/m, so the inequality of Definition 4.1 becomes

\frac{\lvert Hw\rvert}{m} \ge {\htmlData{n=c4-soundness}{\kappa}}\,\frac{\htmlData{n=c0-dist-set}{\mathrm{dist}(w, \ker H)}}{n}.

Bounded row weight makes the test local. The inequality is an additional requirement: a word far from the code must fail many parity checks. Every word not in C violates some check, but a word at distance \delta n may violate only a tiny fraction of them. For linear codes nothing is lost by restricting to such tests: a tester can always be taken to pick a dual codeword y \in {\htmlData{n=c1-dual}{C^\perp}} of weight \le q from some distribution and accept iff \langle w,y\rangle = 0 (Ben-Sasson–Harsha–Raskhodnikova: adaptivity and two-sided error do not help for linear properties). So a linear LTC is a code together with a distribution on its low-weight parity checks such that far words violate a proportional fraction of them.

The simplest example is the trivial code \{0^n\} \subseteq \mathbb{F}_2^n: sample one coordinate uniformly and reject if it is 1. The rejection probability is \lvert w\rvert/n = \htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}(w, C), so this is a (1,1)-LTC. The repetition code \{0^n, 1^n\} already shows that the choice of checks matters.

Example 4.3 (the repetition code along a path). Let H consist of the n - 1 checks w_i = w_{i+1}, and sample one of them uniformly. For even n take w = 0^{n/2}1^{n/2}. Then \htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}(w, C) = 1/2, but only the check at the transition fails: \lvert Hw\rvert = 1, and the rejection probability is 1/(n-1). Since this tends to 0, no constant \htmlData{n=c4-soundness}{\kappa} > 0 works for all n.

Example 4.4 (the repetition code, all pairs). Sample i, j \in [n] independently and uniformly, and reject if w_i \ne w_j. Let \alpha = \htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}(w, C) \le 1/2, the fraction of coordinates carrying the less frequent symbol. The rejection probability is 2\alpha(1-\alpha) \ge \alpha, so this is a (2,1)-LTC. But it uses all \binom n2 equality checks.

Example 4.5 (the repetition code along an expander). Let X = ([n], \htmlData{n=c4-error-locator}{E}) be an r-regular graph with edge expansion h(X) \ge h_0 (Definition 1.12), with r and h_0 > 0 independent of n. Sample an edge \{u,v\} uniformly and reject if w_u \ne w_v. Let S be the set of coordinates carrying the minority symbol (either symbol in case of a tie). Then \lvert S\rvert \le n/2 and \lvert S\rvert = \htmlData{n=c1-dist}{\mathrm{dist}}(w, C). A check fails exactly when its edge crosses from S to its complement, and \lvert E\rvert = rn/2, so

\Pr[\text{reject}] = \frac{\lvert {\htmlData{n=c1-EST}{E(S, [n]\setminus S)}}\rvert}{rn/2} \ge \frac{h_0\lvert S\rvert}{rn/2} = \frac{2h_0}{r}\,\htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}(w, C).

So this is a (2, 2h_0/r)-LTC with only rn/2 = O(n) checks.

On a path, half the coordinates can be wrong with only one failed check. Expansion forces the number of failed checks to be proportional to the distance from the code. The soundness 2h_0/r is the normalized Cheeger constant, and §6 reads this example as coboundary expansion in dimension 0 (Try it (21)).

Codes are one kind of property among many. Property testing as a subject (Rubinfeld–Sudan; Goldreich–Goldwasser–Ron) asks the same question for graphs, functions and distributions. One example a combinatorialist knows: in a dense graph on N vertices, “triangle-free” is testable with a constant number of queries to the adjacency matrix, because by the triangle removal lemma a graph that is \varepsilon-far from triangle-free (at least \varepsilon N^2 edges must be deleted) has at least c(\varepsilon)N^3 triangles, so a random triple of vertices is a triangle with probability at least 6c(\varepsilon). §4.3–§4.4 give examples from group theory.

4.2 Linearity testing

For k \ge 1, the Hadamard encoding is

a \in \mathbb{F}_2^k \longmapsto (a\cdot x)_{x\in\mathbb{F}_2^k} \in \mathbb{F}_2^{2^k}.

Its codewords are the linear functions \mathcal{L} = \{\ell_a : a \in \mathbb{F}_2^k\}, where \ell_a(x) = a\cdot x. It is a binary linear code of length n = 2^k, dimension k and minimum distance 2^{k-1} = n/2 (a nonzero linear function is 1 on exactly half of the points), so its rate k/2^k is tiny.

The BLR test chooses x, y \in \mathbb{F}_2^k independently and uniformly, queries f(x), f(y) and f(x+y), and accepts if f(x) + f(y) = f(x+y). It uses three queries and accepts every linear f. Conversely, a function that passes all the checks is linear, since f(\sum_i x_ie_i) = \sum_i x_if(e_i) by repeated use of them. Write

p_{\mathrm{rej}}(f) = \Pr_{x,y}\bigl[f(x) + f(y) \ne f(x+y)\bigr]

for the rejection probability, or \htmlData{n=c4-prej}{p_{\mathrm{rej}}} when f is fixed. Testing asks for a robust converse: if p_{\mathrm{rej}}(f) is small, is f close to \htmlData{n=c4-L}{\mathcal{L}}? The BLR theorem says that \htmlData{n=c0-dist-set}{\mathrm{dist}(f, \mathcal{L})} \le p_{\mathrm{rej}}(f)\,n for every f. We prove it twice. First we construct the nearby linear function by voting and prove a weaker bound (Blum–Luby–Rubinfeld). Then Fourier analysis gives the stated constant (Bellare–Coppersmith–Håstad–Kiwi–Sudan). Each proof gives something the other does not, and the course uses both.

Self-correction by voting. If f were linear, then f(x) = f(r) + f(x+r) for every r. Accordingly, define the vote of r for the value at x, and the majority vote, by

\htmlData{n=c4-Vx}{V_x}(r) = f(r) + f(x+r), \qquad g(x) = \mathrm{Maj}_{r\in\mathbb{F}_2^k}V_x(r),

breaking ties arbitrarily. The vote V_x(r) differs from f(x) exactly when the BLR test fails on the pair (x,r). So the rejection probability is the average fraction of votes that disagree with the received value:

\htmlData{n=c4-prej}{p_{\mathrm{rej}}} = \mathbb{E}_x\Pr_r\bigl[\htmlData{n=c4-Vx}{V_x}(r) \ne f(x)\bigr].

If g(x) \ne f(x), at least half of the votes at x disagree with f(x). Hence \htmlData{n=c1-dist}{\mathrm{dist}}(f, g) \le 2\htmlData{n=c4-prej}{p_{\mathrm{rej}}}n for every f. It remains to prove that g is linear, and on the way the constant improves.

Theorem 4.6 (Blum–Luby–Rubinfeld: voting correction). Let f : \mathbb{F}_2^k \to \mathbb{F}_2, n = 2^k, and \htmlData{n=c4-prej}{p_{\mathrm{rej}}}(f) < 2/9. Then the majority correction g is linear and \htmlData{n=c1-dist}{\mathrm{dist}}(f, g) \le \frac32\,p_{\mathrm{rej}}(f)\,n. Consequently p_{\mathrm{rej}}(f) \ge \frac29\,\htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}(f, \htmlData{n=c4-L}{\mathcal{L}}) for every f, and the Hadamard code is a (3, \frac29)-LTC.

The proof rests on one identity. For all a, b and r,

V_a(r) + V_b(a+r) = V_{a+b}(r),

because the shared term f(a+r) cancels:

\underbrace{f(r) + f(a+r)}_{V_a(r)} + \underbrace{f(a+r) + f(a+b+r)}_{V_b(a+r)} = \underbrace{f(r) + f(a+b+r)}_{V_{a+b}(r)} .

If a single r made all three votes equal to their majorities, the identity would give g(a) + g(b) = g(a+b). How strong must the majorities be for such an r to exist? Three sets of measure greater than 1/2 need not have a common point. But if each has measure greater than 2/3, their complements have total measure less than 1, so some r lies in all three (Figure 4.1).

Figure 4.1. Majorities of 2/3 are not enough. Each row shows the space of voters r: green where a vote equals its majority (for the events A, B, C in the proof of Theorem 4.6), red where it does not. Each support has measure exactly 2/3, but the three red sets cover the whole space, so A\cap B\cap C = \emptyset. If every red set has measure less than 1/3, their union has measure less than 1, and some r lies in all three supports.

Lemma 4.7 (supermajority). If \htmlData{n=c4-prej}{p_{\mathrm{rej}}}(f) < 2/9, then \Pr_r\bigl[\htmlData{n=c4-Vx}{V_x}(r) = g(x)\bigr] > 2/3 for every x \in \mathbb{F}_2^k.

Proof. The bound on \htmlData{n=c4-prej}{p_{\mathrm{rej}}} gives no small upper bound on \Pr_r[\htmlData{n=c4-Vx}{V_x}(r) \ne f(x)] for a prescribed x, since f(x) itself may have been corrupted. Instead, compare two votes for x with each other. Write

\htmlData{n=c4-qx}{q_x} = \Pr_r\bigl[\htmlData{n=c4-Vx}{V_x}(r) \ne g(x)\bigr] \le \tfrac12

for the minority fraction at x. Fix x, and choose r and s independently and uniformly. Consider the two BLR checks

f(r) + f(s) = f(r+s), \qquad f(x+r) + f(x+s) = f(r+s),

which have the same right-hand side because (x+r) + (x+s) = r+s. If both pass, their sum gives \htmlData{n=c4-Vx}{V_x}(r) = V_x(s) (Figure 4.2). The checks with the fixed input x have been replaced by checks whose two inputs are uniform: each of the pairs (r,s) and (x+r, x+s) is uniform on (\mathbb{F}_2^k)^2, so each check fails with probability \htmlData{n=c4-prej}{p_{\mathrm{rej}}}. The two pairs are not independent, but a union bound does not need that:

\Pr_{r,s}\bigl[\htmlData{n=c4-Vx}{V_x}(r) \ne V_x(s)\bigr] \le 2\htmlData{n=c4-prej}{p_{\mathrm{rej}}}.

The votes are binary, so they disagree exactly when one is a majority vote and the other a minority vote. Hence 2\htmlData{n=c4-qx}{q_x}(1 - q_x) \le 2\htmlData{n=c4-prej}{p_{\mathrm{rej}}} < 4/9, i.e. q_x < 1/3 or q_x > 2/3. Since q_x \le 1/2, we get q_x < 1/3. \square

Figure 4.2. Comparing two votes for a fixed x (proof of Lemma 4.7). Top: the four values read by the two checks. If both rows sum to f(r+s), the two columns have equal sums, so a disagreement between the votes \htmlData{n=c4-Vx}{V_x}(r) and V_x(s) forces one of the two checks to fail. Bottom: the product space of two independent votes, split into majority (1 - \htmlData{n=c4-qx}{q_x}) and minority (q_x); the picture uses an illustrative value of q_x. The votes disagree exactly on the two red rectangles, of total area 2q_x(1-q_x), which is at most 2\htmlData{n=c4-prej}{p_{\mathrm{rej}}}. At q_x = 1/3 the red area is 4/9.

Proof of Theorem 4.6. Additivity. Fix a and b, and use a common random voter r in the identity above. The events

A = \{V_a(r) = g(a)\}, \qquad B = \{V_b(a+r) = g(b)\}, \qquad C = \{V_{a+b}(r) = g(a+b)\}

fail with probabilities q_a, q_b and q_{a+b}; for B this uses that a + r is uniform. By Lemma 4.7, \Pr[A\cap B\cap C] \ge 1 - q_a - q_b - q_{a+b} > 0. For an r in all three events, the identity gives g(a) + g(b) = g(a+b). So g is linear.

Distance to f. If g(x) \ne f(x), every majority vote at x disagrees with f(x), so the BLR test on (x,r) fails with probability 1 - \htmlData{n=c4-qx}{q_x} > 2/3. Averaging over x,

\htmlData{n=c4-prej}{p_{\mathrm{rej}}} = \mathbb{E}_x\Pr_r\bigl[\htmlData{n=c4-Vx}{V_x}(r) \ne f(x)\bigr] \ge \mathbb{E}_x\bigl[\mathbf{1}_{f(x)\ne g(x)}(1 - \htmlData{n=c4-qx}{q_x})\bigr] \ge \frac{2}{3n}\,\htmlData{n=c1-dist}{\mathrm{dist}}(f,g),

which is the distance bound. Finally, if \htmlData{n=c4-prej}{p_{\mathrm{rej}}} < 2/9 this gives p_{\mathrm{rej}} \ge \frac23\htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}(f,g) \ge \frac29\overline{\mathrm{dist}}(f,\htmlData{n=c4-L}{\mathcal{L}}), and if p_{\mathrm{rej}} \ge 2/9 then p_{\mathrm{rej}} \ge \frac29 \ge \frac29\overline{\mathrm{dist}}(f,\mathcal{L}). \square

Local correction. The construction also gives a local corrector. Once \htmlData{n=c4-prej}{p_{\mathrm{rej}}} < 2/9, the value g(x) at any prescribed x is recovered with probability greater than 2/3 by querying f(r) and f(x+r) for a single random r (Lemma 4.7). The majority of O(\log(1/\eta)) independent votes reduces the failure probability to at most \eta. So the Hadamard code is also locally correctable. This is what makes it useful in proofs. To check a claim \ell(\alpha) = b about the codeword \ell near f, a verifier reads f(r) + f(\alpha + r) at a random r, not f(\alpha), which a cheating prover could have corrupted. This is how the Hadamard-based assignment testers of §5.7 use the code.

Voting decodes. If \htmlData{n=c1-dist}{\mathrm{dist}}(f, \ell) = \delta n for a linear function \ell and \delta < 1/4, then for every x

\Pr_r\bigl[\htmlData{n=c4-Vx}{V_x}(r) \ne \ell(x)\bigr] \le \Pr_r\bigl[f(r) \ne \ell(r)\bigr] + \Pr_r\bigl[f(x+r) \ne \ell(x+r)\bigr] = 2\delta < \tfrac12,

so g = \ell. This direction assumes that f is close to a codeword. BLR proves that g is linear from the acceptance probability of the test alone, without assuming that in advance.

Why the identity works: short dependencies. The heart of the proof is the vote identity. It holds because the BLR checks have short dependencies. The four checks on the triples

\{a,\,b,\,a+b\},\quad \{r,\,a,\,a+r\},\quad \{a+r,\,b,\,a+b+r\},\quad \{r,\,a+b,\,a+b+r\}

involve six points (distinct for all but a few r), each of them in exactly two of the triples. So the four parity checks add up to zero, and every word satisfies an even number of them. The events A, B, C are the last three checks, applied to the word that equals g at a, b, a+b and f everywhere else. The dependency then makes that word satisfy the first check, which is g(a) + g(b) = g(a+b). Put the other way round, a violated check cannot be isolated: of the other three checks in such a quadruple, an odd number are violated too. This is the local-to-global mechanism behind every LTC in these notes. §6 shows that it is a cone argument (Proposition 6.3), and coboundary expansion is its generalization.

The Fourier proof. For the second proof, write the domain group multiplicatively:

G = \{-1,1\}^k, \qquad uv = (u_1v_1,\dots,u_kv_k), \qquad \mathbf{1} = (1,\dots,1).

The block length is still n = \lvert G\rvert = 2^k. The isomorphism \iota : \mathbb{F}_2^k \to G, \iota(x)_i = (-1)^{x_i}, turns addition into multiplication. Encode the output by the same rule, 0 \mapsto 1 and 1 \mapsto -1, and keep writing f for the resulting function G \to \{-1,1\}. The test and the codewords now take the forms

f(u)f(v) = f(uv), \qquad {\htmlData{n=c4-chi}{\chi_S}}(u) = \prod_{i\in S}u_i \quad (S \subseteq [k]).

The \chi_S are exactly the characters of G, and \chi_S corresponds to the linear form \htmlData{n=c4-ell-a}{\ell_a} with S = \{i : a_i = 1\}.

Recall that for a finite abelian group A, its complex characters \chi : A \to \mathbb{C}^\times form an orthonormal basis of the functions A \to \mathbb{C}, for the inner product and Fourier coefficients

\langle H, K\rangle = \mathbb{E}_{z\in A}{\htmlData{n=c1-H}{H(z)}}\overline{K(z)}, \qquad \widehat{H}(\chi) = \langle H, \chi\rangle,

and with the convolution (H*K)(z) = \mathbb{E}_{t\in A}{\htmlData{n=c1-H}{H(t)}}K(t^{-1}z). Fourier inversion, Parseval's identity and the convolution rule read

H = \sum_{\chi}\widehat{H}(\chi)\chi, \qquad \langle H, K\rangle = \sum_\chi\widehat{H}(\chi)\overline{\widehat{K}(\chi)}, \qquad \widehat{H*K}(\chi) = \widehat{H}(\chi)\widehat{K}(\chi).

For A = G = \{-1,1\}^k the characters are real, and for real f

\widehat{f}(S) = \mathbb{E}_uf(u)\htmlData{n=c4-chi}{\chi_S}(u), \qquad f = \sum_{S\subseteq[k]}\widehat{f}(S)\chi_S, \qquad \sum_S\widehat{f}(S)^2 = \mathbb{E}_uf(u)^2 .

For a Boolean f : G \to \{-1,1\}, Parseval gives \sum_S\htmlData{n=c4-Fhat}{\widehat{f}}(S)^2 = 1, and the correlation with a character determines the Hamming distance:

\htmlData{n=c4-Fhat}{\widehat{f}}(S) = \Pr[f = \htmlData{n=c4-chi}{\chi_S}] - \Pr[f \ne \chi_S] = 1 - \frac2n\,\htmlData{n=c1-dist}{\mathrm{dist}}(f, \chi_S).

So finding a nearby codeword is exactly the problem of finding a large positive Fourier coefficient.

Theorem 4.8 (BLR soundness; Bellare–Coppersmith–Håstad–Kiwi–Sudan). For every f : G \to \{-1,1\}, put \htmlData{n=c4-prej}{p_{\mathrm{rej}}}(f) = \Pr_{u,v}[f(u)f(v) \ne f(uv)]. Then

\min_{S\subseteq[k]}{\htmlData{n=c1-dist}{\mathrm{dist}}}(f, \htmlData{n=c4-chi}{\chi_S}) \le p_{\mathrm{rej}}(f)\,n .

In the original bit notation, \htmlData{n=c0-dist-set}{\mathrm{dist}(f, \mathcal{L})} \le p_{\mathrm{rej}}(f)\,n, and the Hadamard code is a (3,1)-LTC.

Proof. The product f(u)f(v)f(uv) is 1 on acceptance and -1 on rejection. Taking expectations,

1 - 2\htmlData{n=c4-prej}{p_{\mathrm{rej}}} = \mathbb{E}_{u,v}\,f(u)f(v)f(uv).

To express this in Fourier coefficients, note that the three factors are coupled through the product uv, so convolution is the appropriate operation. Set z = uv. The map (u,v) \mapsto (u,z) is a bijection of G^2, so u and z are again independent and uniform, and v = uz (every element of G is its own inverse). Hence, by the convolution rule and Parseval (the coefficients are real),

\begin{aligned} \mathbb{E}_{u,v}\,f(u)f(v)f(uv) &= \mathbb{E}_z f(z)\,\mathbb{E}_uf(u)f(uz) = \langle f*f, f\rangle\\ &= \sum_S\htmlData{n=c4-Fhat}{\widehat{f}}(S)^2\,\widehat{f}(S) = \sum_S\widehat{f}(S)^3 . \end{aligned}

Let \htmlData{n=c4-M}{M} = \max_S\htmlData{n=c4-Fhat}{\widehat{f}}(S). Since the \widehat{f}(S)^2 are nonnegative and add up to 1, the cubic sum is a weighted average of the coefficients:

1 - 2\htmlData{n=c4-prej}{p_{\mathrm{rej}}} = \sum_S\underbrace{\htmlData{n=c4-Fhat}{\widehat{f}}(S)^2}_{\text{weights summing to } 1}\widehat{f}(S) \le {\htmlData{n=c4-M}{M}} .

Choose S^* attaining \htmlData{n=c4-M}{M}. Then \htmlData{n=c1-dist}{\mathrm{dist}}(f, \htmlData{n=c4-chi}{\chi_{S^*}}) = \frac{n(1 - M)}{2} \le {\htmlData{n=c4-prej}{p_{\mathrm{rej}}}}\,n. \square

The cubic identity can also be seen directly from orthogonality. Expand the three factors and use the multiplicativity of \chi_U:

\begin{aligned} \mathbb{E}_{u,v}\,f(u)f(v)f(uv) &= \sum_{S,T,U}{\htmlData{n=c4-Fhat}{\widehat{f}}}(S)\widehat{f}(T)\widehat{f}(U)\;\mathbb{E}_u\bigl[\htmlData{n=c4-chi}{\chi_S}(u)\chi_U(u)\bigr]\;\mathbb{E}_v\bigl[\chi_T(v)\chi_U(v)\bigr]\\ &= \sum_U\widehat{f}(U)^3 . \end{aligned}

Orthogonality forces S = U in the u-average and T = U in the v-average. In the language of Cayley graphs, \langle f*f, f\rangle is a spectral quantity on \mathbb{F}_2^k: the characters diagonalize convolution, and the proof says “the only eigenvalue near the top is the one you started from”.

Far from the code. The Fourier proof also applies when acceptance is far from 1. If the test accepts with probability at least \frac12 + \htmlData{n=c4-gamma}{\gamma}, then 1 - 2\htmlData{n=c4-prej}{p_{\mathrm{rej}}} \ge 2\gamma, so some character has correlation at least 2\gamma with f, and hence agrees with f on at least a \frac12 + \gamma fraction of G. Here the voting proof says nothing, because there need not be a single “nearby” linear function to vote for. For example, f(x) = x_1x_2 agrees with each of 0, x_1 and x_2 on 3/4 of the inputs, and p_{\mathrm{rej}}(f) = 3/8 > 2/9. This “1\% regime” (acceptance bounded away from 1/2, rather than close to 1) is the one that Håstad's optimal hardness results need.

Finding the codeword. A character with maximal Fourier coefficient is a nearest codeword. Given the full truth table, all the coefficients can be computed. Voting, in contrast, recovers any prescribed value of the corrected function with a few queries.

The two proofs give the same codeword. Return to bit notation and suppose \htmlData{n=c4-prej}{p_{\mathrm{rej}}}(f) < 2/9. Theorem 4.8 supplies a linear function \ell with \htmlData{n=c1-dist}{\mathrm{dist}}(f, \ell) \le p_{\mathrm{rej}}(f)\,n < n/4. The two-query bound in “voting decodes” then gives \Pr_r[\htmlData{n=c4-Vx}{V_x}(r) \ne \ell(x)] \le 2p_{\mathrm{rej}}(f) < 1/2 for every x, so g = \ell. Combining the proofs therefore improves the distance bound of the voting correction to \mathrm{dist}(f, g) \le p_{\mathrm{rej}}(f)\,n. Since distinct Hadamard codewords are n/2 apart, g is also the unique nearest codeword.

What each proof gives.

In short, the Fourier proof is a spectral argument and the voting proof is a coboundary argument. These are the two kinds of high-dimensional expansion of §6, and local spectral expansion does not imply coboundary expansion (§6.4). On \mathbb{F}_2^k both arguments work. On the complexes behind c^3-LTCs only the second kind is available, so the course follows it.

4.3 Testing homomorphisms of finite groups

The oldest form of the testing question is Ulam's (1960): is a map that is almost a homomorphism close to a homomorphism? Let G and H be finite groups, written multiplicatively, and set n = \lvert G\rvert. The analogue of the Hadamard code is

C = \mathrm{Hom}(G, H) \subseteq H^G,

a code of length n over the alphabet H, nonempty since it contains the trivial homomorphism. For f : G \to H, sample x and y independently and uniformly, and test f(x)f(y) = f(xy). Write

\htmlData{n=c4-prej}{p_{\mathrm{rej}}}(f) = \Pr_{x,y}\bigl[f(x)f(y) \ne f(xy)\bigr].

Taking H = \{-1,1\} keeps the binary alphabet while allowing an arbitrary domain group. The voting argument also permits an arbitrary H.

Voting. A homomorphism satisfies f(x) = f(xr)f(r)^{-1}, so define

\htmlData{n=c4-Vx}{V_x}(r) = f(xr)f(r)^{-1}, \qquad g(x) = \text{a most frequent value of } V_x(r),

choosing any most frequent value in case of a tie. Again \htmlData{n=c4-Vx}{V_x}(r) \ne f(x) is exactly a failed test on (x, r).

Theorem 4.9 (homomorphism testing; Ben-Or–Coppersmith–Luby–Rubinfeld). Let G and H be finite groups, n = \lvert G\rvert, and f : G \to H with \htmlData{n=c4-prej}{p_{\mathrm{rej}}}(f) < 2/9. Then g is a homomorphism and \htmlData{n=c1-dist}{\mathrm{dist}}(f, g) \le \frac32\,p_{\mathrm{rej}}(f)\,n. Consequently p_{\mathrm{rej}}(f) \ge \frac29\,\htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}(f, \mathrm{Hom}(G,H)) for every f, and \mathrm{Hom}(G,H) is a (3, \frac29)-LTC. Neither group need be abelian.

Proof. We again show that more than 2/3 of the votes support g(x) at every x. The new point is that the votes can now take more than two values.

Fix x, and choose r and s independently and uniformly. To compare their votes, use the two checks

f(r)f(r^{-1}s) = f(s), \qquad f(xr)f(r^{-1}s) = f(xs).

If both hold, then \htmlData{n=c4-Vx}{V_x}(s) = f(xr)f(r^{-1}s)\bigl(f(r)f(r^{-1}s)\bigr)^{-1} = f(xr)f(r)^{-1} = V_x(r). Each of the pairs (r, r^{-1}s) and (xr, r^{-1}s) is uniform on G^2, so the same union bound gives \Pr_{r,s}[V_x(r) \ne V_x(s)] \le 2\htmlData{n=c4-prej}{p_{\mathrm{rej}}}.

Put p_x(h) = \Pr_r[\htmlData{n=c4-Vx}{V_x}(r) = h] and \htmlData{n=c4-qx}{q_x} = 1 - p_x(g(x)). To obtain a majority, observe that

1 - 2\htmlData{n=c4-prej}{p_{\mathrm{rej}}} \le \Pr_{r,s}\bigl[\htmlData{n=c4-Vx}{V_x}(r) = V_x(s)\bigr] = \sum_{h\in H}p_x(h)^2 \le \max_{h\in H}p_x(h) = 1 - \htmlData{n=c4-qx}{q_x} .

Consequently \htmlData{n=c4-qx}{q_x} \le 2\htmlData{n=c4-prej}{p_{\mathrm{rej}}} < 1/2. A pair with one vote for g(x) and one against it must disagree, so 2q_x(1-q_x) \le \Pr_{r,s}[\htmlData{n=c4-Vx}{V_x}(r) \ne V_x(s)] \le 2p_{\mathrm{rej}}, and as before p_{\mathrm{rej}} < 2/9 gives q_x < 1/3.

The cancellation identity must respect the order of multiplication:

V_a(br)\,V_b(r) = f(abr)f(br)^{-1}f(br)f(r)^{-1} = V_{ab}(r).

For fixed a and b, each of the three votes equals its majority with probability greater than 2/3 (for the first, br is uniform). So some r makes all three agree with their majorities, giving g(a)g(b) = g(ab). Hence g \in \mathrm{Hom}(G,H).

Finally, if f(x) \ne g(x), the test on (x,r) fails whenever \htmlData{n=c4-Vx}{V_x}(r) = g(x), with probability 1 - \htmlData{n=c4-qx}{q_x} > 2/3. Averaging gives \htmlData{n=c4-prej}{p_{\mathrm{rej}}} \ge \frac{2}{3n}{\htmlData{n=c1-dist}{\mathrm{dist}}}(f,g), i.e. the distance bound. For p_{\mathrm{rej}} \ge 2/9, use \mathrm{dist}(f, C) \le n. \square

Where Fourier analysis stops. Let G be abelian and take H = \{-1,1\}, so f : G \to \{-1,1\}. Convolution and Parseval still give

1 - 2\htmlData{n=c4-prej}{p_{\mathrm{rej}}} = \langle f*f, f\rangle = \sum_{\chi\in\widehat{G}}{\htmlData{n=c4-Fhat}{\widehat{f}}}(\chi)^2\,\overline{\widehat{f}(\chi)} = \sum_{\chi\in\widehat{G}}\lvert\widehat{f}(\chi)\rvert^2\,\mathrm{Re}\,\widehat{f}(\chi),

where the last equality takes real parts, the left side being real. Since \sum_\chi\lvert{\htmlData{n=c4-Fhat}{\widehat{f}}}(\chi)\rvert^2 = 1, this yields a character with \mathrm{Re}\,\widehat{f}(\chi) \ge 1 - 2\htmlData{n=c4-prej}{p_{\mathrm{rej}}}, and so an approximation in mean square:

\mathbb{E}_{x\in G}\lvert f(x) - \chi(x)\rvert^2 = 2 - 2\,\mathrm{Re}\,\htmlData{n=c4-Fhat}{\widehat{f}}(\chi) \le 4\htmlData{n=c4-prej}{p_{\mathrm{rej}}} .

But \chi may take values outside \{-1,1\}. Then it does not belong to the code \mathrm{Hom}(G, \{-1,1\}), and the identity between correlation and Hamming distance no longer applies to it. This is where the Boolean Fourier proof stops, and the constant 1 of Theorem 4.8 does not survive:

Example 4.10 (\mathbb{Z}/3). Let G = \langle a : a^3 = e\rangle and f(e) = 1, f(a) = f(a^2) = -1. The test fails only on (a,a) and (a^2,a^2), so \htmlData{n=c4-prej}{p_{\mathrm{rej}}}(f) = 2/9. The only homomorphism G \to \{-1,1\} is the constant 1, at distance 2 from f, whereas p_{\mathrm{rej}}(f)\lvert G\rvert = 2/3. So \htmlData{n=c1-dist}{\mathrm{dist}}(f, \mathrm{Hom}(G,\{-1,1\})) \le p_{\mathrm{rej}}(f)\lvert G\rvert fails. The large Fourier coefficients, both equal to 2/3, belong to the two nonreal characters. The weaker bound p_{\mathrm{rej}} \ge \frac29\htmlData{n=c4-distbar}{\overline{\mathrm{dist}}} of Theorem 4.9 does hold: \frac29 \ge \frac29\cdot\frac23.

4.4 Testing in group theory: stability

In §4.3 the object being tested is a function on the group: the code \mathrm{Hom}(G,H) has length \lvert G\rvert. Group theorists ask a different version, in which the group is fixed, possibly infinite, and the target grows: are almost-actions of a fixed group close to actions?

Let \mathrm{Sym}(n) carry the normalized Hamming distance d(\sigma,\tau) = \frac1n\lvert\{x : \sigma(x) \ne \tau(x)\}\rvert, which is invariant under multiplication on both sides. Let \Gamma = \langle S\mid R\rangle be a finitely presented group, with S finite and R a finite set of words in S^{\pm1}. A tuple \sigma = (\sigma_s)_{s\in S} \in \mathrm{Sym}(n)^S is a solution of R if w(\sigma) = \mathrm{id} for every w \in R. Equivalently, s \mapsto \sigma_s extends to a homomorphism \Gamma \to \mathrm{Sym}(n), i.e. an action of \Gamma on \{1,\dots,n\}.

Definition 4.11 (stability in permutations). \htmlData{n=c4-Gamma}{\Gamma} = \langle S\mid R\rangle is stable in permutations if for every \varepsilon > 0 there is \delta > 0 such that, for every n, every \sigma \in {\htmlData{n=c4-SymS}{\mathrm{Sym}(n)^S}} with \sum_{w\in R}{\htmlData{n=c4-dsym}{d}}(\htmlData{n=c4-w-sigma}{w(\sigma)},\mathrm{id}) < \delta is \varepsilon-close to a solution: some solution \tau \in {\htmlData{n=c4-Sym}{\mathrm{Sym}(n)}}^S has \sum_{s\in S}d(\sigma_s,\tau_s) < \varepsilon. This depends only on \Gamma, not on the presentation.

Stability is property testing. The property is the set of solutions inside \htmlData{n=c4-SymS}{\mathrm{Sym}(n)^S}, with the distance \sum_s \htmlData{n=c4-dsym}{d}(\sigma_s,\tau_s). The relation test picks a relation w \in R and a point x uniformly at random, and checks \htmlData{n=c4-w-sigma}{w(\sigma)}(x) = x by following x through the letters of w. It makes \lvert w\rvert queries (a query may ask for \sigma_s^{-1}(y) as well as \sigma_s(x)), a constant number. It has perfect completeness, and it rejects with probability \frac1{\lvert R\rvert}\sum_w d(w(\sigma),\mathrm{id}). Stability says exactly that a tuple at distance at least \varepsilon from the solutions is rejected with probability at least \delta(\varepsilon)/\lvert R\rvert, so repeating the relation test O(\lvert R\rvert/\delta(\varepsilon)) times gives an \varepsilon-tester for every \varepsilon (Definition 4.2). If the rejection probability is at least \htmlData{n=c4-soundness}{\kappa} times the distance, as in Definition 4.1, the group is called linearly stable. Becker–Lubotzky–Mosheiff allow any constant-query tester, and call \htmlData{n=c4-Gamma}{\Gamma} testable when one exists.

What is known, in brief:

Try it (11). Take a linear function and flip each of its 2^k values independently with probability \eta < 1/4. Estimate the rejection probability of the BLR test, and conclude that the soundness \kappa = 1 of Theorem 4.8 is far from tight at small distances.

Try it (12). Let \sigma \in {\htmlData{n=c4-Sym}{\mathrm{Sym}(n)}} with \htmlData{n=c4-dsym}{d}(\sigma^2,\mathrm{id}) = \delta. Find an involution \tau with d(\sigma,\tau) \le \delta. Conclude that \mathbb{Z}/2 = \langle s \mid s^2\rangle is linearly stable, with the relation test of soundness \kappa = 1.

Week 5. Week 4 met the definitions; the repetition code, which is testable along an expander; the BLR test for the Hadamard code, proved twice (by voting, which is the argument the rest of the course generalizes, and by Fourier analysis, which gives the sharp constant); and homomorphism testing for arbitrary finite groups, where only the voting proof survives. This meeting returns to codes: how short a locally testable code can be, and why the good codes of §2–§3 are not testable. Then it covers the tensor codes from which §8–§13 build testable ones, and the theorem of the week. Polishchuk–Spielman: Reed–Solomon tensor codes are robustly testable when the rates add up to less than 1, and on a single evaluation set not beyond that. That condition is the reason the c^3-codes use random local codes, and the reason the 2026 quantum LTCs need new product-expansion results for Reed–Solomon codes.

4.5 Short LTCs and the c^3 question

The Hadamard code has rate k/2^k. The history of LTCs is a history of shrinking the length while keeping q and \htmlData{n=c4-soundness}{\kappa} constant:

code length n in terms of k source
Hadamard (BLR) 2^k Blum–Luby–Rubinfeld (1990/93)
Reed–Muller, low-degree tests \mathrm{poly}(k) Rubinfeld–Sudan; Arora–Safra; ALMSS (1990s)
almost-linear LTCs k^{1+o(1)} Goldreich–Sudan (2002/06)
quasi-linear LTCs k\cdot\mathrm{polylog}(k) Ben-Sasson–Sudan (2005) with Dinur (2007)
c^3-LTCs O(k) Dinur–Evra–Livne–Lubotzky–Mozes; Panteleev–Kalachev (2022)

A caveat on the Reed–Muller row. The low-degree test of Rubinfeld–Sudan restricts a function on \mathbb{F}_p^m to a random line and checks that the restriction has degree \le d. It reads d+2 symbols, and its soundness gets worse as d grows. With d constant, the length p^m is only subexponential in the dimension k = \binom{m+d}{d} \approx m^d/d!. Length \mathrm{poly}(k) needs d and p of order \mathrm{polylog}(k), and so \mathrm{polylog}(k) queries over an alphabet of size \mathrm{polylog}(k). Constant queries over a small alphabet at polynomial length need the proof composition of §5. The analysis of the line test is the voting proof of Theorem 4.6 again, with the line through x in direction h in place of the pair (r, x+r).

A c^3-LTC is a family with constant rate, constant relative distance and constant locality (with constant soundness). Whether they exist was the open question of the area (Goldreich's 2005 survey), and there were reasons to doubt it: every earlier LTC was algebraic (polynomials) with rate \to 0, and every good code with fast decoding was an expander code, which is not testable:

Theorem 4.12 (Ben-Sasson–Harsha–Raskhodnikova, 2005). There are LDPC codes defined by random constant-degree factor graphs — asymptotically good, and expander codes in the sense of §3 — such that every tester that rejects words at constant relative distance with constant probability must make \Omega(n) queries.

Mechanism, heuristically. A q-query tester can only use parity checks supported on q positions, i.e. dual codewords of weight \le q. In a random expander LDPC code the low-weight dual codewords are essentially the defining checks and short sums of them — longer sums have large support because of expansion on the check side. Now drop a small fraction of the checks: the resulting code C' is larger than C, and its new codewords are typically at linear distance from C (random sparse systems do not have low-weight words in the difference). Such a word violates only the few dropped checks, so any q-local test catches it with small probability, although it is far from C. The actual proof is a careful form of this, against arbitrary testers.

The lesson: expansion of the factor graph makes the code robust against small errors, but a tester needs the opposite robustness — the checks must be so redundant that relaxing a few of them never creates far codewords. The constructions of §8 get that redundancy from a second dimension, by gluing together small tensor codes, the subject of the rest of this meeting.

4.6 Tensor codes and robustness

For codes C_1 \subseteq \mathbb{F}^{n_1}, C_2 \subseteq \mathbb{F}^{n_2}, the tensor code C_1 \otimes C_2 \subseteq \mathbb{F}^{n_1\times n_2} consists of the matrices all of whose columns lie in C_1 and all of whose rows lie in C_2. Let C_i have dimension k_i and relative distance \delta_i.

Dimension and distance. Let \htmlData{n=c4-M}{M}_i \in \mathbb{F}^{n_i\times k_i} be a generator matrix of C_i (§1.1). The codewords of \htmlData{n=c4-tensor}{C_1\otimes C_2} are exactly the matrices M_1XM_2^{T} with X \in \mathbb{F}^{k_1\times k_2}. Such a matrix has its columns in the column space of M_1, which is C_1, and its rows in C_2. Conversely, if every column of w lies in C_1, then w = M_1Y for a unique Y, and Y = Lw for a left inverse L of M_1. So the rows of Y are combinations of rows of w, and lie in C_2 when those do, i.e. Y = XM_2^{T}. The map X \mapsto M_1XM_2^{T} is injective, since M_1 and M_2 have full column rank, so \dim C_1\otimes C_2 = k_1k_2 and the rate is \htmlData{n=c4-rho-i}{\rho_1}\rho_2. For the distance, a nonzero codeword has a nonzero column, a word of C_1 with at least \delta_1n_1 nonzero entries. So it has at least \delta_1n_1 nonzero rows, each a nonzero word of C_2 with at least \delta_2n_2 nonzero entries. The outer product uv^{T} of minimum-weight words u \in C_1, v \in C_2 attains this, so the relative distance is exactly \delta_1\delta_2.

The dual tensor code is C_1 \boxplus C_2 = C_1\otimes\mathbb{F}^{n_2} + \mathbb{F}^{n_1}\otimes C_2, the sums of a matrix with all columns in C_1 and a matrix with all rows in C_2. Despite its name, it is not the dual of \htmlData{n=c4-tensor}{C_1\otimes C_2}: rather (C_1\otimes C_2)^\perp = \htmlData{n=c1-dual}{C_1^\perp}\boxplus C_2^\perp (Try it (13)), and so C_1\boxplus C_2 = (C_1^\perp\otimes C_2^\perp)^\perp.

Example 4.13 (a small tensor code). Let C_1 = C_2 = \{000, 110, 101, 011\} \subseteq \mathbb{F}_2^3, the parity code, of dimension 2 and distance 2. Then C_1\otimes C_2 consists of the 3\times3 binary matrices all of whose rows and columns have even weight. Such a matrix is determined by its top left 2\times2 block, so the dimension is 4 = 2\cdot2, and the minimum weight is 4 = 2\cdot2, attained for instance by the matrix with ones exactly in the top left 2\times2 block. The duals are \htmlData{n=c1-dual}{C_i^\perp} = \{000, 111\}, so C_1^\perp\otimes C_2^\perp consists of 0 and the all-ones matrix J. Hence C_1\htmlData{n=c4-boxplus}{\boxplus} C_2 = \{J\}^\perp is the set of all 3\times3 matrices of even total weight, of dimension 8, whereas (C_1\otimes C_2)^\perp = C_1^\perp\boxplus C_2^\perp, the sums of a matrix with constant columns and a matrix with constant rows, has dimension 5 = 9 - 4.

Tensor codes are the simplest codes with a second dimension. Every coordinate lies on one row and one column, so it is checked twice, by two different codes. They are also the building block of everything that follows. The c^3-LTCs of §8–§9 put a copy of \htmlData{n=c8-CA}{C_A}\otimes C_B at every vertex of a square complex. The good quantum codes of §11 do the same with two-sided conditions, and the quantum LTCs of §13 do it in dimension four. In every case the local question is the one this section asks: how well does C_1 \otimes C_2 test itself through its rows and columns?

The natural test for \htmlData{n=c4-tensor}{C_1\otimes C_2} reads a random row or a random column and checks it. For w \in \mathbb{F}^{n_1\times n_2} let \overline{d}_{\mathrm{row}}(w) be the average over rows of the relative distance of the row from C_2, and \overline{d}_{\mathrm{col}}(w) the same for columns and C_1.

Definition 4.14 (robust testability). \htmlData{n=c4-tensor}{C_1 \otimes C_2} is \htmlData{n=c4-soundness}{\kappa}-robustly testable if for every w,

\tfrac12\bigl(\htmlData{n=c4-drow}{\overline{d}_{\mathrm{row}}}(w) + \htmlData{n=c4-dcol}{\overline{d}_{\mathrm{col}}}(w)\bigr) \ge \kappa\cdot{\htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}}(w, C_1\otimes C_2).

“Robust” means that the amount by which a random row or column fails — not merely the probability that it fails — is proportional to the distance.

What the definition says. The right-hand side is global, the distance of the whole matrix from the code. The left-hand side is local, the average distance of a row or a column from its own code. One inequality is free: the rows of a codeword T lie in C_2, so \htmlData{n=c4-drow}{\overline{d}_{\mathrm{row}}}(w) \le {\htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}}(w,T), and likewise for columns. Hence the left-hand side is never larger than \overline{\mathrm{dist}}(w, C_1\otimes C_2). Robustness is the converse, up to the factor \htmlData{n=c4-soundness}{\kappa}: a matrix whose rows and columns are, on average, nearly codewords is nearly a codeword. If w is 10\% away from the tensor code and \kappa = 0.2, then a random row or column is on average at least 2\% away from its code. Compare Definition 4.1, which bounds the probability that the test rejects. Here the bound is on the expected distance of what the test reads.

Composing tests. View each row of w as a single symbol over the large alphabet \mathbb{F}^{n_2}, and each column as a symbol over \mathbb{F}^{n_1}. The row-or-column test then reads one symbol, and robustness says that this symbol is, on average, far from its code. Now suppose that C_1 and C_2 are themselves LTCs, with q' queries and soundness \kappa'. Instead of reading the whole row or column, run the tester of its code on it. A row u is rejected with probability at least \kappa'\,\htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}(u, C_2), and similarly for columns, so averaging over a random row or column,

\Pr[\text{reject}] \ge {\htmlData{n=c4-soundness}{\kappa}}'\cdot\tfrac12\bigl(\htmlData{n=c4-drow}{\overline{d}_{\mathrm{row}}}(w) + \htmlData{n=c4-dcol}{\overline{d}_{\mathrm{col}}}(w)\bigr) \ge \kappa\kappa'\,\htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}(w, \htmlData{n=c4-tensor}{C_1\otimes C_2}),

with only q' queries. The second inequality is robustness. Plain local testability of the tensor code would not be enough here: it would say that the row read is often not a codeword, but such a row may be a single symbol away from C_2, and then its tester almost never notices.

Why robustness, if the component codes are not LTCs? Reed–Solomon codes of constant rate are not LTCs. Any d+1 coordinates of a word of \htmlData{n=c4-RS}{\mathrm{RS}_d(S)} can take arbitrary values (interpolation), so a tester with perfect completeness that reads at most d+1 symbols can never reject. It must read at least d+2, which is \Omega(n) at constant rate. So the composition above does not apply as stated, and the row test of a Reed–Solomon tensor code of length N = n^2 reads n = \sqrt N symbols, which is still not a constant. Robustness is nevertheless what is needed, in two ways.

Robustness is product expansion. For two codes of linear distance, robust testability of \htmlData{n=c4-tensor}{C_1\otimes C_2} is equivalent, up to constants, to product expansion of the pair (C_1, C_2) (Kalachev–Panteleev; Definition 11.5 in §11). Product expansion says that every word x of the dual tensor code C_1 \boxplus C_2 can be written using only O(\lvert x\rvert/n) nonzero columns and rows (for n_1 = n_2 = n), as few as its weight allows: a sparse word of C_1\boxplus C_2 has a sparse explanation by columns and rows. One direction of the equivalence is short, and it shows why the dual tensor code appears. Suppose every x \in C_1\boxplus C_2 can be written x = c + r, where c has all columns in C_1 and at most K\lvert x\rvert/n nonzero columns, and r has all rows in C_2 and at most K\lvert x\rvert/n nonzero rows. Given w, replace each row by a nearest word of C_2 and call the result R, and replace each column by a nearest word of C_1 and call the result C. With \tau the left-hand side of Definition 4.14 and N = n^2, we have \htmlData{n=c1-dist}{\mathrm{dist}}(w,R) \le 2\tau N and \mathrm{dist}(w,C) \le 2\tau N. The disagreement x = C - R lies in C_1\boxplus C_2 and has weight at most \mathrm{dist}(w,R) + \mathrm{dist}(w,C) = 2\tau N. Write C - R = c + r as above. Then T = C - c = R + r has all columns in C_1 and all rows in C_2, so T \in C_1\otimes C_2, and \mathrm{dist}(w, T) \le \mathrm{dist}(w,R) + \lvert r\rvert \le 2\tau N + n\cdot\frac{K\cdot 2\tau N}{n} = (2+2K)\tau N. So C_1\otimes C_2 is \frac{1}{2+2K}-robustly testable: the sparse explanation of the disagreement repairs a few rows of R. The quantum chapters use this form, and the recent quantum LTC papers quote the theorem below in it.

Reed–Solomon tensor codes. For S \subseteq \mathbb{F} and 0 \le d < \lvert S\rvert write

\mathrm{RS}_d(S) = \bigl\{(f(s))_{s\in S} : f \in \mathbb{F}[x],\ \deg f \le d\bigr\},

the Reed–Solomon code of Example 1.2 with evaluation set S and k = d+1. Since the points of S are distinct, \lvert S\rvert \le \lvert\mathbb{F}\rvert: long Reed–Solomon codes need large fields, usually \mathbb{F}_{2^m} or a prime field \mathbb{F}_p. We index the rows of a matrix in \mathbb{F}^{S_1\times S_2} by x \in S_1 and the columns by y \in S_2.

Lemma 4.15 (tensor products of Reed–Solomon codes). \htmlData{n=c4-RS}{\mathrm{RS}_{d_1}(S_1)}\otimes\mathrm{RS}_{d_2}(S_2) is the set of evaluations on S_1\times S_2 of the polynomials Q(x,y) with \deg_x Q \le d_1 and \deg_y Q \le d_2.

Proof. If \deg_x Q \le d_1 and \deg_y Q \le d_2, then every column Q(\cdot, y_0) is a polynomial of degree \le d_1 in x, and every row is one of degree \le d_2 in y. So these evaluations lie in the tensor code. The polynomials form a space of dimension (d_1+1)(d_2+1), which is \dim(\htmlData{n=c4-RS}{\mathrm{RS}_{d_1}}\otimes\mathrm{RS}_{d_2}) = k_1k_2. So the evaluations fill the tensor code once we show that evaluation is injective, i.e. that a polynomial Q with these degree bounds that vanishes on S_1\times S_2 is zero. Write Q = \sum_{j\le d_2}q_j(x)y^j with \deg q_j \le d_1. Fix x_0 \in S_1. The polynomial Q(x_0, y) = \sum_jq_j(x_0)y^j has degree \le d_2 < \lvert S_2\rvert and vanishes at every point of S_2, so it is the zero polynomial: all its coefficients vanish, q_j(x_0) = 0 for every j. This holds for every x_0 \in S_1, so each q_j has the \lvert S_1\rvert distinct points of S_1 as roots. A nonzero polynomial has at most as many roots as its degree, and \deg q_j \le d_1 < \lvert S_1\rvert, so q_j = 0 for every j, and Q = 0. \square

So the tensor code of two Reed–Solomon codes is a bivariate Reed–Solomon code. Its row and column test is the bivariate low-degree test: is a function that has low degree on most rows and on most columns close to a polynomial of low degree in both variables?

4.7 The Polishchuk–Spielman theorem

The first robustness theorem, and still the basic one, is about Reed–Solomon codes. Polishchuk and Spielman proved it to build nearly-linear size PCPs. It is also the theorem that the September 2026 quantum LTC papers (§13.5) start from and must go beyond. Write \rho_i = d_i/n_i, which is the rate of \htmlData{n=c4-RS}{\mathrm{RS}_{d_i}(S_i)} up to 1/n_i.

Theorem 4.16 (Polishchuk–Spielman). Let S_1, S_2 \subseteq \mathbb{F} with \lvert S_i\rvert = n_i, let 0 \le d_i < n_i, and put \gamma = 1 - \htmlData{n=c4-rho-i}{\rho_1} - \rho_2. If \gamma > 0, that is, if the rates add up to less than 1, then \htmlData{n=c4-RS}{\mathrm{RS}_{d_1}(S_1)}\otimes\mathrm{RS}_{d_2}(S_2) is \htmlData{n=c4-soundness}{\kappa}-robustly testable with \kappa = \gamma^2/128.

The constant is not optimized. The condition is the point: it cannot be dropped (Proposition 4.18).

The proof follows Berlekamp–Welch decoding of Reed–Solomon codes. First find a low-degree polynomial E that vanishes wherever the rows and the columns disagree, an error locator. Then show that E\cdot(\text{rows}) = E\cdot(\text{columns}) is a single polynomial P. Finally divide P by E. Everything is elementary except the division, which needs a lemma about resultants. In the meeting, prove Steps 1, 2 and 4 of the proof in full, state Lemma 4.17, and show only the counting that ends its proof. That counting is where the condition \htmlData{n=c4-rho-i}{\rho_1} + \rho_2 < 1 comes from.

Lemma 4.17 (bivariate division; Polishchuk–Spielman). Let \htmlData{n=c4-error-locator}{E}, P \in \mathbb{F}[x,y] with E \ne 0, \deg_x E \le a, \deg_y E \le b, \deg_x P \le a + d_1, \deg_y P \le b + d_2. Suppose E(x_0,\cdot) divides P(x_0,\cdot) in \mathbb{F}[y] for every x_0 \in S_1, and E(\cdot,y_0) divides P(\cdot,y_0) in \mathbb{F}[x] for every y_0 \in S_2, where \lvert S_i\rvert = n_i and

n_1 > 2a + d_1, \quad n_2 > 2b + d_2, \quad (n_1 - 2a - d_1)(n_2 - 2b - d_2) > (a + d_1)(b + d_2).

Then E divides P.

Outline. If P = 0 there is nothing to prove. Otherwise let G = \gcd(\htmlData{n=c4-error-locator}{E},P), write E = GE' and P = GP', and put a' = \deg_x E', b' = \deg_y E'. We show that a' = b' = 0. Suppose b' \ge 1, and let \mathcal{R}(x) = \mathrm{Res}_y(E', P') \in \mathbb{F}[x] be the resultant, i.e. the determinant of the Sylvester matrix of the map (u, v) \mapsto uE' + vP' on pairs of polynomials in y with \deg u < \deg_y P' and \deg v < b'. Two standard facts: \mathcal{R} \ne 0, because E' and P' have no common factor of positive degree in y (Gauss's lemma); and \deg \mathcal{R} \le a'\deg_y P' + b'\deg_x P' \le a'(b+d_2) + b'(a+d_1).

Call x_0 \in S_1 good if G(x_0,\cdot) \ne 0 and the leading y-coefficient of E' does not vanish at x_0. At most \deg_x G + a' = \deg_x \htmlData{n=c4-error-locator}{E} \le a points are not good. At a good x_0, cancelling G(x_0,\cdot) shows that E'(x_0,\cdot), of degree exactly b', divides P'(x_0,\cdot) = E'(x_0,\cdot)h. The pairs (-vh, v) with \deg v < b' then form a b'-dimensional kernel of the Sylvester map at x_0, so \mathcal{R} vanishes at x_0 to order at least b' (Try it (14)). Counting roots with multiplicity,

(n_1 - a)\,b' \le a'(b+d_2) + b'(a+d_1), \qquad\text{that is,}\qquad b'(n_1 - 2a - d_1) \le a'(b+d_2).

Exchanging the roles of x and y gives, if a' \ge 1, a'(n_2 - 2b - d_2) \le b'(a+d_1). If a' = 0 the first inequality contradicts n_1 > 2a + d_1. If b' = 0 the second contradicts n_2 > 2b + d_2. If both are positive, multiplying the two contradicts the third hypothesis. So E' is a constant and \htmlData{n=c4-error-locator}{E} divides P. \square

Set a = \alpha n_1 and b = \beta n_2. The third hypothesis reads (1 - 2\alpha - \htmlData{n=c4-rho-i}{\rho_1})(1 - 2\beta - \rho_2) > (\alpha + \rho_1)(\beta + \rho_2). For a tiny error locator (\alpha, \beta \to 0) it becomes (1-\rho_1)(1-\rho_2) > \rho_1\rho_2, which is exactly \rho_1 + \rho_2 < 1.

Proof of Theorem 4.16. Let N = n_1n_2, C_i = \htmlData{n=c4-RS}{\mathrm{RS}_{d_i}(S_i)}, and let \tau = \frac12(\htmlData{n=c4-drow}{\overline{d}_{\mathrm{row}}}(w) + \htmlData{n=c4-dcol}{\overline{d}_{\mathrm{col}}}(w)) be the left-hand side of Definition 4.14. Replace every row x_0 of w by a nearest codeword of C_2, the evaluation of a polynomial r_{x_0}(y) of degree \le d_2, and call the result R. Likewise replace every column y_0 by a nearest c_{y_0}(x) \in C_1, and call the result C. Then \htmlData{n=c1-dist}{\mathrm{dist}}(w, R) = \overline{d}_{\mathrm{row}}(w)N and \mathrm{dist}(w, C) = \overline{d}_{\mathrm{col}}(w)N. Let D be the set of positions where R \ne C. At each of them w differs from R or from C, so \lvert D\rvert \le \mathrm{dist}(w,R) + \mathrm{dist}(w,C) = 2\tau N.

Put \varepsilon = \htmlData{n=c4-gamma}{\gamma}/8, a = \lfloor\varepsilon n_1\rfloor and b = \lfloor\varepsilon n_2\rfloor. The parameter \varepsilon fixes the size of the error locator E below: E will have degree at most a \le \varepsilon n_1 in x and b \le \varepsilon n_2 in y. It must be large enough for E to vanish on D (Step 1), and small enough for the degree conditions of Steps 2–4, which need 2\varepsilon + \htmlData{n=c4-rho-i}{\rho_i} < 1 and the inequality \Phi > 0 of Step 3. The choice \gamma/8 is a convenient one that does both.

The case of large D. If \lvert D\rvert > \varepsilon^2 N, then \tau \ge \lvert D\rvert/(2N) > \varepsilon^2/2 = \htmlData{n=c4-gamma}{\gamma}^2/128 = \htmlData{n=c4-soundness}{\kappa}. Since a relative distance is at most 1, the right-hand side of Definition 4.14 is at most \kappa < \tau, so the inequality holds and there is nothing to prove. So assume \lvert D\rvert \le \varepsilon^2N.

Step 1: an error locator. Write E = \sum_{i\le a,\,j\le b}e_{ij}x^iy^j. The coefficients e_{ij} are (a+1)(b+1) unknowns, and for each point (x,y) \in D the condition E(x,y) = 0 is one homogeneous linear equation in them. There are more unknowns than equations, since (a+1)(b+1) > \varepsilon n_1\cdot\varepsilon n_2 = \varepsilon^2N \ge \lvert D\rvert. So the system has a nonzero solution: a polynomial E \ne 0 with \deg_x E \le a and \deg_y E \le b that vanishes at every point of D.

Step 2: one polynomial. Identify \htmlData{n=c4-error-locator}{E} with its evaluation matrix (E(x,y))_{x\in S_1,\,y\in S_2}, and let E\cdot R and E\cdot C be entrywise products, (E\cdot R)(x,y) = E(x,y)R(x,y). (This matrix has low rank, at most \min(a,b)+1, but that does no harm: the proof uses E only entrywise and as a polynomial.) The two products are equal: off D, R = C by the definition of D; on D, E = 0, so both products vanish. Call this matrix P. Its row x_0 is the evaluation of E(x_0, y)\,r_{x_0}(y), a polynomial of degree \le b + d_2 in y. Its column y_0 is the evaluation of E(x, y_0)\,c_{y_0}(x), of degree \le a + d_1 in x. So P \in \mathrm{RS}_{a+d_1}(S_1)\otimes\mathrm{RS}_{b+d_2}(S_2). These are Reed–Solomon codes in the sense above, because a + d_1 < n_1: indeed a + d_1 \le (\varepsilon + \htmlData{n=c4-rho-i}{\rho_1})n_1, and \varepsilon + \rho_1 < \htmlData{n=c4-gamma}{\gamma} + \rho_1 = 1 - \rho_2 \le 1; likewise b + d_2 < n_2. So Lemma 4.15, applied with the degrees a + d_1 and b + d_2, says that P is the evaluation of a single polynomial P(x,y) with \deg_x P \le a + d_1 and \deg_y P \le b + d_2. Moreover P(x_0, y) = E(x_0, y)\,r_{x_0}(y) as polynomials, since both sides have degree < n_2 and agree on S_2. The same holds for columns.

Step 3: division. So \htmlData{n=c4-error-locator}{E}(x_0,\cdot) divides P(x_0,\cdot) for all x_0 \in S_1, and E(\cdot,y_0) divides P(\cdot,y_0) for all y_0 \in S_2. The hypotheses of Lemma 4.17 hold. First, 1 - \htmlData{n=c4-rho-i}{\rho_1} = \rho_2 + \htmlData{n=c4-gamma}{\gamma} \ge \gamma, so n_1 - 2a - d_1 \ge (\gamma - 2\varepsilon)n_1 > 0, and similarly for n_2. Second, using a \le \varepsilon n_1 and b \le \varepsilon n_2, the difference \Phi = (n_1-2a-d_1)(n_2-2b-d_2) - (a+d_1)(b+d_2) satisfies

\begin{aligned} \Phi/N &\ge (1-\htmlData{n=c4-rho-i}{\rho_1}-2\varepsilon)(1-\rho_2-2\varepsilon) - (\rho_1+\varepsilon)(\rho_2+\varepsilon)\\ &= \htmlData{n=c4-gamma}{\gamma} - (3+\gamma)\varepsilon + 3\varepsilon^2 \ >\ \gamma - 4\varepsilon \ >\ 0. \end{aligned}

So P = EQ for a polynomial Q.

Why Q should be the answer. Steps 1–3 are Berlekamp–Welch decoding in two variables. In one variable, if w = f off an error set D and \htmlData{n=c4-error-locator}{E} vanishes on D, then E\cdot w = E\cdot f pointwise: multiplying by E hides the errors, the product is a genuine low-degree polynomial, and dividing by E recovers f without knowing it in advance. Here there is no single noisy word with a hidden codeword, but two partial decodings: R, whose rows are codewords but need not fit together, and C, whose columns are. If w is close to some codeword T, then T is their consensus: it equals R on most rows and C on most columns. Steps 1–3 find this consensus without knowing T. Multiplying by E masks the disagreements, so that the rows of R and the columns of C fit together into one polynomial P (Step 2), and dividing by E unmasks them (Step 3). Division row by row is trivial; the content of Lemma 4.17 is that the row quotients r_{x_0} are the rows of one bivariate polynomial, and this is what fails in the diagonal obstruction of Proposition 4.18. So Q is R with its inconsistent rows repaired to fit the columns. It is close to w because R is close to w by construction, and every row on which Q differs from R is paid for by about \htmlData{n=c4-gamma}{\gamma} n_2 points of D, which are scarce when \tau is small. Step 4 makes this precise.

Step 4: Q is a codeword close to w. Let x_0 \in S_1 with \htmlData{n=c4-error-locator}{E}(x_0,\cdot) \ne 0. Restricting P = EQ to the row x_0 and using Step 2, E(x_0,\cdot)\,Q(x_0,\cdot) = P(x_0,\cdot) = E(x_0,\cdot)\,r_{x_0}. Cancelling the nonzero polynomial E(x_0,\cdot) in \mathbb{F}[y] gives Q(x_0,\cdot) = r_{x_0}. The row E(x_0,\cdot) is identically zero only if x - x_0 divides E, and since \deg_x E \le a this happens for at most a points x_0. So Q agrees with R on all but at most a rows. By the same argument for columns, Q agrees with C on every column y_0 with E(\cdot,y_0) \ne 0, that is, on all but at most b columns.

Q is a codeword. Write Q = \sum_j q_j(x)y^j and let j > d_2. At each of the at least n_1 - a points x_0 with \htmlData{n=c4-error-locator}{E}(x_0,\cdot) \ne 0, the polynomial Q(x_0,\cdot) = r_{x_0} has degree \le d_2, so its coefficient of y^j vanishes: q_j(x_0) = 0. So q_j has at least n_1 - a roots. On the other hand, \deg q_j \le \deg_x Q \le \deg_x P \le a + d_1 (as \deg_x P = \deg_x E + \deg_x Q), and a + d_1 < n_1 - a because 2a + d_1 \le (2\varepsilon + \htmlData{n=c4-rho-i}{\rho_1})n_1 < n_1. A nonzero polynomial has at most as many roots as its degree, so q_j = 0. Hence \deg_y Q \le d_2, similarly \deg_x Q \le d_1, and Q \in {\htmlData{n=c4-tensor}{C_1 \otimes C_2}} by Lemma 4.15.

Q is close to w. Let m be the number of rows on which Q \ne R. On such a row, Q(x_0,\cdot) and r_{x_0} are different polynomials of degree \le d_2, so they agree in at most d_2 points and differ in at least n_2 - d_2 columns. At most b of these columns are among the exceptional columns where Q may differ from C. In each of the others Q = C, so R \ne Q = C there, and the point lies in D. So each of the m rows contains at least n_2 - d_2 - b points of D, and different rows contain different points: m(n_2 - d_2 - b) \le \lvert D\rvert. Since n_2 - d_2 - b \ge (1 - \htmlData{n=c4-rho-i}{\rho_2} - \varepsilon)n_2 \ge (\htmlData{n=c4-gamma}{\gamma} - \varepsilon)n_2 = \frac78\gamma n_2, and each of the m rows contributes at most n_2 to the distance, \htmlData{n=c1-dist}{\mathrm{dist}}(R, Q) \le mn_2 \le \frac{8}{7\gamma}\lvert D\rvert \le \frac{16}{7\gamma}\tau N. So

\htmlData{n=c1-dist}{\mathrm{dist}}(w, Q) \le \mathrm{dist}(w,R) + \mathrm{dist}(R,Q) \le 2\tau N + \tfrac{16}{7\htmlData{n=c4-gamma}{\gamma}}\tau N \le \tfrac{5}{\gamma}\,\tau N,

and \tau \ge \frac{\htmlData{n=c4-gamma}{\gamma}}{5}\,\htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}(w, \htmlData{n=c4-tensor}{C_1\otimes C_2}) \ge \frac{\gamma^2}{128}\,\overline{\mathrm{dist}}(w, C_1\otimes C_2). \square

About the constant. The proof gives more than it states. When \lvert D\rvert \le \varepsilon^2N it gives \htmlData{n=c4-soundness}{\kappa} = \htmlData{n=c4-gamma}{\gamma}/5. The weaker \gamma^2/128 comes from the case of large D, where the proof uses only that a distance is at most 1. The last step also wastes a little, in 2 + \frac{16}{7\gamma} \le \frac5\gamma. No attempt is made to optimize: what the applications need is that \kappa depends only on \gamma, and not on n_1 and n_2.

The rate condition is necessary. Theorem 4.16 says that when \htmlData{n=c4-rho-i}{\rho_1} + \rho_2 < 1, a matrix whose rows and columns are nearly codewords is nearly a codeword. The next proposition shows that, for a single evaluation set, this is false as soon as the rates add up to about 1 or more. It gives a matrix whose columns are all codewords and whose rows are each one symbol away from a codeword, but which is far from the tensor code. So the condition is not an artifact of the proof. The culprit is a polynomial supported on the diagonal: the diagonal x = y is a low-degree curve that contains many points of the grid S\times S.

Proposition 4.18 (the diagonal obstruction). Let S \subseteq \mathbb{F} with \lvert S\rvert = n, and let d_1 + d_2 \ge n - 2 with d_1, d_2 \le (1-\eta)n. Then there is a word w with \htmlData{n=c4-dcol}{\overline{d}_{\mathrm{col}}}(w) = 0 and \htmlData{n=c4-drow}{\overline{d}_{\mathrm{row}}}(w) \le 1/n whose relative distance from \htmlData{n=c4-RS}{\mathrm{RS}_{d_1}(S)}\otimes\mathrm{RS}_{d_2}(S) is at least \frac{\eta}{2} - \frac1{2n}. So the soundness of the row and column test tends to 0: \kappa \le 1/(\eta n - 1).

Proof. Let Z(x) = \prod_{s\in S}(x - s) = \sum_{i=0}^nz_ix^i and M(x,y) = \frac{Z(x) - Z(y)}{x - y}. This is a polynomial, because x - y divides each x^i - y^i = (x-y)\sum_{j<i}x^jy^{i-1-j}, so M = \sum_iz_i\sum_{j<i}x^jy^{i-1-j}, of total degree n - 1. On S\times S it vanishes off the diagonal, where Z(x) = Z(y) = 0 and x \ne y. On the diagonal, M(s,s) = \sum_i iz_is^{i-1} = Z'(s), which is nonzero because s is a simple root of Z. Split the monomials x^jy^k of M, which have j + k \le n-1: those with j \le d_1 go into M_1, and the others have k \le n - 2 - d_1 \le d_2 and go into M_2. Every column of M_1 is in C_1 = \htmlData{n=c4-RS}{\mathrm{RS}_{d_1}(S)}, and every row of M_2 is in C_2 = \mathrm{RS}_{d_2}(S).

Let w = \htmlData{n=c4-M}{M}_1. Its columns are codewords. Its row x_0 is M(x_0,\cdot) - M_2(x_0,\cdot): a codeword of C_2 plus a single nonzero entry, at (x_0,x_0). So \htmlData{n=c4-drow}{\overline{d}_{\mathrm{row}}}(w) \le 1/n. Now let T \in {\htmlData{n=c4-tensor}{C_1\otimes C_2}} and V = w - T. The columns of V are in C_1, so each nonzero column has weight \ge n - d_1. Row x_0 of V is M(x_0,\cdot) - c with c = (M_2 + T)(x_0,\cdot) \in C_2. If c \ne 0 the row has weight \ge n - d_2 - 1. If c = 0, then V(x_0,x_0) = M(x_0,x_0) \ne 0, so column x_0 of V is nonzero. Either at least n/2 rows have c \ne 0, or at least n/2 distinct columns are nonzero. So \lvert V\rvert \ge \frac n2\min(n - d_2 - 1, n - d_1) \ge \frac n2(\eta n - 1). \square

In the language of product expansion: \htmlData{n=c4-M}{M} \in C_1\htmlData{n=c4-boxplus}{\boxplus} C_2 has weight n, but every decomposition M = M_1 + M_2 needs row s or column s for every s \in S. So the pair is at best \frac1n-product-expanding.

What this means for c^3-codes. The square-complex codes of §8 have positive rate only when \htmlData{n=c8-rho}{\rho_A}\rho_B > 3/4 (Proposition 8.4), so \rho_A + \rho_B \ge 2\sqrt{\rho_A\rho_B} > \sqrt3. That is the wrong side of the threshold. By Proposition 4.18, Reed–Solomon codes on a common evaluation set are then not robust, and cannot be the local codes. The c^3-LTCs of Dinur–Evra–Livne–Lubotzky–Mozes and Panteleev–Kalachev use random local codes instead, whose tensor products are robust (§9).

For quantum codes the situation is worse. §11 needs product expansion on both sides, for (\htmlData{n=c8-CA}{C_A}, C_B) and for (C_A^\perp, C_B^\perp). The two rate sums add up to 2, so one of them is always at least 1. The dual of a Reed–Solomon code is a Reed–Solomon code on the same set, up to scaling the coordinates (Try it (2)), and scaling does not change robustness. So Reed–Solomon codes on one evaluation set always fail on one side. The September 2026 quantum LTCs (§13.5) avoid this by evaluating on different sets S_1, S_2 that meet in a single point, so the diagonal no longer hits many grid points (Try it (15)). Bafna–Vyas conjectured that Reed–Solomon codes on multiplicative subgroups of coprime orders are product-expanding even at high rate. Bafna–Li–Nguyen assume a variant of this conjecture, and Gay–Jeronimo prove the product expansion they need for Reed–Solomon codes on norm-one elements. Both need Theorem 4.16 beyond the rate barrier that Proposition 4.18 sets for a single evaluation set: Gay–Jeronimo prove such an extension, and Bafna–Li–Nguyen assume one.

What else is known about robustness.

Try it (13). Prove that (\htmlData{n=c4-tensor}{C_1\otimes C_2})^\perp = \htmlData{n=c1-dual}{C_1^\perp}{\htmlData{n=c4-boxplus}{\boxplus}} C_2^\perp and compute \dim C_1\boxplus C_2.

Try it (14). Let A(x) be a square matrix with entries in \mathbb{F}[x], and suppose A(x_0) has a kernel of dimension k. Show that (x - x_0)^k divides \det A(x). (This is the multiplicity count in the proof of Lemma 4.17.)

Try it (15). (a) For S = \htmlData{n=c1-Fq}{\mathbb{F}_q}^\times, compute the polynomial \htmlData{n=c4-M}{M} of Proposition 4.18 and its values on the diagonal. (b) Let S_1, S_2 \subseteq \mathbb{F}_q^\times be subgroups of coprime orders. Show that S_1\cap S_2 = \{1\}, so the diagonal x = y meets S_1\times S_2 in a single point.

Sources. Goldreich, Introduction to Property Testing (CUP 2017), Ch. 1–2 and Ch. 13 (LTCs); O'Donnell, Analysis of Boolean Functions (CUP 2014), Ch. 1 (BLR, the Fourier proof); Blum–Luby–Rubinfeld, Self-testing/correcting with applications to numerical problems, JCSS 47 (1993); Dinur, Robust computation: from local pieces to global structure, lecture notes, Weizmann Institute (2025), Lecture 1 (the self-correction proof, and the four dependent checks); Goldreich–Sudan, Locally testable codes and PCPs of almost-linear length, JACM 53 (2006); Ben-Sasson–Harsha–Raskhodnikova, Some 3CNF properties are hard to test, SICOMP 35 (2005); Bellare–Coppersmith–Håstad–Kiwi–Sudan, Linearity testing in characteristic two, IEEE Trans. Inform. Theory 42 (1996); Rubinfeld–Sudan, Robust characterizations of polynomials with applications to program testing, SICOMP 25 (1996); Goldreich, Short locally testable codes and proofs (survey), ECCC TR05-014; Polishchuk–Spielman, Nearly-linear size holographic proofs, STOC 1994 (Theorem 4.16 and Lemma 4.17); Spielman, Computationally efficient error-correcting codes and holographic proofs, PhD thesis, MIT (1995); Bafna–Li–Nguyen, Good quantum locally testable codes from product expansion, arXiv:2609.26735, §2.4.1 (the theorem as product expansion, and the diagonal obstruction); Bafna–Vyas, Private PCPs from product expansion, ECCC TR26-150; P. Valiant, The tensor product of two codes is not necessarily robustly testable, APPROX-RANDOM 2005; Ben-Sasson–Sudan, Robust locally testable codes and products of codes, Random Structures Algorithms 28 (2006); Dinur–Sudan–Wigderson, Robust local testability of tensor products of LDPC codes, RANDOM 2006; Kalachev–Panteleev, Two-sided robustly testable codes, arXiv:2206.09973; Goldreich–Goldwasser–Ron, Property testing and its connection to learning and approximation, J. ACM 45 (1998); Alon–Fischer–Krivelevich–Szegedy, Efficient testing of large graphs, Combinatorica 20 (2000). For §4.4: Becker–Lubotzky–Mosheiff, Testability of relations between permutations, FOCS 2021, arXiv:2011.05234, and Testability in group theory, Israel J. Math. 256 (2023), arXiv:2204.04539 — the place to start; Ulam, A Collection of Mathematical Problems (Interscience, 1960); Ben-Or–Coppersmith–Luby–Rubinfeld, Non-abelian homomorphism testing, and distributions close to their self-convolutions, Random Structures Algorithms 32 (2008); Glebsky–Rivera, Almost solutions of equations in permutations, Taiwanese J. Math. 13 (2009); Arzhantseva–Păunescu, Almost commuting permutations are near commuting permutations, J. Funct. Anal. 269 (2015); Becker–Mosheiff, Abelian groups are polynomially stable, IMRN 2021; Becker–Lubotzky–Thom, Stability and invariant random subgroups, Duke Math. J. 168 (2019); Becker–Lubotzky, Group stability and Property (T), J. Funct. Anal. 278 (2020); Kazhdan, On \varepsilon-representations, Israel J. Math. 43 (1982); Gowers–Hatami, Inverse and stability theorems for approximate representations of finite groups, Sb. Math. 208 (2017); de Chiffre–Glebsky–Lubotzky–Thom, Stability, cohomology vanishing, and nonapproximable groups, Forum Math. Sigma 8 (2020); Chapman–Lubotzky, Stability of homomorphisms, coverings and cocycles I: equivalence, Eur. J. Math. 11 (2025), arXiv:2310.17474; Bowen–Chapman–Lubotzky–Vidick, The Aldous–Lyons conjecture I: subgroup tests, arXiv:2408.00110.

Answers to the exercises

Answer (11). The distance to \htmlData{n=c4-L}{\mathcal{L}} is \approx\eta: the original linear function is the nearest one, since other linear functions differ from it in half the positions. The test reads x, y, x+y, distinct for almost all (x,y), and rejects iff an odd number of them were flipped: probability \approx 3\eta(1-\eta)^2 + \eta^3 \approx 3\eta. So at small distances the rejection probability is about three times the distance; \htmlData{n=c4-soundness}{\kappa} = 1 is what the Fourier argument gives uniformly over all distances. (Bellare–Coppersmith–Håstad–Kiwi–Sudan give tight bounds on part of the distance range.)

Answer (12). Let A = \{x : \sigma^2(x) \ne x\}, so \lvert A\rvert = \delta n. If x \notin A then \sigma(x) \notin A, because \sigma^2(\sigma x) = \sigma(\sigma^2x) = \sigma x. So \sigma maps the complement of A into itself, hence onto itself, and \sigma^2 = \mathrm{id} there. Put \tau = \sigma off A and \tau = \mathrm{id} on A. Then \tau^2 = \mathrm{id} and \tau differs from \sigma only on A. The relation test rejects with probability \htmlData{n=c4-dsym}{d}(\sigma^2,\mathrm{id}) = \delta \ge d(\sigma,\tau), which is at least the distance to the nearest solution.

Answer (13). \langle u\otimes v, a\otimes b\rangle = \langle u,a\rangle\langle v,b\rangle, so \htmlData{n=c1-dual}{C_1^\perp}\otimes\mathbb{F}^{n_2} and \mathbb{F}^{n_1}\otimes C_2^\perp are orthogonal to \htmlData{n=c4-tensor}{C_1\otimes C_2}; dimensions: \dim(C_1^\perp{\htmlData{n=c4-boxplus}{\boxplus}} C_2^\perp) = (n_1-k_1)n_2 + n_1(n_2-k_2) - (n_1-k_1)(n_2-k_2) = n_1n_2 - k_1k_2, which is n_1n_2 - \dim C_1\otimes C_2. Likewise \dim C_1\boxplus C_2 = k_1n_2 + n_1k_2 - k_1k_2.

Answer (14). Choose an invertible matrix U over \mathbb{F} whose first k columns span \ker A(x_0). Then the first k columns of A(x)U vanish at x = x_0, so each of them is divisible by x - x_0. Taking these factors out of the determinant, (x-x_0)^k divides \det(A(x)U) = \det A(x)\det U, and \det U is a nonzero constant.

Answer (15). (a) \htmlData{n=c4-Z}{Z}(x) = x^{q-1} - 1, so \htmlData{n=c4-M}{M}(x,y) = \frac{x^{q-1} - y^{q-1}}{x - y} = \sum_{j=0}^{q-2}x^jy^{q-2-j}, and M(s,s) = (q-1)s^{q-2} = -s^{-1} \ne 0, using s^{q-1} = 1 and q - 1 = -1 in \htmlData{n=c1-Fq}{\mathbb{F}_q}. (b) S_1\cap S_2 is a subgroup of both, so its order divides \lvert S_1\rvert and \lvert S_2\rvert, hence is 1. The proof of Proposition 4.18 needs a low-degree curve that contains many points of S_1\times S_2. For coprime subgroups the diagonal is not one. Other curves can be, which is why Bafna–Li–Nguyen restrict the orders further, to the form 2^m + 1.

5. Dinur's proof of the PCP theorem

Idea. The PCP theorem says that NP statements have proofs that can be checked by reading a constant number of symbols. Dinur's proof keeps a constraint graph and repeatedly doubles the fraction of violated constraints, at the price of a constant-factor increase in size. The doubling step is a random walk: every vertex announces its opinion about everything within distance t, and a walk of length t crosses a violated edge about t times as often as a single edge does. That multiplication works because the graph is an expander — the walk cannot get stuck avoiding the bad edges.

Goal of the chapter (weeks 6–7). Week 6: give a mathematician the vocabulary of complexity theory — polynomial time, NP, reductions and NP-hardness, approximation and gap problems, probabilistically checkable proofs; see that the halting problem is undecidable, and so not in NP; prove that the two forms of the PCP theorem, hardness of approximation and spot-checkable proofs, are equivalent; state Dinur's theorem and prove that it implies the PCP theorem. Week 7: go through Dinur's four steps: prove that degree reduction and expanderization cost only constant factors; prove the amplification lemma in outline and locate exactly where expansion is used; see how alphabet reduction composes with an assignment tester, and why error-correcting codes appear there; note the consequences for short PCPs and LTCs, and how LTCs and PCPs feed each other.

5.1 Algorithms, P and NP

Complexity theory measures how the resources needed to solve a problem grow with the size of the input. A handful of notions suffice for this seminar.

Problems. A decision problem is a set L of finite binary strings, the yes-instances; computer scientists call it a language. An instance — a graph, a Boolean formula, a matrix over \mathbb{F}_2 — is encoded as a string, and its size n is the length of the encoding. Nothing below depends on which reasonable encoding is used.

Algorithms and time. An algorithm is a Turing machine: a finite set of rules that, according to its current state and the symbol under its head, writes a symbol on an unbounded tape, moves the head one cell left or right, and changes state. Equivalently, it is a program in any fixed programming language with unbounded memory. Its running time is the number of elementary steps it takes, as a function of n, in the worst case over inputs of size n. The class P consists of the problems decided by an algorithm with running time O(n^c) for some constant c. For example, “the string has even length” is in P. Polynomial time is the working definition of efficient. Explicit, in this seminar, means computable in polynomial time: an explicit family of codes is an algorithm that outputs the n-th parity-check matrix in time polynomial in n.

NP: short proofs that can be checked.

Definition 5.1 (NP). A problem L is in NP if there are a polynomial p and a polynomial-time algorithm V, the verifier, such that x \in L if and only if there is a string y, a witness, with \lvert y\rvert \le p(\lvert x\rvert) for which V(x,y) accepts.

Examples: graph 3-colourability (the witness is a colouring, and the verifier checks that adjacent vertices get different colours); satisfiability of a Boolean formula (a satisfying assignment); “this linear code has a nonzero codeword of weight at most w” (the codeword). \mathrm{P} \subseteq \mathrm{NP}: for L \in \mathrm{P} the verifier ignores the witness and runs the polynomial-time algorithm for L on x. Whether the two classes are equal is the P versus NP question. For a mathematician: NP is the class of statements that have short proofs — hard to find, easy to check — and the verifier is a proof checker that reads the whole proof; P is the class of statements that can be decided mechanically.

A problem outside NP. Not every problem can be decided at all. Let \mathrm{HALT} be the set of pairs \langle P, x\rangle of a program P and an input x such that P halts on x.

Theorem 5.2 (Turing, 1936). No algorithm decides \mathrm{HALT}.

Proof. Suppose that an algorithm H halts on every input and outputs 1 exactly when P halts on x. Let D be the program that, on input a program P, runs H on \langle P, P\rangle, loops forever if the answer is 1, and halts if the answer is 0. Run D on its own code. If \htmlData{n=c1-H}{H(\langle D, D\rangle)} = 1, then D halts on D by the definition of H, but loops forever by the construction of D. If H(\langle D, D\rangle) = 0, then D does not halt on D, but halts by construction. Both cases are contradictions. \square

Corollary 5.3 (the halting problem is not in NP). Every problem in NP is decidable, so \mathrm{HALT} \notin \mathrm{NP}.

Proof. Let L \in \mathrm{NP}, with verifier V and polynomial p. On input x, run V(x,y) for every string y with \lvert y\rvert \le p(\lvert x\rvert), and accept iff one of the runs accepts. This algorithm always halts, after fewer than 2^{p(\lvert x\rvert)+1} runs of V, and by Definition 5.1 it answers correctly. So L is decidable, and \mathrm{HALT} is not in NP by Theorem 5.2. \square

So every NP problem can be solved by brute-force search in exponential time. The P versus NP question asks whether the search can be avoided.

Reductions. A (Karp) reduction from L to L' is a polynomial-time map f with x \in L \iff f(x) \in L'; an efficient algorithm for L' then gives one for L. A problem L' is NP-hard if every problem in NP reduces to it, and NP-complete if moreover L' \in \mathrm{NP}. Reductions compose, so to show that L' is NP-hard it is enough to reduce one NP-hard problem to it. Reductions serve two purposes here: they measure how hard NP problems are, and they are the tool of every proof in this chapter. Three consequences:

Theorem 5.4 (Cook, Levin, 1971/73). Satisfiability of Boolean formulas in conjunctive normal form (SAT) is NP-complete. It remains NP-complete for 3-CNF formulas, in which every clause has three literals (3-SAT).

Idea of the proof. 3-SAT is in NP: the witness is a satisfying assignment. For hardness, let L \in \mathrm{NP} with verifier V, and let x be an input. Record the computation of V on (x,y) as a table of polynomial size, whose row t holds the state of the machine and the contents of its memory at time t. The witness y is not given: its bits are free variables, and the formula will ask whether some y makes V accept. The state and memory at time t determine those at time t+1, and each cell of row t+1 depends on only O(1) cells of row t. So the statement “this table is an accepting computation of V on input x” is a conjunction of local conditions: the first row holds x (and y), each cell of row t+1 is the one prescribed by its neighbours in row t, and the last row says “accept”. Encode each cell by Boolean variables (“cell i holds the symbol a at time t”) and write each local condition as a constant-size CNF. The result is a formula of polynomial size, computable from x in polynomial time, that is satisfiable if and only if some witness y makes V accept, that is, if and only if x \in L. Finally, a clause (\ell_1\vee\dots\vee\ell_j) with j > 3 literals is equisatisfiable with (\ell_1\vee\ell_2\vee y_1)\wedge(\neg y_1\vee\ell_3\vee y_2)\wedge\dots\wedge(\neg y_{j-3}\vee\ell_{j-1}\vee\ell_j), with new variables y_i, which gives a 3-CNF. The new formula is equivalent to the old one in satisfiability, not logically: it has more variables, and it is satisfiable if and only if the old one is. \square

Local consistency of a table certifies a global computation: this is the germ of the whole chapter. Starting from 3-SAT, reductions show thousands of problems NP-complete, among them graph 3-colouring, which is the case \lvert\Sigma\rvert = 3 of the constraint graphs of §5.2.

5.2 Approximation, gap problems and constraint graphs

Many problems are optimization problems, for instance MAX-3SAT: given a 3-CNF formula, satisfy as many clauses as possible. An algorithm has approximation ratio s if it always finds a solution whose value is at least s times the optimum. A uniformly random assignment satisfies each clause on three distinct variables with probability 7/8, and the method of conditional expectations turns this into a polynomial-time algorithm with ratio 7/8 (Try it (16)). Can one do better?

The clean way to ask is through a gap problem. For 0 < s < 1, the gap problem asks to distinguish formulas that are satisfiable from formulas in which every assignment satisfies at most an s-fraction of the clauses; formulas in between may be answered either way (it is a promise problem). If this gap problem is NP-hard, then an algorithm with ratio greater than s would solve an NP-hard problem — run it, and see whether its assignment satisfies more than an s-fraction — so no such algorithm exists unless P = NP. The Cook–Levin theorem gives NP-hardness only with a trivial gap: an unsatisfiable formula with m clauses may have an assignment that violates a single clause, so all one gets is s = 1 - 1/m. The PCP theorem says that a constant gap can be achieved. It is cleanest to state for constraint graphs.

A constraint graph \mathcal{G} = (V, E, \Sigma, \{c_e\}) is a graph with an alphabet \Sigma and, for each edge e = uv, a relation c_e \subseteq \Sigma\times\Sigma. An assignment \sigma : V \to \Sigma satisfies e if (\sigma(u),\sigma(v)) \in c_e, and

\mathrm{UNSAT}(\htmlData{n=c5-calG}{\mathcal{G}}) = \min_\sigma\ \frac{\lvert\{e : e \text{ not satisfied by } \sigma\}\rvert}{\lvert E\rvert}.

So 1 - \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}}(\htmlData{n=c5-calG}{\mathcal{G}}) is the largest fraction of the constraints that a single assignment satisfies. Graph 3-colouring is the case \Sigma = \{1,2,3\}, with \htmlData{n=c5-ce}{c_e} = \{(a,b) : a \ne b\} on every edge.

Deciding whether \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}}(\htmlData{n=c5-calG}{\mathcal{G}}) = 0 is NP-hard already for \lvert\Sigma\rvert = 3 (graph 3-colouring), with the trivial gap: an unsatisfiable instance has \mathrm{UNSAT} \ge 1/\lvert E\rvert.

Hardness of a gap problem. A gap problem is a promise problem, so its NP-hardness is defined through reductions that respect the gap. The gap problem for constraint graphs over \htmlData{n=c5-Sigma0}{\Sigma_0} with gap \htmlData{n=c5-alpha}{\alpha} is NP-hard if every L \in {\htmlData{n=c5-NP}{\mathrm{NP}}} has a polynomial-time reduction x \mapsto {\htmlData{n=c5-calG}{\mathcal{G}}}_x to constraint graphs over \Sigma_0 such that

x \in L \ \Rightarrow\ \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}}(\htmlData{n=c5-calG}{\mathcal{G}}_x) = 0, \qquad x \notin L \ \Rightarrow\ \mathrm{UNSAT}(\mathcal{G}_x) \ge {\htmlData{n=c5-alpha}{\alpha}} .

As for ordinary problems, it is enough to have such a reduction from a single NP-hard problem, such as graph 3-colouring, and to compose. An algorithm that tells the two cases apart would then decide L.

Theorem 5.5 (the PCP theorem, gap form; Arora–Safra, Arora–Lund–Motwani–Sudan–Szegedy, 1992/98). There are a constant alphabet \Sigma_0 and a constant \alpha > 0 such that it is NP-hard to distinguish constraint graphs with \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}} = 0 from those with \mathrm{UNSAT} \ge \alpha.

The same holds for MAX-3SAT with some constant s < 1, and the constants can be made optimal: Håstad proved that the gap problem for MAX-3SAT with s = 7/8 + \varepsilon is NP-hard for every \varepsilon > 0. So the random assignment of Try it (16) is the best possible polynomial-time algorithm, unless P = NP.

5.3 Probabilistically checkable proofs

The name of the theorem comes from its second form, which is about checking proofs.

Definition 5.6 (PCP verifier). A PCP verifier for L with randomness r(n) and query complexity q(n) is a polynomial-time algorithm that receives an input x of size n and access to a proof \pi, a string over a fixed finite alphabet. It tosses r(n) random coins; based on x and the coins it chooses q(n) positions of \pi, reads them, and accepts or rejects. It must have completeness — if x \in L, some proof is accepted with probability 1 — and soundness — if x \notin L, every proof is accepted with probability at most 1/2. \mathrm{PCP}[r(n), q(n)] is the class of problems that have such a verifier.

The verifier of Definition 5.1 uses no randomness and reads the whole witness, so \htmlData{n=c5-NP}{\mathrm{NP}} = \htmlData{n=c5-pcp-class}{\mathrm{PCP}}[0, \mathrm{poly}(n)]. In the other direction, a verifier with O(\log n) random bits can only ever look at polynomially many positions:

Proposition 5.7. \htmlData{n=c5-pcp-class}{\mathrm{PCP}}[O(\log n), O(1)] \subseteq {\htmlData{n=c5-NP}{\mathrm{NP}}}.

Proof. Let L have a PCP verifier with r = c\log_2 n random bits and q queries. There are 2^r = n^c random strings, and for each of them the q positions read are computable in polynomial time. So all the positions that the verifier can ever read form a set P of at most qn^c positions, polynomially many. The NP witness is the proof restricted to P, and the NP verifier runs the PCP verifier on every one of the n^c random strings, accepting iff it accepts on all of them. This takes polynomial time. If x \in L, the proof that is accepted with probability 1 is accepted on every random string, so its restriction to P is accepted. If x \notin L, every proof is rejected on at least half of the random strings, in particular on at least one, so every witness is rejected. \square

The theorem says that this inclusion is an equality.

Theorem 5.8 (the PCP theorem, proof-checking form). \htmlData{n=c5-NP}{\mathrm{NP}} = \htmlData{n=c5-pcp-class}{\mathrm{PCP}}[O(\log n), O(1)].

For a mathematician the content is this. Every statement with a short proof has another proof, polynomially longer, written in a format in which any error — however local in the original proof — is spread over a constant fraction of the new one, so that a referee who reads a constant number of randomly chosen symbols catches a wrong proof with probability at least 1/2. A format that spreads every error over a constant fraction of the text is an error-correcting code with a local test. That is why the PCP theorem and locally testable codes are close relatives (§5.9).

Proposition 5.9. Theorem 5.5 and Theorem 5.8 are equivalent.

Proof. (Theorem 5.5 \Rightarrow Theorem 5.8.) Let L \in {\htmlData{n=c5-NP}{\mathrm{NP}}}. The gap problem of Theorem 5.5 is NP-hard, so there is a polynomial-time map x \mapsto {\htmlData{n=c5-calG}{\mathcal{G}}}_x with \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}}(\mathcal{G}_x) = 0 for x \in L and \mathrm{UNSAT}(\mathcal{G}_x) \ge {\htmlData{n=c5-alpha}{\alpha}} for x \notin L. The verifier computes \mathcal{G}_x and takes as proof an assignment \htmlData{n=c5-pi}{\pi} : V(\mathcal{G}_x) \to {\htmlData{n=c5-Sigma0}{\Sigma_0}}. It picks k = \lceil 1/\alpha\rceil edges independently at random, which costs O(\log n) random bits since \mathcal{G}_x has polynomial size, reads the 2k endpoint values, and accepts iff all k constraints hold. A satisfying assignment is always accepted. If x \notin L, every \pi violates at least an \alpha-fraction of the edges and is accepted with probability at most (1-\alpha)^k \le e^{-1} < 1/2. This proves \mathrm{NP} \subseteq {\htmlData{n=c5-pcp-class}{\mathrm{PCP}}}[O(\log n), O(1)], and the reverse inclusion is Proposition 5.7.

(Theorem 5.8 \Rightarrow Theorem 5.5.) Let L be NP-complete, say graph 3-colouring, and take a verifier for it with r = O(\log n) random bits and q queries to a proof over some finite alphabet \Sigma (the alphabet of the proof, not the three colours). Build a constraint graph \htmlData{n=c5-calG}{\mathcal{G}}_x with two kinds of vertices. There is one position vertex for each position of \htmlData{n=c5-pi}{\pi} that the verifier can ever read (at most 2^rq of them, polynomially many), whose value is a symbol of \Sigma. There is one test vertex for each random string \rho \in \{0,1\}^r, whose value is a q-tuple in \Sigma^q, standing for the symbols the verifier reads on \rho. (To have one alphabet \htmlData{n=c5-Sigma0}{\Sigma_0} = \Sigma^q, let a position vertex use only the first coordinate of its value.) Join \rho to each of its q positions, with the constraint: the tuple at \rho is one that the verifier accepts on \rho, and its entry for this position equals the value of the position vertex. If x \in L, an accepted proof together with its local views satisfies every constraint. If x \notin L, take any assignment, and let \pi be the proof that it puts on the position vertices. The verifier rejects \pi on at least half of the random strings, and at such a \rho the tuple at \rho is either rejected by the verifier or differs from \pi in some position; either way one of the q edges at \rho is violated. So \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}}(\mathcal{G}_x) \ge \frac{2^r/2}{q2^r} = \frac1{2q}, and x \mapsto \mathcal{G}_x is a polynomial-time reduction from an NP-complete problem to the gap problem with \htmlData{n=c5-alpha}{\alpha} = 1/(2q). \square

The original proofs of the PCP theorem went through algebra: low-degree tests for polynomials, the sum-check protocol, and composition of verifiers. Dinur's proof is combinatorial.

5.4 Dinur's theorem and the plan

Theorem 5.10 (Dinur, 2007). There are constants \htmlData{n=c5-alpha}{\alpha} > 0 and C and a polynomial-time map \htmlData{n=c5-calG}{\mathcal{G}} \mapsto \mathcal{G}' on constraint graphs over \htmlData{n=c5-Sigma0}{\Sigma_0} such that \lvert\mathcal{G}'\rvert \le C\lvert\mathcal{G}\rvert, \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}}(\mathcal{G}) = 0 \Rightarrow \mathrm{UNSAT}(\mathcal{G}') = 0, and

\mathrm{UNSAT}(\mathcal{G}') \ge \min\bigl(2\,\mathrm{UNSAT}(\mathcal{G}),\ \alpha\bigr).

Iterating the map O(\log\lvert E\rvert) times turns the trivial gap 1/\lvert E\rvert into \htmlData{n=c5-alpha}{\alpha}, and multiplies the size only by a polynomial:

Corollary 5.11 (Dinur's theorem implies the PCP theorem). Theorem 5.10 implies Theorem 5.5, with the same \htmlData{n=c5-Sigma0}{\Sigma_0} and \htmlData{n=c5-alpha}{\alpha}.

Proof. Assume \lvert{\htmlData{n=c5-Sigma0}{\Sigma_0}}\rvert \ge 3. (Two letters would not do: over \{0,1\} every binary constraint is a conjunction of clauses on two variables, so deciding \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}} = 0 is a case of 2-SAT, which is in P.) We reduce graph 3-colouring, which is NP-hard, to the gap problem. Let x be a graph with m edges, and let \htmlData{n=c5-calG}{\mathcal{G}}_{x,0} be the constraint graph over \Sigma_0 on the same graph in which three letters serve as colours and every edge carries the constraint “two different colours”. If x is 3-colourable, \mathrm{UNSAT}(\mathcal{G}_{x,0}) = 0. Otherwise every assignment violates at least one edge: either some vertex with an edge gets a letter that is not a colour, or two adjacent vertices get the same colour. So \mathrm{UNSAT}(\mathcal{G}_{x,0}) \ge 1/m.

Apply the map of Theorem 5.10 t times, and call the result \htmlData{n=c5-calG}{\mathcal{G}}_{x,t}. By induction on t, \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}}(\mathcal{G}_{x,t}) \ge \min\bigl(2^t\,\mathrm{UNSAT}(\mathcal{G}_{x,0}),\ \htmlData{n=c5-alpha}{\alpha}\bigr), because \min(2\min(2^{t}u,\alpha),\alpha) = \min(2^{t+1}u, \alpha); and \mathrm{UNSAT} = 0 is preserved at every step. Take t = \max(0, \lceil\log_2(\alpha m)\rceil), so that 2^t/m \ge \alpha. If x is 3-colourable, then \mathrm{UNSAT}(\mathcal{G}_{x,t}) = 0. If not, then \mathrm{UNSAT}(\mathcal{G}_{x,t}) \ge \min(2^t/m, \alpha) = \alpha. Finally, \lvert\mathcal{G}_{x,t}\rvert \le C^t\lvert\mathcal{G}_{x,0}\rvert \le C(\alpha m)^{\log_2C}\lvert\mathcal{G}_{x,0}\rvert, which is polynomial in the size of x, and each of the t steps runs in time polynomial in the size of its input. So x \mapsto \mathcal{G}_{x,t} is a polynomial-time reduction from 3-colouring to the gap problem with gap \alpha. \square

The map of Theorem 5.10 is the composition of four steps.

step what it does \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}} size alphabet
1. degree reduction (§5.5) makes the graph regular of constant degree divided by a constant times a constant unchanged
2. expanderization (§5.5) makes the graph an expander divided by a constant times a constant unchanged
3. powering (§5.6) lets each vertex speak for its t-neighbourhood multiplied by about \sqrt t times a constant \htmlData{n=c5-Sigma-prime}{\Sigma^{r^{t}}}: huge
4. alphabet reduction (§5.7) composes with an assignment tester divided by a constant times a constant back to \htmlData{n=c5-Sigma0}{\Sigma_0}

Choose t as a large constant so that the gain in step 3 beats the losses in steps 1, 2 and 4 together: net factor \ge 2. This works because the losses of steps 1, 2 and 4 do not depend on t. The shape of the argument is spectral. Powering a constraint graph is the analogue of powering its adjacency operator, which widens the spectral gap; steps 1, 2 and 4 are the normalizations that keep the object in a class where powering helps.

Try it (16). Let \varphi be a 3-CNF formula with m clauses, each on three distinct variables. Show that a uniformly random assignment satisfies 7m/8 clauses in expectation, and turn this into a deterministic polynomial-time algorithm that satisfies at least 7m/8 clauses.

Try it (17). Suppose that an algorithm decides in polynomial time whether a 3-CNF formula is satisfiable. Use it to find a satisfying assignment of a satisfiable 3-CNF formula in polynomial time.

Week 7. Week 6 set up NP, gap problems and PCPs, and reduced the PCP theorem to Dinur's Theorem 5.10: a polynomial-time map that doubles \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}}, keeps the alphabet, and multiplies the size by a constant. This meeting builds the map in the four steps of the table in §5.4. Steps 1, 2 and 4 each cost a constant factor, and step 3 gains a factor that grows with t. Expansion is used in steps 1, 2 and 3; error-correcting codes in step 4.

5.5 Steps 1 and 2: regular, then expanding

Step 1, degree reduction. Replace each vertex v by a cloud of \deg(v) vertices, one for each edge at v, connected by a constant-degree expander carrying equality constraints, and let each original edge join the two cloud vertices that belong to it, with its original constraint. The graph becomes regular of constant degree. An assignment that disagrees inside a cloud pays for it on the expander edges in proportion, which is why \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}} drops by at most a constant factor:

Lemma 5.12 (degree reduction). Fix r_0 and h_0 > 0, and for each k \ge 1 an r_0-regular graph \Xi_k on k vertices (loops and multiple edges allowed, a loop counting twice toward the degree) with edge expansion h(\Xi_k) \ge h_0 in the sense of §1.3. Let \htmlData{n=c5-calG}{\mathcal{G}}' be obtained from \mathcal{G} as above, with a copy of \Xi_{\deg v} on the cloud of v. Then \mathcal{G}' is (r_0+1)-regular with \lvert E'\rvert = (r_0+1)\lvert E\rvert, it is satisfiable if \mathcal{G} is, and

\htmlData{n=c5-UNSAT}{\mathrm{UNSAT}}(\mathcal{G}') \ge \frac{\min(1/2,\ h_0/4)}{r_0+1}\,\mathrm{UNSAT}(\mathcal{G}).

Proof. The clouds have \sum_v\deg v = 2\lvert E\rvert vertices in all, hence \htmlData{n=c5-Xi}{r_0}\lvert E\rvert cloud edges, and there are \lvert E\rvert edges between clouds. A satisfying assignment of \htmlData{n=c5-calG}{\mathcal{G}}, copied to every cloud, satisfies \mathcal{G}'. Now let \sigma' be any assignment of \mathcal{G}'. Let \sigma(v) be the most frequent value of \sigma' on the cloud of v, let F \subseteq E be the edges that \sigma violates, so \lvert F\rvert \ge {\htmlData{n=c5-UNSAT}{\mathrm{UNSAT}}}(\mathcal{G})\lvert E\rvert, and let S_v be the vertices of the cloud of v whose value differs from \sigma(v), with s = \sum_v\lvert S_v\rvert.

So at least \max\bigl(\lvert F\rvert - s,\ \frac{\htmlData{n=c5-Xi}{h_0}}2s\bigr) edges are violated. If s \le \lvert F\rvert/2 the first term is at least \lvert F\rvert/2; otherwise the second is at least \frac{h_0}4\lvert F\rvert. Divide by \lvert E'\rvert = (r_0+1)\lvert E\rvert. \square

Step 2, expanderization. Superimpose a constant-degree expander on V with trivial (always satisfied) constraints and add self-loops. Now \htmlData{n=c5-calG}{\mathcal{G}} is an r-regular expander with \htmlData{n=c1-lambdaX}{\lambda(\mathcal{G})} \le \lambda_0 < r, and \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}} drops by a constant factor. Try it (19) proves both statements.

5.6 Step 3: powering

Build \htmlData{n=c5-calG}{\mathcal{G}}^t: same vertices; the new alphabet \htmlData{n=c5-Sigma-prime}{\Sigma^{r^{t}}} lets each vertex state an opinion about every vertex within distance t; each constraint of \mathcal{G}^t corresponds to a random walk from a to b and checks, for every edge uv of \mathcal{G} on the walk that lies within distance t of both ends, that a's opinion of u and b's opinion of v satisfy \htmlData{n=c5-ce}{c_{uv}}. \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}} grows by a factor \approx\sqrt t (Lemma 5.13), but the alphabet is now huge.

Lemma 5.13 (Dinur's amplification lemma). If \htmlData{n=c5-calG}{\mathcal{G}} is an r-regular expander with self-loops over \Sigma, then

\htmlData{n=c5-UNSAT}{\mathrm{UNSAT}}(\htmlData{n=c5-Gt}{\mathcal{G}^t}) \ge \frac{\sqrt t}{O(1)}\cdot\min\Bigl(\mathrm{UNSAT}(\mathcal{G}),\ \frac1t\Bigr),

the O(1) depending on r, \htmlData{n=c1-lambdaX}{\lambda(\mathcal{G})} and \lvert\Sigma\rvert.

Outline (in the lazy-walk form of Radhakrishnan, which even gives a factor t in place of \sqrt t). Let the constraint of \htmlData{n=c5-Gt}{\mathcal{G}^t} be sampled by a walk that stops after each step with probability 1/t. Fix an assignment \tau to \htmlData{n=c5-calG}{\mathcal{G}}^t.

\square

Two places, then, where Dinur's proof is expander theory: steps 1–2 (expansion of clouds and of the whole graph, so that \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}} is preserved up to constants), and the second moment of step 3 (random walks on expanders do not concentrate on small edge sets — the expander hitting property, as in the expander Chernoff bound).

5.7 Step 4: alphabet reduction by composition

After powering, the alphabet \Sigma' = \Sigma^{r^t} is a constant, but a huge one, and iterating the construction would make it grow without bound. Step 4 brings it back to \htmlData{n=c5-Sigma0}{\Sigma_0} and loses only a constant factor in \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}}. The tool is a PCP for a single constraint, which checks not only that a constraint can be satisfied but that a given assignment is close to satisfying it.

Definition 5.14 (assignment tester). An assignment tester over \htmlData{n=c5-Sigma0}{\Sigma_0} with rejection constant \varepsilon > 0 is an algorithm that takes a Boolean circuit \Phi on variables X = (x_1,\dots,x_k) and outputs a constraint graph \mathcal{P}_\Phi over \Sigma_0 whose vertex set contains X (Boolean values sit in \Sigma_0) together with auxiliary vertices Y, such that: if a \in \{0,1\}^k satisfies \Phi, then a extends to an assignment of X\cup Y that satisfies every constraint of \mathcal{P}_\Phi; and for every assignment (a,b) of X \cup Y, the fraction of violated constraints is at least \varepsilon times the relative Hamming distance of a from the set \Phi^{-1}(1) of satisfying assignments (taken to be 1 if that set is empty).

The auxiliary vertices Y hold a proof, and the test is an LTC-style test of the set \htmlData{n=c5-Phi-inv}{\Phi^{-1}(1)} with the help of that proof: this is a PCP of proximity. For circuits of constant size, assignment testers exist with no regard for efficiency — for instance from the Hadamard code, the BLR test and its self-correction (§4.2), at exponential size in the circuit, which is a constant. That is all Dinur needs, because the constraints of \htmlData{n=c5-Gt}{\mathcal{G}^t} have constant size.

Composition. Fix a binary code e : \htmlData{n=c5-Sigma-prime}{\Sigma'} \to \{0,1\}^\ell of relative distance \rho > 0. Replace each vertex of \htmlData{n=c5-Gt}{\mathcal{G}^t} by \ell Boolean vertices that are to hold the encoding of its value, and each constraint \htmlData{n=c5-ce}{c_{ab}} by a copy of \htmlData{n=c5-PPhi}{\mathcal{P}_{\Phi_{ab}}}, for the circuit on 2\ell Boolean variables

\Phi_{ab}(y,z) = \text{"}y = e(\sigma) \text{ and } z = e(\tau) \text{ for some } (\sigma,\tau) \in {\htmlData{n=c5-ce}{c_{ab}}}\text{"},

padding the copies so that all have the same number of edges.

Lemma 5.15 (composition; Dinur). The composed graph has alphabet \htmlData{n=c5-Sigma0}{\Sigma_0}, is satisfiable if \htmlData{n=c5-Gt}{\mathcal{G}^t} is, has size at most a factor depending on \lvert{\htmlData{n=c5-Sigma-prime}{\Sigma'}}\rvert larger, and has \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}} \ge \frac{\varepsilon\rho}{4}\,\mathrm{UNSAT}(\htmlData{n=c5-calG}{\mathcal{G}}^t).

Proof. Completeness is clear. Given any assignment of the composed graph, decode each block of \ell bits to a nearest codeword, giving an assignment \sigma of \htmlData{n=c5-Gt}{\mathcal{G}^t}; it violates at least a \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}}(\htmlData{n=c5-calG}{\mathcal{G}}^t)-fraction of the constraints. Let \htmlData{n=c5-ce}{c_{ab}} be one of them, with blocks y and z decoding to \sigma(a) and \sigma(b). For every (\sigma_1,\tau_1) \in c_{ab} we have \sigma_1 \ne \sigma(a) or \tau_1 \ne \sigma(b). Say \sigma_1 \ne \sigma(a). Since y is at least as close to e(\sigma(a)) as to e(\sigma_1), and these two codewords are at distance at least \rho\ell, the block y is at distance at least \rho\ell/2 from e(\sigma_1). So (y,z) is at relative distance at least \rho/4 from \htmlData{n=c5-Phi-inv}{\Phi_{ab}^{-1}(1)}, and at least an \varepsilon\rho/4-fraction of the copy of \htmlData{n=c5-PPhi}{\mathcal{P}_{\Phi_{ab}}} is violated. Since all copies have the same size, the claim follows. \square

This is where error-correcting codes enter the PCP theorem. Without the code, an assignment that gets one large symbol wrong could be a single bit away from a correct one, and no tester could notice it with probability bounded below (Try it (20)). The code turns wrong into far, and far is what a tester can detect. The same move — encode, then test proximity — is how every PCP is built, and it is the reason PCPs and LTCs are relatives.

5.8 Consequences for codes

Combined with the short PCPs of Ben-Sasson–Sudan (length n\cdot\mathrm{polylog}\,n with polylogarithmic queries), gap amplification brings the queries down to a constant: PCPs and LTCs of quasi-linear length with constant query complexity — the fourth row of the table in §4.5. Dinur's method amplifies soundness but cannot make the length linear: every round multiplies the size by a constant, and the PCP-based LTCs inherit the algebraic core. Linear length needed a different idea (§8), and the square complexes that provide it can be read as a two-dimensional version of Dinur's “opinions about neighbours” — each vertex holds a local tensor codeword, i.e. an opinion about the squares around it, and the test checks consistency.

5.9 LTCs and PCPs: how each feeds the other

The two notions are close relatives but not the same thing, and it helps to say exactly how they are related.

So the dictionary is: LTC \leftrightarrow agreement or coboundary expansion of one complex; PCP \leftrightarrow the same, plus an embedding of arbitrary constraints into that complex. The quantum version of this dictionary, qLTC versus quantum PCP, is §14.5.

Try it (18). Why must \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}} be capped at 1/t in Lemma 5.13? Construct a constraint graph with \mathrm{UNSAT}(\htmlData{n=c5-calG}{\mathcal{G}}) = 1/2 for which \mathrm{UNSAT}(\htmlData{n=c5-Gt}{\mathcal{G}^t}) cannot exceed 1, and explain what the cap is protecting against in general.

Try it (19). Step 2 adds to an r_{\mathrm{old}}-regular graph a r_{\mathrm{exp}}-regular expander with second eigenvalue (in absolute value) at most \lambda_{\mathrm{exp}}, and \ell \ge 1 self-loops per vertex, all with trivial constraints; as in Lemma 5.12, a loop counts twice toward the degree and contributes 2 to the diagonal of the adjacency operator. Show that \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}} drops by at most a constant factor, and that the new graph, of degree r_{\mathrm{new}} = r_{\mathrm{old}} + r_{\mathrm{exp}} + 2\ell, has \lambda \le r_{\mathrm{new}} - \min(r_{\mathrm{exp}} - \lambda_{\mathrm{exp}},\ 4\ell).

Try it (20). Suppose step 4 wrote the values of \htmlData{n=c5-Sigma-prime}{\Sigma'} in plain binary, \ell = \lceil\log_2\lvert\Sigma'\rvert\rceil bits with no error-correcting code. Show that a violated constraint \htmlData{n=c5-ce}{c_{ab}} can then have its two blocks at relative distance only 1/(2\ell) from \htmlData{n=c5-Phi-inv}{\Phi_{ab}^{-1}(1)}, and explain why the composition would lose a factor that grows with t.

Sources. For §5.1–§5.3: Arora–Barak, Computational Complexity: A Modern Approach (CUP 2009), Ch. 1–2 (P, NP, reductions, Cook–Levin) and Ch. 11 (the PCP theorem and hardness of approximation) — the textbook to lend a mathematician; Goldreich, P, NP, and NP-Completeness (CUP 2010), a short introduction; Turing, On computable numbers, with an application to the Entscheidungsproblem, Proc. London Math. Soc. 42 (1936) (Theorem 5.2); Cook, The complexity of theorem-proving procedures, STOC 1971; Levin, Universal sequential search problems, Probl. Inf. Transm. 9 (1973); Karp, Reducibility among combinatorial problems, in Complexity of Computer Computations (1972); Håstad, Some optimal inapproximability results, JACM 48 (2001). For §5.4–§5.7: Dinur, The PCP theorem by gap amplification, JACM 54 (2007); Radhakrishnan–Sudan, On Dinur's proof of the PCP theorem, Bull. AMS 44 (2007) — the exposition to read first; Radhakrishnan, Gap amplification in PCPs using lazy random walks, ICALP 2006; Dinur–Reingold, Assignment testers: towards a combinatorial proof of the PCP theorem, SICOMP 36 (2006); Arora–Barak Ch. 22; Arora–Safra, JACM 45 (1998); Arora–Lund–Motwani–Sudan–Szegedy, JACM 45 (1998); Ben-Sasson–Sudan, Short PCPs with polylog query complexity, SICOMP 38 (2008). For §5.9: Ben-Sasson–Goldreich–Harsha–Sudan–Vadhan, Robust PCPs of proximity, shorter PCPs and applications to coding, SICOMP 36 (2006), the PCPP-to-LTC construction; Goldreich, Introduction to Property Testing, Ch. 13 (LTCs and PCPs side by side); Bafna–Lifshitz–Minzer, Constant degree direct product testers with small soundness, FOCS 2024, arXiv:2402.00850; Dikstein–Dinur–Lubotzky, Low acceptance agreement tests via bounded-degree symplectic HDXs, arXiv:2402.01078; Bafna–Minzer–Vyas, Quasi-linear size PCPs with small soundness from HDX, STOC 2025, arXiv:2407.12762.

Answers to the exercises

Answer (16). A clause fails only if its three literals are all false, which happens with probability 1/8; by linearity of expectation 7m/8 clauses are satisfied on average. Now fix the variables one at a time. The conditional expectation of the number of satisfied clauses, given the values fixed so far, is computable exactly — each clause contributes 1, 0, or 1 - 2^{-j} with j its number of free literals — and it is the average of the two conditional expectations obtained by fixing the next variable to 0 or to 1. So one of the two choices keeps it at least 7m/8. After all variables are fixed, the expectation is the actual number of satisfied clauses.

Answer (17). Fix the variables one at a time. Set x_1 = 0 in \varphi: delete the clauses that become true and the literals that become false. The result is again a formula with at most three literals per clause (pad a shorter clause by repeating a literal; an empty clause makes the formula unsatisfiable). Ask the algorithm whether it is satisfiable. If yes, keep x_1 = 0; if not, the formula with x_1 = 1 must be satisfiable, since \varphi is, so keep x_1 = 1. Continue with x_2, x_3, \dots on the simplified formula. After n calls every variable is fixed, and the formula has stayed satisfiable at each step, so the assignment satisfies \varphi.

Answer (18). \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}} \le 1 always, so no factor \sqrt t can be gained from 1/2 once t > 4. In the proof, the cap keeps \lvert F\rvert/\lvert E\rvert \cdot t \lesssim 1, so that a walk of length t meets F O(1) times on average and the second moment is comparable to the first moment; with larger F the walk meets F many times, \mathbb{E}N^2 \gg \mathbb{E}N, and the Paley–Zygmund step gives nothing better than a constant.

Answer (19). Violated edges stay violated and the number of edges grows by the constant factor r_{\mathrm{new}}/r_{\mathrm{old}}, so \htmlData{n=c5-UNSAT}{\mathrm{UNSAT}} is divided by at most that factor. The new adjacency operator is A_{\mathrm{old}} + A_{\mathrm{exp}} + 2\ell I. For v \perp \mathbf{1}, \langle v, A_{\mathrm{new}}v\rangle \le (r_{\mathrm{old}} + \lambda_{\mathrm{exp}} + 2\ell)\lVert v\rVert^2 = (r_{\mathrm{new}} - (r_{\mathrm{exp}} - \lambda_{\mathrm{exp}}))\lVert v\rVert^2, even if the old graph is disconnected, and \langle v, A_{\mathrm{new}}v\rangle \ge (-r_{\mathrm{old}} - r_{\mathrm{exp}} + 2\ell)\lVert v\rVert^2 = (-r_{\mathrm{new}} + 4\ell)\lVert v\rVert^2. The expander fixes the top of the spectrum and the loops fix the bottom.

Answer (20). Take (\sigma,\tau) \notin {\htmlData{n=c5-ce}{c_{ab}}} such that changing one bit of the binary expansion of \sigma gives \sigma_1 with (\sigma_1,\tau) \in c_{ab}; for a typical constraint such pairs exist. Then the blocks (y,z) of (\sigma,\tau) are one bit out of 2\ell from a satisfying pair, and the tester need only reject with probability \varepsilon/(2\ell). Since \ell \approx r^t\log_2\lvert\Sigma\rvert grows with t, this loss would swallow the gain of step 3. With a code of relative distance \rho the loss is the constant \varepsilon\rho/4, independent of t.

Part C — High-dimensional expansion

6. Complexes, cochains, and testability as expansion

Idea. Put the code on the i-dimensional faces of a complex: the coboundaries B^i. A word is a coboundary exactly when its coboundary vanishes — when every (i+1)-face sees an even number of its boundary faces — so “pick a random (i+1)-face and check it” is a natural local test. The test is sound exactly when small coboundary forces closeness to B^i, which is the definition of a coboundary expander. For i = 0 this is edge expansion; for i = 1 and the complete complex it is BLR. Local testability is expansion one dimension up.

Goal of the chapter (week 8). Set up cochains and the two expansion notions of high-dimensional expander theory — coboundary expansion and local spectral expansion; prove the Kaufman–Lubotzky dictionary; prove coboundary expansion of the complete complex by a cone argument and see that it is BLR's self-correction; see why the resulting codes are poor, which motivates §7.

6.1 Cochains

Let X be a finite simplicial complex and X(i) its i-dimensional faces. The i-cochains are C^i = \mathbb{F}_2^{X(i)}, functions on i-faces, identified with subsets of X(i). The coboundary \delta : C^i \to C^{i+1} is

\delta f(\sigma) = \sum_{\tau \subset \sigma,\ \tau\in {\htmlData{n=c6-Xi}{X(i)}}} f(\tau) \qquad (\sigma \in X(i+1)),

the sum over the i+2 faces of \sigma of codimension one. Then \delta\circ\delta = 0 (each (i-1)-face of an (i+1)-face \sigma lies in exactly two i-faces of \sigma). Set Z^i = \ker{\htmlData{n=c6-delta}{\delta}} (cocycles), B^i = \delta {\htmlData{n=c6-Ci}{C^{i-1}}} (coboundaries), H^i = Z^i/B^i, with B^0 = \{0, \mathbf{1}\} by convention (the reduced version: C^{-1} = \mathbb{F}_2, \delta(1) = \mathbf{1}). Weights are normalized: \lVert f\rVert = \lvert\mathrm{supp}\,f\rvert/\lvert {\htmlData{n=c6-Xi}{X(i)}}\rvert for f \in C^i.

6.2 Coboundary expansion

Definition 6.1 (coboundary expansion; Linial–Meshulam, Gromov). The i-th coboundary expansion constant of X is

h^i(X) = \min_{f \in C^i\setminus {\htmlData{n=c6-Bi}{B^i}}}\ \frac{\lVert{\htmlData{n=c6-delta}{\delta}} f\rVert}{\min_{b\in B^i}\lVert f + b\rVert} .

X is an \varepsilon-coboundary expander in dimension i if h^i(X) \ge \varepsilon: for every i-cochain, \lVert\delta f\rVert \ge \varepsilon\cdot{\htmlData{n=c0-dist-set}{\mathrm{dist}(f, B^i)}} in normalized weight.

\htmlData{n=c6-hi}{h^i} > 0 forces \htmlData{n=c6-Hi}{H^i} = 0 (a cocycle outside \htmlData{n=c6-Bi}{B^i} has \htmlData{n=c6-norm}{\lVert\delta f\rVert} = 0). For i = 0, \min_b\lVert g + b\rVert = \min(\lVert g\rVert, 1 - \lVert g\rVert) and h^0 is the normalized Cheeger constant: coboundary expansion in dimension 0 is edge expansion. In higher dimensions it is an isoperimetric inequality for cochains: a cochain that is far from every coboundary has a large coboundary.

Linial and Meshulam introduced \htmlData{n=c6-hi}{h^1} to study the homology of random 2-complexes (the threshold for \htmlData{n=c6-Hi}{H^1}(X;\mathbb{F}_2) = 0), and Gromov to prove topological overlap: if X is a d-dimensional coboundary expander (in all dimensions < d), then for every continuous map X \to \mathbb{R}^d some point is covered by the images of a constant fraction of the d-faces. Gromov asked whether there are bounded-degree complexes with this property in every dimension. §7 answers him.

6.3 The dictionary

Proposition 6.2 (Kaufman–Lubotzky, 2014). For a complex X and i \ge 0, consider the code \htmlData{n=c6-Bi}{B^i} \subseteq \mathbb{F}_2^{X(i)} and the face test: pick a uniform (i+1)-face \sigma, read f on its i+2 faces of codimension one, accept iff \htmlData{n=c6-delta}{\delta} f(\sigma) = 0. The test has perfect completeness, makes i+2 queries, and rejects f with probability exactly \htmlData{n=c6-norm}{\lVert\delta f\rVert}. Hence

B^i \text{ is } (i+2, \htmlData{n=c4-soundness}{\kappa})\text{-locally testable with the face test} \iff {\htmlData{n=c6-hi}{h^i}}(X) \ge \kappa .

Proof. \htmlData{n=c6-delta}{\delta} b = 0 for b \in {\htmlData{n=c6-Bi}{B^i}} because \htmlData{n=c6-dd0}{\delta\circ\delta} = 0; the rejection probability is the fraction of (i+1)-faces on which \delta f = 1, which is \htmlData{n=c6-norm}{\lVert\delta f\rVert}; and soundness \lVert\delta f\rVert \ge \kappa\,\htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}(f, B^i) for all f is the definition of \htmlData{n=c6-hi}{h^i} \ge \kappa. \square

The proposition is a tautology once written down, and that is its point: every statement about coboundary expansion is a statement about local testability, and conversely. If \htmlData{n=c6-Hi}{H^i} \ne 0 the face test accepts the non-trivial cocycles, so it tests Z^i, not \htmlData{n=c6-Bi}{B^i}; the corresponding expansion notion — small coboundary forces closeness to Z^i — is cosystolic expansion, §7.

Proposition 6.3 (the complete complex). Let X be the 2-skeleton of the full simplex on m vertices. Then \htmlData{n=c6-hi}{h^1}(X) \ge 1.

Proof (a cone argument). Let f \in {\htmlData{n=c6-Ci}{C^1}}. For a vertex v_0 define g_{v_0}(u) = f(v_0u) (and g_{v_0}(v_0) = 0). Then for an edge uv not containing v_0,

(f + \htmlData{n=c6-delta}{\delta} {\htmlData{n=c6-gv0}{g_{v_0}}})(uv) = f(uv) + f(v_0u) + f(v_0v) = \delta f(v_0uv),

and (f + \htmlData{n=c6-delta}{\delta} {\htmlData{n=c6-gv0}{g_{v_0}}})(v_0u) = 0. So \htmlData{n=c0-dist-set}{\mathrm{dist}(f, B^1)} \le \lvert\{uv : \delta f(v_0uv) = 1\}\rvert. Summing over v_0 counts each triangle of \mathrm{supp}\,\delta f three times (once per choice of apex), so some v_0 gives \htmlData{n=c1-dist}{\mathrm{dist}}(f,\htmlData{n=c6-Bi}{B^1}) \le 3\lvert\mathrm{supp}\,\delta f\rvert/m. Normalizing by \binom m2 and \binom m3: \htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}(f,B^1) \le \frac{3\binom m3}{m\binom m2}{\htmlData{n=c6-norm}{\lVert\delta f\rVert}} = \frac{m-2}{m}\lVert\delta f\rVert \le \lVert\delta f\rVert. \square

This is BLR's self-correction (Theorem 4.6) in disguise: \htmlData{n=c6-gv0}{g_{v_0}} is “the cut that f predicts from the point of view of v_0”, just as the vote V_x(r) = f(r) + f(x+r) is the value at x predicted from r. The triangle test is the three-query test (Try it (22)), and the identity (f + \htmlData{n=c6-delta}{\delta} g_{v_0})(uv) = \delta f(v_0uv) is the short dependency among checks behind the vote identity in that proof. BLR takes a majority over all apexes v_0, and the proof above just picks the best one. But the complete complex has unbounded degree. On a bounded-degree complex the codes of Proposition 6.2 are poor: the cut code \htmlData{n=c6-Bi}{B^1} of a r-regular graph has rate \approx 2/r — fine — but its minimum distance is the smallest nonzero cut, the star of a vertex, of size r: constant, not linear. The high-dimensional codes of §8–§9 fix this by putting local codes on the links, exactly as Tanner's local codes fixed the cycle code in §2–§3.

6.4 Local spectral expansion

The link of a face \tau is X_\tau = \{\sigma\setminus\tau : \tau \subseteq \sigma \in X\}. A d-dimensional complex is a \lambda-local spectral expander if its 1-skeleton is connected and, for every face \tau of dimension \le d-2 (including the empty face), the 1-skeleton of X_\tau is connected with normalized second eigenvalue \le \lambda.

Theorem 6.4 (Garland's method; Oppenheim's trickling down). If the 1-skeleton of X is connected and the 1-skeleton of every vertex link has normalized second eigenvalue at most \lambda < 1/2, then the 1-skeleton of X has normalized second eigenvalue at most \lambda/(1-\lambda). Applied inductively, spectral gaps of the top-dimensional links propagate to all links.

Local spectral expansion is the “cheap” high-dimensional expansion: it is checked on bounded-size links. The two standard sources of bounded-degree examples:

Local spectral expansion implies spectral expansion of all the random walks one can define on faces (Kaufman–Mass; Kaufman–Oppenheim; Dinur–Kaufman), and it is the input to the agreement tests of Dinur–Kaufman. It does not by itself imply coboundary expansion; §7 adds the missing local ingredient.

Try it (21). Show that for a connected r-regular graph (a 1-dimensional complex), \htmlData{n=c6-h0}{h^0} in the sense of Definition 6.1 is, up to normalization, the Cheeger constant h(X) of §1.3.

Try it (22). Identify BLR with Proposition 6.3. Hint: the vertices are \mathbb{F}_2^k; given f : \mathbb{F}_2^k \to \mathbb{F}_2, consider the 1-cochain F(x,y) = f(x + y) on the complete graph on \mathbb{F}_2^k.

Sources. Kaufman–Lubotzky, High dimensional expanders and property testing, ITCS 2014; Linial–Meshulam, Homological connectivity of random 2-complexes, Combinatorica 26 (2006); Gromov, Singularities, expanders and topology of maps. Part 2, GAFA 20 (2010); Meshulam–Wallach, Homological connectivity of random k-dimensional complexes, Random Structures Algorithms 34 (2009); Oppenheim, Local spectral expansion approach to high dimensional expanders, Part I, Discrete Comput. Geom. 59 (2018); Kaufman–Oppenheim, Construction of new local spectral high dimensional expanders, STOC 2018; Garland, p-adic curvature and the cohomology of discrete subgroups of p-adic groups, Ann. of Math. 97 (1973); Lubotzky–Samuels–Vishne, Ramanujan complexes of type \widetilde A_d, Israel J. Math. 149 (2005), and Explicit constructions of Ramanujan complexes of type \widetilde A_d, European J. Combin. 26 (2005); Kaufman–Mass, High dimensional random walks and colorful expansion, ITCS 2017; Dinur–Kaufman, High dimensional expanders imply agreement expanders, FOCS 2017; Lubotzky, High dimensional expanders, Proc. ICM 2018, arXiv:1712.02526 — the survey for Part C: §2 (spectral HDX, Garland, Ramanujan complexes), §3 (coboundary and cosystolic expansion), §5 (property testing and the Kaufman–Lubotzky dictionary).

Answers to the exercises

Answer (21). For g \subseteq V with \lvert g\rvert \le N/2, \min_b\htmlData{n=c6-norm}{\lVert g+b\rVert} = \lvert g\rvert/N and \lVert{\htmlData{n=c6-delta}{\delta}} g\rVert = \lvert {\htmlData{n=c1-EST}{E(g, V\setminus g)}}\rvert/\lvert E\rvert. So \htmlData{n=c6-h0}{h^0} = \min_g \frac{\lvert E(g,V\setminus g)\rvert/(r N/2)}{\lvert g\rvert/N} = \frac{2}{r}{\htmlData{n=c1-h}{h(X)}}.

Answer (22). \delta F(x,y,z) = f(x+y) + f(y+z) + f(x+z), and with a = x+y, b = y+z this is f(a) + f(b) + f(a+b): the BLR test on a uniformly random pair (a,b) (up to the measure-zero cases x = y etc.). F is a coboundary \delta g exactly when f(x+y) = g(x) + g(y) for all x \ne y; putting y = 0 gives g = f + \text{const}, and then f is linear. So the BLR rejection probability is \htmlData{n=c6-norm}{\lVert\delta F\rVert}, and Proposition 6.3 bounds it below by the distance of F from the cut code; relating that distance to the distance of f from \htmlData{n=c4-L}{\mathcal{L}} is one more averaging step — Lemma 4.7 and the distance step of the voting proof of Theorem 4.6.

7. Cosystolic expanders: Kaufman–Kazhdan–Lubotzky and Evra–Kaufman

Idea. Coboundary expansion asks for H^i = 0, which bounded-degree complexes with a large symmetry group rarely have. Cosystolic expansion allows cohomology but asks that small coboundary force closeness to cocycles, and that every non-trivial cocycle be heavy. It can be proved from local data: if every link is a coboundary expander and the complex is a good local spectral expander, a cochain with small coboundary can be simplified link by link until it is visibly close to a cocycle. Ramanujan complexes satisfy the local hypotheses because their links are spherical buildings.

Goal of the chapter (weeks 9–10). Week 9: define cosystolic expansion and see its two readings — testability of \htmlData{n=c6-Zi}{Z^i}, and heaviness of non-trivial classes; read it as property testing, and see that the testing problems of §4 (of codes, of group actions, of coverings) and the agreement tests behind recent PCPs are all forms of condition (a) of cosystolic expansion for some complex, sometimes with non-abelian coefficients; state the Kaufman–Kazhdan–Lubotzky and Evra–Kaufman theorems and the local-to-global criterion; see the two uses in coding theory, the prototype of local-to-global testability (§8–§9) and one-sided quantum distance (§10). Week 10: prove the first case of the key small-set theorem completely — on a 2-dimensional complex whose links are good spectral expanders, small locally minimal 1-cochains have large coboundary; deduce a linear cosystole in dimension 1; show that testability of Z^i follows from the same statement one dimension up, by the flip decoder of §3 run on syndromes; see what Evra–Kaufman add in higher dimensions.

7.1 Definitions

Definition 7.1 (cosystolic expansion). A complex X is an (\varepsilon,\mu)-cosystolic expander in dimension i if (a) \htmlData{n=c6-norm}{\lVert\delta f\rVert} \ge \varepsilon\cdot\min_{z\in {\htmlData{n=c6-Zi}{Z^i}}}\lVert f + z\rVert for every f \in {\htmlData{n=c6-Ci}{C^i}}, and (b) every z \in Z^i\setminus {\htmlData{n=c6-Bi}{B^i}} has \lVert z\rVert \ge \mu. The quantity \min\{\lVert z\rVert : z \in Z^i\setminus B^i\} is the (normalized) i-cosystole.

Condition (a) is local testability of \htmlData{n=c6-Zi}{Z^i} with the face test (Proposition 6.2 with Z^i in place of \htmlData{n=c6-Bi}{B^i}). Condition (b) says the cohomology classes are “far apart”, which is what a code needs: in §10 the quantum code attached to X has H^i as its logical space, and (b) is its distance on one side. If H^i = 0, (b) is vacuous and (a) is coboundary expansion.

Theorem 7.2 (Dotterrer–Kaufman–Wagner). Cosystolic expansion in all dimensions < d (with constants \varepsilon,\mu) implies Gromov's topological overlap property for d-dimensional complexes.

7.2 The theorems

Theorem 7.3 (Kaufman–Kazhdan–Lubotzky, 2014/16). For q large enough, the 2-skeletons of the 3-dimensional Ramanujan complexes of Lubotzky–Samuels–Vishne form a family of bounded-degree 2-dimensional complexes with Gromov's topological overlap property. The proof establishes, over \mathbb{F}_2 and in the dimensions needed, what Evra–Kaufman later named cosystolic expansion. The main new ingredient is a linear lower bound on the \mathbb{F}_2-cosystoles — “linear \mathbb{F}_2-systolic bounds”, which KKL call isoperimetric inequalities for Ramanujan complexes. Conditional on Serre's congruence subgroup conjecture, a subfamily consists of coboundary expanders.

Theorem 7.4 (Evra–Kaufman, 2016). For every d, a new local-to-global criterion yields bounded-degree cosystolic expanders — and hence complexes with the topological overlap property — of every dimension, from the skeletons of Ramanujan complexes. This answers Gromov's question in all dimensions.

Theorem 7.5 (local-to-global criterion, informal). Let X be a D-dimensional complex, i < D - 1. Suppose (i) every proper link X_\tau (\tau \ne \emptyset) is a \beta-coboundary expander in the relevant dimensions, and (ii) X is a \lambda-local spectral expander with \lambda small enough in terms of \beta and D. Then the (i+1)-skeleton of X is an (\varepsilon,\mu)-cosystolic expander in dimension i, with \varepsilon,\mu > 0 depending only on \beta, \lambda, D.

For Ramanujan complexes both hypotheses are local and hold: (ii) because links are spherical buildings with spectral gap \approx 1 - O(1/\sqrt q) (Theorem 6.4), and (i) because spherical buildings are coboundary expanders (Gromov; Lubotzky–Meshulam–Mozes), with constants independent of q — by a cone argument like Proposition 6.3, using the fact that in a building any two simplices lie in a common apartment, which is a sphere. Week 10 proves the first case of the small-set theorem behind Theorem 7.5, with its consequences (§7.5–§7.7), and §7.8 says what the general case adds.

7.3 Cosystolic expansion as property testing

Condition (a) is a statement about a tester. It is worth spelling out what is being tested, because the same pattern covers every testing problem of the year so far.

A code with a quotient. The face test for Z^i reads i+2 bits, and it cannot tell a coboundary from a non-trivial cocycle: both have \delta f = 0. So soundness can only be relative to Z^i, and the cohomology H^i is exactly the part of the code that local checks cannot see. Condition (b) adds that Z^i is a union of cosets of \htmlData{n=c6-Bi}{B^i} that lie far apart. A cosystolic expander thus provides a locally testable code Z^i, a subcode B^i of “trivial” words, and a quotient Z^i/B^i of large distance. This nested pair is the structure of a quantum CSS code (§10), with B^i in the role of the stabilizers and Z^i/B^i in the role of the logical operators.

Local-to-global testing. Theorem 7.5 says: if the face test is sound on every link (coboundary expansion of the links) and the complex is a good local spectral expander, then the face test is sound globally. This was the first theorem of its kind, and its template recurs: in the vertex test of §9, where the sound local tests are robust tensor codes; in the small-set lemma of §12; and in the quantum LTCs of §13. Agreement testing (§5.9) has the same shape — local functions on faces that mostly agree on intersections come from one global function — and Dinur–Kaufman proved the first agreement theorems on high-dimensional expanders.

Non-abelian coefficients: coverings. Replace \mathbb{F}_2 by \htmlData{n=c4-Sym}{\mathrm{Sym}(n)}. A 1-cochain with values in \mathrm{Sym}(n) assigns a permutation f(uv) to each oriented edge, with f(vu) = f(uv)^{-1}. It is a cocycle if f(uv)f(vw)f(wu) = \mathrm{id} around every triangle, and it is cohomologous to f' if f'(uv) = g(u)f(uv)g(v)^{-1} for some g : \htmlData{n=c6-Xi}{X(0)} \to \mathrm{Sym}(n). A cocycle is the same thing as an n-sheeted covering of X: the fibre over each vertex is \{1,\dots,n\}, f(uv) says how the sheets are glued along uv, and cohomologous cocycles give isomorphic coverings. The face test now picks a triangle and a point of the fibre and checks the cocycle condition there, i.e. it checks that a map is locally a covering. Dinur–Meshulam call X cover-stable if every map that is almost a covering in this sense is close to a genuine covering; they show that this is cosystolic expansion with \mathrm{Sym}(n) coefficients, and prove it for the 2-dimensional spherical buildings of type A_3, which are the vertex links of the 3-dimensional Ramanujan complexes behind Theorem 7.3.

Non-abelian coefficients: groups. Take for X the presentation complex of \htmlData{n=c4-Gamma}{\Gamma} = \langle S\mid R\rangle: one vertex, a loop for each generator, and a 2-cell for each relator. A \htmlData{n=c4-Sym}{\mathrm{Sym}(n)}-valued 1-cocycle on X is a solution of R, i.e. an action of \Gamma on \{1,\dots,n\}, and the face test is the relation test of §4.4 (Try it (24)). Chapman–Lubotzky prove that three stability problems are equivalent: stability of \Gamma in permutations, stability of n-sheeted coverings of X, and stability of \mathrm{Sym}(n)-valued 1-cocycles on X. So group stability is a non-abelian, rate-free form of condition (a) of Definition 7.1, and the Kaufman–Lubotzky dictionary of Proposition 6.2 holds for groups. (Condition (b) has no counterpart here.)

Agreement tests need coefficients too. The tests behind the PCPs of §5.9 are agreement tests in the low-acceptance regime, where the test passes with small but non-negligible probability. Bafna–Minzer and Dikstein–Dinur (2023) showed that for these, local spectral expansion is not enough. A complex supports such a test essentially when it has no small connected coverings and satisfies a coboundary-expansion condition with non-abelian coefficients — Bafna–Minzer's “unique-games coboundary expansion”, Dikstein–Dinur's “swap cosystolic expansion”. Bounded-degree complexes with these properties (Bafna–Lifshitz–Minzer; Dikstein–Dinur–Lubotzky) are what the quasi-linear PCPs of Bafna–Minzer–Vyas run on.

7.4 What this does and does not give coding theory

Try it (23). Let X be a 1-dimensional complex (a graph). What are \htmlData{n=c6-Zi}{Z^0}, \htmlData{n=c6-Bi}{B^0}, \htmlData{n=c6-Hi}{H^0}, and what does cosystolic expansion in dimension 0 say? Do the same for Z^1 of a graph, and explain why 1-dimensional complexes are never interesting cosystolic expanders in their top dimension.

Try it (24). Let X be the presentation complex of \htmlData{n=c4-Gamma}{\Gamma} = \langle S\mid R\rangle, a cell complex with one vertex, a loop for each s \in S, and for each relator w \in R a 2-cell attached along w. Define \htmlData{n=c4-Sym}{\mathrm{Sym}(n)}-valued 1-cochains, cocycles and coboundaries on X as in §7.3, reading the cocycle condition around each 2-cell. Show that the cocycles are exactly the solutions of R, that cohomologous cocycles are conjugate actions, and that the face test is the relation test of §4.4.

Week 10. Week 9 stated the theorems and read them as statements about testers. This meeting proves the first case of the small-set theorem on which they rest. Throughout §7.5–§7.7, X is a pure 2-dimensional complex — every vertex and edge lies in a triangle — with connected 1-skeleton. The target is Theorem 7.7: if the vertex links are good spectral expanders, a small 1-cochain that cannot be made lighter by local moves has a large coboundary. The cosystole bound and the testability statement then follow by short arguments (§7.7).

7.5 Weights, links and local minimality

For complexes that are not regular, it is convenient to weight faces by the triangles above them. Pick a uniformly random triangle T and a uniformly random ordering (v,u,w) of its vertices. The law of v is a probability distribution on vertices, the law of \{v,u\} one on edges, and T is uniform on triangles; “a random vertex” or “a random edge” below means one drawn this way. For f \in {\htmlData{n=c6-Ci}{C^1}} put \lVert f\rVert = \Pr[vu \in f], and for f \in C^2 put \lVert f\rVert = \Pr[T \in f]. When every edge lies in the same number of triangles these are the normalized weights of §6.1.

Links. The link X_v of a vertex is a graph: its vertices are the neighbours u of v, and its edges are the pairs uw for which vuw is a triangle. Given that the first vertex is v, the pair \{u,w\} is a uniformly random edge of X_v, and u is a random endpoint of it. Write \mu_v(A) for the probability that u \in A, for A \subseteq X_v(0); this is the stationary measure of the random walk on X_v. The link is a \lambda-spectral expander, for some \lambda \ge 0, if every eigenvalue of that walk other than 1 is at most \lambda (the normalized second eigenvalue of §6.4). The one consequence used below is the one-sided mixing bound

\Pr\bigl[u \in A \text{ and } w \in A\bigr] \le {\htmlData{n=c7-muvA}{\mu_v(A)}}\bigl(\mu_v(A) + \lambda\bigr) \qquad (A \subseteq {\htmlData{n=c7-Xv}{X_v}}(0)),

for a random edge uw of \htmlData{n=c7-Xv}{X_v} (Try it (26)). The same bound holds on the 1-skeleton of X, for a random edge, with the distribution of a random vertex in place of \htmlData{n=c7-muvA}{\mu_v}, and in place of \lambda any \lambda_1 \ge 0 that bounds the eigenvalues other than 1 of the random walk on the 1-skeleton. By Theorem 6.4, in Oppenheim's weighted form, one can take \lambda_1 = \lambda/(1-\lambda) when all vertex links are \lambda-spectral expanders with \lambda < 1/2.

Localization. For f \in {\htmlData{n=c6-Ci}{C^1}} and a vertex v, the localization of f at v is f_v = \{u : vu \in f\} \subseteq {\htmlData{n=c7-Xv}{X_v}}(0), the trace of f on the link, and \mu_v := \htmlData{n=c7-muvA}{\mu_v(f_v)} is the local weight of f at v: the probability that a random edge at v lies in f. Averaging over v gives the averaging identity

\mathbb{E}_v\,\htmlData{n=c7-muv}{\mu_v} = \htmlData{n=c6-norm}{\lVert f\rVert} .

Local minimality. Adding the coboundary \delta\mathbf{1}_v — the star of v, all edges at v — to f replaces \htmlData{n=c7-fv}{f_v} by its complement and changes nothing away from v.

Definition 7.6 (locally minimal 1-cochain). A cochain f \in C^1 is locally minimal if \htmlData{n=c6-norm}{\lVert f + \delta\mathbf{1}_v\rVert} \ge \lVert f\rVert for every vertex v; equivalently, if \htmlData{n=c7-muv}{\mu_v} \le 1/2 at every vertex.

In the language of §6: \htmlData{n=c7-fv}{f_v} is the lighter of the two elements of its coset f_v + \htmlData{n=c6-Bi}{B^0}(\htmlData{n=c7-Xv}{X_v}) = \{f_v,\ X_v(0)\setminus f_v\}. Every f can be made locally minimal without changing its class modulo B^1: while some vertex has \htmlData{n=c7-muv}{\mu_v} > 1/2, add its star. Each step strictly lowers \htmlData{n=c6-norm}{\lVert f\rVert}, so the process stops. This is the move of the flip decoder (Algorithm 3.8), with the star of a vertex in place of a single bit.

7.6 Small locally minimal 1-cochains expand

Theorem 7.7 (small-set expansion in dimension 1). Let X be a pure 2-dimensional complex with connected 1-skeleton, whose vertex links are \lambda-spectral expanders, and let \htmlData{n=c7-lambda1}{\lambda_1} \ge 0 bound the non-trivial eigenvalues of the random walk on its 1-skeleton (§7.5). For every 0 < \htmlData{n=c7-eta0}{\eta_0} \le 1/2, every locally minimal f \in {\htmlData{n=c6-Ci}{C^1}}(X) satisfies

\htmlData{n=c6-norm}{\lVert\delta f\rVert} \ \ge\ \Bigl(\frac32 - 3\eta_0 - 6\lambda - \frac32\Bigl(\frac{\lVert f\rVert}{\eta_0^2} + \frac{\lambda_1}{\eta_0}\Bigr)\Bigr)\lVert f\rVert .

In particular, if \lambda \le 1/200, every locally minimal f with \lVert f\rVert \le 1/2000 has \lVert{\htmlData{n=c6-delta}{\delta}} f\rVert \ge \lVert f\rVert.

This is the simplest case of the argument of Kaufman–Kazhdan–Lubotzky and Evra–Kaufman, written out with explicit (and poor) constants. Both hypotheses on f are needed. The star of a vertex is small and has \htmlData{n=c6-delta}{\delta} f = 0; it is excluded by local minimality (Try it (27)). A non-trivial cocycle has \delta f = 0 and may be locally minimal; it is excluded by smallness, and Corollary 7.8 turns this into a lower bound on its weight.

Proof. Take T and (v,u,w) as in §7.5, and let t_j be the probability that T has exactly j edges in f. Since \htmlData{n=c6-delta}{\delta} f(T) is the parity of the number of f-edges of T,

\htmlData{n=c6-norm}{\lVert f\rVert} = \tfrac13(\htmlData{n=c7-tj}{t_1} + 2t_2 + 3t_3), \qquad \lVert{\htmlData{n=c6-delta}{\delta}} f\rVert = t_1 + t_3 .

Let b be the probability that exactly one of the two edges vu, vw of T at v lies in f. A triangle with one f-edge contributes to b when v is an endpoint of that edge (probability 2/3); a triangle with two f-edges contributes when v is not their common vertex (probability 2/3); a triangle with three never does. So b = \frac23(\htmlData{n=c7-tj}{t_1} + t_2), and eliminating t_2 gives t_1 - 3t_3 = 3b - 3\htmlData{n=c6-norm}{\lVert f\rVert}. Hence

\htmlData{n=c6-norm}{\lVert\delta f\rVert} \ \ge\ \htmlData{n=c7-tj}{t_1} - 3t_3 \ =\ 3\bigl(b - \lVert f\rVert\bigr),

and it remains to show that b exceeds \htmlData{n=c6-norm}{\lVert f\rVert} by a constant fraction.

Local count. Given v, the pair uw is a random edge of \htmlData{n=c7-Xv}{X_v}. Let P_v and Q_v be the probabilities that exactly one, respectively both, of u and w lie in \htmlData{n=c7-fv}{f_v}. A random endpoint of a random edge of X_v has law \htmlData{n=c7-muvA}{\mu_v}, so \htmlData{n=c7-muv}{\mu_v} = Q_v + P_v/2. The mixing bound gives Q_v \le \mu_v(\mu_v + \lambda), hence

\htmlData{n=c7-PvQv}{P_v} = 2(\htmlData{n=c7-muv}{\mu_v} - Q_v) \ \ge\ 2\mu_v(1 - \mu_v - \lambda).

Call v thin if \htmlData{n=c7-muv}{\mu_v} \le \eta_0 and thick otherwise, and let \Theta be the set of thick vertices. At a thin vertex \htmlData{n=c7-PvQv}{P_v} \ge 2(1 - \eta_0 - \lambda)\mu_v. At a thick vertex, local minimality gives \mu_v \le 1/2, so P_v \ge (1 - 2\lambda)\mu_v.

Averaging. b = \mathbb{E}_vP_v. Let x = \Pr[vu \in f,\ v \notin {\htmlData{n=c7-Theta}{\Theta}}] and y = \Pr[vu \in f,\ v \in \Theta], so that x + y = \htmlData{n=c6-norm}{\lVert f\rVert} and

b \ \ge\ 2(1 - \htmlData{n=c7-eta0}{\eta_0} - \lambda)\,x + (1 - 2\lambda)\,y .

The edge vu is a random edge with a random orientation, so an f-edge with exactly one thick endpoint contributes equally to x and to y. Hence y - x \le \Pr[vu \in f,\ v \in {\htmlData{n=c7-Theta}{\Theta}},\ u \in \Theta] \le p, where p is the probability that both endpoints of a random edge are thick. Substituting x = \frac12(\htmlData{n=c6-norm}{\lVert f\rVert} - (y - x)) and y = \frac12(\lVert f\rVert + (y - x)),

b \ \ge\ \Bigl(\frac32 - \htmlData{n=c7-eta0}{\eta_0} - 2\lambda\Bigr)\htmlData{n=c6-norm}{\lVert f\rVert} - \Bigl(\frac12 - \eta_0\Bigr)(y - x) \ \ge\ \Bigl(\frac32 - \eta_0 - 2\lambda\Bigr)\lVert f\rVert - \frac p2 .

Thick vertices are rare, and rarely adjacent. By the averaging identity and Markov's inequality, a random vertex is thick with probability at most \htmlData{n=c6-norm}{\lVert f\rVert}/\htmlData{n=c7-eta0}{\eta_0}. The mixing bound on the 1-skeleton gives p \le \frac{\lVert f\rVert}{\eta_0}\bigl(\frac{\lVert f\rVert}{\eta_0} + \htmlData{n=c7-lambda1}{\lambda_1}\bigr). Putting everything together,

\htmlData{n=c6-norm}{\lVert\delta f\rVert} \ \ge\ 3\bigl(b - \lVert f\rVert\bigr) \ \ge\ \Bigl(\frac32 - 3\htmlData{n=c7-eta0}{\eta_0} - 6\lambda\Bigr)\lVert f\rVert - \frac32p \ \ge\ \Bigl(\frac32 - 3\eta_0 - 6\lambda - \frac32\Bigl(\frac{\lVert f\rVert}{\eta_0^2} + \frac{\htmlData{n=c7-lambda1}{\lambda_1}}{\eta_0}\Bigr)\Bigr)\lVert f\rVert .

For the last statement take \htmlData{n=c7-eta0}{\eta_0} = 1/12 and use \htmlData{n=c7-lambda1}{\lambda_1} \le \lambda/(1-\lambda) \le 1/199 (Theorem 6.4); the bracket is then larger than 1.02. \square

Where each hypothesis entered:

7.7 From small sets to cosystolic expansion

Corollary 7.8 (linear cosystole in dimension 1). Under the hypotheses of Theorem 7.7 with \lambda \le 1/200, every z \in {\htmlData{n=c6-Zi}{Z^1}}(X)\setminus {\htmlData{n=c6-Bi}{B^1}}(X) has \htmlData{n=c6-norm}{\lVert z\rVert} > 1/2000.

Proof. Make z locally minimal by adding stars (§7.5). This gives z' \in z + \htmlData{n=c6-Bi}{B^1} with \htmlData{n=c6-norm}{\lVert z'\rVert} \le \lVert z\rVert; z' \ne 0 because z \notin B^1; and \htmlData{n=c6-delta}{\delta} z' = \delta z = 0. If \lVert z'\rVert \le 1/2000, Theorem 7.7 would give 0 = \lVert\delta z'\rVert \ge \lVert z'\rVert > 0. So \lVert z\rVert \ge \lVert z'\rVert > 1/2000. \square

So every 2-dimensional complex whose vertex links are good enough spectral expanders has a linear 1-cosystole, condition (b) of Definition 7.1 in dimension 1. (The weights of §7.5 and the normalized weights of §6.1 agree up to factors bounded by the degrees, so “linear” means the same for both.) Examples are the 2-skeletons of Ramanujan complexes of type \widetilde A_2 or \widetilde A_3 for q large enough. Condition (a) is a statement about testing, and it follows from the same kind of statement one dimension up:

Proposition 7.9 (testability from small-set expansion one dimension up). Let X be a pure d-dimensional complex of bounded degree, with the weights of §7.5 (a random top face, then a random face of it), and let i \ge 0. Call g \in {\htmlData{n=c6-Ci}{C^{i+1}}} locally minimal if \htmlData{n=c6-norm}{\lVert g + \delta h\rVert} \ge \lVert g\rVert for every vertex v and every h \in C^i supported on the i-faces containing v. Suppose there is \eta > 0 such that the only locally minimal (i+1)-cocycle g with \lVert g\rVert \le \eta is g = 0. Then there is \varepsilon > 0, depending only on \eta and the degrees of X, such that \lVert{\htmlData{n=c6-delta}{\delta}} f\rVert \ge \varepsilon\cdot\min_{z\in {\htmlData{n=c6-Zi}{Z^i}}}\lVert f + z\rVert for every f \in C^i: the face test for Z^i is sound.

For i = 0, local minimality in this sense is Definition 7.6.

Proof. If \htmlData{n=c6-norm}{\lVert\delta f\rVert} > \eta there is nothing to prove, since the distance to Z^i is at most 1. Otherwise run the local correction on the syndrome g = \htmlData{n=c6-delta}{\delta} f: while some vertex v and some h supported at v satisfy \lVert g + \delta h\rVert < \lVert g\rVert, replace f by f + h, which replaces g by g + \delta h. Every weight of an (i+1)-face is an integer multiple of u = 1/\bigl(\binom{d+1}{i+2}\lvert {\htmlData{n=c6-Xi}{X(d)}}\rvert\bigr), so each step lowers \lVert g\rVert by at least u, and there are at most \lVert\delta f\rVert/u steps. Each step changes f on at most D faces of dimension i (the most i-faces at a vertex), each of weight at most w_{\max}, the largest weight of an i-face. The final f' has syndrome g' = \delta f' that is locally minimal, of weight at most \eta, and a cocycle, since \delta g' = \delta\delta f' = 0. By hypothesis g' = 0, that is, f' \in Z^i, and

\min_{z\in {\htmlData{n=c6-Zi}{Z^i}}}{\htmlData{n=c6-norm}{\lVert f + z\rVert}} \le \lVert f - f'\rVert \le \frac{D\htmlData{n=c7-wmax}{w_{\max}}}{u}\lVert{\htmlData{n=c6-delta}{\delta}} f\rVert .

Here \htmlData{n=c7-wmax}{w_{\max}}/u is at most \binom{d+1}{i+2} times the largest number of top faces containing an i-face, so Dw_{\max}/u is bounded in terms of the degrees. \square

Two remarks.

7.8 Higher dimensions: what Evra–Kaufman add

For i \ge 2, and for the 2-cochains needed in the last remark, the proof of Theorem 7.7 keeps its three parts, and each becomes harder.

With the small-set theorem in dimensions i and i+1, Corollary 7.8 and Proposition 7.9 give (b) and (a) exactly as above; this is Theorem 7.5.

The shape of this argument — local codes/links control local views; spectral expansion forbids small bad sets from covering a lot — is exactly the shape of the local testability proof in §9, with tensor codes in place of links and Cayley graphs in place of the local spectral expansion.

Try it (25). Prove that the 0-cochains of a spherical building of type A_2 (the incidence graph of points and lines of a projective plane over \htmlData{n=c1-Fq}{\mathbb{F}_q}) satisfy \htmlData{n=c6-h0}{h^0} \ge c for an absolute c > 0, using only the fact that its normalized second eigenvalue is \sqrt q/(q+1).

Try it (26). Let M be the transition operator of a reversible random walk on a finite set, with stationary measure \mu, all of whose eigenvalues other than 1 are at most \lambda. Show that \Pr[u \in A \text{ and } w \in A] \le \mu(A)(\mu(A) + \lambda) when u has law \mu and w is one step of the walk from u.

Try it (27). Let f = \htmlData{n=c6-delta}{\delta}\mathbf{1}_v be the star of a vertex v in a complex as in Theorem 7.7. Compute \delta f and the local weights of f. Which hypothesis of the theorem fails, and what does local correction do to f?

Sources. Kaufman–Kazhdan–Lubotzky, Isoperimetric inequalities for Ramanujan complexes and topological expanders, GAFA 26 (2016), arXiv:1409.1397; Evra–Kaufman, Bounded degree cosystolic expanders of every dimension, STOC 2016, arXiv:1510.00839; Dotterrer–Kaufman–Wagner, On expansion and topological overlap, Geom. Dedicata 195 (2018); Lubotzky–Meshulam–Mozes, Expansion of building-like complexes, Groups Geom. Dyn. 10 (2016); Gromov (2010); Lubotzky ICM 2018 §3 (KKL and Evra–Kaufman are Theorem 3.8 there); First–Kaufman, Cosystolic expansion of sheaves on posets with applications to good 2-query locally testable codes and lifted codes, STOC 2024, arXiv:2403.19388. For §7.3: Dinur–Meshulam, Near coverings and cosystolic expansion, Arch. Math. 118 (2022), arXiv:1909.08507; Chapman–Lubotzky, Stability of homomorphisms, coverings and cocycles I: equivalence, Eur. J. Math. 11 (2025), arXiv:2310.17474, and II: examples, applications and open problems, arXiv:2311.06706; Dinur–Kaufman, High dimensional expanders imply agreement expanders, FOCS 2017; Bafna–Minzer, Characterizing direct product testing via coboundary expansion, STOC 2024, arXiv:2308.09668; Dikstein–Dinur, Agreement theorems for high dimensional expanders in the low acceptance regime: the role of covers, arXiv:2308.09582. For §7.5–§7.8: the dimension-1 argument of KKL (GAFA 2016) and the “fat machinery” of Evra–Kaufman (arXiv:1510.00839); Oppenheim (2018) for Theorem 6.4 in the weighted form used in §7.5.

Answers to the exercises

Answer (23). Z^0 = functions constant on connected components, \htmlData{n=c6-Bi}{B^0} = \{0,\mathbf{1}\}, so \htmlData{n=c6-Hi}{H^0} \cong \mathbb{F}_2^{\#\text{components} - 1}; (a) says \lvert {\htmlData{n=c1-EST}{E(g,V\setminus g)}}\rvert controls the distance of g to the nearest union of components — edge expansion of each component — and (b) says every component is large. In the top dimension, \htmlData{n=c6-Ci}{C^2} = 0, so Z^1 = C^1, \htmlData{n=c6-delta}{\delta} = 0, and (a) holds trivially while (b) asks every non-cut edge set to be heavy — false, a single edge outside B^1 is a non-trivial cocycle unless H^1 = 0. Top-dimensional cosystolic expansion needs a face one dimension up to test against.

Answer (24). A 1-cochain assigns a permutation \sigma_s to each loop s. Going around the 2-cell of w multiplies the permutations of its letters, so the cocycle condition there reads \htmlData{n=c4-w-sigma}{w(\sigma)} = \mathrm{id}: the cocycles are the solutions of R, i.e. the homomorphisms \htmlData{n=c4-Gamma}{\Gamma} \to {\htmlData{n=c4-Sym}{\mathrm{Sym}(n)}} (and also the n-sheeted coverings of X, since \pi_1(X) = \Gamma). A 0-cochain is a single g \in \mathrm{Sym}(n), and it changes every \sigma_s to g\sigma_sg^{-1}: cohomologous cocycles are conjugate actions, i.e. isomorphic \Gamma-sets. The face test picks a 2-cell (a relator w) and a point x of the fibre and checks w(\sigma)(x) = x, which is the relation test.

Answer (25). The graph is bipartite and (q+1)-regular, with adjacency eigenvalues \pm(q+1) and \pm\sqrt q. By Cheeger (or directly by the mixing lemma), \htmlData{n=c1-h}{h(X)} \ge \frac{(q+1) - \sqrt q}{2}, and \htmlData{n=c6-h0}{h^0} = \frac{2}{r}h(X) \ge 1 - \frac{\sqrt q}{q+1} \ge 1 - \frac{1}{2} = \frac12 (using \sqrt q/(q+1) \le 1/2). The point: constants independent of q, which is what Theorem 7.5 needs.

Answer (26). The probability is \langle\mathbf{1}_A, M\mathbf{1}_A\rangle in L^2(\mu), where M is self-adjoint by reversibility and M\mathbf{1} = \mathbf{1}. Write \mathbf{1}_A = \mu(A)\mathbf{1} + a with a \perp \mathbf{1}, so that \lVert a\rVert^2 = \mu(A) - \mu(A)^2. The cross terms vanish, and \langle\mathbf{1}_A, M\mathbf{1}_A\rangle = \mu(A)^2 + \langle a, Ma\rangle \le \mu(A)^2 + \lambda\lVert a\rVert^2 \le \mu(A)^2 + \lambda\mu(A). The last step uses \lambda \ge 0; for a negative bound, replace \lambda by 0. Only an upper bound on the eigenvalues is used, not on their absolute values.

Answer (27). \delta f = \delta\delta\mathbf{1}_v = 0. The local weight at v is \mu_v = 1, while at a neighbour u it is the probability that a random edge at u is uv, which is small when u has many neighbours. So f is small but not locally minimal, and adding the star of v — one step of local correction — turns it into 0. The theorem says that this is the only way a small cochain can have zero coboundary: after local correction it vanishes.

Part D — Good locally testable codes

8. Left-right Cayley complexes and their codes

Idea. Take a group \htmlData{n=c8-G}{G} and two generating sets, and let A act on the left and B on the right. Because left and right multiplication commute, the four elements g, ag, gb, agb close up into a square, and the vertices, edges and squares form a square complex in which every vertex sees an A\times B grid of squares. Put bits on squares and demand that every grid be a codeword of a tensor code \htmlData{n=c8-CA}{C_A}\otimes C_B. This is a Tanner code one dimension up: the rows and columns of each grid are shared with the neighbouring vertices, and that sharing is the redundancy an LTC needs.

Goal of the chapter (week 11). Define left-right Cayley complexes and the condition TNC; prove that the rows and columns of the local views are shared along edges; define the code and prove its rate and distance bounds; place the complexes among quotients of products of trees, i.e. of buildings.

8.1 Left-right Cayley complexes

Let G be a finite group and A, B \subseteq G symmetric subsets (A = A^{-1}, B = B^{-1}) not containing 1, with \lvert A\rvert = \lvert B\rvert = r.

Definition 8.1 (left-right Cayley complex; Dinur–Evra–Livne–Lubotzky–Mozes). X = \mathrm{Cay}^2(\htmlData{n=c8-AB}{A}, \htmlData{n=c8-G}{G}, B) has vertex set G; A-edges \{g, ag\} and B-edges \{g, gb\} (a\in A, b \in B); and squares

[a, g, b] = \{g,\ ag,\ gb,\ agb\},

whose sides are the A-edges \{g,ag\}, \{gb, agb\} and the B-edges \{g, gb\}, \{ag, agb\}. The total non-conjugacy condition (TNC) is: ag \ne gb for all a\in A, b \in B, g \in G.

The \htmlData{n=c8-AB}{A}-edges form the left Cayley graph \mathrm{Cay}(\htmlData{n=c8-G}{G},A) and the B-edges the right Cayley graph \mathrm{Cay}(G,B); each is r-regular. TNC says that the two graphs share no edges and that every square has four distinct vertices (TNC with b^{-1} gives agb \ne g).

Lemma 8.2 (local views and shared rows). Assume TNC. (i) For each vertex g the map (a,b) \mapsto [a,g,b] is a bijection from \htmlData{n=c8-AB}{A}\times B onto the set Q(g) of squares containing g; so \lvert Q(g)\rvert = r^2 and \lvert Q\rvert = \lvert {\htmlData{n=c8-G}{G}}\rvert r^2/4. (ii) The squares containing the A-edge \{g, ag\} are \{[a,g,b] : b\in B\}, which is row a of the grid at g and row a^{-1} of the grid at ag, indexed by the same b \in B in both. (iii) Symmetrically, the squares on a B-edge form a column, indexed by the same a \in A at both endpoints.

Proof. (i) In [a,g,b] the vertex g has exactly one \htmlData{n=c8-AB}{A}-neighbour, ag, and one B-neighbour, gb (TNC keeps them apart), which determine a and b. Each square has four vertices, whence the count. (ii) Seen from ag, the square \{g, ag, gb, agb\} has A-neighbour a^{-1}(ag) = g and B-neighbour (ag)b, so it is [a^{-1}, ag, b]: same b. The squares on \{g,ag\} are those with A-neighbour ag at g, i.e. a fixed. (iii) is the same with the roles of left and right exchanged. \square

The link of every vertex is the complete bipartite graph K_{r,r} (\htmlData{n=c8-AB}{A}-edges on one side, B-edges on the other, one link-edge per square). A square complex all of whose links are complete bipartite is covered by a product of two trees \htmlData{n=c1-tree}{T_r}\times T_r; so a left-right Cayley complex is a finite quotient of T_r\times T_r — when the trees are Bruhat–Tits trees, a quotient of the building of \mathrm{PGL}_2(F_1)\times\mathrm{PGL}_2(F_2), a product of two buildings of type \widetilde{A}_1. So the arithmetic lattices that give Ramanujan graphs (§1.3) give, in pairs, complexes of this kind.

8.2 The code

Fix linear codes C_A \subseteq \mathbb{F}^A and C_B \subseteq \mathbb{F}^B with rates \rho_A, \rho_B and relative distances \delta_A, \delta_B. Identify \mathbb{F}^{Q(g)} with \mathbb{F}^{A\times {\htmlData{n=c8-AB}{B}}} by Lemma 8.2(i): a word on \htmlData{n=c8-Qg}{Q(g)} is an A\times B matrix, with rows indexed by a (and lying along A-edges) and columns indexed by b.

Definition 8.3 (the square-complex code). C = C[G,\htmlData{n=c8-AB}{A},B,\htmlData{n=c8-CA}{C_A},C_B] = \{f \in \mathbb{F}^{\htmlData{n=c8-Q}{Q}} : f|_{Q(g)} \in {\htmlData{n=c4-tensor}{C_A\otimes C_B}} \text{ for every } g \in {\htmlData{n=c8-G}{G}}\}: every local view has all its columns in C_A and all its rows in C_B.

By Lemma 8.2(ii), the word that f puts on the r squares along an \htmlData{n=c8-AB}{A}-edge is the same row read from either endpoint, and it lies in \htmlData{n=c8-CA}{C_B} from both sides; likewise for columns on B-edges. So a codeword is an assignment of C_B-words to A-edges and C_A-words to B-edges that fit together into tensor codewords at every vertex. This is the precise sense in which the construction is two copies of Tanner's (one on each Cayley graph) glued along squares.

Proposition 8.4 (rate). \dim C \ge (4\htmlData{n=c8-rho}{\rho_A}\rho_B - 3)\lvert {\htmlData{n=c8-Q}{Q}}\rvert.

Proof. Each vertex imposes r^2 - \dim(\htmlData{n=c4-tensor}{C_A\otimes C_B}) = (1 - \htmlData{n=c8-rho}{\rho_A}\rho_B)r^2 constraints, \lvert {\htmlData{n=c8-G}{G}}\rvert(1-\rho_A\rho_B)r^2 = 4(1-\rho_A\rho_B)\lvert {\htmlData{n=c8-Q}{Q}}\rvert in all. \square

So the rate is positive once \htmlData{n=c8-rho}{\rho_A}\rho_B > 3/4: the local codes must have rate above \sqrt3/2 \approx 0.87. (In §11 the quadripartite version of the complex has \lvert {\htmlData{n=c8-Q}{Q}}\rvert = \lvert {\htmlData{n=c8-G}{G}}\rvert r^2 and the corresponding count is more favourable.)

Theorem 8.5 (distance). Let \lambda_A = \lambda(\htmlData{n=c8-cay}{\mathrm{Cay}(G,A)}). If \htmlData{n=c8-deltaAB}{\delta_A} > \lambda_A/r, every nonzero codeword has relative weight at least

\delta_A\,\delta_B\Bigl(\delta_A - \frac{\lambda_A}{r}\Bigr).

Proof. Let f \ne 0 be a codeword and U \subseteq {\htmlData{n=c8-G}{G}} the vertices whose local view is nonzero. At g \in U the view is a nonzero tensor codeword: some column is a nonzero word of \htmlData{n=c8-CA}{C_A}, so at least \delta_Ar rows are nonzero, and each nonzero row is a nonzero word of C_B, of weight \ge\delta_Br; the view has weight \ge{\htmlData{n=c8-deltaAB}{\delta_A}}\delta_Br^2. A nonzero row at g lies along an \htmlData{n=c8-AB}{A}-edge \{g, ag\} and is, by Lemma 8.2(ii), also a row at ag, so ag \in U. Thus in \htmlData{n=c8-cay}{\mathrm{Cay}(G,A)} every vertex of U has at least \delta_Ar neighbours in U, and Try it (4) gives \lvert U\rvert \ge (\delta_A - \htmlData{n=c8-lambdaA}{\lambda_A}/r)\lvert G\rvert. Each square lies in four views, so \lvert\mathrm{supp}\,f\rvert \ge \lvert U\rvert\,\delta_A\delta_Br^2/4; divide by \lvert {\htmlData{n=c8-Q}{Q}}\rvert = \lvert G\rvert r^2/4. \square

The proof is Theorem 3.11 again, run on one of the two Cayley graphs; the second graph is not needed for distance. It is needed for testability (§9).

Parameters. Binary local codes of rate 0.9 exist at relative distance \delta \approx 0.013 (GV: h(0.013) \approx 0.100), giving rate \ge 4(0.81) - 3 = 0.24. With Ramanujan-type Cayley graphs, \lambda/r \approx 2/\sqrt r, so r \gtrsim 2.4\cdot 10^4 is needed, and at r = 10^5 the distance bound is about 10^{-6}. The constants are absurd; the point is that they are constants, independent of \lvert {\htmlData{n=c8-G}{G}}\rvert, and the locality is r^2, also a constant.

8.3 Where the complexes come from

One needs families of groups \htmlData{n=c8-G}{G} with two generating sets A, B of fixed size r such that both Cayley graphs are good expanders and TNC holds. Dinur–Evra–Livne–Lubotzky–Mozes give explicit families with G a finite group of Lie type (\mathrm{PSL}_2 over finite fields) and A, B chosen so that both Cayley graphs are Ramanujan-type expanders, with TNC verified directly; random generating sets also work but are not explicit. Panteleev–Kalachev arrived at the same kind of object algebraically, as the lifted product of two codes over the group algebra \mathbb{F}_2[G] (§11). In all cases G must be non-abelian: Cayley graphs of abelian groups with a bounded number of generators are never expanders.

Try it (28). Show that if TNC fails, say ag = gb, then [a,g,b] is not a genuine square, and explain what goes wrong with Lemma 8.2(i).

Try it (29). Let \htmlData{n=c8-CA}{C_A} = C_B be the parity code of length r. Describe \htmlData{n=c4-tensor}{C_A\otimes C_B}, compute its distance, and explain why Theorem 8.5 says nothing about \htmlData{n=c8-code}{C[G,A,B,C_A,C_B]}.

Sources. Dinur–Evra–Livne–Lubotzky–Mozes, Locally testable codes with constant rate, distance, and locality, STOC 2022, arXiv:2111.04808, §3 (the complex), §4.1 (the code, rate and distance), §§5–6 (the concrete groups \mathrm{PSL}_2(q^i) and generators) (and the extended version Good locally testable codes, arXiv:2207.11929); Panteleev–Kalachev, Asymptotically good quantum and locally testable classical LDPC codes, STOC 2022, arXiv:2111.03654; Burger–Mozes, Lattices in product of trees, Publ. IHÉS 92 (2000), for square complexes covered by products of trees.

Answers to the exercises

Answer (28). ag = gb means the \htmlData{n=c8-AB}{A}-neighbour and the B-neighbour of g in [a,g,b] coincide; then \{g, ag, gb, agb\} has at most three distinct elements and the “square” degenerates into a triangle or an edge. At g, the A-edge \{g,ag\} and the B-edge \{g,gb\} are the same edge, so rows and columns of the grid can no longer be told apart, and the identification \htmlData{n=c8-Qg}{Q(g)} \cong A\times B breaks. In an abelian group TNC reads a \ne b, i.e. A\cap B = \emptyset; in a non-abelian group it says no element of A is conjugate to an element of B — hence the name.

Answer (29). \htmlData{n=c4-tensor}{C_A\otimes C_B} is the set of r\times r matrices with all row and column sums zero; its minimum weight is 4 (a 2\times2 “rectangle” of ones), = \htmlData{n=c8-deltaAB}{\delta_A}\delta_Br^2 with \delta_A = \delta_B = 2/r. Theorem 8.5 needs \delta_A > \htmlData{n=c8-lambdaA}{\lambda_A}/r, i.e. \lambda_A < 2, which no family of bounded-degree expanders satisfies (Alon–Boppana). This is the two-dimensional version of the cycle code of Try it (5): with weak local codes the global code only sees the topology of the complex (closed surfaces made of squares), not its expansion.

9. Local testability of the square-complex codes

Idea. The tester picks a random vertex and checks its A\times B grid. If few grids fail, each grid is close to a local tensor codeword; robustness of the tensor code says the grid's rows and columns are individually close to \htmlData{n=c8-CA}{C_B} and C_A; and because rows and columns are shared with neighbours, the local codewords of neighbouring vertices must agree along most edges. A set of vertices where they do not agree would have to be self-sustaining, and expansion of the two Cayley graphs forbids small self-sustaining sets. So the local codewords can be corrected, flip-decoder style, into a global codeword at small cost.

Goal of the chapter (week 12). State the local testability theorem with its hypotheses; follow the proof in outline and see the three ingredients — robustness, shared rows and columns, expansion — at work; compare with Sipser–Spielman and with the local-to-global argument of §7; survey what came after.

9.1 The tester and the theorem

Definition 9.1 (the vertex test). Pick g \in G uniformly, read f on the r^2 squares of \htmlData{n=c8-Qg}{Q(g)}, and accept iff \htmlData{n=c8-view}{f|_{Q(g)}} \in {\htmlData{n=c4-tensor}{C_A\otimes C_B}}.

Perfect completeness is the definition of C; the locality is r^2.

Theorem 9.2 (Dinur–Evra–Livne–Lubotzky–Mozes, informal). For every \delta, \htmlData{n=c4-soundness}{\kappa} > 0 there are \varepsilon > 0 and \kappa' > 0 such that the following holds. If \htmlData{n=c8-CA}{C_A}, C_B have relative distance \ge\delta, the tensor code C_A\otimes C_B is \kappa-robustly testable (Definition 4.14), and \lambda(\htmlData{n=c8-cay}{\mathrm{Cay}(G,A)}),\ \lambda(\mathrm{Cay}(G,B)) \le \varepsilon r, then for every f \in \mathbb{F}^{\htmlData{n=c8-Q}{Q}},

\Pr[\text{the vertex test rejects } f] \ge \kappa'\,\htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}(f, C).

With the rate and distance of §8, C is a c^3-LTC.

Choosing the parameters in the right order: first \rho and \delta (local codes of high rate and positive distance); then local codes that are also robust (Kalachev–Panteleev: random pairs are, over a suitable field; DELLM give sufficient conditions); then r large enough that Ramanujan-type Cayley graphs have \lambda \le \varepsilon r and \lambda < \delta r; then \lvert G\rvert \to \infty.

9.2 The proof in outline

Proof. Let \eta = \Pr[\text{reject } f], so \eta\lvert G\rvert vertices have a view outside \htmlData{n=c4-tensor}{C_A\otimes C_B}. The goal is \htmlData{n=c4-distbar}{\overline{\mathrm{dist}}}(f,C) = O(\eta).

  1. Local decoding. For each vertex g let c_g \in {\htmlData{n=c4-tensor}{C_A\otimes C_B}} be a nearest local codeword to \htmlData{n=c8-view}{f|_{Q(g)}}. At accepting vertices c_g = f|_{Q(g)}.
  2. Disagreement along edges. For an A-edge e = \{g, ag\} both c_g and c_{ag} put a \htmlData{n=c8-CA}{C_B}-word on the row of e (Lemma 8.2(ii)). Call e consistent if the two rows agree, and similarly for B-edges and columns. If both endpoints accept, e is consistent (both rows equal the row of f). So inconsistent edges touch rejecting vertices only — at most 2r\eta\lvert G\rvert of them — but they can be heavy: two different C_B-words differ in \ge\delta r places.
  3. Robustness turns row and column agreement into grid agreement. Consider a vertex g and the matrix w_g whose row a is the row that the neighbour across the A-edge a assigns, and whose column b is the column the neighbour across the B-edge b assigns (where these conflict, take either). If most edges at g are consistent, w_g is close to c_g row by row and column by column; robust testability of C_A\otimes C_B then says w_g is close to a single tensor codeword. This is what lets a vertex be corrected from its neighbours' opinions.
  4. Expansion forbids a self-sustaining bad set. Call a vertex bad if many of its edges are inconsistent. Every inconsistent edge has two bad-ish endpoints, and a vertex surrounded by consistent neighbours is corrected by step 3. By the mixing lemma on \htmlData{n=c8-cay}{\mathrm{Cay}(G,A)} and on \mathrm{Cay}(G,B), a set of vertices in which every vertex has a constant fraction of its A- or B-neighbours inside the set has size \ge (\text{const} - \lambda/r)\lvert G\rvert — so a set of size O(\eta)\lvert G\rvert with \eta small cannot be closed under “has many bad neighbours”. Hence an iterative correction — repeatedly replace c_g at a vertex that disagrees with most of its neighbours by the tensor codeword that its neighbours predict — decreases the number of inconsistent edges at every step and terminates after O(\eta\lvert G\rvert) steps with all edges consistent, exactly as the flip decoder of Theorem 3.9 terminates.
  5. Glue. When all edges are consistent, the local codewords c_g define a single f^* \in \mathbb{F}^{\htmlData{n=c8-Q}{Q}} (each square's value is the same in all four views, by consistency around the square), and f^* \in C. The total number of squares changed is O(\eta\lvert G\rvert r^2) = O(\eta)\lvert Q\rvert.

\square

The constants — how many inconsistent edges make a vertex “bad”, and the potential that decreases — are in DELLM §4.2; Leverrier–Zémor give a single argument that proves this and the quantum distance of §11 at once.

9.3 Why the second dimension defeats Ben-Sasson–Harsha–Raskhodnikova

Compare with the obstruction of §4.5. For a Tanner code on a graph, the constraint at a vertex involves the bits on its edges, and each bit is in two constraints; relaxing a few constraints frees the bits around a few vertices, and expansion of the code (distance) says nothing about whether the freed words are close to codewords. In the square complex each square is in four local views, and each row and column is shared between two views. Relaxing the constraint at a vertex g does not free anything: the rows and columns of its grid are still pinned by the neighbours' tensor constraints, and robustness says that a grid whose rows and columns are pinned is pinned as a whole. The redundancy that an LTC needs is the overlap of local views along edges, and a second dimension is exactly what provides views that overlap in structured pieces (rows and columns) rather than in single bits.

9.4 After 2022

Try it (30). Show that the edge test — pick a uniform A- or B-edge and check that the r squares along it form a codeword of \htmlData{n=c8-CA}{C_B} or C_A — rejects with probability at least \frac{1}{2r}\Pr[\text{vertex test rejects}]. Deduce that C is also locally testable with r queries, with soundness \htmlData{n=c9-kappa}{\kappa'}/(2r).

Try it (31). In step 5, why does “all edges consistent” imply that the four views containing a square [a,g,b] assign it the same value?

Sources. Dinur–Evra–Livne–Lubotzky–Mozes (arXiv:2111.04808) §4.2 and the extended version (arXiv:2207.11929); Panteleev–Kalachev (arXiv:2111.03654); Leverrier–Zémor, Quantum Tanner codes, FOCS 2022, arXiv:2202.13641 (the unified argument); First–Kaufman, STOC 2024, arXiv:2403.19388; Kalachev–Panteleev, Two-sided robustly testable codes, arXiv:2206.09973, and Maximally extendable product codes are good coboundary expanders, FOCS 2025, arXiv:2501.01411.

Answers to the exercises

Answer (30). A view is outside \htmlData{n=c4-tensor}{C_A\otimes C_B} iff one of its 2r rows and columns fails, i.e. iff one of the 2r edges at the vertex fails the edge test. So \Pr_g[\text{view fails}] \le \mathbb{E}_g[\#\text{failing edges at } g] = \frac{2\,\#\text{failing edges}}{\lvert G\rvert}, while \Pr[\text{edge test rejects}] = \frac{\#\text{failing edges}}{r\lvert G\rvert} (there are r\lvert G\rvert edges). Combine with Theorem 9.2.

Answer (31). Go around the square: g and ag share the A-edge whose row contains [a,g,b] (Lemma 8.2(ii)), ag and agb share a B-edge whose column contains it, agb and gb share an A-edge, gb and g share a B-edge. Consistency of each of the four edges passes the value around the square.

Part E — Quantum

10. Quantum codes as chain complexes

Idea. A quantum CSS code is a pair of classical codes that are orthogonal in one direction: the X-checks and the Z-checks, with \htmlData{n=c10-orth}{H_XH_Z^{T} = 0}. That equation is \htmlData{n=c10-dict}{\partial\circ\partial = 0}, so a CSS code is a three-term chain complex, the logical qubits are its homology, and its two distances are the systole and the cosystole. Good quantum LDPC codes are therefore bounded-degree chain complexes with large homology and with both a large systole and a large cosystole — a problem about high-dimensional expansion that resisted a square-root barrier for twenty years.

Goal of the chapter (weeks 13–14). Week 13: just enough quantum mechanics for a mathematician — states, measurements, circuits, entanglement and no-cloning; Pauli errors as vectors of a symplectic space over \mathbb{F}_2; stabilizer codes as isotropic subspaces, the Knill–Laflamme condition, and CSS codes, with Steane's code built from the Hamming code. Week 14: the dictionary with chain complexes; the toric code, both as a code and as the Hamiltonian physicists study; the hypergraph product, and why both stop at distance \sqrt n. The history of the barrier is kept to a list (§10.6), so that the meeting can move on to §11 quickly.

10.1 Quantum mechanics for mathematicians

For the purposes of this seminar, quantum mechanics is linear algebra over \mathbb{C} together with a probabilistic rule for reading off outcomes. Five notions suffice; Nielsen–Chuang, Ch. 2, is the standard reference.

One consequence of linearity is used twice later in the year.

Proposition 10.1 (no-cloning; Wootters–Zurek, Dieks). If \dim{\htmlData{n=c10-hilbert}{\mathcal{V}}} \ge 2, there are no unitary U on \mathcal{V}\otimes\mathcal{V} and state \htmlData{n=c10-dirac}{\lvert e\rangle} with U(\lvert\psi\rangle\otimes\lvert e\rangle) = \lvert\psi\rangle\otimes\lvert\psi\rangle for every state \lvert\psi\rangle.

Proof. Unitaries preserve inner products, so any two states \psi, \varphi would satisfy \htmlData{n=c10-dirac}{\langle\varphi\vert\psi\rangle} = \langle\varphi\vert\psi\rangle^2, i.e. \langle\varphi\vert\psi\rangle \in \{0, 1\}. This fails for \htmlData{n=c10-basis}{\lvert0\rangle} and \frac1{\sqrt2}(\lvert0\rangle + \lvert1\rangle). \square

No-cloning is why quantum codes cannot simply repeat a state — the repetition code of §1 has no direct quantum analogue, and CSS codes are the replacement — and why Dinur's step of copying the neighbours' opinions has no quantum version (§14.3).

10.2 Qubits, Pauli errors and the symplectic picture

A register of n qubits is the Hilbert space (\mathbb{C}^2)^{\otimes n}. The Pauli matrices X = \begin{pmatrix}0&1\\1&0\end{pmatrix} (bit flip) and Z = \begin{pmatrix}1&0\\0&-1\end{pmatrix} (phase flip) satisfy XZ = -ZX. For a \in \mathbb{F}_2^n write X(a) = \bigotimes_i X^{a_i} and Z(b) = \bigotimes_i Z^{b_i}; then

\htmlData{n=c10-XZ}{X(a)}\,Z(b) = (-1)^{\langle a,b\rangle}\,Z(b)\,X(a).

Every operator on n qubits is a linear combination of the \htmlData{n=c10-XZ}{X(a)}Z(b), so a code that corrects every Pauli error X(a)Z(b) of weight \htmlData{n=c10-weight}{\lvert\mathrm{supp}\,a\cup\mathrm{supp}\,b\rvert} \le t corrects every error acting on \le t qubits. From here on errors are Pauli errors, and a Pauli error is a pair of binary vectors: quantum error correction over Pauli errors is two classical problems, coupled by the commutation rule. (The precise form of “corrects every error” is the Knill–Laflamme condition, Theorem 10.2.)

The symplectic picture. Products of the \htmlData{n=c10-XZ}{X(a)}, the Z(b) and the scalars \pm1, \pm i form the Pauli group \mathcal{P}_n. Modulo scalars it is abelian, \mathcal{P}_n/\langle iI\rangle \cong \mathbb{F}_2^{2n} via X(a)Z(b) \mapsto (a,b), and the commutation rule says that two Paulis commute or anticommute according to the value of the standard symplectic form

\omega\bigl((a,b),(a',b')\bigr) = \langle a,b'\rangle + \langle a',b\rangle \in \mathbb{F}_2 .

The weight of (a,b) is \lvert\mathrm{supp}\,a\cup\mathrm{supp}\,b\rvert, the number of qubits on which the Pauli acts. So quantum codes over Pauli errors are a chapter of symplectic linear algebra over \mathbb{F}_2, with a Hamming-type weight.

10.3 Stabilizer and CSS codes

A stabilizer code is the common +1-eigenspace of an abelian group \mathcal{S} of Pauli operators with -I \notin \mathcal{S}; with r independent generators it has dimension 2^{n-r}, i.e. encodes k = n - r logical qubits. An error that anticommutes with some stabilizer is detected (measuring the generators — the syndrome — reveals it); an error that commutes with all of \mathcal{S} but is not in \mathcal{S}, even up to a scalar, is a logical operator: undetectable and harmful. The distance is the least weight of a logical operator.

In the symplectic picture, a stabilizer group modulo scalars is an isotropic subspace S \subseteq \mathbb{F}_2^{2n} of dimension r, meaning that \htmlData{n=c10-omega}{\omega} vanishes on S\times S. The undetectable errors form its symplectic complement S^{\perp_\omega}, of dimension 2n - r, which contains S. The harmless ones form S, the logical operators are S^{\perp_\omega}\setminus S, and the quotient S^{\perp_\omega}/S is a symplectic space of dimension 2k = 2(n - r): one hyperbolic pair, a logical X and a logical Z, for each logical qubit. The distance is the least weight in S^{\perp_\omega}\setminus S.

Theorem 10.2 (Knill–Laflamme). Let P be the orthogonal projection onto a code \mathcal{C} \subseteq {\htmlData{n=c10-register}{(\mathbb{C}^2)^{\otimes n}}}, and \mathcal{E} a set of operators. Some recovery operation corrects every error in \mathcal{E}, and then every error in its linear span, if and only if PE_i^\dagger E_jP = c_{ij}P for all E_i, E_j \in \mathcal{E}, with scalars c_{ij}. For a stabilizer code and the Pauli errors of weight at most t, this holds if and only if \htmlData{n=c10-logical}{S^{\perp_\omega}\setminus S} has no element of weight at most 2t, i.e. d \ge 2t+1.

For the second statement, \htmlData{n=c10-errset}{E_i}^\dagger E_j is, up to a scalar, a Pauli F of weight at most 2t. If F anticommutes with a stabilizer g, then PFP = PFgP = -PgFP = -PFP, so PFP = 0; if F \in S, then PFP = \pm P; and if F \in {\htmlData{n=c10-symcomp}{S^{\perp_\omega}}}\setminus S, then F acts on \mathcal{C} as a non-trivial logical operator, not as a scalar. The condition has a reading that matters in §14: every operator on fewer than d qubits acts on the code space as a scalar, so no measurement of fewer than d qubits learns anything about the encoded state.

Definition 10.3 (CSS code; Calderbank–Shor, Steane). Let H_X \in \mathbb{F}_2^{m_X\times n} and H_Z \in \mathbb{F}_2^{m_Z\times n} with \htmlData{n=c10-orth}{H_XH_Z^{T} = 0}. The CSS code \mathrm{CSS}(H_X,H_Z) is the stabilizer code generated by the \htmlData{n=c10-XZ}{X(\eta)} for rows \eta of H_X and the Z(\zeta) for rows \zeta of H_Z. It encodes k = n - \mathrm{rank}\,H_X - \mathrm{rank}\,H_Z qubits and has distance d = \min(d_X, d_Z),

d_X = \min\{\lvert a\rvert : a \in \ker H_Z\setminus{\htmlData{n=c10-row}{\mathrm{row}}}(H_X)\}, \qquad d_Z = \min\{\lvert b\rvert : b \in \ker H_X\setminus\mathrm{row}(H_Z)\}.

It is LDPC if H_X and H_Z have O(1) nonzeros per row and column.

The stabilizers commute because \langle\eta,\zeta\rangle = 0 for all rows, which is \htmlData{n=c10-HX}{H_X}\htmlData{n=c10-HZ}{H_Z}^{T} = 0. An X-error \htmlData{n=c10-XZ}{X(a)} commutes with all Z-checks iff H_Za = 0; it is harmless iff it is itself an X-stabilizer, a \in \mathrm{row}(H_X). So \htmlData{n=c10-dX}{d_X} is the least weight of a harmful undetectable X-error, and likewise for Z. In the symplectic picture, \htmlData{n=c10-css}{\mathrm{CSS}}(H_X,H_Z) is the isotropic subspace \mathrm{row}(H_X)\times\{0\} \oplus \{0\}\times\mathrm{row}(H_Z), and Try it (33) recovers k and d from it.

Example 10.4 (Steane's code). Let H_3 be the 3\times7 parity-check matrix of the Hamming code (Example 1.2), whose columns are the nonzero vectors of \mathbb{F}_2^3. Its rows have weight 4 and any two of them overlap in 2 positions, so H_3H_3^{T} = 0: the dual of the Hamming code is contained in it. \htmlData{n=c10-css}{\mathrm{CSS}}(H_3,H_3) is Steane's \htmlData{n=c10-nkd}{[[7,1,3]]} code, one logical qubit protected against every error on a single qubit (Try it (32)). The general recipe: a classical code containing its dual, with parity-check matrix H, gives \mathrm{CSS}(H,H).

Try it (32). Verify that \htmlData{n=c10-css}{\mathrm{CSS}}(\htmlData{n=c10-H3}{H_3},H_3) has k = 1 and d = 3.

Try it (33). For S = \htmlData{n=c10-row}{\mathrm{row}}(\htmlData{n=c10-HX}{H_X})\times\{0\}\oplus\{0\}\times\mathrm{row}(\htmlData{n=c10-HZ}{H_Z}), show that S is isotropic iff \htmlData{n=c10-orth}{H_XH_Z^{T} = 0}, that \htmlData{n=c10-symcomp}{S^{\perp_\omega}} = \ker H_Z\times\ker H_X, and deduce the formulas for k and d in Definition 10.3.

Week 14. Week 13 set up qubits and measurements, Pauli errors as vectors of a symplectic space over \mathbb{F}_2, stabilizer codes as isotropic subspaces, and CSS codes as pairs of classical codes with \htmlData{n=c10-orth}{H_XH_Z^{T} = 0}. This meeting reads that equation as \htmlData{n=c10-dict}{\partial\circ\partial = 0}, meets the toric code both as a code and as a physical Hamiltonian, and sees why the first constructions stop at distance \sqrt n.

10.4 The dictionary with chain complexes

The data of a CSS code is a chain complex over \mathbb{F}_2,

\mathbb{F}_2^{\htmlData{n=c10-mXZ}{m_Z}}\ \xrightarrow{\ \htmlData{n=c10-HZ}{H_Z}^{T}\ }\ \mathbb{F}_2^{n}\ \xrightarrow{\ \htmlData{n=c10-HX}{H_X}\ }\ \mathbb{F}_2^{m_X}, \qquad {\htmlData{n=c10-orth}{H_X\circ H_Z^{T} = 0}},

with qubits in the middle. Then \ker {\htmlData{n=c10-HX}{H_X}}/\mathrm{im}\,\htmlData{n=c10-HZ}{H_Z}^{T} is the homology in the middle degree, of dimension k, and \htmlData{n=c10-dZ}{d_Z} is its systole — the least weight of a cycle that is not a boundary; dually \ker H_Z/\mathrm{im}\,H_X^{T} is the cohomology and \htmlData{n=c10-dX}{d_X} is the cosystole. So:

quantum code chain complex
qubits; X-checks; Z-checks middle degree; the degree on one side; the degree on the other
\htmlData{n=c10-orth}{H_XH_Z^{T} = 0} \partial\circ\partial = 0
logical qubits k \dim {\htmlData{n=c10-homology}{H_1}} in the middle degree
\htmlData{n=c10-dZ}{d_Z}, \htmlData{n=c10-dX}{d_X} systole, cosystole
LDPC bounded degree

Any bounded-degree cell complex gives a qLDPC code by putting qubits on its i-cells, X-checks on (i-1)-cells and Z-checks on (i+1)-cells; the code is good iff \dim {\htmlData{n=c10-homology}{H_i}} is linear in the number of i-cells and both the i-systole and the i-cosystole are linear. §7's cosystolic bound (b) is exactly half of that.

10.5 Two classical examples and a barrier

Example 10.5 (the toric code; Kitaev). Cellulate the torus as an L\times L grid; qubits on the n = 2L^2 edges, X-checks on vertices (stars), Z-checks on faces (plaquettes). The homology is H_1(T^2;\mathbb{F}_2) = \mathbb{F}_2^2, so k = 2, and the systole and cosystole are both L (the shortest non-contractible loop in the grid and in the dual grid): \htmlData{n=c10-nkd}{[[2L^2, 2, L]]}, i.e. d = \sqrt{n/2}.

The toric code as a Hamiltonian. Physicists meet the toric code as the Hamiltonian

\mathcal{H}_{\mathrm{toric}} = \sum_v\tfrac12(I - \htmlData{n=c10-AvBp}{A_v}) + \sum_p\tfrac12(I - B_p),

where A_v is X on the four edges at the vertex v and B_p is Z on the four edges of the plaquette p. The terms commute, so the least energy, 0, is attained exactly on their common +1-eigenspace, which is the code space, of dimension 2^k = 4; a common eigenvector that violates j checks has energy j. By Try it (35), violated checks come in pairs, at the two ends of a string of errors. Physicists call them anyons: they move when Paulis are applied along a path, and dragging one around the torus before annihilating it with its partner applies a logical operator. By the Knill–Laflamme condition (Theorem 10.2), the four ground states cannot be told apart by any measurement of fewer than L qubits. This local indistinguishability of degenerate ground states is what physicists call topological order. §14 returns to this Hamiltonian as the basic example of ground states that are hard to prepare.

Example 10.6 (the hypergraph product; Tillich–Zémor). Given classical parity-check matrices H_1 \in \mathbb{F}_2^{m_1\times n_1} and H_2 \in \mathbb{F}_2^{m_2\times n_2}, put

\htmlData{n=c10-HX}{H_X} = \bigl[\,H_1\otimes I_{n_2}\ \big|\ I_{m_1}\otimes H_2^{T}\,\bigr], \qquad {\htmlData{n=c10-HZ}{H_Z}} = \bigl[\,I_{n_1}\otimes H_2\ \big|\ H_1^{T}\otimes I_{m_2}\,\bigr].

Then \htmlData{n=c10-orth}{H_XH_Z^{T}} = H_1\otimes H_2^{T} + H_1\otimes H_2^{T} = 0. With H_1, H_2 parity-check matrices of good classical LDPC codes one gets qLDPC codes with k = \Theta(n) and d = \Theta(\sqrt n). The toric code is the hypergraph product of two cycle codes (the repetition code with a cyclic set of checks).

The hypergraph product is the tensor product of two 2-term complexes (the Künneth formula computes k), and its low-weight logicals are “lines”: a classical codeword of one factor times a single coordinate of the other, of weight about \sqrt n. For two decades nothing much better was known, and distance \approx\sqrt n became known as the \sqrt n barrier.

10.6 The barrier, briefly

The history is short to state and is not the point of this seminar, so it is given only as a list. The one idea worth keeping is the first one.

Try it (34). For \htmlData{n=c10-hgpH}{H_1} = H_2 = \htmlData{n=c1-pcm}{H} \in \mathbb{F}_2^{m\times n} of full rank m, show that the hypergraph product has n^2 + m^2 qubits and k \ge (n-m)^2 logical qubits.

Try it (35). In the toric code, which Z-checks does an X-error \htmlData{n=c10-XZ}{X(a)} on a set a of edges violate? Show that for every \ell \le L/2 there is an X-error of weight \ell that violates exactly two checks.

Sources. Nielsen–Chuang, Quantum Computation and Quantum Information, Ch. 2 (the postulates of §10.1), Ch. 4 (circuits) and Ch. 10 (stabilizer and CSS codes, the Knill–Laflamme theorem); Preskill, Lecture notes on quantum computation, Ch. 7 (quantum error correction, the symplectic picture); Gottesman, Stabilizer codes and quantum error correction, PhD thesis, Caltech (1997), arXiv:quant-ph/9705052; Calderbank–Rains–Shor–Sloane, Quantum error correction via codes over GF(4), IEEE Trans. Inform. Theory 44 (1998); Knill–Laflamme, Theory of quantum error-correcting codes, Phys. Rev. A 55 (1997); Wootters–Zurek, A single quantum cannot be cloned, Nature 299 (1982); Dieks, Communication by EPR devices, Phys. Lett. A 92 (1982); Calderbank–Shor, Good quantum error-correcting codes exist, Phys. Rev. A 54 (1996); Steane, Multiple particle interference and quantum error correction, Proc. R. Soc. A 452 (1996); Kitaev, Fault-tolerant quantum computation by anyons, Ann. Phys. 303 (2003); Tillich–Zémor, Quantum LDPC codes with positive rate and minimum distance proportional to the square root of the blocklength, IEEE Trans. Inform. Theory 60 (2014); Breuckmann–Eberhardt, Quantum low-density parity-check codes, PRX Quantum 2 (2021) — a survey. For §10.6 (optional): Freedman–Meyer–Luo, \mathbb{Z}_2-systolic freedom and quantum codes, in Mathematics of Quantum Computation (Chapman & Hall/CRC, 2002); Evra–Kaufman–Zémor, Decodable quantum LDPC codes beyond the \sqrt n distance barrier using high dimensional expanders, FOCS 2020, arXiv:2004.07935; Hastings, Weight reduction for quantum codes, Quantum Inf. Comput. 17 (2017), arXiv:1611.03790; Kaufman–Tessler, New cosystolic expanders from tensors imply explicit quantum LDPC codes with \Omega(\sqrt n\log^k n) distance, STOC 2021, arXiv:2008.09495; Hastings–Haah–O'Donnell, Fiber bundle codes, STOC 2021, arXiv:2009.03921; Panteleev–Kalachev, Quantum LDPC codes with almost linear minimum distance, IEEE Trans. Inform. Theory 68 (2022), arXiv:2012.04068; Breuckmann–Eberhardt, Balanced product quantum codes, IEEE Trans. Inform. Theory 67 (2021), arXiv:2012.09271.

Answers to the exercises

Answer (32). k = 7 - 3 - 3 = 1. Here \ker {\htmlData{n=c10-H3}{H_3}} is the Hamming code \htmlData{n=c1-nkd}{[7,4,3]} and \htmlData{n=c10-row}{\mathrm{row}}(H_3) is its dual, the simplex code [7,3,4], whose nonzero words all have weight 4. So \htmlData{n=c10-dX}{d_X} = \htmlData{n=c10-dZ}{d_Z} is the least weight of a Hamming codeword outside the simplex code. The Hamming code has words of weight 3 (three columns of H_3 summing to 0), and none of them lies in the simplex code, so d = 3.

Answer (33). \htmlData{n=c10-omega}{\omega}((\eta,0),(0,\zeta)) = \langle\eta,\zeta\rangle, while two elements of \htmlData{n=c10-row}{\mathrm{row}}(\htmlData{n=c10-HX}{H_X})\times0, or two of 0\times\mathrm{row}(\htmlData{n=c10-HZ}{H_Z}), always pair to 0; so S is isotropic iff all rows of H_X are orthogonal to all rows of H_Z. Next, \omega((a,b),(\eta,0)) = \langle\eta,b\rangle and \omega((a,b),(0,\zeta)) = \langle a,\zeta\rangle, so (a,b) \in {\htmlData{n=c10-symcomp}{S^{\perp_\omega}}} iff H_Xb = 0 and H_Za = 0. Then k = n - \dim S = n - \mathrm{rank}\,H_X - \mathrm{rank}\,H_Z. An element (a,b) of \htmlData{n=c10-logical}{S^{\perp_\omega}\setminus S} has a \notin \mathrm{row}(H_X) or b \notin \mathrm{row}(H_Z), hence weight at least \lvert a\rvert \ge {\htmlData{n=c10-dX}{d_X}} or \lvert b\rvert \ge {\htmlData{n=c10-dZ}{d_Z}}; and elements (a,0) or (0,b) attain these values. So d = \min(d_X,d_Z).

Answer (34). The qubits are indexed by [n]\times[n] \sqcup [m]\times[m]. \mathrm{rank}\,\htmlData{n=c10-HX}{H_X}, \mathrm{rank}\,\htmlData{n=c10-HZ}{H_Z} \le mn (each has mn rows), so k \ge n^2 + m^2 - 2mn = (n-m)^2. (Künneth gives equality: k = k_1k_2 + k_1^{T}k_2^{T} with k_1 = k_2 = n - m and transpose dimensions 0.)

Answer (35). An X-error on a set a of edges anticommutes with the Z-checks \htmlData{n=c10-XZ}{Z(\zeta)} for which \lvert a\cap\zeta\rvert is odd. With X-errors on edges and Z-checks on faces, the relevant picture is the dual lattice: a is a path of dual edges, and the violated faces are the two ends of the dual path. So a string of length \ell produces a syndrome of weight 2, whatever \ell is — the decoder sees two “anyons” and must guess the path joining them. This is the fact behind Try it (41).

11. Good quantum LDPC codes: Panteleev–Kalachev and quantum Tanner codes

Idea. Take the square complex of §8 in its four-coloured form, where every square has one vertex of each colour. The two diagonal colour classes each see the squares as the edges of a graph, so the squares are simultaneously the edges of two graphs. Put a Tanner code on each graph — with \htmlData{n=c4-tensor}{C_A\otimes C_B} on one and \htmlData{n=c8-CA}{C_A}^\perp\otimes C_B^\perp on the other — and the two sets of checks are orthogonal because any two views meet along a row or a column. The result is a CSS code; its distance is linear if the two Cayley graphs expand and the local codes are robust on both sides.

Goal of the chapter (weeks 15–16). Week 15: build the quantum Tanner code of Leverrier–Zémor and prove commutation and the rate \htmlData{n=c11-rate}{(1-2\rho)^2}; express the two classical codes as Tanner codes on two graphs sharing an edge set. Week 16: define product expansion and state the distance theorem, with its proof in outline; see Panteleev–Kalachev's lifted-product formulation; survey decoders and consequences.

11.1 The quadripartite complex

Let G, A, B be as in §8, without assuming TNC. Take four copies V_{00}, V_{01}, V_{10}, V_{11} of G, and write (g,ij) for g in V_{ij}.

Definition 11.1 (quadripartite left-right Cayley complex). A-edges join \htmlData{n=c11-Vij}{(g, 0j)} to (ag, 1j); B-edges join (g, i0) to (gb, i1); the squares are

\{(g,00),\ (ag,10),\ (gb,01),\ (agb,11)\}, \qquad g\in G,\ a\in A,\ b \in B.

Every square has exactly one vertex of each colour, every vertex lies in r^2 squares indexed by A\times B, and n := \lvert {\htmlData{n=c8-Q}{Q}}\rvert = \lvert G\rvert r^2.

The colouring does the job of TNC: squares automatically have four distinct vertices. Let V_0 = \htmlData{n=c11-Vij}{V_{00}}\cup V_{11} and V_1 = V_{01}\cup V_{10}. Each square has two vertices in V_0 (opposite corners) and two in V_1, so it defines an edge of a graph \mathcal{G}_0^\square on V_0 and an edge of a graph \mathcal{G}_1^\square on V_1. The two graphs are r^2-regular and share the edge set Q.

11.2 The code

Definition 11.2 (quantum Tanner code; Leverrier–Zémor). Qubits on Q. For each v \in {\htmlData{n=c11-V0V1}{V_0}} and each codeword of \htmlData{n=c4-tensor}{C_A\otimes C_B}, placed on \htmlData{n=c8-Qg}{Q(v)}, an X-check; for each v \in V_1 and each codeword of \htmlData{n=c8-CA}{C_A}^\perp\otimes C_B^\perp, placed on Q(v), a Z-check.

Lemma 11.3 (commutation). Every X-check commutes with every Z-check.

Proof. Let v \in {\htmlData{n=c11-V0V1}{V_0}}, w \in V_1. If they share a square they are adjacent in the complex — in each square the V_0-corners are adjacent to both V_1-corners — and they share exactly the r squares along the edge vw, which by Lemma 8.2(ii) (whose proof uses only the left-right structure) is a row of both grids, or a column of both. The restriction of a word of \htmlData{n=c4-tensor}{C_A\otimes C_B} to a row lies in \htmlData{n=c8-CA}{C_B}, and of a word of C_A^\perp\otimes C_B^\perp in C_B^\perp; so their overlap has even size. Columns: C_A against C_A^\perp. \square

Proposition 11.4 (rate). If \dim {\htmlData{n=c8-CA}{C_A}} = \rho r and \dim C_B = (1-\rho)r, then k \ge (1-2\rho)^2 n.

Proof. \mathrm{rank}\,\htmlData{n=c10-HX}{H_X} \le \lvert {\htmlData{n=c11-V0V1}{V_0}}\rvert\dim(\htmlData{n=c4-tensor}{C_A\otimes C_B}) = 2\lvert G\rvert\rho(1-\rho)r^2 and \mathrm{rank}\,\htmlData{n=c10-HZ}{H_Z} \le \lvert V_1\rvert\dim(\htmlData{n=c8-CA}{C_A}^\perp\otimes C_B^\perp) = 2\lvert G\rvert(1-\rho)\rho r^2, so k \ge n(1 - 4\rho(1-\rho)) = \htmlData{n=c11-rate}{(1-2\rho)^2}n. \square

The two classical codes are Tanner codes. \htmlData{n=c10-XZ}{X(a)} commutes with all Z-checks iff a|_{Q(w)} \perp {\htmlData{n=c4-tensor}{C_A^\perp\otimes C_B^\perp}} for every w\in {\htmlData{n=c11-V0V1}{V_1}}, i.e. a|_{Q(w)} \in (\htmlData{n=c8-CA}{C_A}^\perp\otimes C_B^\perp)^\perp = C_A\htmlData{n=c4-boxplus}{\boxplus} C_B (Try it (13)). Hence

\ker {\htmlData{n=c10-HZ}{H_Z}} = T\bigl(\htmlData{n=c11-G0G1}{\mathcal{G}_1^\square},\ \htmlData{n=c8-CA}{C_A}\htmlData{n=c4-boxplus}{\boxplus} C_B\bigr), \qquad \ker {\htmlData{n=c10-HX}{H_X}} = T\bigl(\mathcal{G}_0^\square,\ C_A^\perp\boxplus C_B^\perp\bigr),

two classical Tanner codes on two graphs that share the same edge set — the sentence with which Leverrier and Zémor introduce the construction. The quantum distance is the least weight of \ker {\htmlData{n=c10-HZ}{H_Z}}\setminus\mathrm{row}(\htmlData{n=c10-HX}{H_X}) and of \ker H_X\setminus\mathrm{row}(H_Z). Note that \ker H_Z itself has small distance — it contains the X-stabilizers, of weight \le r^2 — so Theorem 3.11 is useless here: what must be shown is that every low-weight element of \ker H_Z is a sum of stabilizers.

Try it (36). Check that a \htmlData{n=c11-V0V1}{V_0}-vertex and a V_1-vertex share squares only if they are adjacent, and that they then share exactly r squares. Why can there not be two different edges between them?

Try it (37). Show that with \htmlData{n=c8-CA}{C_A} = C_B of rate 1/2 the rate bound of Proposition 11.4 is 0, and explain why \rho \ne 1/2 is natural: what is \dim(\htmlData{n=c4-tensor}{C_A\otimes C_B}) + \dim(C_A^\perp\otimes C_B^\perp) relative to r^2?

Week 16. Week 15 built the quantum Tanner code on the quadripartite complex, proved that its checks commute and that its rate is at least \htmlData{n=c11-rate}{(1-2\rho)^2}, and wrote its two classical codes as Tanner codes on two graphs with the same edge set. Those classical codes contain the stabilizers, so their own distance is small. This meeting shows that every low-weight codeword is nevertheless a sum of stabilizers, from product expansion of the local codes on both sides and spectral expansion of the two Cayley graphs, and then turns to the lifted product and to what has happened since 2022.

11.3 Product expansion and the distance theorem

The local fact needed is the following. Every x \in C_1\htmlData{n=c4-boxplus}{\boxplus} C_2 (C_i \subseteq \mathbb{F}^{n_i}) can be written x = c + r with c \in C_1\otimes\mathbb{F}^{n_2} (every column in C_1) and r \in \mathbb{F}^{n_1}\otimes C_2 (every row in C_2), usually in many ways.

Definition 11.5 (product expansion; Panteleev–Kalachev). The pair (C_1,C_2) is \beta-product-expanding if every x \in C_1\htmlData{n=c4-boxplus}{\boxplus} C_2 has a decomposition \htmlData{n=c11-decomp}{x = c + r} as above with

\htmlData{n=c1-weight}{\lvert x\rvert} \ge \beta\bigl(n_2\,\lvert c\rvert_{\mathrm{col}} + n_1\,\lvert r\rvert_{\mathrm{row}}\bigr),

where \lvert c\rvert_{\mathrm{col}} is the number of nonzero columns of c and \lvert r\rvert_{\mathrm{row}} the number of nonzero rows of r.

In words: a low-weight word of the dual tensor code can be explained by few columns and few rows. It is a coboundary-expansion property of the small cochain complex attached to the product C_1\otimes C_2, and for two codes with linear distance it is equivalent, up to constants, to robust (equivalently, agreement) testability of the corresponding tensor code (Kalachev–Panteleev). The quantum construction needs it on both sides: for (\htmlData{n=c8-CA}{C_A}, C_B) and for (C_A^\perp, C_B^\perp).

Theorem 11.6 (Panteleev–Kalachev; Leverrier–Zémor; informal). Fix \rho \in (0,1/2) and \htmlData{n=c11-beta}{\beta} > 0. There is \varepsilon > 0 such that, for all large r, if both pairs (\htmlData{n=c8-CA}{C_A},C_B) and (C_A^\perp, C_B^\perp) are \beta-product-expanding and \lambda(\htmlData{n=c8-cay}{\mathrm{Cay}(G,A)}), \lambda(\mathrm{Cay}(G,B)) \le \varepsilon r (e.g. Ramanujan), then the quantum Tanner code has minimum distance \Omega(n), with the constant depending on \rho and r only. Random codes of rates \rho and 1-\rho are two-sided product-expanding with high probability (Kalachev–Panteleev). So there are explicit-graph, randomized-local-code families of asymptotically good quantum LDPC codes.

Outline of the distance proof. Let a \in \ker {\htmlData{n=c10-HZ}{H_Z}} with \lvert a\rvert small; the goal is a \in {\htmlData{n=c10-row}{\mathrm{row}}}(\htmlData{n=c10-HX}{H_X}).

\square

The same argument, with \htmlData{n=c4-tensor}{C_A\otimes C_B} in the roles swapped, proves the local testability of the DELLM-type classical code: in Leverrier–Zémor's words, one theorem “simultaneously gives a linearly growing minimum distance for the quantum code and recovers the local testability” of the classical one.

11.4 The lifted product

Panteleev–Kalachev's formulation is algebraic. Let R = \mathbb{F}_2[G]. A matrix over R acting by left multiplication and one acting by right multiplication commute, because (ax)b = a(xb). The lifted product of two matrices M_1, M_2 over R is the hypergraph product (Example 10.6) formed over R, with M_1 acting on the left and M_2 on the right; commutation of left and right actions is exactly what makes \htmlData{n=c10-orth}{H_XH_Z^{T} = 0}, and expanding each entry of R into a \lvert G\rvert\times\lvert G\rvert permutation-sum gives binary matrices. Geometrically, the lifted product of two Tanner-code matrices built from A and B is the quantum Tanner code on the left-right Cayley complex. Non-abelian G is essential, for the reason of §8.3: the distance proof needs both Cayley graphs to be bounded-degree expanders.

11.5 Since 2022

Sources. Panteleev–Kalachev, Asymptotically good quantum and locally testable classical LDPC codes, STOC 2022, arXiv:2111.03654; Leverrier–Zémor, Quantum Tanner codes, FOCS 2022, arXiv:2202.13641; Kalachev–Panteleev, Two-sided robustly testable codes (arXiv:2206.09973); Leverrier–Zémor, Efficient decoding up to a constant fraction of the code length for asymptotically good quantum codes, SODA 2023, arXiv:2206.07571; Gu–Pattison–Tang, An efficient decoder for a linear distance quantum LDPC code, STOC 2023, arXiv:2206.06557; Dinur–Hsieh–Lin–Vidick, Good quantum LDPC codes with linear time decoders, STOC 2023, arXiv:2206.07750; Gu–Tang–Caha–Choe–He–Kubica, Single-shot decoding of good quantum LDPC codes, arXiv:2306.12470; Lin–Hsieh, Good quantum LDPC codes with linear time decoder from lossless expanders, arXiv:2203.03581 (§12); Gottesman, Fault-tolerant quantum computation with constant overhead, Quantum Inf. Comput. 14 (2014).

Answers to the exercises

Answer (36). In a square the two \htmlData{n=c11-V0V1}{V_0}-corners \htmlData{n=c11-Vij}{(g,00)}, (agb,11) are each adjacent to both V_1-corners (ag,10), (gb,01). Edges between V_{00} and V_{10} are A-edges (g,00)–(ag,10): two such edges between the same pair would need ag = a'g, so a = a'. The shared squares are those containing the edge: r of them, one for each b.

Answer (37). \rho = 1/2 gives \htmlData{n=c11-rate}{(1-2\rho)^2} = 0. In general \dim(\htmlData{n=c4-tensor}{C_A\otimes C_B}) + \dim(\htmlData{n=c8-CA}{C_A}^\perp\otimes C_B^\perp) = \htmlData{n=c8-rho}{\rho_A}\rho_Br^2 + (1-\rho_A)(1-\rho_B)r^2; with \rho_B = 1-\rho_A = 1-\rho this is 2\rho(1-\rho)r^2 \le r^2/2, and each of the four vertices of a square contributes checks, so the counting leaves r^2(1 - 4\rho(1-\rho)) per \lvert G\rvert, positive exactly when \rho \ne 1/2.

12. The lossless route: Lin–Hsieh

Idea. §8–§11 get testability and quantum distance from two ingredients: spectral expansion of two Cayley graphs, and robust or product-expanding local codes. Lin and Hsieh showed that one stronger global ingredient replaces both, namely lossless vertex expansion. Take two bipartite graphs, form their balanced product, and put the data on the vertices of the resulting four-coloured square complex, with the graphs' own adjacency as parity checks. There are no local codes. The distance, the soundness and a linear-time decoder all come from one small-set lemma, and its proof is the unique-neighbour counting of §3 done in two directions at once.

Goal of the chapter (weeks 17–18). Week 17: build the balanced product of two bipartite graphs and its three-term chain complex; see what lossless expansion must be assumed and what is now known explicitly; follow the unique-neighbour argument behind the small-set lemma in outline. Week 18: see why small-set boundary expansion of that complex gives both local testability and quantum distance; compare the two routes.

12.1 The balanced product of two bipartite graphs

Let X^{\updownarrow} = (V^{\updownarrow}_0 \sqcup V^{\updownarrow}_1, E^{\updownarrow}) and X^{\leftrightarrow} = (V^{\leftrightarrow}_0\sqcup V^{\leftrightarrow}_1, E^{\leftrightarrow}) be biregular bipartite graphs. In X^{\updownarrow} every vertex of V^{\updownarrow}_0 has degree w_0 and every vertex of V^{\updownarrow}_1 has degree w_1; write w_0', w_1' for X^{\leftrightarrow}. Their product is a square complex. Its vertices are the pairs (x,y), which come in four colours V_{ij} = V^{\updownarrow}_i\times V^{\leftrightarrow}_j. A vertical edge moves x along E^{\updownarrow} and keeps y fixed, a horizontal edge does the opposite, and a square is a pair of edges (e, e') \in E^{\updownarrow}\times E^{\leftrightarrow}. Over \mathbb{F}_2 it carries the three-term complex

\mathbb{F}_2^{\htmlData{n=c12-Vij}{V_{00}}}\ \xrightarrow{\ \partial_2\ }\ \mathbb{F}_2^{V_{10}}\oplus\mathbb{F}_2^{V_{01}}\ \xrightarrow{\ \partial_1\ }\ \mathbb{F}_2^{V_{11}}, \qquad \partial_2 = \begin{pmatrix} {\htmlData{n=c12-biadjacency}{A^{\updownarrow}}}\otimes I\\ I\otimes A^{\leftrightarrow}\end{pmatrix}, \quad \partial_1 = \bigl(I\otimes A^{\leftrightarrow}\ \ A^{\updownarrow}\otimes I\bigr),

with A^{\updownarrow}, A^{\leftrightarrow} the biadjacency matrices (from side 0 to side 1). In words, each map sends a vertex to the sum of its neighbours of the next colour. \htmlData{n=c12-boundary-maps}{\partial_1}\partial_2 = 2A^{\updownarrow}\otimes A^{\leftrightarrow} = 0 because every square has two paths from its \htmlData{n=c12-Vij}{V_{00}}-corner to its V_{11}-corner. This is exactly the hypergraph product of Example 10.6, with the two factor graphs as the classical codes. By itself it cannot beat \sqrt n.

The balanced product \htmlData{n=c12-factor-graphs}{X^{\updownarrow}}\times_G X^{\leftrightarrow} is the quotient of the product by a group G that acts freely on both graphs, on X^{\updownarrow} from the right and on X^{\leftrightarrow} from the left, via (xg, y)\sim(x, gy) (Breuckmann–Eberhardt). The complex keeps the same shape and the same local structure. Algebraically it is the lifted product of §11.4 over \htmlData{n=c11-groupalg}{\mathbb{F}_2[G]} with the two biadjacency matrices as inputs. When \lvert G\rvert is comparable to the number of vertices, the quotient destroys the “lines” that limit the hypergraph product to distance \sqrt n.

The difference from §8–§11. There, the data sat on squares, and each vertex imposed a local tensor code on its r\times r grid. Here the data sits on vertices, and the constraint at a vertex is a single parity over its neighbours. §3 is the reason no local codes are needed. Tanner codes needed local codes because the edge–vertex incidence graph of a graph is never lossless (Try it (9)). A general bipartite factor graph can be lossless, and then the graph itself supplies the unique neighbours.

12.2 Lossless expansion, one-sided and two-sided

A bipartite graph is (c,\varepsilon)-lossless from side 0 if every S \subseteq V_0 with \lvert S\rvert \le c\lvert V_0\rvert has \lvert {\htmlData{n=c3-NS}{N(S)}}\rvert \ge (1-\varepsilon)\htmlData{n=c12-degrees}{w_0}\lvert S\rvert, where w_0 is the degree of the vertices of V_0. This is Definition 3.1 with the size parameter \alpha renamed c and the degree c renamed w_0, following Lin–Hsieh. It is two-sided lossless if the same holds from side 1 with w_1. The constructions need lossless expansion together with a free action of a large group G.

12.3 One small-set lemma

Call c \in \mathbb{F}_2^{\htmlData{n=c12-Vij}{V_{10}}}\oplus\mathbb{F}_2^{V_{01}} locally minimal if its weight cannot be lowered by adding \htmlData{n=c12-boundary-maps}{\partial_2} of a single vertex of V_{00}. This is the notion of Definition 7.6 and Proposition 7.9, and the same move as one step of the flip decoder. Weights are normalized by the degrees.

Lemma 12.1 (small-set lemma; Lin–Hsieh, informal). If both factor graphs are \htmlData{n=c12-lossless-side}{(c,\varepsilon)}-lossless in the relevant directions, with \varepsilon small (below 1/24 suffices for the decoder), then every locally minimal c of small weight satisfies

\lvert{\htmlData{n=c12-boundary-maps}{\partial_1}} c\rvert \ \ge\ \bigl(\tfrac12 - O(\varepsilon)\bigr)\lvert c\rvert .

Outline. Write c = (a, b) with a \subseteq {\htmlData{n=c12-Vij}{V_{10}}} and b \subseteq V_{01}. - Unique neighbours. \htmlData{n=c12-boundary-maps}{\partial_1} sends a into V_{11} along horizontal edges and b along vertical ones. By losslessness (Lemma 3.3), a has almost w'\lvert a\rvert unique horizontal neighbours in V_{11}, and b has almost w\lvert b\rvert unique vertical ones. Each of these is a vertex of \partial_1 c unless the two contributions cancel. - Cancellations force squares. A vertex of V_{11} that is a unique neighbour of a and also a neighbour of b is the far corner of a square whose two middle corners lie in a and in b. That square has a V_{00}-corner, and this is the “square completion” step. - Local minimality bounds the squares. A vertex z \in V_{00} that completes many such squares has more than half of its neighbours in \mathrm{supp}\,c. Adding \partial_2 z would then lower the weight, which is impossible. Lossless expansion in the other direction, applied to the set of such z, bounds how many cancellations there can be. - Combining the counts gives the inequality. \square

The lemma is a small-set boundary expansion statement for the complex. In the language of §6: small chains in the middle that cannot be locally simplified have large boundary.

Week 18. Week 17 built the balanced product complex, met one-sided and two-sided lossless expansion, and outlined the small-set lemma: small locally minimal chains in the middle degree have large boundary. This meeting reads off the codes. With bits on \htmlData{n=c12-Vij}{V_{00}}, the soundness of a c^3-LTC is the flip decoder run on syndromes. With qubits in the middle degree, the lemma applied in both directions gives good quantum LDPC codes with a linear-time decoder, at the price of two-sided losslessness. The chapter ends by comparing the two routes.

12.4 The classical code: a c^3-LTC

Put bits on \htmlData{n=c12-Vij}{V_{00}} and checks on V_{10}\sqcup V_{01}, with parity-check matrix \htmlData{n=c12-boundary-maps}{\partial_2}, so that the code is C = \ker\partial_2. The test picks a random check. It has locality \htmlData{n=c12-degrees}{w_1} + w_1' (the degrees of the check vertices) and rejects f with probability proportional to \lvert\partial_2 f\rvert.

Proposition 12.2 (soundness from the small-set lemma). Suppose every locally minimal small c with \htmlData{n=c12-boundary-maps}{\partial_1} c = 0 is zero. Then every small syndrome s = \partial_2 f has a preimage g with \lvert g\rvert \le \lvert s\rvert, and so \htmlData{n=c1-dist}{\mathrm{dist}}(f, C) \le \lvert\partial_2 f\rvert for all f with small syndrome. Words with large syndrome are rejected with constant probability anyway. Hence C is locally testable with constant soundness.

Proof. While s is not locally minimal, add \htmlData{n=c12-boundary-maps}{\partial_2} z for a vertex z \in {\htmlData{n=c12-Vij}{V_{00}}} that lowers its weight, and record z. The weight drops at every step, so there are at most \lvert s\rvert steps and the recorded set g has \lvert g\rvert \le \lvert s\rvert. The final s' = s + \partial_2 g is locally minimal and small, and it satisfies \partial_1 s' = 0 because it lies in \mathrm{im}\,\partial_2. So s' = 0 by Lemma 12.1, i.e. \partial_2(f + g) = 0. \square

This is the flip decoder of Theorem 3.9, run on syndromes instead of on errors. Soundness is the statement that the flip decoder succeeds on the syndrome side.

Rate. \dim C \ge \lvert {\htmlData{n=c12-Vij}{V_{00}}}\rvert - \lvert V_{10}\rvert - \lvert V_{01}\rvert. Since \lvert V_1\rvert/\lvert V_0\rvert = \htmlData{n=c12-degrees}{w_0}/w_1 in each factor, this is positive when w_0/w_1 + w_0'/w_1' < 1: both graphs must be unbalanced, with the bit side of lower degree. Linear distance comes from the same small-set analysis. Lin–Hsieh's theorem (January 2022) gives, for every r < 1, c^3-LTCs of rate \ge r from one-sided lossless expanders with a free group action. That makes it the third c^3 construction, after DELLM and Panteleev–Kalachev (November 2021), and the only one with no robustness hypothesis on local codes.

12.5 The quantum code

Put qubits on \htmlData{n=c12-Vij}{V_{10}}\sqcup V_{01}, Z-checks on V_{00} (\htmlData{n=c10-HZ}{H_Z} = \htmlData{n=c12-boundary-maps}{\partial_2}^{T}) and X-checks on V_{11} (\htmlData{n=c10-HX}{H_X} = \partial_1). Commutation is \partial_1\partial_2 = 0. The two distances are small-set statements about the two directions of the complex, so Lemma 12.1 is needed both for \partial_1 and for \partial_2^{T}. Losslessness is therefore needed from both sides of each graph.

Theorem 12.3 (Lin–Hsieh, 2022). Assume there are two-sided \htmlData{n=c12-lossless-side}{(c,\varepsilon)}-lossless expanders with a free group action and small enough \varepsilon. Then their balanced products give quantum LDPC codes with constant rate and linear distance, together with a decoder that runs in linear time and corrects a constant fraction of errors.

The decoder is Algorithm 3.8 with vertices of \htmlData{n=c12-Vij}{V_{00}} and V_{11} in place of bits. It repeatedly finds a vertex whose flip lowers the syndrome weight by a factor above 1/2. Its analysis (errors stay small, and a flippable vertex exists while errors remain) is the proof of Theorem 3.9 with Lemma 12.1 in place of Lemma 3.3. The same template underlies the decoder of Dinur–Hsieh–Lin–Vidick (§11.5).

12.6 The two routes side by side

spectral route (§8–§11) lossless route (this chapter)
global input spectral gap of two Cayley graphs lossless expansion of two bipartite graphs
local input robust / product-expanding tensor codes none
where the data sits squares vertices of two colours
key local-to-global step mixing lemma + robustness unique neighbours + local minimality
decoder an extra argument built in: it is the proof
explicitness explicit complexes, random local codes (or explicit ones for special fields) classical: explicit; quantum: needs explicit two-sided lossless expanders with a group action

Cohen–Leigh–Reiner–Ta-Shma–Tzalik (September 2026; arXiv:2610.00525) describe the Lin–Hsieh complexes as two-dimensional lossless cubical complexes, and ask what the four-dimensional version would give. The answer, conditional on the existence of the complexes, is good quantum LTCs (§13.6).

Try it (38). For the quantum code of §12.5 show that k \ge \lvert {\htmlData{n=c12-Vij}{V_{10}}}\rvert + \lvert V_{01}\rvert - \lvert V_{00}\rvert - \lvert V_{11}\rvert. Writing \alpha = \htmlData{n=c12-degrees}{w_0}/w_1 and \alpha' = w_0'/w_1', show that this is -(1-\alpha)(1-\alpha')\lvert V_{00}\rvert. Conclude that the rate is positive exactly when one graph is unbalanced in one direction and the other in the opposite direction. Compare with the classical rate condition \alpha + \alpha' < 1 of §12.4.

Try it (39). In the plain product (no quotient by G) of two graphs with m vertices each, let v \in \mathbb{F}_2^{\htmlData{n=c12-factor-graphs}{V^{\leftrightarrow}_0}} with \htmlData{n=c12-biadjacency}{A^{\leftrightarrow}}v = 0, and let x \in V^{\updownarrow}_1. Show that c = (e_x\otimes v,\ 0) satisfies \htmlData{n=c12-boundary-maps}{\partial_1} c = 0 and has weight at most m = O(\sqrt n). Why does Lemma 12.1 say nothing about it, and why does the quotient by a group with \lvert G\rvert \approx m help?

Sources. Lin–Hsieh, c^3-Locally testable codes from lossless expanders, ISIT 2022, arXiv:2201.11369 (the LTC; the small-set lemma and square completion); Lin–Hsieh, Good quantum LDPC codes with linear time decoder from lossless expanders, arXiv:2203.03581 (the quantum code, the decoder, and the two-sided lossless assumption); Breuckmann–Eberhardt, Balanced product quantum codes, IEEE Trans. Inform. Theory 67 (2021), arXiv:2012.09271 (balanced products); Capalbo–Reingold–Vadhan–Wigderson (STOC 2002); Hsieh–Lin–Mohanty–O'Donnell–Zhang, Explicit two-sided vertex expanders beyond the spectral barrier, STOC 2025, arXiv:2411.11627; Hsieh–Lubotzky–Mohanty–Reiner–Zhang, Explicit lossless vertex expanders, FOCS 2025, arXiv:2504.15087; Dinur–Hsieh–Lin–Vidick, STOC 2023, arXiv:2206.07750; Cohen–Leigh–Reiner–Ta-Shma–Tzalik, Good quantum locally testable codes from lossless cubical complexes, arXiv:2610.00525 (30 September 2026; earlier ECCC TR26-202).

Answers to the exercises

Answer (38). k = \dim(\ker {\htmlData{n=c10-HX}{H_X}}) - \mathrm{rank}\,\htmlData{n=c10-HZ}{H_Z} \ge n - \mathrm{rank}\,\htmlData{n=c12-boundary-maps}{\partial_1} - \mathrm{rank}\,\partial_2 \ge \lvert {\htmlData{n=c12-Vij}{V_{10}}}\rvert + \lvert V_{01}\rvert - \lvert V_{11}\rvert - \lvert V_{00}\rvert. In each factor \lvert V_1\rvert = \alpha\lvert V_0\rvert (count edges), so \lvert V_{10}\rvert = \alpha\lvert V_{00}\rvert, \lvert V_{01}\rvert = \alpha'\lvert V_{00}\rvert and \lvert V_{11}\rvert = \alpha\alpha'\lvert V_{00}\rvert. The bound is (\alpha + \alpha' - 1 - \alpha\alpha')\lvert V_{00}\rvert = -(1-\alpha)(1-\alpha')\lvert V_{00}\rvert, positive iff exactly one of \alpha,\alpha' exceeds 1. The classical code wants V_{00} to be the largest colour; the quantum code wants the two middle colours together to outweigh the two ends.

Answer (39). \htmlData{n=c12-boundary-maps}{\partial_1}(e_x\otimes v, 0) = e_x\otimes {\htmlData{n=c12-biadjacency}{A^{\leftrightarrow}}}v = 0, and \lvert c\rvert = \lvert v\rvert \le m, while n \approx m^2. These are the “line” logicals of the hypergraph product (§10.5). The support is \{x\}\times\mathrm{supp}\,v, and \mathrm{supp}\,v is a nonzero codeword of the classical code with factor graph \htmlData{n=c12-factor-graphs}{X^{\leftrightarrow}}. By Theorem 3.4 it has size c\,m, so it is not a small set of the factor graph, and losslessness, which only speaks about sets of size \le c\lvert V_0\rvert, gives nothing. The weight m is small compared with n but large compared with the factor. In the balanced product the complex has only a constant times \lvert G\rvert \approx m vertices, so “small in the complex” and “small in the factor graphs” become the same condition.

13. Quantum locally testable codes

Idea. A quantum LTC is a code whose check Hamiltonian penalizes every state in proportion to how many qubits must be touched to bring it back into the code. For CSS codes this splits into two classical conditions — both classical codes must be locally testable with their own checks — i.e. into expansion in both directions at the middle degree of the chain complex. Classical LTCs needed one extra dimension; quantum ones need one more on each side, and every construction so far lives on a four-dimensional cubical complex. Almost-good qLTCs appeared in 2024 (Dinur–Lin–Vidick), with polylogarithmic losses that come from using an abelian group. In September 2026 three papers removed the losses — one unconditionally, two conditionally — by two different routes. Two follow the spectral route of §8–§11, with structured local codes on non-abelian cubical complexes. The third follows the lossless route of §12, with no local codes at all. The area is still moving: the third paper reached the arXiv on 30 September 2026.

Goal of the chapter (weeks 19–21). Week 19: define qLTCs (Aharonov–Eldar) and reduce the CSS case to two classical testability conditions; see why the toric code and hypergraph products fail; meet the specifically quantum obstruction coming from monogamy of entanglement. Week 20: follow the spectral route — from the almost-good qLTCs of Dinur–Lin–Vidick, and the place where they lose polylogarithmic factors, to the good qLTCs of Gay–Jeronimo and Bafna–Li–Nguyen. Week 21: follow the lossless route — the level chain complex of a cubical complex and the local-to-global theorem of Cohen–Leigh–Reiner–Ta-Shma–Tzalik, which runs the argument of §12 in dimension four; see what it assumes, which complexes might satisfy the assumptions, and the obstruction the natural arithmetic candidates meet; compare the two routes; state what is still open.

13.1 Definition

Let \htmlData{n=c10-codespace}{\mathcal{C}} \subseteq {\htmlData{n=c10-register}{(\mathbb{C}^2)^{\otimes n}}} be a stabilizer code with checks \Pi_1,\dots,\Pi_m, each the projector onto the -1 eigenspace of a generator, acting on \le q qubits, and let \mathcal{H}_{\mathcal{C}} = \frac1m\sum_j\Pi_j. Let \mathcal{C}_t be the span of all states obtained from \mathcal{C} by operators acting on at most t qubits (the t-fattening of \mathcal{C}), and for a state \htmlData{n=c10-dirac}{\lvert\psi\rangle} let its distance from the code be measured by how much of it lies outside \mathcal{C}_t for each t.

Definition 13.1 (quantum LTC; Aharonov–Eldar). \htmlData{n=c10-codespace}{\mathcal{C}} is a (q,\htmlData{n=c4-soundness}{\kappa})-quantum locally testable code if for every state \htmlData{n=c10-dirac}{\lvert\psi\rangle},

\langle\psi\rvert\,\htmlData{n=c13-check-hamiltonian}{\mathcal{H}_{\mathcal{C}}}\,\lvert\psi\rangle \ \ge\ \frac{\kappa}{n}\sum_{t\ge1}t\,\bigl\lVert\bigl(P_{\htmlData{n=c13-fattening}{\mathcal{C}_t}} - P_{\mathcal{C}_{t-1}}\bigr)\lvert\psi\rangle\bigr\rVert^2,

where P_{\mathcal{C}_t} is the projector onto \mathcal{C}_t: the energy is at least \kappa times the expected relative distance of \lvert\psi\rangle from the code.

Measuring a random check is the tester; the energy is its rejection probability.

Proposition 13.2 (the CSS case). For \htmlData{n=c10-css}{\mathrm{CSS}}(\htmlData{n=c10-HX}{H_X}, \htmlData{n=c10-HZ}{H_Z}), soundness against all Pauli errors is equivalent, up to constant factors, to the two classical conditions

\frac{\lvert H_Za\rvert}{\htmlData{n=c10-mXZ}{m_Z}} \ge \kappa\,\frac{\htmlData{n=c0-dist-set}{\mathrm{dist}(a, \ker H_Z)}}{n}\quad\text{and}\quad \frac{\lvert H_Xb\rvert}{m_X} \ge \kappa\,\frac{\htmlData{n=c1-dist}{\mathrm{dist}}(b, \ker H_X)}{n}\qquad\text{for all } a, b \in \mathbb{F}_2^n .

That is: \ker H_Z and \ker H_X must both be classical LTCs with their own parity checks.

Why. The state \htmlData{n=c10-XZ}{X(a)}\htmlData{n=c10-dirac}{\lvert\psi\rangle}, \lvert\psi\rangle \in {\htmlData{n=c10-codespace}{\mathcal{C}}}, violates exactly the Z-checks that anticommute with X(a) — the support of \htmlData{n=c10-HZ}{H_Z}a — and it lies in \mathcal{C} again as soon as a \in \ker H_Z (then X(a) is a stabilizer or a logical, both of which preserve \mathcal{C}). So its energy is \lvert H_Za\rvert/m and its distance from \mathcal{C} is \htmlData{n=c0-dist-set}{\mathrm{dist}(a,\ker H_Z)}. Z-errors are symmetric, and a general Pauli error X(a)Z(b) separates into the two. Extending from Pauli errors to arbitrary states is the content of Aharonov–Eldar's reduction for stabilizer codes. \square

In the language of §10: with qubits in the middle degree of C_{+}\xleftarrow{\htmlData{n=c10-HX}{H_X}}C_{\mathrm{mid}}\xleftarrow{\htmlData{n=c10-HZ}{H_Z}^T}C_{-}, the two conditions are cosystolic-type expansion of the map to one side and of the map to the other side — condition (a) of Definition 7.1, for the complex and for its dual. A good qLTC needs this plus linear systole and cosystole.

13.2 Why it is hard

Try it (40). Prove the “why” of Proposition 13.2 for a single X-error: if \htmlData{n=c10-dirac}{\lvert\psi\rangle} \in {\htmlData{n=c10-codespace}{\mathcal{C}}} and a \in \mathbb{F}_2^n, show that \htmlData{n=c10-XZ}{X(a)}\lvert\psi\rangle is an eigenvector of every check, compute its energy, and show that X(a)\lvert\psi\rangle \in \mathcal{C} iff a \in \ker {\htmlData{n=c10-HZ}{H_Z}}.

Try it (41). Show that the toric code is not a qLTC: its soundness is O(1/L).

Week 20. Week 19 defined quantum LTCs, reduced them for CSS codes to local testability of both classical codes with their own checks, and saw why this is hard: topological codes and hypergraph products fail, and monogamy of entanglement turns expansion against testability. This meeting follows the constructions along the spectral route: cubical complexes with product-expanding local codes, from the almost-good codes of Dinur–Lin–Vidick, and the place where they lose polylogarithmic factors, to the good codes of September 2026.

13.3 Constructions

construction soundness distance locality
Hastings (2017); Leverrier–Londe–Zémor, hemicubic codes (2022) inverse-polylogarithmic \sqrt n up to polylogarithmic factors O(1)
Cross–He–Natarajan–Szegedy–Zhu (2022/24) constant growing with the locality, or with constant average locality as stated
Wills–Lin–Hsieh (2023) distance balancing and tradeoffs between soundness, distance and locality
Dinur–Lin–Vidick (2024) inverse-polylogarithmic n/\mathrm{polylog}\,n O(1)
Gay–Jeronimo (Sept. 2026) constant linear O(1) — explicit, qubits, constant rate
Bafna–Li–Nguyen (Sept. 2026) constant linear O(1) — assuming a variant of the Bafna–Vyas product-expansion conjecture for Reed–Solomon codes
Cohen–Leigh–Reiner–Ta-Shma–Tzalik (Sept. 2026) constant linear O(1) — assuming sufficiently imbalanced two-sided lossless 4-dimensional cubical complexes exist

Theorem 13.3 (Dinur–Lin–Vidick, 2024). For every t > 0 there is a t-dimensional cubical complex generalizing the square complexes of §8 and §11, which becomes a chain complex once constant-size local codes h_1,\dots,h_t are attached as gadgets. Using the existence of tuples of codes that are product-expanding (Panteleev–Kalachev), one obtains lower bounds on its cycle and co-cycle expansion. For t = 4 this gives almost-good quantum LTCs: constant relative rate, inverse-polylogarithmic relative distance and soundness, and constant-size parity checks.

Why dimension four. Qubits go in the middle degree 2, X-checks in degree 1 and Z-checks in degree 3. Soundness needs coboundary-type expansion from degree 2 up to 3 and boundary-type expansion from 2 down to 1; the distance needs cosystolic and systolic bounds in degree 2. Each of these is proved by a local-to-global argument of the kind of §7 and §9, and each needs the neighbouring degrees to exist — which a square complex (qubits in degree 1, checks at the two ends) does not provide. The quantum Tanner code of §11 has linear distance but is not known to be locally testable. For t > 2 the local input is product expansion of t-tuples of codes, a condition strictly stronger than robust testability once there are more than two factors; Kalachev–Panteleev (2025) proved that random tuples over large enough fields have it.

13.4 Where the polylogarithms come from

A left-right Cayley complex (§8) has two commuting actions on G, left and right multiplication, and that is exactly enough to close squares. A t-dimensional cubical complex built the same way needs t pairwise commuting directions, and for t = 4 there is no left-right trick. Dinur–Lin–Vidick take G abelian, so that all directions commute. But a Cayley graph of an abelian group on N vertices needs \Theta(\log N) generators to have a constant spectral gap. The degree therefore grows, and the local codes and expansion bounds lose the corresponding \mathrm{polylog}\,n factors in distance and soundness. This is the same obstruction as in §8.3 (bounded-degree abelian Cayley graphs are never expanders), now forced on us by the dimension.

The way out is to give up literal commutation. In an arithmetic quotient of a product of trees, a cubical Ramanujan complex, going around a square in the two orders need not be the identity on labels. Instead it is the identity up to a change of coordinates on the local views: a permutation or rescaling of the index sets of the local codes. So the square closes if the local codes are invariant (equivariant) under those changes of coordinates. The constructions of §13.5 make this work with Reed–Solomon codes, whose large symmetry groups (affine and projective transformations of the evaluation set) can be matched to the symmetries of the complex. What must then be proved is the product expansion (§11.3, for 4-tuples) of these structured codes. For random codes it is known; for Reed–Solomon codes it is the crux. For pairs, it holds below the rate barrier of Theorem 4.16, and with a single evaluation set it fails above it (Proposition 4.18). The quantum codes need both sides of the barrier at once.

13.5 The spectral route in September 2026

The three papers appeared within a week of each other. The two below follow the spectral route; the third is the subject of §13.6. The descriptions are based on the papers' abstracts and introductions, and the precise statements are in the papers.

Week 21. Weeks 19 and 20 defined qLTCs, reduced them for CSS codes to testability in both directions of a chain complex, and followed the spectral route: cubical complexes with product-expanding local codes, from the almost-good codes of Dinur–Lin–Vidick to the good ones of September 2026. This meeting follows the other route, which keeps the complex but drops the local codes, replacing spectral expansion plus product expansion by lossless expansion, as §12 did in dimension two.

13.6 The lossless route: Cohen–Leigh–Reiner–Ta-Shma–Tzalik

The third paper of September 2026, Good quantum locally testable codes from lossless cubical complexes by Cohen, Leigh, Reiner, Ta-Shma and Tzalik, appeared as ECCC TR26-202 on 21 September and on the arXiv as arXiv:2610.00525 (submitted 30 September, listed 2 October 2026). It carries the lossless route of §12 up to dimension four. It does not construct the complexes it needs; in the authors' words, it investigates “what their existence would imply”. The description below follows the abstract and introduction of the arXiv version.

Lin–Hsieh as dimension two. Recall the complex of §12.1. It has four blocks of vertices \htmlData{n=c13-VI}{V_{00}}, V_{10}, V_{01}, V_{11}, indexed by the vertices of the square \{0,1\}^2, bipartite graphs between blocks that differ in one coordinate, and the three-term complex \mathbb{F}_2^{V_{00}} \to \mathbb{F}_2^{V_{10}}\oplus\mathbb{F}_2^{V_{01}} \to \mathbb{F}_2^{V_{11}}, whose maps send a vertex to the sum of its neighbours one level up. The data sits on vertices, there are no local codes, and Lemma 12.1 comes from losslessness of the two graphs.

Dimension k. Replace the square by the cube \{0,1\}^k, whose vertices are the subsets I of [k] = \{1,\dots,k\}.

Definition 13.4 (decorated cubical complex and level complex; informal). A decorated k-dimensional cubical complex consists of finite vertex sets V_I, one for each I \subseteq [k]; for each I and each i \notin I, a bipartite directional graph between V_I and V_{I\cup\{i\}}; and a set of squares, each spanning two directions, such that any two edges at a vertex in two different directions lie in exactly one square (the weak completion property). Its level chain complex has, in degree s = 0,\dots,k, the space \mathbb{F}_2^{V_s} of functions on the level V_s = \bigsqcup_{\lvert I\rvert = s}V_I, and the map \delta : \mathbb{F}_2^{V_s} \to \mathbb{F}_2^{V_{s+1}} that sends a vertex to the sum of its neighbours one level up.

Weak completion gives \htmlData{n=c13-delta}{\delta}\circ\delta = 0 (Try it (42)). The chain groups live on the level sets of the Boolean cube, not on the cells of the complex: the squares only make \delta^2 = 0, and the data — bits, qubits, checks — sits on vertices, as in §12. For k = 2 this is the complex of §12.1.

The hypotheses. Every directional graph must be lossless in the sense of Definition 3.1, from one side for the classical statements and from both sides — two-sided — for the quantum ones, with small loss. The degrees must also be suitably imbalanced. Imbalance controls the squares that are completed through few vertices of the support, which is the higher-dimensional version of the cancellation count in the proof of Lemma 12.1, and of the rate condition of §12.4.

Theorem 13.5 (Cohen–Leigh–Reiner–Ta-Shma–Tzalik, informal). A decorated cubical complex whose directional graphs are lossless with small enough loss, and whose degrees satisfy the imbalance conditions, is what they call a robust small-set coboundary expander for its level complex: roughly, small level cochains that cannot be made lighter by local moves have coboundary at least a constant times their weight. The proof decomposes a small cochain S into local pieces L_1, L_2, \dots, each seen through one-dimensional lossless graphs, with

\htmlData{n=c6-norm}{\lVert\delta S\rVert} \ \ge\ \sum_t\lVert{\htmlData{n=c13-delta}{\delta}} L_t\rVert - C\,\lVert S\rVert,

where C depends on k and tends to 0 with the loss parameters.

This is Lemma 12.1 in dimension k, and the decomposition is the higher-dimensional version of its unique-neighbour counting. For k = 2 it recovers the Lin–Hsieh LTC.

The quantum code. For k = 4 the level complex has five terms,

\mathbb{F}_2^{\htmlData{n=c13-levels}{V_0}} \to \mathbb{F}_2^{V_1} \to \mathbb{F}_2^{V_2} \to \mathbb{F}_2^{V_3} \to \mathbb{F}_2^{V_4},

and the pattern of §13.3 applies: qubits on the middle level \htmlData{n=c13-levels}{V_2}, made of six blocks, and the two kinds of checks on V_1 and V_3. The outer levels carry nothing but are needed in the proof of soundness: a syndrome on V_3 is itself a cocycle, with zero coboundary on V_4, and the syndrome-decoding argument of Proposition 7.9 and Proposition 12.2 runs there; symmetrically on the other side, with V_0. Small-set expansion is needed both upward and downward, which is why the directional graphs must be lossless from both sides. The conclusion: sufficiently imbalanced, two-sided lossless four-dimensional cubical complexes give asymptotically good quantum locally testable codes. As for Lin–Hsieh, the paper also gives a linear-time decoder.

Which complexes? What remains is, in the authors' words, “purely combinatorial: construct explicit higher-dimensional direction-wise lossless decorated cubical complexes”. The natural candidates are arithmetic. Kamber–Kaufman showed that some number-theoretic Ramanujan graphs — Morgenstern's, over function fields — are not even unique-neighbour expanders, but a heuristic led them to conjecture that the LPS graphs are lossless. The same heuristic suggests imbalanced cubical complexes built from the Ramanujan bigraphs of Evra–Feigon–Maurischat–Parzanchevski: (p^3+1, p+1)-biregular quotients of the Bruhat–Tits tree of a p-adic unitary group \mathrm{PU}_3, the unbalanced analogues of the LPS graphs. Cohen–Leigh–Reiner–Ta-Shma–Tzalik show that the opposite is the case: the EFMP bigraphs are not two-sided lossless. The set that fails to expand is the image of a subtree attached to an algebraic subgroup, and the details are to appear separately. So the arithmetic candidates fail here, and the explicit lossless vertex expanders of Hsieh–Lubotzky–Mohanty–Reiner–Zhang (§12), which use high-dimensional expanders as amplifiers, are a natural starting point. Either way, the open problem is about buildings and their quotients.

13.7 The two routes side by side

spectral route (§13.5) lossless route (§13.6)
complex quotient of a product of four trees: a non-abelian cubical Ramanujan complex decorated 4-dimensional cubical complex with lossless directional graphs
where the data sits on faces of the complex, with constant-size local codes as coefficients on vertices, by levels of the cube \{0,1\}^4; no local codes
local input product expansion of 4-tuples of Reed–Solomon codes matched to the symmetries of the complex none
global input spectral expansion two-sided lossless expansion, with imbalance
local-to-global step coboundary expansion from product-expanding local codes (Dinur–Lin–Vidick) small-set level coboundary expansion: Lemma 12.1 in dimension 4
status unconditional and explicit (Gay–Jeronimo); conditional on a Reed–Solomon conjecture (Bafna–Li–Nguyen) conditional on the existence of the complexes; the arithmetic candidates fail
ancestors §8, §9 and §11 §3 and §12

The same split ran through the classical story: Sipser–Spielman's distance came from spectral expansion with local codes or from lossless expansion without them (§3), and so did the c^3-LTCs (§12.6). In the quantum case the spectral route reached good qLTCs first, unconditionally; the lossless route needs no local codes and comes with a decoder, but waits for its complexes.

13.8 Open

Try it (42). Suppose that in a decorated cubical complex any two edges at a vertex in two different directions lie in exactly one square, each square spanning two directions. Show that \htmlData{n=c13-delta}{\delta}\circ\delta = 0 on the level complex.

Sources. Aharonov–Eldar, Quantum locally testable codes, SIAM J. Comput. 44 (2015), arXiv:1310.5664; Eldar–Harrow, Local Hamiltonians whose ground states are hard to approximate, FOCS 2017; Leverrier–Londe–Zémor, Towards local testability for quantum coding, Quantum 6 (2022); Cross–He–Natarajan–Szegedy–Zhu, Quantum locally testable code with constant soundness, Quantum 8 (2024), arXiv:2209.11405; Hastings, Quantum codes from high-dimensional manifolds, ITCS 2017, arXiv:1608.05089; Wills–Lin–Hsieh, General distance balancing for quantum locally testable codes, arXiv:2305.00689; Wills–Lin–Hsieh, Tradeoff constructions for quantum locally testable codes, IEEE Trans. Inform. Theory 71 (2025), arXiv:2309.05541; Dinur–Lin–Vidick, Expansion of higher-dimensional cubical complexes with application to quantum locally testable codes, FOCS 2024, arXiv:2402.07476; Kalachev–Panteleev, Maximally extendable product codes are good coboundary expanders, FOCS 2025, arXiv:2501.01411. For §13.4–§13.7: Gay–Jeronimo, Asymptotically good quantum locally testable codes, arXiv:2609.20780; Bafna–Li–Nguyen, Good quantum locally testable codes from product expansion, arXiv:2609.26735; Bafna–Vyas, Private PCPs from product expansion, ECCC TR26-150 (the Reed–Solomon product-expansion conjecture); Rungtanapirom–Stix–Vdovina, Infinite series of quaternionic 1-vertex cube complexes, the doubling construction, and explicit cubical Ramanujan complexes, Internat. J. Algebra Comput. 29 (2019), arXiv:1808.03290; Cohen–Leigh–Reiner–Ta-Shma–Tzalik, Good quantum locally testable codes from lossless cubical complexes, arXiv:2610.00525 (30 September 2026; earlier ECCC TR26-202, 21 September 2026); Evra–Feigon–Maurischat–Parzanchevski, Ramanujan bigraphs, arXiv:2312.06507; Kamber–Kaufman, Combinatorics via closed orbits: number theoretic Ramanujan graphs are not unique neighbor expanders, arXiv:2103.04311.

Answers to the exercises

Answer (40). For a Z-generator \htmlData{n=c10-XZ}{Z(\zeta)}, Z(\zeta)X(a)\htmlData{n=c10-dirac}{\lvert\psi\rangle} = (-1)^{\langle\zeta,a\rangle}X(a)Z(\zeta)\lvert\psi\rangle = (-1)^{\langle\zeta,a\rangle}X(a)\lvert\psi\rangle; X-generators commute with X(a). So X(a)\lvert\psi\rangle is a \pm1-eigenvector of every generator, violating exactly the Z-checks with \langle\zeta,a\rangle = 1: energy \lvert {\htmlData{n=c10-HZ}{H_Z}}a\rvert/m. It is in \htmlData{n=c10-codespace}{\mathcal{C}} iff it violates nothing, iff H_Za = 0.

Answer (41). By Try it (35), an X-string a of length \ell = L/2 along the dual lattice violates 2 of the \htmlData{n=c10-mXZ}{m_Z} = L^2 plaquettes, while \htmlData{n=c0-dist-set}{\mathrm{dist}(a, \ker H_Z)} = L/2: the elements c \in \ker {\htmlData{n=c10-HZ}{H_Z}} are closed dual cycles, so a + c has the same two endpoints as a and contains a dual path between them, of length at least L/2. So \htmlData{n=c4-soundness}{\kappa} \le \frac{2/L^2}{(L/2)/(2L^2)} = \frac{8}{L}.

Answer (42). For f \in \mathbb{F}_2^{\htmlData{n=c13-levels}{V_s}} and z \in {\htmlData{n=c13-VI}{V_K}} with \lvert K\rvert = s+2, (\htmlData{n=c13-delta}{\delta}\delta f)(z) = \sum_x f(x)\,N(x,z), where N(x,z) is the number of two-step upward paths x - y - z. Such a path uses two edges at y in two different directions, so they lie in exactly one square. Its fourth vertex y' lies in the other intermediate block and gives a second path x - y' - z, and the square found from that path at y' is the same square. So the paths from x to z are paired by a fixed-point-free involution, N(x,z) is even, and \delta\delta f = 0.

14. The quantum PCP conjecture and NLTS

Idea. The PCP theorem says that approximating the fraction of satisfiable constraints is as hard as solving exactly. Its quantum version asks the same of the ground energy of a local Hamiltonian, and it is open. A necessary consequence — that some local Hamiltonians have no low-energy state that is simple to prepare — was proved in 2022, and the Hamiltonians are the check Hamiltonians of the good quantum LDPC codes of §11. The expansion that made those codes good makes their low-energy states globally entangled.

Goal of the chapter (weeks 22–24). Week 22: build the background that physicists and complexity theorists take for granted — what a Hamiltonian is and why its ground states matter; local Hamiltonians as quantum constraint satisfaction problems; frustration, trivial states and topological order; QMA and Kitaev's circuit-to-Hamiltonian construction. Week 23: state the quantum PCP conjecture, and see why Dinur's method does not transfer and why expansion is double-edged in the quantum setting; state the NLTS conjecture and why it follows from quantum PCP, and outline the Anshu–Breuckmann–Nirkhe proof. Week 24: say what good qLTCs do and do not give toward quantum PCP (§14.5, the quantum half of §5.9); see the games version of quantum PCP, which is a theorem, proved with property testing and group stability; close with the open problems of the year.

14.1 Hamiltonians and ground states: the physics

Physics enters this chapter through one object, the Hamiltonian. This section says what physicists use it for, and §14.2 what complexity theorists ask about it. The quantum mechanics of §10.1 is assumed.

Energy. In quantum mechanics the energy of a system is an observable, the Hamiltonian \mathcal{H}. Its eigenvalues are the possible energies, its eigenvectors for the least eigenvalue are the ground states, and the others are excited states. A system in equilibrium with its surroundings at temperature T > 0 is in the Gibbs state \rho_T = e^{-\mathcal{H}/T}/\mathrm{tr}\,e^{-\mathcal{H}/T}, which tends to the normalized projection onto the ground space as T \to 0 (Try it (43)). So the question “what does the system look like when it is cold?” is the question “what are its ground states?”, and much of condensed-matter physics is the study of ground states and low-energy states of systems of many particles.

Locality. Matter is made of many particles, and they interact with their neighbours. A system of n spins — qubits — on a lattice has a Hamiltonian \mathcal{H} = \sum_i\htmlData{n=c14-k-local}{\mathcal{H}_i} in which each term acts on a few neighbouring spins. Examples are the Ising model in a transverse field, -\sum_{\langle ij\rangle}Z_iZ_j - h\sum_iX_i, the Heisenberg model \sum_{\langle ij\rangle}(X_iX_j + Y_iY_j + Z_iZ_j) with Y = iXZ, both summed over neighbouring pairs, and the toric code Hamiltonian of §10.5. Energies are extensive: they grow linearly with the number of terms. So an error of a constant fraction of the number of terms is the natural notion of “approximately the ground energy”, and it is the scale of the quantum PCP conjecture.

Local Hamiltonians are quantum constraint satisfaction problems. A k-local Hamiltonian on n qubits is \mathcal{H} = \sum_{i=1}^m\mathcal{H}_i with each 0 \le \mathcal{H}_i \le I acting on at most k qubits. Its ground energy is \lambda_0(\mathcal{H}) = \min_{\htmlData{n=c10-dirac}{\lvert\psi\rangle}}\langle\psi\rvert\mathcal{H}\lvert\psi\rangle. A constraint graph (§5) is a diagonal 2-local Hamiltonian on qudits: \mathcal{H}_e is the projector onto the violated pairs of values, and \lambda_0 = m\cdot{\htmlData{n=c5-UNSAT}{\mathrm{UNSAT}}}. So the terms are constraints, classical constraint satisfaction is the case of diagonal (in particular commuting) terms, and the energy of a state on a term measures how badly the state violates it. What is new is that the terms need not commute, and that the best states may be entangled.

14.2 Quantum NP and Kitaev's theorem

QMA. A problem L is in QMA (Kitaev) if there is a polynomial-time quantum verifier — a polynomial-size quantum circuit, computed from x in polynomial time — that receives x together with a quantum witness, a state on polynomially many qubits, and measures one qubit to accept or reject, such that: if x \in L, some witness is accepted with probability at least 2/3; if x \notin L, every witness is accepted with probability at most 1/3. A classical witness is a basis state, so \mathrm{NP} \subseteq \mathrm{QMA}. QMA is to NP what a quantum proof checker is to a classical one.

Theorem 14.1 (Kitaev). Given a 5-local Hamiltonian and thresholds a < b with b - a \ge 1/\mathrm{poly}(n), deciding whether \htmlData{n=c14-ground-energy}{\lambda_0} \le a or \lambda_0 \ge b is QMA-complete. (Later improved to 2-local, Kempe–Kitaev–Regev.)

Kitaev's theorem is Cook–Levin for quantum computation. That the problem is in QMA is easy: the witness is a ground state, and the verifier estimates its energy by measuring random terms. For hardness, take a verifier circuit U = U_T\cdots U_1 acting on a witness \htmlData{n=c10-dirac}{\lvert\xi\rangle} and ancilla qubits. Build, on these qubits and a clock register, a Hamiltonian whose low-energy states are close to history states

\frac1{\sqrt{T+1}}\sum_{t=0}^T \htmlData{n=c14-verifier-circuit}{U_t\cdots U_1}\lvert\xi, 0\cdots0\rangle\otimes{\htmlData{n=c10-dirac}{\lvert t\rangle}} .

Its local terms check that the ancillas start at 0; that consecutive time steps differ by the right gate (each such term touches the two qubits of a gate and a few clock qubits, the clock being written in unary); that the clock is well formed; and that the output qubit accepts at time T. This is Feynman's idea of a clock. If some witness is accepted with high probability, its history state has small energy; if none is, every state has energy at least an inverse polynomial in T. This is the tableau of the Cook–Levin theorem (§5.1), with the rows of the table in superposition instead of side by side. The gap is only inverse-polynomial, because a single wrong step is penalized by one term among about T, and improving it to a constant fraction of the terms is exactly what quantum PCP asks. One case is easier: for commuting 2-local Hamiltonians the problem is in NP (Bravyi–Vyalyi).

Try it (43). Let \htmlData{n=c14-hamiltonian}{\mathcal{H}} have ground energy \lambda_0 and ground space of dimension g, with orthogonal projection P_0. Show that the Gibbs state \rho_T tends to P_0/g as T \to 0, and that its energy \mathrm{tr}(\rho_T\mathcal{H}) tends to \lambda_0.

Try it (44). The cat state \frac1{\sqrt2}(\htmlData{n=c10-basis}{\lvert0^n\rangle} + \lvert1^n\rangle) is a ground state of the Ising chain -\sum_{i<n}Z_iZ_{i+1}, whose ground space is spanned by \lvert0^n\rangle and \lvert1^n\rangle. Show that it can be prepared from \lvert0^n\rangle by a circuit of depth 1 + \lceil\log_2n\rceil, and that no circuit of depth D with 4^D < n prepares it. Why does this not make the Ising chain an NLTS Hamiltonian?

Week 23. Week 22 supplied the physics — Hamiltonians, ground states, Gibbs states, trivial and topologically ordered states — and the complexity — QMA, and Kitaev's theorem, which is Cook–Levin for quantum computation but with only an inverse-polynomial gap. This meeting states the quantum PCP conjecture, which asks for a constant gap, with three obstacles, and outlines the proof of its necessary condition NLTS.

14.3 The quantum PCP conjecture and its obstacles

Conjecture 14.2 (quantum PCP, Hamiltonian form). There are k and \varepsilon > 0 such that, for k-local Hamiltonians with m terms, deciding whether \htmlData{n=c14-ground-energy}{\lambda_0} \le a\,m or \lambda_0 \ge (a + \varepsilon)m is QMA-hard.

For diagonal Hamiltonians this is Theorem 5.5.

Two formulations, and a third statement. Classically, the gap form and the proof-checking form of the PCP theorem are equivalent (Proposition 5.9). The same holds quantumly: Conjecture 14.2 is equivalent to the statement that QMA has quantum verifiers that read only a constant number of qubits of a quantum witness (Aharonov–Arad–Vidick explain the equivalence). A third, different statement concerns interactive proofs with several entangled provers. That one is a theorem, and §14.6 explains it.

Three observations explain why Conjecture 14.2 is hard:

14.4 NLTS

Conjecture 14.3 (NLTS — No Low-energy Trivial States; Freedman–Hastings, 2014). There are a family of O(1)-local Hamiltonians and \varepsilon > 0 such that every state with energy at most \htmlData{n=c14-ground-energy}{\lambda_0} + \varepsilon m requires quantum circuits of depth \omega(1) to prepare from a product state.

The classical analogue is false for a trivial reason: a classical assignment is a product state. NLTS is purely quantum, and it follows from quantum PCP (assuming QMA \ne NP), because the energy of a constant-depth circuit state can be computed classically term by term (Try it (45)).

Theorem 14.4 (Anshu–Breuckmann–Nirkhe, 2022/23). The check Hamiltonians \htmlData{n=c14-hamiltonian}{\mathcal{H}} = \sum_j\frac{I - S_j}{2} of the good quantum LDPC codes of Panteleev–Kalachev and Leverrier–Zémor are NLTS.

Outline. Let \htmlData{n=c10-dirac}{\lvert\psi\rangle} have energy \le\varepsilon m (the ground energy is 0), i.e. violate few checks on average.

\square

It had been expected that NLTS would come from good quantum LTCs. Anshu–Nirkhe (2022) had already shown circuit lower bounds for states of energy o(n) for codes that need not be testable. The ABN proof showed that good qLDPC codes with a clustering property suffice. Quantum PCP remains open: NLTS is a necessary condition, not a proof.

Try it (45). Let \htmlData{n=c10-dirac}{\lvert\psi\rangle} = U\htmlData{n=c10-basis}{\lvert0^n\rangle} with U a circuit of depth D made of 2-qubit gates. Show that for a k-local term \htmlData{n=c14-k-local}{\mathcal{H}_i}, \langle\psi\rvert\mathcal{H}_i\lvert\psi\rangle can be computed classically in time 2^{O(k2^D)}, and deduce that quantum PCP implies NLTS if QMA \ne NP.

Try it (46). Show that the classical version of NLTS is false: for a diagonal Hamiltonian (a constraint graph), there is always a ground state of circuit depth 1.

Week 24. Week 23 stated the quantum PCP conjecture with three obstacles, and outlined the proof of the necessary condition NLTS from good quantum LDPC codes. This meeting compares qLTCs with quantum PCP as §5.9 compared LTCs with PCPs, and ends with the version of quantum PCP that is a theorem, and with the open problems of the year.

14.5 qLTCs and quantum PCP

§5.9 described how LTCs and PCPs are related classically. Here is the same comparison for the quantum case, now that good qLTCs exist (§13.5–§13.6).

Dictionary, completed.

classical quantum
code tests itself LTC = coboundary / agreement expansion qLTC = expansion in both directions
+ arbitrary instance PCP (embed a CSP into the complex) quantum PCP (embed a QMA verifier): open
necessary consequence — (trivial classically, Try it (46)) NLTS: proved from good qLDPC (2022); robust form from good qLTCs

14.6 The games version: where testing works

Quantum PCP has a second, different formulation, about interactive proofs, and that one has been proved. In a nonlocal game a classical verifier plays with two or more provers who cannot communicate once the game starts but may share an entangled state. The verifier sends each prover a question, receives answers, and accepts according to a fixed rule. Shared entanglement can raise the provers' best winning probability above what classical provers achieve — the CHSH game is the first example. Fitzsimons–Vidick conjectured a games quantum PCP: that it is QMA-hard to decide whether entangled provers can win a given game with probability 1 or with probability at most 1/2. Natarajan–Vidick (2018) proved it, under randomized reductions.

The engine is classical property testing, run against quantum provers.

So in the world of games, where the verifier is classical and only the provers are quantum, property testing and group stability do the work, and a quantum PCP theorem holds. In the world of Hamiltonians, where the proof is a quantum state that is checked locally, no such tool is known, and the games theorem is not known to imply Conjecture 14.2.

14.7 The year in one table, and what is open

classical quantum
good LDPC codes: random (Gallager, 1962), then from expanders (Tanner, Sipser–Spielman; 1981–96) good qLDPC codes from square complexes (Panteleev–Kalachev, Leverrier–Zémor; Lin–Hsieh conditionally; 2022)
LTCs: Hadamard \to quasi-linear \to c^3 (1990 \to 2007 \to 2022) qLTCs: \sqrt n-distance \to almost-good \to good (2017 \to 2024 \to September 2026, by the spectral and the lossless route)
PCP theorem (1992; Dinur 2005/07) quantum PCP: open; NLTS proved (2022); the games version proved (2018)
testability = coboundary expansion (Kaufman–Lubotzky); group stability = cocycle stability with permutation coefficients (Chapman–Lubotzky) quantum testability = expansion in both directions of a chain complex; Pauli-group stability drives the games version
spectral route or lossless route (§9, §12) spectral route or lossless route (§11–§13)

Open problems to take away:

  1. Quantum PCP, and intermediate statements between NLTS and it (for instance, lower bounds on circuit depth for states of energy below any constant fraction, for commuting Hamiltonians). With good qLTCs now available, the concrete question is how to encode a QMA verifier on top of one while keeping a constant gap (§14.5).
  2. The conditional qLTC routes: the Reed–Solomon product-expansion conjectures (Bafna–Vyas and variants), and explicit two-sided lossless four-dimensional cubical complexes, for which the natural arithmetic candidates fail (§13.6 and §13.8).
  3. Linear-size PCPs with constant queries: open even classically, and not a consequence of c^3-LTCs. The best HDX-based result is quasi-linear size with small soundness (Bafna–Minzer–Vyas, §5.9).
  4. Small constants. Good LTCs and qLDPC codes with small locality and practical rates; explicit local codes with the needed product expansion.
  5. Explicit high-dimensional coboundary expanders of bounded degree, which KKL obtain only conditionally, on Serre's congruence subgroup conjecture (Theorem 7.3) — a question about the cohomology of arithmetic quotients of buildings.
  6. Testability of groups. Which groups are stable, or testable, in permutations, and with what dependence between distance and rejection probability? By Chapman–Lubotzky this asks which presentation complexes are cocycle-stable with permutation coefficients (§4.4 and §7.3).

Sources. Aharonov–Arad–Vidick, The quantum PCP conjecture, SIGACT News 44 (2013) — the survey to read first; Kitaev–Shen–Vyalyi, Classical and Quantum Computation (AMS 2002), for the QMA-completeness of the local Hamiltonian problem; Kempe–Kitaev–Regev, The complexity of the local Hamiltonian problem, SICOMP 35 (2006); Aharonov–Arad–Landau–Vazirani, The detectability lemma and quantum gap amplification, STOC 2009; Brandão–Harrow, Product-state approximations to quantum ground states, STOC 2013; Freedman–Hastings, Quantum systems on non-k-hyperfinite complexes, Quantum Inf. Comput. 14 (2014); Anshu–Breuckmann–Nirkhe, NLTS Hamiltonians from good quantum codes, STOC 2023, arXiv:2206.13228; Anshu–Nirkhe, Circuit lower bounds for low-energy states of quantum code Hamiltonians, ITCS 2022, arXiv:2011.02044. For §14.1–§14.2: Gharibian–Huang–Landau–Shin, Quantum Hamiltonian complexity, Found. Trends Theor. Comput. Sci. 10 (2015), a survey for computer scientists, and Osborne, Hamiltonian complexity, Rep. Prog. Phys. 75 (2012), the same for physicists; Feynman, Quantum mechanical computers, Found. Phys. 16 (1986); Bravyi–Hastings–Verstraete, Lieb–Robinson bounds and the generation of correlations and topological quantum order, Phys. Rev. Lett. 97 (2006); Bravyi–Vyalyi, Commutative version of the local Hamiltonian problem and common eigenspace problem, Quantum Inf. Comput. 5 (2005). For §14.5: Eldar–Harrow, Local Hamiltonians whose ground states are hard to approximate, FOCS 2017 (NLETS, and the qLTC route to NLTS); Aharonov–Eldar (§13) for the qLTC–qPCP motivation; Bafna–Vyas, Private PCPs from product expansion, ECCC TR26-150; Bafna–Li–Nguyen, arXiv:2609.26735, introduction. For §14.6: Fitzsimons–Vidick, A multiprover interactive proof system for the local Hamiltonian problem, ITCS 2015; Natarajan–Vidick, A quantum linearity test for robustly verifying entanglement, STOC 2017, arXiv:1610.03574; Natarajan–Vidick, Low-degree testing for quantum states, and a quantum entangled games PCP for QMA, FOCS 2018, arXiv:1801.03821; Raz–Safra, A sub-constant error-probability low-degree test, and a sub-constant error-probability PCP characterization of NP, STOC 1997; Ji–Natarajan–Vidick–Wright–Yuen, \htmlData{n=c14-mipstar}{\mathrm{MIP}^* = \mathrm{RE}}, arXiv:2001.04383; Gowers–Hatami (§4).

Answers to the exercises

Answer (43). In an eigenbasis of \htmlData{n=c14-hamiltonian}{\mathcal{H}}, with eigenvalues \lambda_j, \htmlData{n=c14-gibbs}{\rho_T} is diagonal with entries e^{-\lambda_j/T}/\sum_l e^{-\lambda_l/T}. Multiply numerator and denominator by e^{\htmlData{n=c14-ground-energy}{\lambda_0}/T}: the entries become e^{-(\lambda_j - \lambda_0)/T}/\sum_l e^{-(\lambda_l - \lambda_0)/T}, and as T \to 0 each e^{-(\lambda_j - \lambda_0)/T} tends to 1 if \lambda_j = \lambda_0 and to 0 otherwise. So \rho_T \to P_0/g, and \mathrm{tr}(\rho_T\mathcal{H}) \to \mathrm{tr}(P_0\mathcal{H})/g = \lambda_0.

Answer (44). A Hadamard gate on the first qubit gives \frac1{\sqrt2}(\htmlData{n=c10-basis}{\lvert0\rangle} + \lvert1\rangle)\otimes\lvert0^{n-1}\rangle; then each layer of CNOT gates, from every qubit already in the superposition to a fresh qubit, doubles the number of qubits in it, so \lceil\log_2n\rceil layers suffice. For the lower bound, let \htmlData{n=c10-dirac}{\lvert\psi\rangle} = U\lvert0^n\rangle with U of depth D. The operator U^\dagger Z_iU acts only on the light cone L_i of qubit i, with \lvert L_i\rvert \le 2^D, and each input qubit lies in at most 2^D light cones, so at most 4^D indices j have L_j \cap L_1 \ne \emptyset. If 4^D < n, some j has L_j \cap L_1 = \emptyset, and since \lvert0^n\rangle is a product state, \langle\psi\rvert Z_1Z_j\lvert\psi\rangle = \langle\psi\rvert Z_1\lvert\psi\rangle\langle\psi\rvert Z_j\lvert\psi\rangle. For the cat state the left side is 1 and the right side is 0. So the depth is at least \frac12\log_2n. The Ising chain is not NLTS because its ground space also contains \lvert0^n\rangle, a product state: NLTS asks that every low-energy state be hard to prepare.

Answer (45). \htmlData{n=c10-dirac}{\langle\psi\rvert}{\htmlData{n=c14-k-local}{\mathcal{H}_i}}\lvert\psi\rangle = \langle0^n\rvert U^\dagger\mathcal{H}_iU\htmlData{n=c10-basis}{\lvert0^n\rangle}, and U^\dagger\mathcal{H}_iU acts only on the backward light cone of the k qubits of \mathcal{H}_i, at most k2^D qubits; simulate that part. So for constant D the energy of a described circuit is computable in polynomial time, and the circuit is an NP witness for “\htmlData{n=c14-ground-energy}{\lambda_0} \le (a + \varepsilon/2)m”. If every Hamiltonian had such low-energy states, the gap problem of Conjecture 14.2 would be in NP, and QMA-hardness would give QMA \subseteq NP.

Answer (46). A diagonal Hamiltonian has an optimal assignment \sigma as a ground state, the basis state \htmlData{n=c10-dirac}{\lvert\sigma\rangle} = \bigotimes_v\lvert\sigma(v)\rangle — a product state, prepared by one layer of single-qudit gates from \htmlData{n=c10-basis}{\lvert0\dots0\rangle}. NLTS is about entanglement, which classical assignments do not have.

Appendices

A. The reading list, by chapter

Main sources. Guruswami–Rudra–Sudan, Essential Coding Theory (free draft) and Hoory–Linial–Wigderson, Expander graphs and their applications, Bull. AMS 43 (2006), for Part A; Goldreich, Introduction to Property Testing (CUP 2017), Arora–Barak, Computational Complexity, and Radhakrishnan–Sudan's exposition of Dinur, for Part B; Lubotzky, High dimensional expanders, Proc. ICM 2018, for Part C; the original papers for Parts D and E, with Nielsen–Chuang for §10 and Aharonov–Arad–Vidick's survey for §14. The weeks are in parentheses.

chapter (weeks) main reading supplements
§1 (1) GRS Ch. 1–5; HLW §§2–4, 5.2 Hamming (1950); Reed–Solomon (1960); Gilbert (1952), Varshamov (1957); Lubotzky–Phillips–Sarnak (1988)
§2 (2) Gallager (1962/63), Ch. 2 of the monograph for Theorem 2.6; Tanner (1981) Richardson–Urbanke Ch. 3; Kou–Lin–Fossorier (2001); GRS Ch. 11
§3 (3) Sipser–Spielman, IEEE Trans. IT 42 (1996); HLW §§10, 12 Zémor (2001); Spielman (1996); Capalbo–Reingold–Vadhan–Wigderson (STOC 2002); Hsieh–Lubotzky–Mohanty–Reiner–Zhang (FOCS 2025, arXiv:2504.15087)
§4 (4–5) Goldreich Ch. 1–2, 13; O'Donnell Ch. 1; for §4.4: Becker–Lubotzky–Mosheiff (FOCS 2021, arXiv:2011.05234; Israel J. Math. 2023, arXiv:2204.04539) BLR (1993); Ben-Or–Coppersmith–Luby–Rubinfeld (2008); Polishchuk–Spielman (STOC 1994); Goldreich–Sudan (JACM 2006); Ben-Sasson–Harsha–Raskhodnikova (SICOMP 2005); Dinur–Sudan–Wigderson (RANDOM 2006); for §4.4: Arzhantseva–Păunescu (2015), Becker–Lubotzky–Thom (2019), Becker–Lubotzky (2020), Gowers–Hatami (2017)
§5 (6–7) for §5.1–§5.3: Arora–Barak Ch. 1–2, 11; for §5.4–§5.7: Radhakrishnan–Sudan, Bull. AMS 44 (2007); Dinur, JACM 54 (2007) Goldreich, P, NP, and NP-Completeness; Håstad (JACM 2001); Radhakrishnan (ICALP 2006); Dinur–Reingold (SICOMP 2006); Arora–Barak Ch. 22; for §5.9: Ben-Sasson–Goldreich–Harsha–Sudan–Vadhan (SICOMP 2006), Bafna–Minzer–Vyas (STOC 2025, arXiv:2407.12762)
§6 (8) Kaufman–Lubotzky (ITCS 2014); Lubotzky ICM 2018 (arXiv:1712.02526) §§2–3, 5 Linial–Meshulam (2006); Gromov (2010); Oppenheim (DCG 2018); Kaufman–Oppenheim (STOC 2018)
§7 (9–10) Kaufman–Kazhdan–Lubotzky (GAFA 2016); Evra–Kaufman (STOC 2016); Lubotzky ICM 2018 §3 Dotterrer–Kaufman–Wagner (2018); Lubotzky–Meshulam–Mozes (2016); for §7.3: Dinur–Meshulam (2022), Chapman–Lubotzky I and II (arXiv:2310.17474, 2311.06706), Bafna–Minzer (STOC 2024), Dikstein–Dinur (arXiv:2308.09582)
§8 (11) Dinur–Evra–Livne–Lubotzky–Mozes, arXiv:2111.04808, §§3–4.1 §§5–6 (the groups); extended version arXiv:2207.11929; Burger–Mozes (2000)
§9 (12) DELLM §4.2 Panteleev–Kalachev (arXiv:2111.03654); First–Kaufman (STOC 2024); Kalachev–Panteleev (arXiv:2206.09973)
§10 (13–14) Nielsen–Chuang Ch. 2, 4, 10; Breuckmann–Eberhardt survey (PRX Quantum 2021) Preskill's notes Ch. 7; Gottesman's thesis (1997); Tillich–Zémor (2014); for §10.6 only: Evra–Kaufman–Zémor (FOCS 2020)
§11 (15–16) Leverrier–Zémor, arXiv:2202.13641; Panteleev–Kalachev, arXiv:2111.03654 Kalachev–Panteleev (arXiv:2206.09973); decoders: Leverrier–Zémor (SODA 2023), Gu–Pattison–Tang and Dinur–Hsieh–Lin–Vidick (STOC 2023)
§12 (17–18) Lin–Hsieh, arXiv:2201.11369 (LTC) and arXiv:2203.03581 (qLDPC) Breuckmann–Eberhardt, balanced products (arXiv:2012.09271); Hsieh–Lubotzky–Mohanty–Reiner–Zhang (FOCS 2025, arXiv:2504.15087); Hsieh–Lin–Mohanty–O'Donnell–Zhang (STOC 2025, arXiv:2411.11627)
§13 (19–21) Aharonov–Eldar, arXiv:1310.5664; Dinur–Lin–Vidick, arXiv:2402.07476; Gay–Jeronimo, arXiv:2609.20780; Cohen–Leigh–Reiner–Ta-Shma–Tzalik, arXiv:2610.00525 Bafna–Li–Nguyen (arXiv:2609.26735); Cross–He–Natarajan–Szegedy–Zhu (Quantum 2024); Wills–Lin–Hsieh (IEEE Trans. IT 2025); Kalachev–Panteleev (FOCS 2025, arXiv:2501.01411); Evra–Feigon–Maurischat–Parzanchevski (arXiv:2312.06507); Kamber–Kaufman (arXiv:2103.04311)
§14 (22–24) Aharonov–Arad–Vidick, SIGACT News 44 (2013); Gharibian–Huang–Landau–Shin (2015) for §14.1–§14.2; Anshu–Breuckmann–Nirkhe, arXiv:2206.13228 Osborne (2012); Bravyi–Hastings–Verstraete (2006); Aharonov–Arad–Landau–Vazirani (STOC 2009); Brandão–Harrow (STOC 2013); Freedman–Hastings (2014); for §14.5: Eldar–Harrow (FOCS 2017), Bafna–Vyas (ECCC TR26-150); for §14.6: Natarajan–Vidick (STOC 2017; FOCS 2018), Ji–Natarajan–Vidick–Wright–Yuen (arXiv:2001.04383)

B. Parameters at a glance

code year rate relative distance locality locally testable
Hamming 1950 \to 1 \to 0 (d = 3) — —
random LDPC (Gallager) 1962 constant constant (whp) constant no (BHR)
Tanner / Sipser–Spielman / Zémor 1981–2001 constant constant constant no, in general
Hadamard — k/2^k 1/2 3 yes
Goldreich–Sudan 2002/06 k^{-o(1)} constant constant yes
Ben-Sasson–Sudan + Dinur 2005/07 1/\mathrm{polylog}\,k constant constant yes
DELLM; Panteleev–Kalachev; Lin–Hsieh 2022 constant constant constant yes: c^3
toric code 1997/2003 \Theta(1/n) \Theta(n^{-1/2}) 4 no
hypergraph product 2009/14 constant \Theta(n^{-1/2}) constant no
Evra–Kaufman–Zémor 2020 — \Omega(n^{-1/2}\log n) constant —
Panteleev–Kalachev; quantum Tanner 2022 constant constant constant not known
Lin–Hsieh (quantum) 2022 constant constant constant not known; assumes two-sided lossless expanders with a group action
Dinur–Lin–Vidick 2024 constant 1/\mathrm{polylog}\,n constant soundness 1/\mathrm{polylog}\,n
Gay–Jeronimo 2026 constant constant constant yes: good qLTC (explicit)
Bafna–Li–Nguyen; Cohen–Leigh–Reiner–Ta-Shma–Tzalik 2026 constant constant constant yes, conditionally

C. The dictionary

expansion code test
lossless vertex expansion distance and linear-time flip decoding —
mixing lemma on a graph Tanner-code distance \htmlData{n=c2-delta0}{\delta_0}(\delta_0 - \lambda/r) —
random walks on expanders — gap amplification (Dinur)
edge expansion (\htmlData{n=c6-h0}{h^0}) the cut code the edge test
coboundary expansion (\htmlData{n=c6-hi}{h^i}) \htmlData{n=c6-Bi}{B^i} the face test is sound (Kaufman–Lubotzky)
cosystolic expansion \htmlData{n=c6-Zi}{Z^i} with a large cosystole; one-sided quantum distance the face test for Z^i is sound
local spectral expansion + coboundary-expanding links — local-to-global testability (KKL, EK)
expanding Cayley graphs + robust tensor codes c^3-LTCs on square complexes the vertex test
expanding Cayley graphs + two-sided product expansion good qLDPC codes (quantum Tanner) —
lossless expansion of two bipartite graphs (balanced product) c^3-LTCs; good qLDPC codes with built-in linear-time decoder (Lin–Hsieh) a random vertex check
cocycle stability with permutation coefficients (condition (a), non-abelian) coverings and group actions (no code) the relation test: stability of a group (§4.4 and §7.3)
expansion in both directions at the middle degree qLTC measuring a random check
product expansion of equivariant Reed–Solomon 4-tuples on non-abelian cubical complexes good qLTCs (2026) measuring a random check
lossless expansion of the directional graphs of a 4-dimensional cubical complex (level complex) good qLTCs, conditionally (2026) measuring a random check
stability of approximate representations of the Pauli group — the quantum BLR test of the games quantum PCP (§14.6)

Every theorem stated in §1–§3 is proved in full, except the Cheeger inequalities and the Alon–Boppana bound of §1, which are quoted; this includes Gallager's theorem (§2.3) and the losslessness of random factor graphs (§3.4). §4, §6 and §8 prove their central statements; §5 proves the equivalence of the two forms of the PCP theorem and the degree-reduction and composition lemmas, and outlines the amplification lemma; §7 proves the dimension-1 case of the small-set theorem and its two consequences, and outlines the rest; §10 proves no-cloning and the stabilizer form of the Knill–Laflamme condition. The proofs in §9, §11, §12 and §13 are outlines that name every ingredient. Where a statement is marked “informal”, the hypotheses and constants are in the cited paper. The research frontier in §12–§14 moves fast. §13.5–§13.6 describe preprints from 17–30 September 2026 from their abstracts and introductions, as of 4 October 2026, so read the papers themselves before presenting them, and check the arXiv and ECCC listings of the authors named there for newer work.