LeanMachineLearning

Bandits.prob_exists_pullCount_eq_and_sumRewards_mem_le๐Ÿ”—

Lemma

No docstring.

๐Ÿ”—theorem
Bandits.prob_exists_pullCount_eq_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 : โ„• โ†’ ฮฉ โ†’ โ„} [Nonempty ๐“] [Countable ๐“] [MeasurableSingletonClass ๐“] (h : Learning.IsAlgEnvSeq A R alg (Learning.stationaryEnv ฮฝ) P) (a : ๐“) (m : โ„•) {B : Set โ„} (hB : MeasurableSet B) : P {ฯ‰ | โˆƒ n, Learning.pullCount A a n ฯ‰ = m โˆง Learning.sumRewards A R a n ฯ‰ โˆˆ B} โ‰ค (streamMeasure ฮฝ) {ฯ‰ | โˆ‘ i โˆˆ Finset.range m, ฯ‰ i a โˆˆ B}
Bandits.prob_exists_pullCount_eq_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 : โ„• โ†’ ฮฉ โ†’ โ„} [Nonempty ๐“] [Countable ๐“] [MeasurableSingletonClass ๐“] (h : Learning.IsAlgEnvSeq A R alg (Learning.stationaryEnv ฮฝ) P) (a : ๐“) (m : โ„•) {B : Set โ„} (hB : MeasurableSet B) : P {ฯ‰ | โˆƒ n, Learning.pullCount A a n ฯ‰ = m โˆง Learning.sumRewards A R a n ฯ‰ โˆˆ B} โ‰ค (streamMeasure ฮฝ) {ฯ‰ | โˆ‘ i โˆˆ Finset.range m, ฯ‰ i a โˆˆ B}

Code

lemma prob_exists_pullCount_eq_and_sumRewards_mem_le [Countable ๐“] [MeasurableSingletonClass ๐“]
    (h : IsAlgEnvSeq A R alg (stationaryEnv ฮฝ) P) (a : ๐“) (m : โ„•) {B : Set โ„}
    (hB : MeasurableSet B) :
    P {ฯ‰ | โˆƒ n, pullCount A a n ฯ‰ = m โˆง sumRewards A R a n ฯ‰ โˆˆ B} โ‰ค
      streamMeasure ฮฝ {ฯ‰ | โˆ‘ i โˆˆ range m, ฯ‰ i a โˆˆ B}
Proof
let s := {p : โ„• โ†’ ๐“ โ†’ โ„• ร— โ„ | โˆƒ n, (p n a).1 = m โˆง (p n a).2 โˆˆ B}
  have : s = โ‹ƒ n, (fun p โ†ฆ p n a) โปยน' ({m} ร—หข B) := by
    ext p
    simp [s]
  have hs : MeasurableSet s := by measurability
  calc P {ฯ‰ | โˆƒ n, pullCount A a n ฯ‰ = m โˆง sumRewards A R a n ฯ‰ โˆˆ B}
    _ = (ArrayModel.arrayMeasure ฮฝ) {ฯ‰ | โˆƒ n, pullCount (ArrayModel.action alg) a n ฯ‰ = m โˆง
            sumRewards (ArrayModel.action alg) (ArrayModel.reward alg) a n ฯ‰ โˆˆ B} :=
        (h.identDistrib_pullCount_sumRewards
          (ArrayModel.isAlgEnvSeq_arrayMeasure alg ฮฝ)).measure_mem_eq hs
    _ โ‰ค _ := ArrayModel.prob_exists_pullCount_eq_and_sumRewards_mem_le a m hB

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, 77 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.