Lean gate passed before this site build; local proof declarations are shown as compiled.Lean-verified build · exact declarations linked.
Teaching chapter 02 of 31 · Canonical route compiled
Why Follow-the-Leader can incur linear regret
An actual strict-past FTL family on [-1,1] has exact comparator-zero regret T-1-x1/2 on the alternating loss sequence.
How to read the status. It describes this page's canonical local Lean route, not completion of the cited textbook chapter or every extension listed below.
Orientation
Who should read this. Readers of Orabona Chapter 2 convex-analysis foundations.
Learning goals
Compute the decision using strictly previous losses.
Verify feasibility and the historical minimization rule.
Derive the exact alternating-stream regret including the initial loss.
Textbook crosswalk
Read the mathematics before the Lean interface
This reading follows Online Learning: A Modern Introduction Using Convex Optimization. Teaching routes group mathematical dependencies across the shared library. Visible page labels use the cited source's numbered pages; source buttons use the PDF viewer's physical page index, including front matter. Companion papers cover algorithm-specific results.
Primary spine · arXiv:1912.13213v10, 21 June 2026
Online Learning: A Modern Introduction Using Convex Optimization
Read top to bottom to follow the argument or procedure.
01
Accumulate past coefficients
Let S_0=0. Before round t, S_t contains precisely the earlier coefficients. Reveal the current loss after the action and update S_(t+1)=S_t+z_t.
02
Choose the historical minimizer
At Lean time0 output feasible x0. At positive times choose1 if S_t<0 and -1 otherwise; zero-prefix ties choose -1. The source witness has S_t=+/-1/2 at every positive time.
03
Evaluate the alternating stream
The initial coefficient is -1/2. Later coefficients alternate +1,-1 and each later played loss equals 1.
Causal FTL and exact source counterexampleOne explicit FTL selection family with every feasible initialization, on the specified deterministic loss sequence. The generic positive-time zero-prefix tie chooses -1; this failure stream never has such a tie. The Lean target names this family rather than quantifying over arbitrary argmin trajectories. This is not an all-algorithm lower bound or Chapter 2/book completion.
An actual FTL strategy can have linear regret on convex linear losses.
Model
Linear losses z_t x on V=[-1,1].
Assumptions
Fixed x1 in [-1,1], T>=1. Source z1=-1/2, z_t=+1 on even t and -1 on odd t>1. Lean time0 corresponds to source round1; positive-time generic zero-prefix ties choose -1.
Algorithm parameters
All positive integer horizons and feasible initial choices.
Regret notion
Deterministic actual played-loss regret against the fixed feasible comparator0; no expectation or optimal-hindsight-comparator equality.
Guarantee
T-1-x1/2, hence at least T-3/2.
Source mathematical statement.Formula renderer unavailable; readable fallback: Every later round incurs loss1; the initial loss is minus half the initial decision.\(R_T(0)=T-1-\frac{x_1}{2}\ge T-\frac32\)Swipe to read the full formula →
BanditRLlib relationship. The source lets the first action be arbitrary and asserts the later alternating endpoints. Lean realizes the rule with an explicit family indexed by the same arbitrary feasible initial action. The strict signs in this loss sequence force those endpoints. Generic ties are handled by choosing -1. Membership plus the objective inequality certify the concrete feasible FTL selection, including the empty past. The regret formula is then proved from actual played losses. Six helper theorems and three definitions refine this one example.
The mathematical content is restated in this site's notation; wording is ours. See printedp12 in the linked source for the original statement and full assumptions.
Natural-language and Lean side by side
The mathematical readings are explanatory summaries. The exact generated Lean statement and its source link remain authoritative for hypotheses, types, constants, and indexing.
Plain-English statement. FTL uses only the strict past
Mathematical reading.Formula renderer unavailable; readable fallback: FTL uses only the strict past\((\forall i<t,\ z_i=w_i)\Longrightarrow x_t(z,x_0)=x_t(w,x_0)\)Swipe to read the full formula →
Intuition
Equal past coefficient streams give the same prediction.
Why it is needed
Connects the actual causal FTL algorithm to the source counterexample.
Place in the proof
Orabona v10, Example 2.10, printed page 12 / PDF page 24.
Proof and Lean reading notes
Proof idea
Equal past coefficient streams give the same prediction.
Lean reading notes
Generic coefficient streams and any fixed real initial x0; strict-prefix equality excludes the current coefficient. This causality theorem alone does not assert feasibility or restrict an external initialization procedure.
Teaching dependencies
BanditRL.OnlineLearning.prefixCoefficient_eq_sum
Exact Lean statement
theorem linearFTLPredict_prefix (z w : ℕ → ℝ) (x0 : ℝ) (t : ℕ) (h : ∀ i < t, z i = w i) : linearFTLPredict z x0 t = linearFTLPredict w x0 t
Plain-English statement. The selected action has no larger historical objective than any feasible comparator.
Mathematical reading.Formula renderer unavailable; readable fallback: The selected action has no larger historical objective than any feasible comparator.\(\sum_{i<t}z_i x_t\le\sum_{i<t}z_i u,\qquad u\in[-1,1]\)Swipe to read the full formula →
Intuition
The sign of the accumulated coefficient selects the correct interval endpoint.
Why it is needed
Connects the actual causal FTL algorithm to the source counterexample.
Place in the proof
Orabona v10, Example 2.10, printed page 12 / PDF page 24.
Proof and Lean reading notes
Proof idea
The sign of the accumulated coefficient selects the correct interval endpoint.
Lean reading notes
The inequality permits any real x0: at time0 both sums vanish. Combine linearFTLPredict_mem with feasible x0 in[-1,1] to obtain an actual feasible argmin. Later zero-prefix ties use -1; the source failure witness has none.
Teaching dependencies
BanditRL.OnlineLearning.prefixCoefficient_eq_sum
Exact Lean statement
theorem linearFTLPredict_minimizes (z : ℕ → ℝ) (x0 : ℝ) (t : ℕ) (u : ℝ) (hu : u ∈ Icc (-1 : ℝ) 1) : (∑ i ∈ range t, z i * linearFTLPredict z x0 t) ≤ ∑ i ∈ range t, z i * u
Mathematical reading.Formula renderer unavailable; readable fallback: Exact linear-regret counterexample\(R_T(0)=T-1-x_0/2\ge T-3/2\)Swipe to read the full formula →
Intuition
The alternating prefix forces each later prediction to incur loss1; keep the initial loss exactly.
Why it is needed
Connects the actual causal FTL algorithm to the source counterexample.
Place in the proof
Orabona v10, Example 2.10, printed page 12 / PDF page 24.
Proof and Lean reading notes
Proof idea
The alternating prefix forces each later prediction to incur loss1; keep the initial loss exactly.
Lean reading notes
Every feasible x0 and T>=1; comparator0 is fixed and feasible. Equality and lower bound use actual played losses, with initial loss -x0/2. Lean0 is source1. No T0 formula or lower bound against all algorithms. One explicit FTL selection family with every feasible initialization, on the specified deterministic loss sequence. The generic positive-time zero-prefix tie chooses -1; this failure stream never has such a tie. The Lean target names this family rather than quantifying over arbitrary argmin trajectories. This is not an all-algorithm lower bound or Chapter 2/book completion.
Teaching dependencies
BanditRL.OnlineLearning.failure_prediction
Exact Lean statement
theorem example_2_10 (x0 : ℝ) (hx0 : x0 ∈ Icc (-1 : ℝ) 1) (T : ℕ) (hT : 0 < T) : (∑ t ∈ range T, failureCoefficient t * linearFTLPredict failureCoefficient x0 t) - (∑ t ∈ range T, failureCoefficient t * (0 : ℝ)) = (T : ℝ) - 1 - x0 / 2 ∧ (T : ℝ) - 3/2 ≤ (∑ t ∈ range T, failureCoefficient t * linearFTLPredict failureCoefficient x0 t) - (∑ t ∈ range T, failureCoefficient t * (0 : ℝ))
Open the canonical completion definition and blockers
One source example, three literal definitions, six structural helper theorems and the exact regret theorem, with the two complete original canaries. One explicit FTL selection family with every feasible initialization, on the specified deterministic loss sequence. The generic positive-time zero-prefix tie chooses -1; this failure stream never has such a tie. The Lean target names this family rather than quantifying over arbitrary argmin trajectories. This is not an all-algorithm lower bound or Chapter 2/book completion.
Remaining blockers
Other Chapter 2 statements and full-book acceptance are separate.
Chapter implementation status
The compact summary keeps the reading route visible. Open it for source-linked declarations and exact remaining gaps.