Theorem 5.7 -- fast mixing of the Metropolis chain on colorings
ProvedMarkovMixing.colorings_mixingLet be a graph on vertices with maximal degree , and fix a number of colors . A -coloring of the vertices is proper if adjacent vertices always receive distinct colors. The Metropolis chain on proper colorings moves as follows: pick a vertex and a color uniformly at random, recolor with if the result is again a proper coloring, and do nothing otherwise. Its stationary distribution is uniform on the proper colorings. For a tolerance , the mixing time is the first with , where .
The theorem (Theorem 5.7 of Levin–Peres–Wilmer) asserts: if — enough colors relative to the degree — then for every ,
So with colors the chain mixes in order steps. (The trailing absorbs the rounding of the real-valued bound to an integer time.)
import Definitions.Def_mm_coupling import Mathlib.Analysis.SpecialFunctions.Log.Basic
namespace MarkovMixing
/-- **Theorem 5.7** (LPW): for the Metropolis chain on proper `q`-colorings
of a graph with `n` vertices and maximal degree `Δ`, if `q > 3Δ`, then with
`c_met(Δ,q) = 1 − 3Δ/q`,
`t_mix(ε) ≤ c_met(Δ,q)⁻¹ n (log n + log(1/ε)) + 1`. -/
theorem colorings_mixing {Vv : Type*} [Fintype Vv] [DecidableEq Vv] [Nonempty Vv]
(G : SimpleGraph Vv) [DecidableRel G.Adj] (q : ℕ)
(hq : 3 * G.maxDegree < q) (ε : ℝ) (hε : 0 < ε) (hε1 : ε ≤ 1) :
(mixingTime (coloringMetropolis G q)
(uniformDist {c : Vv → Fin q // IsProperColoring G c}) ε : ℝ) ≤
(1 - 3 * (G.maxDegree : ℝ) / q)⁻¹ * (Fintype.card Vv) *
(Real.log (Fintype.card Vv) + Real.log ε⁻¹) + 1 := by
sorry
end MarkovMixing
Read-back
What the Lean code literally says, in plain math · claude-fable-5
Let be a finite, nonempty vertex type with decidable equality, a simple graph on with decidable adjacency, and a natural number of colors satisfying the strict hypothesis , where is the maximum vertex degree of (this forces ). Let be a real number with . The state space is the set of proper -colorings of : functions such that whenever in . On the theorem considers the following specific Markov chain (a real matrix): for two distinct proper colorings , the transition probability is
and the diagonal entry is defined as the complement , so each row sums to by construction (the definition does not itself assert that ; that is a consequence, not a hypothesis). This is the chain that proposes a uniformly random vertex and a uniformly random one of the colors — each of the proposals having probability — and accepts exactly when the modified coloring is again proper (proposals recoloring a vertex with its current color, or producing an improper coloring, contribute to holding in place). The target distribution is the uniform distribution on , assigning every proper coloring the mass ; note that if had no proper -coloring then would be empty and, by the total-function convention , would be identically zero — the statement itself does not assume is nonempty. With total-variation distance and worst-case distance (row of the -th power of ), the mixing time is
with the convention that the infimum of an empty set of naturals is , so the left side would be (and the claim vacuously easy) if no time ever brought the chain within of . The theorem asserts the single inequality, with the natural number cast to a real:
where and are cast to reals (the hypothesis makes strictly positive, so the inverse is genuine), is the natural logarithm (not base ), since is nonempty, and since . The bound is stated for this one fixed graph, color count, and (all universally quantified); nothing is claimed about lower bounds, about the chain's irreducibility or stationarity of , or for .
Confirmed by the mission captain (proposal self-audit).