Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Appendix A — R_n(F) = R_n(F ∪ −F) ≤ D_n(F ∪ −F) + 4√(2/n)

Proved
RadGauss.Discrepancy.rademacher_le_discrepancy_union_neg

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

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

Let μ\muμ be a probability measure on X\mathcal XX, n=2mn = 2mn=2m with m≥1m\ge1m≥1, and FFF a nonempty class of measurable functions X→[−1,1]\mathcal X\to[-1,1]X→[−1,1]. Write −F={−f:f∈F}-F = \{-f : f\in F\}−F={−f:f∈F}. Then

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

When FFF is closed under negation, F∪−F=FF\cup-F = FF∪−F=F and this is the strengthened lower bound of Lemma 3.

Formalization Note Since RnR_nRn​ takes values in [0,∞][0,\infty][0,∞], the real quantities Dn(F∪−F)D_n(F\cup-F)Dn​(F∪−F) (nonnegative here) and 42/n4\sqrt{2/n}42/n​ are embedded with ENNReal.ofReal. −F-F−F is Mathlib's pointwise negation of a set, {g:−g∈F}={−f:f∈F}\{g : -g\in F\} = \{-f : f\in F\}{g:−g∈F}={−f:f∈F}. Added hypotheses as for the other statements; the measurability hypothesis on FFF implies the one for F∪−FF\cup-FF∪−F.

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

/-- Appendix A, p. 480: `R_n(F) = R_n(F ∪ −F) ≤ D_n(F ∪ −F) + 4 √(2/n)` for `n = 2m`. -/
theorem rademacher_le_discrepancy_union_neg {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 = RadGauss.RiskBound.rademacherComplexity μ (2 * m) (F ∪ -F) ∧
      RadGauss.RiskBound.rademacherComplexity μ (2 * m) (F ∪ -F)
        ≤ ENNReal.ofReal (expectedMaxDiscrepancy μ m (F ∪ -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. 480 (PDF p. 18), Appendix A, display
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