Documentation

Complexitylib.Classes.PCP.Internal.ListEncode

Writing out a list of encoded entries #

The encoding of a list is its entries' encodings run together inside one pair of brackets. So a machine that can produce each entry's encoding can produce the list's, by accumulating them in a loop.

The loop is iterate_mem_FP, and the state carries the accumulated bits, the counter, and the input the entries are read from.

Main definitions #

Main results #

One step: append the next entry's encoding and advance the counter. The state is pair (pair accumulated counter) input.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    def Complexity.entryCat (E : List BoolList Bool) (x : List Bool) (n : ) :

    The bits the loop has accumulated after n steps.

    Equations
    Instances For
      @[simp]
      theorem Complexity.entryCat_zero (E : List BoolList Bool) (x : List Bool) :
      entryCat E x 0 = []
      theorem Complexity.entryCat_succ (E : List BoolList Bool) (x : List Bool) (n : ) :
      entryCat E x (n + 1) = entryCat E x n ++ E (pair x (List.replicate n true))
      theorem Complexity.listStep_iterate (E : List BoolList Bool) (x : List Bool) (n : ) :

      What the loop accumulates.

      The accumulation is the encoding. If each step writes the encoding of the corresponding entry, the loop writes the inner part of the list's own encoding.

      theorem Complexity.length_entryCat_le (E : List BoolList Bool) (x : List Bool) (b n : ) :
      (∀ i < n, (E (pair x (List.replicate i true))).length b)(entryCat E x n).length n * b

      The loop as one function #

      noncomputable def Complexity.listEncFn (E : List BoolList Bool) (z : List Bool) :

      The list encoder, on pair (unary count) input.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Complexity.listEncFn_mem_FP {E : List BoolList Bool} (hE : E FP) (p : Polynomial ) (hbound : ∀ (z : List Bool), k(pairFst z).length, ((listStep E)^[k] (pair (pair [] []) (pairSnd z))).length Polynomial.eval z.length p) :

        The loop writes the list's encoding.