Section 3.2.2 -- the Metropolis-Hastings chain for a general base chain
ProvedMarkovMixing.metropolized_stationaryLet be an arbitrary stochastic matrix on a finite state space (a base chain, not assumed symmetric), and let be a strictly positive probability distribution on . The Metropolis–Hastings chain built from this pair proposes a move from to with probability and accepts it with probability
staying at 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 — reversibility with respect to — and that is a stationary distribution for it: for every . This is Exercise 3.1 of Levin–Peres–Wilmer, the general (non-symmetric) form of the Metropolis construction of §3.2.2.
import Definitions.Def_mm_mcmc
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
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 real matrix which is stochastic: every entry satisfies and every row sums to one, . No symmetry or irreducibility is assumed of . Let be a distribution ( for all and ) which is moreover strictly positive: for every . Define the Metropolis–Hastings ("metropolized") matrix entrywise by
where the diagonal sum runs over all with . Division here is the total real division that returns when the denominator is : in particular, if (with ), the acceptance ratio is by this convention, and the corresponding entry is . The theorem asserts the conjunction of three claims about :
- is stochastic: for all , and for every ;
- satisfies detailed balance with respect to : for all , ;
- is stationary for , a predicate bundling two parts: is a distribution (nonnegative and summing to , restating a hypothesis already assumed), and the row vector is fixed by right-multiplication by , i.e. for every .
If is empty, the hypotheses that the rows of sum to and that cannot hold (empty sums are ), so the statement is vacuously true in that case.
Confirmed by the mission captain (proposal self-audit).