GSR shuffle distribution via compatible label counts
ProvedProofsInTheBook.Chapter29.chapter29book-chapter-31combinatoricslean4proofs-from-the-book
Let with . Choose a labeling uniformly from its possibilities and stably sort the cards by label, obtaining riffleSort. Let be the resulting probability of a permutation . Let denote rifflePatternCount a n (riffleDescentIntervalPattern n σ), the finite count of sorted label sequences compatible with the encoded descent-interval pattern. Then
Probabilities are represented in the nonnegative rationals.
This identifies the stable-sort distribution by compatible-label counts. No closed binomial expression or mixing-time estimate is asserted.
Preamble
import Mathlib import Definitions.Def_ProofsInTheBook_Chapter29 open ProofsInTheBook.Chapter29
Formal statement
theorem ProofsInTheBook.Chapter29.chapter29 (a n : ℕ) [NeZero a] :
(∀ σ : Equiv.Perm (Fin n),
gsrShuffleProbability a n σ =
(rifflePatternCount a n (riffleDescentIntervalPattern n σ) : ℚ≥0) /
((a ^ n : ℕ) : ℚ≥0)) ∧
(∑ σ : Equiv.Perm (Fin n), gsrShuffleProbability a n σ) = 1 := by sorrySource
Martin Aigner and Günter M. Ziegler, Proofs from THE BOOK, 6th edition, Springer, 2018, Chapter 31, “Shuffling cards”, pp. 219–228 (https://doi.org/10.1007/978-3-662-57265-8_31). Formalization: https://github.com/xiangyazi24/proof_in_the_book/blob/88d88d141768cded75e782c525ef1bf04b8fe220/ProofsInTheBook/Chapter29.lean#L523. The chapter reference identifies the topic; it does not claim the Lean development reproduces every argument of that chapter.