Bandits.ArrayModel.indepFun_fst_add_one_aux
This page has the declaration's own card below, then its dependency graph, then a card for each dependency (type dependencies first, then the rest of the transitive closure). For a theorem, the graph and the dependency cards only follow its statement's dependencies (its proof is replaced by sorry, so what it proves doesn't depend on how); for everything else, both the type and the body/value are followed, since their content is part of what later declarations build on.
indepFun_fst_add_one_aux๐
Bandits.ArrayModel.indepFun_fst_add_one_auxNo docstring.
Bandits.ArrayModel.indepFun_fst_add_one_aux.{u_1, u_2} {๐ : Type u_1} {R : Type u_2} {m๐ : MeasurableSpace ๐} {mR : MeasurableSpace R} (ฮฝ : ProbabilityTheory.Kernel ๐ R) [ProbabilityTheory.IsMarkovKernel ฮฝ] (n : โ) : ProbabilityTheory.IndepFun (fun ฯ => Prod.fst ฯ (n + 1)) (fun ฯ => (fun i => Prod.fst ฯ โi, Prod.snd ฯ)) (arrayMeasure ฮฝ)Bandits.ArrayModel.indepFun_fst_add_one_aux.{u_1, u_2} {๐ : Type u_1} {R : Type u_2} {m๐ : MeasurableSpace ๐} {mR : MeasurableSpace R} (ฮฝ : ProbabilityTheory.Kernel ๐ R) [ProbabilityTheory.IsMarkovKernel ฮฝ] (n : โ) : ProbabilityTheory.IndepFun (fun ฯ => Prod.fst ฯ (n + 1)) (fun ฯ => (fun i => Prod.fst ฯ โi, Prod.snd ฯ)) (arrayMeasure ฮฝ)
Code
lemma indepFun_fst_add_one_aux (ฮฝ : Kernel ๐ R) [IsMarkovKernel ฮฝ] (n : โ) :
(fun ฯ โฆ ฯ.1 (n + 1)) โแตข[arrayMeasure ฮฝ] (fun ฯ โฆ (fun (i : Iic n) โฆ ฯ.1 i, ฯ.2))Type uses (3)
Used by (1)
Actions: Source ยท Open Issue
Proof
by
let ฮผโ : Measure (โ โ I) := Measure.infinitePi fun _ โฆ volume
let ฮผโ : Measure (โ โ ๐ โ R) := streamMeasure ฮฝ
-- Coordinates of ฮผโ are independent
have h_indep : iIndepFun (fun i (ฯ : โ โ I) โฆ ฯ i) ฮผโ :=
iIndepFun_infinitePi (fun _ โฆ measurable_id)
have h_indep_n : IndepFun (fun ฯ โฆ ฯ (n + 1)) (fun ฯ โฆ fun i : Iic n โฆ ฯ i) ฮผโ := by
have h := h_indep.indepFun_finsetโ {n + 1} (Iic n) (by simp)
(fun i โฆ (measurable_pi_apply i).aemeasurable)
convert h.comp (measurable_pi_apply โจn + 1, by simpโฉ) measurable_id using 1
ยท rfl
ยท rfl
rw [indepFun_iff_measure_inter_preimage_eq_mul]
intro s t hs ht
let X : (โ โ I) ร (โ โ ๐ โ R) โ I := fun ฯ โฆ ฯ.1 (n + 1)
let Y : (โ โ I) ร (โ โ ๐ โ R) โ (Iic n โ I) ร (โ โ ๐ โ R) := fun ฯ โฆ (fun i โฆ ฯ.1 i, ฯ.2)
change (ฮผโ.prod ฮผโ) (X โปยน' s โฉ Y โปยน' t) = (ฮผโ.prod ฮผโ) (X โปยน' s) * (ฮผโ.prod ฮผโ) (Y โปยน' t)
-- Rewrite using Fubini
rw [Measure.prod_apply (hs.preimage (by fun_prop : Measurable X)),
Measure.prod_apply (ht.preimage (by fun_prop : Measurable Y)),
Measure.prod_apply ((hs.preimage (by fun_prop : Measurable X)).inter
(ht.preimage (by fun_prop : Measurable Y)))]
-- Compute fibers
have hX_fst ฯโ : ฮผโ (Prod.mk ฯโ โปยน' (X โปยน' s)) = s.indicator 1 (ฯโ (n + 1)) := by
simp only [X, Set.preimage_preimage]
by_cases h : ฯโ (n + 1) โ s <;> simp [h]
have hY_fst ฯโ : ฮผโ (Prod.mk ฯโ โปยน' (Y โปยน' t)) = ฮผโ {y | ((fun i : Iic n โฆ ฯโ i), y) โ t} := rfl
have hXY ฯโ : ฮผโ (Prod.mk ฯโ โปยน' (X โปยน' s โฉ Y โปยน' t)) =
s.indicator 1 (ฯโ (n + 1)) * ฮผโ {y | ((fun i : Iic n โฆ ฯโ i), y) โ t} := by
simp only [X, Y, Set.preimage_inter, Set.preimage_preimage]
by_cases h : ฯโ (n + 1) โ s
ยท simp [h]
congr
ยท simp [h]
simp_rw [hY_fst, hX_fst, hXY]
-- Factor the integral using independence
let g : (Iic n โ I) โ ENNReal := fun x โฆ ฮผโ {y | (x, y) โ t}
have hg_meas : Measurable g := measurable_measure_prodMk_left ht
have hf_meas : Measurable (fun ฯโ : โ โ I โฆ s.indicator (1 : I โ ENNReal) (ฯโ (n + 1))) :=
(measurable_one.indicator hs).comp (measurable_pi_apply _)
have hindep_fg : IndepFun (fun ฯโ โฆ s.indicator (1 : I โ ENNReal) (ฯโ (n + 1)))
(fun ฯโ โฆ g (fun i โฆ ฯโ i)) ฮผโ :=
h_indep_n.comp (measurable_one.indicator hs) hg_meas
have h_eq (ฯโ : โ โ I) : ฮผโ {y | ((fun i : Iic n โฆ ฯโ i), y) โ t} = g (fun i โฆ ฯโ i) := rfl
simp_rw [h_eq]
exact lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun hf_meas (by fun_prop) hindep_fgDependency graph
Type dependencies (3)
probSpace๐
Bandits.ArrayModel.probSpaceProbability space for the array model of stochastic bandits.
Bandits.ArrayModel.probSpace.{u_1, u_2} (๐ : Type u_1) (R : Type u_2) : Type (max u_1 u_2)Bandits.ArrayModel.probSpace.{u_1, u_2} (๐ : Type u_1) (R : Type u_2) : Type (max u_1 u_2)
Code
def probSpace : Type _ := (โ โ I) ร (โ โ ๐ โ R)
Actions: Source ยท Open Issue
instMeasurableSpaceProbSpace๐
Bandits.ArrayModel.instMeasurableSpaceProbSpaceNo docstring.
Bandits.ArrayModel.instMeasurableSpaceProbSpace.{u_3, u_4} {๐ : Type u_3} {R : Type u_4} [MeasurableSpace R] : MeasurableSpace (probSpace ๐ R)Bandits.ArrayModel.instMeasurableSpaceProbSpace.{u_3, u_4} {๐ : Type u_3} {R : Type u_4} [MeasurableSpace R] : MeasurableSpace (probSpace ๐ R)
Code
instance {๐ R : Type*} [MeasurableSpace R] : MeasurableSpace (probSpace ๐ R)Type uses (1)
Actions: Source ยท Open Issue
Proof
inferInstanceAs (MeasurableSpace ((โ โ I) ร (โ โ ๐ โ R)))
arrayMeasure๐
Bandits.ArrayModel.arrayMeasureProbability measure for the array model of stochastic bandits.
Bandits.ArrayModel.arrayMeasure.{u_1, u_2} {๐ : Type u_1} {R : Type u_2} {m๐ : MeasurableSpace ๐} {mR : MeasurableSpace R} (ฮฝ : ProbabilityTheory.Kernel ๐ R) : MeasureTheory.Measure (probSpace ๐ R)Bandits.ArrayModel.arrayMeasure.{u_1, u_2} {๐ : Type u_1} {R : Type u_2} {m๐ : MeasurableSpace ๐} {mR : MeasurableSpace R} (ฮฝ : ProbabilityTheory.Kernel ๐ R) : MeasureTheory.Measure (probSpace ๐ R)
Code
noncomputable def arrayMeasure (ฮฝ : Kernel ๐ R) : Measure (probSpace ๐ R) := (Measure.infinitePi fun _ โฆ volume).prod (streamMeasure ฮฝ)
Type uses (2)
Body uses (1)
Actions: Source ยท Open Issue
All dependencies, transitively (1)
streamMeasure๐
Bandits.streamMeasureMeasure of an infinite stream of rewards from each action.
Bandits.streamMeasure.{u_1, u_2} {๐ : Type u_1} {R : Type u_2} {m๐ : MeasurableSpace ๐} {mR : MeasurableSpace R} (ฮฝ : ProbabilityTheory.Kernel ๐ R) : MeasureTheory.Measure (โ โ ๐ โ R)Bandits.streamMeasure.{u_1, u_2} {๐ : Type u_1} {R : Type u_2} {m๐ : MeasurableSpace ๐} {mR : MeasurableSpace R} (ฮฝ : ProbabilityTheory.Kernel ๐ R) : MeasureTheory.Measure (โ โ ๐ โ R)
Code
noncomputable def streamMeasure (ฮฝ : Kernel ๐ R) : Measure (โ โ ๐ โ R) := Measure.infinitePi fun _ โฆ Measure.infinitePi ฮฝ
Used by (56)
Actions: Source ยท Open Issue