math / data /lean /OAI /Probability /FreeIsing /Martingales /StoppedDiscrepancyEnergy.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
8.01 kB
import OAI.Probability.FreeIsing.Energy.DiscrepancyEnergy
namespace OAI
noncomputable section
open MeasureTheory ProbabilityTheory Filter Set
open scoped NNReal Topology
namespace Problem367.DiscrepancyEnergy
variable {Ξ© : Type*} [mΞ© : MeasurableSpace Ξ©] {P : Measure Ξ©}
theorem tendsto_integral_stopped_density [SFinite P]
{Ο„ : β„• β†’ Ξ© β†’ WithTop ℝβ‰₯0} (hΟ„ : βˆ€ n, Measurable (Ο„ n))
{E : ℝ β†’ Ξ© β†’ ℝ} {T : ℝβ‰₯0}
(hE : Integrable (fun p : ℝ Γ— Ξ© => E p.1 p.2)
((volume.restrict (Ioc (0 : ℝ) T)).prod P))
(hexit : βˆ€α΅ Ο‰ βˆ‚P, βˆ€αΆ  n in atTop, (T : WithTop ℝβ‰₯0) ≀ Ο„ n Ο‰) :
Tendsto (fun n => ∫ s in (0 : ℝ)..(T : ℝ),
∫ Ο‰, if (s.toNNReal : WithTop ℝβ‰₯0) ≀ Ο„ n Ο‰ then E s Ο‰ else 0 βˆ‚P)
atTop (𝓝 (∫ s in (0 : ℝ)..(T : ℝ), ∫ Ο‰, E s Ο‰ βˆ‚P)) := by
let Q := (volume.restrict (Ioc (0 : ℝ) (T : ℝ))).prod P
let A n := {p : ℝ Γ— Ξ© | (p.1.toNNReal : WithTop ℝβ‰₯0) ≀ Ο„ n p.2}
have hA (n : β„•) : MeasurableSet (A n) :=
measurableSet_le ((measurable_real_toNNReal.comp measurable_fst).withTop_coe)
((hΟ„ n).comp measurable_snd)
have hEn (n : β„•) : Integrable ((A n).indicator (fun p : ℝ Γ— Ξ© => E p.1 p.2)) Q :=
hE.indicator (hA n)
have hlim : Tendsto (fun n => ∫ p, (A n).indicator (fun p : ℝ Γ— Ξ© => E p.1 p.2) p βˆ‚Q)
atTop (𝓝 (∫ p : ℝ Γ— Ξ©, E p.1 p.2 βˆ‚Q)) := by
apply tendsto_integral_of_dominated_convergence (fun p : ℝ Γ— Ξ© => β€–E p.1 p.2β€–)
(fun n => (hEn n).aestronglyMeasurable) hE.norm
Β· intro n
apply Eventually.of_forall
intro p
by_cases hp : p ∈ A n <;> simp [hp]
Β· have hm : βˆ€α΅ p βˆ‚Q, p.1 ∈ Ioc (0 : ℝ) (T : ℝ) :=
Measure.quasiMeasurePreserving_fst.ae (ae_restrict_mem measurableSet_Ioc)
have he : βˆ€α΅ p βˆ‚Q, βˆ€αΆ  n in atTop, (T : WithTop ℝβ‰₯0) ≀ Ο„ n p.2 :=
Measure.quasiMeasurePreserving_snd.ae hexit
filter_upwards [hm, he] with p hp he
have hpT : p.1.toNNReal ≀ T := by
simpa only [Real.toNNReal_coe] using Real.toNNReal_mono hp.2
apply tendsto_const_nhds.congr'
filter_upwards [he] with n hn
exact (Set.indicator_of_mem (show p ∈ A n from
(WithTop.coe_le_coe.mpr hpT).trans hn) (fun p : ℝ Γ— Ξ© => E p.1 p.2)).symm
have heq (n : β„•) : (∫ p, (A n).indicator (fun p : ℝ Γ— Ξ© => E p.1 p.2) p βˆ‚Q) =
∫ s in (0 : ℝ)..(T : ℝ),
∫ Ο‰, if (s.toNNReal : WithTop ℝβ‰₯0) ≀ Ο„ n Ο‰ then E s Ο‰ else 0 βˆ‚P := by
rw [integral_prod _ (hEn n), intervalIntegral.integral_of_le T.coe_nonneg]
simp only [Set.indicator, A, mem_ofPred_eq]
have heq' : (∫ p : ℝ Γ— Ξ©, E p.1 p.2 βˆ‚Q) =
∫ s in (0 : ℝ)..(T : ℝ), ∫ Ο‰, E s Ο‰ βˆ‚P := by
rw [integral_prod _ hE, intervalIntegral.integral_of_le T.coe_nonneg]
simpa only [heq, heq'] using hlim
theorem tendsto_integral_stopped_square [IsFiniteMeasure P]
{F : Filtration ℝβ‰₯0 mΞ©} {X : ℝβ‰₯0 β†’ Ξ© β†’ ℝ}
(hX : IsStronglyProgressive F X)
{Ο„ : β„• β†’ Ξ© β†’ WithTop ℝβ‰₯0} (hΟ„ : βˆ€ n, IsStoppingTime F (Ο„ n))
{T t : ℝβ‰₯0} (ht : t ≀ T) {C : ℝ}
(hb : βˆ€α΅ Ο‰ βˆ‚P, βˆ€ s ≀ T, |X s Ο‰| ≀ C)
(hexit : βˆ€α΅ Ο‰ βˆ‚P, βˆ€αΆ  n in atTop, (T : WithTop ℝβ‰₯0) ≀ Ο„ n Ο‰) :
Tendsto (fun n => ∫ Ο‰, (stoppedProcess X (Ο„ n) t Ο‰) ^ 2 βˆ‚P)
atTop (𝓝 (∫ Ο‰, (X t Ο‰) ^ 2 βˆ‚P)) := by
apply tendsto_integral_of_dominated_convergence (fun _ : Ξ© => C ^ 2)
Β· intro n
have hm : AEStronglyMeasurable (stoppedProcess X (Ο„ n) t) P :=
(((hX.stoppedProcess (hΟ„ n)).stronglyAdapted t).mono (F.le t)).aestronglyMeasurable
exact hm.pow 2
Β· exact integrable_const _
Β· intro n
filter_upwards [hb] with ω hω
have hs : |stoppedProcess X (Ο„ n) t Ο‰| ≀ C := by
exact hΟ‰ _ ((WithTop.untopA_le (min_le_left (t : WithTop ℝβ‰₯0) (Ο„ n Ο‰))).trans ht)
rw [Real.norm_of_nonneg (sq_nonneg _)]
simpa only [sq_abs] using pow_le_pow_leftβ‚€ (abs_nonneg _) hs 2
· filter_upwards [hexit] with ω hω
apply tendsto_const_nhds.congr'
filter_upwards [hω] with n hn
rw [stoppedProcess_eq_of_le ((WithTop.coe_le_coe.mpr ht).trans hn)]
theorem secondMoment_integral_representation_of_stopped [IsFiniteMeasure P]
{F : Filtration ℝβ‰₯0 mΞ©} {X : ℝβ‰₯0 β†’ Ξ© β†’ ℝ}
(hX : IsStronglyProgressive F X)
{Ο„ : β„• β†’ Ξ© β†’ WithTop ℝβ‰₯0} (hΟ„ : βˆ€ n, IsStoppingTime F (Ο„ n))
{T : ℝβ‰₯0} {C : ℝ}
(hb : βˆ€α΅ Ο‰ βˆ‚P, βˆ€ s ≀ T, |X s Ο‰| ≀ C)
(hexit : βˆ€α΅ Ο‰ βˆ‚P, βˆ€αΆ  n in atTop, (T : WithTop ℝβ‰₯0) ≀ Ο„ n Ο‰)
{E : ℝ β†’ Ξ© β†’ ℝ}
(hE : Integrable (fun p : ℝ Γ— Ξ© => E p.1 p.2)
((volume.restrict (Ioc (0 : ℝ) T)).prod P))
(hlocal : βˆ€ n, βˆ€ t ≀ T,
(∫ Ο‰, (stoppedProcess X (Ο„ n) t Ο‰) ^ 2 βˆ‚P) =
(∫ Ο‰, (X 0 Ο‰) ^ 2 βˆ‚P) + ∫ s in (0 : ℝ)..(t : ℝ),
∫ Ο‰, if (s.toNNReal : WithTop ℝβ‰₯0) ≀ Ο„ n Ο‰ then E s Ο‰ else 0 βˆ‚P) :
βˆ€ t ≀ T, (∫ Ο‰, (X t Ο‰) ^ 2 βˆ‚P) =
(∫ Ο‰, (X 0 Ο‰) ^ 2 βˆ‚P) + ∫ s in (0 : ℝ)..(t : ℝ), ∫ Ο‰, E s Ο‰ βˆ‚P := by
intro t ht
have hEt : Integrable (fun p : ℝ Γ— Ξ© => E p.1 p.2)
((volume.restrict (Ioc (0 : ℝ) (t : ℝ))).prod P) :=
hE.mono_measure (Measure.prod_mono
(Measure.restrict_mono_set _ (Ioc_subset_Ioc_right (show (t : ℝ) ≀ T from ht))) le_rfl)
have hxt : βˆ€α΅ Ο‰ βˆ‚P, βˆ€αΆ  n in atTop, (t : WithTop ℝβ‰₯0) ≀ Ο„ n Ο‰ := by
filter_upwards [hexit] with ω hω
filter_upwards [hω] with n hn
exact (WithTop.coe_le_coe.mpr ht).trans hn
have hl := tendsto_integral_stopped_square hX hΟ„ ht hb hexit
have hr := (tendsto_integral_stopped_density (fun n => (hΟ„ n).measurable') hEt hxt).const_add
(∫ Ο‰, (X 0 Ο‰) ^ 2 βˆ‚P)
have heq : (fun n => ∫ Ο‰, (stoppedProcess X (Ο„ n) t Ο‰) ^ 2 βˆ‚P) =
(fun n => (∫ Ο‰, (X 0 Ο‰) ^ 2 βˆ‚P) + ∫ s in (0 : ℝ)..(t : ℝ),
∫ Ο‰, if (s.toNNReal : WithTop ℝβ‰₯0) ≀ Ο„ n Ο‰ then E s Ο‰ else 0 βˆ‚P) :=
funext (fun n => hlocal n t ht)
rw [heq] at hl
exact tendsto_nhds_unique hl hr
theorem secondMoment_analysis_of_stopped [IsFiniteMeasure P]
{F : Filtration ℝβ‰₯0 mΞ©} {X : ℝβ‰₯0 β†’ Ξ© β†’ ℝ}
(hX : IsStronglyProgressive F X)
{Ο„ : β„• β†’ Ξ© β†’ WithTop ℝβ‰₯0} (hΟ„ : βˆ€ n, IsStoppingTime F (Ο„ n))
{T : ℝβ‰₯0} {C : ℝ}
(hb : βˆ€α΅ Ο‰ βˆ‚P, βˆ€ s ≀ T, |X s Ο‰| ≀ C)
(hexit : βˆ€α΅ Ο‰ βˆ‚P, βˆ€αΆ  n in atTop, (T : WithTop ℝβ‰₯0) ≀ Ο„ n Ο‰)
{E : ℝ β†’ Ξ© β†’ ℝ}
(hE : Integrable (fun p : ℝ Γ— Ξ© => E p.1 p.2)
((volume.restrict (Ioc (0 : ℝ) T)).prod P))
(hlocal : βˆ€ n, βˆ€ t ≀ T,
(∫ Ο‰, (stoppedProcess X (Ο„ n) t Ο‰) ^ 2 βˆ‚P) =
(∫ Ο‰, (X 0 Ο‰) ^ 2 βˆ‚P) + ∫ s in (0 : ℝ)..(t : ℝ),
∫ Ο‰, if (s.toNNReal : WithTop ℝβ‰₯0) ≀ Ο„ n Ο‰ then E s Ο‰ else 0 βˆ‚P) :
AbsolutelyContinuousOnInterval (fun t : ℝ => ∫ Ο‰, (X t.toNNReal Ο‰) ^ 2 βˆ‚P) 0 T ∧
(βˆ€α΅ t βˆ‚volume.restrict (Icc (0 : ℝ) T),
deriv (fun s : ℝ => ∫ Ο‰, (X s.toNNReal Ο‰) ^ 2 βˆ‚P) t = ∫ Ο‰, E t Ο‰ βˆ‚P) := by
have hrep : βˆ€ t ∈ Icc (0 : ℝ) (T : ℝ),
(∫ Ο‰, (X t.toNNReal Ο‰) ^ 2 βˆ‚P) =
(∫ Ο‰, (X 0 Ο‰) ^ 2 βˆ‚P) + ∫ s in (0 : ℝ)..t, ∫ Ο‰, E s Ο‰ βˆ‚P := by
intro t ht
have htT : t.toNNReal ≀ T := by
simpa only [Real.toNNReal_coe] using Real.toNNReal_mono ht.2
simpa only [Real.coe_toNNReal t ht.1] using
secondMoment_integral_representation_of_stopped hX hΟ„ hb hexit hE hlocal t.toNNReal htT
refine ⟨?_, ae_deriv_of_integral_representation T.coe_nonneg
(intervalIntegrable_mean T.coe_nonneg hE) hrep⟩
apply absolutelyContinuousOnInterval_of_integral_representation
(intervalIntegrable_mean T.coe_nonneg hE)
simpa only [uIcc_of_le T.coe_nonneg] using hrep
end Problem367.DiscrepancyEnergy
end
end OAI