Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 3.3 — Rademacher-complexity generalization bound

Disproved
FoundationsML.RademacherVC.rademacher_generalization_bound

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

generalization-boundmachine-learningrademacher-complexity

Statement (Theorem 3.3, p. 31, PDF p. 48). Let GGG be a family of functions mapping from ZZZ to [0,1][0,1][0,1]. Then, for any δ>0\delta>0δ>0, with probability at least 1−δ1-\delta1−δ over an i.i.d. sample SSS of size mmm, for all g∈Gg\in Gg∈G:

E[g(z)]≤1m∑i=1mg(zi)+2Rm(G)+log⁡(1/δ)2m.\mathbb E[g(z)] \le \frac1m\sum_{i=1}^m g(z_i) + 2R_m(G) + \sqrt{\frac{\log(1/\delta)}{2m}}.E[g(z)]≤m1​i=1∑m​g(zi​)+2Rm​(G)+2mlog(1/δ)​​.

This is the chapter's first generalization bound for possibly-infinite function families, proved via McDiarmid's inequality applied to the deviation sup⁡g∈G(E[g]−E^S[g])\sup_{g\in G}(\mathbb E[g]- \hat{\mathbb E}_S[g])supg∈G​(E[g]−E^S​[g]).

Formalization Note. G bounded in [0,1] and measurable (hGb, hGm — the latter is the book's own standing measurability assumption, footnote 3, p. 30, made explicit here to avoid the Bochner-integral trap of a non-integrable ∫ z, g z ∂D silently evaluating to 0); the bound is stated for every g ∈ G inside the same probability event (uniform convergence), matching "each of the following holds for all g ∈ G."


Retired. Retired because it allowed m = 0 (bound false), used the clipped ⨆ g ∈ G Rademacher definition and omitted inequality (3.4); replaced by FoundationsML.RademacherVC.rademacher_generalization_bound_v2.

Preamble
import Mathlib
import Definitions.Def_FoundationsML_RademacherVC_RademacherComplexity

open MeasureTheory
Formal statement
namespace FoundationsML.RademacherVC

/-- Theorem 3.3 (Rademacher-complexity generalization bound; Mohri, Rostamizadeh &
Talwalkar, *Foundations of Machine Learning*, 2nd ed., MIT Press 2018, p. 31, PDF p. 48).
Let `G` be a family of measurable functions mapping from `Z` to `[0,1]`. Then, for any
`δ > 0`, with probability at least `1 − δ` over the draw of an i.i.d. sample `S` of size `m`,
each of the following holds for all `g ∈ G`:
`E[g(z)] ≤ (1/m) ∑_{i=1}^m g(z_i) + 2 R_m(G) + sqrt(log(1/δ)/(2m))`. -/
theorem rademacher_generalization_bound
    {Z : Type*} [MeasurableSpace Z] (D : Measure Z) [IsProbabilityMeasure D]
    (G : Set (Z → ℝ)) (hGb : ∀ g ∈ G, ∀ z, g z ∈ Set.Icc (0 : ℝ) 1)
    (hGm : ∀ g ∈ G, Measurable g)
    (m : ℕ) (δ : ℝ) (hδ : 0 < δ) :
    (1 - δ) ≤ (Measure.pi (fun _ : Fin m => D)
      {S : Fin m → Z | ∀ g ∈ G, (∫ z, g z ∂D) ≤
        (1 / (m : ℝ)) * ∑ i, g (S i) + 2 * RademacherComplexity D G m +
          Real.sqrt (Real.log (1 / δ) / (2 * m))}).toReal := by sorry

end FoundationsML.RademacherVC
Source
Mohri, Rostamizadeh & Talwalkar, Foundations of Machine Learning, 2nd ed., MIT Press 2018, p. 31, Theorem 3.3 (PDF p. 48)
Human review
  • Endorsed by Shuze Chen · Sep 28, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 28, 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