Documentation

Complexitylib.Classes.PCP.Internal.KilledWalk

Killed walks #

The walk law Dinur's powering step actually needs: at every step the walk stops with probability 1 / q, so its length is geometric rather than fixed.

A dart label is a pair of sequences: T edge labels and T stop signals. The walk follows the edge labels until the first signal equal to 0 — the stopping index — and its endpoint is where it stopped. Uniform labels therefore realise a geometric length exactly, truncated at T, with the labels past the stopping index carrying multiplicity but no meaning.

Why geometric and not fixed length #

Soundness decodes an assignment of the powered system by plurality and needs the opinions at the two ends of a checked step to be truthful. Summed over the checked steps that amounts to ∑ a_i · b_j over the prefix length i and the suffix length j. With walks of fixed length those are tied by i + j = t - 1 and the sum can vanish — the two ends can be truthful at complementary lengths and never at the same step, so nothing is charged. Killing makes i and j independent, so the sum factorises into a product of two plurality bounds. That factorisation is the whole reason for this construction.

Reversal #

Reversing a killed walk reverses only its effective prefix and leaves both the tail and the stop signals alone. Since the signals are untouched, the reversed walk stops at the same index, which is what makes reversal an involution — the requirement for the powered graph to be an undirected regular graph at all.

Main definitions #

Main results #

def Complexity.stopAt {T q : } (c : Fin TFin q) :

The step at which a killed walk stops: the first index carrying the signal 0, or T if there is none.

Equations
Instances For
    theorem Complexity.stopAt_le {T q : } (c : Fin TFin q) :
    theorem Complexity.signal_ne_zero_of_lt {T q : } (c : Fin TFin q) {j : } (hj : j < stopAt c) :
    (c j, ) 0

    Before the stopping index every signal is nonzero.

    theorem Complexity.signal_eq_zero_of_stopAt_lt {T q : } (c : Fin TFin q) (h : stopAt c < T) :
    (c stopAt c, h) = 0

    At the stopping index, if it is reached, the signal is zero.

    theorem Complexity.stopAt_eq_of {T q : } (c : Fin TFin q) {m : } (hm : m T) (hlt : ∀ (j : ) (hj : j < m), (c j, ) 0) (hat : ∀ (h : m < T), (c m, h) = 0) :
    stopAt c = m

    The stopping index is pinned down by the two properties above.

    theorem Complexity.lt_stopAt_iff {T q : } (c : Fin TFin q) {i : } (hi : i < T) :
    i < stopAt c ∀ (j : ) (hj : j i), (c j, ) 0

    The walk is still running at step i exactly when the first i + 1 signals are all nonzero. This is the form the crossing decomposition needs: the event "the walk reaches step i" depends only on the first i + 1 signal coordinates, so it splits off as a factor.

    theorem Complexity.card_lt_stopAt {T q i : } (hi : i < T) :
    {c : Fin TFin q | i < stopAt c}.card = (q - 1) ^ (i + 1) * q ^ (T - i - 1)

    The signal count. The walks still running at step i are exactly those whose first i + 1 signals are all nonzero, and those coordinates are free of one another, so they number (q-1) ^ (i+1) * q ^ (T-i-1). This is the factor that the crossing decomposition peels off.

    theorem Complexity.card_le_stopAt {T q m : } (hm : m T) :
    {c : Fin TFin q | m stopAt c}.card = (q - 1) ^ m * q ^ (T - m)

    The walks that are still running at step m, i.e. run for at least m steps.

    theorem Complexity.card_stopAt_eq {T q : } (hq : 0 < q) {m : } (hm : m < T) :
    {c : Fin TFin q | stopAt c = m}.card = (q - 1) ^ m * q ^ (T - m - 1)

    The exact-length signal count. The walks of effective length exactly m number (q-1) ^ m * q ^ (T-m-1): the first m signals are nonzero, the m-th is zero, and the rest are free.

    Prefixes #

    def Complexity.RegGraph.preWalk (G : RegGraph) {T : } (s : Fin TG.D) { : } (h : T) :
    Fin G.D

    The first labels of a length-T sequence.

    Equations
    Instances For
      def Complexity.RegGraph.extWalk (G : RegGraph) {T : } (r : Fin G.D) (s : Fin TG.D) :
      Fin TG.D

      Overwrite the first labels of a sequence.

      Equations
      Instances For
        theorem Complexity.RegGraph.preWalk_extWalk (G : RegGraph) {T : } (h : T) (r : Fin G.D) (s : Fin TG.D) :
        G.preWalk (G.extWalk r s) h = r
        theorem Complexity.RegGraph.extWalk_extWalk (G : RegGraph) {T : } (r r' : Fin G.D) (s : Fin TG.D) :
        G.extWalk r' (G.extWalk r s) = G.extWalk r' s
        theorem Complexity.RegGraph.extWalk_preWalk (G : RegGraph) {T : } (h : T) (s : Fin TG.D) :
        G.extWalk (G.preWalk s h) s = s
        theorem Complexity.RegGraph.card_preWalk_eq (G : RegGraph) {T m : } (hm : m T) (w : Fin mG.D) :
        {s : Fin TG.D | G.preWalk s hm = w}.card = G.deg ^ (T - m)

        How many label sequences begin with a prescribed length-m walk: the first m coordinates are pinned and the rest are free.

        theorem Complexity.RegGraph.card_killed_fibre (G : RegGraph) {T q m : } (hq : 0 < q) (hm : m < T) (w : Fin mG.D) :
        {x : (Fin TG.D) × (Fin TFin q) | G.preWalk x.1 = w stopAt x.2 = m}.card = G.deg ^ (T - m) * ((q - 1) ^ m * q ^ (T - m - 1))

        The fibre count. The killed-walk labels whose effective walk is exactly a prescribed length-m walk number deg ^ (T-m) * (q-1) ^ m * q ^ (T-m-1): the two conditions constrain the edge labels and the signals separately, so the counts multiply. This is the weight each effective walk carries, and it is geometric in m — the law both the plurality and the conditional prefix and suffix follow.

        Killed walks #

        def Complexity.RegGraph.killedEnd (G : RegGraph) {T q : } (v : G.V) (s : Fin TG.D) (c : Fin TFin q) :
        G.V

        Where a killed walk ends: it follows the edge labels up to the stopping index.

        Equations
        Instances For
          def Complexity.RegGraph.killedRev (G : RegGraph) {T q : } (v : G.V) (s : Fin TG.D) (c : Fin TFin q) :
          Fin TG.D

          A killed walk reversed: the effective prefix is reversed, the tail and the stop signals are left alone.

          Equations
          Instances For
            theorem Complexity.RegGraph.killedEnd_killedRev (G : RegGraph) {T q : } (v : G.V) (s : Fin TG.D) (c : Fin TFin q) :
            G.killedEnd (G.killedEnd v s c) (G.killedRev v s c) c = v
            theorem Complexity.RegGraph.killedRev_killedRev (G : RegGraph) {T q : } (v : G.V) (s : Fin TG.D) (c : Fin TFin q) :
            G.killedRev (G.killedEnd v s c) (G.killedRev v s c) c = s

            The killed power graph #

            def Complexity.RegGraph.killedPower (G : RegGraph) (q T : ) (hq : 0 < q) :

            The killed power of G: a dart label is T edge labels together with T stop signals, and the neighbour is where the walk stops.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[simp]
              theorem Complexity.RegGraph.V_killedPower (G : RegGraph) (q T : ) (hq : 0 < q) :
              (G.killedPower q T hq).V = G.V
              @[simp]
              theorem Complexity.RegGraph.order_killedPower (G : RegGraph) (q T : ) (hq : 0 < q) :
              (G.killedPower q T hq).order = G.order
              theorem Complexity.RegGraph.nbr_killedPower (G : RegGraph) (q T : ) (hq : 0 < q) (v : G.V) (x : (Fin TG.D) × (Fin TFin q)) :
              (G.killedPower q T hq).nbr v x = G.killedEnd v x.1 x.2
              theorem Complexity.RegGraph.deg_killedPower (G : RegGraph) (q T : ) (hq : 0 < q) :
              (G.killedPower q T hq).deg = G.deg ^ T * q ^ T

              The killed power is regular of degree deg ^ T * q ^ T.