Download data/lean/OAI/Analysis/HardSphere/Cutoffs/PathDiameter.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 8.88 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/Cutoffs/PathDiameter.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/HardSphere/Cutoffs/PathDiameter.lean
-
curl -L -o PathDiameter.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/Cutoffs/PathDiameter.lean
8.88 kB
| import Mathlib | |
| import OAI.Analysis.HardSphere.Conditioning.ReverseConfigurationPath | |
| import OAI.Analysis.HardSphere.Bridges.NormalizedPrefix | |
| import OAI.Analysis.HardSphere.Geometry.InjectiveNear | |
| namespace OAI | |
| noncomputable section | |
| open MeasureTheory Set Filter ProbabilityTheory | |
| open scoped ENNReal NNReal Topology BigOperators | |
| namespace HardSphere.PathCutoff | |
| open Wiener | |
| torusDistance freeTrajectory | |
| def intervalTime (a b s : Time) : Time := | |
| β¨(1-(s:β))*(a:β)+(s:β)*(b:β), by | |
| constructor | |
| Β· exact add_nonneg (mul_nonneg (sub_nonneg.mpr s.property.2) a.property.1) (mul_nonneg s.property.1 b.property.1) | |
| Β· nlinarith [a.property.1,a.property.2,b.property.1,b.property.2, | |
| s.property.1,s.property.2,mul_nonneg (sub_nonneg.mpr s.property.2) (sub_nonneg.mpr a.property.2), | |
| mul_nonneg s.property.1 (sub_nonneg.mpr b.property.2)]β© | |
| lemma intervalTime_continuous (a b : Time) : Continuous (intervalTime a b) := by | |
| apply Continuous.subtype_mk | |
| fun_prop | |
| lemma intervalTime_zero (a b : Time) : intervalTime a b 0=a := by | |
| apply Subtype.ext | |
| simp [intervalTime] | |
| lemma intervalTime_one (a b : Time) : intervalTime a b 1=b := by | |
| apply Subtype.ext | |
| simp [intervalTime] | |
| def diameterMap {L : Length} (a b : Time) (Ο : ConfigurationPath 1 L) : C(TimeΓTime,β) := | |
| β¨fun p β¦ torusDistance L (Ο (intervalTime a b p.1) 0) (Ο (intervalTime a b p.2) 0), by | |
| apply (torusDistance_continuous_pair L).comp (f := fun p : TimeΓTime β¦ (Ο (intervalTime a b p.1) 0,Ο (intervalTime a b p.2) 0)) | |
| exact ((continuous_apply 0).comp (Ο.continuous.comp ((intervalTime_continuous a b).comp continuous_fst))).prodMk | |
| ((continuous_apply 0).comp (Ο.continuous.comp ((intervalTime_continuous a b).comp continuous_snd)))β© | |
| def intervalDiameter {L : Length} (a b : Time) (Ο : ConfigurationPath 1 L) : β := | |
| βdiameterMap a b Οβ | |
| lemma diameterMap_continuous (L : Length) (a b : Time) : Continuous (diameterMap (L:=L) a b) := by | |
| apply ContinuousMap.continuous_of_continuous_uncurry | |
| change Continuous (fun p : ConfigurationPath 1 L Γ (TimeΓTime) β¦ | |
| torusDistance L (p.1 (intervalTime a b p.2.1) 0) (p.1 (intervalTime a b p.2.2) 0)) | |
| apply (torusDistance_continuous_pair L).comp (f := fun p : ConfigurationPath 1 LΓ(TimeΓTime) β¦ (p.1 (intervalTime a b p.2.1) 0,p.1 (intervalTime a b p.2.2) 0)) | |
| apply Continuous.prodMk | |
| Β· exact (continuous_apply 0).comp (continuous_fst.eval ((intervalTime_continuous a b).comp (continuous_fst.comp continuous_snd))) | |
| Β· exact (continuous_apply 0).comp (continuous_fst.eval ((intervalTime_continuous a b).comp (continuous_snd.comp continuous_snd))) | |
| lemma intervalDiameter_continuous (L : Length) (a b : Time) : | |
| Continuous (intervalDiameter (L:=L) a b) := (diameterMap_continuous L a b).norm | |
| lemma intervalDiameter_nonneg {L : Length} (a b : Time) (Ο : ConfigurationPath 1 L) : | |
| 0 β€ intervalDiameter a b Ο := norm_nonneg _ | |
| lemma intervalDistance_le {L : Length} (a b s q : Time) (Ο : ConfigurationPath 1 L) : | |
| torusDistance L (Ο (intervalTime a b s) 0) (Ο (intervalTime a b q) 0) β€ intervalDiameter a b Ο := by | |
| exact (le_abs_self _).trans (ContinuousMap.norm_coe_le_norm (diameterMap a b Ο) (s,q)) | |
| lemma intervalDiameter_le {L : Length} (a b : Time) (Ο : ConfigurationPath 1 L) {R : β} (hR : 0 β€ R) | |
| (h : β s q, torusDistance L (Ο (intervalTime a b s) 0) (Ο (intervalTime a b q) 0) β€ R) : | |
| intervalDiameter a b Ο β€ R := by | |
| apply (ContinuousMap.norm_le _ hR).mpr | |
| intro p | |
| change |torusDistance L _ _| β€ R | |
| rw [abs_of_nonneg (by unfold torusDistance; positivity)] | |
| exact h p.1 p.2 | |
| lemma intervalTime_reverse (a b s : Time) : | |
| reverseTime (intervalTime a b s)=intervalTime (reverseTime b) (reverseTime a) (reverseTime s) := by | |
| apply Subtype.ext | |
| change 1-((1-(s:β))*(a:β)+(s:β)*(b:β)) = (1-(1-(s:β)))*(1-(b:β))+(1-(s:β))*(1-(a:β)) | |
| ring | |
| lemma intervalDiameter_reverse {L : Length} (a b : Time) (Ο : ConfigurationPath 1 L) : | |
| intervalDiameter a b (reverseConfigurationPath 1 L Ο)= | |
| intervalDiameter (reverseTime b) (reverseTime a) Ο := by | |
| apply le_antisymm | |
| Β· apply intervalDiameter_le _ _ _ (intervalDiameter_nonneg _ _ _) | |
| intro s q | |
| change torusDistance L (Ο (reverseTime (intervalTime a b s)) 0) | |
| (Ο (reverseTime (intervalTime a b q)) 0) β€ _ | |
| simp only [intervalTime_reverse] | |
| exact intervalDistance_le _ _ _ _ _ | |
| Β· have hh : reverseTime (reverseTime a)=a := reverseTime_reverse _ | |
| have hh' : reverseTime (reverseTime b)=b := reverseTime_reverse _ | |
| apply intervalDiameter_le _ _ _ (intervalDiameter_nonneg _ _ _) | |
| intro s q | |
| have h := intervalDistance_le a b (reverseTime s) (reverseTime q) (reverseConfigurationPath 1 L Ο) | |
| change torusDistance L (Ο (reverseTime (intervalTime a b (reverseTime s))) 0) | |
| (Ο (reverseTime (intervalTime a b (reverseTime q))) 0) β€ _ at h | |
| simpa only [intervalTime_reverse,reverseTime_reverse] using h | |
| end HardSphere.PathCutoff | |
| namespace HardSphere.PathCutoff | |
| open Wiener | |
| torusDistance freeTrajectory | |
| def meshTime {m : β} (j : Fin m) (s : Time) : Time := | |
| β¨((j:β)+(s:β))/(m:β), by | |
| have hm : (0:β) < m := by exact_mod_cast j.pos | |
| refine β¨div_nonneg (add_nonneg (Nat.cast_nonneg _) s.property.1) hm.le,(div_le_one hm).mpr ?_β© | |
| have hj : (j:β)+1β€(m:β) := by exact_mod_cast j.isLt | |
| linarith [s.property.2]β© | |
| lemma meshTime_continuous {m : β} (j : Fin m) : Continuous (meshTime j) := by | |
| apply Continuous.subtype_mk | |
| fun_prop | |
| def meshSegment {m : β} {L : Length} (j : Fin m) (Ο : ConfigurationPath 1 L) : ConfigurationPath 1 L := | |
| β¨fun s β¦ Ο (meshTime j s),Ο.continuous.comp (meshTime_continuous j)β© | |
| lemma meshSegment_continuous {m : β} (L : Length) (j : Fin m) : | |
| Continuous (meshSegment (L:=L) j) := by | |
| apply ContinuousMap.continuous_of_continuous_uncurry | |
| change Continuous (fun p : ConfigurationPath 1 LΓTime β¦ p.1 (meshTime j p.2)) | |
| exact continuous_fst.eval ((meshTime_continuous j).comp continuous_snd) | |
| lemma meshSegment_one {L : Length} (Ο : ConfigurationPath 1 L) : | |
| meshSegment (0:Fin 1) Ο=Ο := by | |
| apply ContinuousMap.ext | |
| intro s | |
| change Ο (meshTime (0:Fin 1) s)=Ο s | |
| congr 1 | |
| apply Subtype.ext | |
| simp [meshTime] | |
| lemma mesh_firstTime {m : β} (hm : 0 < m) (s : Time) : | |
| meshTime (0:Fin (m+1)) s=prefixTime (splitTime 1 (m:β) (by norm_num) (by exact_mod_cast hm)) s := by | |
| apply Subtype.ext | |
| simp only [meshTime,Fin.val_zero,Nat.cast_zero,zero_add,prefixTime,ContinuousMap.coe_mk,splitTime,Nat.cast_add,Nat.cast_one] | |
| ring | |
| lemma mesh_nextTime {m : β} (hm : 0 < m) (j : Fin m) (s : Time) : | |
| meshTime j.succ s=suffixTime (splitTime 1 (m:β) (by norm_num) (by exact_mod_cast hm)) (meshTime j s) := by | |
| apply Subtype.ext | |
| have hm' : (m:β)β 0 := by exact_mod_cast (Nat.ne_of_gt hm) | |
| have hm1 : (1:β)+mβ 0 := by positivity | |
| simp only [meshTime,Fin.val_succ,suffixTime,ContinuousMap.coe_mk,splitTime,Nat.cast_add,Nat.cast_one] | |
| field_simp | |
| ring | |
| lemma meshSegment_first {m : β} {L : Length} (hm : 0 < m) (Ο : ConfigurationPath 1 L) : | |
| meshSegment (0:Fin (m+1)) Ο=configurationPrefix 1 L (splitTime 1 (m:β) (by norm_num) (by exact_mod_cast hm)) Ο := by | |
| ext s i j | |
| exact congrArg (fun u : Time β¦ Ο u i j) (mesh_firstTime hm s) | |
| lemma meshSegment_next {m : β} {L : Length} (hm : 0 < m) (j : Fin m) (Ο : ConfigurationPath 1 L) : | |
| meshSegment j.succ Ο=meshSegment j (configurationSuffix 1 L (splitTime 1 (m:β) (by norm_num) (by exact_mod_cast hm)) Ο) := by | |
| ext s i k | |
| exact congrArg (fun u : Time β¦ Ο u i k) (mesh_nextTime hm j s) | |
| lemma meshTime_reverse {m : β} (j : Fin m) (s : Time) : | |
| reverseTime (meshTime j s)=meshTime j.rev (reverseTime s) := by | |
| apply Subtype.ext | |
| have hm : (m:β)β 0 := by exact_mod_cast (Nat.ne_of_gt j.pos) | |
| change 1-((j:β)+(s:β))/(m:β)=((j.rev:β)+(1-(s:β)))/(m:β) | |
| have hj : (j.rev:β)=(m:β)-1-(j:β) := by | |
| rw [Fin.val_rev,Nat.cast_sub (by omega)] | |
| push_cast | |
| ring | |
| rw [hj] | |
| field_simp | |
| ring | |
| lemma meshSegment_reverse {m : β} {L : Length} (j : Fin m) (Ο : ConfigurationPath 1 L) : | |
| meshSegment j (reverseConfigurationPath 1 L Ο)=reverseConfigurationPath 1 L (meshSegment j.rev Ο) := by | |
| ext s i k | |
| exact congrArg (fun u : Time β¦ Ο u i k) (meshTime_reverse j s) | |
| lemma mesh_sum_reverse {m : β} {L : Length} (F : ConfigurationPath 1 Lββ) | |
| (hF : βΟ,F (reverseConfigurationPath 1 L Ο)=F Ο) (Ο : ConfigurationPath 1 L) : | |
| β j : Fin m,F (meshSegment j (reverseConfigurationPath 1 L Ο))= | |
| β j : Fin m,F (meshSegment j Ο) := by | |
| simp only [meshSegment_reverse,hF] | |
| exact Equiv.sum_comp (Fin.revPerm) (fun j : Fin m β¦ F (meshSegment j Ο)) | |
| end HardSphere.PathCutoff | |
| end | |
| end OAI | |