Cutoff is a step-function profile
ProvedMarkovMixing.cutoff_iff_stepConsider a family of chains: for each , an irreducible and aperiodic chain on a finite state space with stationary distribution — irreducible and aperiodic so that it does converge to and its mixing times are genuine finite times. Write for the worst-case total variation distance to stationarity (), , and . The family has a cutoff when for every : the times to mix well and to mix barely agree to leading order.
The theorem (Lemma 18.1 of Levin–Peres–Wilmer) asserts that cutoff is equivalent to the distance profile converging to a step function on the time scale: the family has a cutoff if and only if for every
- implies — just before the mixing time the family is asymptotically unmixed;
- implies — just after it, asymptotically mixed.
This equivalence is the working definition of cutoff in practice: sharp upper and lower bounds on at times (as produced for the hypercube in this mission) are exactly what the right-hand side asks for.
import Definitions.Def_mm_cutoff
namespace MarkovMixing
/-- **Lemma 18.1** (LPW): a sequence of chains has a cutoff if and only if,
on the time scale of `t_mix`, the distance to stationarity approaches a step
function: `d_n(⌊c t_mix⌋) → 1` for `c < 1` and `→ 0` for `c > 1`.
Each chain in the sequence is hypothesized irreducible and aperiodic. LPW
speak of "the mixing time for the `n`-th chain", taking for granted that
`t_mix` is a genuine finite time, which is to say that `d_n(t) → 0`;
`mixingTime` is an infimum over the naturals, and for a chain that never comes
within `ε` of stationarity that infimum is over an empty set and reports the
junk value `0`. -/
theorem cutoff_iff_step {V : ℕ → Type*} [∀ n, Fintype (V n)]
[∀ n, DecidableEq (V n)] [∀ n, Nonempty (V n)]
(P : ∀ n, Matrix (V n) (V n) ℝ) (π : ∀ n, V n → ℝ)
(hP : ∀ n, IsStochastic (P n)) (hirr : ∀ n, Irreducible (P n))
(hap : ∀ n, Aperiodic (P n)) (hπ : ∀ n, IsStationary (P n) (π n)) :
HasCutoff P π ↔
∀ c : ℝ, 0 < c →
(c < 1 → Filter.Tendsto
(fun n => distStationary (P n) (π n) ⌊c * tMix (P n) (π n)⌋₊)
Filter.atTop (nhds 1)) ∧
(1 < c → Filter.Tendsto
(fun n => distStationary (P n) (π n) ⌊c * tMix (P n) (π n)⌋₊)
Filter.atTop (nhds 0)) := by
sorry
end MarkovMixingRead-back
What the Lean code literally says, in plain math · claude-opus-5
Read-back: MarkovMixing.cutoff_iff_step
The objects being quantified over
The statement is universally quantified over an infinite family of finite state spaces and transition matrices. Explicitly, it fixes:
- an implicit family of types indexed by the natural numbers (written ), together with three typeclass assumptions holding for every index : each is a finite type, each has decidable equality, and each is nonempty;
- a family of real square matrices , one for each (the entry at row , column is written );
- a family of real-valued functions , one for each . Nothing in the type of makes it a probability distribution; that is imposed by a hypothesis below.
There is no hypothesis relating to for , no hypothesis that grows, and no hypothesis that the family is nonconstant: a single fixed chain repeated for every is an admissible instance.
The four standing hypotheses
Each of the following is asserted for every (each hypothesis is itself a statement).
hP — is stochastic. This unfolds to the conjunction of
hirr — is "irreducible" in the sense of this development. This is a custom predicate (it shadows Mathlib's Irreducible, which is about ring elements; the one used here is MarkovMixing.Irreducible). It unfolds to
where is the -fold matrix product and is the identity matrix. Because is permitted and , the diagonal instances of this hypothesis are automatically true and impose nothing; the content is entirely in the off-diagonal instances , for which gives the entry and so some must work. In words: every ordered pair of distinct states is connected by a positive-probability path of some finite length.
hap — is "aperiodic" in the sense of this development. This asserts that for every state the quantity equals , where
The supremum is the supremum in the natural numbers, which is a total operation with the convention that the supremum of an empty set or of a set unbounded above is . Two branches therefore matter:
- If (the state has at least one positive-probability return time), then does not belong to the set of common divisors — since only for and every element of is — and the set of common divisors is bounded by the least element of . In that case the supremum is attained and equals . So the hypothesis reads: the greatest common divisor of the return times of is .
- If (no has ), then every vacuously divides every element of the empty set, the set of common divisors is all of , hence unbounded, and the junk convention returns . So this branch is excluded by
hap: assuminghap, every state necessarily has at least one return time, and the greatest common divisor of those return times is .
hπ — is a stationary distribution for . This unfolds to the conjunction of three conditions:
(The last is the left vector–matrix product written out entrywise.)
These four hypotheses are jointly satisfiable — for instance take every to be a one-point type, and — so the theorem is not vacuous.
Note also that the typeclass assumption " is nonempty" is already implied by hπ: if were empty, the sum would be , contradicting the requirement that it equal . It is therefore a redundant hypothesis, though it independently rules out one junk branch described below.
The distance and mixing-time notions appearing in the conclusion
Total variation distance . For ,
the supremum being taken over all subsets of (as is a finite type, this is a supremum over a finite, nonempty collection, hence an attained maximum; the empty subset contributes the value , so always). There is no factor of and no norm: this is the "maximum discrepancy over events" form.
Row distribution. is the function , i.e. the -th row of the -th matrix power, with .
Distance to stationarity at time . For ,
The outer supremum is over the type itself. This is where nonemptiness matters: a supremum over an empty real-indexed family would return the junk value . Both the explicit Nonempty instance and (redundantly) hπ make that branch unreachable here.
Mixing time at threshold . For ,
the infimum being the natural-number infimum, a total operation returning when the set is empty. So "the mixing time is " conflates two situations: the chain already satisfies at time , and no time whatsoever achieves accuracy . Note , so the first situation occurs exactly when , which is perfectly possible for small state spaces; and by standard finite-chain theory the second (empty-set) situation cannot occur for any under the standing hypotheses, since an irreducible aperiodic stochastic matrix with stationary distribution has as . Since every threshold used below is strictly positive, the empty-infimum branch is unreachable, but the "mixing time equals because time already suffices" branch is reachable.
The reference mixing time. , i.e. the threshold is fixed at .
Cutoff. unfolds to:
where both mixing times are natural numbers cast to , the limit is along the filter of large , and the convergence is to the point in the usual topology on . The quotient is real division with the total-function convention . That branch is reachable: the denominator is exactly when , which for a fixed small holds for every chain whose stationary distribution stays bounded away from — for such families the sequence being tested is identically and does not converge to . For families with the denominator is eventually positive for each fixed , so the convention only affects finitely many terms and does not affect the limit. The numerator can likewise be under the analogous condition .
Note that as defined takes no stochasticity, irreducibility, aperiodicity or stationarity of its own; it is a bare statement about the two families and .
What the theorem asserts
Under the standing hypotheses above, the theorem states a logical equivalence (an "if and only if", not an implication in either direction) between the following two statements.
Left side. : for every real with , the ratio tends to as .
Right side. For every real number with , the conjunction of two implications holds:
Here is the natural number cast to , the product is a real number, and is the natural-number floor, which is then used as the time argument of . Both limits are along and are convergence in to the points and respectively. The two conjuncts refer to the same sequence of numbers; only the hypotheses and distinguish them.
Spelling out the case analysis in : for the second conjunct is vacuously true and the assertion is ; for the first conjunct is vacuously true and the assertion is ; and at both implications have false premises, so the case imposes nothing at all. Values are excluded by the hypothesis .
Junk-value and edge-case conventions, and whether they are reachable
- Natural-number floor of a negative real. for is defined to be . Unreachable here: and , so the argument is always .
- Floor truncation. is generally not an integer; the statement evaluates the distance at the integer part, so e.g. for slightly below and small the argument can coincide with itself, and for any with the argument is .
- Real division by zero in
HasCutoff. . Reachable, as described above, precisely when , i.e. . - Natural-number infimum of the empty set (in the definition of mixing time) . Not reachable for the thresholds actually used (, with , and ), because the standing hypotheses force ; but the value for the mixing time is reachable through the other route, namely .
- Natural-number supremum of an unbounded set (in the definition of period). Reachable in general — it is exactly what happens for a state with no return times — but
haprules it out by demanding the value . - Supremum over an empty index type (in the definition of , whose outer supremum ranges over ). Unreachable: is assumed nonempty, and
hπindependently forces it. - The inner supremum in the total variation distance ranges over all subsets of a finite type, always including the empty subset, so it is a genuine attained maximum and is never negative.
- Degenerate families. Nothing prevents for all ; in that case for every , and the right-hand side asks the single sequence to converge to (from the clause) and to (from the clause) simultaneously.
Redundancies and vacuity
The hypothesis that each is nonempty is implied by hπ and is therefore redundant as a mathematical assumption. The instances of hirr are automatically true and impose no condition. The case on the right-hand side imposes no condition. No hypothesis is unsatisfiable, and the hypothesis set as a whole is satisfiable, so the statement is not vacuously true.
The declaration is stated with its proof omitted (the proof body is a placeholder), so nothing is proved here; only the statement above is asserted.
Confirmed by the mission captain (proposal self-audit).