From proofs to answer tables #
The combinatorial heart of PCP[r, q] ⊆ NP: a nondeterministic machine cannot
guess the proof, which may be astronomically long — the verifier's query
positions are outputs of a polynomial-time function, so they are bounded only by
2 ^ poly. What it can guess is the much smaller table of answers at the
positions actually queried.
This module shows the two are interchangeable. A proof determines a table by reading it, and conversely any table that satisfies the verifier on every coin string can be realised by an actual proof — take the list long enough to cover every position the verifier could ever ask about, which is a finite maximum since there are finitely many coin strings.
Main definitions #
PCPVerifier.AcceptsWith— acceptance when answers come from a tablePCPVerifier.maxQuery— a bound past every position the verifier can query
Main results #
PCPVerifier.accepts_iff_acceptsWith— a proof is a tablePCPVerifier.exists_proof_of_table— a table is a proofPCPVerifier.Consistent,PCPVerifier.exists_proof_of_consistent_table— a consistent accepted table, indexed by coin string, is a proofPCPVerifier.exists_proof_iff_exists_table— the two are interchangeablePCPVerifier.coinIndex,PCPVerifier.tableOf,PCPVerifier.Witness— the table as a bitstring, in a fixed-stride layoutPCPVerifier.witnessOf,PCPVerifier.tableOf_witnessOf— the witness a proof inducesPCPVerifier.exists_witness_iff— a proof exists exactly when a witness doesPCPVerifier.eventProb_acceptEvent_eq_one_iff— certain acceptance, unfolded
The verifier accepts when the answers are read off the table f.
Equations
- V.AcceptsWith x f ρ = (Complexity.pair (Complexity.pair x ρ) (List.map f (V.positions x ρ)) ∈ V.verdict)
Instances For
Reading a proof gives a table, and acceptance is unchanged.
Realising a table by a proof #
A bound past every position the verifier can query on x with t coins.
Equations
- V.maxQuery t x = (Finset.univ.sup fun (ρ : Fin t → Bool) => List.foldr max 0 (V.positions x (Complexity.BitString.toList ρ))) + 1
Instances For
A table is a proof. A table accepted on every coin string is realised by an honest proof: the list of its values up to the largest position the verifier could query.
Tables indexed by coin string #
A table assigns answers to every coin string. It is consistent when two coin strings that query the same position receive the same answer — the condition a dishonest prover would violate, and the one that lets a table be read back as a single proof.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The position-indexed reading of a table.
Equations
Instances For
On a consistent table the reading returns the recorded answer.
A consistent accepted table is a proof.
The characterisation #
The table a proof induces is consistent: both entries read the same position of the same proof.
Proofs and consistent tables are interchangeable. This is what lets a nondeterministic machine guess a polynomially long table instead of a proof it could never write down.
Encoding a table as a witness #
A canonical index for each coin string: the value of its digits read as a
binary numeral. This is deliberately an explicit equivalence rather than one
obtained from Fintype.equivFinOfCardEq, so that the layout of a witness is
computable — the reduction of a verifier to a CNF formula depends on it.
Equations
Instances For
The coin string with a given index — the inverse of coinIndex.
Equations
- Complexity.PCPVerifier.coinOfIndex c i = (finFunctionFinEquiv.symm c i == 1)
Instances For
The table a witness encodes: the answers for coin string ρ sit in the
slots coinIndex ρ * Q, … of the witness, a fixed stride apart.
Equations
- V.tableOf t Q x w ρ = List.map (fun (i : ℕ) => w.getD (Complexity.PCPVerifier.coinIndex ρ * Q + i) false) (List.range (V.positions x (Complexity.BitString.toList ρ)).length)
Instances For
The witness relation: the encoded table is consistent and accepted on every coin string.
Equations
- V.Witness t Q x w = (V.Consistent t x (V.tableOf t Q x w) ∧ ∀ (ρ : Fin t → Bool), Complexity.pair (Complexity.pair x (Complexity.BitString.toList ρ)) (V.tableOf t Q x w ρ) ∈ V.verdict)
Instances For
A witness yields a proof.
The witness a proof induces: each coin string's answers written into its own stride of the witness.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The witness a proof induces encodes exactly the proof's own answers.
The witness characterisation. A proof exists exactly when a witness
does — and a witness is a bitstring of length 2 ^ t * Q, which is polynomial
when t = O(log n) and Q = O(1).
Certain acceptance is acceptance on every coin string.