Download data/lean/OAI/Probability/SKFluctuations/ClockRetainedSamples.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 37.4 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/SKFluctuations/ClockRetainedSamples.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/SKFluctuations/ClockRetainedSamples.lean
-
curl -L -o ClockRetainedSamples.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/SKFluctuations/ClockRetainedSamples.lean
37.4 kB
| import Mathlib | |
| import OAI.Probability.SKFluctuations.ClockSplitSteps | |
| namespace OAI | |
| /-! Clock Retained Samples. -/ | |
| noncomputable section | |
| namespace SKFluctuations.Hierarchy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal BigOperators | |
| variable {S ΞΉ : Type*} [Fintype S] [Nonempty S] [Fintype ΞΉ] [Nonempty ΞΉ] | |
| attribute [local instance] Classical.propDecidable | |
| def retainedBefore (u : PositiveMass) (as : List PositiveMass) : List PositiveMass := | |
| (splitMassPartition u as).1 | |
| def retainedAfter (u : PositiveMass) (as : List PositiveMass) : List PositiveMass := | |
| (splitMassPartition u as).2++[β¨1,by norm_numβ©] | |
| theorem retainedBefore_end (u : PositiveMass) (as : List PositiveMass) : | |
| partitionEnd 0 (retainedBefore u as)=u.val := splitMassPartition_end _ _ _ | |
| theorem retainedAfter_end (u : PositiveMass) (as : List PositiveMass) : | |
| partitionEnd u.val (retainedAfter u as)=1 := by | |
| rw [retainedAfter,partitionEnd_append] | |
| rfl | |
| theorem retainedBefore_bounds (u : PositiveMass) (as : List PositiveMass) : | |
| β a β retainedBefore u as, a.valβ€u.val := splitMassPartition_bounds _ _ | |
| theorem retainedMasses_ordered (u : PositiveMass) (hu : u.valβ€1) | |
| (as : List PositiveMass) (ha : MassOrdered 0 as) : | |
| MassOrdered 0 (retainedBefore u as) β§ MassOrdered u.val (retainedAfter u as) := by | |
| have ho := splitMassPartition_ordered u hu as ha u.property.le | |
| exact β¨ho.1,ho.2.append_end β¨ho.2.end_bounds.1,ho.2.end_bounds.2,by norm_num,by norm_numβ©β© | |
| theorem retainedMasses_mesh (u : PositiveMass) (hu : u.valβ€1) | |
| (as : List PositiveMass) (ha : MassOrdered 0 as) {h : β} (hh : 0β€h) | |
| (hm : PartitionMesh h 0 as) : | |
| PartitionMesh h 0 (retainedBefore u as++retainedAfter u as) := by | |
| simpa only [retainedBefore,retainedAfter,List.append_assoc] using | |
| (splitMassPartition_mesh u hu as ha u.property.le hm).append_one hh | |
| def retainedPairSample (w : S β β) (Ο : S β (ΞΉ β β) βL[β] β) | |
| (q : β β ΞΉ β ββ₯0) (u : PositiveMass) (as : List PositiveMass) | |
| (P : S β S β β) (x : ΞΉ β β) : β := | |
| sampledPairDisorder w Ο q u.val (retainedBefore u as) (retainedAfter u as) P x | |
| theorem retainedPairSample_comparison {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (D : ΞΉ β β) (hD : β i, 0β€D i) | |
| (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (q : β β ΞΉ β ββ₯0) (hq : β i, MonotoneOn (fun u => q u i) (Icc (0:β) 1)) | |
| (u : PositiveMass) (hu : u.valβ€1) (as bs : List PositiveMass) | |
| (ha : MassOrdered 0 as) (hb : MassOrdered 0 bs) | |
| {h k : β} (hh : 0β€h) (hk : 0β€k) (hmesh : PartitionMesh h 0 as) (kmesh : PartitionMesh k 0 bs) | |
| (P : S β S β β) {K : β} (hK : 0β€K) (hP : β Ο Ο, |P Ο Ο|β€K) (x : ΞΉ β β) : | |
| |retainedPairSample w Ο q u as P x-retainedPairSample w Ο q u bs P x| β€ | |
| ClockTree.errorJetVariation 2 0 0*K*(2*(h+k)*clockVariationBound D q) := by | |
| have hβ := retainedMasses_ordered u hu as ha | |
| have hβ := retainedMasses_ordered u hu bs hb | |
| exact sampledPairDisorder_mesh_comparison hw Ο D hD hΟ q hq u.property.le | |
| _ _ _ _ hβ.1 hβ.2 hβ.1 hβ.2 (retainedBefore_bounds u as) (retainedBefore_bounds u bs) | |
| (retainedBefore_end u as) (retainedBefore_end u bs) | |
| (retainedAfter_end u as) (retainedAfter_end u bs) | |
| (retainedMasses_mesh u hu as ha hh hmesh) (retainedMasses_mesh u hu bs hb hk kmesh) P hK hP x | |
| theorem retainedPairSample_cauchy {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (D : ΞΉ β β) (hD : β i, 0β€D i) | |
| (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (q : β β ΞΉ β ββ₯0) (hq : β i, MonotoneOn (fun u => q u i) (Icc (0:β) 1)) | |
| (u : PositiveMass) (hu : u.valβ€1) (P : S β S β β) | |
| {K : β} (hK : 0β€K) (hP : β Ο Ο, |P Ο Ο|β€K) (x : ΞΉ β β) : | |
| CauchySeq (fun k => retainedPairSample w Ο q u (uniformMasses k) P x) := by | |
| apply Metric.cauchySeq_iff.mpr | |
| intro Ξ΅ hΞ΅ | |
| let C := ClockTree.errorJetVariation 2 0 0*K*(2*clockVariationBound D q) | |
| have ht : Tendsto (fun n : β => ((n+1:β):β)β»ΒΉ*C) atTop (π 0) := by | |
| simpa using uniformMasses_mesh_tendsto.mul_const C | |
| obtain β¨N,hNβ© := eventually_atTop.mp (ht.eventually (gt_mem_nhds (half_pos hΞ΅))) | |
| refine β¨N,fun n hn m hm => ?_β© | |
| rw [Real.dist_eq] | |
| have hb := retainedPairSample_comparison hw Ο D hD hΟ q hq u hu | |
| (uniformMasses n) (uniformMasses m) (uniformMasses_ordered n) (uniformMasses_ordered m) | |
| (by positivity) (by positivity) (uniformMasses_mesh n) (uniformMasses_mesh m) P hK hP x | |
| apply hb.trans_lt | |
| have he : ClockTree.errorJetVariation 2 0 0*K* | |
| (2*(((n+1:β):β)β»ΒΉ+((m+1:β):β)β»ΒΉ)*clockVariationBound D q)= | |
| ((n+1:β):β)β»ΒΉ*C+((m+1:β):β)β»ΒΉ*C := by dsimp [C]; ring | |
| rw [he] | |
| linarith [hN n hn,hN m hm] | |
| def pathPairDisorder (w : S β β) (Ο : S β (ΞΉ β β) βL[β] β) | |
| (q : β β ΞΉ β ββ₯0) (u : PositiveMass) (P : S β S β β) (x : ΞΉ β β) : β := | |
| limUnder atTop (fun k => retainedPairSample w Ο q u (uniformMasses k) P x) | |
| theorem retainedPairSample_tendsto {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (D : ΞΉ β β) (hD : β i, 0β€D i) | |
| (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (q : β β ΞΉ β ββ₯0) (hq : β i, MonotoneOn (fun u => q u i) (Icc (0:β) 1)) | |
| (u : PositiveMass) (hu : u.valβ€1) (P : S β S β β) | |
| {K : β} (hK : 0β€K) (hP : β Ο Ο, |P Ο Ο|β€K) (x : ΞΉ β β) : | |
| Tendsto (fun k => retainedPairSample w Ο q u (uniformMasses k) P x) atTop | |
| (π (pathPairDisorder w Ο q u P x)) := | |
| (retainedPairSample_cauchy hw Ο D hD hΟ q hq u hu P hK hP x).tendsto_limUnder | |
| end SKFluctuations.Hierarchy | |
| namespace SKFluctuations.Hierarchy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal BigOperators | |
| variable {ΞΉ S : Type*} [Fintype ΞΉ] [Fintype S] | |
| theorem partitionSample_cross_error {q r : β β β} | |
| (hq : MonotoneOn q (Icc (0:β) 1)) (hr : MonotoneOn r (Icc (0:β) 1)) | |
| (as bs : List PositiveMass) (ha : MassOrdered 0 as) (hb : MassOrdered 0 bs) | |
| {h k : β} (hm : PartitionMesh h 0 as) (hk : PartitionMesh k 0 bs) : | |
| (β« u in (0:β)..1, |partitionSample q 0 as u-partitionSample r 0 bs u|) β€ | |
| h*(q 1-q 0)+k*(r 1-r 0)+(β« u in (0:β)..1, |q u-r u|) := by | |
| have hiq : IntervalIntegrable q volume 0 1 := | |
| (show MonotoneOn q (uIcc (0:β) 1) by simpa using hq).intervalIntegrable | |
| have hir : IntervalIntegrable r volume 0 1 := | |
| (show MonotoneOn r (uIcc (0:β) 1) by simpa using hr).intervalIntegrable | |
| have hia := partitionSample_intervalIntegrable q 0 as 0 1 | |
| have hib := partitionSample_intervalIntegrable r 0 bs 0 1 | |
| calc | |
| _ β€ β« u in (0:β)..1, (|q u-partitionSample q 0 as u|+ | |
| |r u-partitionSample r 0 bs u|+|q u-r u|) := by | |
| apply intervalIntegral.integral_mono_on (by norm_num) (hia.sub hib).abs | |
| (((hiq.sub hia).abs.add (hir.sub hib).abs).add (hiq.sub hir).abs) | |
| intro u hu | |
| have hβ := abs_sub_le (partitionSample q 0 as u) (q u) (partitionSample r 0 bs u) | |
| have hβ := abs_sub_le (q u) (r u) (partitionSample r 0 bs u) | |
| rw [abs_sub_comm (partitionSample q 0 as u) (q u)] at hβ | |
| linarith | |
| _ = (β« u in (0:β)..1, |q u-partitionSample q 0 as u|)+ | |
| (β« u in (0:β)..1, |r u-partitionSample r 0 bs u|)+ | |
| (β« u in (0:β)..1, |q u-r u|) := by | |
| rw [intervalIntegral.integral_add | |
| ((hiq.sub hia).abs.add (hir.sub hib).abs) (hiq.sub hir).abs, | |
| intervalIntegral.integral_add (hiq.sub hia).abs (hir.sub hib).abs] | |
| _ β€ _ := by linarith [partitionSample_l1_error hq as ha hm, partitionSample_l1_error hr bs hb hk] | |
| def clockL1Distance (D : ΞΉ β β) (q r : β β ΞΉ β ββ₯0) : β := | |
| (1/2:β)*β i, (D i)^2*(β« u in (0:β)..1, |(q u i:β)-(r u i:β)|) | |
| theorem sampledDisorderPressure_cross_comparison [Nonempty S] [Nonempty ΞΉ] [DecidableEq ΞΉ] | |
| {w : S β β} (hw : β Ο, 0 < w Ο) (Ο : S β (ΞΉ β β) βL[β] β) | |
| (C D : ΞΉ β β) (hC : β Ο i, (Ο Ο (Pi.single i 1))^2 = C i) | |
| (hD : β i Ο, |Ο Ο (Pi.single i 1)| β€ D i) | |
| (q r : β β ΞΉ β ββ₯0) | |
| (hq : β i, MonotoneOn (fun u => q u i) (Icc (0:β) 1)) | |
| (hr : β i, MonotoneOn (fun u => r u i) (Icc (0:β) 1)) | |
| (as bs : List PositiveMass) (ha : MassOrdered 0 as) (hb : MassOrdered 0 bs) | |
| {h k : β} (hm : PartitionMesh h 0 as) (hk : PartitionMesh k 0 bs) (x : ΞΉ β β) : | |
| |sampledDisorderPressure w Ο C q as x-sampledDisorderPressure w Ο C r bs x| β€ | |
| h*clockVariationBound D q+k*clockVariationBound D r+clockL1Distance D q r := by | |
| have ht := stepDisorderPressure_l1_comparison hw Ο C D hC hD (q 0) (r 0) | |
| (sampleClockSteps q 0 as) (sampleClockSteps r 0 bs) | |
| (sampleClockSteps_ordered q as ha) (sampleClockSteps_ordered r bs hb) x | |
| simp_rw [sampleClockSteps_function q hq as ha,sampleClockSteps_function r hr bs hb] at ht | |
| apply ht.trans | |
| calc | |
| _ β€ (1/2:β)*β i, (D i)^2*(h*((q 1 i:β)-(q 0 i:β))+ | |
| k*((r 1 i:β)-(r 0 i:β))+(β« u in (0:β)..1, |(q u i:β)-(r u i:β)|)) := by | |
| apply mul_le_mul_of_nonneg_left (Finset.sum_le_sum _) (by norm_num) | |
| intro i _ | |
| apply mul_le_mul_of_nonneg_left _ (sq_nonneg _) | |
| apply partitionSample_cross_error _ _ as bs ha hb hm hk | |
| Β· intro u hu v hv huv | |
| exact_mod_cast (hq i) hu hv huv | |
| Β· intro u hu v hv huv | |
| exact_mod_cast (hr i) hu hv huv | |
| _ = _ := by | |
| unfold clockVariationBound clockL1Distance | |
| simp only [Finset.mul_sum,β Finset.sum_add_distrib] | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| ring | |
| theorem pathDisorderPressure_l1_comparison [Nonempty S] [Nonempty ΞΉ] [DecidableEq ΞΉ] | |
| {w : S β β} (hw : β Ο, 0 < w Ο) (Ο : S β (ΞΉ β β) βL[β] β) | |
| (C D : ΞΉ β β) (hC : β Ο i, (Ο Ο (Pi.single i 1))^2 = C i) | |
| (hD : β i Ο, |Ο Ο (Pi.single i 1)| β€ D i) | |
| (q r : β β ΞΉ β ββ₯0) | |
| (hq : β i, MonotoneOn (fun u => q u i) (Icc (0:β) 1)) | |
| (hr : β i, MonotoneOn (fun u => r u i) (Icc (0:β) 1)) (x : ΞΉ β β) : | |
| |pathDisorderPressure w Ο C q x-pathDisorderPressure w Ο C r x| β€ clockL1Distance D q r := by | |
| have ht := ((sampledDisorderPressure_tendsto hw Ο C D hC hD q hq x).sub | |
| (sampledDisorderPressure_tendsto hw Ο C D hC hD r hr x)).abs | |
| have hu : Tendsto (fun n : β => ((n+1:β):β)β»ΒΉ*clockVariationBound D q+ | |
| ((n+1:β):β)β»ΒΉ*clockVariationBound D r+clockL1Distance D q r) | |
| atTop (π (clockL1Distance D q r)) := by | |
| simpa using ((uniformMasses_mesh_tendsto.mul_const (clockVariationBound D q)).add | |
| (uniformMasses_mesh_tendsto.mul_const (clockVariationBound D r))).add_const (clockL1Distance D q r) | |
| exact le_of_tendsto_of_tendsto ht hu (Eventually.of_forall fun n => | |
| sampledDisorderPressure_cross_comparison hw Ο C D hC hD q r hq hr | |
| (uniformMasses n) (uniformMasses n) (uniformMasses_ordered n) (uniformMasses_ordered n) | |
| (uniformMasses_mesh n) (uniformMasses_mesh n) x) | |
| end SKFluctuations.Hierarchy | |
| namespace SKFluctuations.Hierarchy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal BigOperators | |
| variable {ΞΉ S : Type*} [Fintype ΞΉ] [Fintype S] | |
| omit [Fintype ΞΉ] in | |
| theorem stepClockFunction_intervalIntegrable (qβ : ΞΉ β β) {L : List (GaussianStep ΞΉ)} | |
| {a : β} (ho : OrderedSteps a L) (i : ΞΉ) (c d : β) : | |
| IntervalIntegrable (fun u => stepClockFunction qβ L u i) volume c d := by | |
| simp_rw [stepClockFunction_eq qβ ho] | |
| exact massStepFunction_intervalIntegrable _ _ _ _ | |
| theorem partitionSample_compare_integral {f q : β β β} | |
| (hf : IntervalIntegrable f volume 0 1) (hq : MonotoneOn q (Icc (0:β) 1)) | |
| (as : List PositiveMass) (ha : MassOrdered 0 as) {h : β} (hm : PartitionMesh h 0 as) : | |
| (β« u in (0:β)..1, |f u-partitionSample q 0 as u|) β€ | |
| (β« u in (0:β)..1, |f u-q u|)+h*(q 1-q 0) := by | |
| have hiq : IntervalIntegrable q volume 0 1 := | |
| (show MonotoneOn q (uIcc (0:β) 1) by simpa using hq).intervalIntegrable | |
| have hia := partitionSample_intervalIntegrable q 0 as 0 1 | |
| calc | |
| _ β€ β« u in (0:β)..1, (|f u-q u|+|q u-partitionSample q 0 as u|) := | |
| intervalIntegral.integral_mono_on (by norm_num) (hf.sub hia).abs | |
| ((hf.sub hiq).abs.add (hiq.sub hia).abs) (fun u _ => abs_sub_le _ _ _) | |
| _ = (β« u in (0:β)..1, |f u-q u|)+(β« u in (0:β)..1, |q u-partitionSample q 0 as u|) := | |
| intervalIntegral.integral_add (hf.sub hiq).abs (hiq.sub hia).abs | |
| _ β€ _ := by linarith [partitionSample_l1_error hq as ha hm] | |
| def stepPathClockDistance (D : ΞΉ β β) (qβ : ΞΉ β ββ₯0) (L : List (GaussianStep ΞΉ)) | |
| (q : β β ΞΉ β ββ₯0) : β := | |
| (1/2:β)*β i, (D i)^2*(β« u in (0:β)..1, |stepClockFunction (fun i => (qβ i:β)) L u i-(q u i:β)|) | |
| theorem stepDisorderPressure_path_comparison [Nonempty S] [Nonempty ΞΉ] [DecidableEq ΞΉ] | |
| {w : S β β} (hw : β Ο, 0 < w Ο) (Ο : S β (ΞΉ β β) βL[β] β) | |
| (C D : ΞΉ β β) (hC : β Ο i, (Ο Ο (Pi.single i 1))^2 = C i) | |
| (hD : β i Ο, |Ο Ο (Pi.single i 1)| β€ D i) | |
| (qβ : ΞΉ β ββ₯0) (L : List (GaussianStep ΞΉ)) (ho : OrderedSteps 0 L) | |
| (q : β β ΞΉ β ββ₯0) (hq : β i, MonotoneOn (fun u => q u i) (Icc (0:β) 1)) | |
| (x : ΞΉ β β) : | |
| |stepDisorderPressure w Ο C qβ L x-pathDisorderPressure w Ο C q x| β€ | |
| stepPathClockDistance D qβ L q := by | |
| have hb (n : β) : |stepDisorderPressure w Ο C qβ L x- | |
| sampledDisorderPressure w Ο C q (uniformMasses n) x| β€ | |
| stepPathClockDistance D qβ L q+((n+1:β):β)β»ΒΉ*clockVariationBound D q := by | |
| have ht := stepDisorderPressure_l1_comparison hw Ο C D hC hD qβ (q 0) L | |
| (sampleClockSteps q 0 (uniformMasses n)) ho | |
| (sampleClockSteps_ordered q _ (uniformMasses_ordered n)) x | |
| simp_rw [sampleClockSteps_function q hq _ (uniformMasses_ordered n)] at ht | |
| apply ht.trans | |
| calc | |
| _ β€ (1/2:β)*β i, (D i)^2*((β« u in (0:β)..1, | |
| |stepClockFunction (fun i => (qβ i:β)) L u i-(q u i:β)|)+ | |
| ((n+1:β):β)β»ΒΉ*((q 1 i:β)-(q 0 i:β))) := by | |
| apply mul_le_mul_of_nonneg_left (Finset.sum_le_sum _) (by norm_num) | |
| intro i _ | |
| apply mul_le_mul_of_nonneg_left _ (sq_nonneg _) | |
| apply partitionSample_compare_integral | |
| (stepClockFunction_intervalIntegrable _ ho i 0 1) _ _ (uniformMasses_ordered n) (uniformMasses_mesh n) | |
| intro u hu v hv huv | |
| exact_mod_cast (hq i) hu hv huv | |
| _ = _ := by | |
| unfold stepPathClockDistance clockVariationBound | |
| simp only [Finset.mul_sum,β Finset.sum_add_distrib] | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| ring | |
| have hl := ((tendsto_const_nhds (x := stepDisorderPressure w Ο C qβ L x)).sub | |
| (sampledDisorderPressure_tendsto hw Ο C D hC hD q hq x)).abs | |
| have hr : Tendsto (fun n : β => stepPathClockDistance D qβ L q+ | |
| ((n+1:β):β)β»ΒΉ*clockVariationBound D q) atTop (π (stepPathClockDistance D qβ L q)) := by | |
| simpa using tendsto_const_nhds.add (uniformMasses_mesh_tendsto.mul_const (clockVariationBound D q)) | |
| exact le_of_tendsto_of_tendsto hl hr (Eventually.of_forall hb) | |
| theorem stepDisorderPressure_tendsto_path [Nonempty S] [Nonempty ΞΉ] [DecidableEq ΞΉ] | |
| {w : S β β} (hw : β Ο, 0 < w Ο) (Ο : S β (ΞΉ β β) βL[β] β) | |
| (C D : ΞΉ β β) (hC : β Ο i, (Ο Ο (Pi.single i 1))^2 = C i) | |
| (hD : β i Ο, |Ο Ο (Pi.single i 1)| β€ D i) | |
| (qβ : β β ΞΉ β ββ₯0) (L : β β List (GaussianStep ΞΉ)) (ho : β n, OrderedSteps 0 (L n)) | |
| (q : β β ΞΉ β ββ₯0) (hq : β i, MonotoneOn (fun u => q u i) (Icc (0:β) 1)) | |
| (hL : Tendsto (fun n => stepPathClockDistance D (qβ n) (L n) q) atTop (π 0)) (x : ΞΉ β β) : | |
| Tendsto (fun n => stepDisorderPressure w Ο C (qβ n) (L n) x) atTop | |
| (π (pathDisorderPressure w Ο C q x)) := by | |
| rw [tendsto_iff_norm_sub_tendsto_zero] | |
| simp only [Real.norm_eq_abs] | |
| exact squeeze_zero (fun _ => abs_nonneg _) (fun n => | |
| stepDisorderPressure_path_comparison hw Ο C D hC hD (qβ n) (L n) (ho n) q hq x) hL | |
| end SKFluctuations.Hierarchy | |
| namespace SKFluctuations.Hierarchy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal BigOperators | |
| variable {ΞΉ : Type*} [Fintype ΞΉ] | |
| theorem clockCoordinateDistance_integral (D : ΞΉ β β) (f g : β β ΞΉ β β) | |
| (hf : β i, IntervalIntegrable (fun u => f u i) volume 0 1) | |
| (hg : β i, IntervalIntegrable (fun u => g u i) volume 0 1) : | |
| (β« u in (0:β)..1, clockCoordinateDistance D (f u) (g u))= | |
| β i, (β« u in (0:β)..1, |f u i-g u i|)*(D i)^2 := by | |
| unfold clockCoordinateDistance | |
| rw [intervalIntegral.integral_finsetSum] | |
| Β· simp_rw [intervalIntegral.integral_mul_const] | |
| Β· exact fun i _ => ((hf i).sub (hg i)).abs.mul_const _ | |
| theorem stepClock_sample_distance (D : ΞΉ β β) (qβ : ΞΉ β ββ₯0) | |
| (L : List (GaussianStep ΞΉ)) (hL : OrderedSteps 0 L) | |
| (q : β β ΞΉ β ββ₯0) (hq : β i, MonotoneOn (fun u => q u i) (Icc (0:β) 1)) | |
| (as : List PositiveMass) (ha : MassOrdered 0 as) {h : β} (hm : PartitionMesh h 0 as) : | |
| (β« u in (0:β)..1, clockCoordinateDistance D | |
| (stepClockFunction (fun i => (qβ i:β)) L u) | |
| (fun i => partitionSample (fun u => (q u i:β)) 0 as u)) β€ | |
| 2*stepPathClockDistance D qβ L q+2*h*clockVariationBound D q := by | |
| rw [clockCoordinateDistance_integral D _ _ | |
| (fun i => stepClockFunction_intervalIntegrable _ hL i 0 1) | |
| (fun i => partitionSample_intervalIntegrable _ _ _ _ _)] | |
| calc | |
| _ β€ β i, ((β« u in (0:β)..1, |stepClockFunction (fun i => (qβ i:β)) L u i-(q u i:β)|)+ | |
| h*((q 1 i:β)-(q 0 i:β)))*(D i)^2 := by | |
| apply Finset.sum_le_sum | |
| intro i _ | |
| apply mul_le_mul_of_nonneg_right _ (sq_nonneg _) | |
| apply partitionSample_compare_integral (stepClockFunction_intervalIntegrable _ hL i 0 1) | |
| _ as ha hm | |
| intro u hu v hv huv | |
| exact_mod_cast (hq i) hu hv huv | |
| _ = _ := by | |
| unfold stepPathClockDistance clockVariationBound | |
| simp only [Finset.mul_sum,βFinset.sum_add_distrib] | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| ring | |
| def stepPathPairDistance (D : ΞΉ β β) (qβ : ΞΉ β ββ₯0) (A B : List (GaussianStep ΞΉ)) | |
| (q : β β ΞΉ β ββ₯0) (u : β) : β := | |
| clockCoordinateDistance D (stepClockValues (fun i => (qβ i:β)) A A.length) (fun i => (q u i:β))+ | |
| 2*stepPathClockDistance D qβ (A++B) q+ | |
| clockCoordinateDistance D (stepClockValues (fun i => (qβ i:β)) (A++B) (A++B).length) | |
| (fun i => (q 1 i:β)) | |
| end SKFluctuations.Hierarchy | |
| namespace SKFluctuations.Hierarchy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal BigOperators | |
| variable {S ΞΉ : Type*} [Fintype S] [Nonempty S] [Fintype ΞΉ] [Nonempty ΞΉ] | |
| attribute [local instance] Classical.propDecidable | |
| theorem stepPairDisorder_sample_comparison {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (D : ΞΉ β β) (hD : β i, 0β€D i) | |
| (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (qβ : ΞΉ β ββ₯0) (A B : List (GaussianStep ΞΉ)) {u : β} | |
| (hu : 0β€u) (hA : OrderedSteps 0 A) (hB : OrderedSteps u B) (hAu : β s β A, s.1β€u) | |
| (q : β β ΞΉ β ββ₯0) (hq : β i, MonotoneOn (fun u => q u i) (Icc (0:β) 1)) | |
| (as bs : List PositiveMass) (ha : MassOrdered 0 as) (hb : MassOrdered u bs) | |
| (hau : β a β as, a.valβ€u) (heA : partitionEnd 0 as=u) (hetB : partitionEnd u bs=1) | |
| {h : β} (hmesh : PartitionMesh h 0 (as++bs)) | |
| (P : S β S β β) {K : β} (hK : 0β€K) (hP : β Ο Ο, |P Ο Ο|β€K) (x : ΞΉ β β) : | |
| |stepPairDisorder w Ο qβ A B P x-sampledPairDisorder w Ο q u as bs P x| β€ | |
| ClockTree.errorJetVariation 2 0 0*K* | |
| (stepPathPairDistance D qβ A B q u+2*h*clockVariationBound D q) := by | |
| have hoa : MassOrdered 0 (as++bs) := ha.append_end (heA.symm βΈ hb) | |
| have ht := stepPairDisorder_l1_comparison hw Ο D hD hΟ qβ (q 0) | |
| A B (sampleClockSteps q 0 as) (sampleClockSteps q u bs) hu hA hB | |
| (sampleClockSteps_ordered q as ha) (sampleClockSteps_ordered q bs hb) | |
| hAu (sampleClockSteps_mass_le q 0 as hau) P hK hP x | |
| rw [sampleClockSteps_terminal q hq 0 as ha,heA] at ht | |
| have hAB : sampleClockSteps q 0 as++sampleClockSteps q u bs=sampleClockSteps q 0 (as++bs) := by | |
| rw [sampleClockSteps_append,heA] | |
| rw [hAB,sampleClockSteps_terminal q hq 0 (as++bs) hoa, | |
| partitionEnd_append,heA,hetB] at ht | |
| have hfun : stepClockFunction (fun i => (q 0 i:β)) (sampleClockSteps q 0 (as++bs)) = | |
| fun u i => partitionSample (fun v => (q v i:β)) 0 (as++bs) u := by | |
| funext u i | |
| exact sampleClockSteps_function q hq _ hoa u i | |
| rw [hfun] at ht | |
| apply ht.trans | |
| apply mul_le_mul_of_nonneg_left _ (mul_nonneg (ClockTree.errorJetVariation_nonneg 2 0 0) hK) | |
| have hh := stepClock_sample_distance D qβ (A++B) (hA.append_bound hu hAu hB) q hq (as++bs) hoa hmesh | |
| dsimp only [stepPathPairDistance] | |
| linarith | |
| theorem stepPairDisorder_path_comparison {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (D : ΞΉ β β) (hD : β i, 0β€D i) | |
| (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (qβ : ΞΉ β ββ₯0) (A B : List (GaussianStep ΞΉ)) (u : PositiveMass) (hu : u.valβ€1) | |
| (hA : OrderedSteps 0 A) (hB : OrderedSteps u.val B) (hAu : β s β A, s.1β€u.val) | |
| (q : β β ΞΉ β ββ₯0) (hq : β i, MonotoneOn (fun u => q u i) (Icc (0:β) 1)) | |
| (P : S β S β β) {K : β} (hK : 0β€K) (hP : β Ο Ο, |P Ο Ο|β€K) (x : ΞΉ β β) : | |
| |stepPairDisorder w Ο qβ A B P x-pathPairDisorder w Ο q u P x| β€ | |
| ClockTree.errorJetVariation 2 0 0*K*stepPathPairDistance D qβ A B q u.val := by | |
| have hb (n : β) : |stepPairDisorder w Ο qβ A B P x- | |
| retainedPairSample w Ο q u (uniformMasses n) P x| β€ | |
| ClockTree.errorJetVariation 2 0 0*K* | |
| (stepPathPairDistance D qβ A B q u.val+2*((n+1:β):β)β»ΒΉ*clockVariationBound D q) := by | |
| have ho := retainedMasses_ordered u hu (uniformMasses n) (uniformMasses_ordered n) | |
| exact stepPairDisorder_sample_comparison hw Ο D hD hΟ qβ A B u.property.le hA hB hAu | |
| q hq _ _ ho.1 ho.2 (retainedBefore_bounds u _) (retainedBefore_end u _) (retainedAfter_end u _) | |
| (retainedMasses_mesh u hu _ (uniformMasses_ordered n) (by positivity) (uniformMasses_mesh n)) P hK hP x | |
| have hl := ((tendsto_const_nhds (x := stepPairDisorder w Ο qβ A B P x)).sub (retainedPairSample_tendsto hw Ο D hD hΟ q hq u hu P hK hP x)).abs | |
| have hr : Tendsto (fun n : β => ClockTree.errorJetVariation 2 0 0*K* | |
| (stepPathPairDistance D qβ A B q u.val+2*((n+1:β):β)β»ΒΉ*clockVariationBound D q)) atTop | |
| (π (ClockTree.errorJetVariation 2 0 0*K*stepPathPairDistance D qβ A B q u.val)) := by | |
| simpa using (tendsto_const_nhds.add ((uniformMasses_mesh_tendsto.const_mul 2).mul_const | |
| (clockVariationBound D q))).const_mul (ClockTree.errorJetVariation 2 0 0*K) | |
| exact le_of_tendsto_of_tendsto hl hr (Eventually.of_forall hb) | |
| theorem stepPairDisorder_tendsto_path {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (D : ΞΉ β β) (hD : β i, 0β€D i) | |
| (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (qβ : β β ΞΉ β ββ₯0) (A B : β β List (GaussianStep ΞΉ)) (u : PositiveMass) (hu : u.valβ€1) | |
| (hA : β n, OrderedSteps 0 (A n)) (hB : β n, OrderedSteps u.val (B n)) | |
| (hAu : β n s, s β A n β s.1β€u.val) | |
| (q : β β ΞΉ β ββ₯0) (hq : β i, MonotoneOn (fun u => q u i) (Icc (0:β) 1)) | |
| (hpath : Tendsto (fun n => stepPathPairDistance D (qβ n) (A n) (B n) q u.val) atTop (π 0)) | |
| (P : S β S β β) {K : β} (hK : 0β€K) (hP : β Ο Ο, |P Ο Ο|β€K) (x : ΞΉ β β) : | |
| Tendsto (fun n => stepPairDisorder w Ο (qβ n) (A n) (B n) P x) atTop | |
| (π (pathPairDisorder w Ο q u P x)) := by | |
| rw [tendsto_iff_norm_sub_tendsto_zero] | |
| simp only [Real.norm_eq_abs] | |
| apply squeeze_zero (fun _ => abs_nonneg _) (fun n => | |
| stepPairDisorder_path_comparison hw Ο D hD hΟ (qβ n) (A n) (B n) u hu (hA n) (hB n) (hAu n) q hq P hK hP x) | |
| simpa using hpath.const_mul (ClockTree.errorJetVariation 2 0 0*K) | |
| end SKFluctuations.Hierarchy | |
| namespace SKFluctuations.Hierarchy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal BigOperators | |
| theorem partitionSample_comp (q : β β β) (a : β) (as : List PositiveMass) (u : β) : | |
| partitionSample q a as u=q (partitionSample id a as u) := by | |
| induction as generalizing a with | |
| | nil => rfl | |
| | cons b bs ih => | |
| simp only [partitionSample_cons] | |
| split_ifs <;> simp_all | |
| theorem partitionSample_id_bounds {h a u : β} (as : List PositiveMass) | |
| (ho : MassOrdered a as) (hm : PartitionMesh h a as) (hu : u β Icc a 1) : | |
| a β€ partitionSample id a as u β§ partitionSample id a as u β€ u β§ | |
| u-partitionSample id a as u β€ h := by | |
| induction as generalizing a with | |
| | nil => | |
| change 1-aβ€h at hm | |
| simpa only [partitionSample_nil,id_eq] using | |
| (show aβ€a β§ aβ€u β§ u-aβ€h from β¨le_rfl,hu.1,by linarith [hu.2]β©) | |
| | cons b bs ih => | |
| rw [partitionSample_cons] | |
| split_ifs with hb | |
| Β· exact β¨le_rfl,hu.1,by dsimp; linarith [hm.1]β© | |
| Β· obtain β¨hβ,hβ,hββ© := ih ho.2.2 hm.2 β¨le_of_not_gt hb,hu.2β© | |
| exact β¨ho.2.1.trans hβ,hβ,hββ© | |
| theorem partitionSample_tendsto {q : β β β} {a u : β} | |
| (as : β β List PositiveMass) (h : β β β) | |
| (ho : β n, MassOrdered a (as n)) (hm : β n, PartitionMesh (h n) a (as n)) | |
| (hh : Tendsto h atTop (π 0)) (hu : u β Icc a 1) | |
| (hc : ContinuousWithinAt q (Icc a 1) u) : | |
| Tendsto (fun n => partitionSample q a (as n) u) atTop (π (q u)) := by | |
| have ht : Tendsto (fun n => partitionSample id a (as n) u) atTop (π u) := by | |
| rw [tendsto_iff_norm_sub_tendsto_zero] | |
| simp only [Real.norm_eq_abs] | |
| apply squeeze_zero (fun _ => abs_nonneg _) _ hh | |
| intro n | |
| have hb := partitionSample_id_bounds (as n) (ho n) (hm n) hu | |
| rw [abs_of_nonpos (sub_nonpos.mpr hb.2.1)] | |
| linarith [hb.2.2] | |
| have hw : Tendsto (fun n => partitionSample id a (as n) u) atTop (π[Icc a 1] u) := | |
| tendsto_nhdsWithin_iff.mpr β¨ht,Eventually.of_forall fun n => | |
| let hb := partitionSample_id_bounds (as n) (ho n) (hm n) hu | |
| β¨hb.1,hb.2.1.trans hu.2β©β© | |
| have he : (fun n => partitionSample q a (as n) u) = | |
| (fun n => q (partitionSample id a (as n) u)) := funext (fun n => partitionSample_comp q a (as n) u) | |
| rw [he] | |
| exact hc.tendsto.comp hw | |
| theorem uniformSample_tendsto {q : β β β} {u : β} (hu : u β Icc (0:β) 1) | |
| (hc : ContinuousWithinAt q (Icc (0:β) 1) u) : | |
| Tendsto (fun n => partitionSample q 0 (uniformMasses n) u) atTop (π (q u)) := | |
| partitionSample_tendsto _ _ uniformMasses_ordered uniformMasses_mesh | |
| uniformMasses_mesh_tendsto hu hc | |
| end SKFluctuations.Hierarchy | |
| namespace SKFluctuations.Hierarchy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal BigOperators | |
| variable {S ΞΉ : Type*} [Fintype S] [Nonempty S] [Fintype ΞΉ] [Nonempty ΞΉ] | |
| attribute [local instance] Classical.propDecidable | |
| def pathPairMoment (w : S β β) (Ο : S β (ΞΉ β β) βL[β] β) | |
| (q : β β ΞΉ β ββ₯0) (P : S β S β β) (u : β) : β := | |
| if h : 0<u then pathPairDisorder w Ο q β¨u,hβ© P 0 else 0 | |
| theorem stepPairMoment_path_comparison {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (D : ΞΉ β β) (hD : β i, 0β€D i) | |
| (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (qβ : ΞΉ β ββ₯0) (L : List (GaussianStep ΞΉ)) (hL : OrderedSteps 0 L) | |
| (q : β β ΞΉ β ββ₯0) (hq : β i, MonotoneOn (fun u => q u i) (Icc (0:β) 1)) | |
| (P : S β S β β) {K : β} (hK : 0β€K) (hP : β Ο Ο, |P Ο Ο|β€K) | |
| {u : β} (hu : u β Ioc (0:β) 1) : | |
| |stepPairMoment w Ο qβ L hL.mem_pos P u-pathPairMoment w Ο q P u| β€ | |
| ClockTree.errorJetVariation 2 0 0*K*( | |
| clockCoordinateDistance D (stepClockFunction (fun i => (qβ i:β)) L u) | |
| (fun i => (q u i:β))+2*stepPathClockDistance D qβ L q+ | |
| clockCoordinateDistance D (stepClockValues (fun i => (qβ i:β)) L L.length) | |
| (fun i => (q 1 i:β))) := by | |
| have ho := splitClockSteps_ordered u β¨hu.1.le,hu.2β© L hL hu.1.le | |
| rw [stepPairMoment_eq_split hw Ο qβ L hL, pathPairMoment,dite_eq_left hu.1] | |
| have hb := stepPairDisorder_path_comparison hw Ο D hD hΟ qβ | |
| (splitClockSteps u L).1 (splitClockSteps u L).2 β¨u,hu.1β© hu.2 | |
| ho.1 ho.2.1 ho.2.2 q hq P hK hP 0 | |
| simpa only [stepPathPairDistance,splitClockSteps_append,βstepClockFunction_split _ _ _ hL] using hb | |
| omit [Nonempty ΞΉ] in | |
| theorem sample_stepPathClockDistance_le (D : ΞΉ β β) (q : β β ΞΉ β ββ₯0) | |
| (hq : β i, MonotoneOn (fun u => q u i) (Icc (0:β) 1)) | |
| (as : List PositiveMass) (ha : MassOrdered 0 as) {h : β} (hm : PartitionMesh h 0 as) : | |
| stepPathClockDistance D (q 0) (sampleClockSteps q 0 as) qβ€h*clockVariationBound D q := by | |
| unfold stepPathClockDistance clockVariationBound | |
| simp_rw [sampleClockSteps_function q hq as ha] | |
| calc | |
| _ β€ (1/2:β)*β i, (D i)^2*(h*((q 1 i:β)-(q 0 i:β))) := by | |
| apply mul_le_mul_of_nonneg_left (Finset.sum_le_sum _) (by norm_num) | |
| intro i _ | |
| apply mul_le_mul_of_nonneg_left _ (sq_nonneg _) | |
| simp_rw [abs_sub_comm (partitionSample _ _ _ _)] | |
| exact partitionSample_l1_error (fun u hu v hv huv => by exact_mod_cast hq i hu hv huv) as ha hm | |
| _ = _ := by simp only [Finset.mul_sum]; apply Finset.sum_congr rfl; intro i _; ring | |
| omit [Nonempty ΞΉ] in | |
| theorem stepPathClockDistance_nonneg (D : ΞΉ β β) (qβ : ΞΉ β ββ₯0) | |
| (L : List (GaussianStep ΞΉ)) (q : β β ΞΉ β ββ₯0) : | |
| 0 β€ stepPathClockDistance D qβ L q := by | |
| unfold stepPathClockDistance | |
| exact mul_nonneg (by norm_num) (Finset.sum_nonneg (fun i _ => | |
| mul_nonneg (sq_nonneg _) (intervalIntegral.integral_nonneg (by norm_num) (fun _ _ => abs_nonneg _)))) | |
| theorem uniformMassTail_end {h : β} (hh : 0<h) (k n : β) : | |
| partitionEnd ((k:β)*h) (uniformMassTail h hh k n)=(k+n:β)*h := by | |
| induction n generalizing k with | |
| | zero => simp [uniformMassTail,partitionEnd] | |
| | succ n ih => | |
| simp only [uniformMassTail,partitionEnd] | |
| simpa only [Nat.add_assoc, Nat.add_comm 1 n] using ih (k+1) | |
| theorem uniformMasses_end (n : β) : partitionEnd 0 (uniformMasses n)=1 := by | |
| have he := uniformMassTail_end (show 0<((n+1:β):β)β»ΒΉ by positivity) 0 (n+1) | |
| simpa [uniformMasses, mul_inv_cancelβ (show ((n:β)+1)β 0 by positivity)] using he | |
| theorem sampledPairMoment_tendsto {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (D : ΞΉ β β) (hD : β i, 0β€D i) | |
| (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (q : β β ΞΉ β ββ₯0) (hq : β i, MonotoneOn (fun u => q u i) (Icc (0:β) 1)) | |
| (P : S β S β β) {K : β} (hK : 0β€K) (hP : β Ο Ο, |P Ο Ο|β€K) | |
| {u : β} (hu : u β Ioc (0:β) 1) | |
| (hc : β i, ContinuousWithinAt (fun v => (q v i:β)) (Icc (0:β) 1) u) : | |
| Tendsto (fun n => stepPairMoment w Ο (q 0) (sampleClockSteps q 0 (uniformMasses n)) | |
| (sampleClockSteps_ordered q _ (uniformMasses_ordered n)).mem_pos P u) | |
| atTop (π (pathPairMoment w Ο q P u)) := by | |
| have ht : Tendsto (fun n => clockCoordinateDistance D | |
| (stepClockFunction (fun i => (q 0 i:β)) (sampleClockSteps q 0 (uniformMasses n)) u) | |
| (fun i => (q u i:β))) atTop (π 0) := by | |
| unfold clockCoordinateDistance | |
| simp_rw [sampleClockSteps_function q hq _ (uniformMasses_ordered _)] | |
| have hh := tendsto_finsetSum Finset.univ (fun i _ => | |
| ((uniformSample_tendsto β¨hu.1.le,hu.2β© (hc i)).sub_const (q u i:β)).abs.mul_const ((D i)^2)) | |
| simpa using hh | |
| have hl : Tendsto (fun n => stepPathClockDistance D (q 0) | |
| (sampleClockSteps q 0 (uniformMasses n)) q) atTop (π 0) := | |
| squeeze_zero (fun _ => stepPathClockDistance_nonneg _ _ _ _) (fun n => | |
| sample_stepPathClockDistance_le D q hq _ (uniformMasses_ordered n) (uniformMasses_mesh n)) | |
| (by simpa using uniformMasses_mesh_tendsto.mul_const (clockVariationBound D q)) | |
| rw [tendsto_iff_norm_sub_tendsto_zero] | |
| simp only [Real.norm_eq_abs] | |
| apply squeeze_zero (fun _ => abs_nonneg _) (fun n => stepPairMoment_path_comparison hw Ο D hD hΟ | |
| (q 0) _ (sampleClockSteps_ordered q _ (uniformMasses_ordered n)) q hq P hK hP hu) | |
| simp_rw [sampleClockSteps_terminal q hq _ _ (uniformMasses_ordered _),uniformMasses_end] | |
| simpa [clockCoordinateDistance] using (ht.add (hl.const_mul 2)).const_mul (ClockTree.errorJetVariation 2 0 0*K) | |
| end SKFluctuations.Hierarchy | |
| namespace SKFluctuations.Hierarchy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal BigOperators | |
| variable {S ΞΉ : Type*} [Fintype S] [Nonempty S] [Fintype ΞΉ] [Nonempty ΞΉ] | |
| attribute [local instance] Classical.propDecidable | |
| omit [Nonempty ΞΉ] in | |
| theorem ClockTree.disorderExpect_bound {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) {as : List PositiveMass} (T : ClockTree S as) | |
| {a : β} (ha : MassOrdered a as) (v : ΞΉ β β) (q : β β ΞΉ β β) | |
| (P : T.Assignment β β) {K : β} (hP : β Ο, |P Ο|β€K) (x : ΞΉ β β) : | |
| |T.disorderExpect w Ο v q P x|β€K := by | |
| rw [T.disorderExpect_integral hw Ο ha] | |
| have hb (y : ΞΉ β β) : |T.expect w Ο (cumulativeIncrements (q 0) (fun j => q (j+1))) P (x+y)|β€K := by | |
| rw [T.expect_realize] | |
| exact (T.realize _).expect_abs_le hw Ο (clockSteps_ordered ha _) (fun Ο => hP _) _ | |
| have hi := norm_integral_le_of_norm_le_const (f := fun y => | |
| T.expect w Ο (cumulativeIncrements (q 0) (fun j => q (j+1))) P (x+y)) | |
| (ΞΌ := Measure.pi fun i => gaussianReal 0 (q 0 i-v i).toNNReal) | |
| (Eventually.of_forall (fun y => by simpa only [Real.norm_eq_abs] using hb y)) | |
| simpa only [zeroContinuation,Real.norm_eq_abs,probReal_univ,mul_one] using hi | |
| omit [Nonempty ΞΉ] in | |
| theorem cumulativePair_bound {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (as : List PositiveMass) (ha : MassOrdered 0 as) | |
| (q : β β ΞΉ β β) (j : β) (P : S β S β β) {K : β} (hP : β Ο Ο, |P Ο Ο|β€K) : | |
| |cumulativePair w Ο as q j P|β€K := | |
| ClockTree.disorderExpect_bound hw Ο _ ha _ _ _ (fun _ => hP _ _) _ | |
| theorem stepPairMoment_bound {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (qβ : ΞΉ β ββ₯0) | |
| (L : List (GaussianStep ΞΉ)) (hL : OrderedSteps 0 L) (P : S β S β β) | |
| {K : β} (hP : β Ο Ο, |P Ο Ο|β€K) (u : β) : | |
| |stepPairMoment w Ο qβ L hL.mem_pos P u|β€K := by | |
| unfold stepPairMoment | |
| rw [massStepFunction_split_index] | |
| exact cumulativePair_bound hw Ο _ (positiveStepMasses_ordered hL _) _ _ P hP | |
| omit [Nonempty ΞΉ] in | |
| theorem stepPairDisorder_bound {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (qβ : ΞΉ β ββ₯0) | |
| (A B : List (GaussianStep ΞΉ)) (ho : OrderedSteps 0 (A++B)) (P : S β S β β) | |
| {K : β} (hP : β Ο Ο, |P Ο Ο|β€K) (x : ΞΉ β β) : | |
| |stepPairDisorder w Ο qβ A B P x|β€K := by | |
| have hA : β s β A, 0<s.1 := fun s hs => ho.mem_pos s (List.mem_append_left _ hs) | |
| have hB : β s β B, 0<s.1 := fun s hs => ho.mem_pos s (List.mem_append_right _ hs) | |
| have hc := congr_fun (ClockTree.pairDisorder_coordinates hw Ο A B hA hB ho qβ P) x | |
| rw [βhc] | |
| apply ClockTree.disorderExpect_bound hw Ο | |
| Β· rw [βpositiveStepMasses_append] | |
| exact positiveStepMasses_ordered ho _ | |
| Β· exact fun Ο => hP _ _ | |
| theorem pathPairMoment_bound {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (D : ΞΉ β β) (hD : β i, 0β€D i) | |
| (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (q : β β ΞΉ β ββ₯0) (hq : β i, MonotoneOn (fun u => q u i) (Icc (0:β) 1)) | |
| (P : S β S β β) {K : β} (hK : 0β€K) (hP : β Ο Ο, |P Ο Ο|β€K) | |
| {u : β} (hu : u β Ioc (0:β) 1) : |pathPairMoment w Ο q P u|β€K := by | |
| rw [pathPairMoment,dite_eq_left hu.1] | |
| apply le_of_tendsto ((retainedPairSample_tendsto hw Ο D hD hΟ q hq β¨u,hu.1β© hu.2 P hK hP 0).abs) | |
| apply Eventually.of_forall | |
| intro n | |
| change |stepPairDisorder w Ο (q 0) | |
| (sampleClockSteps q 0 (retainedBefore β¨u,hu.1β© (uniformMasses n))) | |
| (sampleClockSteps q u (retainedAfter β¨u,hu.1β© (uniformMasses n))) P 0|β€K | |
| have ho := retainedMasses_ordered (β¨u,hu.1β© : PositiveMass) hu.2 (uniformMasses n) (uniformMasses_ordered n) | |
| apply stepPairDisorder_bound hw Ο _ _ _ _ P hP | |
| exact (sampleClockSteps_ordered q _ ho.1).append_bound hu.1.le | |
| (sampleClockSteps_mass_le q _ _ (retainedBefore_bounds β¨u,hu.1β© _)) | |
| (sampleClockSteps_ordered q _ ho.2) | |
| end SKFluctuations.Hierarchy | |
| end | |
| end OAI | |