Documentation

Complexity.Foundations.Combinatorics.Expander.KilledWalk

Killed walks #

Walks whose length is random, killed before each step with probability 1 / q and stopped after T steps, are Radhakrishnan's variant [Rad06] of the walks in the powering step of Dinur's proof of the PCP theorem Dinur, Section 9. A killed walk on a D-regular multigraph G is presented by T labels of G and T kill signals c : Fin T → Fin q: it follows the labels until its kill time killTime c, the first step i with c i = 0 (or T if there is none), and the remaining labels carry no meaning. Under uniformly random signals the kill time has the geometric law truncated at T: it is m < T with probability (1 - 1 / q) ^ m / q (card_filter_killTime_eq) and at least m ≤ T with probability (1 - 1 / q) ^ m (card_filter_le_killTime).

Given that it is killed at step ℓ < T, a uniformly random killed walk is a uniformly random walk of length ℓ (sum_ite_killTime_eq, card_filter_killTime_eq_and). Splitting it at a step i < ℓ with splitWalk counts the killed walks crossing a given dart at step i by independent factors for the i steps before it and the j = ℓ - (i + 1) steps after it, times the weight |D| ^ (T - ℓ) (q - 1) ^ ℓ q ^ (T - (ℓ + 1)) of the length ℓ (card_filter_killTime_eq_and_splitWalk). The factor (q - 1) ^ ℓ = (q - 1) ^ i (q - 1) (q - 1) ^ j of that weight splits between the two sides of the crossed edge: up to the truncation at T, the lengths i and j of the two sides are independent, which is what the first-moment count of the powering step uses.

The killed walks are the darts of the killed power G.killedPow T q, whose edge labelled (k, c) at v is the killed walk from v (neighbor_killedPow). Its rotation map reverses a killed walk up to its kill time (rot_pow_killTime) and leaves its unused labels and its signals alone, so that the reverse is killed at the same step.

Main definitions #

Main results #

References #

def Cslib.RotationMap.killTime {T q : ℕ} [NeZero q] (c : Fin T → Fin q) :

The step at which a walk with kill signals c : Fin T → Fin q is killed: the first step i with c i = 0, or T, where the walk is stopped, if there is none.

Instances For
    theorem Cslib.RotationMap.killTime_le {T q : ℕ} [NeZero q] (c : Fin T → Fin q) :

    A walk of length T is killed by step T.

    theorem Cslib.RotationMap.lt_killTime_iff {T q : ℕ} [NeZero q] (c : Fin T → Fin q) {i : ℕ} (hi : i < T) :
    i < killTime c ↔ ∀ (j : Fin T), ↑j ≤ i → c j ≠ 0

    A walk survives its step i < T when none of its first i + 1 signals is 0.

    theorem Cslib.RotationMap.killTime_eq_iff {T q : ℕ} [NeZero q] (c : Fin T → Fin q) {m : ℕ} (hm : m < T) :
    killTime c = m ↔ c ⟨m, hm⟩ = 0 ∧ ∀ (j : Fin T), ↑j < m → c j ≠ 0

    A walk is killed at its step m < T when its m-th signal is the first that is 0.

    theorem Cslib.RotationMap.killTime_cons {T q : ℕ} [NeZero q] (a : Fin q) (c : Fin T → Fin q) :

    A walk is killed at its first step if its first signal is 0, and otherwise one step after the walk along its remaining signals is killed.

    theorem Cslib.RotationMap.card_filter_killTime_eq {T q : ℕ} [NeZero q] {m : ℕ} (hm : m < T) :
    {c : Fin T → Fin q | killTime c = m}.card = (q - 1) ^ m * q ^ (T - (m + 1))

    Under uniformly random signals, a walk of length T is killed at its step m < T with probability (1 - 1 / q) ^ m / q: the signals that kill it there number (q - 1) ^ m * q ^ (T - (m + 1)).

    theorem Cslib.RotationMap.card_filter_le_killTime {T q : ℕ} [NeZero q] {m : ℕ} (hm : m ≤ T) :
    {c : Fin T → Fin q | m ≤ killTime c}.card = (q - 1) ^ m * q ^ (T - m)

    Under uniformly random signals, a walk of length T survives its first m ≤ T steps with probability (1 - 1 / q) ^ m: the signals that let it number (q - 1) ^ m * q ^ (T - m).

    theorem Cslib.RotationMap.sum_ite_killTime_eq {V : Type u_1} {D : Type u_2} {T q : ℕ} [NeZero q] [Fintype V] [Fintype D] {M : Type u_3} [AddCommMonoid M] {ℓ : ℕ} (hℓ : ℓ < T) (F : V × (Fin ℓ → D) → M) :
    (∑ x : V × (Fin T → D) × (Fin T → Fin q), if killTime x.2.2 = ℓ then F (x.1, Fin.take ℓ ⋯ x.2.1) else 0) = (Fintype.card D ^ (T - ℓ) * ((q - 1) ^ ℓ * q ^ (T - (ℓ + 1)))) • ∑ w : V × (Fin ℓ → D), F w

    The law of a killed walk. Given that it is killed at its step ℓ < T, a uniformly random walk of length T with uniformly random kill signals is, up to that step, a uniformly random walk of length ℓ: summing a function of its first ℓ steps over the walks and signals killed at step ℓ sums it |D| ^ (T - ℓ) (q - 1) ^ ℓ q ^ (T - (ℓ + 1)) times over the walks of length ℓ.

    theorem Cslib.RotationMap.card_filter_killTime_eq_and {V : Type u_1} {D : Type u_2} {T q : ℕ} [NeZero q] [Fintype V] [Fintype D] {ℓ : ℕ} (hℓ : ℓ < T) (P : V × (Fin ℓ → D) → Prop) [DecidablePred P] :
    {x : V × (Fin T → D) × (Fin T → Fin q) | killTime x.2.2 = ℓ ∧ P (x.1, Fin.take ℓ ⋯ x.2.1)}.card = {w : V × (Fin ℓ → D) | P w}.card * (Fintype.card D ^ (T - ℓ) * ((q - 1) ^ ℓ * q ^ (T - (ℓ + 1))))

    The law of a killed walk, counting form: the walks of length T and kill signals for which the walk is killed at its step ℓ < T and its first ℓ steps satisfy P number #{w | P w} |D| ^ (T - ℓ) (q - 1) ^ ℓ q ^ (T - (ℓ + 1)).

    theorem Cslib.RotationMap.card_filter_killTime_eq_and_splitWalk {V : Type u_1} {D : Type u_2} (G : RotationMap V D) {T q : ℕ} [NeZero q] [Fintype V] [Fintype D] {ℓ : ℕ} (hℓ : ℓ < T) (i : Fin ℓ) (P : V × D → (Fin ↑i → D) → Prop) (Q : V × D → (Fin (ℓ - (↑i + 1)) → D) → Prop) [(d : V × D) → DecidablePred (P d)] [(d : V × D) → DecidablePred (Q d)] :
    {x : V × (Fin T → D) × (Fin T → Fin q) | killTime x.2.2 = ℓ ∧ P (G.walkDart (x.1, Fin.take ℓ ⋯ x.2.1) i) ((G.pow ↑i).rot (x.1, Fin.take ↑i ⋯ (Fin.take ℓ ⋯ x.2.1))).2 ∧ Q (G.walkDart (x.1, Fin.take ℓ ⋯ x.2.1) i) (G.walkDrop (x.1, Fin.take ℓ ⋯ x.2.1) (↑i + 1)).2}.card = (∑ d : V × D, {r : Fin ↑i → D | P d r}.card * {s : Fin (ℓ - (↑i + 1)) → D | Q d s}.card) * (Fintype.card D ^ (T - ℓ) * ((q - 1) ^ ℓ * q ^ (T - (ℓ + 1))))

    The crossing count for killed walks. Counted by the dart d crossed at step i, the walks of length T and kill signals for which the walk is killed at its step ℓ < T, crosses d at its step i < ℓ, the reverse of its first i steps satisfies P d and its steps from i + 1 to ℓ satisfy Q d are counted by independent factors and the weight of the length ℓ.

    The law of killed walks, as averages #

    theorem Cslib.RotationMap.expect_le_killTime {T q : ℕ} [NeZero q] {m : ℕ} (hm : m ≤ T) :
    (Finset.univ.expect fun (c : Fin T → Fin q) => if m ≤ killTime c then 1 else 0) = (1 - (↑q)⁻¹) ^ m

    Under uniformly random kill signals, a walk of length T survives its first m ≤ T steps with probability (1 - 1 / q) ^ m.

    theorem Cslib.RotationMap.expect_killTime_eq {T q : ℕ} [NeZero q] {m : ℕ} (hm : m < T) :
    (Finset.univ.expect fun (c : Fin T → Fin q) => if killTime c = m then 1 else 0) = (1 - (↑q)⁻¹) ^ m / ↑q

    Under uniformly random kill signals, a walk of length T is killed at its step m < T with probability (1 - 1 / q) ^ m / q: it survives its first m steps but not its first m + 1.

    theorem Cslib.RotationMap.expect_ite_killTime_eq {D : Type u_2} {T q : ℕ} [NeZero q] [Fintype D] [Nonempty D] {ℓ : ℕ} (hℓ : ℓ < T) (f : (Fin ℓ → D) → ℝ) :
    (Finset.univ.expect fun (x : (Fin T → D) × (Fin T → Fin q)) => if killTime x.2 = ℓ then f (Fin.take ℓ ⋯ x.1) else 0) = (1 - (↑q)⁻¹) ^ ℓ / ↑q * Finset.univ.expect fun (r : Fin ℓ → D) => f r

    The law of a killed walk: averaged over uniformly random labels and kill signals, a function of the first ℓ < T labels, on the event that the walk is killed at step ℓ, averages to (1 - 1 / q) ^ ℓ / q times its average over the label sequences of length ℓ.

    theorem Cslib.RotationMap.expect_prod_ite_killTime_eq {V : Type u_1} {D : Type u_2} {T q : ℕ} [NeZero q] [Fintype D] [Fintype V] [Nonempty D] {ℓ : ℕ} (hℓ : ℓ < T) (F : V × (Fin ℓ → D) → ℝ) :
    (Finset.univ.expect fun (x : V × (Fin T → D) × (Fin T → Fin q)) => if killTime x.2.2 = ℓ then F (x.1, Fin.take ℓ ⋯ x.2.1) else 0) = (1 - (↑q)⁻¹) ^ ℓ / ↑q * Finset.univ.expect fun (w : V × (Fin ℓ → D)) => F w

    The law of a killed walk, with a uniformly random start: a function of the walk along the first ℓ < T labels, on the event that the walk is killed at step ℓ, averages to (1 - 1 / q) ^ ℓ / q times its average over the walks of length ℓ.

    def Cslib.RotationMap.killedPow {V : Type u_1} {D : Type u_2} (G : RotationMap V D) (T q : ℕ) [NeZero q] :
    RotationMap V ((Fin T → D) × (Fin T → Fin q))

    The killed power G.killedPow T q: the multigraph on the vertices of G with an edge for every walk in G of length T with kill signals in Fin q. The edge labelled (k, c) at v is the walk from v along the labels k, stopped when it is killed at step killTime c; its rotation map reverses the walk up to that step and leaves the unused labels and the signals alone, so that the reverse is killed at the same step. A step of its random walk is a random walk on G killed after each step with probability 1 / q, and stopped after T steps.

    Instances For
      theorem Cslib.RotationMap.neighbor_killedPow {V : Type u_1} {D : Type u_2} (G : RotationMap V D) (T q : ℕ) [NeZero q] (v : V) (x : (Fin T → D) × (Fin T → Fin q)) :
      (G.killedPow T q).neighbor v x = G.walkAt (v, x.1) (killTime x.2)

      The edge labelled (k, c) at v in the killed power leads to the vertex where the walk from v along k is killed.

      @[simp]
      theorem Cslib.RotationMap.snd_snd_rot_killedPow {V : Type u_1} {D : Type u_2} (G : RotationMap V D) (T q : ℕ) [NeZero q] (p : V × (Fin T → D) × (Fin T → Fin q)) :
      ((G.killedPow T q).rot p).2.2 = p.2.2

      The rotation map of the killed power leaves the kill signals alone.

      theorem Cslib.RotationMap.rot_pow_killTime {V : Type u_1} {D : Type u_2} (G : RotationMap V D) (T q : ℕ) [NeZero q] (p : V × (Fin T → D) × (Fin T → Fin q)) :
      (G.pow (killTime p.2.2)).rot (p.1, Fin.take (killTime p.2.2) ⋯ p.2.1) = (((G.killedPow T q).rot p).1, Fin.take (killTime p.2.2) ⋯ ((G.killedPow T q).rot p).2.1)

      The rotation map of the killed power reverses the walk up to the step at which it is killed.