Bandits.UCB.prob_ucbIndex_le
No docstring.
Bandits.UCB.prob_ucbIndex_le.{u_1} {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} [Nonempty (Fin K)] {alg : Learning.Algorithm (Fin K) โ} (h : Learning.IsAlgEnvSeq A R alg (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) (a : Fin K) (n : โ) : P {h | 0 < Learning.pullCount A a n h โง Learning.empMean A R a n h + ucbWidth A (c * โฯ2) a n h โค โซ (x : โ), id x โฮฝ a} โค 1 / (โn + 1) ^ (c - 1)Bandits.UCB.prob_ucbIndex_le.{u_1} {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} [Nonempty (Fin K)] {alg : Learning.Algorithm (Fin K) โ} (h : Learning.IsAlgEnvSeq A R alg (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) (a : Fin K) (n : โ) : P {h | 0 < Learning.pullCount A a n h โง Learning.empMean A R a n h + ucbWidth A (c * โฯ2) a n h โค โซ (x : โ), id x โฮฝ a} โค 1 / (โn + 1) ^ (c - 1)
Code
lemma prob_ucbIndex_le [Nonempty (Fin K)] {alg : Algorithm (Fin K) โ}
(h : IsAlgEnvSeq A R alg (stationaryEnv ฮฝ) P)
(hฮฝ : โ a, HasSubgaussianMGF (fun x โฆ x - (ฮฝ a)[id]) ฯ2 (ฮฝ a))
(hฯ2 : ฯ2 โ 0) (hc : 0 โค c) (a : Fin K) (n : โ) :
P {h | 0 < pullCount A a n h โง empMean A R a n h + ucbWidth A (c * ฯ2) a n h โค (ฮฝ a)[id]} โค
1 / (n + 1) ^ (c - 1)Proof
by
let s : Set (โ ร โ) := {(m, x) | 0 < m โง x / m + โ(2 * (c * ฯ2) * log (โn + 1) / m) โค (ฮฝ a)[id]}
have hs : MeasurableSet s := by
simp only [Nat.cast_nonneg, sqrt_div', id_eq, measurableSet_setOfPred, s]
fun_prop
classical
calc P {h | 0 < pullCount A a n h โง empMean A R a n h + ucbWidth A (c * ฯ2) a n h โค (ฮฝ a)[id]}
_ โค โ k โ range (n + 1) with k โ Prod.fst '' s,
(streamMeasure ฮฝ) {ฯ | โ i โ range k, ฯ i a โ Prod.mk k โปยน' s} :=
prob_pullCount_prod_sumRewards_mem_le h hs
_ โค โ k โ Icc 1 n,
(streamMeasure ฮฝ) {ฯ | โ i โ range k, ฯ i a โ Prod.mk k โปยน' s} := by
refine Finset.sum_le_sum_of_subset_of_nonneg (fun m โฆ ?_) fun _ _ _ โฆ by positivity
simp [s]
grind
_ = โ k โ Icc 1 n,
(streamMeasure ฮฝ) {ฯ | (โ i โ range k, ฯ i a) / k + โ(2 * c * ฯ2 * log (โn + 1) / k) โค
(ฮฝ a)[id]} := by
refine Finset.sum_congr rfl fun k hk โฆ ?_
congr with ฯ
have hk : 0 < k := by grind
simp only [Nat.cast_nonneg, sqrt_div', id_eq, Set.preimage_ofPred_eq, hk, true_and,
Set.mem_ofPred_eq, s]
grind
_ โค โ k โ Icc 1 n, (1 : โโฅ0โ) / (n + 1) ^ c := by
gcongr with k hk
exact prob_avg_add_sqrt_log_le hฮฝ hฯ2 hc a n k (by grind)
_ โค (n + 1) * (1 : โโฅ0โ) / (n + 1) ^ c := by
simp only [one_div, sum_const, Nat.card_Icc, add_tsub_cancel_right, nsmul_eq_mul, mul_one]
rw [div_eq_mul_inv ((n : โโฅ0โ) + 1)]
gcongr
exact le_self_add
_ = 1 / (n + 1) ^ (c - 1) := by
simp only [mul_one, one_div]
rw [ENNReal.rpow_sub _ _ (by simp) (by finiteness), ENNReal.rpow_one, div_eq_mul_inv,
ENNReal.div_eq_inv_mul, ENNReal.mul_inv (by simp) (by simp), inv_inv]Actions: 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: 10 project declarations, 116 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.