A PCP verifier as a CNF formula #
SubsetNP reduces "some proof is accepted on every coin string" to "some
bitstring is a witness": a table, laid out one block of Q answers per coin
string, that is consistent and accepted everywhere. Both conditions are
predicates on individual bits of that bitstring, so both are CNF clauses.
That is what this module builds. The formula's variables are the positions of
the witness — a SAT assignment and a witness are the same object, since both
read out of range as false — so the encoding needs no translation of models.
- Consistency contributes, for each pair of query slots that read the same proof position, the two clauses saying their variables agree.
- Acceptance contributes, for each coin string and each answer vector the verdict rejects, the clause blocking that vector.
With r coins and q queries the formula has 2^r q variables and
O(4^r q^2 + 2^r 2^q) clauses — polynomial when r is logarithmic and q
constant.
Main definitions #
Complexity.allVecs— the bit vectors of a given lengthComplexity.PCPVerifier.varIdx— the variable holding one answerComplexity.PCPVerifier.toCNF— the formula
Main results #
Complexity.mem_allVecs_iff—allVecs nis exactly the vectors of lengthn
Enumerating bit vectors #
Variables #
The variable holding the answer to query i on coin string ρ. The blocks
sit a stride Q apart, exactly as SubsetNP.tableOf reads them.
Equations
- Complexity.PCPVerifier.varIdx t Q ρ i = Complexity.PCPVerifier.coinIndex ρ * Q + i
Instances For
The clauses #
The coin strings, listed by index. Computable, unlike an enumeration drawn
from Finset.univ, because the reduction has to be carried out by a machine.
Equations
Instances For
Two query slots reading the same proof position must get the same answer.
Equations
- One or more equations did not get rendered due to their size.
Instances For
For each coin string, a clause blocking every answer vector the verdict rejects. The verdict arrives as a Boolean function, which is the form a polynomial-time decision procedure takes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The formula of a verifier on an input.
Equations
- V.toCNF g t Q x = V.consClauses t Q x ++ V.acceptClauses g t Q x
Instances For
Semantics of the consistency clauses #
Semantics of the acceptance clauses #
The formula is equivalent to the witness relation #
The reduction, at the level of membership #
The encoded formula tracks membership. For an input on which the verifier is either certainly accepted or accepted with probability at most a half, the formula is satisfiable exactly when some proof is always accepted.
The reduction is correct. If L is decided by the verifier with t
coins in the sense of PCP, then membership in L is membership of the encoded
formula in SAT.