Documentation

CslibFrontier.Probability.MarkovChain.Spectral

Reversible spectral gap, lazy chains, and total-variation mixing bounds #

For a Markov chain P : MarkovChain S on a finite state space S and a reference distribution π : PMF S, the transition operator P.stepOp : Module.End ℝ (S → ℝ) maps an observable f to x ↦ ∑ y, P(x, y) f(y). Composition of chains corresponds to composition of operators, so stepOp is a monoid homomorphism ((P ^ t).stepOp = P.stepOp ^ t). Every eigenvalue μ of P.stepOp satisfies |μ| ≤ 1 (abs_eigenvalue_le_one, [LP17], Lemma 12.1(i)), and when π is stationary every eigenfunction with μ ≠ 1 has π-expectation zero (IsStationary.sum_mul_eq_zero_of_stepOp_eq_smul, Lemma 12.3).

When P is reversible with respect to π, P.stepOp is self-adjoint in ℓ²(π) (IsReversible.sum_mul_stepOp_comm, (12.1)), and its Dirichlet form 𝓔(f) = (1 / 2) ∑_{x, y} π(x) P(x, y) (f(x) - f(y))² (dirichletForm, (13.2)) equals ⟨f, f⟩_π - ⟨f, P f⟩_π (IsReversible.dirichletForm_eq_sub, Lemma 13.6). On the π-mean-zero functions of positive ℓ²(π) norm:

When S has at least two states and π is strictly positive, conjugating P.stepOp into EuclideanSpace ℝ S by D_π^{1/2} (Lemma 12.2) produces non-constant eigenfunctions of P.stepOp achieving |μ| = λ_* (IsReversible.exists_eigenfunction_abs_eq_spectralContraction) and μ = 1 - γ (IsReversible.exists_eigenfunction_eq_one_sub_spectralGap), matching the eigenvalue definitions (12.6) and (12.7).

Passing to the lazy chain P.lazy ((I + P) / 2, Section 1.3) preserves stationarity and reversibility, makes the transition operator positive semidefinite in ℓ²(π) (Exercise 12.3), and eliminates negative eigenvalues near -1: P.lazy.absSpectralGap π = P.lazy.spectralGap π = P.spectralGap π / 2 (IsReversible.absSpectralGap_lazy).

Combining ℓ²(π) variance contraction ((12.8), Exercise 12.4) with Pearson χ² divergence (Cslib.Probability.PMF.chiSquare, Lemma 12.18) yields:

Main definitions #

Main results #

References #

Reversibility of iterates and lazy chains #

Detailed balance holds for the identity chain 1.

theorem Cslib.Probability.MarkovChain.IsReversible.pow {S : Type u_1} {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (t : ℕ) :
(P ^ t).IsReversible π

Detailed balance is preserved under t-step iteration (P ^ t).

noncomputable def Cslib.Probability.MarkovChain.lazy {S : Type u_1} (P : MarkovChain S) :

The lazy version (I + P) / 2 of a Markov chain P ([LP17], Section 1.3, p. 8): from x, flip a fair coin and either take one step of P or remain at x.

theorem Cslib.Probability.MarkovChain.lazy_apply_eq {S : Type u_1} (P : MarkovChain S) (x y : S) :
(P.lazy.step x) y = 2⁻¹ * (P.step x) y + 2⁻¹ * (PMF.pure x) y

Pointwise transition probabilities of P.lazy without DecidableEq.

theorem Cslib.Probability.MarkovChain.lazy_apply {S : Type u_1} [DecidableEq S] (P : MarkovChain S) (x y : S) :
(P.lazy.step x) y = 2⁻¹ * (P.step x) y + if y = x then 2⁻¹ else 0

Transition probabilities of P.lazy: (1 / 2) P(x, y) + (1 / 2) 1_{y = x}.

@[simp]
theorem Cslib.Probability.MarkovChain.lazy_apply_self {S : Type u_1} (P : MarkovChain S) (x : S) :
(P.lazy.step x) x = 2⁻¹ * (P.step x) x + 2⁻¹
theorem Cslib.Probability.MarkovChain.lazy_apply_of_ne {S : Type u_1} (P : MarkovChain S) {x y : S} (h : x ≠ y) :
(P.lazy.step x) y = 2⁻¹ * (P.step x) y

Stationarity is preserved by passing to the lazy chain.

Detailed balance is preserved by passing to the lazy chain.

theorem Cslib.Probability.MarkovChain.chiSquare_pure_left {S : Type u_1} [Finite S] {π : PMF S} (x : S) (hx : π x ≠ 0) :
PMF.chiSquare (PMF.pure x) π = (1 - (π x).toReal) / (π x).toReal

Exact χ² divergence of a point mass PMF.pure x from π: (1 - π(x)) / π(x).

Transition operator and ℓ²(π) geometry #

The transition operator P ↦ (f ↦ (x ↦ ∑ y, P(x, y) f(y))), packaged as a monoid homomorphism from MarkovChain S to linear endomorphisms of S → ℝ.

theorem Cslib.Probability.MarkovChain.stepOp_apply {S : Type u_1} [Fintype S] (P : MarkovChain S) (f : S → ℝ) (x : S) :
(stepOp P) f x = ∑ y : S, ((P.step x) y).toReal * f y
@[simp]
theorem Cslib.Probability.MarkovChain.stepOp_const {S : Type u_1} [Fintype S] (P : MarkovChain S) (c : ℝ) :
((stepOp P) fun (x : S) => c) = fun (x : S) => c
theorem Cslib.Probability.MarkovChain.stepOp_add_const {S : Type u_1} [Fintype S] (P : MarkovChain S) (f : S → ℝ) (c : ℝ) (x : S) :
(stepOp P) (fun (y : S) => f y + c) x = (stepOp P) f x + c
theorem Cslib.Probability.MarkovChain.stepOp_sub_const {S : Type u_1} [Fintype S] (P : MarkovChain S) (f : S → ℝ) (c : ℝ) (x : S) :
(stepOp P) (fun (y : S) => f y - c) x = (stepOp P) f x - c
theorem Cslib.Probability.MarkovChain.stepOp_lazy_apply {S : Type u_1} [Fintype S] (P : MarkovChain S) (f : S → ℝ) (x : S) :
(stepOp P.lazy) f x = (f x + (stepOp P) f x) / 2

The lazy transition operator averages the identity and P.stepOp: P.lazy.stepOp f x = (f x + P.stepOp f x) / 2.

theorem Cslib.Probability.MarkovChain.abs_stepOp_le_of_forall_abs_le {S : Type u_1} [Fintype S] (P : MarkovChain S) {f : S → ℝ} {B : ℝ} (hf : ∀ (y : S), |f y| ≤ B) (x : S) :
|(stepOp P) f x| ≤ B

ℓ^∞ contraction of P.stepOp ([LP17], Exercise 12.1(a), p. 177).

theorem Cslib.Probability.MarkovChain.abs_eigenvalue_le_one {S : Type u_1} [Fintype S] (P : MarkovChain S) {f : S → ℝ} {μ : ℝ} (hf0 : f ≠ 0) (hf : (stepOp P) f = μ • f) :
|μ| ≤ 1

Every eigenvalue of a finite Markov chain has absolute value at most 1 ([LP17], Lemma 12.1(i), p. 161, and Exercise 12.1(a), p. 177).

theorem Cslib.Probability.MarkovChain.sq_stepOp_le {S : Type u_1} [Fintype S] (P : MarkovChain S) (f : S → ℝ) (x : S) :
(stepOp P) f x ^ 2 ≤ (stepOp P) (fun (y : S) => f y ^ 2) x

Pointwise Jensen inequality (P f x)² ≤ P (f²) x.

theorem Cslib.Probability.MarkovChain.IsStationary.sum_mul_stepOp {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hπ : P.IsStationary π) (f : S → ℝ) :
∑ x : S, (π x).toReal * (stepOp P) f x = ∑ x : S, (π x).toReal * f x

Under a stationary distribution π, P.stepOp preserves π-expectations.

theorem Cslib.Probability.MarkovChain.IsStationary.sum_mul_eq_zero_of_stepOp_eq_smul {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hπ : P.IsStationary π) {f : S → ℝ} {μ : ℝ} (hμ : μ ≠ 1) (hf : (stepOp P) f = μ • f) :
∑ x : S, (π x).toReal * f x = 0

Eigenfunctions with eigenvalue μ ≠ 1 have mean zero ([LP17], Lemma 12.3, pp. 162–163); no reversibility is needed.

theorem Cslib.Probability.MarkovChain.IsStationary.sum_mul_stepOp_sq_le {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hπ : P.IsStationary π) (f : S → ℝ) :
∑ x : S, (π x).toReal * (stepOp P) f x ^ 2 ≤ ∑ x : S, (π x).toReal * f x ^ 2

Under stationarity, P.stepOp does not increase the ℓ²(π) second moment.

theorem Cslib.Probability.MarkovChain.sq_sum_mul_le {S : Type u_1} [Fintype S] (π : PMF S) (f g : S → ℝ) :
(∑ x : S, (π x).toReal * f x * g x) ^ 2 ≤ (∑ x : S, (π x).toReal * f x ^ 2) * ∑ x : S, (π x).toReal * g x ^ 2

Cauchy–Schwarz inequality in ℓ²(π).

theorem Cslib.Probability.MarkovChain.IsStationary.abs_sum_mul_stepOp_le {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hπ : P.IsStationary π) (f : S → ℝ) :
|∑ x : S, (π x).toReal * f x * (stepOp P) f x| ≤ ∑ x : S, (π x).toReal * f x ^ 2

Under stationarity, |⟨f, P f⟩_π| ≤ ⟨f, f⟩_π.

theorem Cslib.Probability.MarkovChain.IsStationary.sum_mul_stepOp_lazy_nonneg {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hπ : P.IsStationary π) (f : S → ℝ) :
0 ≤ ∑ x : S, (π x).toReal * f x * (stepOp P.lazy) f x

Positive semidefiniteness of lazy chains in ℓ²(π) ([LP17], Exercise 12.3, p. 177): 0 ≤ ⟨f, P.lazy f⟩_π for every π-stationary chain P.

theorem Cslib.Probability.MarkovChain.IsReversible.toReal_mul_eq {S : Type u_1} {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (x y : S) :
(π x).toReal * ((P.step x) y).toReal = (π y).toReal * ((P.step y) x).toReal
theorem Cslib.Probability.MarkovChain.IsReversible.sum_mul_stepOp_comm {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (f g : S → ℝ) :
∑ x : S, (π x).toReal * f x * (stepOp P) g x = ∑ x : S, (π x).toReal * (stepOp P) f x * g x

Self-adjointness of reversible chains in ℓ²(π) ([LP17], Section 12.1, (12.1)): ⟨f, P g⟩_π = ⟨P f, g⟩_π.

Dirichlet form #

noncomputable def Cslib.Probability.MarkovChain.dirichletForm {S : Type u_1} [Fintype S] (P : MarkovChain S) (π : PMF S) (f : S → ℝ) :

The Dirichlet form 𝓔(f) = (1 / 2) ∑_{x, y} π(x) P(x, y) (f(x) - f(y))² associated to (P, π) ([LP17], Section 13.2.1, (13.2), p. 181).

theorem Cslib.Probability.MarkovChain.dirichletForm_nonneg {S : Type u_1} [Fintype S] (P : MarkovChain S) (π : PMF S) (f : S → ℝ) :
@[simp]
theorem Cslib.Probability.MarkovChain.dirichletForm_const {S : Type u_1} [Fintype S] (P : MarkovChain S) (π : PMF S) (c : ℝ) :
(P.dirichletForm π fun (x : S) => c) = 0
@[simp]
theorem Cslib.Probability.MarkovChain.dirichletForm_add_const {S : Type u_1} [Fintype S] (P : MarkovChain S) (π : PMF S) (f : S → ℝ) (c : ℝ) :
(P.dirichletForm π fun (x : S) => f x + c) = P.dirichletForm π f
@[simp]
theorem Cslib.Probability.MarkovChain.dirichletForm_sub_const {S : Type u_1} [Fintype S] (P : MarkovChain S) (π : PMF S) (f : S → ℝ) (c : ℝ) :
(P.dirichletForm π fun (x : S) => f x - c) = P.dirichletForm π f
theorem Cslib.Probability.MarkovChain.dirichletForm_lazy {S : Type u_1} [Fintype S] (P : MarkovChain S) (π : PMF S) (f : S → ℝ) :

Passing to the lazy chain halves the Dirichlet form.

theorem Cslib.Probability.MarkovChain.IsReversible.dirichletForm_eq_sub {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (f : S → ℝ) :
P.dirichletForm π f = ∑ x : S, (π x).toReal * f x ^ 2 - ∑ x : S, (π x).toReal * f x * (stepOp P) f x

Dirichlet form identity for reversible Markov chains ([LP17], Lemma 13.6, pp. 181–182): 𝓔(f) = ⟨f, f⟩_π - ⟨f, P f⟩_π.

theorem Cslib.Probability.MarkovChain.IsReversible.dirichletForm_le_two_mul {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (f : S → ℝ) :
P.dirichletForm π f ≤ 2 * ∑ x : S, (π x).toReal * f x ^ 2

Spectral contraction λ_*, absolute spectral gap γ_*, and spectral gap γ #

noncomputable def Cslib.Probability.MarkovChain.spectralContraction {S : Type u_1} [Fintype S] (P : MarkovChain S) (π : PMF S) :

The ℓ²(π) spectral contraction λ_* of (P, π) ([LP17], (12.6) and (12.8)): the operator norm of P.stepOp on the π-mean-zero functions of positive ℓ²(π) second moment, or 0 when no such function exists.

noncomputable def Cslib.Probability.MarkovChain.absSpectralGap {S : Type u_1} [Fintype S] (P : MarkovChain S) (π : PMF S) :

The absolute spectral gap γ_* := 1 - λ_* ([LP17], Section 12.2, p. 163).

noncomputable def Cslib.Probability.MarkovChain.spectralGap {S : Type u_1} [Fintype S] (P : MarkovChain S) (π : PMF S) :

The spectral gap γ = 1 - λ₂ ([LP17], Section 12.2, (12.7), and Lemma 13.7, (13.3), p. 182): the infimum of 𝓔(f) / ⟨f, f⟩_π over the π-mean-zero functions of positive ℓ²(π) second moment, or 0 when no such function exists.

theorem Cslib.Probability.MarkovChain.IsStationary.sum_mul_stepOp_sq_le_spectralContraction {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hπ : P.IsStationary π) {f : S → ℝ} (hf : ∑ x : S, (π x).toReal * f x = 0) :
∑ x : S, (π x).toReal * (stepOp P) f x ^ 2 ≤ P.spectralContraction π ^ 2 * ∑ x : S, (π x).toReal * f x ^ 2

One-step ℓ²(π) contraction on π-mean-zero functions.

theorem Cslib.Probability.MarkovChain.IsStationary.spectralContraction_le_iff {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hπ : P.IsStationary π) {c : ℝ} (hc : 0 ≤ c) :
P.spectralContraction π ≤ c ↔ ∀ (f : S → ℝ), ∑ x : S, (π x).toReal * f x = 0 → ∑ x : S, (π x).toReal * (stepOp P) f x ^ 2 ≤ c ^ 2 * ∑ x : S, (π x).toReal * f x ^ 2

Characterization of P.spectralContraction π ≤ c for c ≥ 0.

theorem Cslib.Probability.MarkovChain.IsStationary.sum_mul_stepOp_pow_sq_le {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hπ : P.IsStationary π) {f : S → ℝ} (hf : ∑ x : S, (π x).toReal * f x = 0) (t : ℕ) :
∑ x : S, (π x).toReal * (stepOp (P ^ t)) f x ^ 2 ≤ P.spectralContraction π ^ (2 * t) * ∑ x : S, (π x).toReal * f x ^ 2

t-step ℓ²(π) contraction on π-mean-zero functions.

theorem Cslib.Probability.MarkovChain.IsStationary.sum_mul_stepOp_pow_sub_sq_le {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hπ : P.IsStationary π) (f : S → ℝ) (t : ℕ) :
∑ x : S, (π x).toReal * ((stepOp (P ^ t)) f x - ∑ y : S, (π y).toReal * f y) ^ 2 ≤ P.spectralContraction π ^ (2 * t) * ∑ x : S, (π x).toReal * (f x - ∑ y : S, (π y).toReal * f y) ^ 2

t-step variance contraction Var_π(P^t f) ≤ (1 - γ_*)^{2t} Var_π(f) ([LP17], (12.8), p. 163, and Exercise 12.4, p. 177).

theorem Cslib.Probability.MarkovChain.IsStationary.abs_sum_mul_stepOp_le_spectralContraction {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hπ : P.IsStationary π) {f : S → ℝ} (hf : ∑ x : S, (π x).toReal * f x = 0) :
|∑ x : S, (π x).toReal * f x * (stepOp P) f x| ≤ P.spectralContraction π * ∑ x : S, (π x).toReal * f x ^ 2

For stationary P, |⟨f, P f⟩_π| ≤ λ_* ⟨f, f⟩_π on π-mean-zero functions.

theorem Cslib.Probability.MarkovChain.IsReversible.spectralContraction_le_iff_abs_sum_mul_stepOp_le {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) {c : ℝ} (hc : 0 ≤ c) :
P.spectralContraction π ≤ c ↔ ∀ (f : S → ℝ), ∑ x : S, (π x).toReal * f x = 0 → |∑ x : S, (π x).toReal * f x * (stepOp P) f x| ≤ c * ∑ x : S, (π x).toReal * f x ^ 2

Rayleigh characterization of λ_* for reversible chains: P.spectralContraction π ≤ c iff |⟨f, P f⟩_π| ≤ c ⟨f, f⟩_π on π-mean-zero functions.

theorem Cslib.Probability.MarkovChain.IsReversible.spectralContraction_eq_ciSup_abs {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) :
P.spectralContraction π = ⨆ (f : { f : S → ℝ // ∑ x : S, (π x).toReal * f x = 0 ∧ 0 < ∑ x : S, (π x).toReal * f x ^ 2 }), |∑ x : S, (π x).toReal * ↑f x * (stepOp P) (↑f) x| / ∑ x : S, (π x).toReal * ↑f x ^ 2

Absolute Rayleigh-quotient formula for λ_* on reversible chains.

Poincaré inequality and lazy spectral gap #

theorem Cslib.Probability.MarkovChain.spectralGap_mul_le_dirichletForm {S : Type u_1} [Fintype S] (P : MarkovChain S) (π : PMF S) (f : S → ℝ) :
P.spectralGap π * ∑ x : S, (π x).toReal * (f x - ∑ y : S, (π y).toReal * f y) ^ 2 ≤ P.dirichletForm π f

Poincaré inequality (γ Var_π(f) ≤ 𝓔(f), [LP17], Lemma 13.7 and Remark 13.8, p. 182), valid without any support or reversibility assumption.

theorem Cslib.Probability.MarkovChain.le_spectralGap_iff {S : Type u_1} [Fintype S] [Nontrivial S] {P : MarkovChain S} {π : PMF S} (hπ : ∀ (x : S), π x ≠ 0) {c : ℝ} :
c ≤ P.spectralGap π ↔ ∀ (f : S → ℝ), ∑ x : S, (π x).toReal * f x = 0 → c * ∑ x : S, (π x).toReal * f x ^ 2 ≤ P.dirichletForm π f

Variational characterization of c ≤ P.spectralGap π ([LP17], Lemma 13.7, (13.3), p. 182).

Passing to the lazy chain halves the spectral gap γ.

theorem Cslib.Probability.MarkovChain.IsReversible.absSpectralGap_le_spectralGap {S : Type u_1} [Fintype S] [Nontrivial S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (hπ : ∀ (x : S), π x ≠ 0) :

On a nontrivial state space with strictly positive π, γ_* ≤ γ.

For every reversible chain, λ_*(P.lazy) ≤ 1 - γ(P) / 2.

theorem Cslib.Probability.MarkovChain.IsReversible.spectralContraction_lazy {S : Type u_1} [Fintype S] [Nontrivial S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (hπ : ∀ (x : S), π x ≠ 0) :

Exact lazy spectral contraction on a nontrivial state space with strictly positive π: λ_*(P.lazy) = 1 - γ(P) / 2.

theorem Cslib.Probability.MarkovChain.IsReversible.absSpectralGap_lazy {S : Type u_1} [Fintype S] [Nontrivial S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (hπ : ∀ (x : S), π x ≠ 0) :

Exact lazy absolute spectral gap ([LP17], Section 12.2, p. 163, and Exercise 12.3, p. 177): γ_*(P.lazy) = γ(P.lazy) = γ(P) / 2.

Eigenfunction existence via symmetric conjugation (Lemma 12.2) #

theorem Cslib.Probability.MarkovChain.IsReversible.exists_eigenfunction_abs_eq_spectralContraction {S : Type u_1} [Fintype S] [Nontrivial S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (hπ : ∀ (x : S), π x ≠ 0) :
∃ (f : S → ℝ) (μ : ℝ), f ≠ 0 ∧ ∑ x : S, (π x).toReal * f x = 0 ∧ (stepOp P) f = μ • f ∧ |μ| = P.spectralContraction π

Existence of a mean-zero eigenfunction achieving |μ| = λ_* ([LP17], Lemma 12.2 and (12.6), pp. 161–163).

theorem Cslib.Probability.MarkovChain.IsReversible.exists_eigenfunction_eq_one_sub_spectralGap {S : Type u_1} [Fintype S] [Nontrivial S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (hπ : ∀ (x : S), π x ≠ 0) :
∃ (f : S → ℝ), f ≠ 0 ∧ ∑ x : S, (π x).toReal * f x = 0 ∧ (stepOp P) f = (1 - P.spectralGap π) • f

Existence of a mean-zero eigenfunction achieving μ = 1 - γ ([LP17], Lemma 12.2 and Lemma 13.7, pp. 161–162 and 182).

χ², ℓ^∞, and total-variation mixing upper bounds (Theorem 12.4) #

theorem Cslib.Probability.MarkovChain.IsReversible.chiSquare_bind_pow_le {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (hπ : ∀ (x : S), π x ≠ 0) (ν : PMF S) (t : ℕ) :
PMF.chiSquare (ν.bind (P ^ t).step) π ≤ P.spectralContraction π ^ (2 * t) * PMF.chiSquare ν π

χ² contraction for reversible Markov chains ([LP17], Section 12.6, Lemma 12.18): χ²(ν.bind (P ^ t) ‖ π) ≤ λ_*^{2t} χ²(ν ‖ π).

theorem Cslib.Probability.MarkovChain.IsReversible.chiSquare_pow_le {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (hπ : ∀ (x : S), π x ≠ 0) (x : S) (t : ℕ) :
PMF.chiSquare ((P ^ t).step x) π ≤ P.spectralContraction π ^ (2 * t) * ((1 - (π x).toReal) / (π x).toReal)

Pointwise χ² contraction: χ²((P ^ t) x ‖ π) ≤ λ_*^{2t} (1 - π(x)) / π(x).

theorem Cslib.Probability.MarkovChain.IsReversible.abs_toReal_div_sub_one_le {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (hπ : ∀ (z : S), π z ≠ 0) (x y : S) (t : ℕ) :
|(((P ^ t).step x) y).toReal / (π y).toReal - 1| ≤ P.spectralContraction π ^ t / √((π x).toReal * (π y).toReal)

Pointwise transition-ratio bound ([LP17], (12.13), p. 164): |P^t(x, y) / π(y) - 1| ≤ λ_*^t / √(π(x) π(y)).

theorem Cslib.Probability.MarkovChain.IsReversible.dist_bind_pow_le {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (hπ : ∀ (x : S), π x ≠ 0) (ν : PMF S) (t : ℕ) :
dist (ν.bind (P ^ t).step) π ≤ 1 / 2 * √(PMF.chiSquare ν π) * P.spectralContraction π ^ t

Total-variation contraction from an arbitrary initial distribution: dist (ν.bind (P ^ t)) π ≤ (1 / 2) √(χ²(ν ‖ π)) · λ_*^t.

theorem Cslib.Probability.MarkovChain.IsReversible.dist_pow_le {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (hπ : ∀ (x : S), π x ≠ 0) (x : S) (t : ℕ) :
dist ((P ^ t).step x) π ≤ 1 / 2 * √((1 - (π x).toReal) / (π x).toReal) * P.spectralContraction π ^ t

Pointwise total-variation contraction: dist ((P ^ t) x) π ≤ (1 / 2) √((1 - π(x)) / π(x)) · λ_*^t.

theorem Cslib.Probability.MarkovChain.IsReversible.distToStationary_le_of_le_toReal {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) {π_min : ℝ} (hpos : 0 < π_min) (hmin : ∀ (x : S), π_min ≤ (π x).toReal) (t : ℕ) :
P.distToStationary π t ≤ 1 / 2 * √((1 - π_min) / π_min) * P.spectralContraction π ^ t

Worst-case total-variation contraction d(t) ≤ (1 / 2) √((1 - π_min) / π_min) · λ_*^t.

theorem Cslib.Probability.MarkovChain.IsReversible.distToStationary_le_exp {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) {π_min : ℝ} (hpos : 0 < π_min) (hmin : ∀ (x : S), π_min ≤ (π x).toReal) (t : ℕ) :
P.distToStationary π t ≤ Real.exp (-(P.absSpectralGap π * ↑t)) / (2 * √π_min)

Exponential worst-case bound d(t) ≤ e^{-γ_* t} / (2 √π_min) ([LP17], proof of Theorem 12.4, p. 164).

theorem Cslib.Probability.MarkovChain.IsReversible.mixingTime_le_of_absSpectralGap_pos {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) {π_min : ℝ} (hpos : 0 < π_min) (hmin : ∀ (x : S), π_min ≤ (π x).toReal) (hgap : 0 < P.absSpectralGap π) {ε : ℝ} (hε : 0 < ε) :
P.mixingTime π ε ≤ ↑⌈(P.absSpectralGap π)⁻¹ * (1 / 2 * Real.log (1 / π_min) + Real.log (1 / (2 * ε)))⌉₊

Relaxation-time mixing bound ([LP17], Theorem 12.4, (12.10), pp. 163–164): t_mix(ε) ≤ ⌈γ_*⁻¹ ((1 / 2) log(1 / π_min) + log(1 / (2 ε)))⌉₊.

theorem Cslib.Probability.MarkovChain.IsReversible.mixingTime_le_ceil_mul_log {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) {π_min : ℝ} (hpos : 0 < π_min) (hmin : ∀ (x : S), π_min ≤ (π x).toReal) (hgap : 0 < P.absSpectralGap π) {ε : ℝ} (hε : 0 < ε) :
P.mixingTime π ε ≤ ↑⌈(P.absSpectralGap π)⁻¹ * Real.log (1 / (ε * π_min))⌉₊

Simplified relaxation-time mixing bound t_mix(ε) ≤ ⌈γ_*⁻¹ log(1 / (ε π_min))⌉₊ ([LP17], Theorem 12.4, (12.10), p. 163).

Eigenvalue and relaxation-time lower bounds (Theorem 12.5) #

theorem Cslib.Probability.MarkovChain.pow_abs_le_two_mul_distToStationary_of_mean_zero {S : Type u_1} [Fintype S] (P : MarkovChain S) (π : PMF S) {f : S → ℝ} {μ : ℝ} (hf0 : f ≠ 0) (hmean : ∑ y : S, (π y).toReal * f y = 0) (hf : (stepOp P) f = μ • f) (t : ℕ) :
|μ| ^ t ≤ 2 * P.distToStationary π t

Any nonzero π-mean-zero eigenfunction P.stepOp f = μ • f gives |μ|^t ≤ 2 d(t) ([LP17], (12.15), p. 164).

theorem Cslib.Probability.MarkovChain.IsStationary.pow_abs_le_two_mul_distToStationary {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hπ : P.IsStationary π) {f : S → ℝ} {μ : ℝ} (hμ : μ ≠ 1) (hf0 : f ≠ 0) (hf : (stepOp P) f = μ • f) (t : ℕ) :
|μ| ^ t ≤ 2 * P.distToStationary π t

Eigenvalue lower bound on total-variation distance ([LP17], Theorem 12.5, (12.15), p. 164): for a π-stationary chain and an eigenfunction with eigenvalue μ ≠ 1, |μ|^t ≤ 2 d(t).

theorem Cslib.Probability.MarkovChain.IsStationary.inv_one_sub_abs_sub_one_mul_log_le {S : Type u_1} [Fintype S] {P : MarkovChain S} {π : PMF S} (hπ : P.IsStationary π) {f : S → ℝ} {μ : ℝ} (hμ : |μ| < 1) (hf0 : f ≠ 0) (hf : (stepOp P) f = μ • f) {ε : ℝ} (hε : 0 < ε) {t : ℕ} (ht : P.mixingTime π ε ≤ ↑t) :
((1 - |μ|)⁻¹ - 1) * Real.log (1 / (2 * ε)) ≤ ↑t

Eigenvalue lower bound on mixing time ([LP17], Theorem 12.5, p. 164): if P is π-stationary and P.stepOp f = μ • f (f ≠ 0, |μ| < 1), then every t with t_mix(ε) ≤ t (0 < ε) satisfies ((1 - |μ|)⁻¹ - 1) log(1 / (2 ε)) ≤ t.

Reversible contraction lower bound λ_*^t ≤ 2 d(t) ([LP17], (12.15), p. 164) on a nontrivial state space with strictly positive π.

theorem Cslib.Probability.MarkovChain.IsReversible.mixingTime_eq_top_of_absSpectralGap_eq_zero {S : Type u_1} [Fintype S] [Nontrivial S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (hπ : ∀ (x : S), π x ≠ 0) (hgap : P.absSpectralGap π = 0) {ε : ℝ} (hε : ε < 1 / 2) :
P.mixingTime π ε = ⊤

When γ_* = 0 on a nontrivial state space with strictly positive π, the chain never mixes below 1 / 2: t_mix(ε) = ⊤ for every ε < 1 / 2.

theorem Cslib.Probability.MarkovChain.IsReversible.inv_absSpectralGap_sub_one_mul_log_le_mixingTime {S : Type u_1} [Fintype S] [Nontrivial S] {P : MarkovChain S} {π : PMF S} (hrev : P.IsReversible π) (hπ : ∀ (x : S), π x ≠ 0) (hgap : 0 < P.absSpectralGap π) {ε : ℝ} (hε : 0 < ε) {t : ℕ} (ht : P.mixingTime π ε ≤ ↑t) :
((P.absSpectralGap π)⁻¹ - 1) * Real.log (1 / (2 * ε)) ≤ ↑t

Relaxation-time lower bound on mixing time ([LP17], Theorem 12.5, (12.14), p. 164): ((γ_*)⁻¹ - 1) log(1 / (2 ε)) ≤ t whenever t_mix(ε) ≤ t.