LeanMachineLearning

Bandits.UCB.prob_lcbIndex_ge🔗

Lemma

From the authors

The probability that the lower confidence bound of arm a is above its mean is at most 1 / (n + 1) ^ (c - 1).

Types
  • Ω : Type u_1mΩ : MeasurableSpace ΩA measurable space is a space equipped with a σ-algebra.
Given
  • K : NeZero K
  • c :
  • ν : ProbabilityTheory.Kernel (Fin K) A kernel from a measurable space α to another measurable space β is a measurable function κ : α → Measure β.ProbabilityTheory.IsMarkovKernel νA kernel is a Markov kernel if every measure in its image is a probability measure.
  • P : MeasureTheory.Measure ΩA measure is defined to be an outer measure that is countably additive on measurable sets, with the additional assumption that the outer measure is the canonical extension of the restricted measure.MeasureTheory.IsProbabilityMeasure PA measure μ is called a probability measure if μ univ = 1.
  • O : → Ω → Unit
  • A : → Ω → Fin K
  • R : → Ω →
  • σ2 : NNReal
  • alg : Learning.Algorithm Unit (Fin K) A stochastic, sequential algorithm.
  • a : Fin K
  • n :
Assuming
Then
P
    {ω |
      0 < Learning.pullCount A a n ω (x : ), id xν aLearning.empMean A R a n ω - ucbWidth A (c * ↑σ2) a n ω}1 / (↑n + 1) ^ (c - 1)
Code
lemma prob_lcbIndex_ge {alg : Algorithm Unit (Fin K) ℝ}
    (h : IsAlgEnvSeq O 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 {ω | 0 < pullCount A a n ω ∧
      (ν a)[id] ≤ empMean A R a n ω - ucbWidth A (c * σ2) a n ω} ≤ 1 / (n + 1) ^ (c - 1)
Proof
by
  have h_le := prob_pullCount_pos_and_le h a n
    (p := fun k x ↦ (ν a)[id] ≤ x / k - √(2 * c * σ2 * log (n + 1) / k))
    (B := 1 / (n + 1) ^ c) ?_ ?_
  rotate_left
  · simp only [Nat.cast_nonneg, sqrt_div', id_eq]
    fun_prop
  · exact fun k hk ↦ prob_avg_sub_sqrt_log_ge hν hσ2 hc a n k hk
  simp only [mul_assoc] at h_le
  simp only [empMean, ucbWidth, mul_assoc]
  calc _ ≤ (n : ℝ≥0∞) * (1 / (n + 1) ^ c) := h_le
  _ ≤ (n + 1) * (1 : ℝ≥0∞) / (n + 1) ^ c := by
    rw [mul_one_div, mul_one]
    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]

New in v4.34.0-rc2-90-gdde3322 (2026-09-16), and its meaning has not changed since.

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: 12 project declarations, 111 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.