math / data /lean /OAI /Probability /FreeIsing /Conditioning /Attenuation.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
5.11 kB
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