Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Eq. (2) — one projected gradient step: 2∇ᵀ(x − u) ≤ (‖x − u‖² − ‖x' − u‖²)/η + ηG²

Proved
LogRegretOCO.OGD.one_step_inequality

by mikedeng1 · Sep 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

gradient-descentonline-convex-optimizationp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1projection

Let P⊆Rn\mathcal P\subseteq\mathbb R^nP⊆Rn be convex, let x,g∈Rnx,g\in\mathbb R^nx,g∈Rn, let η>0\eta>0η>0 and G∈RG\in\mathbb RG∈R with ∥g∥2≤G\|g\|_2\le G∥g∥2​≤G, and let z=ΠP(x−ηg)z=\Pi_{\mathcal P}(x-\eta g)z=ΠP​(x−ηg) be the Euclidean projection of the gradient step x−ηgx-\eta gx−ηg onto P\mathcal PP. Then for every u∈Pu\in\mathcal Pu∈P,

∥z−u∥22 ≤ ∥x−u∥22+η2∥g∥22−2η g⊤(x−u),\|z-u\|_2^2\ \le\ \|x-u\|_2^2+\eta^2\|g\|_2^2-2\eta\, g^\top(x-u),∥z−u∥22​ ≤ ∥x−u∥22​+η2∥g∥22​−2ηg⊤(x−u), 2 g⊤(x−u) ≤ ∥x−u∥22−∥z−u∥22η+η G2.2\,g^\top(x-u)\ \le\ \frac{\|x-u\|_2^2-\|z-u\|_2^2}{\eta}+\eta\,G^2 .2g⊤(x−u) ≤ η∥x−u∥22​−∥z−u∥22​​+ηG2.

This is display (2) in the proof of Theorem 1, applied there with x=xtx=x_tx=xt​, g=∇ft(xt)g=\nabla f_t(x_t)g=∇ft​(xt​), η=ηt+1\eta=\eta_{t+1}η=ηt+1​, z=xt+1z=x_{t+1}z=xt+1​ and u=x∗u=x^*u=x∗. It bounds the linearised regret of one round by a telescoping difference of squared distances plus a step-size term, which is Zinkevich's analysis of projected gradient descent.

Formalization Note The paper prints the second line as "5∇t⊤(xt−x∗)≤…5\nabla_t^\top(x_t-x^*)\le\dots5∇t⊤​(xt​−x∗)≤…"; the 555 is a typo for 222: the line follows from the first one by rearranging, and the proof then sums (2) against (1), which needs the factor 222. The Lean states 222. The point xxx is not required to lie in P\mathcal PP (the inequality holds anyway), and the comparator is any u∈Pu\in\mathcal Pu∈P rather than the minimiser x∗x^*x∗. Points are EuclideanSpace ℝ (Fin n).

Preamble
import Mathlib
import Definitions.Def_LogRegretOCO_OGD_Model
Formal statement
namespace LogRegretOCO.OGD

/-- **Eq. (2)** (p. 175): one projected gradient step `z = Π_P(x − η g)` with `η > 0`,
`‖g‖ ≤ G`, measured against any `u ∈ P`:
`‖z − u‖² ≤ ‖x − u‖² + η² ‖g‖² − 2η gᵀ(x − u)` and
`2 gᵀ(x − u) ≤ (‖x − u‖² − ‖z − u‖²)/η + η G²`.
(The paper prints `5∇_t^⊤` in the second line; it is `2∇_t^⊤`.) -/
theorem one_step_inequality {n : ℕ} (P : Set (E n)) (hPc : Convex ℝ P) (x g z u : E n)
    (η G : ℝ) (hη : 0 < η) (hg : ‖g‖ ≤ G) (hz : IsProj P (x - η • g) z) (hu : u ∈ P) :
    ‖z - u‖ ^ 2 ≤ ‖x - u‖ ^ 2 + η ^ 2 * ‖g‖ ^ 2 - 2 * η * inner ℝ g (x - u) ∧
      2 * inner ℝ g (x - u) ≤ (‖x - u‖ ^ 2 - ‖z - u‖ ^ 2) / η + η * G ^ 2 := by sorry

end LogRegretOCO.OGD
Source
Hazan, Agarwal, Kale, Logarithmic regret algorithms for online convex optimization, Mach Learn 69 (2007), p. 175, proof of Theorem 1, Eq. (2)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

The inputs are:

  • a natural number nnn, with Rn\mathbb{R}^nRn carrying the Euclidean norm ∥⋅∥\|\cdot\|∥⋅∥ and inner product ⟨⋅,⋅⟩\langle\cdot,\cdot\rangle⟨⋅,⋅⟩;
  • a set P⊆RnP \subseteq \mathbb{R}^nP⊆Rn, assumed convex;
  • points x,g,z,u∈Rnx, g, z, u \in \mathbb{R}^nx,g,z,u∈Rn;
  • real numbers η\etaη and GGG.

The hypotheses are:

  1. η>0\eta > 0η>0.
  2. ∥g∥≤G\|g\| \le G∥g∥≤G.
  3. zzz is a projection of x−ηgx - \eta gx−ηg onto PPP. That is, z∈Pz \in Pz∈P and ∥z−(x−ηg)∥≤∥w−(x−ηg)∥\|z - (x - \eta g)\| \le \|w - (x - \eta g)\|∥z−(x−ηg)∥≤∥w−(x−ηg)∥ for every w∈Pw \in Pw∈P. So zzz is some nearest point of PPP to x−ηgx - \eta gx−ηg, and uniqueness is not assumed.
  4. u∈Pu \in Pu∈P.

Nothing requires x∈Px \in Px∈P, and nothing requires PPP to be closed.

The theorem asserts that both of the following hold:

∥z−u∥2  ≤  ∥x−u∥2+η2∥g∥2−2η ⟨g, x−u⟩,\|z - u\|^2 \;\le\; \|x - u\|^2 + \eta^2\|g\|^2 - 2\eta\,\langle g,\, x - u\rangle,∥z−u∥2≤∥x−u∥2+η2∥g∥2−2η⟨g,x−u⟩, 2 ⟨g, x−u⟩  ≤  ∥x−u∥2−∥z−u∥2η+η G2.2\,\langle g,\, x - u\rangle \;\le\; \frac{\|x - u\|^2 - \|z - u\|^2}{\eta} + \eta\, G^2 .2⟨g,x−u⟩≤η∥x−u∥2−∥z−u∥2​+ηG2.

The division by η\etaη is a genuine division, because η>0\eta > 0η>0.

Degenerate cases.

  • Hypothesis 2 forces G≥0G \ge 0G≥0.
  • If PPP is empty, or PPP has no nearest point to x−ηgx - \eta gx−ηg, hypothesis 3 cannot hold and the statement is vacuous for those data.
  • If n=0n = 0n=0, all vectors are 000. The inequalities become 0≤00 \le 00≤0 and 0≤ηG20 \le \eta G^20≤ηG2, and the second holds because G≥0G \ge 0G≥0.
  • If g=0g = 0g=0, the first inequality says ∥z−u∥2≤∥x−u∥2\|z - u\|^2 \le \|x - u\|^2∥z−u∥2≤∥x−u∥2, where zzz is a nearest point of PPP to xxx.
  • If P={u}P = \{u\}P={u} is a single point, then z=uz = uz=u and the left side of the first inequality is 000.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me