Lemma 7 — Optimism
ProvedFoundationsRL.Bandits.optimism_lemma(Lemma 7, p. 28.) Fix a round and suppose for every decision (a valid confidence interval at this round), where attains . Let be the optimistic action. Then the instantaneous regret of is bounded by the confidence width at :
This is the key structural fact behind every optimism-based bandit algorithm: as long as the confidence interval at the played action is narrow, the instantaneous regret is small, regardless of which action turns out to be optimal.
Formalization Note. Stated for a single, arbitrary round: fLo/fHi play the
role of / at a fixed but unspecified , and pit is
hypothesized (not derived) to maximize fHi, matching the argmax in the book. No
time index or history is needed at this level of generality.
import Mathlib
namespace FoundationsRL.Bandits
/-- Lemma 7 (Optimism), Foster–Rakhlin p. 28. Fix a round with confidence bounds
`fLo ≤ fStar ≤ fHi` valid for every decision. Then the optimistic action `pit`
(the maximizer of `fHi`) has instantaneous regret at most the confidence width
at `pit`: `fStar piStar - fStar pit ≤ fHi pit - fLo pit`. -/
theorem optimism_lemma {A : ℕ} (fStar : Fin A → ℝ) (piStar : Fin A)
(hStar : ∀ a : Fin A, fStar a ≤ fStar piStar)
(fLo fHi : Fin A → ℝ) (hCI : ∀ a : Fin A, fStar a ∈ Set.Icc (fLo a) (fHi a))
(pit : Fin A) (hOpt : ∀ a : Fin A, fHi a ≤ fHi pit) :
fStar piStar - fStar pit ≤ fHi pit - fLo pit := by sorry
end FoundationsRL.Bandits
Read-back
What the Lean code literally says, in plain math · claude-fable-5-1
Let be a natural number (possibly ), and let the set of actions be , written ; when this set is empty. The statement involves the following data:
- a function ;
- an element (whose existence, as an argument, forces ; for the theorem has no instances at all);
- the hypothesis that maximizes : for every , ;
- two functions ;
- the hypothesis that for every , lies in the closed interval , i.e. and (both inequalities non-strict; in particular this forces for every , so the hypothesis is unsatisfiable if any interval is empty);
- an element ;
- the hypothesis that maximizes : for every , .
Under these hypotheses, the conclusion is the single real inequality
Nothing is asserted about uniqueness of or (either may be any maximizer, and may coincide with ), nothing is asserted about actions other than through the pointwise hypotheses above, and no probabilistic, sequential, or multi-round structure appears: the statement concerns a single fixed triple of functions on a finite index set and two chosen indices. All quantities are real numbers, so subtraction is ordinary real subtraction with no truncation.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.