Theorem 5 (corrected constant) — Follow the Leader on costs has logarithmic regret
ProvedLogRegretOCO.FTAL.ftl_regret_boundLet be nonempty, convex, closed and bounded, with for all . For each round let the cost be , where and is convex. Assume there are such that for all :
- ;
- for every , is twice differentiable at (precisely: and are differentiable there), with and .
Let be a run of Follow the Leader on over . Then for every and every ,
The theorem shows that plain Follow the Leader already achieves regret when each cost is a strongly curved convex function of a single linear form, a class that contains the quadratic surrogates of Follow the Approximate Leader and the losses of portfolio selection.
Formalization Note The paper prints the bound . That is false when , where it is negative (for , , , , , , the regret is ). The paper's proof (Claims 1 and 2 with ) gives the displayed bound, which implies the printed one when ; the displayed form is stated because Theorem 6 applies Theorem 5 with . The paper writes "", a typo for . Derivatives are Mathlib's deriv, with explicit differentiability hypotheses at the points , (where deriv would otherwise return the junk value ). Rounds are -based; regret is stated against every comparator rather than with a real-valued .
import Mathlib import Definitions.Def_LogRegretOCO_FTAL_IsFTLRun
namespace LogRegretOCO.FTAL
theorem ftl_regret_bound {n : ℕ} (P : Set (EuclideanSpace ℝ (Fin n))) (D R a b : ℝ)
(g : ℕ → ℝ → ℝ) (v : ℕ → EuclideanSpace ℝ (Fin n)) (x : ℕ → EuclideanSpace ℝ (Fin n))
(hPne : P.Nonempty) (hPconv : Convex ℝ P) (hPclosed : IsClosed P)
(hPbdd : Bornology.IsBounded P)
(hdiam : ∀ y ∈ P, ∀ z ∈ P, ‖y - z‖ ≤ D)
(hR : 0 < R) (ha : 0 < a) (hb : 0 < b)
(hv : ∀ t, 1 ≤ t → ‖v t‖ ≤ R)
(hgconv : ∀ t, 1 ≤ t → ConvexOn ℝ Set.univ (g t))
(hgdiff : ∀ t, 1 ≤ t → ∀ y ∈ P, DifferentiableAt ℝ (g t) (inner ℝ (v t) y))
(hgdiff2 : ∀ t, 1 ≤ t → ∀ y ∈ P, DifferentiableAt ℝ (deriv (g t)) (inner ℝ (v t) y))
(hg1 : ∀ t, 1 ≤ t → ∀ y ∈ P, |deriv (g t) (inner ℝ (v t) y)| ≤ b)
(hg2 : ∀ t, 1 ≤ t → ∀ y ∈ P, a ≤ deriv (deriv (g t)) (inner ℝ (v t) y))
(hx : IsFTLRun P (fun t y => g t (inner ℝ (v t) y)) x) :
∀ T : ℕ, 1 ≤ T → ∀ u ∈ P,
∑ t ∈ Finset.Icc 1 T, (g t (inner ℝ (v t) (x t)) - g t (inner ℝ (v t) u))
≤ n * b ^ 2 / a * Real.log (a ^ 2 * D ^ 2 * R ^ 2 * T ^ 2 / b ^ 2 + 1)
+ b ^ 2 / a := by sorry
end LogRegretOCO.FTAL
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Let and let carry its Euclidean norm and inner product. The theorem concerns:
- a set ;
- real numbers ;
- scalar functions , for ;
- vectors ;
- points .
The round- cost of a point is . Below, and denote the derivative function of and the derivative of that function. By convention, a derivative takes the value at points where the function is not differentiable.
Hypotheses on the set.
- is nonempty, convex, closed and bounded.
- for all . No sign is imposed on , although nonemptiness forces .
Hypotheses on the constants and vectors.
- , and .
- for every .
Hypotheses on the costs. For every and every , writing :
- is convex on all of .
- is differentiable at .
- is differentiable at .
- .
- .
Hypotheses 6–9 are imposed only at the points with , not on all of .
Hypothesis on the run.
- is a Follow-the-Leader run for these costs. That is, for every , , and for every ,
Conclusion. For every integer and every ,
where is the natural logarithm. Because , there is no division by zero, and the logarithm's argument is at least .
Degenerate cases.
- . Excluded by the conclusion's quantifier.
- Round . , and are unconstrained and do not appear.
- is a single point. Then is allowed, every equals , the left side is , and the right side is .
- . Every inner product is and is the single point, so the left side is and the right side is .
- . The hypotheses on reduce to conditions at the single point , which can be satisfied (for example by ). So the hypotheses are not vacuous in general.
- Derivative convention. Because hypotheses 6 and 7 hold at the relevant points, the values and in hypotheses 8 and 9 are not the default at those points.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.