Section 3.2.1 -- the Metropolis chain for a symmetric base chain
ProvedMarkovMixing.metropolis_stationaryLet be a symmetric stochastic matrix on a finite state space (a proposal chain with ), and let be a strictly positive probability distribution on . The Metropolis chain for this pair moves as follows: from the current state it proposes a state with probability , accepts the proposal with probability , and stays at if the proposal is rejected.
The theorem asserts three things about this chain: it is a genuine Markov chain (its transition matrix has nonnegative entries and rows summing to one); it satisfies the detailed balance equations for all states , i.e. it is reversible with respect to ; and is a stationary distribution for it, meaning for every — running the chain one step from returns . This is the construction of §3.2.1 of Levin–Peres–Wilmer: a recipe turning any symmetric proposal mechanism into a chain with a prescribed stationary distribution.
import Definitions.Def_mm_mcmc
namespace MarkovMixing
/-- **§3.2.1** (LPW): the Metropolis chain for a positive target distribution
`π` and a symmetric stochastic base chain `Ψ` is a Markov chain, reversible
with respect to `π`, with stationary distribution `π`. -/
theorem metropolis_stationary {V : Type*} [Fintype V] [DecidableEq V]
(Ψ : Matrix V V ℝ) (hΨ : IsStochastic Ψ) (hsymm : ∀ x y : V, Ψ x y = Ψ y x)
(π : V → ℝ) (hπ : IsDist π) (hpos : ∀ x : V, 0 < π x) :
IsStochastic (metropolis Ψ π) ∧
DetailedBalance (metropolis Ψ π) π ∧
IsStationary (metropolis Ψ π) π := by
sorry
end MarkovMixing
Read-back
What the Lean code literally says, in plain math · claude-fable-5
Let be an arbitrary finite type (with decidable equality); may be empty. Let be a matrix of real numbers which is stochastic in the sense that every entry satisfies and every row sums to one, ; assume moreover that is symmetric, for all . Let be a function which is a distribution in the sense that for all and , and assume additionally that is strictly positive: for every . Define the Metropolis matrix entrywise by
where the sum in the diagonal case runs over all with , and division is the (total) real division, which would return on division by zero — though here is assumed. The theorem asserts the conjunction of three claims about :
- is stochastic: all entries of are and every row of sums to ;
- satisfies detailed balance with respect to : for all , ;
- is stationary for , where this predicate bundles two things: is a distribution (nonnegative, summing to — restating a hypothesis already given), and the row vector multiplied on the left of equals , i.e. for every .
Note that if is empty, the hypotheses that rows of sum to and that are unsatisfiable (-indexed sums are ), so in that degenerate case the statement holds vacuously.
Confirmed by the mission captain (proposal self-audit).