Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma 10 — Follow the Leader is no worse than Be the Leader (index corrected)

Proved
LogRegretOCO.FTAL.ftl_be_the_leader

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

online-convex-optimizationonline-learningp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1regret

Let f1,f2,…f_1, f_2, \dotsf1​,f2​,… be cost functions on Rn\mathbb{R}^nRn and let x1,x2,…x_1, x_2, \dotsx1​,x2​,… be a run of Follow the Leader over PPP, i.e. xt∈arg⁡min⁡x∈P∑τ=1t−1fτ(x)x_t \in \arg\min_{x \in P} \sum_{\tau=1}^{t-1} f_\tau(x)xt​∈argminx∈P​∑τ=1t−1​fτ​(x) for every t≥1t \ge 1t≥1. Then for every TTT and every u∈Pu \in Pu∈P,

∑t=1Tft(xt)−∑t=1Tft(u)≤∑t=1Tft(xt)−∑t=1Tft(xt+1).\sum_{t=1}^T f_t(x_t) - \sum_{t=1}^T f_t(u) \le \sum_{t=1}^T f_t(x_t) - \sum_{t=1}^T f_t(x_{t+1}).t=1∑T​ft​(xt​)−t=1∑T​ft​(u)≤t=1∑T​ft​(xt​)−t=1∑T​ft​(xt+1​).

Equivalently, the "Be the Leader" sequence, which plays in round ttt the minimiser xt+1x_{t+1}xt+1​ of the costs up to and including round ttt, has cost at most that of the best fixed point in hindsight. The lemma reduces bounding the regret of FTL to bounding how much consecutive leaders differ.

Formalization Note The paper prints xt=arg⁡min⁡x∈P∑τ=1tfτ(x)x_t = \arg\min_{x \in P} \sum_{\tau=1}^{t} f_\tau(x)xt​=argminx∈P​∑τ=1t​fτ​(x). With that index the lemma is false already for T=1T = 1T=1 (take P=[0,1]P = [0,1]P=[0,1], f1(x)=xf_1(x) = xf1​(x)=x, f2(x)=−2xf_2(x) = -2xf2​(x)=−2x: then x2=1x_2 = 1x2​=1 and f1(x2)=1>0=min⁡f1f_1(x_2) = 1 > 0 = \min f_1f1​(x2​)=1>0=minf1​). The paper's proof ("for T=1T = 1T=1 the two are equal by definition") and every use of the lemma (Theorem 5) need xt=arg⁡min⁡x∈P∑τ=1t−1fτ(x)x_t = \arg\min_{x\in P}\sum_{\tau=1}^{t-1} f_\tau(x)xt​=argminx∈P​∑τ=1t−1​fτ​(x), the Follow the Leader rule, which is what is stated here. The paper's "−min⁡x∈P-\min_{x \in P}−minx∈P​" is encoded as "for every comparator u∈Pu \in Pu∈P".

Preamble
import Mathlib
import Definitions.Def_LogRegretOCO_FTAL_IsFTLRun
Formal statement
namespace LogRegretOCO.FTAL
theorem ftl_be_the_leader {n : ℕ} (P : Set (EuclideanSpace ℝ (Fin n)))
    (f : ℕ → EuclideanSpace ℝ (Fin n) → ℝ) (x : ℕ → EuclideanSpace ℝ (Fin n))
    (hx : IsFTLRun P f x) (T : ℕ) :
    ∀ u ∈ P,
      ∑ t ∈ Finset.Icc 1 T, f t (x t) - ∑ t ∈ Finset.Icc 1 T, f t u
        ≤ ∑ t ∈ Finset.Icc 1 T, f t (x t) - ∑ t ∈ Finset.Icc 1 T, f t (x (t + 1)) := by sorry
end LogRegretOCO.FTAL
Source
Hazan, Agarwal, Kale, Logarithmic regret algorithms for online convex optimization, Mach Learn 69 (2007), p. 190, Lemma 10 (Appendix 1)
Read-back

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

Setting. Let n∈Nn \in \mathbb{N}n∈N, P⊆RnP \subseteq \mathbb{R}^nP⊆Rn, functions ft:Rn→Rf_t : \mathbb{R}^n \to \mathbb{R}ft​:Rn→R for t∈Nt \in \mathbb{N}t∈N, and points xt∈Rnx_t \in \mathbb{R}^nxt​∈Rn.

Hypothesis. xxx is a Follow-the-Leader run for fff on PPP. That is, for every t≥1t \ge 1t≥1:

  • xt∈Px_t \in Pxt​∈P;
  • for every y∈Py \in Py∈P, ∑τ=1t−1fτ(xt)≤∑τ=1t−1fτ(y)\sum_{\tau=1}^{t-1} f_\tau(x_t) \le \sum_{\tau=1}^{t-1} f_\tau(y)∑τ=1t−1​fτ​(xt​)≤∑τ=1t−1​fτ​(y).

Conclusion. For every horizon T∈NT \in \mathbb{N}T∈N and every u∈Pu \in Pu∈P,

∑t=1Tft(xt)−∑t=1Tft(u)  ≤  ∑t=1Tft(xt)−∑t=1Tft(xt+1).\sum_{t=1}^{T} f_t(x_t) - \sum_{t=1}^{T} f_t(u) \;\le\; \sum_{t=1}^{T} f_t(x_t) - \sum_{t=1}^{T} f_t(x_{t+1}).t=1∑T​ft​(xt​)−t=1∑T​ft​(u)≤t=1∑T​ft​(xt​)−t=1∑T​ft​(xt+1​).

This is equivalent to ∑t=1Tft(xt+1)≤∑t=1Tft(u)\sum_{t=1}^T f_t(x_{t+1}) \le \sum_{t=1}^T f_t(u)∑t=1T​ft​(xt+1​)≤∑t=1T​ft​(u). The right-hand side involves xT+1x_{T+1}xT+1​, which the hypothesis also constrains. No convexity, continuity or other regularity is assumed of PPP or of any ftf_tft​.

Degenerate cases.

  • T=0T = 0T=0. All sums are empty, and the conclusion is 0≤00 \le 00≤0.
  • P=∅P = \emptysetP=∅. The hypothesis cannot be satisfied, so the statement is vacuous. It is also vacuous if some cumulative cost has no minimiser on PPP, since no run then exists.
  • Unused indices. x0x_0x0​ and f0f_0f0​ play no role.
  • n=0n = 0n=0. Every point is the same, and both sides of the inequality are equal.
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