Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 28.3: for VCdim(H) = d, ε ∈ (0,1), δ ∈ (0,1/4) and m ≥ (8/ε)(2d log(16e/ε) + log(2/δ)), S ∼ D^m is an ε-net for H with probability ≥ 1 − δ

Proved
UnderstandingML.eps_net_theorem

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

epsilon-netsample-complexitysymmetrizationvc-dimension

Theorem 28.3. Let H⊂2XH \subset 2^XH⊂2X with VCdim⁡(H)=d\operatorname{VCdim}(H) = dVCdim(H)=d. Fix ϵ∈(0,1)\epsilon \in (0,1)ϵ∈(0,1), δ∈(0,1/4)\delta \in (0, 1/4)δ∈(0,1/4) and let

m≥8ϵ(2dlog⁡(16eϵ)+log⁡(2δ)).m \ge \frac{8}{\epsilon}\Big(2d\log\Big(\frac{16e}{\epsilon}\Big) + \log\Big(\frac2\delta\Big)\Big).m≥ϵ8​(2dlog(ϵ16e​)+log(δ2​)).

Then, with probability of at least 1−δ1 - \delta1−δ over a choice of S∼DmS \sim D^mS∼Dm we have that SSS is an ϵ\epsilonϵ-net for HHH. HHH consists of measurable hypotheses with the countable-approximation property of Mission IV (Remark 3.1).

Preamble
import Definitions.Def_UnderstandingML_FundamentalProof

open MeasureTheory
Formal statement
namespace UnderstandingML

/-- **Theorem 28.3** (p. 398). Let `H ⊆ 2^X` with `VCdim(H) = d`. Fix `ε ∈ (0, 1)`, `δ ∈ (0, 1/4)`
and let `m ≥ (8/ε)(2d log(16e/ε) + log(2/δ))`. Then, with probability of at least `1 − δ` over a
choice of `S ∼ D^m` we have that `S` is an `ε`-net for `H`. Measurable `H` with the
countable-approximation property (Remark 3.1). -/
theorem eps_net_theorem {X : Type*} [MeasurableSpace X] (H : Set (X → Bool))
    (hH : ∀ h ∈ H, Measurable h) (hsep : PointwiseSeparable H) (d : ℕ) (hd : vcDim H = d)
    (D : Measure X) [IsProbabilityMeasure D] (ε δ : ℝ) (hε : 0 < ε) (hε1 : ε < 1) (hδ : 0 < δ)
    (hδ1 : δ < 1 / 4) (m : ℕ)
    (hm : 8 / ε * (2 * d * Real.log (16 * Real.exp 1 / ε) + Real.log (2 / δ)) ≤ m) :
    iidLaw D m {S | ¬ IsEpsNet H D ε S} ≤ ENNReal.ofReal δ := 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, §28.3 pp. 398-400, Theorem 28.3 with its proof
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