Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Proof of Theorem 1: Pr⁡{∑i∣∣Ni∣/n−μ(Ci)∣≥λ}≤2Ke−nλ2/2\Pr\{\sum_i ||N_i|/n - \mu(C_i)| \ge \lambda\} \le 2^K e^{-n\lambda^2/2}Pr{∑i​∣∣Ni​∣/n−μ(Ci​)∣≥λ}≤2Ke−nλ2/2 (Bretagnolle–Huber–Carol)

Proved
XuMannorRobust.Standard.bretagnolle_huber_carol

by mikedeng1 · Sep 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

concentrationlearning-theorymultinomialp2o-batch-p200bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let μ\muμ be a probability measure on a measurable space Z\mathcal ZZ and let C1,…,CKC_1, \dots, C_KC1​,…,CK​ be a partition of Z\mathcal ZZ into KKK pairwise disjoint measurable sets. Draw a training set s=(s1,…,sn)\mathbf s = (s_1, \dots, s_n)s=(s1​,…,sn​) of n≥1n \ge 1n≥1 i.i.d. samples from μ\muμ and let ∣Ni∣|N_i|∣Ni​∣ be the number of samples falling in CiC_iCi​. Then for every λ≥0\lambda \ge 0λ≥0,

Pr⁡{∑i=1K∣∣Ni∣n−μ(Ci)∣≥λ}≤2Kexp⁡(−nλ22).\Pr\left\{\sum_{i=1}^K \left| \frac{|N_i|}{n} - \mu(C_i) \right| \ge \lambda \right\} \le 2^K \exp\left(\frac{-n\lambda^2}{2}\right).Pr{i=1∑K​​n∣Ni​∣​−μ(Ci​)​≥λ}≤2Kexp(2−nλ2​).

This is the Bretagnolle–Huber–Carol inequality for the multinomial vector (∣N1∣,…,∣NK∣)(|N_1|, \dots, |N_K|)(∣N1​∣,…,∣NK​∣) (van der Vaart and Wellner 2000, Proposition A.6.6), which Xu and Mannor invoke in the proof of Theorem 1. It controls the ℓ1\ell_1ℓ1​ distance between the empirical and the true cell probabilities uniformly in the partition's geometry: only the number of cells KKK enters.

Formalization Note The probability is the outer measure of the event under the product measure μn\mu^nμn on Fin n → Z. The hypothesis λ≥0\lambda \ge 0λ≥0 is added: for λ<0\lambda < 0λ<0 the event is everything while the right side can be below 111, and the paper uses the inequality only at λ>0\lambda > 0λ>0. μ(Ci)\mu(C_i)μ(Ci​) is taken as a real number (ENNReal.toReal), which is exact for a probability measure.

Preamble
import Mathlib
import Definitions.Def_XuMannorRobust_Standard_CellCount

open MeasureTheory
Formal statement
namespace XuMannorRobust.Standard

/-- **Bretagnolle–Huber–Carol inequality** as used in the proof of Theorem 1 (Xu & Mannor 2012,
p. 396; van der Vaart–Wellner 2000, Prop. A.6.6). For a measurable partition `C_1, …, C_K` of `Z`,
`n ≥ 1` i.i.d. draws from a probability measure `μ` and `λ ≥ 0`,
`Pr{∑_i ||N_i|/n − μ(C_i)| ≥ λ} ≤ 2^K exp(−nλ²/2)`. The probability is the outer measure of the
event under `μⁿ`. The hypothesis `λ ≥ 0` is added (the display is false for `λ < 0`). -/
theorem bretagnolle_huber_carol {Z : Type*} [MeasurableSpace Z] (μ : Measure Z)
    [IsProbabilityMeasure μ] {K : ℕ} (C : Fin K → Set Z) (hC_meas : ∀ i, MeasurableSet (C i))
    (hC_disj : Pairwise (Function.onFun Disjoint C)) (hC_cover : (⋃ i, C i) = Set.univ)
    {n : ℕ} (hn : 0 < n) (lam : ℝ) (hlam : 0 ≤ lam) :
    (Measure.pi fun _ : Fin n => μ)
        {s | lam ≤ ∑ i, |(cellCount C s i : ℝ) / (n : ℝ) - (μ (C i)).toReal|}
      ≤ ENNReal.ofReal ((2 : ℝ) ^ K * Real.exp (-((n : ℝ) * lam ^ 2) / 2)) := by sorry

end XuMannorRobust.Standard
Source
Xu & Mannor, Robustness and Generalization, Mach Learn 86 (2012), DOI 10.1007/s10994-011-5268-1, p. 396, proof of Theorem 1 (Bretagnolle–Huber–Carol display; van der Vaart & Wellner 2000, Prop. A6.6)
Human review
  • Endorsed by Shuze Chen · Oct 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 1, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me