Download data/lean/OAI/Probability/SKFluctuations/ClockPathPressureSup.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 33.5 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/SKFluctuations/ClockPathPressureSup.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/SKFluctuations/ClockPathPressureSup.lean
-
curl -L -o ClockPathPressureSup.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/SKFluctuations/ClockPathPressureSup.lean
33.5 kB
| import Mathlib | |
| import OAI.Probability.SKFluctuations.ClockSampledRate | |
| namespace OAI | |
| /-! Clock Path Pressure Sup. -/ | |
| noncomputable section | |
| namespace SKFluctuations.Hierarchy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal BigOperators | |
| attribute [local instance] Classical.propDecidable | |
| variable {S ΞΉ : Type*} [Fintype S] [Nonempty S] [Fintype ΞΉ] [Nonempty ΞΉ] | |
| omit [Nonempty ΞΉ] in | |
| theorem clockL1Distance_le (D C : ΞΉ β β) (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)) | |
| (hC : β u β Icc (0:β) 1, β i, |(q u i:β)-(r u i:β)|β€C i) : | |
| clockL1Distance D q rβ€(1/2:β)*β i, C i*(D i)^2 := by | |
| unfold clockL1Distance | |
| apply mul_le_mul_of_nonneg_left _ (by norm_num) | |
| apply Finset.sum_le_sum | |
| intro i _ | |
| have hi : (β« u in (0:β)..1, |(q u i:β)-(r u i:β)|)β€C i := by | |
| calc | |
| _ β€ β« u in (0:β)..1, C i := | |
| intervalIntegral.integral_mono_on_of_le_Ioo (by norm_num) | |
| (clockDirection_intervalIntegrable r q hr hq i).abs intervalIntegrable_const | |
| (fun u hu => hC u β¨hu.1.le,hu.2.leβ© i) | |
| _ = _ := by simp | |
| simpa only [mul_comm] using mul_le_mul_of_nonneg_left hi (sq_nonneg (D i)) | |
| theorem pathDisorderPressure_sup_comparison {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (C D M : ΞΉ β β) | |
| (hself : β Ο i, (Ο Ο (Pi.single i 1))^2=C i) | |
| (hΟ : β Ο 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)) | |
| (hM : β u β Icc (0:β) 1, β i, |(q u i:β)-(r u i:β)|β€M i) (x : ΞΉ β β) : | |
| |pathDisorderPressure w Ο C q x-pathDisorderPressure w Ο C r x| β€ | |
| (1/2:β)*β i, M i*(D i)^2 := | |
| (pathDisorderPressure_l1_comparison hw Ο C D hself (fun i Ο => hΟ Ο i) q r hq hr x).trans | |
| (clockL1Distance_le D M q r hq hr hM) | |
| omit [Fintype ΞΉ] [Nonempty ΞΉ] in | |
| theorem affineClockPath_zero (q r : β β ΞΉ β ββ₯0) : affineClockPath q r 0=q := by | |
| funext u i | |
| simp [affineClockPath] | |
| omit [Fintype ΞΉ] [Nonempty ΞΉ] in | |
| theorem affineClockPath_one (q r : β β ΞΉ β ββ₯0) : affineClockPath q r 1=r := by | |
| funext u i | |
| simp [affineClockPath] | |
| omit [Fintype ΞΉ] [Nonempty ΞΉ] in | |
| theorem affineClockPath_difference (q r : β β ΞΉ β ββ₯0) {s t : β} | |
| (hs : s β Icc (0:β) 1) (ht : t β Icc (0:β) 1) (u : β) (i : ΞΉ) : | |
| |(affineClockPath q r s u i:β)-(affineClockPath q r t u i:β)|= | |
| |s-t| *|(r u i:β)-(q u i:β)| := by | |
| rw [affineClockPath_coe q r hs,affineClockPath_coe q r ht,βabs_mul] | |
| congr 1 | |
| ring | |
| theorem pathDisorderPressure_affine_continuousOn {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (C D : ΞΉ β β) | |
| (hself : β Ο i, (Ο Ο (Pi.single i 1))^2=C i) | |
| (hΟ : β Ο 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 : ΞΉ β β) : | |
| ContinuousOn (fun t => pathDisorderPressure w Ο C (affineClockPath q r t) x) (Icc (0:β) 1) := by | |
| let A : ββ₯0 := β¨(1/2:β)*β i, ((r 1 i:β)+(q 1 i:β))*(D i)^2, by positivityβ© | |
| apply (show LipschitzOnWith A (fun t => pathDisorderPressure w Ο C (affineClockPath q r t) x) | |
| (Icc (0:β) 1) from ?_).continuousOn | |
| apply LipschitzOnWith.of_dist_le_mul | |
| intro s hs t ht | |
| rw [Real.dist_eq,Real.dist_eq] | |
| have he := pathDisorderPressure_sup_comparison hw Ο C D | |
| (fun i => |s-t| *((r 1 i:β)+(q 1 i:β))) hself hΟ | |
| (affineClockPath q r s) (affineClockPath q r t) | |
| (affineClockPath_monotone q r hq hr s) (affineClockPath_monotone q r hq hr t) | |
| (fun u hu i => by | |
| rw [affineClockPath_difference q r hs ht] | |
| exact mul_le_mul_of_nonneg_left (clockDirection_bound q r hq hr hu i) (abs_nonneg _)) x | |
| convert he using 1 | |
| change ((1/2:β)*β i, ((r 1 i:β)+(q 1 i:β))*(D i)^2) * |s-t| = _ | |
| simp only [Finset.mul_sum,Finset.sum_mul] | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| ring | |
| end SKFluctuations.Hierarchy | |
| namespace SKFluctuations.Hierarchy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal BigOperators | |
| attribute [local instance] Classical.propDecidable | |
| variable {S ΞΉ : Type*} [Fintype S] [Nonempty S] [Fintype ΞΉ] [Nonempty ΞΉ] | |
| theorem intervalIntegral_mul_abs_le {f g : β β β} | |
| (hf : IntervalIntegrable f volume 0 1) (hg : IntervalIntegrable g volume 0 1) | |
| {A B : β} (hA : 0β€A) (_hB : 0β€B) | |
| (hfB : β u β Ioc (0:β) 1, |f u|β€A) (hgB : β u β Ioc (0:β) 1, |g u|β€B) : | |
| |β« u in (0:β)..1, f u*g u|β€A*B := by | |
| have hi := intervalIntegrable_mul_bounded hf hg hgB | |
| calc | |
| _ β€ β« u in (0:β)..1, |f u*g u| := by | |
| simpa only [Real.norm_eq_abs] using intervalIntegral.norm_integral_le_integral_norm | |
| (f := fun u => f u*g u) (by norm_num : (0:β)β€1) | |
| _ β€ β« _u in (0:β)..1, A*B := by | |
| apply intervalIntegral.integral_mono_on_of_le_Ioo (by norm_num) hi.abs intervalIntegrable_const | |
| intro u hu | |
| rw [abs_mul] | |
| exact mul_le_mul (hfB u β¨hu.1,hu.2.leβ©) (hgB u β¨hu.1,hu.2.leβ©) (abs_nonneg _) hA | |
| _ = _ := by simp | |
| theorem pathPressureRate_sup_comparison {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (D C M : ΞΉ β β) (hD : β i, 0β€D i) | |
| (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (p p' q r : β β ΞΉ β ββ₯0) | |
| (hp : β i, MonotoneOn (fun u => p u i) (Icc (0:β) 1)) | |
| (hp' : β i, MonotoneOn (fun u => p' u i) (Icc (0:β) 1)) | |
| (hq : β i, MonotoneOn (fun u => q u i) (Icc (0:β) 1)) | |
| (hr : β i, MonotoneOn (fun u => r u i) (Icc (0:β) 1)) | |
| (hC : β u β Icc (0:β) 1, β i, |(r u i:β)-(q u i:β)|β€C i) | |
| (hM : β u β Icc (0:β) 1, β i, |(p u i:β)-(p' u i:β)|β€M i) : | |
| |pathPressureRate w Ο p (fun u i => (r u i:β)-(q u i:β))- | |
| pathPressureRate w Ο p' (fun u i => (r u i:β)-(q u i:β))| β€ | |
| (3/2:β)*ClockTree.errorJetVariation 2 0 0*(β i, M i*(D i)^2)*(β i, C i*(D i)^2) := by | |
| have hC0 (i : ΞΉ) : 0β€C i := (abs_nonneg _).trans (hC 0 (by constructor <;> norm_num) i) | |
| have hM0 (i : ΞΉ) : 0β€M i := (abs_nonneg _).trans (hM 0 (by constructor <;> norm_num) i) | |
| have hA : 0β€β i, M i*(D i)^2 := Finset.sum_nonneg fun i _ => mul_nonneg (hM0 i) (sq_nonneg _) | |
| have hi (z : β β ΞΉ β ββ₯0) (hz : β i, MonotoneOn (fun u => z u i) (Icc (0:β) 1)) (i : ΞΉ) : | |
| IntervalIntegrable (fun u => ((r u i:β)-(q u i:β))*pathPairMoment w Ο z (coordinatePairTest Ο i) u) volume 0 1 := by | |
| simpa only [mul_comm] using intervalIntegrable_mul_bounded | |
| (pathPairMoment_intervalIntegrable_all hw Ο z hz _) (clockDirection_intervalIntegrable q r hq hr i) | |
| (fun u hu => hC u β¨hu.1.le,hu.2β© i) | |
| have hI (i : ΞΉ) : |(β« u in (0:β)..1, ((r u i:β)-(q u i:β))*pathPairMoment w Ο p (coordinatePairTest Ο i) u)- | |
| (β« u in (0:β)..1, ((r u i:β)-(q u i:β))*pathPairMoment w Ο p' (coordinatePairTest Ο i) u)|β€ | |
| C i*(ClockTree.errorJetVariation 2 0 0*(D i)^2*(3*β j, M j*(D j)^2)) := by | |
| rw [βintervalIntegral.integral_sub (hi p hp i) (hi p' hp' i)] | |
| have he : (fun u => ((r u i:β)-(q u i:β))*pathPairMoment w Ο p (coordinatePairTest Ο i) u- | |
| ((r u i:β)-(q u i:β))*pathPairMoment w Ο p' (coordinatePairTest Ο i) u)= | |
| fun u => ((r u i:β)-(q u i:β))*(pathPairMoment w Ο p (coordinatePairTest Ο i) u- | |
| pathPairMoment w Ο p' (coordinatePairTest Ο i) u) := by funext u; ring | |
| rw [he] | |
| apply intervalIntegral_mul_abs_le (clockDirection_intervalIntegrable q r hq hr i) | |
| ((pathPairMoment_intervalIntegrable_all hw Ο p hp _).sub | |
| (pathPairMoment_intervalIntegrable_all hw Ο p' hp' _)) (hC0 i) | |
| (by apply mul_nonneg (mul_nonneg (ClockTree.errorJetVariation_nonneg _ _ _) (sq_nonneg _)); positivity) | |
| (fun u hu => hC u β¨hu.1.le,hu.2β© i) | |
| intro u hu | |
| exact pathPairMoment_sup_comparison hw Ο D M hD hΟ p p' hp hp' hM hu | |
| (coordinatePairTest Ο i) (sq_nonneg _) (coordinatePairTest_bound Ο D hΟ i) | |
| unfold pathPressureRate | |
| rw [βmul_sub,abs_mul,βFinset.sum_sub_distrib] | |
| norm_num only [abs_neg,abs_div,abs_one,abs_of_nonneg (by norm_num : (0:β)β€2)] | |
| apply (mul_le_mul_of_nonneg_left (Finset.abs_sum_le_sum_abs _ _) (by norm_num : (0:β)β€1/2)).trans | |
| calc | |
| _ β€ (1/2:β)*β i, C i*(ClockTree.errorJetVariation 2 0 0*(D i)^2*(3*β j, M j*(D j)^2)) := by | |
| apply mul_le_mul_of_nonneg_left _ (by norm_num) | |
| exact Finset.sum_le_sum fun i _ => hI i | |
| _ = _ := by | |
| conv_lhs => rw [Finset.mul_sum] | |
| conv_rhs => rw [Finset.mul_sum] | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| ring | |
| end SKFluctuations.Hierarchy | |
| namespace SKFluctuations.Hierarchy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal BigOperators | |
| attribute [local instance] Classical.propDecidable | |
| variable {S ΞΉ : Type*} [Fintype S] [Nonempty S] [Fintype ΞΉ] [Nonempty ΞΉ] | |
| theorem pathDisorderPressure_taylor {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (C D B : ΞΉ β β) | |
| (hself : β Ο i, (Ο Ο (Pi.single i 1))^2=C i) | |
| (hD : β i, 0β€D i) (hΟ : β Ο 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)) | |
| (hB : β u β Icc (0:β) 1, β i, |(r u i:β)-(q u i:β)|β€B i) : | |
| |pathDisorderPressure w Ο C r 0-pathDisorderPressure w Ο C q 0- | |
| pathPressureRate w Ο q (fun u i => (r u i:β)-(q u i:β))| β€ | |
| (3/2:β)*ClockTree.errorJetVariation 2 0 0*(β i, B i*(D i)^2)^2 := by | |
| obtain β¨t,ht,heβ© := exists_hasDerivAt_eq_slope | |
| (fun t => pathDisorderPressure w Ο C (affineClockPath q r t) 0) | |
| (fun t => pathPressureRate w Ο (affineClockPath q r t) (fun u i => (r u i:β)-(q u i:β))) | |
| (by norm_num : (0:β)<1) | |
| (pathDisorderPressure_affine_continuousOn hw Ο C D hself hΟ q r hq hr 0) | |
| (fun t ht => pathDisorderPressure_hasDerivAt hw Ο C hself q r hq hr ht) | |
| simp only [affineClockPath_zero,affineClockPath_one,sub_zero,div_one] at he | |
| rw [βhe] | |
| have hb : β u β Icc (0:β) 1, β i, | |
| |(affineClockPath q r t u i:β)-(q u i:β)|β€B i := by | |
| intro u hu i | |
| have hd := affineClockPath_difference q r β¨ht.1.le,ht.2.leβ© | |
| (show (0:β) β Icc (0:β) 1 by constructor <;> norm_num) u i | |
| simp only [affineClockPath_zero,sub_zero,abs_of_pos ht.1] at hd | |
| rw [hd] | |
| exact (mul_le_of_le_one_left (abs_nonneg _) ht.2.le).trans (hB u hu i) | |
| have hbnd := pathPressureRate_sup_comparison hw Ο D B B hD hΟ | |
| (affineClockPath q r t) q q r (affineClockPath_monotone q r hq hr t) hq hq hr hB hb | |
| convert hbnd using 1; ring | |
| end SKFluctuations.Hierarchy | |
| namespace SKFluctuations.Hierarchy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal BigOperators | |
| attribute [local instance] Classical.propDecidable | |
| variable {S ΞΉ : Type*} [Fintype S] [Nonempty S] [Fintype ΞΉ] [Nonempty ΞΉ] | |
| omit [Nonempty S] [Nonempty ΞΉ] in | |
| theorem pathPressureRate_const_mul (w : S β β) (Ο : S β (ΞΉ β β) βL[β] β) | |
| (p : β β ΞΉ β ββ₯0) (K : β β ΞΉ β β) (a : β) : | |
| pathPressureRate w Ο p (fun u i => a*K u i)=a*pathPressureRate w Ο p K := by | |
| unfold pathPressureRate | |
| simp only [mul_assoc,intervalIntegral.integral_const_mul,βFinset.mul_sum] | |
| ring | |
| theorem pathPressureRate_direction_integrable {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (D : ΞΉ β β) (hD : β i, 0β€D i) | |
| (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (p : β β ΞΉ β ββ₯0) (hp : β i, MonotoneOn (fun u => p u i) (Icc (0:β) 1)) | |
| (K : β β ΞΉ β β) (hK : β i, IntervalIntegrable (fun u => K u i) volume 0 1) (i : ΞΉ) : | |
| IntervalIntegrable (fun u => K u i*pathPairMoment w Ο p (coordinatePairTest Ο i) u) volume 0 1 := | |
| intervalIntegrable_mul_bounded (hK i) (pathPairMoment_intervalIntegrable_all hw Ο p hp _) | |
| (fun _ hu => pathPairMoment_bound hw Ο D hD hΟ p hp _ (sq_nonneg _) (coordinatePairTest_bound Ο D hΟ i) hu) | |
| theorem pathPressureRate_sub {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (D : ΞΉ β β) (hD : β i, 0β€D i) | |
| (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (p : β β ΞΉ β ββ₯0) (hp : β i, MonotoneOn (fun u => p u i) (Icc (0:β) 1)) | |
| (K L : β β ΞΉ β β) | |
| (hK : β i, IntervalIntegrable (fun u => K u i) volume 0 1) | |
| (hL : β i, IntervalIntegrable (fun u => L u i) volume 0 1) : | |
| pathPressureRate w Ο p (fun u i => K u i-L u i)= | |
| pathPressureRate w Ο p K-pathPressureRate w Ο p L := by | |
| unfold pathPressureRate | |
| simp only [sub_mul] | |
| simp_rw [intervalIntegral.integral_sub (pathPressureRate_direction_integrable hw Ο D hD hΟ p hp K hK _) | |
| (pathPressureRate_direction_integrable hw Ο D hD hΟ p hp L hL _)] | |
| rw [Finset.sum_sub_distrib,mul_sub] | |
| theorem pathPressureRate_bound {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (D B : ΞΉ β β) (hD : β i, 0β€D i) | |
| (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (p : β β ΞΉ β ββ₯0) (hp : β i, MonotoneOn (fun u => p u i) (Icc (0:β) 1)) | |
| (K : β β ΞΉ β β) (hK : β i, IntervalIntegrable (fun u => K u i) volume 0 1) | |
| (hB : β u β Ioc (0:β) 1, β i, |K u i|β€B i) : | |
| |pathPressureRate w Ο p K|β€(1/2:β)*β i, B i*(D i)^2 := by | |
| have hB0 (i : ΞΉ) : 0β€B i := (abs_nonneg _).trans (hB 1 (by constructor <;> norm_num) i) | |
| unfold pathPressureRate | |
| rw [abs_mul] | |
| norm_num only [abs_neg,abs_div,abs_one,abs_of_nonneg (by norm_num : (0:β)β€2)] | |
| apply (mul_le_mul_of_nonneg_left (Finset.abs_sum_le_sum_abs _ _) (by norm_num : (0:β)β€1/2)).trans | |
| apply mul_le_mul_of_nonneg_left _ (by norm_num) | |
| apply Finset.sum_le_sum | |
| intro i _ | |
| exact intervalIntegral_mul_abs_le (hK i) (pathPairMoment_intervalIntegrable_all hw Ο p hp _) | |
| (hB0 i) (sq_nonneg _) (fun u hu => hB u hu i) | |
| (fun _ hu => pathPairMoment_bound hw Ο D hD hΟ p hp _ (sq_nonneg _) (coordinatePairTest_bound Ο D hΟ i) hu) | |
| end SKFluctuations.Hierarchy | |
| namespace SKFluctuations.Hierarchy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal BigOperators | |
| attribute [local instance] Classical.propDecidable | |
| variable {S ΞΉ : Type*} [Fintype S] [Nonempty S] [Fintype ΞΉ] [Nonempty ΞΉ] | |
| theorem pathPressureRate_tendsto {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (D B : ΞΉ β β) (hD : β i, 0β€D i) | |
| (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (p : β β ΞΉ β ββ₯0) (hp : β i, MonotoneOn (fun u => p u i) (Icc (0:β) 1)) | |
| {A : Type*} {l : Filter A} [l.IsCountablyGenerated] | |
| (K : A β β β ΞΉ β β) (L : β β ΞΉ β β) | |
| (hK : βαΆ a in l, β i, IntervalIntegrable (fun u => K a u i) volume 0 1) | |
| (hB : βαΆ a in l, β u β Ioc (0:β) 1, β i, |K a u i|β€B i) | |
| (hL : β i, βα΅ u βvolume, u β Ioc (0:β) 1 β Tendsto (fun a => K a u i) l (π (L u i))) : | |
| Tendsto (fun a => pathPressureRate w Ο p (K a)) l (π (pathPressureRate w Ο p L)) := by | |
| unfold pathPressureRate | |
| apply Tendsto.const_mul | |
| apply tendsto_finsetSum | |
| intro i _ | |
| apply intervalIntegral.tendsto_integral_filter_of_dominated_convergence (fun _ => B i*(D i)^2) | |
| Β· filter_upwards [hK] with a ha | |
| simpa only [uIoc_of_le (by norm_num : (0:β)β€1)] using | |
| (pathPressureRate_direction_integrable hw Ο D hD hΟ p hp (K a) ha i).1.aestronglyMeasurable | |
| Β· filter_upwards [hB] with a ha | |
| filter_upwards [] with u hu | |
| rw [uIoc_of_le (by norm_num : (0:β)β€1)] at hu | |
| rw [Real.norm_eq_abs,abs_mul] | |
| exact mul_le_mul (ha u hu i) | |
| (pathPairMoment_bound hw Ο D hD hΟ p hp _ (sq_nonneg _) (coordinatePairTest_bound Ο D hΟ i) hu) | |
| (abs_nonneg _) ((abs_nonneg _).trans (ha u hu i)) | |
| Β· exact intervalIntegrable_const | |
| Β· filter_upwards [hL i] with u hu hu' | |
| rw [uIoc_of_le (by norm_num : (0:β)β€1)] at hu' | |
| exact (hu hu').mul_const _ | |
| end SKFluctuations.Hierarchy | |
| namespace SKFluctuations.Hierarchy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal BigOperators | |
| attribute [local instance] Classical.propDecidable | |
| variable {S ΞΉ : Type*} [Fintype S] [Nonempty S] [Fintype ΞΉ] [Nonempty ΞΉ] | |
| theorem pathDisorderPressure_slope_error {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (C D B : ΞΉ β β) | |
| (hself : β Ο i, (Ο Ο (Pi.single i 1))^2=C i) | |
| (hD : β i, 0β€D i) (hΟ : β Ο 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)) | |
| {t : β} (ht : tβ 0) | |
| (hB : β u β Icc (0:β) 1, β i, |(r u i:β)-(q u i:β)|β€|t| *B i) : | |
| |(pathDisorderPressure w Ο C r 0-pathDisorderPressure w Ο C q 0)/t- | |
| pathPressureRate w Ο q (fun u i => ((r u i:β)-(q u i:β))/t)| β€ | |
| (3/2:β)*ClockTree.errorJetVariation 2 0 0*(β i, B i*(D i)^2)^2*|t| := by | |
| have hd : pathPressureRate w Ο q (fun u i => ((r u i:β)-(q u i:β))/t)= | |
| pathPressureRate w Ο q (fun u i => (r u i:β)-(q u i:β))/t := by | |
| simp only [div_eq_mul_inv,mul_comm _ tβ»ΒΉ] | |
| exact pathPressureRate_const_mul w Ο q _ _ | |
| rw [hd,βsub_div,abs_div] | |
| apply (div_le_iffβ (abs_pos.mpr ht)).mpr | |
| have hbnd := pathDisorderPressure_taylor hw Ο C D (fun i => |t| *B i) hself hD hΟ q r hq hr hB | |
| have hs : (β i, |t| *B i*(D i)^2)=|t| *(β i, B i*(D i)^2) := by | |
| rw [Finset.mul_sum] | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| ring | |
| apply hbnd.trans | |
| rw [hs] | |
| exact le_of_eq (by ring) | |
| end SKFluctuations.Hierarchy | |
| namespace SKFluctuations.Hierarchy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal BigOperators | |
| attribute [local instance] Classical.propDecidable | |
| variable {S ΞΉ : Type*} [Fintype S] [Nonempty S] [Fintype ΞΉ] [Nonempty ΞΉ] | |
| theorem pathDisorderPressure_hasDerivWithinAt_curve {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (C D B : ΞΉ β β) | |
| (hself : β Ο i, (Ο Ο (Pi.single i 1))^2=C i) | |
| (hD : β i, 0β€D i) (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (q : β β β β ΞΉ β ββ₯0) (K : β β ΞΉ β β) (s : Set β) | |
| (hq0 : β i, MonotoneOn (fun u => q 0 u i) (Icc (0:β) 1)) | |
| (hq : βαΆ t in π[s \ {0}] 0, β i, MonotoneOn (fun u => q t u i) (Icc (0:β) 1)) | |
| (hB : βαΆ t in π[s \ {0}] 0, β u β Icc (0:β) 1, β i, | |
| |(q t u i:β)-(q 0 u i:β)|β€|t| *B i) | |
| (hK : β i, βα΅ u βvolume, u β Ioc (0:β) 1 β | |
| Tendsto (fun t => ((q t u i:β)-(q 0 u i:β))/t) (π[s \ {0}] 0) (π (K u i))) : | |
| HasDerivWithinAt (fun t => pathDisorderPressure w Ο C (q t) 0) | |
| (pathPressureRate w Ο (q 0) K) s 0 := by | |
| let L : β β β β ΞΉ β β := fun t u i => ((q t u i:β)-(q 0 u i:β))/t | |
| have hne : βαΆ t in π[s \ {0}] 0, tβ 0 := by | |
| filter_upwards [self_mem_nhdsWithin] with t ht | |
| exact ht.2 | |
| have hlim := pathPressureRate_tendsto hw Ο D B hD hΟ (q 0) hq0 L K | |
| (by | |
| filter_upwards [hq] with t ht i | |
| exact (clockDirection_intervalIntegrable (q 0) (q t) hq0 ht i).div_const t) | |
| (by | |
| filter_upwards [hB,hne] with t ht ht0 u hu i | |
| dsimp [L] | |
| rw [abs_div,div_le_iffβ (abs_pos.mpr ht0)] | |
| simpa only [mul_comm] using ht u β¨hu.1.le,hu.2β© i) | |
| hK | |
| have herr : Tendsto (fun t => | |
| (pathDisorderPressure w Ο C (q t) 0-pathDisorderPressure w Ο C (q 0) 0)/t- | |
| pathPressureRate w Ο (q 0) (L t)) (π[s \ {0}] 0) (π 0) := by | |
| refine squeeze_zero_norm' (a := fun t => | |
| (3/2:β)*ClockTree.errorJetVariation 2 0 0*(β i, B i*(D i)^2)^2*|t|) ?_ ?_ | |
| Β· filter_upwards [hq,hB,hne] with t ht hb ht0 | |
| rw [Real.norm_eq_abs] | |
| exact pathDisorderPressure_slope_error hw Ο C D B hself hD hΟ (q 0) (q t) hq0 ht ht0 hb | |
| Β· simpa only [abs_zero,mul_zero] using | |
| ((continuous_abs.tendsto (0:β)).mono_left nhdsWithin_le_nhds).const_mul | |
| ((3/2:β)*ClockTree.errorJetVariation 2 0 0*(β i, B i*(D i)^2)^2) | |
| rw [hasDerivWithinAt_iff_tendsto_slope] | |
| have hs : slope (fun t => pathDisorderPressure w Ο C (q t) 0) 0 = | |
| fun t => (pathDisorderPressure w Ο C (q t) 0-pathDisorderPressure w Ο C (q 0) 0)/(t-0) := | |
| funext fun t => slope_def_field _ _ _ | |
| rw [hs] | |
| simpa only [sub_zero,sub_add_cancel,zero_add] using herr.add hlim | |
| end SKFluctuations.Hierarchy | |
| namespace SKFluctuations.Hierarchy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal BigOperators | |
| attribute [local instance] Classical.propDecidable | |
| variable {S ΞΉ : Type*} [Fintype S] [Nonempty S] [Fintype ΞΉ] [Nonempty ΞΉ] | |
| theorem pathPressureRate_integral_direction {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (D : ΞΉ β β) (hD : β i, 0β€D i) | |
| (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (p : β β ΞΉ β ββ₯0) (hp : β i, MonotoneOn (fun u => p u i) (Icc (0:β) 1)) | |
| (K : β β ΞΉ β β) (hK : β i, IntervalIntegrable (fun u => K u i) volume 0 1) : | |
| pathPressureRate w Ο p K=-(1/2:β)*β« u in (0:β)..1, | |
| pathPairMoment w Ο p (featureKernel Ο (K u)) u := by | |
| unfold pathPressureRate | |
| rw [βintervalIntegral.integral_finsetSum (fun i _ => | |
| pathPressureRate_direction_integrable hw Ο D hD hΟ p hp K hK i)] | |
| congr 1 | |
| apply intervalIntegral.integral_congr_ae | |
| filter_upwards [] with u hu | |
| rw [uIoc_of_le (by norm_num : (0:β)β€1)] at hu | |
| exact (pathPairMoment_featureKernel hw Ο p hp _ hu).symm | |
| theorem pathPairMoment_mul_intervalIntegrable {w : S β β} (hw : β Ο, 0<w Ο) | |
| (Ο : S β (ΞΉ β β) βL[β] β) (D : ΞΉ β β) (hD : β i, 0β€D i) | |
| (hΟ : β Ο i, |Ο Ο (Pi.single i 1)|β€D i) | |
| (p : β β ΞΉ β ββ₯0) (hp : β i, MonotoneOn (fun u => p u i) (Icc (0:β) 1)) | |
| (P : S β S β β) {B : β} (hB : 0β€B) (hP : β Ο Ο, |P Ο Ο|β€B) | |
| (K : β β β) (hK : IntervalIntegrable K volume 0 1) : | |
| IntervalIntegrable (fun u => K u*pathPairMoment w Ο p P u) volume 0 1 := | |
| intervalIntegrable_mul_bounded hK (pathPairMoment_intervalIntegrable_all hw Ο p hp _) | |
| (fun _ hu => pathPairMoment_bound hw Ο D hD hΟ p hp P hB hP hu) | |
| end SKFluctuations.Hierarchy | |
| namespace SKFluctuations | |
| open MeasureTheory ProbabilityTheory Filter Set Hierarchy | |
| open scoped Topology NNReal BigOperators | |
| def orderedPathClock (n : β) (b h : β β ββ₯0) (u : β) : OrderedFeatureIndex n β ββ₯0 := | |
| Sum.elim (fun _ => h u) (fun _ => b u) | |
| theorem orderedPathClock_monotone (n : β) {b h : β β ββ₯0} | |
| (hb : MonotoneOn b (Icc (0:β) 1)) (hh : MonotoneOn h (Icc (0:β) 1)) : | |
| β i, MonotoneOn (fun u => orderedPathClock n b h u i) (Icc (0:β) 1) := by | |
| intro i | |
| cases i with | |
| | inl i => exact hh | |
| | inr i => exact hb | |
| def orderedSKPathPressure (n : β) (b h : β β ββ₯0) | |
| (x : OrderedFeatureIndex n β β) : β := | |
| pathDisorderPressure (uniformWeight n) (orderedFeature n) (fun i => (orderedAmplitude n i)^2) | |
| (orderedPathClock n b h) x/(n:β) | |
| theorem orderedPathClock_l1 (n : β) (hn : 0<n) (b h b' h' : β β ββ₯0) : | |
| clockL1Distance (orderedAmplitude n) (orderedPathClock n b h) (orderedPathClock n b' h') = | |
| (n:β)*((1/4:β)*(β« u in (0:β)..1, |(b u:β)-(b' u:β)|)+ | |
| (1/2:β)*(β« u in (0:β)..1, |(h u:β)-(h' u:β)|)) := by | |
| unfold clockL1Distance | |
| have he : (β i : OrderedFeatureIndex n, (orderedAmplitude n i)^2* | |
| (β« u in (0:β)..1, |(orderedPathClock n b h u i:β)-(orderedPathClock n b' h' u i:β)|)) = | |
| (n:β)*((β« u in (0:β)..1, |(h u:β)-(h' u:β)|)+ | |
| (β« u in (0:β)..1, |(b u:β)-(b' u:β)|)/2) := by | |
| calc | |
| _ = β i : OrderedFeatureIndex n, Sum.elim | |
| (fun _ => β« u in (0:β)..1, |(h u:β)-(h' u:β)|) | |
| (fun _ => β« u in (0:β)..1, |(b u:β)-(b' u:β)|) i*(orderedAmplitude n i)^2 := by | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| cases i <;> exact mul_comm _ _ | |
| _ = _ := orderedAmplitude_sum n hn _ _ | |
| rw [he] | |
| ring | |
| theorem orderedSKPathPressure_l1_comparison (n : β) (hn : 0<n) | |
| (b h b' h' : β β ββ₯0) | |
| (hb : MonotoneOn b (Icc (0:β) 1)) (hh : MonotoneOn h (Icc (0:β) 1)) | |
| (hb' : MonotoneOn b' (Icc (0:β) 1)) (hh' : MonotoneOn h' (Icc (0:β) 1)) | |
| (x : OrderedFeatureIndex n β β) : | |
| |orderedSKPathPressure n b h x-orderedSKPathPressure n b' h' x| β€ | |
| (1/4:β)*(β« u in (0:β)..1, |(b u:β)-(b' u:β)|)+ | |
| (1/2:β)*(β« u in (0:β)..1, |(h u:β)-(h' u:β)|) := by | |
| let : NeZero n := β¨Nat.ne_of_gt hnβ© | |
| have hnp : 0<(n:β) := Nat.cast_pos.mpr hn | |
| have hd := pathDisorderPressure_l1_comparison (uniformWeight_pos n) (orderedFeature n) | |
| (fun i => (orderedAmplitude n i)^2) (orderedAmplitude n) (orderedFeature_square n) | |
| (fun i Ο => (orderedFeature_abs n Ο i).le) (orderedPathClock n b h) (orderedPathClock n b' h') | |
| (orderedPathClock_monotone n hb hh) (orderedPathClock_monotone n hb' hh') x | |
| rw [orderedPathClock_l1 n hn] at hd | |
| unfold orderedSKPathPressure | |
| rw [β sub_div,abs_div,abs_of_pos hnp] | |
| exact (div_le_iffβ hnp).mpr (by simpa only [mul_comm] using hd) | |
| end SKFluctuations | |
| namespace SKFluctuations | |
| open MeasureTheory ProbabilityTheory Filter Set Hierarchy | |
| open scoped Topology NNReal BigOperators | |
| attribute [local instance] Classical.propDecidable | |
| local instance (n : β) : DecidableEq (OrderedFeatureIndex n) := fun _ _ => Classical.propDecidable _ | |
| def orderedPathPair (n : β) (b h : β β ββ₯0) (P : Spin n β Spin n β β) (u : β) : β := | |
| pathPairMoment (uniformWeight n) (orderedFeature n) (orderedPathClock n b h) P u | |
| def orderedPathS (n : β) (b h : β β ββ₯0) : β β β := | |
| orderedPathPair n b h (orderedOverlap n) | |
| def orderedPathB (n : β) (b h : β β ββ₯0) : β β β := | |
| orderedPathPair n b h (fun Ο Ο => (orderedOverlap n Ο Ο)^2) | |
| theorem orderedPathPair_linear (n : β) (hn : 0<n) (b h : β β ββ₯0) | |
| (hb : MonotoneOn b (Icc (0:β) 1)) (hh : MonotoneOn h (Icc (0:β) 1)) | |
| (P Q : Spin n β Spin n β β) (c d : β) {u : β} (hu : u β Ioc (0:β) 1) : | |
| orderedPathPair n b h (fun Ο Ο => c*P Ο Ο+d*Q Ο Ο) u= | |
| c*orderedPathPair n b h P u+d*orderedPathPair n b h Q u := by | |
| let : NeZero n := β¨Nat.ne_of_gt hnβ© | |
| unfold orderedPathPair | |
| rw [pathPairMoment_add (uniformWeight_pos n) _ _ (orderedPathClock_monotone n hb hh) _ _ hu, | |
| pathPairMoment_const_mul (uniformWeight_pos n) _ _ (orderedPathClock_monotone n hb hh) _ _ hu, | |
| pathPairMoment_const_mul (uniformWeight_pos n) _ _ (orderedPathClock_monotone n hb hh) _ _ hu] | |
| theorem orderedPathPair_direction_integrable (n : β) (hn : 0<n) (b h q r : β β ββ₯0) | |
| (hb : MonotoneOn b (Icc (0:β) 1)) (hh : MonotoneOn h (Icc (0:β) 1)) | |
| (hq : MonotoneOn q (Icc (0:β) 1)) (hr : MonotoneOn r (Icc (0:β) 1)) | |
| (P : Spin n β Spin n β β) : | |
| IntervalIntegrable (fun u => ((r u:β)-(q u:β))*orderedPathPair n b h P u) volume 0 1 := by | |
| let : NeZero n := β¨Nat.ne_of_gt hnβ© | |
| have hi := clockDirection_intervalIntegrable (fun (u : β) (_ : Unit) => q u) (fun (u : β) (_ : Unit) => r u) | |
| (fun _ => hq) (fun _ => hr) () | |
| simpa only [mul_comm,orderedPathPair] using intervalIntegrable_mul_bounded | |
| (pathPairMoment_intervalIntegrable_all (uniformWeight_pos n) (orderedFeature n) | |
| (orderedPathClock n b h) (orderedPathClock_monotone n hb hh) P) hi | |
| (fun u hu => clockDirection_bound (fun (u : β) (_ : Unit) => q u) (fun (u : β) (_ : Unit) => r u) | |
| (fun _ => hq) (fun _ => hr) β¨hu.1.le,hu.2β© ()) | |
| theorem pathPressureRate_ordered (n : β) (hn : 0<n) (b h bβ hβ bβ hβ : β β ββ₯0) | |
| (hb : MonotoneOn b (Icc (0:β) 1)) (hh : MonotoneOn h (Icc (0:β) 1)) | |
| (hbβ : MonotoneOn bβ (Icc (0:β) 1)) (hhβ : MonotoneOn hβ (Icc (0:β) 1)) | |
| (hbβ : MonotoneOn bβ (Icc (0:β) 1)) (hhβ : MonotoneOn hβ (Icc (0:β) 1)) : | |
| pathPressureRate (uniformWeight n) (orderedFeature n) (orderedPathClock n b h) | |
| (fun u i => (orderedPathClock n bβ hβ u i:β)-(orderedPathClock n bβ hβ u i:β))/(n:β)= | |
| -(1/4:β)*(β« u in (0:β)..1, ((bβ u:β)-(bβ u:β))*orderedPathB n b h u)- | |
| (1/2:β)*(β« u in (0:β)..1, ((hβ u:β)-(hβ u:β))*orderedPathS n b h u) := by | |
| let : NeZero n := β¨Nat.ne_of_gt hnβ© | |
| have hk (u : β) : featureKernel (orderedFeature n) | |
| (fun i => (orderedPathClock n bβ hβ u i:β)-(orderedPathClock n bβ hβ u i:β))= | |
| fun Ο Ο => ((n:β)/2*((bβ u:β)-(bβ u:β)))*(orderedOverlap n Ο Ο)^2+ | |
| ((n:β)*((hβ u:β)-(hβ u:β)))*orderedOverlap n Ο Ο := by | |
| funext Ο Ο | |
| have he : (fun i => (orderedPathClock n bβ hβ u i:β)-(orderedPathClock n bβ hβ u i:β))= | |
| Sum.elim (fun _ => (hβ u:β)-(hβ u:β)) (fun _ => (bβ u:β)-(bβ u:β)) := by | |
| funext i; cases i <;> rfl | |
| rw [he] | |
| simp only [featureKernel] | |
| have hs (Ο : Spin n) (i : OrderedFeatureIndex n) : | |
| orderedFeature n Ο (Pi.single i 1)=orderedFeatureCoefficient n Ο i := by | |
| simp [orderedFeature_apply,Pi.single_apply] | |
| simp only [hs] | |
| rw [orderedCovariance n hn] | |
| ring | |
| rw [pathPressureRate_integral (uniformWeight_pos n) _ _ _ _ (orderedPathClock_monotone n hb hh) | |
| (orderedPathClock_monotone n hbβ hhβ) (orderedPathClock_monotone n hbβ hhβ)] | |
| have he : (β« u in (0:β)..1, pathPairMoment (uniformWeight n) (orderedFeature n) | |
| (orderedPathClock n b h) (featureKernel (orderedFeature n) | |
| (fun i => (orderedPathClock n bβ hβ u i:β)-(orderedPathClock n bβ hβ u i:β))) u)= | |
| β« u in (0:β)..1, (n:β)/2*(((bβ u:β)-(bβ u:β))*orderedPathB n b h u)+ | |
| (n:β)*(((hβ u:β)-(hβ u:β))*orderedPathS n b h u) := by | |
| apply intervalIntegral.integral_congr_ae | |
| filter_upwards [] with u hu | |
| rw [uIoc_of_le (by norm_num : (0:β)β€1)] at hu | |
| rw [hk] | |
| change orderedPathPair n b h _ u=_ | |
| rw [orderedPathPair_linear n hn b h hb hh _ _ _ _ hu] | |
| dsimp [orderedPathB,orderedPathS] | |
| ring | |
| rw [he] | |
| change (-(1/2:β)*(β« u in (0:β)..1, (n:β)/2*(((bβ u:β)-(bβ u:β))* | |
| orderedPathPair n b h (fun Ο Ο => (orderedOverlap n Ο Ο)^2) u)+(n:β)* | |
| (((hβ u:β)-(hβ u:β))*orderedPathPair n b h (orderedOverlap n) u)))/(n:β)=_ | |
| rw [intervalIntegral.integral_add | |
| ((orderedPathPair_direction_integrable n hn b h bβ bβ hb hh hbβ hbβ _).const_mul ((n:β)/2)) | |
| ((orderedPathPair_direction_integrable n hn b h hβ hβ hb hh hhβ hhβ _).const_mul (n:β)), | |
| intervalIntegral.integral_const_mul,intervalIntegral.integral_const_mul] | |
| have hn0 : (n:β)β 0 := ne_of_gt (Nat.cast_pos.mpr hn) | |
| dsimp only [orderedPathB,orderedPathS] | |
| field_simp | |
| ring | |
| def affineNNPath (b c : β β ββ₯0) (s : β) (u : β) : ββ₯0 := | |
| Real.toNNReal (1-s)*b u+Real.toNNReal s*c u | |
| theorem affineNNPath_monotone (b c : β β ββ₯0) | |
| (hb : MonotoneOn b (Icc (0:β) 1)) (hc : MonotoneOn c (Icc (0:β) 1)) (s : β) : | |
| MonotoneOn (affineNNPath b c s) (Icc (0:β) 1) := by | |
| intro u hu v hv huv | |
| exact add_le_add (mul_le_mul_of_nonneg_left (hb hu hv huv) zero_le) | |
| (mul_le_mul_of_nonneg_left (hc hu hv huv) zero_le) | |
| theorem orderedSKPathPressure_hasDerivAt (n : β) (hn : 0<n) (b h b' h' : β β ββ₯0) | |
| (hb : MonotoneOn b (Icc (0:β) 1)) (hh : MonotoneOn h (Icc (0:β) 1)) | |
| (hb' : MonotoneOn b' (Icc (0:β) 1)) (hh' : MonotoneOn h' (Icc (0:β) 1)) | |
| {t : β} (ht : t β Ioo (0:β) 1) : | |
| HasDerivAt (fun s => orderedSKPathPressure n (affineNNPath b b' s) (affineNNPath h h' s) 0) | |
| (-(1/4:β)*(β« u in (0:β)..1, ((b' u:β)-(b u:β))* | |
| orderedPathB n (affineNNPath b b' t) (affineNNPath h h' t) u)- | |
| (1/2:β)*(β« u in (0:β)..1, ((h' u:β)-(h u:β))* | |
| orderedPathS n (affineNNPath b b' t) (affineNNPath h h' t) u)) t := by | |
| let : NeZero n := β¨Nat.ne_of_gt hnβ© | |
| have he (s : β) : affineClockPath (orderedPathClock n b h) (orderedPathClock n b' h') s= | |
| orderedPathClock n (affineNNPath b b' s) (affineNNPath h h' s) := by | |
| funext u i; cases i <;> rfl | |
| have hd := (pathDisorderPressure_hasDerivAt (uniformWeight_pos n) (orderedFeature n) | |
| (fun i => (orderedAmplitude n i)^2) (fun Ο i => by | |
| simpa [orderedFeature_apply,Pi.single_apply] using orderedFeature_square n Ο i) | |
| (orderedPathClock n b h) (orderedPathClock n b' h') | |
| (orderedPathClock_monotone n hb hh) (orderedPathClock_monotone n hb' hh') ht).div_const (n:β) | |
| simp_rw [he] at hd | |
| rw [pathPressureRate_ordered n hn _ _ b h b' h' | |
| (affineNNPath_monotone b b' hb hb' t) (affineNNPath_monotone h h' hh hh' t) hb hh hb' hh'] at hd | |
| exact hd | |
| end SKFluctuations | |
| end | |
| end OAI | |