Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 8 — symmetrization Esup⁡h∈ϕ~∘F(Eh−E^nh)≤Rn(ϕ~∘F)\mathbf E\sup_{h\in\tilde\phi\circ F}(\mathbf Eh-\hat{\mathbf E}_nh)\le R_n(\tilde\phi\circ F)Esuph∈ϕ~​∘F​(Eh−E^n​h)≤Rn​(ϕ~​∘F)

Proved
RadGauss.RiskBound.symmetrization

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

learning-theoryp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1rademacher-complexitysymmetrization

Let PPP be a probability measure on X×Y\mathcal X \times \mathcal YX×Y, let ϕ:Y×A→[0,1]\phi : \mathcal Y \times \mathcal A \to [0, 1]ϕ:Y×A→[0,1] be measurable, let FFF be a class of measurable maps X→A\mathcal X \to \mathcal AX→A, and let n≥1n \ge 1n≥1. For an i.i.d. sample (Xi,Yi)i=1n(X_i, Y_i)_{i=1}^n(Xi​,Yi​)i=1n​ from PPP,

Esup⁡h∈ϕ~∘F(Eh−E^nh)≤Rn(ϕ~∘F),\mathbf E \sup_{h\in\tilde\phi\circ F}\bigl(\mathbf E h - \hat{\mathbf E}_n h\bigr) \le R_n(\tilde\phi\circ F),Eh∈ϕ~​∘Fsup​(Eh−E^n​h)≤Rn​(ϕ~​∘F),

where RnR_nRn​ is the Rademacher complexity of Definition 2 (factor 2/n2/n2/n, absolute value inside the supremum) with respect to PPP.

This is the step that turns the expected uniform deviation into the data-dependent complexity penalty of Theorem 8.

Formalization Note Three random variables are assumed measurable, exactly those the argument integrates: the uniform deviation S↦sup⁡h(Eh−E^nh)S \mapsto \sup_h(\mathbf Eh - \hat{\mathbf E}_nh)S↦suph​(Eh−E^n​h), the empirical Rademacher complexity S↦R^n(ϕ~∘F)(S)S \mapsto \hat R_n(\tilde\phi\circ F)(S)S↦R^n​(ϕ~​∘F)(S), and the double-sample deviation (S,S′)↦sup⁡h(1n∑ih(Si′)−E^nh)(S, S') \mapsto \sup_h\bigl(\frac1n\sum_i h(S'_i) - \hat{\mathbf E}_n h\bigr)(S,S′)↦suph​(n1​∑i​h(Si′​)−E^n​h); the paper does not discuss measurability. The hypothesis n≥1n \ge 1n≥1 is needed: at n=0n = 0n=0 Lean's 1/0=01/0 = 01/0=0 makes the left side sup⁡hEh\sup_h \mathbf Ehsuph​Eh, possibly positive, while R0=0R_0 = 0R0​=0. The left side is a real expectation and enters via ENNReal.ofReal; the right side is in [0,∞][0,\infty][0,∞].

Preamble
import Mathlib
import Definitions.Def_RadGauss_RiskBound_rademacherComplexity
import Definitions.Def_RadGauss_RiskBound_uniformDeviation
import Definitions.Def_RadGauss_RiskBound_phiTildeComp

open MeasureTheory
Formal statement
namespace RadGauss.RiskBound

/-- **Proof of Theorem 8** (p. 468, last display), symmetrization:
`E sup_{h ∈ φ̃∘F} (E h − Ê_n h) ≤ R_n(φ̃∘F)` for an i.i.d. sample of size `n ≥ 1` from `P`.
The three random variables the argument integrates are assumed measurable: the uniform
deviation, the empirical Rademacher complexity of `φ̃∘F`, and the double-sample supremum
`(S, S') ↦ sup_{h ∈ φ̃∘F} ((1/n) Σ_i h(S'_i) − Ê_n h)`. -/
theorem symmetrization {X Y A : Type*} [MeasurableSpace X] [MeasurableSpace Y]
    [MeasurableSpace A] [Zero A]
    (φ : Y → A → ℝ) (hφ : Measurable (Function.uncurry φ))
    (hφ01 : ∀ y a, 0 ≤ φ y a ∧ φ y a ≤ 1)
    (F : Set (X → A)) (hF : ∀ f ∈ F, Measurable f)
    (P : Measure (X × Y)) [IsProbabilityMeasure P] (n : ℕ) (hn : 0 < n)
    (hsup : Measurable (supDev P n (phiTildeComp φ F)))
    (hrad : Measurable (empiricalRademacher n (phiTildeComp φ F)))
    (hdbl : Measurable (fun p : (Fin n → X × Y) × (Fin n → X × Y) =>
      doubleSupDev n (phiTildeComp φ F) p.1 p.2)) :
    ENNReal.ofReal
        (∫ S, supDev P n (phiTildeComp φ F) S ∂(Measure.pi fun _ : Fin n => P))
      ≤ rademacherComplexity P n (phiTildeComp φ F) := by sorry

end RadGauss.RiskBound
Source
Bartlett, Mendelson, Rademacher and Gaussian Complexities: Risk Bounds and Structural Results, J. Mach. Learn. Res. 3 (2002), p. 468 (PDF p. 6), proof of Theorem 8, second 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