Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2.23 — unnormalized EG has regret ≤(dλ+∑iu[i]log⁡(u[i]/(eλ)))/η+η∑t∑iwt[i]zt[i]2\le(d\lambda+\sum_i u[i]\log(u[i]/(e\lambda)))/\eta+\eta\sum_t\sum_i w_t[i]z_t[i]^2≤(dλ+∑i​u[i]log(u[i]/(eλ)))/η+η∑t​∑i​wt​[i]zt​[i]2

Proved
OnlineLearningOCO.Winnow.theorem_2_23

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

exponentiated-gradientonline-convex-optimizationonline-learningp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1regret

Let η,λ>0\eta,\lambda>0η,λ>0 and run unnormalized EG in dimension ddd on linear losses z1,…,zT∈Rdz_1,\dots,z_T\in\mathbb R^dz1​,…,zT​∈Rd with ηzt[i]≥−1\eta z_t[i]\ge-1ηzt​[i]≥−1 for all t,it,it,i; write wtw_twt​ for its weights. Then for every u∈Rdu\in\mathbb R^du∈Rd with u≥0u\ge 0u≥0,

∑t=1T⟨wt−u,zt⟩≤dλ+∑i=1du[i]log⁡(u[i]/(eλ))η+η∑t=1T∑i=1dwt[i] zt[i]2.\sum_{t=1}^T\langle w_t-u,z_t\rangle\le\frac{d\lambda+\sum_{i=1}^d u[i]\log\bigl(u[i]/(e\lambda)\bigr)}{\eta}+\eta\sum_{t=1}^T\sum_{i=1}^d w_t[i]\,z_t[i]^2 .t=1∑T​⟨wt​−u,zt​⟩≤ηdλ+∑i=1d​u[i]log(u[i]/(eλ))​+ηt=1∑T​i=1∑d​wt​[i]zt​[i]2.

In particular, if d≥1d\ge1d≥1 and λ=1/d\lambda=1/dλ=1/d,

∑t=1T⟨wt−u,zt⟩≤1+(log⁡d−1)∥u∥1+∑i=1du[i]log⁡u[i]η+η∑t=1T∑i=1dwt[i] zt[i]2.\sum_{t=1}^T\langle w_t-u,z_t\rangle\le\frac{1+(\log d-1)\|u\|_1+\sum_{i=1}^d u[i]\log u[i]}{\eta}+\eta\sum_{t=1}^T\sum_{i=1}^d w_t[i]\,z_t[i]^2 .t=1∑T​⟨wt​−u,zt​⟩≤η1+(logd−1)∥u∥1​+∑i=1d​u[i]logu[i]​+ηt=1∑T​i=1∑d​wt​[i]zt​[i]2.

Here log⁡\loglog is the natural logarithm and 0log⁡0=00\log 0=00log0=0.

This is a local-norm regret bound: the second term weighs each squared loss by the current weight. It is the bound Winnow's mistake bound is derived from.

Formalization Note 0log⁡0=00\log 0=00log0=0 holds in Lean because Real.log 0 = 0, so coordinates with u[i]=0u[i]=0u[i]=0 contribute nothing, as in the entropy convention. ∥u∥1\|u\|_1∥u∥1​ is written ∑iu[i]\sum_i u[i]∑i​u[i], which equals it because u≥0u\ge0u≥0. The second display is stated under 0<d0<d0<d, needed for λ=1/d>0\lambda=1/d>0λ=1/d>0. Rounds are numbered 0,…,T−10,\dots,T-10,…,T−1.

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

/-- Theorem 2.23 (p. 154). Unnormalized EG with parameters `η, λ > 0` on linear losses with
`η z_t[i] ≥ -1` satisfies, for every `u ≥ 0`,
`∑_t ⟨w_t - u, z_t⟩ ≤ (dλ + ∑_i u[i] log(u[i]/(eλ)))/η + η ∑_t ∑_i w_t[i] z_t[i]²`,
and, with `λ = 1/d`,
`∑_t ⟨w_t - u, z_t⟩ ≤ (1 + (log d - 1)‖u‖₁ + ∑_i u[i] log u[i])/η + η ∑_t ∑_i w_t[i] z_t[i]²`.
Rounds are numbered from `0`; `0 · log 0 = 0` through `Real.log 0 = 0`. -/
theorem theorem_2_23 {d : ℕ} (η lam : ℝ) (hη : 0 < η) (hlam : 0 < lam) (z : ℕ → Fin d → ℝ)
    (hz : ∀ t i, -1 ≤ η * z t i) (u : Fin d → ℝ) (hu : ∀ i, 0 ≤ u i) (T : ℕ) :
    (∑ t ∈ range T, ∑ i, (uegWeights η lam z t i - u i) * z t i ≤
      ((d : ℝ) * lam + ∑ i, u i * Real.log (u i / (Real.exp 1 * lam))) / η +
        η * ∑ t ∈ range T, ∑ i, uegWeights η lam z t i * z t i ^ 2) ∧
    (0 < d →
      ∑ t ∈ range T, ∑ i, (uegWeights η (1 / (d : ℝ)) z t i - u i) * z t i ≤
        (1 + (Real.log d - 1) * ∑ i, u i + ∑ i, u i * Real.log (u i)) / η +
          η * ∑ t ∈ range T, ∑ i, uegWeights η (1 / (d : ℝ)) z t i * z 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. 154, Theorem 2.23 (proof p. 155)
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