Documentation

Complexitylib.Classes.PCP.Internal.AlgKilled

The killed walk, as an algorithm #

The walk length and the killing denominator are constants of a round, so the walk is a constant-depth unrolling of the preprocessed rotation map, and the stopping index is chosen by a constant-depth chain of comparisons.

Main definitions #

Main results #

theorem Complexity.ConstraintGraph.mem_cloudCodes_lt {α : Type} (G : ConstraintGraph α) {u : Fin G.numVerts} {c : } (h : c G.cloudCodes u) :
c < 2 * G.numEdges

Every code in a cloud is below twice the edge count.

theorem Complexity.ConstraintGraph.preRotNum_fst_lt {α : Type} [DecidableEq α] (G : ConstraintGraph α) (E : ExpanderFamily) {v : } (hv : v < 2 * G.numEdges) (d : ) :
(G.preRotNum E v d).1 < 2 * G.numEdges

The rotation map keeps a vertex number in range.

theorem Complexity.ConstraintGraph.walkNum_lt {α : Type} [DecidableEq α] (G : ConstraintGraph α) (E : ExpanderFamily) {v : } (hv : v < 2 * G.numEdges) (s k : ) :
G.walkNum E s k v < 2 * G.numEdges

A walk stays in range.

The preprocessed graph has 2 + 2 · deg darts at a vertex.

Choosing by a unary key #

noncomputable def Complexity.selectAt (f : List BoolList Bool) (key : List BoolList Bool) :

Choose among n + 1 functions by a unary key.

Equations
Instances For
    theorem Complexity.selectAt_mem_FP {f : List BoolList Bool} {key : List BoolList Bool} (hf : ∀ (k : ), f k FP) (hkey : key FP) (n : ) :
    selectAt f key n FP
    theorem Complexity.selectAt_eq {f : List BoolList Bool} {key : List BoolList Bool} {z : List Bool} {m : } (hkey : key z = List.replicate m true) {n : } :
    m nselectAt f key n z = f m z

    Walking #

    noncomputable def Complexity.walkFn (F : FinBase) (pol : Polynomial ) (deg P : ) :

    The vertex a walk reaches after k steps, on pair (graph) (pair (unary vertex) (unary steps)).

    Equations
    Instances For
      theorem Complexity.walkFn_mem_FP (F : FinBase) (pol : Polynomial ) (deg P k : ) :
      walkFn F pol deg P k FP
      theorem Complexity.walkFn_eq {α : Type} [Fintype α] [DecidableEq α] (F : FinBase) (pol : Polynomial ) (hd : 1 < F.deg) (G : ConstraintGraph α) (v s : ) (hv : v < 2 * G.numEdges) (hpc : ∀ (u : Fin G.numVerts), F.fitLevel hd (G.cloudList u).length Polynomial.eval (G.cloudList u).length pol) (hpe : F.fitLevel hd (2 * G.numEdges) Polynomial.eval (2 * G.numEdges) pol) (k : ) :

      The walk algorithm computes the walk.

      Where the walk stops #

      theorem Complexity.findIdx_map {β γ : Type} (f : βγ) (p : γBool) (l : List β) :
      List.findIdx p (List.map f l) = List.findIdx (fun (x : β) => p (f x)) l
      def Complexity.stopFromNum (q c : ) :

      The first zero digit at or after i, among the next n digits.

      Equations
      Instances For
        theorem Complexity.stopFromNum_eq_findIdx (q c n i : ) :
        stopFromNum q c i n = i + List.findIdx (fun (j : Fin n) => c / q ^ (i + j) % q == 0) (List.finRange n)
        noncomputable def Complexity.stopFn (q : ) (co : List BoolList Bool) :
        List BoolList Bool

        Where the walk stops, from a unary reading co of the coins.

        Equations
        Instances For
          theorem Complexity.stopFn_mem_FP {q : } {co : List BoolList Bool} (hco : co FP) (n i : ) :
          stopFn q co i n FP
          theorem Complexity.stopFn_eq {q : } (hq : 0 < q) {co : List BoolList Bool} {z : List Bool} {c : } (hco : co z = List.replicate c true) (n i : ) :
          stopFn q co i n z = List.replicate (stopFromNum q c i n) true

          The stopping algorithm finds the stopping index.

          The dart the walk comes back by #

          noncomputable def Complexity.backFn (F : FinBase) (pol : Polynomial ) (deg P i : ) (w : List Bool) :

          The label the walk's i-th step points back along.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem Complexity.backFn_mem_FP (F : FinBase) (pol : Polynomial ) (deg P i : ) :
            backFn F pol deg P i FP
            theorem Complexity.backFn_eq {α : Type} [Fintype α] [DecidableEq α] {F : FinBase} {pol : Polynomial } (hd : 1 < F.deg) (G : ConstraintGraph α) (v s i : ) (hv : v < 2 * G.numEdges) (hpc : ∀ (u : Fin G.numVerts), F.fitLevel hd (G.cloudList u).length Polynomial.eval (G.cloudList u).length pol) (hpe : F.fitLevel hd (2 * G.numEdges) Polynomial.eval (2 * G.numEdges) pol) :
            backFn F pol (F.toFamily hd).degree (G.preDeg (F.toFamily hd)) i (pair (encGraph G) (pair (List.replicate v true) (List.replicate s true))) = List.replicate (G.preRotNum (F.toFamily hd) (G.walkNum (F.toFamily hd) s i v) (s / G.preDeg (F.toFamily hd) ^ i % G.preDeg (F.toFamily hd))).2 true

            The back-label algorithm reads the label off the rotation map.

            noncomputable def Complexity.revSum (F : FinBase) (pol : Polynomial ) (deg P k : ) :

            The reversed dart's digits, for a fixed stopping index k, over the first n places.

            Equations
            • One or more equations did not get rendered due to their size.
            • Complexity.revSum F pol deg P k 0 x✝ = []
            Instances For
              theorem Complexity.revSum_mem_FP (F : FinBase) (pol : Polynomial ) (deg P k n : ) :
              revSum F pol deg P k n FP
              theorem Complexity.length_revSum {α : Type} [Fintype α] [DecidableEq α] {F : FinBase} {pol : Polynomial } (hd : 1 < F.deg) (G : ConstraintGraph α) (v s k : ) (hv : v < 2 * G.numEdges) (hpc : ∀ (u : Fin G.numVerts), F.fitLevel hd (G.cloudList u).length Polynomial.eval (G.cloudList u).length pol) (hpe : F.fitLevel hd (2 * G.numEdges) Polynomial.eval (2 * G.numEdges) pol) (n : ) :
              (revSum F pol (F.toFamily hd).degree (G.preDeg (F.toFamily hd)) k n (pair (encGraph G) (pair (List.replicate v true) (List.replicate s true)))).length = jFinset.range n, (if j < k then (G.preRotNum (F.toFamily hd) (G.walkNum (F.toFamily hd) s (k - 1 - j) v) (s / G.preDeg (F.toFamily hd) ^ (k - 1 - j) % G.preDeg (F.toFamily hd))).2 else s / G.preDeg (F.toFamily hd) ^ j % G.preDeg (F.toFamily hd)) * G.preDeg (F.toFamily hd) ^ j

              The digit sum has the reversed dart's number as its length.

              noncomputable def Complexity.ConstraintGraph.revAtNum {α : Type} [DecidableEq α] (G : ConstraintGraph α) (E : ExpanderFamily) (T k v s : ) :

              The reversed dart's number, for a fixed stopping index.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                theorem Complexity.ConstraintGraph.killedRevNum_eq_revAtNum {α : Type} [DecidableEq α] (G : ConstraintGraph α) (E : ExpanderFamily) (T q v s c : ) :
                G.killedRevNum E T q v s c = G.revAtNum E T (stopAtNum T q c) v s

                The powered graph's rotation map #

                noncomputable def Complexity.coinsOf (q T : ) (z : List Bool) :

                The coins of a killed dart.

                Equations
                Instances For
                  noncomputable def Complexity.toWalk (q T : ) (z : List Bool) :

                  A killed dart's steps, in the walk's input format.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    noncomputable def Complexity.revNumFn (F : FinBase) (pol : Polynomial ) (deg P T q : ) (z : List Bool) :

                    The dart a killed walk comes back by, on pair (graph) (pair (unary vertex) (unary dart)).

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      theorem Complexity.revNumFn_mem_FP (F : FinBase) (pol : Polynomial ) (deg P T q : ) :
                      revNumFn F pol deg P T q FP
                      noncomputable def Complexity.killedRotFn (F : FinBase) (pol : Polynomial ) (deg P T q : ) (z : List Bool) :

                      The powered graph's rotation map, on pair (graph) (pair (unary vertex) (unary dart)): walk to the end, come back by the reversed labels, and keep the coins.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        theorem Complexity.killedRotFn_mem_FP (F : FinBase) (pol : Polynomial ) (deg P T q : ) :
                        killedRotFn F pol deg P T q FP
                        theorem Complexity.marks_revSum_eq {α : Type} [Fintype α] [DecidableEq α] {F : FinBase} {pol : Polynomial } (hd : 1 < F.deg) (G : ConstraintGraph α) (T v s k : ) (hv : v < 2 * G.numEdges) (hpc : ∀ (u : Fin G.numVerts), F.fitLevel hd (G.cloudList u).length Polynomial.eval (G.cloudList u).length pol) (hpe : F.fitLevel hd (2 * G.numEdges) Polynomial.eval (2 * G.numEdges) pol) :
                        theorem Complexity.revNumFn_eq {α : Type} [Fintype α] [DecidableEq α] {F : FinBase} {pol : Polynomial } (hd : 1 < F.deg) (G : ConstraintGraph α) (T q v s c : ) (hq : 0 < q) (hv : v < 2 * G.numEdges) (hc : c < q ^ T) (hpc : ∀ (u : Fin G.numVerts), F.fitLevel hd (G.cloudList u).length Polynomial.eval (G.cloudList u).length pol) (hpe : F.fitLevel hd (2 * G.numEdges) Polynomial.eval (2 * G.numEdges) pol) :
                        revNumFn F pol (F.toFamily hd).degree (G.preDeg (F.toFamily hd)) T q (pair (encGraph G) (pair (List.replicate v true) (List.replicate (s * q ^ T + c) true))) = List.replicate (G.killedRevNum (F.toFamily hd) T q v s c) true

                        The return-dart algorithm computes the dart the walk comes back by.

                        theorem Complexity.killedRotFn_eq {α : Type} [Fintype α] [DecidableEq α] {F : FinBase} {pol : Polynomial } (hd : 1 < F.deg) (G : ConstraintGraph α) (T q v s c : ) (hq : 0 < q) (hv : v < 2 * G.numEdges) (hc : c < q ^ T) (hpc : ∀ (u : Fin G.numVerts), F.fitLevel hd (G.cloudList u).length Polynomial.eval (G.cloudList u).length pol) (hpe : F.fitLevel hd (2 * G.numEdges) Polynomial.eval (2 * G.numEdges) pol) :
                        killedRotFn F pol (F.toFamily hd).degree (G.preDeg (F.toFamily hd)) T q (pair (encGraph G) (pair (List.replicate v true) (List.replicate (s * q ^ T + c) true))) = pair (List.replicate (G.killedRotNum (F.toFamily hd) T q v s c).1 true) (List.replicate (G.killedRotNum (F.toFamily hd) T q v s c).2 true)

                        The rotation algorithm runs the powered graph's rotation map.