Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Corollary 15.7 (last part): with λ = √(2ρ²/(B²m)), E_S[L^{0−1}_D(A(S))] ≤ E_S[L^hinge_D(A(S))] ≤ min_{‖w‖≤B} L^hinge_D(w) + √(8ρ²B²/m)

Proved
UnderstandingML.soft_svm_norm_bound

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

generalization-boundmarginsoft-svmsupport-vector-machines

Corollary 15.7 (last part). For every B>0B > 0B>0, if we set λ=2ρ2B2m\lambda = \sqrt{\frac{2\rho^2}{B^2 m}}λ=B2m2ρ2​​ then

ES∼Dm[LD0−1(A(S))]≤ES∼Dm[LDhinge(A(S))]≤min⁡w:∥w∥≤BLDhinge(w)+8ρ2B2m.\mathbb{E}_{S \sim D^m}[L^{0-1}_D(A(S))] \le \mathbb{E}_{S \sim D^m}[L^{hinge}_D(A(S))] \le \min_{w : \|w\| \le B} L^{hinge}_D(w) + \sqrt{\frac{8\rho^2 B^2}{m}}.ES∼Dm​[LD0−1​(A(S))]≤ES∼Dm​[LDhinge​(A(S))]≤w:∥w∥≤Bmin​LDhinge​(w)+m8ρ2B2​​.

Formally: the Soft-SVM parameter depends on mmm; "min⁡\minmin" is "for every www with ∥w∥≤B\|w\| \le B∥w∥≤B".

Preamble
import Definitions.Def_UnderstandingML_SVM

open MeasureTheory
open scoped InnerProductSpace
Formal statement
namespace UnderstandingML

/-- **Corollary 15.7** (p. 208), last part. For every `B > 0`, if Soft-SVM (15.6) is run with
`λ = √(2ρ²/(B²m))` then
`E_S[L^{0−1}_D(A(S))] ≤ E_S[L^hinge_D(A(S))] ≤ min_{w : ‖w‖ ≤ B} L^hinge_D(w) + √(8ρ²B²/m)`.
The parameter depends on `m`; "`min`" is "for every `w` with `‖w‖ ≤ B`". -/
theorem soft_svm_norm_bound {d : ℕ} (D : Measure (Vec d × ℝ)) [IsProbabilityMeasure D]
    {ρ B : ℝ} (hρ : 0 < ρ) (hB : 0 < B) (hD : ∀ᵐ z ∂D, ‖z.1‖ ≤ ρ ∧ (z.2 = 1 ∨ z.2 = -1))
    (A : Learner (Vec d × ℝ) (Vec d))
    (hA : ∀ (m : ℕ) (S : Fin m → Vec d × ℝ),
      IsRLM hingeLoss (Real.sqrt (2 * ρ ^ 2 / (B ^ 2 * m))) S (A m S))
    (hAmeas : ∀ m, Measurable (A m)) (m : ℕ) (hm : 0 < m) :
    ∫ S, risk zeroOneLoss D (A m S) ∂(iidLaw D m) ≤
        ∫ S, risk hingeLoss D (A m S) ∂(iidLaw D m) ∧
    ∀ w : Vec d, ‖w‖ ≤ B →
      ∫ S, risk hingeLoss D (A m S) ∂(iidLaw D m) ≤
        risk hingeLoss D w + Real.sqrt (8 * ρ ^ 2 * B ^ 2 / m) := 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, §15.2.1 p. 208, Corollary 15.7 (from Corollary 13.9)
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