Lemma 8 — Confidence width potential lemma
ProvedFoundationsRL.Bandits.confidence_width_potential_bound(Lemma 8, p. 28–29.) For any realized sequence of decisions over actions, the sum of reciprocal-square-root pull counts of the played actions is controlled by a quantitative pigeonhole argument:
where is the number of times the round- decision was played before round , and the term is read as when . Combined with Lemma 7 and the UCB confidence radius (Eq. (2.19)), this bounds UCB's cumulative regret (Proposition 5): every round with a wide confidence interval must be a round where some action's pull count just increased, and this can happen only times before the interval narrows.
Formalization Note. The existential names the implicit
constant of the book's ; the proof (Foster–Rakhlin p. 29) establishes
as an absolute constant not depending on , , or the specific decision
sequence pi.
import Mathlib import Definitions.Def_FoundationsRL_Bandits_pullCount
namespace FoundationsRL.Bandits
/-- Lemma 8 (Confidence width potential lemma), Foster–Rakhlin p. 28–29:
for any realized decision sequence over `A` actions and horizon `T`,
`Σ_{t=1}^T (1/√(n_t(π_t)) ∧ 1) ≲ √(AT)`, where `n_t(π_t) = 0` contributes
the capped value `1` (the `∧ 1` convention). The constant `C` is universal:
fixed once, before the action count `A`, horizon `T`, and decision sequence
`pi` are quantified, matching the book's `≲`. -/
theorem confidence_width_potential_bound :
∃ C : ℝ, 0 < C ∧
∀ (A : ℕ), 0 < A → ∀ (T : ℕ) (pi : ℕ → Fin A),
∑ t ∈ Finset.range T,
(if pullCount pi t (pi t) = 0 then (1 : ℝ)
else 1 / Real.sqrt (pullCount pi t (pi t)))
≤ C * Real.sqrt ((A : ℝ) * T) := by sorry
end FoundationsRL.Bandits
Read-back
What the Lean code literally says, in plain math · claude-fable-5-1
The declaration asserts the existence of a single real constant , chosen before anything else is quantified, such that the following holds for every positive number of actions (with ), every horizon (including ), and every function assigning an action to each natural-number index:
where the summand is defined in terms of the bundle's custom quantity (imported from Def_FoundationsRL_Bandits_pullCount; its definition is not shown here, and the read-back can only refer to it by name — it is a natural number depending on the action sequence , the index , and an action , presumably intended as a count of how many times appears among earlier indices, but nothing in this declaration fixes that meaning). Writing , i.e. the pull count evaluated at the action chosen at index :
with cast from to before taking the square root.
Points to note about what is literally asserted:
- The sum runs over the indices (the range of size starting at ), not . Whether this matches a "time " convention depends entirely on how treats its index argument.
- When the left side is the empty sum and the right side is , so the inequality holds trivially.
- The summand is not in general: when the value is already at most , and when the case split assigns directly, so the two coincide numerically for natural-number ; but the code expresses this by a case split on , not by a minimum.
- The constant is universal: one value must work uniformly for all , , and simultaneously. The statement is existential in and gives no explicit value.
- The function is an arbitrary total function on all of ; only its values at indices below enter the sum directly, though may in principle depend on values at other indices.
- The inequality is non-strict (). No randomness, no bandit environment, no reward structure, and no policy semantics appear anywhere in the statement; it is a purely combinatorial/analytic claim about deterministic sequences and the quantity .
- The declaration is stated with its proof omitted (
sorry), so nothing here certifies that the claim is true.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.