Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma 26.2: E_S[Rep_D(F, S)] ≤ 2 E_S R(F ∘ S) for F = ℓ ∘ H

Proved
UnderstandingML.representativeness_le_rademacher

by naimengye · Sep 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

rademacher-complexitysymmetrizationuniform-convergence

Lemma 26.2. ES∼Dm[Rep⁡D(F,S)]≤2 ES∼DmR(F∘S)\mathbb{E}_{S \sim D^m}[\operatorname{Rep}_D(F, S)] \le 2\,\mathbb{E}_{S \sim D^m}R(F \circ S)ES∼Dm​[RepD​(F,S)]≤2ES∼Dm​R(F∘S). The loss is bounded by ccc and measurable, HHH is nonempty, m≥1m \ge 1m≥1, and the maps S↦Rep⁡D(F,S)S \mapsto \operatorname{Rep}_D(F, S)S↦RepD​(F,S) and S↦R(F∘S)S \mapsto R(F \circ S)S↦R(F∘S) are measurable (Remark 3.1).

The double-sample measurability. Besides S↦RepD(ℓ∘H,S)S \mapsto \mathrm{Rep}_D(\ell\circ H, S)S↦RepD​(ℓ∘H,S) and S↦R(ℓ∘H∘S)S \mapsto R(\ell\circ H\circ S)S↦R(ℓ∘H∘S), the item assumes that (S,S′)↦sup⁡h∈H(LS′(h)−LS(h))(S, S') \mapsto \sup_{h \in H}(L_{S'}(h) - L_S(h))(S,S′)↦suph∈H​(LS′​(h)−LS​(h)) is measurable, because the proof of Lemma 26.2 integrates it. Swapping ziz_izi​ and zi′z'_izi′​ preserves Dm⊗DmD^m \otimes D^mDm⊗Dm, so E[sup⁡h(LS′−LS)]\mathbb{E}[\sup_h(L_{S'} - L_S)]E[suph​(LS′​−LS​)] equals its average over sign vectors σ\sigmaσ. That average is at most E[R(S)+R(S′)]\mathbb{E}[R(S) + R(S')]E[R(S)+R(S′)] pointwise. Without this hypothesis the per-σ\sigmaσ suprema need not be measurable, and their upper integrals can exceed the integral of their average R(S)R(S)R(S), so the argument does not close. The hypothesis holds whenever the loss class has a countable pointwise-dense subclass, as in Theorems 26.12-26.15.

Preamble
import Definitions.Def_UnderstandingML_Rademacher

open MeasureTheory
open scoped InnerProductSpace
Formal statement
namespace UnderstandingML

/-- **Lemma 26.2** (p. 376). `E_{S ∼ D^m}[Rep_D(F, S)] ≤ 2 E_{S ∼ D^m} R(F ∘ S)` for `F = ℓ ∘ H`.
The loss is bounded by `c` and measurable, `H` is nonempty, and the two random variables
`S ↦ Rep_D(F, S)` and `S ↦ R(F ∘ S)` are measurable (Remark 3.1), as is the double-sample
supremum `(S, S′) ↦ sup_h (L_{S′}(h) − L_S(h))` that the symmetrization integrates. -/
theorem representativeness_le_rademacher {Z Hyp : Type*} [MeasurableSpace Z]
    (loss : Hyp → Z → ℝ) (H : Set Hyp) (hH : H.Nonempty) (c : ℝ)
    (hc : ∀ h ∈ H, ∀ z, |loss h z| ≤ c) (hmeas : ∀ h ∈ H, Measurable (loss h))
    (D : Measure Z) [IsProbabilityMeasure D] (m : ℕ) (hm : 0 < m)
    (hrep : Measurable (fun S : Fin m → Z ↦ representativeness loss H D S))
    (hrad : Measurable (fun S : Fin m → Z ↦ rademacher (evalSet (lossClass loss H) S)))
    (hdbl : Measurable (fun p : (Fin m → Z) × (Fin m → Z) ↦
      ⨆ h : H, (empRisk loss p.2 (h : Hyp) - empRisk loss p.1 (h : Hyp)))) :
    ∫ S, representativeness loss H D S ∂(iidLaw D m) ≤
      2 * ∫ S, rademacher (evalSet (lossClass loss H) S) ∂(iidLaw D m) := by sorry

end UnderstandingML
Source
Shalev-Shwartz and Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press 2014, doi:10.1017/CBO9781107298019, §26.1 pp. 376-377, Lemma 26.2 with its proof (symmetrization)
Human review
  • Endorsed by Shuze Chen · Sep 25, 2026

    Confirmed by the moderator at approval.

  • Endorsed by naimengye · Sep 25, 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