Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 3 — R_n(F)/2 − 2√(2/n) ≤ D_n(F) ≤ R_n(F) + 4√(2/n), and R_n(F) − 4√(2/n) ≤ D_n(F) if F = −F

Proved
RadGauss.Discrepancy.lemma_3

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

generalization-boundlearning-theorymaximum-discrepancyp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1rademacher-complexity

Let μ\muμ be a probability measure on a measurable space X\mathcal XX, let n=2mn = 2mn=2m with m≥1m\ge1m≥1, and let FFF be a nonempty class of measurable functions mapping X\mathcal XX to [−1,1][-1,1][−1,1]. Let Rn(F)R_n(F)Rn​(F) be the Rademacher complexity and Dn(F)D_n(F)Dn​(F) the expected maximum discrepancy of FFF (Definition 2). Then

Rn(F)2−22n  ≤  Dn(F)  ≤  Rn(F)+42n.\frac{R_n(F)}{2} - 2\sqrt{\frac2n} \;\le\; D_n(F) \;\le\; R_n(F) + 4\sqrt{\frac2n}.2Rn​(F)​−2n2​​≤Dn​(F)≤Rn​(F)+4n2​​.

If FFF is closed under negation (f∈Ff\in Ff∈F implies −f∈F-f\in F−f∈F), the lower bound can be strengthened to

Rn(F)−42n≤Dn(F).R_n(F) - 4\sqrt{\frac2n} \le D_n(F).Rn​(F)−4n2​​≤Dn​(F).

So the expected maximum discrepancy and the Rademacher complexity are equivalent up to a factor 222 and an additive O(1/n)O(1/\sqrt n)O(1/n​), and either may replace the other in data-dependent risk bounds.

Formalization Note

  1. The sample size is even, n=2mn = 2mn=2m, m≥1m \ge 1m≥1, because D^n\hat D_nD^n​ is defined with half sums; for odd nnn the paper's n/2n/2n/2 is undefined.
  2. Since RnR_nRn​ takes values in [0,∞][0,\infty][0,∞], each inequality a−c≤Da - c \le Da−c≤D is written a≤D+ca \le D + ca≤D+c, with the real quantities Dn(F)D_n(F)Dn​(F) and ccc embedded by ENNReal.ofReal; for Dn(F)≥0D_n(F) \ge 0Dn​(F)≥0 (true for nonempty FFF) and finite Rn(F)R_n(F)Rn​(F) (true for FFF bounded) this is equivalent to the printed form.
  3. Added hypotheses, which the paper uses implicitly: FFF nonempty, every f∈Ff\in Ff∈F measurable, and for every sign vector σ\sigmaσ the map x↦sup⁡f∈F∑iσif(xi)x\mapsto\sup_{f\in F}\sum_i\sigma_i f(x_i)x↦supf∈F​∑i​σi​f(xi​) is measurable, so that DnD_nDn​ is a genuine expectation.
  4. The third display of Lemma 3, P{∣D^n(F)−Dn(F)∣≥ϵ}≤2exp⁡(−ϵ2n/2)P\{|\hat D_n(F)-D_n(F)|\ge\epsilon\}\le 2\exp(-\epsilon^2 n/2)P{∣D^n​(F)−Dn​(F)∣≥ϵ}≤2exp(−ϵ2n/2), is not part of this statement: it is false as printed (for F={f}F=\{f\}F={f}, f(X)f(X)f(X) uniform on {±1}\{\pm1\}{±1}, n=2n=2n=2, ϵ=2\epsilon=2ϵ=2, the left side is 1/2>2e−41/2 > 2e^{-4}1/2>2e−4).
Preamble
import Definitions.Def_RadGauss_RiskBound_rademacherComplexity
import Definitions.Def_RadGauss_Discrepancy_maxDiscrepancy
import Definitions.Def_RadGauss_Discrepancy_condSup

open MeasureTheory
open scoped ENNReal Pointwise
Formal statement
namespace RadGauss.Discrepancy

/-- **Lemma 3** (p. 465), first and second displays, for `n = 2m`:
`R_n(F)/2 − 2√(2/n) ≤ D_n(F) ≤ R_n(F) + 4√(2/n)`, and `R_n(F) − 4√(2/n) ≤ D_n(F)` when `F` is
closed under negation. Subtractions are moved to the other side to avoid truncated subtraction
in `ℝ≥0∞`. -/
theorem lemma_3 {X : Type*} [MeasurableSpace X] (μ : Measure X)
    [IsProbabilityMeasure μ] (m : ℕ) (hm : 0 < m) (F : Set (X → ℝ)) (hFne : F.Nonempty)
    (hFrange : ∀ f ∈ F, ∀ x, f x ∈ Set.Icc (-1 : ℝ) 1)
    (hFmeas : ∀ f ∈ F, Measurable f)
    (hsup : ∀ σ : Fin (2 * m) → Bool,
      Measurable fun x : Fin (2 * m) → X => ⨆ f : F, ∑ i, RadGauss.RiskBound.signVal (σ i) * (f : X → ℝ) (x i)) :
    (RadGauss.RiskBound.rademacherComplexity μ (2 * m) F / 2
        ≤ ENNReal.ofReal (expectedMaxDiscrepancy μ m F)
          + ENNReal.ofReal (2 * Real.sqrt (2 / ((2 * m : ℕ) : ℝ))) ∧
      ENNReal.ofReal (expectedMaxDiscrepancy μ m F)
        ≤ RadGauss.RiskBound.rademacherComplexity μ (2 * m) F
          + ENNReal.ofReal (4 * Real.sqrt (2 / ((2 * m : ℕ) : ℝ)))) ∧
    ((∀ f ∈ F, -f ∈ F) →
      RadGauss.RiskBound.rademacherComplexity μ (2 * m) F
        ≤ ENNReal.ofReal (expectedMaxDiscrepancy μ m F)
          + ENNReal.ofReal (4 * Real.sqrt (2 / ((2 * m : ℕ) : ℝ)))) := by sorry

end RadGauss.Discrepancy
Source
Bartlett, Mendelson, Rademacher and Gaussian Complexities: Risk Bounds and Structural Results, J. Mach. Learn. Res. 3 (2002), p. 465 (PDF p. 3), Lemma 3, first and second displays
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 5, 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