Paper · Theorem 1
The proof in mathematics and Lean
From exchangeability to one hypergeometric count
Follow the reductions in ordinary mathematical language first, then inspect the exact Lean certificate attached to each step. The page keeps the paper's proof order visible from the initial symmetry reduction to the final consequences.
Formalization blueprint
The dependency graph at a glance
The graph follows the paper's proof direction from assumptions at the top to consequences at the bottom. Colors distinguish reduction, geometry, probability, and exported results.
IsExchangeableInLaw · centeredWeight
sliceMgf · centeredSphere
Geometry track
lemma_2_hermite_signlemma_3_three_coordinateproposition_2_two_levelProbability track
lemma_1_hoeffdinglemma_4_hypergeometricConstant track
gammaTerm · GammaGamma_eq_lastTermtheorem_1_mgf
corollary_1lemma_5proposition_1remark_1_variationalNumbering. The paper, this guide, and the Lean interface use the same labels: for example, Lemma 2 is lemma_2_hermite_sign and Theorem 1 is theorem_1_mgf.
How to read the detailed blocks
Mathematics first, formal certificate second
The exact result or equation being proved.
The mathematical reduction that advances the argument.
The declaration that checks the claim.
An assumption or representation made explicit by Lean.
Lean · theorem statement
theorem theorem_1_mgf
{Ω : Type*} [MeasurableSpace Ω]
(μ : Measure Ω) [IsProbabilityMeasure μ] {N n : ℕ}
(hN : 2 ≤ N) (hn : n ≤ N) (X : Ω → Fin N → ℝ)
(hXmeas : ∀ j, StronglyMeasurable (fun ω ↦ X ω j))
(hX : ∀ ω j, (-1 : ℝ) ≤ X ω j ∧ X ω j ≤ 1)
(hEx : IsExchangeableInLaw μ X)
(w : Fin n → ℝ) (lam : ℝ) :
Real.log (exchangeableMgf μ hn X w lam) ≤
lam ^ 2 / 2 * Gamma N * sqNorm (centeredWeight hn w)
Reduction to Hamming slices
Remove the order and reduce the cube to a subset
Set \(a=P_{\mathbf1^\perp}\widetilde w\). Because \(\sum_i a_i=0\), the centered statistic equals \(a^\top X\). Exchangeability allows an average over all coordinate permutations; convexity then moves the maximum from \([-1,1]^N\) to a sign vector.
If exactly \(k\) coordinates of the sign vector are positive, their permuted locations form a uniform \(k\)-subset \(S_k\). Substituting \(y_i=2\lambda a_i\) reduces Theorem 1 to the paper's equation (1):
Paper · equation (1)
Lean · paper-facing interfaces
lemma_1_hoeffding
lemma_2_hermite_sign
lemma_3_three_coordinate
proposition_2_two_level
lemma_4_hypergeometric
theorem_1_mgf
Equation (1), uniformly in the slice size \(k\).
Center weights → average permutations → use convexity → condition on the number of \(+1\) coordinates.
centeredWeight, IsExchangeableInLaw, sliceMgf, and centeredSphere.
The probability law, coordinate measurability, boundedness, and zero-sum identity are represented explicitly.
Proposition 2
A slice maximizer has at most two coordinate values
Fix \(\sum_i y_i=0\) and \(\lVert y\rVert_2=\rho\). If a maximizer had three distinct coordinates, the Lagrange multiplier conditions on that three-coordinate sphere section would contradict the positive Hermite derivative identity of Lemma 2. Lemma 3 packages that local contradiction; Proposition 2 applies it to every triple.
lemma_2_hermite_sign→Lemma 3lemma_3_three_coordinate→Proposition 2proposition_2_two_levelIf \(\alpha\) occurs \(m\) times and \(\beta\) occurs \(N-m\) times, with \(d=\alpha-\beta\), the constraints determine the two levels exactly:
Paper · equation (2)
Lean · Proposition 2
theorem proposition_2_two_level
{N K : ℕ} (hN : 2 ≤ N)
(hK0 : 1 ≤ K) (hKN : K ≤ N - 1)
{rhoSq : ℝ} (hrho : 0 ≤ rhoSq) {y : Fin N → ℝ}
(hy : y ∈ centeredSphere N rhoSq) :
∃ z ∈ centeredSphere N rhoSq,
(∀ x ∈ centeredSphere N rhoSq,
sliceMgf N K x ≤ sliceMgf N K z) ∧
HasAtMostTwoValues z
Proposition 2: existence of a two-level maximizer for the slice objective.
Hermite interpolation sign → second-order obstruction → repeated coordinate → global two-level structure.
lemma_2_hermite_sign → lemma_3_three_coordinate → proposition_2_two_level.
Compactness, existence of a maximizer, the degenerate radius, and the admissible elementary-symmetric terms are handled separately.
Lemma 4 and the constant
The two-level sum is hypergeometric
Let \(A\) be the \(m\)-coordinate level set. For a uniform \(k\)-subset,
The subset sum is \(d(H-km/N)\). With \(s=m\wedge(N-m)\), Lemma 4 proves
Paper · Lemma 4
Lean · Lemma 4
theorem lemma_4_hypergeometric
{N K m : ℕ} (hN : 2 ≤ N) (hK : K ≤ N)
(hm0 : 1 ≤ m) (hmN : m ≤ N - 1) (t : ℝ) :
Real.log (mgf N K m t) ≤
t ^ 2 / 8 * martingaleFactor N m := by
have huniv := log_mgf_le_universal hN hK
(by omega : m ≤ N) t
have hfactor := sampleVarianceFactor_le_martingaleFactor
hN hm0 hmN
-- algebra converts the stronger coefficient to B_{N,m}
Combining this with equation (2) produces
which closes equation (1), and hence Theorem 1.
Lemma 4 followed by the last inequality in the proof of Theorem 1.
Sampling-without-replacement martingale → conditional Hoeffding lemma → complement symmetry → maximize \(\gamma_{N,s}\).
lemma_1_hoeffding, lemma_4_hypergeometric, gammaTerm, and Gamma.
The Lean hypergeometric interface is derived from a stronger finite-population coefficient, then weakened to the paper's \(B_{N,m}\).
Constant arithmetic
Closed form, asymptotics, and comparison
A half-integer telescoping estimate proves that \(\gamma_{N,s}\) is nondecreasing for \(1\le s\le\lfloor N/2\rfloor\). Thus \(\Gamma_N\) is the last term:
Lean certificate chain
inverseSquareTail_upper_halfHalf-integer telescoping estimate.
gammaTerm_mono_step → gammaTerm_monoStepwise and interval monotonicity.
Gamma_eq_lastTermThe finite maximum occurs at \(s=\lfloor N/2\rfloor\).
Gamma_closedForm_even, Gamma_closedForm_oddThe two parity formulas in Theorem 1.
Gamma_asymptoticThe expansion \(\Gamma_N=1+3/(2N)+O(N^{-2})\).
lemma_5, lemma_5_eq_twoLemma 5: strict comparison for \(N\ge3\), equality at \(N=2\).
Consequences and sharpness
What follows from the main theorem
Confidence bound
Chernoff optimization gives the threshold \(\lVert P_{\mathbf1^\perp}\widetilde w\rVert_2\sqrt{2\Gamma_N\log(1/\delta)}\).
corollary_1Comparison with Barber
\(\Gamma_N<1+\epsilon_N\) for \(N\ge3\), with equality at \(N=2\).
lemma_5Rate lower bound
Every uniform coefficient is at least \(N/(N-1)\) for even \(N\) and \((N+1)/N\) for odd \(N\).
proposition_1Exact variational constant
The hypergeometric variational supremum equals the exact optimal exchangeable coefficient.
remark_1_variational