LeanMachineLearning

Bandits.prob_sum_ge_sqrt_log๐Ÿ”—

Lemma

No docstring.

๐Ÿ”—theorem
Bandits.prob_sum_ge_sqrt_log.{u_1} {๐“ : Type u_1} {m๐“ : MeasurableSpace ๐“} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] {n : โ„•} {ฯƒ2 : NNReal} (hฮฝ : โˆ€ (a : ๐“), ProbabilityTheory.HasSubgaussianMGF (fun x => x - โˆซ (x : โ„), id x โˆ‚ฮฝ a) ฯƒ2 (ฮฝ a)) (hฯƒ2 : ฯƒ2 โ‰  0) {c : โ„} (hc : 0 โ‰ค c) (a : ๐“) (k : โ„•) (hk : k โ‰  0) : (streamMeasure ฮฝ) {ฯ‰ | โˆš(2 * c * โ†‘k * โ†‘ฯƒ2 * Real.log (โ†‘n + 1)) โ‰ค โˆ‘ s โˆˆ Finset.range k, (ฯ‰ s a - โˆซ (x : โ„), id x โˆ‚ฮฝ a)} โ‰ค 1 / (โ†‘n + 1) ^ c
Bandits.prob_sum_ge_sqrt_log.{u_1} {๐“ : Type u_1} {m๐“ : MeasurableSpace ๐“} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] {n : โ„•} {ฯƒ2 : NNReal} (hฮฝ : โˆ€ (a : ๐“), ProbabilityTheory.HasSubgaussianMGF (fun x => x - โˆซ (x : โ„), id x โˆ‚ฮฝ a) ฯƒ2 (ฮฝ a)) (hฯƒ2 : ฯƒ2 โ‰  0) {c : โ„} (hc : 0 โ‰ค c) (a : ๐“) (k : โ„•) (hk : k โ‰  0) : (streamMeasure ฮฝ) {ฯ‰ | โˆš(2 * c * โ†‘k * โ†‘ฯƒ2 * Real.log (โ†‘n + 1)) โ‰ค โˆ‘ s โˆˆ Finset.range k, (ฯ‰ s a - โˆซ (x : โ„), id x โˆ‚ฮฝ a)} โ‰ค 1 / (โ†‘n + 1) ^ c

Code

lemma prob_sum_ge_sqrt_log {ฯƒ2 : โ„โ‰ฅ0}
    (hฮฝ : โˆ€ a, HasSubgaussianMGF (fun x โ†ฆ x - (ฮฝ a)[id]) ฯƒ2 (ฮฝ a))
    (hฯƒ2 : ฯƒ2 โ‰  0) {c : โ„} (hc : 0 โ‰ค c) (a : ๐“) (k : โ„•) (hk : k โ‰  0) :
    streamMeasure ฮฝ
        {ฯ‰ | โˆš(2 * c * k * ฯƒ2 * Real.log (n + 1)) โ‰ค (โˆ‘ s โˆˆ range k, (ฯ‰ s a - (ฮฝ a)[id]))} โ‰ค
      1 / (n + 1) ^ c
Proof
by
  calc
    streamMeasure ฮฝ
      {ฯ‰ | โˆš(2 * c * k * ฯƒ2 * Real.log (n + 1)) โ‰ค (โˆ‘ s โˆˆ range k, (ฯ‰ s a - (ฮฝ a)[id]))}
  _ โ‰ค ENNReal.ofReal (Real.exp (-(โˆš(2 * c * k * ฯƒ2 * Real.log (n + 1))) ^ 2 / (2 * k * ฯƒ2))) := by
    rw [โ† ofReal_measureReal]
    gcongr
    refine (HasSubgaussianMGF.measure_sum_range_ge_le_of_iIndepFun (c := ฯƒ2) ?_ ?_ (by positivity))
    ยท exact (iIndepFun_eval_streamMeasure'' ฮฝ a).comp (fun i ฯ‰ โ†ฆ ฯ‰ - (ฮฝ a)[id])
        (fun _ โ†ฆ by fun_prop)
    ยท intro i him
      refine (hฮฝ a).congr_identDistrib ?_
      exact (identDistrib_eval_eval_id_streamMeasure _ _ _).symm.sub_const _
  _ = 1 / (n + 1) ^ c := by
    rw [Real.sq_sqrt]
    swap; ยท exact mul_nonneg (by positivity) (Real.log_nonneg (by simp))
    field_simp
    rw [โ† Real.log_rpow (by positivity), โ† Real.log_inv,
      Real.exp_log (by positivity), one_div, ENNReal.ofReal_inv_of_pos (by positivity),
      โ† ENNReal.ofReal_rpow_of_nonneg (by positivity) (by positivity)]
    norm_cast

Actions: Source ยท Open Issue

Meaning last changed in v4.34.0-rc2-1-g439785b (2026-08-23), the 3th 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: 1 project declarations, 67 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.