Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 3 (Bennett's inequality) — EZ−1n∑Zi≤2VZln⁡(1/δ)/n+ln⁡(1/δ)/(3n)\mathbb EZ - \frac1n\sum Z_i \le \sqrt{2\mathbb VZ\ln(1/\delta)/n} + \ln(1/\delta)/(3n)EZ−n1​∑Zi​≤2VZln(1/δ)/n​+ln(1/δ)/(3n)

Proved
EmpiricalBernstein.SVP.theorem_3

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

bernsteinconcentrationp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let Z,Z1,…,ZnZ, Z_1, \dots, Z_nZ,Z1​,…,Zn​ be i.i.d. random variables with values in [0,1][0,1][0,1], and let δ>0\delta > 0δ>0. Then with probability at least 1−δ1 - \delta1−δ,

EZ−1n∑i=1nZi≤2 VZln⁡(1/δ)n+ln⁡(1/δ)3n,\mathbb E Z - \frac1n \sum_{i=1}^n Z_i \le \sqrt{\frac{2\,\mathbb V Z \ln(1/\delta)}{n}} + \frac{\ln(1/\delta)}{3n},EZ−n1​i=1∑n​Zi​≤n2VZln(1/δ)​​+3nln(1/δ)​,

where VZ=E(Z−EZ)2\mathbb V Z = \mathbb E(Z - \mathbb E Z)^2VZ=E(Z−EZ)2 is the variance.

This is the classical i.i.d. Bennett bound whose confidence interval scales with the unknown variance; the empirical Bernstein bound (Theorem 4) replaces VZ\mathbb VZVZ by the sample variance. It is used (in both directions, by symmetry) in the proof of Theorem 15.

Formalization Note ZZZ has law ν\nuν, a probability measure on R\mathbb RR with ν(R∖[0,1])=0\nu(\mathbb R\setminus[0,1]) = 0ν(R∖[0,1])=0; the sample (Z1,…,Zn)(Z_1,\dots,Z_n)(Z1​,…,Zn​) is the identity on Fin n → ℝ under νn\nu^nνn; VZ\mathbb V ZVZ is Mathlib's variance of the identity under ν\nuν. n≥1n \ge 1n≥1 is added: the page leaves nnn unrestricted, and at n=0n = 0n=0 Lean's 1/0=01/0 = 01/0=0 makes the statement false.

Preamble
import Mathlib

open MeasureTheory ProbabilityTheory
Formal statement
namespace EmpiricalBernstein.SVP

/-- Theorem 3, Bennett's inequality (arXiv:0907.3740v1, p. 2): `Z, Z_1, …, Z_n` i.i.d. with law `ν`
on `[0, 1]`; `(Z_1, …, Z_n)` is the identity on `Fin n → ℝ` under `ν^n`. -/
theorem theorem_3 (ν : Measure ℝ) [IsProbabilityMeasure ν] (hν : ν (Set.Icc (0 : ℝ) 1)ᶜ = 0)
    {n : ℕ} (hn : 1 ≤ n) (δ : ℝ) (hδ : 0 < δ) :
    Measure.pi (fun _ : Fin n => ν) {z | (∫ y, y ∂ν) - (1 / (n : ℝ)) * ∑ i, z i
        > Real.sqrt (2 * variance (fun y : ℝ => y) ν * Real.log (1 / δ) / n)
          + Real.log (1 / δ) / (3 * n)}
      ≤ ENNReal.ofReal δ := by sorry

end EmpiricalBernstein.SVP
Source
Maurer, Pontil, Empirical Bernstein Bounds and Sample Variance Penalization, arXiv:0907.3740v1, Theorem 3, p. 2 (conditions of Theorem 1, p. 1)
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