Theorem 11.2 -- the Matthews upper bound on cover times
ProvedMarkovMixing.matthews_upperLet be an irreducible Markov chain on a finite state space with states. Write for the expected number of steps to reach from , and define the two extremal quantities
where is the cover time — the first time the chain has visited every state — so 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:
Covering costs at most a harmonic-sum factor 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 -th freshly revealed state is the last of to be visited with probability .
import Definitions.Def_mm_network
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
Read-back
What the Lean code literally says, in plain math · claude-fable-5
Read-back: matthews_upper
Let be a finite, nonempty type (with decidable equality) and let be a matrix of real numbers, assumed to be stochastic ( for all , and each row sums to : for every ) and "irreducible" in the following sense: for every pair there exists a natural number with — the exponent is allowed, and is the identity, so the case holds trivially. For a length- vertex sequence let its weight be (the empty product when ). Define three quantities by unfolding the custom definitions in the statement. (i) For , the "expected hitting time" is , where is the total weight of all length- sequences starting at that avoid at every index including index ; probabilistically is the chance the walk from has not visited through time , so is the expected first-hitting time of from — and in the diagonal case every term is (the start point itself violates avoidance), so , not an expected return time. (ii) The quantity written is the supremum of over all ordered pairs, diagonal pairs included (harmless, since they contribute ). (iii) The "expected cover time from " is , where is the total weight of all length- sequences starting at for which some vertex is avoided at every index ; probabilistically is the chance that the walk from has not yet visited every vertex by time , so is the expected time to cover ; and . All infinite series here are Lean tsums, which take the value whenever the series fails to be summable, and the suprema are real-number suprema over finite nonempty index sets (hence genuine maxima). With the cardinality of , the theorem asserts the single non-strict inequality
i.e. the largest expected cover time over all starting states is at most the largest expected pairwise hitting time multiplied by the harmonic number (here the sum runs over the integers from to inclusive, so when has a single element, in which case both and are and the claim is trivially true). No aperiodicity, reversibility, or stationarity assumption appears — only stochasticity and the irreducibility condition above.
Confirmed by the mission captain (proposal self-audit).