Documentation

Complexitylib.Classes.PCP.Defs

Probabilistically checkable proofs: definitions #

PCP r q is the class of languages with a probabilistically checkable proof system: a polynomial-time verifier that, on an input of length n, flips r n coins, reads at most q n bits of a proof string, always accepts a correct proof of a member, and rejects every purported proof of a non-member with probability at least 1/2. This is the class PCP[r(n), q(n)] of Arora–Barak, Definition 11.5, and of https://en.wikipedia.org/wiki/PCP_(complexity): "the class of problems for which a probabilistically checkable proof of a solution can be given, such that the proof can be checked in polynomial time using r(n) bits of randomness and by reading q(n) bits of the proof, correct proofs are always accepted, and incorrect proofs are rejected with probability at least 1/2."

As in Complexitylib.Classes.Interactive, the verifier is machine-free: its two computations are a query-selection function in FP and a verdict language in P, both applied to encoded tuples. The verifier is non-adaptive — the positions it reads are a function of the input and the coins alone, not of earlier answers — which is the standard choice (Arora–Barak, Definition 11.5) and costs only a 2^q blow-up in query count against the adaptive variant.

Main definitions #

Main results #

Conventions #

The verifier uses exactly r n coins, never fewer: a verifier wanting fewer can ignore the surplus, so this loses nothing, and it keeps the coin count a parameter of the class rather than a field the verifier could smuggle non-uniform information into. The query count is an upper bound ≤ q n since the position list is produced by the FP function and carries no hidden information.

The proof is a finite string; a position beyond its end reads as false. This is no restriction, as the verifier's positions are polynomially many bits long, so a proof of length q n · 2 ^ r n suffices, matching the usual convention.

Completeness 1 and soundness 1/2 are hard-wired, following the PCP[r, q] convention rather than the 2/31/3 of Complexitylib.Classes.Randomized.

Verifiers #

A (non-adaptive) PCP verifier: from the encoded input and coins it computes a list of proof positions in polynomial time, and from the input, the coins, and the bits found there it decides in polynomial time.

  • positions : List BoolList BoolList

    The proof positions queried on input x with coins r.

  • positions_mem : fFP, ∀ (x r : List Bool), f (pair x r) = DataEncode.bitstringEncode (self.positions x r)

    That computation is polynomial-time, as a function of pair x r producing the DataEncode bitstring of the position list.

  • verdict : Language

    The verdict, on pair (pair x r) a where a lists the bits read.

  • verdict_mem : self.verdict P

    That verdict is polynomial-time decidable.

Instances For

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

    Equations
    Instances For

      The verifier accepts input x and proof π with coins r.

      Equations
      Instances For
        noncomputable def Complexity.PCPVerifier.acceptEvent (V : PCPVerifier) (t : ) (x π : List Bool) :
        Finset (Fin tBool)

        The coin strings of length t on which V accepts x with proof π.

        Equations
        Instances For

          The verifier reads at most q n bits of the proof on inputs of length n, whatever its coins.

          Equations
          Instances For

            The class #

            def Complexity.PCP (r q : ) :

            PCP[r(n), q(n)]: languages with a polynomial-time verifier using r n random bits and reading at most q n bits of the proof, such that a member has a proof the verifier always accepts, while every proof of a non-member is rejected with probability at least 1/2.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Elementary properties #

              theorem Complexity.P_subset_PCP (r q : ) :
              PPCP r q

              P ⊆ PCP[r, q] for every r and q: the verifier never looks at the proof or its coins.

              theorem Complexity.PCP_mono_queries {r q q' : } (hq : ∀ (n : ), q n q' n) :
              PCP r qPCP r q'

              More queries only enlarge the class.

              Constructible bounds #

              A resource bound is constructible when it can be written out in unary in polynomial time.

              Some such requirement is not optional. PCP r q constrains the verifier but says nothing about r, so without it the union below is not a complexity class at all: Complexitylib.Classes.PCP.Internal.BoundNotConstructible proves that for every set A ⊆ ℕ, computable or not, the language of inputs whose length lies in A satisfies the PCP conditions with r the indicator of A — a bound that is O(1), hence O(log n). That puts continuum-many languages in the union while NP is countable, so the unrestricted equation is false. Textbook statements of the theorem carry the same requirement tacitly, by taking the bounds to be constructible functions.

              Equations
              Instances For