cfahlgren1/math / lean /OAI /Probability /FreeIsing /Posterior /SqrtObservationDerivative.lean
cfahlgren1's picture
download
raw
9.33 kB
import Mathlib
namespace OAI
noncomputable section
open MeasureTheory Filter Set
open scoped Topology
namespace Problem367
theorem hasDerivAt_integral_sqrt_observation
{Ω : Type*} [MeasurableSpace Ω] {P : Measure Ω} [IsFiniteMeasure P]
{S G : Ω → ℝ} (hS : Integrable S P) (hG : Integrable G P)
{f f' : ℝ → ℝ} (hf : ∀ x, HasDerivAt f (f' x) x) (hf'm : Measurable f')
{C M : ℝ} (hfbound : ∀ x, |f x| ≤ C) (hM : 0 ≤ M)
(hf'bound : ∀ x, |f' x| ≤ M) {t : ℝ} (ht : 0 < t) :
Integrable (fun ω => f' (t * S ω + Real.sqrt t * G ω) *
(S ω + G ω / (2 * Real.sqrt t))) P ∧
HasDerivAt (fun r : ℝ => ∫ ω, f (r * S ω + Real.sqrt r * G ω) ∂P)
(∫ ω, f' (t * S ω + Real.sqrt t * G ω) *
(S ω + G ω / (2 * Real.sqrt t)) ∂P) t := by
have hfcont : Continuous f := continuous_iff_continuousAt.mpr
(fun x => (hf x).continuousAt)
let F : ℝ → Ω → ℝ := fun r ω => f (r * S ω + Real.sqrt r * G ω)
let F' : ℝ → Ω → ℝ := fun r ω => f' (r * S ω + Real.sqrt r * G ω) *
(S ω + G ω / (2 * Real.sqrt r))
let a : ℝ := 1 / (2 * Real.sqrt (t / 2))
have ha : 0 ≤ a := by dsimp [a]; positivity
have hFm (r : ℝ) : AEStronglyMeasurable (F r) P :=
hfcont.comp_aestronglyMeasurable
((hS.aestronglyMeasurable.const_mul r).add
(hG.aestronglyMeasurable.const_mul (Real.sqrt r)))
have hFint : Integrable (F t) P := by
apply (integrable_const C).mono' (hFm t)
exact Eventually.of_forall fun ω => by
simpa only [Real.norm_eq_abs] using (hfbound (t * S ω + Real.sqrt t * G ω))
have hF'm (r : ℝ) : AEStronglyMeasurable (F' r) P := by
apply AEStronglyMeasurable.mul
· exact (hf'm.comp_aemeasurable
((hS.aemeasurable.const_mul r).add
(hG.aemeasurable.const_mul (Real.sqrt r)))).aestronglyMeasurable
· simpa only [div_eq_mul_inv, Pi.add_def] using hS.aestronglyMeasurable.add
(hG.aestronglyMeasurable.mul_const (2 * Real.sqrt r)⁻¹)
have hdom : Integrable (fun ω => M * (|S ω| + a * |G ω|)) P :=
(hS.abs.add (hG.abs.const_mul a)).const_mul M
have hbound : ∀ᵐ ω ∂P, ∀ r ∈ Ioi (t / 2),
‖F' r ω‖ ≤ M * (|S ω| + a * |G ω|) := by
filter_upwards [] with ω
intro r hr
have hrpos : 0 < r := lt_trans (by linarith) hr
have hden : 0 < 2 * Real.sqrt (t / 2) := by positivity
have hrecip : 1 / (2 * Real.sqrt r) ≤ a := by
apply one_div_le_one_div_of_le hden
exact mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt hr.le) (by norm_num)
have hinner : |S ω + G ω / (2 * Real.sqrt r)| ≤ |S ω| + a * |G ω| := by
calc
_ ≤ |S ω| + |G ω / (2 * Real.sqrt r)| := abs_add_le _ _
_ = |S ω| + (1 / (2 * Real.sqrt r)) * |G ω| := by
rw [abs_div, abs_of_nonneg (by positivity : 0 ≤ 2 * Real.sqrt r)]
ring
_ ≤ |S ω| + a * |G ω| := by gcongr
dsimp [F']
rw [abs_mul]
exact mul_le_mul (hf'bound _) hinner (abs_nonneg _) hM
have hdiff : ∀ᵐ ω ∂P, ∀ r ∈ Ioi (t / 2), HasDerivAt (fun q => F q ω) (F' r ω) r := by
filter_upwards [] with ω
intro r hr
have hrpos : 0 < r := lt_trans (by linarith) hr
have harg := ((hasDerivAt_id r).mul_const (S ω)).add
((Real.hasDerivAt_sqrt hrpos.ne').mul_const (G ω))
have harg' : HasDerivAt (fun q : ℝ => q * S ω + Real.sqrt q * G ω)
(S ω + G ω / (2 * Real.sqrt r)) r := by
simpa only [Pi.add_def, id_eq, one_mul, mul_one, one_div, div_eq_mul_inv, mul_comm] using harg
exact (hf (r * S ω + Real.sqrt r * G ω)).comp r harg'
exact hasDerivAt_integral_of_dominated_loc_of_deriv_le
(Ioi_mem_nhds (by linarith : t / 2 < t))
(Eventually.of_forall hFm) hFint (hF'm t) hbound hdom hdiff
theorem hasDerivAt_integral_sqrt_observation_vector
{Ω E : Type*} [MeasurableSpace Ω] [NormedAddCommGroup E] [NormedSpace ℝ E]
{P : Measure Ω} [IsFiniteMeasure P]
{S G : Ω → E} (hS : Integrable S P) (hG : Integrable G P)
{f : E → ℝ} {f' : E → E →L[ℝ] ℝ}
(hf : ∀ x, HasFDerivAt f (f' x) x) (hf'cont : Continuous f')
{C M : ℝ} (hfbound : ∀ x, |f x| ≤ C) (hM : 0 ≤ M)
(hf'bound : ∀ x, ‖f' x‖ ≤ M) {t : ℝ} (ht : 0 < t) :
Integrable (fun ω => f' (t • S ω + Real.sqrt t • G ω)
(S ω + (1 / (2 * Real.sqrt t)) • G ω)) P ∧
HasDerivAt (fun r : ℝ => ∫ ω, f (r • S ω + Real.sqrt r • G ω) ∂P)
(∫ ω, f' (t • S ω + Real.sqrt t • G ω)
(S ω + (1 / (2 * Real.sqrt t)) • G ω) ∂P) t := by
have hfcont : Continuous f := continuous_iff_continuousAt.mpr
(fun x => (hf x).continuousAt)
let F : ℝ → Ω → ℝ := fun r ω => f (r • S ω + Real.sqrt r • G ω)
let F' : ℝ → Ω → ℝ := fun r ω => f' (r • S ω + Real.sqrt r • G ω)
(S ω + (1 / (2 * Real.sqrt r)) • G ω)
let a : ℝ := 1 / (2 * Real.sqrt (t / 2))
have ha : 0 ≤ a := by dsimp [a]; positivity
have hargm (r : ℝ) : AEStronglyMeasurable
(fun ω => r • S ω + Real.sqrt r • G ω) P :=
(hS.aestronglyMeasurable.const_smul r).add
(hG.aestronglyMeasurable.const_smul (Real.sqrt r))
have hFm (r : ℝ) : AEStronglyMeasurable (F r) P :=
hfcont.comp_aestronglyMeasurable (hargm r)
have hFint : Integrable (F t) P := by
apply (integrable_const C).mono' (hFm t)
exact Eventually.of_forall fun ω => by
simpa only [Real.norm_eq_abs] using (hfbound (t • S ω + Real.sqrt t • G ω))
have hF'm (r : ℝ) : AEStronglyMeasurable (F' r) P :=
(isBoundedBilinearMap_apply (𝕜 := ℝ) (E := E) (F := ℝ)).continuous
|>.comp_aestronglyMeasurable
((hf'cont.comp_aestronglyMeasurable (hargm r)).prodMk
(hS.aestronglyMeasurable.add
(hG.aestronglyMeasurable.const_smul (1 / (2 * Real.sqrt r)))))
have hdom : Integrable (fun ω => M * (‖S ω‖ + a * ‖G ω‖)) P :=
(hS.norm.add (hG.norm.const_mul a)).const_mul M
have hbound : ∀ᵐ ω ∂P, ∀ r ∈ Ioi (t / 2),
‖F' r ω‖ ≤ M * (‖S ω‖ + a * ‖G ω‖) := by
filter_upwards [] with ω
intro r hr
have hrpos : 0 < r := lt_trans (by linarith) hr
have hden : 0 < 2 * Real.sqrt (t / 2) := by positivity
have hrecip : 1 / (2 * Real.sqrt r) ≤ a := by
apply one_div_le_one_div_of_le hden
exact mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt hr.le) (by norm_num)
have hinner : ‖S ω + (1 / (2 * Real.sqrt r)) • G ω‖ ≤
‖S ω‖ + a * ‖G ω‖ := by
calc
_ ≤ ‖S ω‖ + ‖(1 / (2 * Real.sqrt r)) • G ω‖ := norm_add_le _ _
_ = ‖S ω‖ + (1 / (2 * Real.sqrt r)) * ‖G ω‖ := by
rw [norm_smul, Real.norm_eq_abs, abs_of_nonneg (by positivity)]
_ ≤ ‖S ω‖ + a * ‖G ω‖ := by gcongr
exact ((f' (r • S ω + Real.sqrt r • G ω)).le_opNorm _).trans
(mul_le_mul (hf'bound _) hinner (norm_nonneg _) hM)
have hdiff : ∀ᵐ ω ∂P, ∀ r ∈ Ioi (t / 2),
HasDerivAt (fun q => F q ω) (F' r ω) r := by
filter_upwards [] with ω
intro r hr
have hrpos : 0 < r := lt_trans (by linarith) hr
have harg := ((hasDerivAt_id r).smul_const (S ω)).add
((Real.hasDerivAt_sqrt hrpos.ne').smul_const (G ω))
have harg' : HasDerivAt (fun q : ℝ => q • S ω + Real.sqrt q • G ω)
(S ω + (1 / (2 * Real.sqrt r)) • G ω) r := by
simpa only [Pi.add_def, id_eq, one_smul, one_div] using harg
exact (hf (r • S ω + Real.sqrt r • G ω)).comp_hasDerivAt r harg'
exact hasDerivAt_integral_of_dominated_loc_of_deriv_le
(Ioi_mem_nhds (by linarith : t / 2 < t))
(Eventually.of_forall hFm) hFint (hF'm t) hbound hdom hdiff
theorem continuous_integral_sqrt_observation
{Ω E : Type*} [MeasurableSpace Ω] [NormedAddCommGroup E] [NormedSpace ℝ E]
{P : Measure Ω} [IsFiniteMeasure P] {S G : Ω → E}
(hS : AEStronglyMeasurable S P) (hG : AEStronglyMeasurable G P)
{f : E → ℝ} (hf : Continuous f) {C : ℝ} (hbound : ∀ x, |f x| ≤ C) :
Continuous (fun t : ℝ => ∫ ω, f (t • S ω + Real.sqrt t • G ω) ∂P) := by
apply continuous_of_dominated (bound := fun _ => C)
· intro t
exact hf.comp_aestronglyMeasurable
((hS.const_smul t).add (hG.const_smul (Real.sqrt t)))
· intro t
exact Eventually.of_forall fun ω => by
simpa only [Real.norm_eq_abs] using hbound (t • S ω + Real.sqrt t • G ω)
· exact integrable_const C
· exact Eventually.of_forall fun ω => hf.comp
((continuous_id.smul continuous_const).add
(Real.continuous_sqrt.smul continuous_const))
theorem tendsto_integral_sqrt_observation_zero
{Ω E : Type*} [MeasurableSpace Ω] [NormedAddCommGroup E] [NormedSpace ℝ E]
{P : Measure Ω} [IsFiniteMeasure P] {S G : Ω → E}
(hS : AEStronglyMeasurable S P) (hG : AEStronglyMeasurable G P)
{f : E → ℝ} (hf : Continuous f) {C : ℝ} (hbound : ∀ x, |f x| ≤ C) :
Tendsto (fun t : ℝ => ∫ ω, f (t • S ω + Real.sqrt t • G ω) ∂P)
(𝓝 0) (𝓝 (P.real Set.univ * f 0)) := by
simpa only [zero_smul, Real.sqrt_zero, zero_add, integral_const, smul_eq_mul] using
(continuous_integral_sqrt_observation hS hG hf hbound).tendsto 0
end Problem367
end
end OAI

Xet Storage Details

Size:
9.33 kB
·
Xet hash:
9b42daed21dab95db43c4c8118fcdf28a58af25ff0b85f5b7dec0cf6bcdbf3de

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.