Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Ch. 4 preamble, §4.1, (4.2)–(4.3), (4.6) — Bregman divergence, mirror maps, Bregman projection, mirror descent and dual averaging runs

Definition
ConvexOptAlg_MirrorDescent_Defs

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

bregman-divergenceconvex-optimizationmirror-descentp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-bookp2o-v1

Throughout, EEE is a finite-dimensional real vector space with an arbitrary norm ∥⋅∥\|\cdot\|∥⋅∥ (the book's Rn\mathbb R^nRn with an arbitrary norm). Linear functionals ggg on EEE carry the dual norm ∥g∥∗=sup⁡∥x∥≤1g(x)\|g\|_*=\sup_{\|x\|\le1}g(x)∥g∥∗​=sup∥x∥≤1​g(x), and the book's pairing g⊤xg^\top xg⊤x is g(x)g(x)g(x). A function Φ\PhiΦ comes with an explicit gradient map x↦∇Φ(x)x\mapsto\nabla\Phi(x)x↦∇Φ(x), a linear functional on EEE.

  1. Bregman divergence. DΦ(x,y)=Φ(x)−Φ(y)−∇Φ(y)⊤(x−y)D_\Phi(x,y)=\Phi(x)-\Phi(y)-\nabla\Phi(y)^\top(x-y)DΦ​(x,y)=Φ(x)−Φ(y)−∇Φ(y)⊤(x−y).
  2. Mirror map. Let D⊆E\mathcal D\subseteq ED⊆E be a convex open set. Φ:D→R\Phi:\mathcal D\to\mathbb RΦ:D→R is a mirror map if (i) Φ\PhiΦ is strictly convex and differentiable on D\mathcal DD with gradient ∇Φ(x)\nabla\Phi(x)∇Φ(x); (ii) the gradient takes all possible values, ∇Φ(D)=E∗\nabla\Phi(\mathcal D)=E^*∇Φ(D)=E∗; (iii) the gradient diverges on the boundary of D\mathcal DD: ∥∇Φ(x)∥∗→+∞\|\nabla\Phi(x)\|_*\to+\infty∥∇Φ(x)∥∗​→+∞ as x→zx\to zx→z within D\mathcal DD, for every boundary point zzz of D\mathcal DD.
  3. Standing setting of Chapter 4. X\mathcal XX is compact and convex, Φ\PhiΦ is a mirror map on D\mathcal DD, X⊆D‾\mathcal X\subseteq\overline{\mathcal D}X⊆D and X∩D≠∅\mathcal X\cap\mathcal D\neq\emptysetX∩D=∅.
  4. Subgradient. A linear functional ggg is a subgradient of fff at xxx (relative to X\mathcal XX) if f(x)−f(y)≤g⊤(x−y)f(x)-f(y)\le g^\top(x-y)f(x)−f(y)≤g⊤(x−y) for every y∈Xy\in\mathcal Xy∈X.
  5. ρ\rhoρ-strong convexity of the mirror map on X∩D\mathcal X\cap\mathcal DX∩D: for all x,y∈X∩Dx,y\in\mathcal X\cap\mathcal Dx,y∈X∩D,
Φ(x)−Φ(y)≤∇Φ(x)⊤(x−y)−ρ2∥x−y∥2.\Phi(x)-\Phi(y)\le\nabla\Phi(x)^\top(x-y)-\frac{\rho}{2}\|x-y\|^2 .Φ(x)−Φ(y)≤∇Φ(x)⊤(x−y)−2ρ​∥x−y∥2.
  1. Bregman projection. z=ΠXΦ(y)z=\Pi^\Phi_{\mathcal X}(y)z=ΠXΦ​(y) means z∈X∩Dz\in\mathcal X\cap\mathcal Dz∈X∩D and DΦ(z,y)≤DΦ(x,y)D_\Phi(z,y)\le D_\Phi(x,y)DΦ​(z,y)≤DΦ​(x,y) for every x∈X∩Dx\in\mathcal X\cap\mathcal Dx∈X∩D.
  2. Mirror descent run with step η\etaη for the steps t=1,…,Tt=1,\dots,Tt=1,…,T: x1∈argmin⁡x∈X∩DΦ(x)x_1\in\operatorname{argmin}_{x\in\mathcal X\cap\mathcal D}\Phi(x)x1​∈argminx∈X∩D​Φ(x) and, for 1≤t≤T1\le t\le T1≤t≤T, gtg_tgt​ is a subgradient of fff at xtx_txt​, yt+1∈Dy_{t+1}\in\mathcal Dyt+1​∈D satisfies
∇Φ(yt+1)=∇Φ(xt)−ηgt,\nabla\Phi(y_{t+1})=\nabla\Phi(x_t)-\eta g_t,∇Φ(yt+1​)=∇Φ(xt​)−ηgt​,

and xt+1=ΠXΦ(yt+1)x_{t+1}=\Pi^\Phi_{\mathcal X}(y_{t+1})xt+1​=ΠXΦ​(yt+1​). 8. Dual averaging run with step η\etaη for the steps t=1,…,Tt=1,\dots,Tt=1,…,T: for 1≤t≤T+11\le t\le T+11≤t≤T+1,

xt∈argmin⁡x∈X∩D η∑s=1t−1gs⊤x+Φ(x),x_t\in\operatorname*{argmin}_{x\in\mathcal X\cap\mathcal D}\ \eta\sum_{s=1}^{t-1}g_s^\top x+\Phi(x),xt​∈x∈X∩Dargmin​ ηs=1∑t−1​gs⊤​x+Φ(x),

and for 1≤t≤T1\le t\le T1≤t≤T, gtg_tgt​ is a subgradient of fff at xtx_txt​.

These are the objects of Chapter 4 of the book: mirror descent (Section 4.2) and its lazy variant, dual averaging (Section 4.4). Every rate statement of the mission quantifies over all runs, with any choice of subgradient, dual point and minimizer.

Formalization Note The gradient ∇Φ(x)\nabla\Phi(x)∇Φ(x) is an explicit map Φ' : E → E →L[ℝ] ℝ with HasFDerivAt Φ (Φ' x) x on D\mathcal DD; only the values of Φ\PhiΦ and ∇Φ\nabla\Phi∇Φ on D\mathcal DD matter. The dual norm is the operator norm on E →L[ℝ] ℝ. Sequences are indexed from 111 (index 000 is unused). Strong convexity of Φ\PhiΦ is stated with the gradient, the form the book's proofs use; the preamble's subgradient form implies it. Dual averaging is encoded by its closed form (4.6), as the book does.

Definition code
import Mathlib

namespace ConvexOptAlg.MirrorDescent

/-- Bubeck, Ch. 4 preamble, p. 297: the Bregman divergence
`D_Φ(x, y) = Φ(x) − Φ(y) − ∇Φ(y)ᵀ(x − y)`. The gradient `∇Φ(y)` is the explicit map `Φ' y`, a
continuous linear functional on `E` (the book's `∇Φ(y)ᵀv` is `Φ' y v`). -/
def bregman {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    (Φ : E → ℝ) (Φ' : E → E →L[ℝ] ℝ) (x y : E) : ℝ :=
  Φ x - Φ y - Φ' y (x - y)

/-- Bubeck, §4.1, p. 298: `Φ : D → ℝ` is a mirror map on the convex open set `D` if
(i) `Φ` is strictly convex and differentiable on `D`, with gradient `Φ' x` at every `x ∈ D`;
(ii) the gradient takes all possible values, `∇Φ(D) = ℝⁿ` (every continuous linear functional is
`Φ' y` for some `y ∈ D`);
(iii) the gradient diverges on the boundary of `D`: `‖∇Φ(x)‖ → +∞` as `x → z ∈ ∂D` within `D`.
Only the values of `Φ` and `Φ'` on `D` matter. -/
def IsMirrorMap {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    (D : Set E) (Φ : E → ℝ) (Φ' : E → E →L[ℝ] ℝ) : Prop :=
  IsOpen D ∧ Convex ℝ D ∧ StrictConvexOn ℝ D Φ ∧
    (∀ x ∈ D, HasFDerivAt Φ (Φ' x) x) ∧
    (∀ φ : E →L[ℝ] ℝ, ∃ y ∈ D, Φ' y = φ) ∧
    (∀ z ∈ frontier D, Filter.Tendsto (fun x => ‖Φ' x‖) (nhdsWithin z D) Filter.atTop)

/-- Bubeck, Ch. 4 preamble (p. 297) and §4.1 (p. 298): the standing setting of the chapter. `X` is a
compact convex set, `Φ` is a mirror map on the convex open set `D`, `X` is included in the closure
of `D`, and `X ∩ D ≠ ∅`. -/
def IsMirrorSetting {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    (X D : Set E) (Φ : E → ℝ) (Φ' : E → E →L[ℝ] ℝ) : Prop :=
  IsCompact X ∧ Convex ℝ X ∧ IsMirrorMap D Φ Φ' ∧ X ⊆ closure D ∧ (X ∩ D).Nonempty

/-- Bubeck, Definition 1.2 (p. 235) in the dual-norm setting of Ch. 4: the continuous linear
functional `g` is a subgradient of `f` at `x` relative to `X` if `f(x) − f(y) ≤ gᵀ(x − y)` for every
`y ∈ X`. -/
def IsSubgradientOnN {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    (X : Set E) (f : E → ℝ) (x : E) (g : E →L[ℝ] ℝ) : Prop :=
  ∀ y ∈ X, f x - f y ≤ g (x - y)

/-- Bubeck, Ch. 4 preamble (iii), p. 297, for the differentiable mirror map: `Φ` is `ρ`-strongly
convex on `X ∩ D` w.r.t. `‖·‖` if
`Φ(x) − Φ(y) ≤ ∇Φ(x)ᵀ(x − y) − (ρ/2)‖x − y‖²` for all `x, y ∈ X ∩ D`. -/
def IsStronglyConvexMirror {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    (X D : Set E) (Φ : E → ℝ) (Φ' : E → E →L[ℝ] ℝ) (ρ : ℝ) : Prop :=
  ∀ x ∈ X ∩ D, ∀ y ∈ X ∩ D, Φ x - Φ y ≤ Φ' x (x - y) - ρ / 2 * ‖x - y‖ ^ 2

/-- Bubeck, §4.1, p. 298: `z` is the Bregman projection `Π^Φ_X(y) = argmin_{x ∈ X ∩ D} D_Φ(x, y)`,
i.e. `z ∈ X ∩ D` and `D_Φ(z, y) ≤ D_Φ(x, y)` for every `x ∈ X ∩ D`. -/
def IsBregmanProjection {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    (X D : Set E) (Φ : E → ℝ) (Φ' : E → E →L[ℝ] ℝ) (y z : E) : Prop :=
  z ∈ X ∩ D ∧ ∀ x ∈ X ∩ D, bregman Φ Φ' z y ≤ bregman Φ Φ' x y

/-- Bubeck, §4.2, (4.2)–(4.3), p. 299: `(x, y, g)` is a run of mirror descent on `f` with step `η`
for the steps `t = 1, …, T`. The first iterate `x 1 ∈ argmin_{x ∈ X ∩ D} Φ(x)` (index `0` is
unused); at every step `1 ≤ t ≤ T`, `g t` is a subgradient of `f` at `x t` (any one),
`y (t+1) ∈ D` satisfies `∇Φ(y_{t+1}) = ∇Φ(x_t) − η g_t` (4.2), and `x (t+1)` is the Bregman
projection `Π^Φ_X(y_{t+1})` (4.3). -/
def IsMirrorDescentRun {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    (X D : Set E) (Φ : E → ℝ) (Φ' : E → E →L[ℝ] ℝ) (f : E → ℝ) (η : ℝ)
    (x y : ℕ → E) (g : ℕ → E →L[ℝ] ℝ) (T : ℕ) : Prop :=
  x 1 ∈ X ∩ D ∧ (∀ z ∈ X ∩ D, Φ (x 1) ≤ Φ z) ∧
    ∀ t : ℕ, 1 ≤ t → t ≤ T →
      IsSubgradientOnN X f (x t) (g t) ∧
      y (t + 1) ∈ D ∧
      Φ' (y (t + 1)) = Φ' (x t) - η • g t ∧
      IsBregmanProjection X D Φ Φ' (y (t + 1)) (x (t + 1))

/-- Bubeck, §4.4, (4.6), p. 303: `(x, g)` is a run of dual averaging (lazy mirror descent) on `f`
with step `η` for the steps `t = 1, …, T`: for every `1 ≤ t ≤ T + 1`, the iterate
`x t ∈ argmin_{x ∈ X ∩ D} η ∑_{s=1}^{t−1} g_sᵀx + Φ(x)` (so `x 1` minimizes `Φ` on `X ∩ D`), and
for every `1 ≤ t ≤ T`, `g t` is a subgradient of `f` at `x t` (any one). The sum over `s < t` is
written `∑ s ∈ Finset.Ico 1 t`. -/
def IsDualAveragingRun {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    (X D : Set E) (Φ : E → ℝ) (f : E → ℝ) (η : ℝ)
    (x : ℕ → E) (g : ℕ → E →L[ℝ] ℝ) (T : ℕ) : Prop :=
  (∀ t : ℕ, 1 ≤ t → t ≤ T + 1 →
    x t ∈ X ∩ D ∧
      ∀ z ∈ X ∩ D,
        η * (∑ s ∈ Finset.Ico 1 t, g s (x t)) + Φ (x t) ≤
          η * (∑ s ∈ Finset.Ico 1 t, g s z) + Φ z) ∧
  ∀ t : ℕ, 1 ≤ t → t ≤ T → IsSubgradientOnN X f (x t) (g t)

end ConvexOptAlg.MirrorDescent
Source
Bubeck, arXiv:1405.4980v2, Ch. 4 preamble, p. 297; §4.1, p. 298; Eqs. (4.2)–(4.3), p. 299; Eq. (4.6), p. 303; Definition 1.2, p. 235

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me