The Hadamard assignment tester #
An assignment tester Dinur, Definition 3.1 for a constraint C on the labels of
the two ends of an edge checks, with a constant number of queries and a constant rejection rate,
that two tables encode labels satisfying C. It is handed the tables and a proof; it accepts the
encodings of satisfying labels together with an honest proof, and rejects every proof with
probability at least a constant times the distance of the tables from the encodings of the closest
satisfying labels. Running it on every edge of a constraint graph over a large alphabet reduces the
alphabet to a constant one (PCP.ConstraintGraph.compose): for this, the number of queries and
the rejection rate must not depend on the alphabet, however large the proof is.
The tester here, for constraints on labels in a finite type α, follows Arora and Barak
Arora and Barak, Chapter 22 and is built on the Hadamard tester for quadratic
equations (BitString.exists_forall_hadamardCode_tensor_eq_of_le_blrAcceptance).
- A label
ais encoded by its long codeBitString.longCode a, the dictatorr ↦ r aonα → Bool, which is the Hadamard encoding of the unit vector ofa. The long codes of distinct labels differ on half of the inputs, so a table within relative distance1/4of a long code determines its label (BitString.eq_of_hammingDist_longCode_lt). - The labels
σ : Fin 2 → αof the two ends are described by Boolean variables indexed byFin 2 × α, their one-hot encodingHadamardTester.oneHot σ. The constraint becomes a system of quadratic equations in the variables (HadamardTester.equationCoeff): no two variables incompatible withCare both set, and an odd number of the variables of each end are set. Its solutions are the one-hot encodings of the labels satisfyingC(HadamardTester.forall_hadamardCode_tensor_equationCoeff_iff). Reading the Hadamard encoding of the one-hot encoding at the vector that isron the variables of an end and zero elsewhere (HadamardTester.endEmbed) reads the long code of the label of that end atr. - The proof consists of a linear table, supposedly the Hadamard encoding of the variables, and a
quadratic table, supposedly that of their tensor square. On independent random strings, the
tester
hadamardTester Cruns five checks, each a local test (PCP.LocalTest): the linearity test on both tables, the tensor test, the equation test for the quadratic equations ofC, and the input test, which compares the bit of the table of a random end at a random point with the self-corrected read of the linear table at the corresponding vector. It accepts when all five do, and makes17queries.
If the tester accepts with probability at least 1 - ρ for some ρ < 1/28, the linear table is
within ρ of the Hadamard encoding of a solution of the equations, which is the one-hot encoding of
labels satisfying C, and the input test puts the tables within distance 3ρ of the long codes of
these labels (HadamardTester.exists_inputDist_le_of_le_acceptProb). So the tester rejects with
probability at least 1/28 times the distance of the tables from the long codes of satisfying
labels (HadamardTester.exists_inputDist_div_le_one_sub_acceptProb). As a constraint graph, over
the alphabet Bool × (HadamardTester.Query → Bool) of 2 ^ 18 symbols, it is an assignment tester
in the sense of Dinur: a labelling violates a proportion of the edges at least 1/476 times that
distance (HadamardTester.exists_inputDist_div_le_unsatFrac).
Main definitions #
Cslib.PCP.HadamardTester.oneHot: the one-hot encoding of the labels of the two ends.Cslib.PCP.HadamardTester.equationCoeff,Cslib.PCP.HadamardTester.equationRhs: the quadratic equations of a constraint.Cslib.PCP.HadamardTester.blrTest,Cslib.PCP.HadamardTester.tensorTest,Cslib.PCP.HadamardTester.equationTest,Cslib.PCP.HadamardTester.inputTest: the checks of the tester, as local tests.Cslib.PCP.hadamardTester: the assignment tester of a constraint.Cslib.PCP.HadamardTester.inputDist: the distance of the tables of a proof from the long codes of labels.Cslib.PCP.HadamardTester.honestProof: the proof of satisfying labels.
Main results #
Cslib.PCP.HadamardTester.forall_hadamardCode_tensor_equationCoeff_iff: the solutions of the quadratic equations of a constraint are the one-hot encodings of its satisfying labels.Cslib.PCP.HadamardTester.passes_honestProof: completeness of the tester.Cslib.PCP.HadamardTester.exists_inputDist_le_of_le_acceptProb,Cslib.PCP.HadamardTester.exists_inputDist_div_le_one_sub_acceptProb,Cslib.PCP.HadamardTester.one_div_le_one_sub_acceptProb_of_forall_not: soundness of the tester.Cslib.PCP.HadamardTester.satisfies_toConstraintGraph_honestProof,Cslib.PCP.HadamardTester.exists_inputDist_div_le_unsatFrac,Cslib.PCP.HadamardTester.one_div_le_unsatFrac_of_forall_not: completeness and soundness of the tester as a constraint graph.
References #
The one-hot encoding and the quadratic equations of a constraint #
The one-hot encoding of the labels σ : Fin 2 → α of the two ends of an edge, as Boolean
variables indexed by Fin 2 × α: the variable (b, a) is set exactly when the end b has the
label a.
Instances For
The coefficients of the quadratic equations of the constraint C in the variables x, as
linear equations hadamardCode (tensor x x) (equationCoeff C e) = equationRhs e in the tensor
square of the variables: for every pair of variables incompatible with C (inl), the equation
saying that they are not both set, and for every end (inr), the equation saying that an odd
number of its variables are set. Their solutions are the one-hot encodings of the labels
satisfying C (forall_hadamardCode_tensor_equationCoeff_iff).
Instances For
The quadratic equations of a constraint: their solutions are exactly the one-hot encodings of the labels satisfying the constraint.
The checks, as local tests #
The linearity test of Blum, Luby and Rubinfeld, as a local test on a table
f : (ι → Bool) → Bool: on the random string (x, y), it reads f at x, y and x + y, and
accepts when (f x ^^ f y) = f (x + y).
Instances For
The tensor test, as a local test on the pair of tables Sum.elim f g: on the random string
(y, z, r, s, t), it compares the self-corrected read of g at tensor y z with randomness t
with the product of the self-corrected reads of f at y and z with randomnesses r and s.
Instances For
The equation test for the linear equations hadamardCode w (A e) = b e, as a local test on
a table g : (ι → Bool) → Bool: on the random string (k, t), it compares the self-corrected read
of g at the sum of the A e with k e set, with randomness t, with the sum of the b e with
k e set.
Instances For
The input test, as a local test on the tables of the two ends and the linear table,
Sum.elim (fun p ↦ T p.1 p.2) f: on the random string (b, r, y), it compares the bit of the table
T b at r with the self-corrected read of f at endEmbed b r with randomness y.
Instances For
The tester #
The assignments of the variables Fin 2 × α: the positions of the linear table, and the random
strings of its checks.
Instances For
The assignments of the pairs of variables: the positions of the quadratic table, and the random strings of its checks.
Instances For
The random strings of the equation test: the sets of quadratic equations of a constraint.
Instances For
The positions of the proofs read by the tester for constraints on labels in α: the bit
inl (b, r) of the table of the end b at r, the bit inr (inl y) of the linear table at y,
and the bit inr (inr z) of the quadratic table at z.
Instances For
The random strings of the tester: those of its five checks.
Instances For
The random strings of the tester are finitely many.
The queries of the tester: three for each linearity test, six for the tensor test, two for the equation test and three for the input test.
Instances For
The tester makes 17 queries.
The tester uses 20 k² + 15 k + 3 random bits, for k labels.
The Hadamard assignment tester of the constraint C on labels in α
Arora and Barak, Chapter 22: on independent random strings, the linearity test on
the linear and on the quadratic table, the tensor test, the equation test for the quadratic
equations of C, and the input test; it accepts when all five accept.
Instances For
Soundness #
The distance of the tables of the proof π from the long codes of the labels σ: the
relative Hamming distance of the table of an end from the long code of its label, averaged over the
two ends. It is the proportion of the positions of the two tables at which π differs from the
long codes.
Instances For
The distance of each table from the long code of its label is at most twice the distance of the tables.
Soundness of the Hadamard assignment tester: if the tester of C accepts the proof π
with probability at least 1 - ρ for some ρ < 1/28, then the tables of π are within distance
3ρ of the long codes of labels satisfying C. The linearity tests decode the linear and the
quadratic table to x and w; the tensor test forces w to be the tensor square of x, and the
equation test makes x a solution of the equations of C, hence the one-hot encoding of
satisfying labels; the input test then compares the tables with their long codes.
Soundness of the Hadamard assignment tester Dinur, Definition 3.1: if the
constraint C is satisfiable, the tester of C rejects every proof with probability at least
1/28 times the distance of its tables from the long codes of some labels satisfying C.
Soundness of the Hadamard assignment tester for an unsatisfiable constraint: the tester
rejects every proof with probability at least 1/28.
Completeness #
The honest proof for the labels σ: the long codes of the labels as the tables of the
ends, and the Hadamard encodings of their one-hot encoding and of its tensor square as the linear
and the quadratic table.
Instances For
The tables of the honest proof for σ are the long codes of σ.
Completeness of the Hadamard assignment tester: the honest proof for labels satisfying the constraint passes on every random string.
Completeness of the Hadamard assignment tester: the honest proof for labels satisfying the constraint is accepted with probability one.
The tester as a constraint graph #
Completeness of the tester as a constraint graph Dinur, Definition 3.1: for labels satisfying the constraint, the labelling of the constraint graph of the tester by the honest proof, whose positions of the tables carry the long codes of the labels, satisfies every edge.
Soundness of the tester as a constraint graph Dinur, Definition 3.1: if the
constraint C is satisfiable, every labelling of the constraint graph of the tester violates a
proportion of the edges at least 1/476 times the distance of the tables it carries from the long
codes of some labels satisfying C.
Soundness of the tester as a constraint graph for an unsatisfiable constraint: every
labelling violates a proportion at least 1/476 of the edges.