Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Unnumbered: Expected LIS of a uniform random permutation

Open
QAlgorithms.Papers.Independent.Extend50.P32.uniformPermutationLIS

by Gohan · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

For an integer n≥0n\ge0n≥0, let π\piπ be uniform over permutations of [n][n][n]. Write LIS⁡(π)\operatorname{LIS}(\pi)LIS(π) for its longest increasing subsequence length, equivalently its first RSK row. For n=0n=0n=0 the unique permutation and its subsequence are empty.

Eπ∼Unif⁡(Sn)LIS⁡(π)≤2n(n≥0).\mathbb E_{\pi\sim\operatorname{Unif}(S_n)}\operatorname{LIS}(\pi)\le2\sqrt n\qquad(n\ge0).Eπ∼Unif(Sn​)​LIS(π)≤2n​(n≥0).

This isolates the source comparison or construction with all of its domain and occurrence conventions retained.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P32
Formal statement
noncomputable section

open MeasureTheory Filter

open scoped BigOperators ENNReal Matrix ComplexOrder Topology

namespace QAlgorithms.Papers.Independent.Extend50.P32

open QAlgorithms.Papers.Independent.Support50.P38 (wordMass tv)

-- For the density matrices below, the characteristic-polynomial identity
-- preserves all eigenvalues with multiplicity and is equivalent to unitary
-- diagonalization with these real eigenvalues. No accuracy is assumed.

open QAlgorithms.Papers.Independent.Gap20.P17 (HasSpectrum)

/-- Unnumbered main corollary, PDF pp.2-3: uniform-permutation expected LIS.
The paper gives a new proof of the VK85/Pil90 bound; n=0 is included. -/
theorem uniformPermutationLIS (n : ℕ) :
    ((Fintype.card (Equiv.Perm (Fin n)) : ℝ))⁻¹ *
      (∑ pi : Equiv.Perm (Fin n), row (shape (List.ofFn (fun i => pi i))) 0) ≤
      2 * Real.sqrt n := by sorry

end QAlgorithms.Papers.Independent.Extend50.P32

end
Source
Efficient quantum tomography II, arXiv:1612.00034v1, PDF p. 2, Unnumbered
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

For every natural number n≥0n\ge0n≥0, consider all permutations π\piπ of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1} and the word (π(0),…,π(n−1))(\pi(0),\ldots,\pi(n-1))(π(0),…,π(n−1)). Starting with no rows, insert its letters successively into the first row by replacing the first strictly larger entry and inserting the displaced entry into the next row by the same rule, or appending and stopping when no strictly larger entry exists. Let R0(π)R_0(\pi)R0​(π) be the resulting first-row length, taken as zero if no row exists. Then

1n!∑πR0(π)≤2n.\frac1{n!}\sum_{\pi}R_0(\pi)\le2\sqrt n.n!1​π∑​R0​(π)≤2n​.

For n=0n=0n=0, there is one permutation of the empty set, its word and row collection are empty, and the inequality is 0≤00\le00≤0.

Human review
  • Endorsed by Shuze Chen · Oct 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 29, 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