Documentation

LeanMachineLearning.Online.Bandit.SumRewards

Law of the sum of rewards #

theorem Bandits.ArrayModel.identDistrib_sum_range_snd {๐“ : Type u_1} {m๐“ : MeasurableSpace ๐“} [Countable ๐“] {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] (a : ๐“) (k : โ„•) :
ProbabilityTheory.IdentDistrib (fun (ฯ‰ : probSpace ๐“ โ„) => โˆ‘ i โˆˆ Finset.range k, ฯ‰.2 i a) (fun (ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„) => โˆ‘ i โˆˆ Finset.range k, ฯ‰ i a) (arrayMeasure ฮฝ) (streamMeasure ฮฝ)
theorem Bandits.ArrayModel.prob_pullCount_prod_sumRewards_mem_le {๐“ : Type u_1} {m๐“ : MeasurableSpace ๐“} [DecidableEq ๐“] [Countable ๐“] [StandardBorelSpace ๐“] [Nonempty ๐“] {alg : Learning.Algorithm ๐“ โ„} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] (a : ๐“) (n : โ„•) {s : Set (โ„• ร— โ„)} [DecidablePred fun (x : โ„•) => x โˆˆ Prod.fst '' s] (hs : MeasurableSet s) :
(arrayMeasure ฮฝ) {ฯ‰ : probSpace ๐“ โ„ | (Learning.pullCount (action alg) a n ฯ‰, Learning.sumRewards (action alg) (reward alg) a n ฯ‰) โˆˆ s} โ‰ค โˆ‘ k โˆˆ Finset.range (n + 1) with k โˆˆ Prod.fst '' s, (streamMeasure ฮฝ) {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | โˆ‘ i โˆˆ Finset.range k, ฯ‰ i a โˆˆ Prod.mk k โปยน' s}
theorem Bandits.ArrayModel.prob_pullCount_mem_and_sumRewards_mem_le {๐“ : Type u_1} {m๐“ : MeasurableSpace ๐“} [DecidableEq ๐“] [Countable ๐“] [StandardBorelSpace ๐“] [Nonempty ๐“] {alg : Learning.Algorithm ๐“ โ„} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] (a : ๐“) (n : โ„•) {s : Set โ„•} [DecidablePred fun (x : โ„•) => x โˆˆ s] (hs : MeasurableSet s) {B : Set โ„} (hB : MeasurableSet B) :
(arrayMeasure ฮฝ) {ฯ‰ : probSpace ๐“ โ„ | Learning.pullCount (action alg) a n ฯ‰ โˆˆ s โˆง Learning.sumRewards (action alg) (reward alg) a n ฯ‰ โˆˆ B} โ‰ค โˆ‘ k โˆˆ Finset.range (n + 1) with k โˆˆ s, (streamMeasure ฮฝ) {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | โˆ‘ i โˆˆ Finset.range k, ฯ‰ i a โˆˆ B}
theorem Bandits.ArrayModel.prob_exists_pullCount_eq_and_sumRewards_mem_le {๐“ : Type u_1} {m๐“ : MeasurableSpace ๐“} [DecidableEq ๐“] [Countable ๐“] [StandardBorelSpace ๐“] [Nonempty ๐“] {alg : Learning.Algorithm ๐“ โ„} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] (a : ๐“) (m : โ„•) {B : Set โ„} (hB : MeasurableSet B) :
(arrayMeasure ฮฝ) {ฯ‰ : probSpace ๐“ โ„ | โˆƒ (n : โ„•), Learning.pullCount (action alg) a n ฯ‰ = m โˆง Learning.sumRewards (action alg) (reward alg) a n ฯ‰ โˆˆ B} โ‰ค (streamMeasure ฮฝ) {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | โˆ‘ i โˆˆ Finset.range m, ฯ‰ i a โˆˆ B}
theorem Bandits.ArrayModel.prob_sumRewards_le_sumRewards_le {๐“ : Type u_1} {m๐“ : MeasurableSpace ๐“} [DecidableEq ๐“] [Countable ๐“] [StandardBorelSpace ๐“] [Nonempty ๐“] {alg : Learning.Algorithm ๐“ โ„} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] [Fintype ๐“] (a : ๐“) (n mโ‚ mโ‚‚ : โ„•) :
(arrayMeasure ฮฝ) {ฯ‰ : probSpace ๐“ โ„ | Learning.pullCount (action alg) (bestArm ฮฝ) n ฯ‰ = mโ‚ โˆง Learning.pullCount (action alg) a n ฯ‰ = mโ‚‚ โˆง Learning.sumRewards (action alg) (reward alg) (bestArm ฮฝ) n ฯ‰ โ‰ค Learning.sumRewards (action alg) (reward alg) a n ฯ‰} โ‰ค (streamMeasure ฮฝ) {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | โˆ‘ i โˆˆ Finset.range mโ‚, ฯ‰ i (bestArm ฮฝ) โ‰ค โˆ‘ i โˆˆ Finset.range mโ‚‚, ฯ‰ i a}
theorem Bandits.ArrayModel.probReal_sumRewards_le_sumRewards_le {๐“ : Type u_1} {m๐“ : MeasurableSpace ๐“} [DecidableEq ๐“] [Countable ๐“] [StandardBorelSpace ๐“] [Nonempty ๐“] {alg : Learning.Algorithm ๐“ โ„} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] [Fintype ๐“] (a : ๐“) (n mโ‚ mโ‚‚ : โ„•) :
(arrayMeasure ฮฝ).real {ฯ‰ : probSpace ๐“ โ„ | Learning.pullCount (action alg) (bestArm ฮฝ) n ฯ‰ = mโ‚ โˆง Learning.pullCount (action alg) a n ฯ‰ = mโ‚‚ โˆง Learning.sumRewards (action alg) (reward alg) (bestArm ฮฝ) n ฯ‰ โ‰ค Learning.sumRewards (action alg) (reward alg) a n ฯ‰} โ‰ค (streamMeasure ฮฝ).real {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | โˆ‘ i โˆˆ Finset.range mโ‚, ฯ‰ i (bestArm ฮฝ) โ‰ค โˆ‘ i โˆˆ Finset.range mโ‚‚, ฯ‰ i a}
theorem Bandits.sumRewards_eq_comp {๐“ : Type u_1} {ฮฉ : Type u_2} [DecidableEq ๐“] {A : โ„• โ†’ ฮฉ โ†’ ๐“} {R : โ„• โ†’ ฮฉ โ†’ โ„} {n : โ„•} {a : ๐“} :
Learning.sumRewards A R a n = (fun (p : โ„• โ†’ ๐“ ร— โ„) => โˆ‘ i โˆˆ Finset.range n, if (p i).1 = a then (p i).2 else 0) โˆ˜ fun (ฯ‰ : ฮฉ) (n : โ„•) => (A n ฯ‰, R n ฯ‰)
theorem Bandits.pullCount_eq_comp {๐“ : Type u_1} {ฮฉ : Type u_2} [DecidableEq ๐“] {A : โ„• โ†’ ฮฉ โ†’ ๐“} {R : โ„• โ†’ ฮฉ โ†’ โ„} {n : โ„•} {a : ๐“} :
Learning.pullCount A a n = (fun (p : โ„• โ†’ ๐“ ร— โ„) => โˆ‘ i โˆˆ Finset.range n, if (p i).1 = a then 1 else 0) โˆ˜ fun (ฯ‰ : ฮฉ) (n : โ„•) => (A n ฯ‰, R n ฯ‰)
theorem Learning.IsAlgEnvSeq.law_sumRewards_unique {๐“ : Type u_1} {ฮฉ : Type u_2} {ฮฉ' : Type u_3} [DecidableEq ๐“] {m๐“ : MeasurableSpace ๐“} {mฮฉ : MeasurableSpace ฮฉ} {mฮฉ' : MeasurableSpace ฮฉ'} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {P' : MeasureTheory.Measure ฮฉ'} [MeasureTheory.IsProbabilityMeasure P'] {alg : Algorithm ๐“ โ„} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] {A : โ„• โ†’ ฮฉ โ†’ ๐“} {R : โ„• โ†’ ฮฉ โ†’ โ„} {Aโ‚‚ : โ„• โ†’ ฮฉ' โ†’ ๐“} {Rโ‚‚ : โ„• โ†’ ฮฉ' โ†’ โ„} {n : โ„•} {a : ๐“} [StandardBorelSpace ๐“] [Nonempty ๐“] (h1 : IsAlgEnvSeq A R alg (stationaryEnv ฮฝ) P) (h2 : IsAlgEnvSeq Aโ‚‚ Rโ‚‚ alg (stationaryEnv ฮฝ) P') :
theorem Learning.IsAlgEnvSeq.law_pullCount_sumRewards_unique' {๐“ : Type u_1} {ฮฉ : Type u_2} {ฮฉ' : Type u_3} [DecidableEq ๐“] {m๐“ : MeasurableSpace ๐“} {mฮฉ : MeasurableSpace ฮฉ} {mฮฉ' : MeasurableSpace ฮฉ'} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {P' : MeasureTheory.Measure ฮฉ'} [MeasureTheory.IsProbabilityMeasure P'] {alg : Algorithm ๐“ โ„} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] {A : โ„• โ†’ ฮฉ โ†’ ๐“} {R : โ„• โ†’ ฮฉ โ†’ โ„} {Aโ‚‚ : โ„• โ†’ ฮฉ' โ†’ ๐“} {Rโ‚‚ : โ„• โ†’ ฮฉ' โ†’ โ„} {n : โ„•} [StandardBorelSpace ๐“] [Nonempty ๐“] (h1 : IsAlgEnvSeq A R alg (stationaryEnv ฮฝ) P) (h2 : IsAlgEnvSeq Aโ‚‚ Rโ‚‚ alg (stationaryEnv ฮฝ) P') :
ProbabilityTheory.IdentDistrib (fun (ฯ‰ : ฮฉ) (a : ๐“) => (pullCount A a n ฯ‰, sumRewards A R a n ฯ‰)) (fun (ฯ‰ : ฮฉ') (a : ๐“) => (pullCount Aโ‚‚ a n ฯ‰, sumRewards Aโ‚‚ Rโ‚‚ a n ฯ‰)) P P'
theorem Learning.IsAlgEnvSeq.law_pullCount_sumRewards_unique {๐“ : Type u_1} {ฮฉ : Type u_2} {ฮฉ' : Type u_3} [DecidableEq ๐“] {m๐“ : MeasurableSpace ๐“} {mฮฉ : MeasurableSpace ฮฉ} {mฮฉ' : MeasurableSpace ฮฉ'} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {P' : MeasureTheory.Measure ฮฉ'} [MeasureTheory.IsProbabilityMeasure P'] {alg : Algorithm ๐“ โ„} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] {A : โ„• โ†’ ฮฉ โ†’ ๐“} {R : โ„• โ†’ ฮฉ โ†’ โ„} {Aโ‚‚ : โ„• โ†’ ฮฉ' โ†’ ๐“} {Rโ‚‚ : โ„• โ†’ ฮฉ' โ†’ โ„} {n : โ„•} {a : ๐“} [StandardBorelSpace ๐“] [Nonempty ๐“] (h1 : IsAlgEnvSeq A R alg (stationaryEnv ฮฝ) P) (h2 : IsAlgEnvSeq Aโ‚‚ Rโ‚‚ alg (stationaryEnv ฮฝ) P') :
MeasureTheory.Measure.map (fun (ฯ‰ : ฮฉ) => (pullCount A a n ฯ‰, sumRewards A R a n ฯ‰)) P = MeasureTheory.Measure.map (fun (ฯ‰ : ฮฉ') => (pullCount Aโ‚‚ a n ฯ‰, sumRewards Aโ‚‚ Rโ‚‚ a n ฯ‰)) P'
theorem Learning.IsAlgEnvSeq.identDistrib_pullCount_sumRewards {๐“ : Type u_1} {ฮฉ : Type u_2} {ฮฉ' : Type u_3} [DecidableEq ๐“] {m๐“ : MeasurableSpace ๐“} {mฮฉ : MeasurableSpace ฮฉ} {mฮฉ' : MeasurableSpace ฮฉ'} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {P' : MeasureTheory.Measure ฮฉ'} [MeasureTheory.IsProbabilityMeasure P'] {alg : Algorithm ๐“ โ„} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] {A : โ„• โ†’ ฮฉ โ†’ ๐“} {R : โ„• โ†’ ฮฉ โ†’ โ„} {Aโ‚‚ : โ„• โ†’ ฮฉ' โ†’ ๐“} {Rโ‚‚ : โ„• โ†’ ฮฉ' โ†’ โ„} [StandardBorelSpace ๐“] [Nonempty ๐“] (h1 : IsAlgEnvSeq A R alg (stationaryEnv ฮฝ) P) (h2 : IsAlgEnvSeq Aโ‚‚ Rโ‚‚ alg (stationaryEnv ฮฝ) P') :
ProbabilityTheory.IdentDistrib (fun (ฯ‰ : ฮฉ) (n : โ„•) (a : ๐“) => (pullCount A a n ฯ‰, sumRewards A R a n ฯ‰)) (fun (ฯ‰' : ฮฉ') (n : โ„•) (a : ๐“) => (pullCount Aโ‚‚ a n ฯ‰', sumRewards Aโ‚‚ Rโ‚‚ a n ฯ‰')) P P'
theorem Bandits.prob_pullCount_prod_sumRewards_mem_le {๐“ : 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 : ๐“} [StandardBorelSpace ๐“] [Nonempty ๐“] [Countable ๐“] (h : Learning.IsAlgEnvSeq A R alg (Learning.stationaryEnv ฮฝ) P) {s : Set (โ„• ร— โ„)} [DecidablePred fun (x : โ„•) => x โˆˆ Prod.fst '' s] (hs : MeasurableSet s) :
P {ฯ‰ : ฮฉ | (Learning.pullCount A a n ฯ‰, Learning.sumRewards A R a n ฯ‰) โˆˆ s} โ‰ค โˆ‘ k โˆˆ Finset.range (n + 1) with k โˆˆ Prod.fst '' s, (streamMeasure ฮฝ) {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | โˆ‘ i โˆˆ Finset.range k, ฯ‰ i a โˆˆ Prod.mk k โปยน' s}
theorem Bandits.prob_pullCount_mem_and_sumRewards_mem_le {๐“ : 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 : ๐“} [StandardBorelSpace ๐“] [Nonempty ๐“] [Countable ๐“] (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}
theorem Bandits.prob_sumRewards_mem_le {๐“ : 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 : ๐“} [StandardBorelSpace ๐“] [Nonempty ๐“] [Countable ๐“] (h : Learning.IsAlgEnvSeq A R alg (Learning.stationaryEnv ฮฝ) P) {B : Set โ„} (hB : MeasurableSet B) :
P (Learning.sumRewards A R a n โปยน' B) โ‰ค โˆ‘ k โˆˆ Finset.range (n + 1), (streamMeasure ฮฝ) {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | โˆ‘ i โˆˆ Finset.range k, ฯ‰ i a โˆˆ B}
theorem Bandits.prob_pullCount_eq_and_sumRewards_mem_le {๐“ : 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 : ๐“} [StandardBorelSpace ๐“] [Nonempty ๐“] [Countable ๐“] (h : Learning.IsAlgEnvSeq A R alg (Learning.stationaryEnv ฮฝ) P) {m : โ„•} (hm : m โ‰ค n) {B : Set โ„} (hB : MeasurableSet B) :
P {ฯ‰ : ฮฉ | Learning.pullCount A a n ฯ‰ = m โˆง Learning.sumRewards A R a n ฯ‰ โˆˆ B} โ‰ค (streamMeasure ฮฝ) {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | โˆ‘ i โˆˆ Finset.range m, ฯ‰ i a โˆˆ B}
theorem Bandits.prob_exists_pullCount_eq_and_sumRewards_mem_le {๐“ : 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 : โ„• โ†’ ฮฉ โ†’ โ„} [StandardBorelSpace ๐“] [Nonempty ๐“] [Countable ๐“] (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}
theorem Bandits.probReal_sumRewards_le_sumRewards_le {๐“ : 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 : โ„• โ†’ ฮฉ โ†’ โ„} [StandardBorelSpace ๐“] [Nonempty ๐“] [Fintype ๐“] (h : Learning.IsAlgEnvSeq A R alg (Learning.stationaryEnv ฮฝ) P) (a : ๐“) (n mโ‚ mโ‚‚ : โ„•) :
P.real {ฯ‰ : ฮฉ | Learning.pullCount A (bestArm ฮฝ) n ฯ‰ = mโ‚ โˆง Learning.pullCount A a n ฯ‰ = mโ‚‚ โˆง Learning.sumRewards A R (bestArm ฮฝ) n ฯ‰ โ‰ค Learning.sumRewards A R a n ฯ‰} โ‰ค (streamMeasure ฮฝ).real {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | โˆ‘ i โˆˆ Finset.range mโ‚, ฯ‰ i (bestArm ฮฝ) โ‰ค โˆ‘ i โˆˆ Finset.range mโ‚‚, ฯ‰ i a}
theorem Bandits.StreamMeasure.prob_sum_range_sub_ge_le_of_HasSubgaussianMGF {๐“ : Type u_1} {m๐“ : MeasurableSpace ๐“} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] {a : ๐“} {ฯƒ2 : NNReal} (h : ProbabilityTheory.HasSubgaussianMGF (fun (x : โ„) => x - โˆซ (x : โ„), id x โˆ‚ฮฝ a) ฯƒ2 (ฮฝ a)) {ฮต : โ„} (hฮต : 0 โ‰ค ฮต) (n : โ„•) :
(streamMeasure ฮฝ) {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | ฮต โ‰ค โˆ‘ k โˆˆ Finset.range n, (ฯ‰ k a - โˆซ (x : โ„), id x โˆ‚ฮฝ a)} โ‰ค ENNReal.ofReal (Real.exp (-ฮต ^ 2 / (2 * โ†‘n * โ†‘ฯƒ2)))
theorem Bandits.StreamMeasure.prob_sum_range_sub_le_le_of_HasSubgaussianMGF {๐“ : Type u_1} {m๐“ : MeasurableSpace ๐“} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] {a : ๐“} {ฯƒ2 : NNReal} (h : ProbabilityTheory.HasSubgaussianMGF (fun (x : โ„) => x - โˆซ (x : โ„), id x โˆ‚ฮฝ a) ฯƒ2 (ฮฝ a)) {ฮต : โ„} (hฮต : 0 โ‰ค ฮต) (n : โ„•) :
(streamMeasure ฮฝ) {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | โˆ‘ k โˆˆ Finset.range n, (ฯ‰ k a - โˆซ (x : โ„), id x โˆ‚ฮฝ a) โ‰ค -ฮต} โ‰ค ENNReal.ofReal (Real.exp (-ฮต ^ 2 / (2 * โ†‘n * โ†‘ฯƒ2)))
theorem Bandits.StreamMeasure.prob_sum_range_sub_ge_le_of_HasSubgaussianMGF' {๐“ : Type u_1} {m๐“ : MeasurableSpace ๐“} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] {n : โ„•} {a : ๐“} {ฯƒ2 : NNReal} (hฯƒ2 : 0 < ฯƒ2) (h : ProbabilityTheory.HasSubgaussianMGF (fun (x : โ„) => x - โˆซ (x : โ„), id x โˆ‚ฮฝ a) ฯƒ2 (ฮฝ a)) {ฮด : โ„} (hฮด : 0 < ฮด) (hn : 0 < n) :
(streamMeasure ฮฝ) {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | โˆš(2 * โ†‘n * โ†‘ฯƒ2 * Real.log (1 / ฮด)) โ‰ค โˆ‘ k โˆˆ Finset.range n, (ฯ‰ k a - โˆซ (x : โ„), id x โˆ‚ฮฝ a)} โ‰ค ENNReal.ofReal ฮด
theorem Bandits.StreamMeasure.prob_sum_range_sub_le_le_of_HasSubgaussianMGF' {๐“ : Type u_1} {m๐“ : MeasurableSpace ๐“} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] {n : โ„•} {a : ๐“} {ฯƒ2 : NNReal} (hฯƒ2 : 0 < ฯƒ2) (h : ProbabilityTheory.HasSubgaussianMGF (fun (x : โ„) => x - โˆซ (x : โ„), id x โˆ‚ฮฝ a) ฯƒ2 (ฮฝ a)) {ฮด : โ„} (hฮด : 0 < ฮด) (hn : 0 < n) :
(streamMeasure ฮฝ) {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | โˆ‘ k โˆˆ Finset.range n, (ฯ‰ k a - โˆซ (x : โ„), id x โˆ‚ฮฝ a) โ‰ค -โˆš(2 * โ†‘n * โ†‘ฯƒ2 * Real.log (1 / ฮด))} โ‰ค ENNReal.ofReal ฮด
theorem Bandits.prob_sumRewards_sub_pullCount_mul_ge_le {๐“ : 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 : ๐“} [StandardBorelSpace ๐“] [Nonempty ๐“] [Countable ๐“] {ฯƒ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 โˆง โˆš(2 * โ†‘(Learning.pullCount A a t ฯ‰) * โ†‘ฯƒ2 * Real.log (1 / ฮด)) โ‰ค Learning.sumRewards A R a t ฯ‰ - โ†‘(Learning.pullCount A a t ฯ‰) * โˆซ (x : โ„), id x โˆ‚ฮฝ a} โ‰ค ENNReal.ofReal ((โ†‘n - 1) * ฮด)
theorem Bandits.prob_sumRewards_sub_pullCount_mul_le_le {๐“ : 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 : ๐“} [StandardBorelSpace ๐“] [Nonempty ๐“] [Countable ๐“] {ฯƒ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) * ฮด)
theorem Bandits.prob_sumRewards_sub_pullCount_mul_ge_le_of_Fintype {๐“ : 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 : โ„•} [StandardBorelSpace ๐“] [Nonempty ๐“] [Fintype ๐“] {ฯƒ2 : NNReal} (hฯƒ2 : 0 < ฯƒ2) (hฮฝ : โˆ€ (a : ๐“), ProbabilityTheory.HasSubgaussianMGF (fun (x : โ„) => x - โˆซ (x : โ„), id x โˆ‚ฮฝ a) ฯƒ2 (ฮฝ a)) (h : Learning.IsAlgEnvSeq A R alg (Learning.stationaryEnv ฮฝ) P) {ฮด : โ„} (hฮด : 0 < ฮด) :
P {ฯ‰ : ฮฉ | โˆƒ (a : ๐“), โˆƒ t < n, Learning.pullCount A a t ฯ‰ โ‰  0 โˆง โˆš(2 * โ†‘(Learning.pullCount A a t ฯ‰) * โ†‘ฯƒ2 * Real.log (1 / ฮด)) โ‰ค Learning.sumRewards A R a t ฯ‰ - โ†‘(Learning.pullCount A a t ฯ‰) * โˆซ (x : โ„), id x โˆ‚ฮฝ a} โ‰ค ENNReal.ofReal (โ†‘(Fintype.card ๐“) * (โ†‘n - 1) * ฮด)
theorem Bandits.probReal_sum_le_sum_streamMeasure {๐“ : Type u_1} {m๐“ : MeasurableSpace ๐“} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] [Nonempty ๐“] [Fintype ๐“] {c : NNReal} (hฮฝ : โˆ€ (a : ๐“), ProbabilityTheory.HasSubgaussianMGF (fun (x : โ„) => x - โˆซ (x : โ„), id x โˆ‚ฮฝ a) c (ฮฝ a)) (a : ๐“) (m : โ„•) :
(streamMeasure ฮฝ).real {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | โˆ‘ s โˆˆ Finset.range m, ฯ‰ s (bestArm ฮฝ) โ‰ค โˆ‘ s โˆˆ Finset.range m, ฯ‰ s a} โ‰ค Real.exp (-โ†‘m * gap ฮฝ a ^ 2 / (4 * โ†‘c))
theorem Bandits.prob_sum_le_sqrt_log {๐“ : 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 ฮฝ) {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | โˆ‘ s โˆˆ Finset.range k, (ฯ‰ s a - โˆซ (x : โ„), id x โˆ‚ฮฝ a) โ‰ค -โˆš(2 * c * โ†‘k * โ†‘ฯƒ2 * Real.log (โ†‘n + 1))} โ‰ค 1 / (โ†‘n + 1) ^ c
theorem Bandits.prob_sum_ge_sqrt_log {๐“ : 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
theorem Bandits.prob_avg_add_sqrt_log_le {๐“ : Type u_1} {m๐“ : MeasurableSpace ๐“} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] {ฯƒ2 : NNReal} {c : โ„} (hฮฝ : โˆ€ (a : ๐“), ProbabilityTheory.HasSubgaussianMGF (fun (x : โ„) => x - โˆซ (x : โ„), id x โˆ‚ฮฝ a) ฯƒ2 (ฮฝ a)) (hฯƒ2 : ฯƒ2 โ‰  0) (hc : 0 โ‰ค c) (a : ๐“) (n k : โ„•) (hk : k โ‰  0) :
(streamMeasure ฮฝ) {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | (โˆ‘ m โˆˆ Finset.range k, ฯ‰ m a) / โ†‘k + โˆš(2 * c * โ†‘ฯƒ2 * Real.log (โ†‘n + 1) / โ†‘k) โ‰ค โˆซ (x : โ„), id x โˆ‚ฮฝ a} โ‰ค 1 / (โ†‘n + 1) ^ c
theorem Bandits.prob_avg_sub_sqrt_log_ge {๐“ : Type u_1} {m๐“ : MeasurableSpace ๐“} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] {ฯƒ2 : NNReal} {c : โ„} (hฮฝ : โˆ€ (a : ๐“), ProbabilityTheory.HasSubgaussianMGF (fun (x : โ„) => x - โˆซ (x : โ„), id x โˆ‚ฮฝ a) ฯƒ2 (ฮฝ a)) (hฯƒ2 : ฯƒ2 โ‰  0) (hc : 0 โ‰ค c) (a : ๐“) (n k : โ„•) (hk : k โ‰  0) :
(streamMeasure ฮฝ) {ฯ‰ : โ„• โ†’ ๐“ โ†’ โ„ | โˆซ (x : โ„), id x โˆ‚ฮฝ a โ‰ค (โˆ‘ m โˆˆ Finset.range k, ฯ‰ m a) / โ†‘k - โˆš(2 * c * โ†‘ฯƒ2 * Real.log (โ†‘n + 1) / โ†‘k)} โ‰ค 1 / (โ†‘n + 1) ^ c
theorem Learning.IsBayesAlgEnvSeq.prob_empMean_sub_actionMean_ge_le {๐“” : Type u_1} {ฮฉ : Type u_2} [MeasurableSpace ๐“”] [MeasurableSpace ฮฉ] {K : โ„•} [Nonempty (Fin K)] {Q : MeasureTheory.Measure ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— Fin K) โ„} [ProbabilityTheory.IsMarkovKernel ฮบ] {alg : Algorithm (Fin K) โ„} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ Fin K} {R : โ„• โ†’ ฮฉ โ†’ โ„} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] (h : IsBayesAlgEnvSeq Q ฮบ alg E A R P) {ฯƒ2 : NNReal} (hฯƒ2 : 0 < ฯƒ2) (hs : โˆ€ (e : ๐“”) (a : Fin K), ProbabilityTheory.HasSubgaussianMGF (fun (x : โ„) => x - โˆซ (x : โ„), id x โˆ‚ฮบ (e, a)) ฯƒ2 (ฮบ (e, a))) {ฮด : โ„} (hฮด : 0 < ฮด) (n : โ„•) :
P {ฯ‰ : ฮฉ | โˆƒ t < n, โˆƒ (a : Fin K), pullCount A a t ฯ‰ โ‰  0 โˆง โˆš(2 * โ†‘ฯƒ2 * Real.log (1 / ฮด) / โ†‘(pullCount A a t ฯ‰)) โ‰ค empMean A R a t ฯ‰ - actionMean ฮบ E a ฯ‰} โ‰ค ENNReal.ofReal (โ†‘K * (โ†‘n - 1) * ฮด)
theorem Learning.IsBayesAlgEnvSeq.prob_empMean_bestAction_sub_actionMean_le_le {๐“” : Type u_1} {ฮฉ : Type u_2} [MeasurableSpace ๐“”] [MeasurableSpace ฮฉ] {K : โ„•} [Nonempty (Fin K)] {Q : MeasureTheory.Measure ๐“”} {ฮบ : ProbabilityTheory.Kernel (๐“” ร— Fin K) โ„} [ProbabilityTheory.IsMarkovKernel ฮบ] {alg : Algorithm (Fin K) โ„} {E : ฮฉ โ†’ ๐“”} {A : โ„• โ†’ ฮฉ โ†’ Fin K} {R : โ„• โ†’ ฮฉ โ†’ โ„} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] (h : IsBayesAlgEnvSeq Q ฮบ alg E A R P) {ฯƒ2 : NNReal} (hฯƒ2 : 0 < ฯƒ2) (hs : โˆ€ (e : ๐“”) (a : Fin K), ProbabilityTheory.HasSubgaussianMGF (fun (x : โ„) => x - โˆซ (x : โ„), id x โˆ‚ฮบ (e, a)) ฯƒ2 (ฮบ (e, a))) {ฮด : โ„} (hฮด : 0 < ฮด) (n : โ„•) :
P {ฯ‰ : ฮฉ | โˆƒ t < n, pullCount A (bestAction ฮบ E ฯ‰) t ฯ‰ โ‰  0 โˆง empMean A R (bestAction ฮบ E ฯ‰) t ฯ‰ - actionMean ฮบ E (bestAction ฮบ E ฯ‰) ฯ‰ โ‰ค -โˆš(2 * โ†‘ฯƒ2 * Real.log (1 / ฮด) / โ†‘(pullCount A (bestAction ฮบ E ฯ‰) t ฯ‰))} โ‰ค ENNReal.ofReal ((โ†‘n - 1) * ฮด)