Decoding a Hadamard proof #
Dinur's alphabet-reduction step composes a constraint system with an inner
verifier — an assignment tester — and the classical one is built from the
Hadamard code: an assignment a ⊆ Fin n is encoded as the parity function
χ a, and the verifier checks that the proof is (close to) such a function.
The two facts the analysis rests on are already in
Complexitylib.BooleanAnalysis.FourierExpansion: blr_soundness, which says a
proof passing the linearity test is close to some linear function, and
local_correctability, which recovers that function's value anywhere. What is
missing for a tester is the witness: soundness must hand back the coordinate
set S, since S is precisely the assignment being decoded.
This module extracts that witness, and records the two identities that make
χ S a usable decoding: its value on a basis vector is the membership bit of
S, so reading the corrected proof at basis vectors recovers the assignment.
Main results #
Complexity.exists_close_parity_of_blr— soundness with the coordinate set namedComplexity.parityFun_basis— the decoded assignment is read off at basis vectorsComplexity.hadamard,Complexity.signOf_hadamard— the Hadamard code is a parity function, so the Fourier results apply to itComplexity.tensor,Complexity.hadamard_tensor— the consistency identity tying the quadratic table to the linear oneComplexity.parity_eq_signOf_hadamard,Complexity.exists_assignment_of_blr— a proof passing the linearity test decodes to an assignmentComplexity.eq_tensorAssign_of_consistent— the consistency check leaves the prover no freedom in the quadratic tableComplexity.QuadConstraint,Complexity.sat_of_checks— the constraint check, and tester soundness in exact formComplexity.checks_of_sat— and its completenessComplexity.hammingDist_comm,Complexity.hammingDist_triangle— basic metric facts, absent from the Fourier layerComplexity.eq_of_hammingDist_lt_half,Complexity.hadamard_inj_of_close— the decoding is rigid, so a check passing often holds exactlyComplexity.prob_hadamard_ne_zero— a nonzero linear form is balancedComplexity.tensorRow,Complexity.hadamard_tensor_row— the bilinear form, read as a linear form in one argumentComplexity.prob_mono,Complexity.prob_tensorRow_ne_zero— a nonzero bilinear form has nonzero rows for at least half the second argumentsComplexity.prob₂_tensor_ne_zero— hence it is nonzero on a quarter of all pairsComplexity.eq_tensorAssign_of_prob_consistent— so passing the consistency check often forces the quadratic table exactlyComplexity.prob_corrected_read_left,Complexity.prob_two_corrected_reads— self-corrected reads over bundled randomnessComplexity.sat_of_prob_checks— soundness when consistency is only tested on a random pairComplexity.prob_consistency_of_honest— and the matching completenessComplexity.prob_all_reads— every read of a tester is correct, for any bundling of its randomness
BLR soundness, with the witness named. A proof passing the linearity
test is close to χ S for an explicit coordinate set S — and S is the
assignment the tester decodes.
The basis vector at coordinate i.
Instances For
Reading the assignment. The decoded parity function, evaluated at the
i-th basis vector, is -1 exactly when i belongs to the coordinate set: the
assignment is read off the proof one coordinate at a time.
The Hadamard code #
An 𝔽₂-valued function on the cube. The tester's checks are stated over
𝔽₂ — the consistency check multiplies two bits, which is not a ±1
operation — while the linearity analysis lives in the ±1 world, so the two
views must be bridged.
Equations
Instances For
The ±1 encoding of an 𝔽₂-valued function.
Equations
- Complexity.signOf F x = Complexity.BooleanAnalysis.chi (F x)
Instances For
The Hadamard encoding of an assignment a: the linear function
x ↦ ⟨a, x⟩.
Equations
- Complexity.hadamard a x = ∑ i : Fin n, a i * x i
Instances For
The Hadamard code is a parity function. Its ±1 encoding is χ of the
support of the assignment — so the Fourier layer's linearity results apply to
Hadamard proofs verbatim, and the decoded coordinate set is the assignment's
support.
The tensor part #
The outer product of two cube points, as a point of the squared cube. The
Fourier layer is indexed by Fin n, so the pair index is transported along
finProdFinEquiv.
Equations
- Complexity.tensor x y k = x (finProdFinEquiv.symm k).1 * y (finProdFinEquiv.symm k).2
Instances For
The tensor square of an assignment — the second table a Hadamard proof carries, so that the verifier can evaluate quadratic constraints.
Equations
Instances For
The consistency identity. The tensor table, read at an outer product,
is the product of the two linear readings. This is the check that ties the
quadratic table to the linear one, and it is a statement about bits: over
𝔽₂ the right-hand side is a product, which is why the tester's checks cannot
be phrased in the ±1 encoding.
Decoding a proof into an assignment #
The assignment a coordinate set stands for.
Instances For
Every parity function is a Hadamard codeword. With signOf_hadamard
this makes the correspondence between assignments and parity functions a
bijection, so BLR's coordinate set can be handed back as an assignment.
Decoding. A proof passing the linearity test is close to the Hadamard encoding of an explicit assignment — the assignment the tester extracts.
Consistency forces the tensor #
Reading a Hadamard table at a basis vector returns that coordinate.
Consistency forces the tensor. A quadratic table that agrees with the product of the linear readings on every outer product is the tensor square of the assignment — testing at basis vectors pins down every entry. This is why the consistency check suffices: it leaves the prover no freedom in the quadratic table.
Checking a constraint #
A quadratic constraint over 𝔽₂. Dinur's inner verifier tests exactly
this: the constraints of a system with a constant-size alphabet are quadratic
equations once the alphabet symbols are spelled out in bits.
- quad : BooleanAnalysis.Cube (n * n)
The quadratic coefficients, indexed like the tensor table.
- lin : BooleanAnalysis.Cube n
The linear coefficients.
- const : ZMod 2
The constant term.
Instances For
The constraint evaluated at an assignment.
Equations
- C.eval a = Complexity.hadamard (Complexity.tensorAssign a) C.quad + Complexity.hadamard a C.lin + C.const
Instances For
The assignment satisfies the constraint.
Instances For
What the verifier computes from the two tables: one query into each.
Instances For
On honest tables the check is the constraint — this is completeness.
Tester soundness, exact form. If the two tables are Hadamard codewords, the consistency check holds everywhere, and the constraint check passes, then the decoded assignment satisfies the constraint. The prover's only freedom is the assignment itself: consistency pins the quadratic table to the tensor of the linear one, and then the check computes the constraint honestly.
The Hadamard encoding of an assignment is linear, so it passes the linearity test with certainty.
Tester completeness, exact form. The honest tables of a satisfying assignment pass the linearity test with certainty, satisfy the consistency check everywhere, and pass the constraint check.
Rigidity of the decoding #
Distinct parity functions are far apart. Two different parity functions disagree on exactly half the cube, so agreeing on more than half forces them to be equal.
This is what makes the approximate tester work: the decoded tables are linear,
and a check that passes on a large enough fraction of the cube therefore holds
everywhere on the corrected tables — turning a probabilistic hypothesis into
the exact one sat_of_checks needs.
The decoded assignment is unique: a proof cannot be close to the Hadamard encodings of two different assignments.
A nonzero linear form is balanced #
The expectation of a bit function's sign encoding.
A nonzero linear form is balanced. Over 𝔽₂ a nonzero linear form takes
each value on exactly half the cube — the counting fact behind every "the check
cannot pass too often unless it always passes" step.
The bilinear form #
The bilinear form of c, contracted against y: the linear form in x
obtained by fixing the second argument.
Equations
- Complexity.tensorRow c y i = ∑ j : Fin n, c (finProdFinEquiv (i, j)) * y j
Instances For
Row decomposition. Reading the quadratic table at an outer product is a linear reading in the first argument, with coefficients contracted against the second. This is what lets the one-variable balance lemma be applied inside a two-variable check.
Probability is monotone. The Fourier layer has the union bound and complements but not this.
The bilinear form is nonzero on many rows. If the quadratic table's
error c is nonzero, then for at least half the y the contracted linear form
is nonzero — the first half of the 1/4 bound.
A nonzero bilinear form is nonzero on a quarter of all pairs. For at least half the second arguments the contracted form is nonzero, and each such form is nonzero on exactly half the first arguments.
This is the quantitative heart of the consistency check: a prover whose quadratic table differs from the tensor square fails the check on at least a quarter of the pairs, so passing it more often than that forces the tables to agree exactly.
Approximate consistency #
Approximate consistency forces the tensor. A quadratic table passing the
consistency check on more than three quarters of the pairs must be the tensor
square: otherwise their difference is a nonzero bilinear form, which
prob₂_tensor_ne_zero says fails on at least a quarter.
Reads over bundled randomness #
A corrected read is right. Reading a close-to-linear table by
self-correction, with the randomness taken from the first block of a bundled
random string, returns the codeword's value except with probability 2ε.
The same for the second block.
Two corrected reads are both right. The union bound over the two blocks: bundling the randomness is what makes this an ordinary one-variable union bound rather than a product-measure argument.
Tester soundness with a probabilistic consistency check. The verifier cannot test consistency everywhere — it tests one random pair. This says that is enough: passing on more than three quarters of the pairs pins the quadratic table down exactly, and then the constraint check computes the constraint honestly.
Together with checks_of_sat this is the assignment tester's guarantee at the
level of decoded tables: the prover's only freedom is which assignment to encode,
and if the checks pass, that assignment satisfies the constraint.
Completeness of the consistency check. The honest tables pass it on every pair, so the tester accepts a correct proof with certainty.
All of a tester's reads are correct. Given a close-to-linear table and
any family of blocks of a bundled random string — each uniformly distributed,
which is what hblk asks and what CubeBlocks supplies — every self-corrected
read returns the codeword's value, except with probability 2kε.
Parameterising by the block maps keeps this independent of how many reads the tester makes and how the string is carved up.