Lemma 10 — Hoeffding–Bernstein inequality for sampling without replacement
ProvedDynamicOnlineLP.DLA.bernstein_without_replacementLet be real numbers (), with mean , variance and range . Let () be a sample drawn without replacement from . Then for every ,
The paper quotes this from van der Vaart and Wellner (1996, Theorem 2.14.19) and uses it for every concentration step of its analysis (Lemmas 2, 5, 6 and inequality (14)).
Formalization Note The sample is the first entries of a uniformly random permutation of , and the probability is the fraction of the permutations at which the event holds. and are finite suprema and infima over the nonempty index set. In the degenerate case the right-hand side's denominator is ; Lean's convention then gives the bound , while the event has probability .
import Mathlib import Definitions.Def_DynamicOnlineLP_DLA_Instance
namespace DynamicOnlineLP.DLA
/-- Lemma 10 (Agrawal–Wang–Ye 2014, p. 887; van der Vaart and Wellner 1996, Theorem 2.14.19):
Hoeffding–Bernstein inequality for sampling without replacement. The `r` samples are the values
`c (σ 0), …, c (σ (r−1))` for a uniformly random permutation `σ` of `Fin R`. -/
theorem bernstein_without_replacement {R : ℕ} (hR : 0 < R) (c : Fin R → ℝ) (r : ℕ)
(hr : r ≤ R) (t : ℝ) (ht : 0 < t) :
let cbar : ℝ := (∑ j : Fin R, c j) / (R : ℝ)
let σR2 : ℝ := (∑ j : Fin R, (c j - cbar) ^ 2) / (R : ℝ)
let ΔR : ℝ := (⨆ j : Fin R, c j) - (⨅ j : Fin R, c j)
probPerm (fun σ : Equiv.Perm (Fin R) =>
t ≤ |∑ k ∈ firstTimes R r, c (σ k) - (r : ℝ) * cbar|) ≤
2 * Real.exp (-(t ^ 2) / (2 * (r : ℝ) * σR2 + t * ΔR)) := by sorry
end DynamicOnlineLP.DLA
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be a natural number, real numbers, with , and real. Define:
- the mean ;
- the population variance ;
- the range . These are genuine max and min, since .
For a uniformly random permutation of (each of the permutations counted equally), the theorem asserts:
The event is two-sided and uses a non-strict . The sum is over the first positions of the permutation.
Degenerate cases:
- Zero denominator. If , the division returns and the right side equals . This happens when is constant, since then .
- . The sum is empty, the deviation is , and the event never holds, so the probability is .
- . The deviation is exactly and the probability is .
- . Excluded by hypothesis.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.