Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Product chains mix at time nlog⁡n2γ\frac{n\log n}{2\gamma}2γnlogn​

Proved
MarkovMixing.product_chain_mixing

by Shuze Chen · Aug 22, 2026 · Mathlib 0df444a (Lean v4.33.1)

markov-chainsmixing-timesprobability

For i=1,…,ni=1,\dots,ni=1,…,n let PiP_iPi​ be an irreducible, reversible Markov chain on a finite space WiW_iWi​ of at least two states, with stationary distribution πi\pi_iπi​ (detailed balance πi(x)Pi(x,y)=πi(y)Pi(y,x)\pi_i(x)P_i(x,y)=\pi_i(y)P_i(y,x)πi​(x)Pi​(x,y)=πi​(y)Pi​(y,x)). The product chain on W1×⋯×WnW_1\times\cdots\times W_nW1​×⋯×Wn​ picks a uniformly random coordinate and updates it by its own chain, P=1n∑iP~iP=\tfrac1n\sum_i\widetilde P_iP=n1​∑i​Pi​; its stationary distribution is the product π(x)=∏iπi(xi)\pi(x)=\prod_i\pi_i(x_i)π(x)=∏i​πi​(xi​). Mixing is measured in continuous time: with the heat kernel Ht=∑ke−ttkk!PkH_t=\sum_ke^{-t}\tfrac{t^k}{k!}P^kHt​=∑k​e−tk!tk​Pk and the total variation distance ∥μ−ν∥TV=max⁡A∣μ(A)−ν(A)∣\|\mu-\nu\|_{TV}=\max_A|\mu(A)-\nu(A)|∥μ−ν∥TV​=maxA​∣μ(A)−ν(A)∣, the continuous mixing time tmixcont(ε)t^{\mathrm{cont}}_{\mathrm{mix}}(\varepsilon)tmixcont​(ε) is the first real time at which max⁡x∥Ht(x,⋅)−π∥TV≤ε\max_x\|H_t(x,\cdot)-\pi\|_{TV}\le\varepsilonmaxx​∥Ht​(x,⋅)−π∥TV​≤ε. Each factor's spectral gap is γi=1−λ2(Pi)\gamma_i=1-\lambda_2(P_i)γi​=1−λ2​(Pi​), with λ2\lambda_2λ2​ the largest eigenvalue ≠1\ne1=1 (Mission VII); irreducibility together with at least two states is what makes this the book's γi\gamma_iγi​.

The theorem (Theorem 20.7 of Levin–Peres–Wilmer) asserts, for 0<ε<10<\varepsilon<10<ε<1, n≥2n\ge2n≥2:

  1. if every γi≥γ\gamma_i\ge\gammaγi​≥γ and every factor satisfies min⁡xπi(x)≥c0\sqrt{\min_x\pi_i(x)}\ge c_0minx​πi​(x)​≥c0​, then tmixcont(ε)≤nlog⁡n2γ+nγlog⁡1c0ε\displaystyle t^{\mathrm{cont}}_{\mathrm{mix}}(\varepsilon)\le\frac{n\log n}{2\gamma}+\frac n\gamma\log\frac{1}{c_0\varepsilon}tmixcont​(ε)≤2γnlogn​+γn​logc0​ε1​;
  2. if moreover γi=γ\gamma_i=\gammaγi​=γ exactly for every iii, then tmixcont(ε)≥n2γ(log⁡n−log⁡(8log⁡11−ε))\displaystyle t^{\mathrm{cont}}_{\mathrm{mix}}(\varepsilon)\ge\frac{n}{2\gamma}\Bigl(\log n-\log\bigl(8\log\tfrac1{1-\varepsilon}\bigr)\Bigr)tmixcont​(ε)≥2γn​(logn−log(8log1−ε1​)).

The product of nnn independent chains mixes at time nlog⁡n2γ\tfrac{n\log n}{2\gamma}2γnlogn​, not nγ\tfrac n\gammaγn​: a coupon-collector logarithm beyond the obvious slowdown, because the last coordinate to equilibrate is what matters. This is the abstract form of the hypercube's 12nlog⁡n\tfrac12n\log n21​nlogn (the hypercube is the product of nnn two-state chains with γ=1\gamma=1γ=1), and the template computation behind the cutoff of Mission XI.

Preamble
import Definitions.Def_mm_continuous
import Mathlib.Analysis.SpecialFunctions.Log.Basic
Formal statement
namespace MarkovMixing

/-- **Theorem 20.7** (LPW): mixing of continuous-time product chains.  If
each factor has spectral gap at least `γ` and `√π^{(i)}_min ≥ c₀`, then
`t^{cont}_mix(ε) ≤ (2γ)⁻¹ n log n + γ⁻¹ n log(1/(c₀ε))`; if all gaps equal
`γ`, then also
`t^{cont}_mix(ε) ≥ (n/2γ)(log n − log(8 log(1/(1−ε))))`.

Each factor is hypothesized irreducible and to have at least two states, so
that its `spectralGap` is the book's `γᵢ = 1 − λ₂`. `lambdaTwo` is a supremum
over the eigenvalues different from `1`; for a one-state chain, or the identity
chain, that set is empty and `sSup ∅ = 0` reports a spectral gap of `1` for a
chain that does not mix at all — under which the lower bound (20.16) is
false. -/
theorem product_chain_mixing {n : ℕ} (hn : 2 ≤ n) {W : Fin n → Type*}
    [∀ i, Fintype (W i)] [∀ i, DecidableEq (W i)] [∀ i, Nonempty (W i)]
    (P : ∀ i, Matrix (W i) (W i) ℝ) (hP : ∀ i, IsStochastic (P i))
    (hirr : ∀ i, Irreducible (P i)) (hcard : ∀ i, 2 ≤ Fintype.card (W i))
    (π : ∀ i, W i → ℝ) (hπ : ∀ i, IsStationary (P i) (π i))
    (hrev : ∀ i, DetailedBalance (P i) (π i))
    (γ c₀ : ℝ) (hγ : 0 < γ) (hgap : ∀ i, γ ≤ spectralGap (P i))
    (hc0 : 0 < c₀) (hmin : ∀ i, c₀ ≤ Real.sqrt (⨅ x, π i x))
    (ε : ℝ) (hε : 0 < ε) (hε1 : ε < 1) :
    contMixingTime (productChain P) (fun x => ∏ i, π i (x i)) ε ≤
      (2 * γ)⁻¹ * n * Real.log n + γ⁻¹ * n * Real.log (1 / (c₀ * ε)) ∧
    ((∀ i, spectralGap (P i) = γ) →
      (n : ℝ) / (2 * γ) *
          (Real.log n - Real.log (8 * Real.log (1 / (1 - ε)))) ≤
        contMixingTime (productChain P) (fun x => ∏ i, π i (x i)) ε) := by
  sorry

end MarkovMixing
Source
D. A. Levin, Y. Peres, E. L. Wilmer, Markov Chains and Mixing Times, AMS 2009, https://documents.epfl.ch/groups/i/ip/ipg/www/2013-2014/Random_Walks/markovmixing.pdf, Section 20.4, Theorem 20.7, Eqs. (20.15)-(20.16), p. 269

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me