Download data/lean/OAI/Probability/FreeIsing/Martingales/StoppedDiscrepancyEnergy.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 8.01 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FreeIsing/Martingales/StoppedDiscrepancyEnergy.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/FreeIsing/Martingales/StoppedDiscrepancyEnergy.lean
-
curl -L -o StoppedDiscrepancyEnergy.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FreeIsing/Martingales/StoppedDiscrepancyEnergy.lean
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 | |