Bandits.UCB.regret_le
Regret bound for the UCB algorithm.
Bandits.UCB.regret_le.{u_1} {K : โ} {hK : 0 < K} {c : โ} {ฮฝ : ProbabilityTheory.Kernel (Fin K) โ} [ProbabilityTheory.IsMarkovKernel ฮฝ] {ฮฉ : Type u_1} {mฮฉ : MeasurableSpace ฮฉ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {A : โ โ ฮฉ โ Fin K} {R : โ โ ฮฉ โ โ} {ฯ2 : NNReal} (h : Learning.IsAlgEnvSeq A R (ucbAlgorithm hK (c * โฯ2)) (Learning.stationaryEnv ฮฝ) P) (hฮฝ : โ (a : Fin K), ProbabilityTheory.HasSubgaussianMGF (fun x => x - โซ (x : โ), id x โฮฝ a) ฯ2 (ฮฝ a)) (hฯ2 : ฯ2 โ 0) (hc : 0 < c) (n : โ) : โซ (x : ฮฉ), regret ฮฝ A n x โP โค โ a, (8 * c * โฯ2 * Real.log (โn + 1) / gap ฮฝ a + gap ฮฝ a * (2 + 2 * ENNReal.toReal (constSum c n)))Bandits.UCB.regret_le.{u_1} {K : โ} {hK : 0 < K} {c : โ} {ฮฝ : ProbabilityTheory.Kernel (Fin K) โ} [ProbabilityTheory.IsMarkovKernel ฮฝ] {ฮฉ : Type u_1} {mฮฉ : MeasurableSpace ฮฉ} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {A : โ โ ฮฉ โ Fin K} {R : โ โ ฮฉ โ โ} {ฯ2 : NNReal} (h : Learning.IsAlgEnvSeq A R (ucbAlgorithm hK (c * โฯ2)) (Learning.stationaryEnv ฮฝ) P) (hฮฝ : โ (a : Fin K), ProbabilityTheory.HasSubgaussianMGF (fun x => x - โซ (x : โ), id x โฮฝ a) ฯ2 (ฮฝ a)) (hฯ2 : ฯ2 โ 0) (hc : 0 < c) (n : โ) : โซ (x : ฮฉ), regret ฮฝ A n x โP โค โ a, (8 * c * โฯ2 * Real.log (โn + 1) / gap ฮฝ a + gap ฮฝ a * (2 + 2 * ENNReal.toReal (constSum c n)))
Code
theorem regret_le (h : IsAlgEnvSeq A R (ucbAlgorithm hK (c * ฯ2)) (stationaryEnv ฮฝ) P)
(hฮฝ : โ a, HasSubgaussianMGF (fun x โฆ x - (ฮฝ a)[id]) ฯ2 (ฮฝ a))
(hฯ2 : ฯ2 โ 0) (hc : 0 < c) (n : โ) :
P[regret ฮฝ A n] โค
โ a, (8 * c * ฯ2 * log (n + 1) / gap ฮฝ a + gap ฮฝ a * (2 + 2 * (constSum c n).toReal))Proof
by
refine (integral_regret_le_of_forall_integral_pullCount_le h
(fun a h_gap โฆ expectation_pullCount_le h hฮฝ hฯ2 hc a
(lt_of_le_of_ne' gap_nonneg h_gap) n)).trans_eq ?_
congr with a
by_cases h_gap : gap ฮฝ a = 0
ยท simp [h_gap]
ยท fieldActions: Source ยท Open Issue
Meaning last changed in v4.34.0-rc2-14-gf86702d (2026-08-25), the 5th recorded change.
Self-contained, with its dependencies inlined and proofs replaced by sorry: download the raw file ยท open it in the Lean web editor.
Dependency graph
Audit surface: 20 project declarations, 144 external constants
โ Proved: no sorry anywhere in its closure
This is the tool's own reading of one build's recorded axioms, and it is not robust against an author who wants it to pass. Checking meant to be relied on should go through Comparator, which replays the proof through the kernel from an export against an explicit list of permitted axioms.