Documentation

Complexitylib.Classes.PCP.Internal.PosScan

Reading a verifier's query list #

A PCPVerifier hands over its query positions only as an encoded list — that is what positions_mem provides, and it is all a polynomial-time algorithm can have, since a single position may be astronomically large. This module reads individual entries back out of that encoding with the bracket scan.

Two facts make the reading enough for everything downstream. A position is recovered as its own serialization, so two positions can be compared by comparing strings, with no arithmetic on the values; and an index past the end of the list is recognisable, because every serialization is non-empty.

Main definitions #

Main results #

The serialized entries of an encoded list, with the outer brackets removed: the string the scan consumes.

Equations
Instances For
    theorem Complexity.posInner_mem_FP {a : List BoolList Bool} (ha : a FP) :
    (fun (z : List Bool) => posInner (a z)) FP
    noncomputable def Complexity.posAt (e : List Bool) (i : ) :

    The i-th entry of an encoded list, as its own serialization.

    Equations
    Instances For
      noncomputable def Complexity.posCount (e : List Bool) :

      How many entries an encoded list has, in unary.

      Equations
      Instances For
        theorem Complexity.posAt_mem_FP {a b : List BoolList Bool} (ha : a FP) (hb : b FP) :
        (fun (z : List Bool) => posAt (b z) (a z).length) FP
        theorem Complexity.posCount_mem_FP {b : List BoolList Bool} (hb : b FP) :
        (fun (z : List Bool) => posCount (b z)) FP

        What the scan reads #

        theorem Complexity.posAt_eq_nil {α : Type} [DataEncode α] {l : List α} {i : } (h : l.length i) :
        theorem Complexity.posAt_ne_nil {α : Type} [DataEncode α] {l : List α} {i : } (h : i < l.length) :

        Concatenating encoded lists. The encoding of an append is the two inner parts, one after the other, inside a fresh pair of brackets.

        theorem Complexity.posAt_eq_iff {α : Type} [DataEncode α] {l l' : List α} {i i' : } (h : i < l.length) (h' : i' < l'.length) :

        Comparing entries compares positions. The scan returns each entry's own serialization, and that serialization determines the entry.