Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 8, p. 896 — E(ν) = (n choose k)(k!)⁻¹ for the number ν of ascending k-sequences

Proved
KingmanSubadditive.Ulam.expected_num_ascending

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricsfirst-moment-methodp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1random-permutations

Let kkk be a positive integer, let π\piπ be drawn from the uniform distribution on Sn\mathcal S_nSn​, and let ν\nuν be the number of sequences i1<i2<⋯<ik≤ni_1<i_2<\dots<i_k\le ni1​<i2​<⋯<ik​≤n with π(i1)<π(i2)<⋯<π(ik)\pi(i_1)<\pi(i_2)<\dots<\pi(i_k)π(i1​)<π(i2​)<⋯<π(ik​). Then

E(ν)=∑i1<i2<⋯<ikP{π(i1)<π(i2)<⋯<π(ik)}=(nk) (k!)−1.E(\nu)=\sum_{i_1<i_2<\dots<i_k}P\{\pi(i_1)<\pi(i_2)<\dots<\pi(i_k)\}=\binom nk\,(k!)^{-1}.E(ν)=i1​<i2​<⋯<ik​∑​P{π(i1​)<π(i2​)<⋯<π(ik​)}=(kn​)(k!)−1.

This first-moment computation is the input of the tail bound (2.4.7) on l(π)l(\pi)l(π).

Formalization Note The expectation under the uniform law is the average of ν\nuν over the n!n!n! permutations.

Preamble
import Mathlib
import Definitions.Def_KingmanSubadditive_Ulam_Permutations

open scoped BigOperators
Formal statement
namespace KingmanSubadditive.Ulam

/-- The first moment of `ν` (Kingman, *Subadditive ergodic theory*, Ann. Probab.
1(6):883–899 (1973), §2.4, proof of Theorem 8, p. 896). Let `k` be a positive integer, let `π` be
uniform on `𝒮_n` and let `ν` be the number of sequences `i₁ < ⋯ < i_k ≤ n` with
`π(i₁) < ⋯ < π(i_k)`. Then `E(ν) = (n choose k)(k!)⁻¹`.

**Formalization Note** The expectation under the uniform law is the average over the `n!`
permutations of `Fin n`. -/
theorem expected_num_ascending (n k : ℕ) (hk : 0 < k) :
    (∑ σ : Equiv.Perm (Fin n), (numAscending k σ : ℝ)) / (Nat.factorial n : ℝ) =
      (n.choose k : ℝ) / (Nat.factorial k : ℝ) := by sorry

end KingmanSubadditive.Ulam
Source
Kingman, Subadditive ergodic theory, Ann. Probab. 1(6):883–899 (1973), DOI 10.1214/aop/1176996798, p. 896, §2.4, proof of Theorem 8
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 2026

    Confirmed by the mission captain (proposal self-audit).

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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me