Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The maximal Metropolis–Hastings kernel satisfies detailed balance

Proved
TierneyMH.Mixture.maxMHKernel_reversible

by mikedeng1 · Sep 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

markov-chain-monte-carlomarkov-kernelmetropolis-hastingsp2o-batch-p200bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let π\piπ be a probability measure and QQQ a Markov proposal kernel on a measurable space (E,E)(E,\mathcal E)(E,E). The maximal Metropolis–Hastings kernel PPP for QQQ, the kernel (1) with acceptance probability αMH\alpha_{MH}αMH​, satisfies the detailed balance relation

π(dx) P(x,dy)=π(dy) P(y,dx)\pi(dx)\,P(x,dy)=\pi(dy)\,P(y,dx)π(dx)P(x,dy)=π(dy)P(y,dx)

as measures on E⊗E\mathcal E\otimes\mathcal EE⊗E. In particular π\piπ is invariant for PPP.

In the paper this follows from the fact that αMH\alpha_{MH}αMH​ satisfies conditions (i) and (ii) together with Theorem 2. It is what makes the off-diagonal ordering of Proposition 5 a comparison between kernels with invariant distribution π\piπ, as the definition of ⪰\succeq⪰ presupposes.

Formalization Note Detailed balance is Mathlib's Kernel.IsReversible: ∫AP(x,B) π(dx)=∫BP(x,A) π(dx)\int_A P(x,B)\,\pi(dx)=\int_B P(x,A)\,\pi(dx)∫A​P(x,B)π(dx)=∫B​P(x,A)π(dx) for all measurable A,BA,BA,B.

Preamble
import Mathlib
import Definitions.Def_TierneyMH_Mixture_maxMHKernel

open MeasureTheory ProbabilityTheory
open scoped ENNReal
Formal statement
namespace TierneyMH.Mixture

/-- **The maximal Metropolis–Hastings kernel is reversible** (Tierney 1998, §2, p. 3:
`α_MH` satisfies (i)–(ii), so by Theorem 2 the kernel satisfies detailed balance).
For a probability measure `π` and a Markov proposal kernel `Q`, the kernel (1) with
acceptance probability `α_MH` satisfies the detailed balance relation (2),
`π(dx) P(x, dy) = π(dy) P(y, dx)`. -/
theorem maxMHKernel_reversible {E : Type*} [MeasurableSpace E]
    (π : Measure E) [IsProbabilityMeasure π] (Q : Kernel E E) [IsMarkovKernel Q] :
    Kernel.IsReversible (maxMHKernel π Q) π := by sorry

end TierneyMH.Mixture
Source
L. Tierney, A Note on Metropolis–Hastings Kernels for General State Spaces, Ann. Appl. Probab. 8(1) (1998) 1–9, DOI 10.1214/aoap/1027961031, p. 3, §2 (α_MH satisfies (i)–(ii); by Theorem 2 the maximal kernel is reversible)
Human review
  • Endorsed by Shuze Chen · Oct 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 1, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me