LeanMachineLearning

Bandits.prob_pullCount_mem_and_sumRewards_mem_le๐Ÿ”—

Lemma

No docstring.

๐Ÿ”—theorem
Bandits.prob_pullCount_mem_and_sumRewards_mem_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 ๐“] (h : Learning.IsAlgEnvSeq A R alg (Learning.stationaryEnv ฮฝ) P) {s : Set โ„•} [DecidablePred fun x => x โˆˆ s] (hs : MeasurableSet s) {B : Set โ„} (hB : MeasurableSet B) : P {ฯ‰ | Learning.pullCount A a n ฯ‰ โˆˆ s โˆง Learning.sumRewards A R a n ฯ‰ โˆˆ B} โ‰ค โˆ‘ k โˆˆ Finset.range (n + 1) with k โˆˆ s, (streamMeasure ฮฝ) {ฯ‰ | โˆ‘ i โˆˆ Finset.range k, ฯ‰ i a โˆˆ B}
Bandits.prob_pullCount_mem_and_sumRewards_mem_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 ๐“] (h : Learning.IsAlgEnvSeq A R alg (Learning.stationaryEnv ฮฝ) P) {s : Set โ„•} [DecidablePred fun x => x โˆˆ s] (hs : MeasurableSet s) {B : Set โ„} (hB : MeasurableSet B) : P {ฯ‰ | Learning.pullCount A a n ฯ‰ โˆˆ s โˆง Learning.sumRewards A R a n ฯ‰ โˆˆ B} โ‰ค โˆ‘ k โˆˆ Finset.range (n + 1) with k โˆˆ s, (streamMeasure ฮฝ) {ฯ‰ | โˆ‘ i โˆˆ Finset.range k, ฯ‰ i a โˆˆ B}

Code

lemma prob_pullCount_mem_and_sumRewards_mem_le [Countable ๐“] [MeasurableSingletonClass ๐“]
    (h : IsAlgEnvSeq A R alg (stationaryEnv ฮฝ) P)
    {s : Set โ„•} [DecidablePred (ยท โˆˆ s)] (hs : MeasurableSet s) {B : Set โ„} (hB : MeasurableSet B) :
    P {ฯ‰ | pullCount A a n ฯ‰ โˆˆ s โˆง sumRewards A R a n ฯ‰ โˆˆ B} โ‰ค
      โˆ‘ k โˆˆ (range (n + 1)).filter (ยท โˆˆ s),
        streamMeasure ฮฝ {ฯ‰ | โˆ‘ i โˆˆ range k, ฯ‰ i a โˆˆ B}
Proof
by
  classical
  rcases Set.eq_empty_or_nonempty B with h_empty | h_nonempty
  ยท simp [h_empty]
  convert prob_pullCount_prod_sumRewards_mem_le h (hs.prod hB) (ฮฝ := ฮฝ) (alg := alg) with _ _ _ k hk
  ยท rfl
  ยท ext n
    have : โˆƒ x, x โˆˆ B := h_nonempty
    simp [this]
  ยท ext x
    simp only [Set.mem_image, Set.mem_prod, Prod.exists, exists_and_right, exists_and_left,
      exists_eq_right, mem_filter, mem_range] at hk
    simp [hk.2.1]

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: 9 project declarations, 79 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.