Robustness of the PCP class definition (Arora–Barak Chapter 18, Problems §1–§2) #
Cslib.Complexity.PCPWith c s r q enc generalizes Cslib.Complexity.PCP r q enc to arbitrary
real completeness threshold c ("accept with probability ≥ c") and soundness threshold s
("accept with probability ≤ s"), leaving PCP definitionally unchanged and satisfying
PCPWith 1 (1 / 2) r q enc = PCP r q enc (Cslib.Complexity.PCPWith_one_half).
- Arbitrary soundness constant (
Cslib.Complexity.PCPWith_one, Arora–Barak Ch. 18 Problem 1): for allr q : ℕ → ℕand every constant0 < s < 1,PCPWith 1 s r q enc = PCP r q enc. Independentk-fold repetition (Cslib.Complexity.PCPVerifier.repeatAll) multiplies the number of random bits and queries bykand raises the acceptance probability to thek-th power (Cslib.Complexity.PCPVerifier.acceptProb_repeatAll). Because a verifier's binary coin countV.coins amay exceed the length of a malformed random stringρwhenris superpolynomial,PCPVerifier.repeatRowWidthcaps the per-round row width byρ.length; on every valid random string of lengthk * V.coins a(k ≥ 1) this cap equalsV.coins a. - Imperfect completeness at logarithmic randomness and constant query complexity
(
Cslib.Complexity.PCPWith_log_const, Arora–Barak Ch. 18 Problem 2, corrected): as printed in Arora and Barak ("completenessc > 1 / 2does not changePCP(r, q)" for allr, q), the claim would implyBPP = coRPatq ≡ 0and polynomialr. Under logarithmic randomnessr(n) = ⌊log₂ n⌋ + 1, every completeness thresholdc > 1 / 2and arbitrary query boundqlies inNP(Cslib.Complexity.PCPWith_log_subset_NP) by counting accepted random words on a first-occurrence query table (PCPVerifier.tableAcceptCount,PCPVerifier.majorityTableVerifier). Combining with the PCP theorem (Cslib.Complexity.NP_eq_PCP_log) givesPCPWith c (1 / 2) (fun n => Nat.log 2 n + 1) (fun _ => q) enc = PCP (fun n => Nat.log 2 n + 1) (fun _ => q) encfor every constantq ≥ 1and1 / 2 < c ≤ 1.
Main definitions #
Cslib.Complexity.PCPVerifier.acceptCount,Cslib.Complexity.PCPVerifier.acceptProb: the number and fraction of random strings of lengthV.coins aon whichVaccepts(a, π).Cslib.Complexity.IsPCPVerifierWith,Cslib.Complexity.PCPWith: PCP verifiers and complexity classes parameterized by completenesscand soundnesss.Cslib.Complexity.PCPVerifier.repeatRowWidth,Cslib.Complexity.PCPVerifier.repeatQueries,Cslib.Complexity.PCPVerifier.repeatAll: polynomial-timek-fold independent repetition of a nonadaptive PCP verifier.Cslib.Complexity.PCPVerifier.tableAcceptCount,Cslib.Complexity.PCPVerifier.majorityTableVerifier: threshold table verification over all2 ^ V.coins arandom strings.
Main results #
Cslib.Complexity.PCPVerifier.getD_answers_idxOf: first-occurrence lookup inanswers π addressesrecoversπ.getD addr false.Cslib.Complexity.isPCPVerifierWith_one_half_iff,Cslib.Complexity.PCPWith_one_half:PCPWith 1 (1 / 2) r q enc = PCP r q enc.Cslib.Complexity.PCPVerifier.polyTime_repeatAll,Cslib.Complexity.PCPVerifier.acceptProb_repeatAll,Cslib.Complexity.IsPCPVerifierWith.repeatAll,Cslib.Complexity.PCPWith_subset_repeatAll:k-fold repetition preserves polynomial time and raises completeness and soundness to thek-th power.Cslib.Complexity.PCPWith_one:PCPWith 1 s r q enc = PCP r q encfor0 < s < 1(Arora–Barak Ch. 18 Problem 1).Cslib.Complexity.PCPVerifier.isPolyTime_majorityTableVerifier,Cslib.Complexity.IsPCPVerifierWith.mem_iff_exists_majorityTableVerifier,Cslib.Complexity.PCPWith_log_subset_NP: logarithmic-randomness PCP with completenessc > 1 / 2and soundness1 / 2is contained inNP.Cslib.Complexity.PCP_log_const,Cslib.Complexity.PCPWith_log_const:PCPWith c (1 / 2) (fun n => Nat.log 2 n + 1) (fun _ => q) enc = PCP (fun n => Nat.log 2 n + 1) (fun _ => q) encfor1 / 2 < c ≤ 1and1 ≤ q(Arora–Barak Ch. 18 Problem 2, corrected).
References #
The number of random strings of length V.coins a on which V accepts (a, π).
The acceptance probability of V on instance a and proof π over a uniform random string of
length V.coins a.
V.acceptProb a π is the real probability that V.accepts a π returns true under
BitString.uniformList (V.coins a).
Every random string of length V.coins a is accepted if and only if V.acceptCount a π
equals 2 ^ V.coins a.
Acceptance probability at least 1 is equivalent to accepting every random string of length
V.coins a.
Acceptance probability at most 1 / 2 is equivalent to 2 * V.acceptCount a π ≤ 2 ^ V.coins a.
V is a verifier for A with completeness c ∈ ℝ and soundness s ∈ ℝ, using at most
r n random bits and at most q n queries on instances whose encoding has length n:
every member of A has a proof accepted with probability at least c, and for every non-member,
every proof is accepted with probability at most s over a uniform random string of length
V.coins a.
At most
r nrandom bits on an instance whose encoding has lengthn.- length_queries_le (a : α) (ρ : List Bool) : ρ.length = V.coins a → (V.queries (a, ρ)).length ≤ q (enc a).length
At most
q nqueries on an instance whose encoding has lengthn. Completeness: every member of
Ahas a proof accepted with probability at leastc.Soundness: on a non-member, every proof is accepted with probability at most
s.
The class PCP_{c, s}(r, q) with respect to the encoding enc of instances: the problems with
a polynomial-time verifier with completeness c and soundness s using O(r n) random bits and
O(q n) queries on instances whose encoding has length n
Arora and Barak, Chapter 18, Problems §1–§2.
At completeness 1 and soundness 1 / 2, IsPCPVerifierWith is equivalent to
IsPCPVerifier.
Independent repetition and Arora–Barak Chapter 18, Problem 1 #
The per-round coin width on (a, ρ), capped by ρ.length so that malformed short random
strings never pad beyond the input length. On any valid random string of length k * V.coins a
(k ≥ 1), this equals V.coins a.
All proof addresses queried across k independent rounds on (a, ρ).
Independent k-fold repetition of a nonadaptive PCP verifier V: runs k independent trials
using disjoint coin blocks of width V.coins a and accepts when all k trials accept. Repeated
proof queries across or within trials are resolved consistently via first-occurrence lookup in
V.repeatQueries k.
If each valid single-round query list has length at most B, then k repetitions on a random
string of length k * V.coins a make at most k * B queries.
First-occurrence lookup in V.repeatQueries k recovers each trial's individual verdict.
On any random string of length k * V.coins a, V.repeatAll k accepts iff every coin block
of width V.coins a accepts.
Independent k-fold repetition raises the acceptance probability to the k-th power.
Independent k-fold repetition transforms a (c, s)-verifier with bounds (r, q) into a
(c ^ k, s ^ k)-verifier with bounds (k * r, k * q).
Threshold table verification and Arora–Barak Chapter 18, Problem 2 (corrected) #
Number of random words of length V.coins input.1 on which V accepts using the bit at each
queried address's first occurrence in V.queryTable input.1.
A genuine proof supplies a table whose accepted-word count is V.acceptCount a proof;
trailing padding is ignored.
Every bit table has the exact same accepted-word count as its expanded proof
V.proofOfTable a table.
Exhaustively check whether strictly more than half of the random words of length
V.coins input.1 accept using the bit at each address's first table occurrence.
A proof with acceptance probability strictly above 1 / 2 makes V.majorityTableVerifier
accept its query table with arbitrary trailing padding.
Counting accepted random words on a table is polynomial-time under a logarithmic coin bound.
Majority table verification is polynomial-time under a logarithmic coin bound.
For any (c, 1 / 2)-PCP verifier of A with c > 1 / 2, an instance a is in A if and
only if some table makes V.majorityTableVerifier accept.
Arora and Barak, Chapter 18, Problem 2 (corrected): for every constant q ≥ 1 and
completeness threshold 1 / 2 < c ≤ 1,
PCPWith c (1 / 2) (fun n => Nat.log 2 n + 1) (fun _ => q) enc = PCP (fun n => Nat.log 2 n + 1) (fun _ => q) enc.