Documentation

Complexitylib.Classes.PCP.Internal.SquareVerifier

Running a verifier twice #

Dinur's amplification leaves a constant gap, which need not be as large as the one half the PCP classes ask for. Independent repetition closes that: two runs on independent coins reject a non-member with probability 1 - (1 - s)², and repeating the doubling a constant number of times drives the error below any threshold.

The coin string of the doubled verifier is split by the per-run coin count, a function of the input length, rather than by halving the string. That keeps the split point polynomial-time computable from the input alone, which is what the positions and verdict conditions need.

Main definitions #

Main results #

The coins of the first run.

Equations
Instances For

    The coins of the second run.

    Equations
    Instances For

      The queries of two independent runs, one after the other.

      Equations
      Instances For

        The input, out of a verdict argument pair (pair x ρ) a.

        Equations
        Instances For

          The coins, out of a verdict argument.

          Equations
          Instances For

            The answers, out of a verdict argument.

            Equations
            Instances For

              The verdict of the doubled verifier: both runs accept. The answers of the first run are the first |positions| of them.

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

                The pieces are polynomial time #

                theorem Complexity.PCPVerifier.fstCoinsFn_mem_FP {t : } (ht : (fun (x : List Bool) => List.replicate (t x.length) true) FP) {a b : List BoolList Bool} (ha : a FP) (hb : b FP) :
                (fun (z : List Bool) => fstCoins t (a z) (b z)) FP
                theorem Complexity.PCPVerifier.sndCoinsFn_mem_FP {t : } (ht : (fun (x : List Bool) => List.replicate (t x.length) true) FP) {a b : List BoolList Bool} (ha : a FP) (hb : b FP) :
                (fun (z : List Bool) => sndCoins t (a z) (b z)) FP
                theorem Complexity.PCPVerifier.sqPositions_mem {V : PCPVerifier} {t : } {f : List BoolList Bool} (ht : (fun (x : List Bool) => List.replicate (t x.length) true) FP) (hf : f FP) (hfspec : ∀ (x rr : List Bool), f (pair x rr) = DataEncode.bitstringEncode (V.positions x rr)) :
                gFP, ∀ (x ρ : List Bool), g (pair x ρ) = DataEncode.bitstringEncode (V.sqPositions t x ρ)

                The doubled verifier's query list is polynomial-time computable.

                theorem Complexity.PCPVerifier.sqVerdict_mem_P {V : PCPVerifier} {t : } {f : List BoolList Bool} (ht : (fun (x : List Bool) => List.replicate (t x.length) true) FP) (hf : f FP) (hfspec : ∀ (x rr : List Bool), f (pair x rr) = DataEncode.bitstringEncode (V.positions x rr)) :

                The doubled verifier's verdict is polynomial-time decidable.

                noncomputable def Complexity.PCPVerifier.squareAt (V : PCPVerifier) (t : ) (ht : (fun (x : List Bool) => List.replicate (t x.length) true) FP) :

                Two independent runs, as a verifier in its own right.

                Equations
                Instances For
                  @[simp]
                  theorem Complexity.PCPVerifier.positions_squareAt (V : PCPVerifier) (t : ) (ht : (fun (x : List Bool) => List.replicate (t x.length) true) FP) (x ρ : List Bool) :
                  (V.squareAt t ht).positions x ρ = V.sqPositions t x ρ

                  Splitting the coin string #

                  What the doubled verifier accepts #

                  theorem Complexity.PCPVerifier.accepts_squareAt (V : PCPVerifier) (t : ) (ht : (fun (x : List Bool) => List.replicate (t x.length) true) FP) (x π ρ : List Bool) :
                  (V.squareAt t ht).Accepts x π ρ V.Accepts x π (fstCoins t x ρ) V.Accepts x π (sndCoins t x ρ)
                  theorem Complexity.PCPVerifier.acceptEvent_squareAt (V : PCPVerifier) (t : ) (ht : (fun (x : List Bool) => List.replicate (t x.length) true) FP) (x π : List Bool) {T : } (hT : t x.length = T) :
                  (V.squareAt t ht).acceptEvent (T + T) x π = {ρ : Fin (T + T)Bool | V.Accepts x π (BitString.toList (blockFst T T ρ)) V.Accepts x π (BitString.toList (blockSnd T T ρ))}
                  theorem Complexity.PCPVerifier.eventProb_acceptEvent_squareAt (V : PCPVerifier) (t : ) (ht : (fun (x : List Bool) => List.replicate (t x.length) true) FP) (x π : List Bool) {T : } (hT : t x.length = T) :
                  eventProb ((V.squareAt t ht).acceptEvent (T + T) x π) = eventProb (V.acceptEvent T x π) * eventProb (V.acceptEvent T x π)

                  Amplifying the class #

                  def Complexity.PCPWith (r q : ) (s : ) :

                  The PCP class with an explicit soundness error.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    theorem Complexity.PCPWith_half (r q : ) :
                    PCPWith r q (1 / 2) = PCP r q
                    theorem Complexity.PCPWith_square {r q : } {s : } (hs : 0 s) (hr : (fun (x : List Bool) => List.replicate (r x.length) true) FP) {L : Language} (hL : L PCPWith r q s) :
                    L PCPWith (fun (n : ) => r n + r n) (fun (n : ) => q n + q n) (s * s)

                    Two runs square the error, at twice the randomness and twice the queries.

                    Driving the error below one half #

                    theorem Complexity.PCPWith_congr {r r' q q' : } {s : } (hr : ∀ (n : ), r n = r' n) (hq : ∀ (n : ), q n = q' n) :
                    PCPWith r q s = PCPWith r' q' s
                    theorem Complexity.PCPWith_mono {r q : } {s s' : } (h : s s') :
                    PCPWith r q sPCPWith r q s'
                    theorem Complexity.constructible_double {r : } (hr : (fun (x : List Bool) => List.replicate (r x.length) true) FP) :
                    (fun (x : List Bool) => List.replicate (r x.length + r x.length) true) FP
                    theorem Complexity.PCPWith_iterate (j : ) {r q : } {s : } :
                    0 s(fun (x : List Bool) => List.replicate (r x.length) true) FP∀ {L : Language}, L PCPWith r q sL PCPWith (fun (n : ) => 2 ^ j * r n) (fun (n : ) => 2 ^ j * q n) (s ^ 2 ^ j)

                    Repeated doubling. After j doublings the error is s ^ (2 ^ j).

                    theorem Complexity.mem_PCP_of_PCPWith {r q : } {s : } (hs0 : 0 s) (hs1 : s < 1) (hr : (fun (x : List Bool) => List.replicate (r x.length) true) FP) {L : Language} (hL : L PCPWith r q s) :
                    ∃ (j : ), L PCP (fun (n : ) => 2 ^ j * r n) fun (n : ) => 2 ^ j * q n

                    Any error below one can be driven under one half.