Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2.13 — learning bound, finite H, inconsistent case (goal)

Disproved
FoundationsML.PAC.finite_hypothesis_learning_bound_inconsistent

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

finite-hypothesis-setgeneralization-boundmachine-learningpac-learningunion-bound

Statement (Theorem 2.13, p. 20, PDF p. 37). Let HHH be a finite hypothesis set. Then, for any δ>0\delta>0δ>0, with probability at least 1−δ1-\delta1−δ, the following inequality holds:

∀h∈H,R(h)≤R^S(h)+log⁡∣H∣+log⁡(2/δ)2m.\forall h \in H,\quad R(h) \le \hat R_S(h) + \sqrt{\frac{\log|H| + \log(2/\delta)}{2m}}.∀h∈H,R(h)≤R^S​(h)+2mlog∣H∣+log(2/δ)​​.

This is the chapter's capstone generalization bound: it drops Theorem 2.5's consistency requirement entirely, at the cost of an extra additive log⁡∣H∣\log|H|log∣H∣ term inside the square root (from a union bound over HHH applied to Corollary 2.11's per-hypothesis Hoeffding bound), and holds simultaneously for every hypothesis in HHH — not just the one an algorithm happens to return.

Formalization Note. As in single_hypothesis_generalization_bound, the sample S ~ D^m is the identity random variable on (Fin m → X, Measure.pi (fun _ => D)); the event bounded with probability ≥ 1-δ is the simultaneous (uniform-convergence) bound over every h ∈ H, i.e. ∀ h ∈ H, R(h) ≤ R̂_S(h) + sqrt((log|H|+log(2/δ))/(2m)), matching the book's ∀h ∈ H inside the probability event, not a per-h statement outside it. 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 on every h ∈ H, needed for the union-bound/Hoeffding argument to hold of the disagreement events' actual probabilities rather than only their outer measure.


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

Preamble
import Mathlib
import Definitions.Def_FoundationsML_PAC_GeneralizationError
import Definitions.Def_FoundationsML_PAC_EmpiricalError

open MeasureTheory
Formal statement
namespace FoundationsML.PAC

/-- Theorem 2.13 (Learning bound — finite `H`, inconsistent case; goal; Mohri,
Rostamizadeh & Talwalkar, *Foundations of Machine Learning*, 2nd ed., MIT Press 2018,
p. 20, PDF p. 37). Let `H` be a finite hypothesis set of functions `X → Bool` and `c`
a target concept. Then, for any `δ > 0`, with probability at least `1 − δ` over an
i.i.d. sample `S ∼ D^m`, simultaneously for every `h ∈ H`,
`R(h) ≤ R̂_S(h) + sqrt((log|H| + log(2/δ)) / (2m))`.

**Formalization note.** Carries the book's standing measurability hypothesis (Definition 2.1,
footnote 2, p. 11) on `c` and on every `h ∈ H`. -/
theorem finite_hypothesis_learning_bound_inconsistent
    {X : Type*} [MeasurableSpace X] (D : Measure X) [IsProbabilityMeasure D]
    (H : Finset (X → Bool)) (c : X → Bool)
    (hc_meas : Measurable c) (hH_meas : ∀ h ∈ H, Measurable h)
    (m : ℕ) (δ : ℝ) (hδ : 0 < δ) :
    (1 - δ) ≤ (Measure.pi (fun _ : Fin m => D)
      {S : Fin m → X | ∀ h ∈ H, GeneralizationError D c h ≤
        EmpiricalError S c h +
          Real.sqrt ((Real.log (H.card : ℝ) + 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. 20, Theorem 2.13 (PDF p. 37)
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