@@ -246,49 +246,38 @@ lemma prob_arm_mul_eq_le (hν : ∀ a, HasSubgaussianMGF (fun x ↦ x - (ν a)[i
246246 sorry
247247 _ = (𝔓).real {ω | ∑ s ∈ range m, ω.2 s (bestArm ν) ≤ ∑ s ∈ range m, ω.2 s a} := by
248248 sorry
249- _ = (𝔓).real {ω | m * gap ν a
250- ≤ ∑ s ∈ range m, ((ω.2 s a - (ν a)[id]) - (ω.2 s (bestArm ν) - (ν (bestArm ν))[id]))} := by
251- congr with ω
252- simp only [gap_eq_bestArm_sub, id_eq, sum_sub_distrib, sum_const, card_range, nsmul_eq_mul]
253- ring_nf
254- simp
255- _ = (Bandit.streamMeasure ν).real {ω | m * gap ν a
256- ≤ ∑ s ∈ range m, ((ω s a - (ν a)[id]) - (ω s (bestArm ν) - (ν (bestArm ν))[id]))} := by
257- have : Bandit.streamMeasure ν = (𝔓).map Prod.snd := by rw [← Measure.snd, Bandit.snd_measure]
258- rw [this, measureReal_def, measureReal_def, Measure.map_apply (by fun_prop)]
249+ _ = (Bandit.streamMeasure ν).real
250+ {ω | ∑ s ∈ range m, ω s (bestArm ν) ≤ ∑ s ∈ range m, ω s a} := by
251+ simp_rw [measureReal_def]
252+ congr 1
253+ rw [← Bandit.snd_measure (etcAlgorithm hK m), Measure.snd_apply]
259254 · rfl
260255 · exact measurableSet_le (by fun_prop) (by fun_prop)
261256 _ ≤ Real.exp (-↑m * gap ν a ^ 2 / 4 ) := by
262257 by_cases ha : a = bestArm ν
263258 · simp [ha]
264- refine (HasSubgaussianMGF.measure_sum_range_ge_le_of_iIndepFun (c := 2 ) (ε := m * gap ν a)
265- ?_ ?_ ?_).trans_eq ?_
266- · suffices iIndepFun (fun s ω ↦ ω s a - ω s (bestArm ν)) (Bandit.streamMeasure ν) by
267- convert this.comp (fun _ x ↦ x - (ν a)[id] + (ν (bestArm ν))[id]) (by fun_prop) with n h
268- simp only [id_eq, Function.comp_apply]
269- ring
270- suffices iIndepFun (fun s ω ↦ ω s) (Bandit.streamMeasure ν) from
271- this.comp (fun _ x ↦ x a - x (bestArm ν)) (by fun_prop)
272- exact iIndepFun_eval_streamMeasure' ν
259+ refine (HasSubgaussianMGF.measure_sum_le_sum_le' (cX := fun _ ↦ 1 ) (cY := fun _ ↦ 1 )
260+ ?_ ?_ ?_ ?_ ?_ ?_).trans_eq ?_
261+ · exact iIndepFun_eval_streamMeasure'' ν (bestArm ν)
262+ · exact iIndepFun_eval_streamMeasure'' ν a
263+ · intro i him
264+ simp_rw [integral_eval_streamMeasure]
265+ refine (hν (bestArm ν)).congr_identDistrib ?_
266+ exact (identDistrib_eval_eval_id_streamMeasure _ _ _).symm.sub_const _
273267 · intro i him
274- rw [← one_add_one_eq_two]
275- refine HasSubgaussianMGF.sub_of_indepFun ?_ ?_ ?_
276- · refine (hν a).congr_identDistrib ?_
277- exact (identDistrib_eval_eval_id_streamMeasure _ _ _).symm.sub_const _
278- · refine (hν (bestArm ν)).congr_identDistrib ?_
279- exact (identDistrib_eval_eval_id_streamMeasure _ _ _).symm.sub_const _
280- · suffices IndepFun (fun ω ↦ ω i a) (fun ω ↦ ω i (bestArm ν)) (Bandit.streamMeasure ν) by
281- exact this.comp (φ := fun x ↦ x - (ν a)[id]) (ψ := fun x ↦ x - (ν (bestArm ν))[id])
282- (by fun_prop) (by fun_prop)
283- exact indepFun_eval_streamMeasure (ν := ν) (by grind)
284- · have : 0 ≤ gap ν a := gap_nonneg
285- positivity
268+ simp_rw [integral_eval_streamMeasure]
269+ refine (hν a).congr_identDistrib ?_
270+ exact (identDistrib_eval_eval_id_streamMeasure _ _ _).symm.sub_const _
271+ · exact indepFun_eval_streamMeasure' ν (Ne.symm ha)
272+ · gcongr 1 with i him
273+ simp_rw [integral_eval_streamMeasure]
274+ exact le_bestArm a
286275 · congr 1
276+ simp_rw [integral_eval_streamMeasure]
277+ simp only [id_eq, sum_const, card_range, nsmul_eq_mul, mul_one, NNReal.coe_natCast,
278+ gap_eq_bestArm_sub, neg_mul]
287279 field_simp
288- simp_rw [mul_assoc]
289- simp only [NNReal.coe_ofNat, neg_inj, mul_eq_mul_left_iff, ne_eq, OfNat.ofNat_ne_zero,
290- not_false_eq_true, pow_eq_zero_iff]
291- norm_num
280+ ring
292281
293282lemma expectation_pullCount_le (hν : ∀ a, HasSubgaussianMGF (fun x ↦ x - (ν a)[id]) 1 (ν a))
294283 (a : Fin K) (hm : m ≠ 0 ) {n : ℕ} (hn : K * m ≤ n) :
0 commit comments