Section 6.5.3 -- the top-to-random shuffle mixes in steps
ProvedMarkovMixing.top_to_random_mixingConsider the top-to-random shuffle of a deck of cards: at each step the top card is removed and reinserted at a uniformly random position. Its stationary distribution is uniform over all orderings. Write for the law of the deck after shuffles started from the ordering , for the total variation distance, and for the worst-case distance to uniformity.
The theorem (§6.5.3, display (6.16) of Levin–Peres–Wilmer, the capstone of Chapters 5–6) asserts: for every ,
After shuffles plus any linear-in- margin, the deck is exponentially close to uniform in the margin: top-to-random shuffles suffice. The proof runs through the strong stationary time of this mission — one shuffle after the original bottom card surfaces — whose tail is controlled by the coupon-collector bounds of Mission I.
import Definitions.Def_mm_stopping import Mathlib.Analysis.SpecialFunctions.Log.Basic
namespace MarkovMixing
/-- **§6.5.3, Eq. (6.16)** (LPW), the capstone of Chapters 5–6: for the
top-to-random shuffle on `n` cards,
`d(⌈n log n + α n⌉) ≤ e^{-α}` for every `α > 0`. -/
theorem top_to_random_mixing (n : ℕ) (hn : 2 ≤ n) (α : ℝ) (hα : 0 < α) :
distStationary (topToRandom n) (uniformDist (Equiv.Perm (Fin n)))
⌈(n : ℝ) * Real.log n + α * n⌉₊ ≤ Real.exp (-α) := by
sorry
end MarkovMixing
Read-back
What the Lean code literally says, in plain math · claude-fable-5
For every natural number with and every real number , the theorem asserts the following inequality. Let be the "top-to-random" transition matrix on the finite set of permutations of , whose entry at a pair of permutations is
where denotes the function sending position to when , to when , and to when — that is, the arrangement obtained from by removing the entry at position and reinserting it at position , with the intervening entries shifted toward position ; the count is of those for which agrees pointwise with . Let denote the constant function on permutations with value (the reciprocal of the cardinality of the permutation group), and set
the ceiling of the real number taken as a natural number ( is the natural logarithm; the natural-ceiling operation sends any non-positive real to , though here the argument is positive since and ). The conclusion is
where the outer supremum runs over all starting permutations , and the inner supremum runs over all finite sets of permutations (including , contributing ), comparing the total mass that the -th row of the -th matrix power assigns to with the mass that the constant density assigns to . This double supremum is the development's worst-case "distance to stationarity" at time : the supremum of an absolute difference of set masses, not a half- norm. The statement makes this one claim for the single time only; it says nothing about other times, and it does not assert that is stationary or that is stochastic — those facts do not appear as hypotheses or conclusions.
Confirmed by the mission captain (proposal self-audit).