Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 11.2 -- the Matthews upper bound on cover times

Proved
MarkovMixing.matthews_upper

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

markov-chainsmixing-timesprobability

Let PPP be an irreducible Markov chain on a finite state space VVV with n=∣V∣n=|V|n=∣V∣ states. Write Ex(τy)\mathbb E_x(\tau_y)Ex​(τy​) for the expected number of steps to reach yyy from xxx, and define the two extremal quantities

thit=max⁡x,y∈V Ex(τy),tcov=max⁡x∈V Ex(τcov),t_{\mathrm{hit}}=\max_{x,y\in V}\ \mathbb E_x(\tau_y),\qquad t_{\mathrm{cov}}=\max_{x\in V}\ \mathbb E_x(\tau_{\mathrm{cov}}),thit​=x,y∈Vmax​ Ex​(τy​),tcov​=x∈Vmax​ Ex​(τcov​),

where τcov\tau_{\mathrm{cov}}τcov​ is the cover time — the first time the chain has visited every state — so tcovt_{\mathrm{cov}}tcov​ is the worst-case expected time to see the whole state space.

The theorem (the Matthews method, Theorem 11.2 of Levin–Peres–Wilmer) asserts:

tcov  ≤  thit(1+12+⋯+1n).t_{\mathrm{cov}}\;\le\;t_{\mathrm{hit}}\Bigl(1+\frac12+\cdots+\frac1n\Bigr).tcov​≤thit​(1+21​+⋯+n1​).

Covering costs at most a harmonic-sum factor ≈log⁡n\approx\log n≈logn beyond the worst single hitting time. The proof is a striking randomization trick: reveal the states in uniformly random order and bound the expected extra time to collect each new one; the kkk-th freshly revealed state is the last of kkk to be visited with probability 1/k1/k1/k.

Preamble
import Definitions.Def_mm_network
Formal statement
namespace MarkovMixing

/-- **Theorem 11.2, the Matthews method** (LPW): for an irreducible chain on
`n` states, `t_cov ≤ t_hit (1 + 1/2 + ⋯ + 1/n)`. -/
theorem matthews_upper {V : Type*} [Fintype V] [DecidableEq V] [Nonempty V]
    (P : Matrix V V ℝ) (hP : IsStochastic P) (hirr : Irreducible P) :
    coverTimeMax P ≤
      hitTimeMax P * ∑ k ∈ Finset.Icc 1 (Fintype.card V), (1 : ℝ) / k := 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 11.2, Theorem 11.2, pp. 143-144

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