Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Uniform convergence for VC classes at the optimal rate (d+log⁡(1/δ))/ε2(d+\log(1/\delta))/\varepsilon^2(d+log(1/δ))/ε2

Proved
UnderstandingML.binary_uc_optimal_rate

by Gabewhigham · Sep 25, 2026 · Mathlib 0df444a (Lean v4.33.1)

learning-theoryuniform-convergencevc-dimension

There is an absolute constant C>0C>0C>0 such that the following holds. Let HHH be a class of measurable functions X→{0,1}X \to \{0,1\}X→{0,1} with the countable-approximation property (a countable subclass approximates every member pointwise, Remark 3.1) and VC dimension at most ddd, where d≥1d \ge 1d≥1. Then HHH has the uniform convergence property for the 000–111 loss with sample complexity

mHUC(ε,δ)≤⌈C d+log⁡(1/δ)ε2⌉,m^{UC}_H(\varepsilon,\delta) \le \left\lceil C\,\frac{d + \log(1/\delta)}{\varepsilon^2}\right\rceil,mHUC​(ε,δ)≤⌈Cε2d+log(1/δ)​⌉,

i.e. for all ε,δ∈(0,1)\varepsilon,\delta\in(0,1)ε,δ∈(0,1), every distribution D\mathcal DD over X×{0,1}X\times\{0,1\}X×{0,1} and every mmm at least this bound, with probability at least 1−δ1-\delta1−δ over S∼DmS\sim\mathcal D^mS∼Dm we have ∣LS(h)−LD(h)∣≤ε|L_S(h)-L_{\mathcal D}(h)|\le\varepsilon∣LS​(h)−LD​(h)∣≤ε for all h∈Hh\in Hh∈H. This is the upper bound of Theorem 6.8 (part 1) of Shalev-Shwartz and Ben-David without the log⁡(1/ε)\log(1/\varepsilon)log(1/ε) factor; it requires chaining together with Haussler's packing bound. It is used to derive the multiclass uniform-convergence bound of Theorem 29.3.

Preamble
import Definitions.Def_UnderstandingML_VC

open MeasureTheory

universe u
Formal statement
namespace UnderstandingML

/-- **Theorem 6.8, part 1 (uniform convergence upper bound, optimal rate)** (p. 48). There is an
absolute constant `C > 0` such that every class `H` of measurable binary classifiers with the
countable-approximation property and VC dimension at most `d` (`d ≥ 1`) has the uniform
convergence property for the 0–1 loss with `m^{UC}_H(ε, δ) ≤ ⌈C (d + log(1/δ))/ε²⌉`. -/
theorem binary_uc_optimal_rate :
    ∃ C : ℝ, 0 < C ∧
      ∀ {X : Type u} [MeasurableSpace X] (H : Set (X → Bool)) (d : ℕ),
        (∀ h ∈ H, Measurable h) → PointwiseSeparable H → vcDim H ≤ d → 1 ≤ d →
        HasUniformConvergenceWith loss01 H
          (fun ε δ ↦ ⌈C * (d + Real.log (1 / δ)) / ε ^ 2⌉₊) := by sorry

end UnderstandingML
Source
Shalev-Shwartz and Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press 2014, Theorem 6.8 (p. 48), part 1, upper bound m^UC_H(eps,delta) <= C2 (d + log(1/delta))/eps^2.

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