Documentation

CslibFrontier.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 #

@[reducible, inline]
abbrev Cslib.KilledDart (V : Type u_3) (D : Type u_4) (T q : ℕ) :
Type (max u_3 u_4)

A dart of a killed power: starting vertex, T step labels, and T kill signals, (vertex, labels, signals).

@[reducible, inline]
abbrev Cslib.KilledDart.vertex {V : Type u_1} {D : Type u_2} {T q : ℕ} (p : KilledDart V D T q) :
V

The starting vertex of a killed-walk dart.

@[reducible, inline]
abbrev Cslib.KilledDart.labels {V : Type u_1} {D : Type u_2} {T q : ℕ} (p : KilledDart V D T q) :
Fin T → D

The step labels of a killed-walk dart.

@[reducible, inline]
abbrev Cslib.KilledDart.signals {V : Type u_1} {D : Type u_2} {T q : ℕ} (p : KilledDart V D T q) :
Fin T → Fin q

The kill signals of a killed-walk dart.

def Cslib.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.

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

A walk of length T is killed by step T.

theorem Cslib.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.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.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.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.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.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 : KilledDart V D T q, if killTime x.signals = ℓ then F (x.vertex, Fin.take ℓ ⋯ x.labels) 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.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 : KilledDart V D T q | killTime x.signals = ℓ ∧ P (x.vertex, Fin.take ℓ ⋯ x.labels)}.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)).

The law of killed walks, as averages #

theorem Cslib.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.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.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.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 : KilledDart V D T q) => if killTime x.signals = ℓ then F (x.vertex, Fin.take ℓ ⋯ x.labels) 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 ℓ.

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 : KilledDart V D T q | killTime x.signals = ℓ ∧ P (G.walkDart (x.vertex, Fin.take ℓ ⋯ x.labels) i) ((G.pow ↑i).rot (x.vertex, Fin.take ↑i ⋯ (Fin.take ℓ ⋯ x.labels))).2 ∧ Q (G.walkDart (x.vertex, Fin.take ℓ ⋯ x.labels) i) (G.walkDrop (x.vertex, Fin.take ℓ ⋯ x.labels) (↑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 ℓ.

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 before each step with probability 1 / q, and stopped after T steps.

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 : KilledDart V D T q) :

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 : KilledDart V D T q) :

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