Download data/lean/OAI/Probability/FreeIsing/Posterior/CompensatorStopping.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 7.15 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FreeIsing/Posterior/CompensatorStopping.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/FreeIsing/Posterior/CompensatorStopping.lean
-
curl -L -o CompensatorStopping.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FreeIsing/Posterior/CompensatorStopping.lean
7.15 kB
| import OAI.Probability.FreeIsing.Posterior.StoppingTimes | |
| namespace OAI | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped NNReal Topology | |
| namespace Problem367.PosteriorCompensatorStopping | |
| open PosteriorStoppingTimes | |
| def jointExit {Ξ© : Type*} (M A : ββ₯0 β Ξ© β β) (n : β) (Ο : Ξ©) : | |
| WithTop ββ₯0 := | |
| min (posteriorExit M n Ο) (rationalExit A ((n : β) + 1) Ο) | |
| theorem jointExit_le_posteriorExit {Ξ© : Type*} (M A : ββ₯0 β Ξ© β β) | |
| (n : β) (Ο : Ξ©) : jointExit M A n Ο β€ posteriorExit M n Ο := min_le_left _ _ | |
| theorem jointExit_le_cap {Ξ© : Type*} (M A : ββ₯0 β Ξ© β β) (n : β) (Ο : Ξ©) : | |
| jointExit M A n Ο β€ (((n : ββ₯0) + 1) : WithTop ββ₯0) := | |
| (jointExit_le_posteriorExit M A n Ο).trans (posteriorExit_le_cap M n Ο) | |
| theorem jointExit_ne_top {Ξ© : Type*} (M A : ββ₯0 β Ξ© β β) (n : β) (Ο : Ξ©) : | |
| jointExit M A n Ο β β€ := | |
| ne_top_of_le_ne_top (by simp) (jointExit_le_cap M A n Ο) | |
| theorem jointExit_mono {Ξ© : Type*} (M A : ββ₯0 β Ξ© β β) (Ο : Ξ©) : | |
| Monotone (fun n => jointExit M A n Ο) := by | |
| intro n m hnm | |
| exact min_le_min (posteriorExit_mono M Ο hnm) | |
| (rationalExit_mono A Ο (by exact_mod_cast Nat.add_le_add_right hnm 1)) | |
| theorem isStoppingTime_jointExit {Ξ© : Type*} [mΞ© : MeasurableSpace Ξ©] | |
| {F : Filtration ββ₯0 mΞ©} [F.IsRightContinuous] {M A : ββ₯0 β Ξ© β β} | |
| (hM : Adapted F M) (hA : Adapted F A) (n : β) : | |
| IsStoppingTime F (jointExit M A n) := | |
| (isStoppingTime_posteriorExit hM n).min (isStoppingTime_rationalExit hA _) | |
| theorem abs_stoppedProcess_le_of_le_exit {Ξ© : Type*} {X : ββ₯0 β Ξ© β β} | |
| {Ο : Ξ© β WithTop ββ₯0} {Ο : Ξ©} {r : β} | |
| (hc : Continuous (fun t => X t Ο)) (hzero : |X 0 Ο| β€ r) | |
| (hΟ : Ο Ο β€ rationalExit X r Ο) (t : ββ₯0) : | |
| |stoppedProcess X Ο t Ο| β€ r := by | |
| let s : WithTop ββ₯0 := min (t : WithTop ββ₯0) (Ο Ο) | |
| have hsne : s β β€ := ne_top_of_le_ne_top WithTop.coe_ne_top (min_le_left _ _) | |
| obtain β¨u, huβ© := WithTop.ne_top_iff_exists.mp hsne | |
| have huΟ : (u : WithTop ββ₯0) β€ rationalExit X r Ο := by | |
| rw [hu] | |
| exact (min_le_right _ _).trans hΟ | |
| change |X s.untopA Ο| β€ r | |
| rw [β hu] | |
| exact abs_le_of_le_rationalExit hc hzero huΟ | |
| theorem abs_stopped_posterior_le {Ξ© : Type*} {M A : ββ₯0 β Ξ© β β} {Ο : Ξ©} | |
| (hc : Continuous (fun t => M t Ο)) (hzero : M 0 Ο = 0) (n : β) (t : ββ₯0) : | |
| |stoppedProcess M (jointExit M A n) t Ο| β€ threshold n := by | |
| apply abs_stoppedProcess_le_of_le_exit hc | |
| (by simpa only [hzero, abs_zero] using threshold_nonneg n) _ t | |
| exact (jointExit_le_posteriorExit M A n Ο).trans (min_le_left _ _) | |
| theorem abs_stopped_compensator_le {Ξ© : Type*} {M A : ββ₯0 β Ξ© β β} {Ο : Ξ©} | |
| (hc : Continuous (fun t => A t Ο)) (hzero : A 0 Ο = 0) (n : β) (t : ββ₯0) : | |
| |stoppedProcess A (jointExit M A n) t Ο| β€ (n : β) + 1 := by | |
| apply abs_stoppedProcess_le_of_le_exit hc | |
| (by simp only [hzero, abs_zero]; positivity) (min_le_right _ _) t | |
| theorem eventually_le_compensatorExit {Ξ© : Type*} {A : ββ₯0 β Ξ© β β} {Ο : Ξ©} | |
| (hc : Continuous (fun t => A t Ο)) (T : ββ₯0) : | |
| βαΆ n : β in atTop, (T : WithTop ββ₯0) β€ rationalExit A ((n : β) + 1) Ο := by | |
| obtain β¨r, hrβ© := isCompact_Icc.bddAbove_image | |
| (hc.abs.continuousOn : ContinuousOn (fun t => |A t Ο|) (Icc 0 T)) | |
| have hn : βαΆ n : β in atTop, r β€ (n : β) := | |
| tendsto_natCast_atTop_atTop.eventually (eventually_ge_atTop r) | |
| filter_upwards [hn] with n hnr | |
| apply le_rationalExit_of_bound | |
| intro t ht | |
| exact (hr (mem_image_of_mem _ β¨zero_le, htβ©)).trans (by linarith) | |
| theorem eventually_le_jointExit {Ξ© : Type*} {M A : ββ₯0 β Ξ© β β} {Ο : Ξ©} | |
| {T : ββ₯0} (hM : β r < (1 : β), β t β€ T, |M t Ο| β€ r) | |
| (hA : Continuous (fun t => A t Ο)) : | |
| βαΆ n in atTop, (T : WithTop ββ₯0) β€ jointExit M A n Ο := by | |
| filter_upwards [eventually_le_posteriorExit hM, eventually_le_compensatorExit hA T] | |
| with n hn hA | |
| exact le_min hn hA | |
| theorem tendsto_jointExit_top {Ξ© : Type*} {M A : ββ₯0 β Ξ© β β} {Ο : Ξ©} | |
| (hM : β T : ββ₯0, β r < (1 : β), β t β€ T, |M t Ο| β€ r) | |
| (hA : Continuous (fun t => A t Ο)) : | |
| Tendsto (fun n => jointExit M A n Ο) atTop (π β€) := by | |
| apply (WithTop.tendsto_nhds_top_iff _).2 | |
| intro T | |
| filter_upwards [eventually_le_jointExit (hM (T + 1)) hA] with n hn | |
| exact (WithTop.coe_lt_coe.mpr (lt_add_one T)).trans_le hn | |
| theorem isLocalizingSequence_jointExit {Ξ© : Type*} [mΞ© : MeasurableSpace Ξ©] | |
| {ΞΌ : Measure Ξ©} {F : Filtration ββ₯0 mΞ©} [F.IsRightContinuous] | |
| {M A : ββ₯0 β Ξ© β β} (hM : Adapted F M) (hA : Adapted F A) | |
| (hcompact : βα΅ Ο βΞΌ, β T : ββ₯0, β r < (1 : β), β t β€ T, |M t Ο| β€ r) | |
| (hcA : βα΅ Ο βΞΌ, Continuous (fun t => A t Ο)) : | |
| IsLocalizingSequence F (jointExit M A) ΞΌ where | |
| isStoppingTime := isStoppingTime_jointExit hM hA | |
| tendsto_top := by | |
| filter_upwards [hcompact, hcA] with Ο hm ha using tendsto_jointExit_top hm ha | |
| mono := ae_of_all _ (jointExit_mono M A) | |
| theorem isLocalizingSequence_jointExit_rightCont {Ξ© : Type*} [mΞ© : MeasurableSpace Ξ©] | |
| {ΞΌ : Measure Ξ©} {F : Filtration ββ₯0 mΞ©} {M A : ββ₯0 β Ξ© β β} | |
| (hM : Adapted F M) (hA : Adapted F A) | |
| (hcompact : βα΅ Ο βΞΌ, β T : ββ₯0, β r < (1 : β), β t β€ T, |M t Ο| β€ r) | |
| (hcA : βα΅ Ο βΞΌ, Continuous (fun t => A t Ο)) : | |
| IsLocalizingSequence F.rightCont (jointExit M A) ΞΌ := by | |
| apply isLocalizingSequence_jointExit _ _ hcompact hcA | |
| Β· exact fun t => (hM t).mono (F.le_rightCont t) le_rfl | |
| Β· exact fun t => (hA t).mono (F.le_rightCont t) le_rfl | |
| theorem eventually_stoppedProcess_eq_on {Ξ© E : Type*} {M A : ββ₯0 β Ξ© β β} | |
| (X : ββ₯0 β Ξ© β E) {Ο : Ξ©} {T : ββ₯0} | |
| (hM : β r < (1 : β), β t β€ T, |M t Ο| β€ r) | |
| (hA : Continuous (fun t => A t Ο)) : | |
| βαΆ n in atTop, β t β€ T, stoppedProcess X (jointExit M A n) t Ο = X t Ο := by | |
| filter_upwards [eventually_le_jointExit hM hA] with n hn | |
| intro t ht | |
| exact stoppedProcess_eq_of_le ((WithTop.coe_le_coe.mpr ht).trans hn) | |
| theorem ae_all_eq_of_stopped_eq {Ξ© E : Type*} [MeasurableSpace Ξ©] | |
| {ΞΌ : Measure Ξ©} {M A : ββ₯0 β Ξ© β β} {X Y : ββ₯0 β Ξ© β E} | |
| (hcompact : βα΅ Ο βΞΌ, β T : ββ₯0, β r < (1 : β), β t β€ T, |M t Ο| β€ r) | |
| (hcA : βα΅ Ο βΞΌ, Continuous (fun t => A t Ο)) | |
| (hstop : β n, βα΅ Ο βΞΌ, β t, | |
| stoppedProcess X (jointExit M A n) t Ο = stoppedProcess Y (jointExit M A n) t Ο) : | |
| βα΅ Ο βΞΌ, β t, X t Ο = Y t Ο := by | |
| have hstop' := ae_all_iff.mpr hstop | |
| filter_upwards [hcompact, hcA, hstop'] with Ο hm ha hs | |
| intro t | |
| obtain β¨n, hnβ© := (eventually_le_jointExit (hm t) ha).exists | |
| rw [β stoppedProcess_eq_of_le (u := X) hn, β stoppedProcess_eq_of_le (u := Y) hn] | |
| exact hs n t | |
| end Problem367.PosteriorCompensatorStopping | |
| end | |
| end OAI | |