Documentation

Complexitylib.Classes.PH.SipserLautemann.Verdict

Bridging the string computation and the counting definitions #

The amplified verdict is defined by counting blocks of a seed function Fin (k * T) → Bool inside a Finset; the algebra computes with the seed as a string. This file identifies the two views: a block of the string decodes to the corresponding block of the function, so the algebra's unary count is the blockEventCount of the amplification lemmas.

Main results #

theorem Complexity.Lautemann.getD_take_drop (s : List Bool) (a b j : ) (hj : j < b) :
(List.take b (List.drop a s)).getD j false = s.getD (a + j) false

Reading inside a block of a string reads the underlying string.

theorem Complexity.Lautemann.seedOfList_blockAtIdx (T : ) (s : List Bool) (i : ) (t : Fin T) :
seedOfList T (Cobham.blockAtIdx T s i) t = s.getD (i * T + t) false

The block of a decoded seed is the decoding of the block of the string.

theorem Complexity.Lautemann.blocksEquiv_seedOfList (runs T : ) (s : List Bool) (i : Fin runs) :
(blocksEquiv runs T) (seedOfList (runs * T) s) i = seedOfList T (Cobham.blockAtIdx T s i)

The blocks of a decoded long seed are the decodings of its string blocks.

Path acceptance is membership of the decoded choice string in the single-trial accepting event.

theorem Complexity.Lautemann.blockEventCount_seedOfList {T : } (E : Finset (Fin TBool)) (runs : ) (s : List Bool) :
blockEventCount E (seedOfList (runs * T) s) = jFinset.range runs, if seedOfList T (Cobham.blockAtIdx T s j) E then 1 else 0

The block count of a decoded seed is a sum over block indices.

theorem Complexity.Lautemann.blockAtIdx_length (T : ) (s : List Bool) (j runs : ) (hs : s.length = runs * T) (hj : j < runs) :

Inside a seed of exactly runs blocks, every block is full.

theorem Complexity.Lautemann.acceptCountAux_length_eq {k : } (tm : NTM k) (u x τ s ρ : List Bool) (runs : ) ( : ρ.length = runs) (hs : s.length = runs * τ.length) (hu : x.length + τ.length + Fintype.card tm.Q + 3 u.length) :

The algebra's count is the amplification lemmas' block count.

theorem Complexity.Lautemann.majorityFlag_eq_true_iff' {k : } (tm : NTM k) (u x τ s ρ : List Bool) (runs : ) ( : ρ.length = runs) (hs : s.length = runs * τ.length) (hu : x.length + τ.length + Fintype.card tm.Q + 3 u.length) :

The algebra's majority flag is the amplified majority verdict.

The shift action #

theorem Complexity.Lautemann.getD_padTo (σ b : List Bool) (j : ) (hj : j < σ.length) :
(padTo σ b).getD j false = b.getD j false

Reading inside a padded block reads the block.

theorem Complexity.Lautemann.seedOfList_xorSuffix (m : ) (r blk : List Bool) (hr : r.length = m) (hblk : blk.length = m) :

The decoded exclusive-or is the shift action on decoded seeds.

theorem Complexity.Lautemann.seedOfList_padTo_block (t m : ) (σ w : List Bool) ( : σ.length = m) (i : Fin t) :
seedOfList m (padTo σ (Cobham.blockAtIdx m w i)) = shiftsOfList t m w i

The decoded padded block is the decoded shift vector.

The rulers #

noncomputable def Complexity.Lautemann.clockStr (pt : Polynomial ) (q : ) (x : List Bool) :

The clock string for the path simulations: long enough for every block.

Equations
Instances For
    noncomputable def Complexity.Lautemann.runsStr (pt : Polynomial ) (x : List Bool) :

    The ruler whose length is the number of amplification trials.

    Equations
    Instances For
      noncomputable def Complexity.Lautemann.seedStr (pt : Polynomial ) (x : List Bool) :

      The ruler whose length is the amplified seed length.

      Equations
      Instances For

        The ruler whose length is the number of shifts.

        Equations
        Instances For

          The verdict as an algebra function #

          noncomputable def Complexity.Lautemann.matrixFn {k : } (tm : NTM k) (pt : Polynomial ) (b : Bool) (z : List Bool) :

          The matrix verdict, computed from the decoded components with the rulers above: check the seed's length, then take the disjunction over shift blocks of the amplified majority verdict.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem Complexity.Lautemann.verdictFlag_shift_iff {k : } (tm : NTM k) (pt : Polynomial ) (b : Bool) (x w r : List Bool) (hr : r.length = ampRuns (fun (x : ) => Polynomial.eval x pt) x.length * Polynomial.eval x.length pt) (i : Fin (ampShifts (fun (x : ) => Polynomial.eval x pt) x.length)) :

            The per-shift verdict is the amplified majority at that shift.

            theorem Complexity.Lautemann.matrixFn_eq {k : } (tm : NTM k) (pt : Polynomial ) (b : Bool) (z : List Bool) :
            matrixFn tm pt b z = [matrixVerdict tm (fun (x : ) => Polynomial.eval x pt) b z]

            The algebra function computes the matrix verdict.

            Membership in the algebra #

            theorem Complexity.Lautemann.fstBlock_cobham {n : } {g : (Fin nList Bool)List Bool} (hg : Cobham g) :
            Cobham fun (v : Fin nList Bool) => pairFst (g v)

            The pair decoders are in the algebra, being polynomial-time.

            theorem Complexity.Lautemann.sndBlock_cobham {n : } {g : (Fin nList Bool)List Bool} (hg : Cobham g) :
            Cobham fun (v : Fin nList Bool) => pairSnd (g v)
            theorem Complexity.Lautemann.clockStr_mem {n : } (pt : Polynomial ) (q : ) {g : (Fin nList Bool)List Bool} (hg : Cobham g) :
            Cobham fun (v : Fin nList Bool) => clockStr pt q (g v)
            theorem Complexity.Lautemann.runsStr_mem {n : } (pt : Polynomial ) {g : (Fin nList Bool)List Bool} (hg : Cobham g) :
            Cobham fun (v : Fin nList Bool) => runsStr pt (g v)
            theorem Complexity.Lautemann.seedStr_mem {n : } (pt : Polynomial ) {g : (Fin nList Bool)List Bool} (hg : Cobham g) :
            Cobham fun (v : Fin nList Bool) => seedStr pt (g v)
            theorem Complexity.Lautemann.shiftStr_mem {n : } (pt : Polynomial ) {g : (Fin nList Bool)List Bool} (hg : Cobham g) :
            Cobham fun (v : Fin nList Bool) => shiftStr pt (g v)
            theorem Complexity.Lautemann.matrixFn_mem {k : } (tm : NTM k) (pt : Polynomial ) (b : Bool) :
            Cobham fun (v : Fin 1List Bool) => matrixFn tm pt b (v 0)

            The matrix verdict is in the algebra.

            theorem Complexity.Lautemann.matrixVerdict_mem_FP {k : } (tm : NTM k) (pt : Polynomial ) (b : Bool) :
            (fun (z : List Bool) => [matrixVerdict tm (fun (x : ) => Polynomial.eval x pt) b z]) FP

            The matrix verdict is polynomial-time computable.