Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 2.20 — OMD with link ∇R⋆\nabla R^\star∇R⋆: regret ≤R(u)−R(w1)+∑tDR⋆(−z1:t∥−z1:t−1)\le R(u)-R(w_1)+\sum_t D_{R^\star}(-z_{1:t}\|-z_{1:t-1})≤R(u)−R(w1​)+∑t​DR⋆​(−z1:t​∥−z1:t−1​)

Proved
OnlineLearningOCO.Winnow.lemma_2_20

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

mirror-descentonline-convex-optimizationonline-learningp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1regret

Let EEE be a real Hilbert space, S⊆ES\subseteq ES⊆E, R:E→RR:E\to\mathbb RR:E→R (equal to +∞+\infty+∞ off SSS in the paper's convention), and let R⋆(θ)=sup⁡w∈S(⟨w,θ⟩−R(w))R^\star(\theta)=\sup_{w\in S}(\langle w,\theta\rangle-R(w))R⋆(θ)=supw∈S​(⟨w,θ⟩−R(w)) be its conjugate. Suppose the link function g:E→Eg:E\to Eg:E→E satisfies g=∇R⋆g=\nabla R^\starg=∇R⋆ in the following sense: for every θ\thetaθ, g(θ)∈Sg(\theta)\in Sg(θ)∈S, g(θ)g(\theta)g(θ) attains the supremum defining R⋆(θ)R^\star(\theta)R⋆(θ), and R⋆R^\starR⋆ is differentiable at θ\thetaθ with gradient g(θ)g(\theta)g(θ). Run Online Mirror Descent with link ggg on linear losses z1,…,zT∈Ez_1,\dots,z_T\in Ez1​,…,zT​∈E, so wt=g(−z1:t−1)w_t=g(-z_{1:t-1})wt​=g(−z1:t−1​). Then for every u∈Su\in Su∈S,

∑t=1T⟨wt−u,zt⟩≤R(u)−R(w1)+∑t=1TDR⋆(−z1:t ∥ −z1:t−1),\sum_{t=1}^T\langle w_t-u,z_t\rangle\le R(u)-R(w_1)+\sum_{t=1}^T D_{R^\star}\bigl(-z_{1:t}\,\|\,-z_{1:t-1}\bigr),t=1∑T​⟨wt​−u,zt​⟩≤R(u)−R(w1​)+t=1∑T​DR⋆​(−z1:t​∥−z1:t−1​),

and equality holds when u∈Su\in Su∈S minimizes R(v)+∑t=1T⟨v,zt⟩R(v)+\sum_{t=1}^T\langle v,z_t\rangleR(v)+∑t=1T​⟨v,zt​⟩ over v∈Sv\in Sv∈S.

The lemma reduces the regret analysis of OMD to bounding one Bregman divergence of the conjugate per round; Theorem 2.23 applies it to the unnormalized entropy, and through it Winnow's mistake bound follows.

Formalization Note The paper's "g=∇R⋆g=\nabla R^\starg=∇R⋆" (via Lemma 2.19 and (2.13), cited rather than proved) is encoded by three hypotheses: g(θ)∈Sg(\theta)\in Sg(θ)∈S, attainment of the supremum at g(θ)g(\theta)g(θ), and HasGradientAt of R⋆R^\starR⋆ with gradient g(θ)g(\theta)g(θ). The comparator uuu ranges over SSS, where RRR is finite. Rounds are numbered 0,…,T−10,\dots,T-10,…,T−1, and w1w_1w1​ is omdIterate g z 0. A copy of this lemma is also drafted in the Normalized EG mission of the same series.

Preamble
import Mathlib
import Definitions.Def_OnlineLearningOCO_Winnow_OMDDuality
open Finset
open scoped InnerProductSpace
Formal statement
namespace OnlineLearningOCO.Winnow

/-- Lemma 2.20 (p. 150). Online Mirror Descent with link function `g = ∇R⋆` on linear losses
`z_t`: for every `u ∈ S`,
`∑_{t} ⟨w_t - u, z_t⟩ ≤ R(u) - R(w₁) + ∑_{t} D_{R⋆}(-z_{1:t} ‖ -z_{1:t-1})`,
with equality when `u` minimizes `R(v) + ∑_t ⟨v, z_t⟩` over `S`. Rounds are numbered from `0`.
"`g = ∇R⋆`" is encoded by: `g θ ∈ S`, `g θ` attains `sup_{w ∈ S} (⟨w, θ⟩ - R w)` (2.8), (2.13), and
`R⋆` has gradient `g θ` at every `θ`. -/
theorem lemma_2_20 {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E]
    (S : Set E) (R : E → ℝ) (g : E → E) (z : ℕ → E)
    (hgS : ∀ θ, g θ ∈ S)
    (hgmax : ∀ θ, ∀ w ∈ S, ⟪w, θ⟫_ℝ - R w ≤ ⟪g θ, θ⟫_ℝ - R (g θ))
    (hgrad : ∀ θ, HasGradientAt (conjOn S R) (g θ) θ) (T : ℕ) :
    (∀ u ∈ S, ∑ t ∈ range T, ⟪omdIterate g z t - u, z t⟫_ℝ ≤
        R u - R (omdIterate g z 0) +
          ∑ t ∈ range T, bregmanDiv (conjOn S R) g
            (-(∑ s ∈ range (t + 1), z s)) (-(∑ s ∈ range t, z s))) ∧
    (∀ u ∈ S, (∀ v ∈ S, R u + ∑ t ∈ range T, ⟪u, z t⟫_ℝ ≤ R v + ∑ t ∈ range T, ⟪v, z t⟫_ℝ) →
      ∑ t ∈ range T, ⟪omdIterate g z t - u, z t⟫_ℝ =
        R u - R (omdIterate g z 0) +
          ∑ t ∈ range T, bregmanDiv (conjOn S R) g
            (-(∑ s ∈ range (t + 1), z s)) (-(∑ s ∈ range t, z s))) := by sorry

end OnlineLearningOCO.Winnow
Source
Shalev-Shwartz, Online Learning and Online Convex Optimization, Found. Trends Mach. Learn. 4(2) (2011) 107–194, p. 150, Lemma 2.20
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