Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 3.17 — Sauer's lemma

Proved
FoundationsML.RademacherVC.sauer_lemma

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

combinatoricsgrowth-functionmachine-learningvc-dimension

Statement (Theorem 3.17, p. 41, PDF p. 58). Let HHH be a hypothesis set with VCdim(H)=d\mathrm{VCdim}(H)=dVCdim(H)=d. Then, for all m∈Nm\in\mathbb Nm∈N,

ΠH(m)≤∑i=0d(mi).\Pi_H(m) \le \sum_{i=0}^{d}\binom{m}{i}.ΠH​(m)≤i=0∑d​(im​).

This is the chapter's central combinatorial result, proved by a genuine induction on m + d (splitting H's restriction to S into two families G₁, G₂ on the last point), bounding the growth function — which could a priori be as large as 2^m — by a polynomial in m of degree d once the VC-dimension is finite.

Formalization Note. Finset.range (d+1) sums i = 0,…,d, matching ∑i=0d(mi)\sum_{i=0}^d\binom{m}{i}∑i=0d​(im​) exactly; Nat.choose m i is (mi)\binom{m}{i}(im​).

Preamble
import Mathlib
import Definitions.Def_FoundationsML_RademacherVC_HasVCDim
Formal statement
namespace FoundationsML.RademacherVC

/-- Theorem 3.17 (Sauer's lemma; Mohri, Rostamizadeh & Talwalkar, *Foundations of Machine
Learning*, 2nd ed., MIT Press 2018, p. 41, PDF p. 58). Let `H` be a hypothesis set with
`VCdim(H) = d`. Then, for all `m ∈ ℕ`, `Π_H(m) ≤ ∑_{i=0}^{d} C(m,i)`. -/
theorem sauer_lemma
    {X : Type*} (H : Set (X → Bool)) (d : ℕ) (hH : HasVCDim H d) (m : ℕ) :
    GrowthFunction H m ≤ ∑ i ∈ Finset.range (d + 1), Nat.choose m i := by sorry

end FoundationsML.RademacherVC
Source
Mohri, Rostamizadeh & Talwalkar, Foundations of Machine Learning, 2nd ed., MIT Press 2018, p. 41, Theorem 3.17 (PDF p. 58)
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