Documentation

CslibFrontier.Computability.Complexity.Classes.PCP

The classes PCP(r, q) #

A probabilistically checkable proof system for a problem A Arora and Safra, Arora and Barak, Chapter 11 is a verifier that, on an instance a, reads a random string ρ, computes from a and ρ a list of positions in a proof π, reads the bits of π at those positions, and accepts or rejects. Every member of A has a proof that is accepted for every random string (completeness), and for a non-member every proof is rejected for at least half of the random strings (soundness).

A verifier (PCPVerifier) consists of three functions: the number of random bits it uses on an instance, the positions it queries, and its verdict on the instance, the random string and the bits read. It is nonadaptive, as in Arora and Barak: the positions depend on the instance and the random string, not on the bits read. A proof is a finite string, and a position past its end reads as false. The verifier is polynomial-time (PCPVerifier.PolyTime) when all three functions are computable in polynomial time, the numbers in binary. Time is measured in the length of the whole input of each function, which includes the random string; when r is bounded by a polynomial, as for all the usual classes, this is time polynomial in the length of the encoded instance.

PCP r q enc follows Arora and Barak in allowing constant factors: a problem is in it when, for some constants c and d, a polynomial-time verifier uses at most c * r n random bits and at most d * q n queries on instances whose encoding has length n. The verifier computes the number of random bits it uses itself, and r only bounds it. (If the verifier were handed exactly c * r n random bits, an uncomputable r could smuggle information into the length of the random string and put undecidable problems into the class.)

The PCP theorem, NP = PCP(log n, 1), is proved as Cslib.Complexity.NP_eq_PCP_log in Computability/PCP/Completeness, whose module documentation outlines the proof and names its stages in Cslib.PCP.

Main definitions #

Main results #

References #

A nonadaptive verifier of probabilistically checkable proofs for instances of type α.

  • coins : α → ℕ

    The number of random bits used on an instance.

  • queries : α × List Bool → List ℕ

    The positions of the proof read on an instance and a random string.

  • verdict : (α × List Bool) × List Bool → Bool

    The verdict on an instance, a random string, and the bits read at the queried positions.

The bits of the proof π at the positions is; a position past the end of π reads as false.

Reading every position of a proof below its length recovers the proof.

def Cslib.Complexity.PCPVerifier.accepts {α : Type} (V : PCPVerifier α) (a : α) (π ρ : List Bool) :

The verdict of V on the instance a with the proof π and the random string ρ.

A verifier is polynomial-time, with respect to the encoding enc of instances, when its number of random bits, its queries and its verdict are computable in polynomial time, the numbers in binary.

structure Cslib.Complexity.IsPCPVerifier {α : Type} (enc : α ↪ List Bool) (r q : ℕ → ℕ) (V : PCPVerifier α) (A : Set α) :

V is a verifier for A 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 that is accepted for every random string, and for every non-member, every proof is accepted for at most half of the random strings. The random strings on an instance a are those of length V.coins a.

def Cslib.Complexity.PCP {α : Type} (r q : ℕ → ℕ) (enc : α ↪ List Bool) :
Set (Set α)

The class PCP(r, q) with respect to the encoding enc of instances: the problems with a polynomial-time verifier using O(r n) random bits and O(q n) queries on instances whose encoding has length n Arora and Safra, Arora and Barak, Chapter 11.

theorem Cslib.Complexity.mem_PCP {α : Type} {enc : α ↪ List Bool} {r q : ℕ → ℕ} {A : Set α} :
A ∈ PCP r q enc ↔ ∃ (V : PCPVerifier α) (c : ℕ) (d : ℕ), PCPVerifier.PolyTime enc V ∧ IsPCPVerifier enc (fun (n : ℕ) => c * r n) (fun (n : ℕ) => d * q n) V A
theorem Cslib.Complexity.IsPCPVerifier.mono_randomness {α : Type} {enc : α ↪ List Bool} {r r' q : ℕ → ℕ} {V : PCPVerifier α} {A : Set α} (hr : ∀ (n : ℕ), r n ≤ r' n) (h : IsPCPVerifier enc r q V A) :
IsPCPVerifier enc r' q V A
theorem Cslib.Complexity.IsPCPVerifier.mono_queries {α : Type} {enc : α ↪ List Bool} {r q q' : ℕ → ℕ} {V : PCPVerifier α} {A : Set α} (hq : ∀ (n : ℕ), q n ≤ q' n) (h : IsPCPVerifier enc r q V A) :
IsPCPVerifier enc r q' V A
theorem Cslib.Complexity.PCP_mono_randomness {α : Type} {enc : α ↪ List Bool} {r r' q : ℕ → ℕ} (hr : ∀ (n : ℕ), r n ≤ r' n) :
PCP r q enc ⊆ PCP r' q enc

More randomness gives a larger class.

theorem Cslib.Complexity.PCP_mono_queries {α : Type} {enc : α ↪ List Bool} {r q q' : ℕ → ℕ} (hq : ∀ (n : ℕ), q n ≤ q' n) :
PCP r q enc ⊆ PCP r q' enc

More queries give a larger class.