Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Correctness of coupling from the past (Propp--Wilson)

Proved
MarkovMixing.cftp_correct

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 with stationary distribution π\piπ, 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 draws i.i.d. maps f−1,f−2,⋯∼νf_{-1},f_{-2},\dots\sim\nuf−1​,f−2​,⋯∼ν at past times and composes them forward up to time zero,

F−t0=f−1∘f−2∘⋯∘f−tF^0_{-t}=f_{-1}\circ f_{-2}\circ\cdots\circ f_{-t}F−t0​=f−1​∘f−2​∘⋯∘f−t​

(deepening the horizon prepends randomness inside the composition; the maps near time 000 stay fixed). The composition has coalesced when it is a constant map, and the algorithm outputs the common value. Assume coalescence is almost sure: P{F−t0 not constant}→0\mathbb P\{F^0_{-t}\text{ not constant}\}\to0P{F−t0​ not constant}→0.

The theorem (correctness of coupling from the past, Propp–Wilson; §22.2–22.3 of Levin–Peres–Wilmer — the capstone of Chapter 22 and of this series) asserts: for every state yyy,

P{F−t0 coalesced with common value y}  ⟶  π(y)(t→∞).\mathbb P\bigl\{F^0_{-t}\ \text{coalesced with common value}\ y\bigr\}\;\longrightarrow\;\pi(y)\qquad(t\to\infty).P{F−t0​ coalesced with common value y}⟶π(y)(t→∞).

The output of CFTP is an exact sample from the stationary distribution — no mixing-time error, no knowledge of tmixt_{\mathrm{mix}}tmix​ required. The point is the direction of composition: for fixed ttt the law of F−t0(x)F^0_{-t}(x)F−t0​(x) is that of ttt forward steps from xxx, but the coalesced value is shared by all xxx, so on the coalescence event the output agrees with a chain started from π\piπ itself — and the discrepancy is bounded by the vanishing non-coalescence probability. Running the same maps into the future instead produces a biased sample; the from-the-past order is what the proof, and the formalization, pin down.

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

/-- **§22.2–22.3, correctness of coupling from the past** (Propp–Wilson;
LPW), the capstone of Chapter 22: if the update maps represent `P`, `π` is
stationary for `P`, and coalescence is almost sure, then the CFTP output is
distributed *exactly* according to `π`: the probability of collapsing to `y`
within `t` steps from the past tends to `π(y)`. -/
theorem cftp_correct {V : Type*} [Fintype V] [DecidableEq V] [Nonempty V]
    (P : Matrix V V ℝ) (hP : IsStochastic P)
    (π : V → ℝ) (hπ : IsStationary P π)
    (ν : (V → V) → ℝ) (hν : IsRandomMapRep P ν)
    (hcoal : Filter.Tendsto (fun t => cftpNotCoalescedProb ν t)
      Filter.atTop (nhds 0)) (y : V) :
    Filter.Tendsto (fun t => cftpOutputProb ν t y)
      Filter.atTop (nhds (π y)) := 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, Sections 22.2-22.3, pp. 288-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