Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 7.1, p. 100 — exact FTRL regret identity

Proved
ModernOnlineLearning.FTRL.lemma_7_1

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

ftrlonline-learningp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-bookp2o-v1regret

Let VVV be closed and nonempty, and let xtx_txt​ minimize Ft(z)=ψt(z)+∑i=1t−1ℓi(z)F_t(z)=\psi_t(z)+\sum_{i=1}^{t-1}\ell_i(z)Ft​(z)=ψt​(z)+∑i=1t−1​ℓi​(z) over VVV for rounds t=1,…,T+1t=1,\ldots,T+1t=1,…,T+1. For every comparator uuu in the ambient space,

∑t=1T(ℓt(xt)−ℓt(u))=ψT+1(u)−ψ1(x1)+∑t=1T(Ft(xt)−Ft+1(xt+1)+ℓt(xt))+FT+1(xT+1)−FT+1(u).\sum_{t=1}^{T}(\ell_t(x_t)-\ell_t(u))=\psi_{T+1}(u)-\psi_1(x_1)+\sum_{t=1}^{T}\bigl(F_t(x_t)-F_{t+1}(x_{t+1})+\ell_t(x_t)\bigr)+F_{T+1}(x_{T+1})-F_{T+1}(u).t=1∑T​(ℓt​(xt​)−ℓt​(u))=ψT+1​(u)−ψ1​(x1​)+t=1∑T​(Ft​(xt​)−Ft+1​(xt+1​)+ℓt​(xt​))+FT+1​(xT+1​)−FT+1​(u).

The identity separates comparator regularization from the changes in successive regularized objectives and is the algebraic starting point for FTRL regret bounds.

Formalization Note ψ1(x1)\psi_1(x_1)ψ1​(x1​) is the book's min⁡z∈Vψ1(z)\min_{z\in V}\psi_1(z)minz∈V​ψ1​(z) because the first-round objective is F1=ψ1F_1=\psi_1F1​=ψ1​. Losses are real-valued. The book's final sentence, that ψT+1\psi_{T+1}ψT+1​ does not change the first TTT iterates, follows directly from the run definition and is not included in the Lean equality.

Preamble
import Mathlib
import Definitions.Def_ModernOnlineLearning_FTRL_Defs

set_option autoImplicit false
Formal statement
namespace ModernOnlineLearning.FTRL

/-- Orabona, Lemma 7.1, p. 100: the exact FTRL regret identity. -/
theorem lemma_7_1
    {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    (V : Set E) (hVclosed : IsClosed V) (hVnonempty : V.Nonempty)
    (ψ ℓ : ℕ → E → ℝ) (x : ℕ → E) (T : ℕ)
    (hRun : IsFTRLRunUpTo V ψ ℓ x T) (u : E) :
    (∑ t ∈ Finset.Icc 1 T, (ℓ t (x t) - ℓ t u)) =
      ψ (T + 1) u - ψ 1 (x 1) +
      (∑ t ∈ Finset.Icc 1 T,
        (F ψ ℓ t (x t) - F ψ ℓ (t + 1) (x (t + 1)) + ℓ t (x t))) +
      F ψ ℓ (T + 1) (x (T + 1)) - F ψ ℓ (T + 1) u := by sorry

end ModernOnlineLearning.FTRL
Source
Orabona, arXiv:1912.13213v10, Lemma 7.1, p. 100
Human review
  • Endorsed by Shuze Chen · Oct 9, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 9, 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