File size: 5,114 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | import Mathlib
namespace OAI
noncomputable section
open MeasureTheory
namespace Problem367
section Probability
variable {Ξ© : Type*} {mΞ© : MeasurableSpace Ξ©} {ΞΌ : Measure Ξ©}
variable [IsProbabilityMeasure ΞΌ]
lemma integrable_of_measurable_unit_interval {f : Ξ© β β} (hf : Measurable f)
(hbound : β w, 0 β€ f w β§ f w β€ 1) : Integrable f ΞΌ := by
apply (integrable_const (1 : β)).mono' hf.aestronglyMeasurable
filter_upwards [] with w
rw [Real.norm_eq_abs, abs_of_nonneg (hbound w).1]
exact (hbound w).2
lemma integral_mul_le_of_condExp_le {m : MeasurableSpace Ξ©} (hm : m β€ mΞ©)
{f g : Ξ© β β} {q : β}
(hf : Integrable f ΞΌ) (hg : Measurable[m] g)
(hgBound : β w, 0 β€ g w β§ g w β€ 1)
(hcond : βα΅ w βΞΌ, (ΞΌ[f | m]) w β€ q) :
(β« w, f w * g w βΞΌ) β€ q * β« w, g w βΞΌ := by
have hgb : @Measurable Ξ© β mΞ© _ g := hg.mono hm le_rfl
have hgInt := integrable_of_measurable_unit_interval (ΞΌ := ΞΌ) hgb hgBound
have hgNorm : βα΅ w βΞΌ, βg wβ β€ 1 := by
filter_upwards [] with w
rw [Real.norm_eq_abs, abs_of_nonneg (hgBound w).1]
exact (hgBound w).2
have hprod := hf.mul_bdd hgb.aestronglyMeasurable hgNorm
have hpull := condExp_mul_of_stronglyMeasurable_right hg.stronglyMeasurable hprod hf
calc
(β« w, f w * g w βΞΌ) = β« w, (ΞΌ[fun v => f v * g v | m]) w βΞΌ :=
(integral_condExp hm).symm
_ = β« w, (ΞΌ[f | m]) w * g w βΞΌ := integral_congr_ae hpull
_ β€ β« w, q * g w βΞΌ := by
apply integral_mono_ae
(integrable_condExp.mul_bdd hgb.aestronglyMeasurable hgNorm)
(hgInt.const_mul q)
filter_upwards [hcond] with w hw
exact mul_le_mul_of_nonneg_right hw (hgBound w).1
_ = q * β« w, g w βΞΌ := integral_const_mul _ _
lemma integral_prod_le_of_condExp_le {q : β} (hq : 0 β€ q)
(A : β β Ξ© β β) (m : β β MeasurableSpace Ξ©) (s : Finset β)
(hMeas : β i β s, Measurable (A i))
(hBound : β i β s, β w, 0 β€ A i w β§ A i w β€ 1)
(hm : β i β s, m i β€ mΞ©)
(hCE : β i β s, βα΅ w βΞΌ, (ΞΌ[A i | m i]) w β€ q)
(hLater : β i β s, β j β s, i < j β Measurable[m i] (A j)) :
(β« w, β i β s, A i w βΞΌ) β€ q ^ s.card := by
classical
revert hMeas hBound hm hCE hLater
induction s using Finset.induction_on_min with
| empty =>
intros
simp
| insert i s hmin ih =>
intro hMeas hBound hm hCE hLater
have his : i β s := by
intro hi
exact (lt_irrefl i) (hmin i hi)
have hiMem : i β insert i s := Finset.mem_insert_self i s
have hsMem : β j β s, j β insert i s := fun j hj => Finset.mem_insert_of_mem hj
have htail : (β« w, β j β s, A j w βΞΌ) β€ q ^ s.card :=
ih (fun j hj => hMeas j (hsMem j hj))
(fun j hj => hBound j (hsMem j hj))
(fun j hj => hm j (hsMem j hj))
(fun j hj => hCE j (hsMem j hj))
(fun j hj k hk => hLater j (hsMem j hj) k (hsMem k hk))
have hprodMeas : Measurable[m i] (fun w => β j β s, A j w) := by
apply Finset.measurable_fun_prod
intro j hj
exact hLater i hiMem j (hsMem j hj) (hmin j hj)
have hprodBound : β w, 0 β€ (β j β s, A j w) β§ (β j β s, A j w) β€ 1 := by
intro w
exact β¨Finset.prod_nonneg (fun j hj => (hBound j (hsMem j hj) w).1),
Finset.prod_le_oneβ (fun j hj => (hBound j (hsMem j hj) w).1)
(fun j hj => (hBound j (hsMem j hj) w).2)β©
calc
(β« w, β j β insert i s, A j w βΞΌ) =
β« w, A i w * (β j β s, A j w) βΞΌ := by simp [Finset.prod_insert, his]
_ β€ q * β« w, β j β s, A j w βΞΌ :=
integral_mul_le_of_condExp_le (hm i hiMem)
(integrable_of_measurable_unit_interval (hMeas i hiMem) (hBound i hiMem))
hprodMeas hprodBound (hCE i hiMem)
_ β€ q * q ^ s.card := mul_le_mul_of_nonneg_left htail hq
_ = q ^ (insert i s).card := by rw [Finset.card_insert_of_notMem his, pow_succ']
lemma integral_prod_le_exp_of_condExp_le {delta : β} (hΞ΄ : delta β€ 1)
(A : β β Ξ© β β) (m : β β MeasurableSpace Ξ©) (s : Finset β)
(hMeas : β i β s, Measurable (A i))
(hBound : β i β s, β w, 0 β€ A i w β§ A i w β€ 1)
(hm : β i β s, m i β€ mΞ©)
(hCE : β i β s, βα΅ w βΞΌ, (ΞΌ[A i | m i]) w β€ 1 - delta)
(hLater : β i β s, β j β s, i < j β Measurable[m i] (A j)) :
(β« w, β i β s, A i w βΞΌ) β€ Real.exp (-delta * (s.card : β)) := by
calc
(β« w, β i β s, A i w βΞΌ) β€ (1 - delta) ^ s.card :=
integral_prod_le_of_condExp_le (sub_nonneg.mpr hΞ΄) A m s hMeas hBound hm hCE hLater
_ β€ (Real.exp (-delta)) ^ s.card := by
apply pow_le_pow_leftβ (sub_nonneg.mpr hΞ΄)
have h := Real.add_one_le_exp (-delta)
linarith
_ = Real.exp (-delta * (s.card : β)) := by
rw [β Real.exp_nat_mul]
congr 1
ring
end Probability
end Problem367
end
end OAI
|