Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

BanditAlgorithm.ftrl_simplex_exp_weights_regret

Proved

by Shuze Chen · Jul 29, 2026 · Mathlib c5ea003 (Lean v4.30.0)

exponential-weightsonline-learningregret

(Regret on the simplex, Proposition 28.7) Let A=Pd−1\mathcal{A} = \mathcal{P}_{d-1}A=Pd−1​ be the probability simplex and yt∈[0,1]dy_t \in [0,1]^dyt​∈[0,1]d for all ttt. FTRL (= mirror descent = exponential weights here, Example 28.3/Eq. (28.5); the book states the proposition for mirror descent and notes the identical FTRL bound via Theorem 28.5) with the unnormalised negentropy potential

F(a)=∑i(ailog⁡ai−ai)F(a) = \sum_i (a_i \log a_i - a_i)F(a)=i∑​(ai​logai​−ai​)

on domain [0,∞)d[0,\infty)^d[0,∞)d and learning rate η=2log⁡(d)/n\eta = \sqrt{2\log(d)/n}η=2log(d)/n​ satisfies

Rn(a0)≤2nlog⁡dR_n(a_0) \le \sqrt{2 n \log d}Rn​(a0​)≤2nlogd​

for every simplex comparator a0a_0a0​.

Preamble
import Definitions.Def_OnlineLinearOptimization


open RealInnerProductSpace
Formal statement
theorem BanditAlgorithm.ftrl_simplex_exp_weights_regret
    (d n : ℕ) (y a : ℕ → EuclideanSpace ℝ (Fin d))
    (hy : ∀ t, ∀ i, y t i ∈ Set.Icc (0 : ℝ) 1)
    (hiter : IsFTRLIterates (Real.sqrt (2 * Real.log d / n))
      (fun v : EuclideanSpace ℝ (Fin d) => ∑ i, (v i * Real.log (v i) - v i))
      {v : EuclideanSpace ℝ (Fin d) | ∀ i, 0 ≤ v i}
      {v : EuclideanSpace ℝ (Fin d) | (∀ i, 0 ≤ v i) ∧ ∑ i, v i = 1}
      y a) :
    ∀ a₀ ∈ {v : EuclideanSpace ℝ (Fin d) | (∀ i, 0 ≤ v i) ∧ ∑ i, v i = 1},
      oloRegret a y n a₀ ≤ Real.sqrt (2 * n * Real.log d) := by
  sorry
Source
L&S Proposition 28.7, p.335
Read-back

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

Work in Rd\mathbb R^dRd with the Euclidean inner product ⟨⋅,⋅⟩\langle\cdot,\cdot\rangle⟨⋅,⋅⟩. Let Δ={v∈Rd: vi≥0 ∀i, ∑ivi=1}\Delta=\{v\in\mathbb R^d:\ v_i\ge0\ \forall i,\ \sum_i v_i=1\}Δ={v∈Rd: vi​≥0 ∀i, ∑i​vi​=1} be the probability simplex, D={v: vi≥0 ∀i}D=\{v:\ v_i\ge0\ \forall i\}D={v: vi​≥0 ∀i} the nonnegative orthant, and F(v)=∑i(viln⁡vi−vi)F(v)=\sum_{i}\big(v_i\ln v_i-v_i\big)F(v)=∑i​(vi​lnvi​−vi​) the unnormalized negative entropy (ln⁡\lnln = natural logarithm). Set the learning rate η=2ln⁡d/n\eta=\sqrt{2\ln d/n}η=2lnd/n​. For iterates (at)(a_t)(at​), losses (yt)(y_t)(yt​) and comparator uuu, the regret is Regn(u)=∑t=0n−1⟨at−u, yt⟩\mathrm{Reg}_n(u)=\sum_{t=0}^{n-1}\langle a_t-u,\,y_t\rangleRegn​(u)=∑t=0n−1​⟨at​−u,yt​⟩.

The theorem asserts: for every u∈Δu\in\Deltau∈Δ,

Regn(u) ≤ 2 n ln⁡d .\mathrm{Reg}_n(u)\ \le\ \sqrt{2\,n\,\ln d}\,.Regn​(u) ≤ 2nlnd​.

Hypotheses:

  • d,nd,nd,n are arbitrary natural numbers (no positivity assumed on either).
  • Every loss coordinate lies in [0,1][0,1][0,1]: yt(i)∈[0,1]y_t(i)\in[0,1]yt​(i)∈[0,1] for every t∈Nt\in\mathbb Nt∈N and every iii (all rounds, not only t<nt<nt<n).
  • (at)(a_t)(at​) are FTRL iterates at rate η\etaη with regularizer FFF, domain DDD, and constraint set Δ\DeltaΔ: a0∈Δ∩D=Δa_0\in\Delta\cap D=\Deltaa0​∈Δ∩D=Δ and F(a0)≤F(b)F(a_0)\le F(b)F(a0​)≤F(b) for all b∈Δb\in\Deltab∈Δ; for every ttt, at+1∈Δa_{t+1}\in\Deltaat+1​∈Δ and at+1a_{t+1}at+1​ minimizes b↦η∑s=0t⟨b,ys⟩+F(b)b\mapsto\eta\sum_{s=0}^{t}\langle b,y_s\rangle+F(b)b↦η∑s=0t​⟨b,ys​⟩+F(b) over Δ\DeltaΔ (value ≤\le≤ value at every point; no uniqueness; the existence of such iterates is assumed, not proved).

Edge cases and conventions:

  • If d=0d=0d=0 the simplex is empty (the empty sum is 0≠10\ne10=1), so the iterate hypothesis is unsatisfiable and the statement is vacuous; the conclusion also quantifies over an empty set.
  • If d=1d=1d=1 then ln⁡d=0\ln d=0lnd=0, so η=0\eta=0η=0 and the asserted bound is 000; the FTRL predicate places no sign restriction on η\etaη, so η=0\eta=0η=0 is admissible in it.
  • If n=0n=0n=0 the expression 2ln⁡d/n2\ln d/n2lnd/n uses the real-division-by-zero convention and equals 000, so η=0\eta=0η=0; the regret is the empty sum 000 and the bound is 000.
  • In FFF, terms viln⁡viv_i\ln v_ivi​lnvi​ at vi=0v_i=0vi​=0 evaluate to 000 via the convention ln⁡0=0\ln 0=0ln0=0; FFF is a total function on Rd\mathbb R^dRd.
  • The bound is deterministic and holds for the specific η=2ln⁡d/n\eta=\sqrt{2\ln d/n}η=2lnd/n​ fixed in the iterate hypothesis; nothing is claimed for other learning rates.
Human review
  • Endorsed by Community (Bot) · Jul 29, 2026

  • Endorsed by Shuze Chen · Jul 29, 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