Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 2.20 — the regret of OMD with link ∇R⋆ is R(u) − R(w₁) plus the Bregman terms of R⋆

Proved
OnlineLearningOCO.NormalizedEG.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 a regularizer (taken to be +∞+\infty+∞ off SSS), 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 Fenchel conjugate. Let g:E→Eg : E \to Eg:E→E be a link function with g=∇R⋆g = \nabla R^\starg=∇R⋆, in the sense that for every θ∈E\theta \in Eθ∈E:

  1. g(θ)∈Sg(\theta) \in Sg(θ)∈S;
  2. g(θ)g(\theta)g(θ) attains the supremum: ⟨w,θ⟩−R(w)≤⟨g(θ),θ⟩−R(g(θ))\langle w,\theta\rangle - R(w) \le \langle g(\theta),\theta\rangle - R(g(\theta))⟨w,θ⟩−R(w)≤⟨g(θ),θ⟩−R(g(θ)) for every w∈Sw \in Sw∈S (that is, g(θ)=argmax⁡w(⟨w,θ⟩−R(w))g(\theta) = \operatorname{argmax}_w(\langle w,\theta\rangle - R(w))g(θ)=argmaxw​(⟨w,θ⟩−R(w)), (2.8) and (2.13));
  3. R⋆R^\starR⋆ is differentiable at θ\thetaθ with gradient g(θ)g(\theta)g(θ).

Run Online Mirror Descent with link ggg on linear losses ft(w)=⟨w,zt⟩f_t(w) = \langle w, z_t\rangleft​(w)=⟨w,zt​⟩, zt∈Ez_t \in Ezt​∈E, so that wt=g(−z1:t−1)w_t = g(-z_{1:t-1})wt​=g(−z1:t−1​). Then for every TTT and 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}(-z_{1:t} \,\|\, -z_{1:t-1}),t=1∑T​⟨wt​−u,zt​⟩≤R(u)−R(w1​)+t=1∑T​DR⋆​(−z1:t​∥−z1:t−1​),

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

This is the general regret identity for Online Mirror Descent by duality; it reduces the analysis of a specific algorithm to bounding the Bregman divergences of the conjugate, which is how Theorem 2.22 is proved.

Formalization Note Rounds are numbered from 000: Lean's omdIterate g z t = g(-∑_{s<t} z s) is the paper's wt+1w_{t+1}wt+1​, and omdIterate g z 0 = g 0 is w1w_1w1​. The paper's RRR equals +∞+\infty+∞ off SSS; here RRR is real-valued and the comparator uuu and the minimizer range over SSS only, which is the same statement. The phrase "g=∇R⋆g = \nabla R^\starg=∇R⋆" is encoded by the three hypotheses above; differentiability of R⋆R^\starR⋆ is the paper's standing consequence of Lemma 2.19 and is assumed, not derived. The same lemma is also drafted, independently, by the Winnow mission of this series.

Preamble
import Mathlib
import Definitions.Def_OnlineLearningOCO_NormalizedEG_Duality
open scoped RealInnerProductSpace
Formal statement
namespace OnlineLearningOCO.NormalizedEG

/-- Lemma 2.20, p. 150. Online Mirror Descent with link function `g = ∇R⋆` (where `R⋆` is the
Fenchel conjugate of `R + I_S`) has regret, against every `u ∈ S`,
`∑_{t=1}^T ⟨w_t − u, z_t⟩ ≤ R(u) − R(w_1) + ∑_{t=1}^T D_{R⋆}(−z_{1:t} ‖ −z_{1:t−1})`,
with equality for a `u ∈ S` minimizing `R(u) + ∑_t ⟨u, z_t⟩` over `S`.
"`g = ∇R⋆`" is encoded by: `g` maps into `S`; `g θ` attains the supremum defining `R⋆(θ)`
((2.8)/(2.13)); and `g θ` is the gradient of `R⋆` at `θ`. Rounds are 0-based. -/
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 (fenchelConj S R) (g θ) θ)
    (T : ℕ) :
    (∀ u ∈ S,
      ∑ t ∈ Finset.range T, ⟪omdIterate g z t - u, z t⟫ ≤
        R u - R (omdIterate g z 0) +
          ∑ t ∈ Finset.range T,
            bregman (fenchelConj S R) g (-(cumSum z (t + 1))) (-(cumSum z t))) ∧
    (∀ u ∈ S,
      (∀ v ∈ S, R u + ∑ t ∈ Finset.range T, ⟪u, z t⟫ ≤ R v + ∑ t ∈ Finset.range T, ⟪v, z t⟫) →
      ∑ t ∈ Finset.range T, ⟪omdIterate g z t - u, z t⟫ =
        R u - R (omdIterate g z 0) +
          ∑ t ∈ Finset.range T,
            bregman (fenchelConj S R) g (-(cumSum z (t + 1))) (-(cumSum z t))) := by sorry

end OnlineLearningOCO.NormalizedEG
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