Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Claim 29.9(2): on a finite domain of size d ≥ 2, for ε ∈ (0,1/2) and m ≤ (d−1)/(6ε), A_bad has error ≥ ε with probability ≥ e^{−1}/6 under the distribution of the proof labeled by h_∅

Proved
UnderstandingML.bad_erm_lower_bound

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

ermlower-boundmulticlass

Claim 29.9(2). There exists a constant a>0a > 0a>0 such that for every 0<ϵ<a0 < \epsilon < a0<ϵ<a there exists a distribution DDD over XXX and hA∈Hh_A \in HhA​∈H such that the following holds. The hypothesis returned by AbadA_{bad}Abad​ upon receiving a sample of size m≤∣X∣−16ϵm \le \frac{|X|-1}{6\epsilon}m≤6ϵ∣X∣−1​, sampled according to DDD and labeled by hAh_AhA​, will have error ≥ϵ\ge \epsilon≥ϵ with probability ≥e−1/6\ge e^{-1}/6≥e−1/6.

Formally, for ∣X∣=d≥2|X| = d \ge 2∣X∣=d≥2 (the case the book proves): for every ϵ∈(0,1/2)\epsilon \in (0, 1/2)ϵ∈(0,1/2), with the distribution P[x0]=1−2ϵP[x_0] = 1 - 2\epsilonP[x0​]=1−2ϵ, P[xi]=2ϵ/(d−1)P[x_i] = 2\epsilon/(d-1)P[xi​]=2ϵ/(d−1) of the proof and hA=h∅h_A = h_\emptysethA​=h∅​, every ERM returning h{x1,…,xm}ch_{\{x_1, \dots, x_m\}^c}h{x1​,…,xm​}c​ on all-∗\ast∗ samples has error at least ϵ\epsilonϵ with probability at least e−1/6e^{-1}/6e−1/6 whenever m≤(d−1)/(6ϵ)m \le (d-1)/(6\epsilon)m≤(d−1)/(6ϵ).

Preamble
import Definitions.Def_UnderstandingML_MulticlassLearnability

open MeasureTheory
open scoped InnerProductSpace
Formal statement
namespace UnderstandingML

/-- **Claim 29.9(2)** (p. 407), for a finite domain `|X| = d ≥ 2`. For every `ε ∈ (0, 1/2)`
(the book: `ε < a` for some constant `a > 0`) there exist a distribution `D` over `X` (the one
of the proof: `P[x₀] = 1 − 2ε`, `P[xᵢ] = 2ε/(d − 1)`) and `h_A ∈ H` (namely `h_∅`) such that the
hypothesis returned by `A_bad` upon receiving a sample of size `m ≤ (|X| − 1)/(6ε)`, sampled
according to `D` and labeled by `h_A`, has error `≥ ε` with probability `≥ e^{−1}/6`. -/
theorem bad_erm_lower_bound {X : Type*} [MeasurableSpace X] [MeasurableSingletonClass X]
    [Fintype X] (hX : 2 ≤ Fintype.card X) (x₀ : X)
    (A : Learner (X × CofinLabel X) (X → CofinLabel X)) (hA : IsBadERM A) (ε : ℝ) (hε : 0 < ε)
    (hε2 : ε < 1 / 2) (m : ℕ) (hm : (m : ℝ) ≤ (Fintype.card X - 1) / (6 * ε)) :
    ENNReal.ofReal (Real.exp (-1) / 6) ≤
      iidLaw ((badDist x₀ ε).map (fun x ↦ (x, hSet ⟨∅, Or.inl Set.finite_empty⟩ x))) m
        {S | ENNReal.ofReal ε ≤ badDist x₀ ε {x | A m S x ≠ hSet ⟨∅, Or.inl Set.finite_empty⟩ x}} := 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, §29.4 pp. 407-408, Claim 29.9 part 2 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