Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eq. (8.5), p. 145 — mistakes bounded by margin and hinge loss

Proved
ModernOnlineLearning.Classification.eq_8_5

by mikedeng1 · Oct 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

machine-learningmistake-boundp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-bookp2o-v1perceptron

For Algorithm 8.2 with ∥zt∥2≤R\|z_t\|_2\le R∥zt​∥2​≤R, let M=∑t=1TτtM=\sum_{t=1}^T\tau_tM=∑t=1T​τt​ and let ℓ1\ell_1ℓ1​ be the hinge loss. Every u∈Rdu\in\mathbb R^du∈Rd satisfies

M≤R∥u∥2M+∑t=1Tτtℓ1(⟨zt,u⟩,yt)≤R∥u∥2M+L1(u).M\le R\|u\|_2\sqrt M +\sum_{t=1}^T\tau_t\ell_1(\langle z_t,u\rangle,y_t) \le R\|u\|_2\sqrt M+L_1(u).M≤R∥u∥2​M​+t=1∑T​τt​ℓ1​(⟨zt​,u⟩,yt​)≤R∥u∥2​M​+L1​(u).

This is the implicit mistake inequality to which Lemma 4.29 applies at q=1q=1q=1.

Formalization Note Labels are restricted to {−1,1}\{-1,1\}{−1,1} on rounds 1,…,T1,\ldots,T1,…,T and R≥0R\ge0R≥0 is explicit. A zero score is an update and a mistake.

Preamble
import Mathlib
import Definitions.Def_ModernOnlineLearning_Classification_Perceptron
Formal statement
namespace ModernOnlineLearning.Classification

/-- Orabona, Eq. (8.5), p. 145, including its bound by the full hinge loss. -/
theorem eq_8_5 {d : ℕ} (T : ℕ) (z : ℕ → ModernOnlineLearning.Adaptive.Vec d) (y : ℕ → ℝ)
    (hy : ∀ t ∈ Finset.Icc 1 T, y t = -1 ∨ y t = 1)
    (R : ℝ) (hR : 0 ≤ R)
    (hz : ∀ t ∈ Finset.Icc 1 T, ‖z t‖ ≤ R) (u : ModernOnlineLearning.Adaptive.Vec d) :
    mistakes z y T ≤
        ‖u‖ * R * Real.sqrt (mistakes z y T) +
          (∑ t ∈ Finset.Icc 1 T,
            mistakeIndicator z y t * hingePower 1 (inner ℝ (z t) u) (y t)) ∧
      ‖u‖ * R * Real.sqrt (mistakes z y T) +
          (∑ t ∈ Finset.Icc 1 T,
            mistakeIndicator z y t * hingePower 1 (inner ℝ (z t) u) (y t)) ≤
        ‖u‖ * R * Real.sqrt (mistakes z y T) + cumulativeHinge z y T u 1 := by sorry

end ModernOnlineLearning.Classification
Source
Orabona, arXiv:1912.13213v10, Eq. (8.5), proof of Theorem 8.2, p. 145
Human review
  • Endorsed by Shuze Chen · Oct 9, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 9, 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