Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

(3.3) — Winnow: ∑t(ft(wt)−ft(u))≤∑t⟨wt−u,zt⟩≤klog⁡(d)/η+η∑t∑iwt[i]zt[i]2\sum_t(f_t(w_t)-f_t(u))\le\sum_t\langle w_t-u,z_t\rangle\le k\log(d)/\eta+\eta\sum_t\sum_i w_t[i]z_t[i]^2∑t​(ft​(wt​)−ft​(u))≤∑t​⟨wt​−u,zt​⟩≤klog(d)/η+η∑t​∑i​wt​[i]zt​[i]2

Proved
OnlineLearningOCO.Winnow.eq_3_3

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

mistake-boundonline-classificationonline-learningp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1winnow

Run Winnow with parameter 0<η≤1/20<\eta\le1/20<η≤1/2 on (x1,y1),…,(xT,yT)(x_1,y_1),\dots,(x_T,y_T)(x1​,y1​),…,(xT​,yT​) with xt∈{0,1}dx_t\in\{0,1\}^dxt​∈{0,1}d and yt∈{−1,1}y_t\in\{-1,1\}yt​∈{−1,1}; let M\mathcal MM be its error rounds, ft(w)=1[t∈M][1−yt(2⟨w,xt⟩−1)]+f_t(w)=\mathbf 1_{[t\in\mathcal M]}[1-y_t(2\langle w,x_t\rangle-1)]_+ft​(w)=1[t∈M]​[1−yt​(2⟨w,xt​⟩−1)]+​ its surrogate losses and zt=−2ytxtz_t=-2y_tx_tzt​=−2yt​xt​ for t∈Mt\in\mathcal Mt∈M, zt=0z_t=0zt​=0 otherwise. Then for every u∈{0,1}du\in\{0,1\}^du∈{0,1}d with ∥u∥1=k≥1\|u\|_1=k\ge1∥u∥1​=k≥1,

∑t=1T(ft(wt)−ft(u))≤∑t=1T⟨wt−u,zt⟩≤klog⁡dη+η∑t=1T∑iwt[i] zt[i]2.\sum_{t=1}^T\bigl(f_t(w_t)-f_t(u)\bigr)\le\sum_{t=1}^T\langle w_t-u,z_t\rangle\le\frac{k\log d}{\eta}+\eta\sum_{t=1}^T\sum_i w_t[i]\,z_t[i]^2 .t=1∑T​(ft​(wt​)−ft​(u))≤t=1∑T​⟨wt​−u,zt​⟩≤ηklogd​+ηt=1∑T​i∑​wt​[i]zt​[i]2.

The first inequality is the subgradient inequality for the surrogates; the second is Theorem 2.23 with λ=1/d\lambda=1/dλ=1/d specialised to Boolean comparators. Together with (3.4) it yields Theorem 3.10.

Formalization Note ztz_tzt​ carries the corrected sign −2ytxt-2y_tx_t−2yt​xt​ (the paper prints 2ytxt2y_tx_t2yt​xt​; see the Winnow definition). The hypotheses 1≤k1\le k1≤k and η≤1/2\eta\le1/2η≤1/2 come from the page: 1+klog⁡(d/e)≤klog⁡d1+k\log(d/e)\le k\log d1+klog(d/e)≤klogd needs k≥1k\ge1k≥1, and Theorem 3.10 assumes η≤1/2\eta\le1/2η≤1/2, which gives ηzt[i]≥−1\eta z_t[i]\ge-1ηzt​[i]≥−1. The sequence hypotheses are stated for all rounds (a finite sequence extends to an infinite one). Rounds are numbered 0,…,T−10,\dots,T-10,…,T−1.

Preamble
import Mathlib
import Definitions.Def_OnlineLearningOCO_Winnow_Winnow
open Finset
Formal statement
namespace OnlineLearningOCO.Winnow

/-- Equation (3.3) (proof of Theorem 3.10, p. 174). For Winnow with `0 < η ≤ 1/2` on instances
`x_t ∈ {0,1}^d` and labels `y_t ∈ {-1, 1}`, with `z_t = -2 y_t x_t · 1[t ∈ M]`, and for every
`u ∈ {0,1}^d` with `‖u‖₁ = k ≥ 1`,
`∑_t (f_t(w_t) - f_t(u)) ≤ ∑_t ⟨w_t - u, z_t⟩ ≤ k log(d)/η + η ∑_t ∑_i w_t[i] z_t[i]²`.
Rounds `0, …, T-1` stand for the paper's `1, …, T`. -/
theorem eq_3_3 (d k : ℕ) (hk : 1 ≤ k) (η : ℝ) (hη : 0 < η) (hη2 : η ≤ 1 / 2)
    (x : ℕ → Fin d → ℝ) (hx : ∀ t i, x t i = 0 ∨ x t i = 1)
    (y : ℕ → ℝ) (hy : ∀ t, y t = 1 ∨ y t = -1)
    (u : Fin d → ℝ) (hu : ∀ i, u i = 0 ∨ u i = 1) (hu1 : ∑ i, u i = (k : ℝ)) (T : ℕ) :
    ∑ t ∈ range T, (winnowSurrogate d η x y t (winnowWeights d η x y t) -
        winnowSurrogate d η x y t u) ≤
      ∑ t ∈ range T, ∑ i, (winnowWeights d η x y t i - u i) * winnowZ d η x y t i ∧
    ∑ t ∈ range T, ∑ i, (winnowWeights d η x y t i - u i) * winnowZ d η x y t i ≤
      (k : ℝ) * Real.log d / η +
        η * ∑ t ∈ range T, ∑ i, winnowWeights d η x y t i * winnowZ d η x y t i ^ 2 := by sorry

end OnlineLearningOCO.Winnow
Source
Shalev-Shwartz, Online Learning and Online Convex Optimization, Found. Trends Mach. Learn. 4(2) (2011) 107–194, p. 174, §3.3.2, proof of Theorem 3.10, Equation (3.3)
Human review
  • Endorsed by Shuze Chen · Oct 7, 2026

    Confirmed by the moderator at approval.

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