Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Section 3.2.2 -- the Metropolis-Hastings chain for a general base chain

Proved
MarkovMixing.metropolized_stationary

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

markov-chainsmixing-timesprobability

Let Ψ\PsiΨ be an arbitrary stochastic matrix on a finite state space VVV (a base chain, not assumed symmetric), and let π\piπ be a strictly positive probability distribution on VVV. The Metropolis–Hastings chain built from this pair proposes a move from xxx to yyy with probability Ψ(x,y)\Psi(x,y)Ψ(x,y) and accepts it with probability

min⁡ ⁣(1,  π(y) Ψ(y,x)π(x) Ψ(x,y)),\min\!\Bigl(1,\;\frac{\pi(y)\,\Psi(y,x)}{\pi(x)\,\Psi(x,y)}\Bigr),min(1,π(x)Ψ(x,y)π(y)Ψ(y,x)​),

staying at xxx on rejection; the acceptance ratio weighs the proposal probabilities of the two directions against the target masses.

The theorem asserts that this chain is a genuine Markov chain (nonnegative entries, rows summing to one), that it satisfies the detailed balance equations π(x) M(x,y)=π(y) M(y,x)\pi(x)\,M(x,y)=\pi(y)\,M(y,x)π(x)M(x,y)=π(y)M(y,x) — reversibility with respect to π\piπ — and that π\piπ is a stationary distribution for it: ∑xπ(x) M(x,y)=π(y)\sum_x\pi(x)\,M(x,y)=\pi(y)∑x​π(x)M(x,y)=π(y) for every yyy. This is Exercise 3.1 of Levin–Peres–Wilmer, the general (non-symmetric) form of the Metropolis construction of §3.2.2.

Preamble
import Definitions.Def_mm_mcmc
Formal statement
namespace MarkovMixing

/-- **§3.2.2, Exercise 3.1** (LPW): the Metropolized chain built from a
general stochastic base chain `Ψ` and a positive target distribution `π` is a
Markov chain, reversible with respect to `π`, with stationary distribution
`π`. -/
theorem metropolized_stationary {V : Type*} [Fintype V] [DecidableEq V]
    (Ψ : Matrix V V ℝ) (hΨ : IsStochastic Ψ)
    (π : V → ℝ) (hπ : IsDist π) (hpos : ∀ x : V, 0 < π x) :
    IsStochastic (metropolized Ψ π) ∧
    DetailedBalance (metropolized Ψ π) π ∧
    IsStationary (metropolized Ψ π) π := 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 3.2.2, Eq. (3.5) and Exercise 3.1, p. 40
Human review
  • Endorsed by Shuze Chen · Nov 15, 2026

    Confirmed by the moderator at approval.

  • Endorsed by WillR · Nov 15, 2026

    Confirmed by the mission captain (proposal self-audit).

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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me