LeanMachineLearning

Bandits.prob_sumRewards_sub_pullCount_mul_le_leπŸ”—

Lemma

No docstring.

πŸ”—theorem
Bandits.prob_sumRewards_sub_pullCount_mul_le_le.{u_1, u_2} {𝓐 : Type u_1} {Ξ© : Type u_2} [DecidableEq 𝓐] {m𝓐 : MeasurableSpace 𝓐} {mΞ© : MeasurableSpace Ξ©} {P : MeasureTheory.Measure Ξ©} [MeasureTheory.IsProbabilityMeasure P] {alg : Learning.Algorithm 𝓐 ℝ} {Ξ½ : ProbabilityTheory.Kernel 𝓐 ℝ} [ProbabilityTheory.IsMarkovKernel Ξ½] {A : β„• β†’ Ξ© β†’ 𝓐} {R : β„• β†’ Ξ© β†’ ℝ} {n : β„•} {a : 𝓐} [Nonempty 𝓐] [Countable 𝓐] [MeasurableSingletonClass 𝓐] {Οƒ2 : NNReal} (hΟƒ2 : 0 < Οƒ2) (ha : ProbabilityTheory.HasSubgaussianMGF (fun x => x - ∫ (x : ℝ), id x βˆ‚Ξ½ a) Οƒ2 (Ξ½ a)) (h : Learning.IsAlgEnvSeq A R alg (Learning.stationaryEnv Ξ½) P) {Ξ΄ : ℝ} (hΞ΄ : 0 < Ξ΄) : P {Ο‰ | βˆƒ t < n, Learning.pullCount A a t Ο‰ β‰  0 ∧ Learning.sumRewards A R a t Ο‰ - ↑(Learning.pullCount A a t Ο‰) * ∫ (x : ℝ), id x βˆ‚Ξ½ a ≀ -√(2 * ↑(Learning.pullCount A a t Ο‰) * ↑σ2 * Real.log (1 / Ξ΄))} ≀ ENNReal.ofReal ((↑n - 1) * Ξ΄)
Bandits.prob_sumRewards_sub_pullCount_mul_le_le.{u_1, u_2} {𝓐 : Type u_1} {Ξ© : Type u_2} [DecidableEq 𝓐] {m𝓐 : MeasurableSpace 𝓐} {mΞ© : MeasurableSpace Ξ©} {P : MeasureTheory.Measure Ξ©} [MeasureTheory.IsProbabilityMeasure P] {alg : Learning.Algorithm 𝓐 ℝ} {Ξ½ : ProbabilityTheory.Kernel 𝓐 ℝ} [ProbabilityTheory.IsMarkovKernel Ξ½] {A : β„• β†’ Ξ© β†’ 𝓐} {R : β„• β†’ Ξ© β†’ ℝ} {n : β„•} {a : 𝓐} [Nonempty 𝓐] [Countable 𝓐] [MeasurableSingletonClass 𝓐] {Οƒ2 : NNReal} (hΟƒ2 : 0 < Οƒ2) (ha : ProbabilityTheory.HasSubgaussianMGF (fun x => x - ∫ (x : ℝ), id x βˆ‚Ξ½ a) Οƒ2 (Ξ½ a)) (h : Learning.IsAlgEnvSeq A R alg (Learning.stationaryEnv Ξ½) P) {Ξ΄ : ℝ} (hΞ΄ : 0 < Ξ΄) : P {Ο‰ | βˆƒ t < n, Learning.pullCount A a t Ο‰ β‰  0 ∧ Learning.sumRewards A R a t Ο‰ - ↑(Learning.pullCount A a t Ο‰) * ∫ (x : ℝ), id x βˆ‚Ξ½ a ≀ -√(2 * ↑(Learning.pullCount A a t Ο‰) * ↑σ2 * Real.log (1 / Ξ΄))} ≀ ENNReal.ofReal ((↑n - 1) * Ξ΄)

Code

lemma prob_sumRewards_sub_pullCount_mul_le_le [Countable 𝓐] [MeasurableSingletonClass 𝓐]
    {Οƒ2 : ℝβ‰₯0} (hΟƒ2 : 0 < Οƒ2) (ha : HasSubgaussianMGF (fun x ↦ x - (Ξ½ a)[id]) Οƒ2 (Ξ½ a))
    (h : IsAlgEnvSeq A R alg (stationaryEnv Ξ½) P) {Ξ΄ : ℝ} (hΞ΄ : 0 < Ξ΄) :
    P {Ο‰ | βˆƒ t < n, pullCount A a t Ο‰ β‰  0 ∧
      sumRewards A R a t Ο‰ - pullCount A a t Ο‰ * (Ξ½ a)[id] ≀
        -√(2 * pullCount A a t Ο‰ * Οƒ2 * Real.log (1 / Ξ΄))} ≀ ENNReal.ofReal ((n - 1) * Ξ΄)
Proof
let B (m : β„•) := {x : ℝ | x - m * (Ξ½ a)[id] ≀ -√(2 * m * Οƒ2 * Real.log (1 / Ξ΄))}
  calc
    _ ≀ P (⋃ m ∈ Icc 1 (n - 1), {Ο‰ | βˆƒ t, t < n ∧ pullCount A a t Ο‰ = m ∧
            sumRewards A R a t Ο‰ ∈ B m}) := by
        apply measure_mono
        intro Ο‰ ⟨t, ht, hp, hb⟩
        have hm : pullCount A a t Ο‰ ∈ Icc 1 (n - 1) := mem_Icc.mpr ⟨Nat.one_le_iff_ne_zero.mpr hp,
          (pullCount_le a t Ο‰).trans (Nat.le_sub_one_of_lt ht)⟩
        exact Set.mem_biUnion hm ⟨t, ht, rfl, hb⟩
    _ ≀ βˆ‘ m ∈ Icc 1 (n - 1), P {Ο‰ | βˆƒ t, t < n ∧ pullCount A a t Ο‰ = m ∧
          sumRewards A R a t Ο‰ ∈ B m} :=
        measure_biUnion_finset_le _ _
    _ ≀ βˆ‘ m ∈ Icc 1 (n - 1), P {Ο‰ | βˆƒ t, pullCount A a t Ο‰ = m ∧ sumRewards A R a t Ο‰ ∈ B m} :=
        sum_le_sum (fun _ _ ↦ measure_mono (fun _ ⟨t, _, hps⟩ ↦ ⟨t, hps⟩))
    _ ≀ βˆ‘ m ∈ Icc 1 (n - 1), streamMeasure Ξ½ {Ο‰ | βˆ‘ i ∈ range m, Ο‰ i a ∈ B m} := by
        apply sum_le_sum
        exact (fun m _ ↦ prob_exists_pullCount_eq_and_sumRewards_mem_le h a m (by measurability))
    _ ≀ βˆ‘ m ∈ Icc 1 (n - 1), ENNReal.ofReal Ξ΄ := by
      apply sum_le_sum
      intro m hm
      exact le_of_eq_of_le (by simp [B])
        (StreamMeasure.prob_sum_range_sub_le_le_of_HasSubgaussianMGF' hσ2 ha hδ (mem_Icc.mp hm).1)
    _ = ENNReal.ofReal ((n - 1) * Ξ΄) := by
      by_cases hn : n = 0
      Β· simp [hn, hΞ΄.le]
      Β· rw [sum_const, Nat.card_Icc, add_tsub_cancel_right, ← ENNReal.ofReal_nsmul, nsmul_eq_mul,
          Nat.cast_sub (Nat.one_le_iff_ne_zero.mpr hn)]
        ring_nf

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: 8 project declarations, 115 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.