Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Corollary 2.11 — generalization bound, single hypothesis

Disproved
FoundationsML.PAC.single_hypothesis_generalization_bound

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

generalization-boundhoeffdingmachine-learningpac-learning

Statement (Corollary 2.11, p. 19, PDF p. 36). Fix a hypothesis h:X→{0,1}h : X \to \{0,1\}h:X→{0,1}. Then, for any δ>0\delta>0δ>0, the following inequality holds with probability at least 1−δ1-\delta1−δ (over an i.i.d. sample S∼DmS\sim D^mS∼Dm):

R(h)≤R^S(h)+log⁡(2/δ)2m.R(h) \le \hat R_S(h) + \sqrt{\frac{\log(2/\delta)}{2m}}.R(h)≤R^S​(h)+2mlog(2/δ)​​.

This is the Hoeffding-inequality step (via Theorem D.2 and Corollary 2.10) applied to a single fixed hypothesis, which Theorem 2.13's union-bound argument then applies to every hypothesis in a finite HHH simultaneously.

Formalization Note. The i.i.d. sample S ~ D^m is modeled as the identity random variable on the product-measure space (Fin m → X, Measure.pi (fun _ => D)), so the probability statement is the Measure.pi-measure (cast to ℝ) of the event set {S | R(h) ≤ R̂_S(h) + sqrt(log(2/δ)/(2m))}. No upper bound on δ is imposed, matching the book's own unrestricted "for any δ > 0." Also carries the book's standing measurability hypothesis (Definition 2.1, footnote 2, p. 10) on c and h, needed for the Hoeffding tail bound to hold of the disagreement event's actual probability.


Retired. Retired because it allowed the degenerate sample size m = 0, where the bound is false; replaced by FoundationsML.PAC.single_hypothesis_generalization_bound_v2.

Preamble
import Mathlib
import Definitions.Def_FoundationsML_PAC_GeneralizationError
import Definitions.Def_FoundationsML_PAC_EmpiricalError

open MeasureTheory
Formal statement
namespace FoundationsML.PAC

/-- Corollary 2.11 (Generalization bound — single hypothesis; Mohri, Rostamizadeh &
Talwalkar, *Foundations of Machine Learning*, 2nd ed., MIT Press 2018, p. 19, PDF p. 36).
Fix a hypothesis `h : X → Bool` and a target concept `c : X → Bool`. Then, for any `δ > 0`,
with probability at least `1 − δ` over an i.i.d. sample `S ∼ D^m`,
`R(h) ≤ R̂_S(h) + sqrt(log(2/δ) / (2m))`.

**Formalization note.** Carries the book's standing measurability hypothesis (Definition 2.1,
footnote 2, p. 11) on `c` and `h`. -/
theorem single_hypothesis_generalization_bound
    {X : Type*} [MeasurableSpace X] (D : Measure X) [IsProbabilityMeasure D]
    (c h : X → Bool) (hc_meas : Measurable c) (hh_meas : Measurable h)
    (m : ℕ) (δ : ℝ) (hδ : 0 < δ) :
    (1 - δ) ≤ (Measure.pi (fun _ : Fin m => D)
      {S : Fin m → X | GeneralizationError D c h ≤
        EmpiricalError S c h + Real.sqrt (Real.log (2 / δ) / (2 * m))}).toReal := by sorry

end FoundationsML.PAC
Source
Mohri, Rostamizadeh & Talwalkar, Foundations of Machine Learning, 2nd ed., MIT Press 2018, p. 19, Corollary 2.11 (PDF p. 36)
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