Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 5.7 -- fast mixing of the Metropolis chain on colorings

Proved
MarkovMixing.colorings_mixing

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

markov-chainsmixing-timesprobability

Let GGG be a graph on nnn vertices with maximal degree Δ\DeltaΔ, and fix a number of colors qqq. A qqq-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 vvv and a color kkk uniformly at random, recolor vvv with kkk if the result is again a proper coloring, and do nothing otherwise. Its stationary distribution is uniform on the proper colorings. For a tolerance ε\varepsilonε, the mixing time tmix(ε)t_{\mathrm{mix}}(\varepsilon)tmix​(ε) is the first ttt with max⁡x∥Pt(x,⋅)−π∥TV≤ε\max_x\|P^t(x,\cdot)-\pi\|_{TV}\le\varepsilonmaxx​∥Pt(x,⋅)−π∥TV​≤ε, where ∥μ−ν∥TV=max⁡A∣μ(A)−ν(A)∣\|\mu-\nu\|_{TV}=\max_A|\mu(A)-\nu(A)|∥μ−ν∥TV​=maxA​∣μ(A)−ν(A)∣.

The theorem (Theorem 5.7 of Levin–Peres–Wilmer) asserts: if q>3Δq>3\Deltaq>3Δ — enough colors relative to the degree — then for every 0<ε≤10<\varepsilon\le10<ε≤1,

tmix(ε)  ≤  (1−3Δq)−1n (log⁡n+log⁡ε−1)  +  1.t_{\mathrm{mix}}(\varepsilon)\;\le\;\Bigl(1-\frac{3\Delta}{q}\Bigr)^{-1} n\,\bigl(\log n+\log\varepsilon^{-1}\bigr)\;+\;1.tmix​(ε)≤(1−q3Δ​)−1n(logn+logε−1)+1.

So with q>3Δq>3\Deltaq>3Δ colors the chain mixes in order nlog⁡nn\log nnlogn steps. (The trailing +1+1+1 absorbs the rounding of the real-valued bound to an integer time.)

Preamble
import Definitions.Def_mm_coupling
import Mathlib.Analysis.SpecialFunctions.Log.Basic
Formal statement
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
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 5.4.1, Theorem 5.7, p. 70

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