Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Coalescence is almost sure

Proved
MarkovMixing.cftp_coalescence

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

markov-chainsmixing-timesprobability

Let PPP be a Markov chain on a finite state space VVV, and let ν\nuν be a random mapping representation of PPP: a probability distribution on update functions f:V→Vf:V\to Vf:V→V with ν{f:f(x)=y}=P(x,y)\nu\{f:f(x)=y\}=P(x,y)ν{f:f(x)=y}=P(x,y) for all x,yx,yx,y. Coupling from the past composes i.i.d. maps drawn from ν\nuν at times −1,−2,…-1,-2,\dots−1,−2,… forward to time zero, F−t0=f−1∘⋯∘f−tF^0_{-t}=f_{-1}\circ\cdots\circ f_{-t}F−t0​=f−1​∘⋯∘f−t​, and the composition has coalesced when it is a constant map — all starting states have been funneled to one common value.

The theorem (§22.3 of Levin–Peres–Wilmer) asserts: if some finite block of updates collapses the state space with positive probability — there is a t0t_0t0​ and a tuple of maps (g1,…,gt0)(g_1,\dots,g_{t_0})(g1​,…,gt0​​), each of positive ν\nuν-probability, whose composition is constant — then coalescence is almost sure:

P{F−t0 not yet constant}  ⟶  0(t→∞).\mathbb P\bigl\{F^0_{-t}\ \text{not yet constant}\bigr\}\;\longrightarrow\;0\qquad(t\to\infty).P{F−t0​ not yet constant}⟶0(t→∞).

The proof is a geometric-trials argument: the past divides into disjoint blocks of length t0t_0t0​, each an independent chance of at least p=∏iν(gi)>0p=\prod_i\nu(g_i)>0p=∏i​ν(gi​)>0 to collapse everything, and one collapsed block anywhere inside the composition makes the whole composition constant. This is the standing hypothesis of the correctness theorem — and the reason CFTP terminates in practice: for an irreducible aperiodic chain a collapsing block always exists, so the algorithm halts with probability one.

Preamble
import Definitions.Def_mm_cftp
import Mathlib.Analysis.SpecificLimits.Basic
Formal statement
namespace MarkovMixing

/-- **§22.3** (LPW): if some finite composition of update maps collapses the
state space with positive probability, then coalescence is almost sure: the
probability that CFTP has not coalesced by time `t` tends to `0`. -/
theorem cftp_coalescence {V : Type*} [Fintype V] [DecidableEq V] [Nonempty V]
    (P : Matrix V V ℝ) (hP : IsStochastic P)
    (ν : (V → V) → ℝ) (hν : IsRandomMapRep P ν)
    (hpos : ∃ (t : ℕ) (F : Fin t → (V → V)),
      0 < ∏ i, ν (F i) ∧ ∀ x y : V, cftpCompose F x = cftpCompose F y) :
    Filter.Tendsto (fun t => cftpNotCoalescedProb ν t)
      Filter.atTop (nhds 0) := 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 22.3, pp. 291-292

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