Download data/lean/OAI/Analysis/HardSphere/Bridges/BridgeSplit.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 7.93 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/Bridges/BridgeSplit.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/HardSphere/Bridges/BridgeSplit.lean
-
curl -L -o BridgeSplit.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/HardSphere/Bridges/BridgeSplit.lean
7.93 kB
| import Mathlib | |
| import OAI.Analysis.HardSphere.Bridges.BridgeResidual | |
| namespace OAI | |
| section | |
| section | |
| noncomputable section | |
| open MeasureTheory Set Filter ProbabilityTheory | |
| open scoped ENNReal NNReal Topology BigOperators | |
| namespace HardSphere.Wiener | |
| def bridgePrefix (u : Time) : C(Time,β) βL[β] C(Time,β) := centerMap.comp (prefixMap u) | |
| lemma bridgePrefix_apply (u : Time) (f : C(Time,β)) (s : Time) : | |
| bridgePrefix u f s=f (prefixTime u s)-(s:β)*f u := by | |
| simp only [bridgePrefix,ContinuousLinearMap.comp_apply,centerMap_apply,prefixMap_apply] | |
| congr 2 | |
| congr 1 | |
| apply Subtype.ext | |
| simp [prefixTime] | |
| lemma bridgePrefix_eq (u : Time) (Ο : Noise) : | |
| bridgePrefix u (bridge Ο)=centerMap (prefixMap u (path Ο)) := by | |
| ext s | |
| simp only [bridgePrefix_apply,bridge_apply,centerMap_apply,prefixMap_apply] | |
| have he : prefixTime u 1=u := by ext; simp [prefixTime] | |
| rw [he] | |
| change path Ο (prefixTime u s)-((u:β)*(s:β))*path Ο 1- | |
| (s:β)*(path Ο u-(u:β)*path Ο 1)=_ | |
| ring | |
| lemma bridgePrefix_law (u : Time) : | |
| law.map (fun Ο β¦ bridgePrefix u (bridge Ο))= | |
| bridgeLaw.map (fun Ξ² β¦ Real.sqrt (u:β) β’ Ξ²) := by | |
| calc | |
| _ = (law.map (fun Ο β¦ prefixMap u (path Ο))).map centerMap := by | |
| rw [Measure.map_map (f:=fun Ο β¦ prefixMap u (path Ο)) centerMap.continuous.measurable | |
| ((prefixMap u).continuous.measurable.comp measurable_path)] | |
| congr 1 | |
| funext Ο | |
| exact bridgePrefix_eq u Ο | |
| _ = _ := by | |
| rw [prefix_law,Measure.map_map (f:=fun Ο β¦ Real.sqrt (u:β) β’ path Ο) centerMap.continuous.measurable ((show Continuous (fun w : C(Time,β) β¦ Real.sqrt (u:β) β’ w) from by fun_prop).measurable.comp measurable_path), | |
| bridgeLaw,Measure.map_map (by fun_prop) measurable_bridge] | |
| congr 1 | |
| funext Ο | |
| exact (centerMap.map_smul _ _).trans (congrArg (fun Ξ² β¦ Real.sqrt (u:β) β’ Ξ²) (centerMap_path Ο)) | |
| lemma prefixRemainder_gaussian (u : Time) : | |
| IsGaussianProcess (Sum.elim (fun s Ο β¦ prefixMap u (bridge Ο) s) | |
| (fun s Ο β¦ bridgeRemainder u (bridge Ο) s)) law := by | |
| classical | |
| constructor | |
| intro I | |
| let loc : Option I β Time := fun i β¦ i.elim u | |
| (fun j β¦ j.val.elim (prefixTime u) (suffixTime u)) | |
| let ev (i : Option I) : (Option I β β) βL[β] β := ContinuousLinearMap.proj i | |
| let L : (Option I β β) βL[β] (I β β) := ContinuousLinearMap.pi | |
| (fun j β¦ match j.val with | |
| | .inl _ => ev (some j) | |
| | .inr s => ev (some j) - (1-(s:β)) β’ ev none) | |
| convert! (finite_bridge_gaussian loc).map_fun L using 1 | |
| funext Ο j | |
| cases hj : j.val <;> simp [L,loc,ev,hj] | |
| lemma prefixRemainder_independent (u : Time) : | |
| IndepFun (fun Ο β¦ prefixMap u (bridge Ο)) (fun Ο β¦ bridgeRemainder u (bridge Ο)) law := by | |
| have hc (a s : Time) : | |
| cov[fun Ο β¦ prefixMap u (bridge Ο) a,fun Ο β¦ bridgeRemainder u (bridge Ο) s;law]=0 := by | |
| simp only [prefixMap_apply,bridgeRemainder_apply] | |
| rw [covariance_fun_sub_right (bridge_eval_law _).hasGaussianLaw.memLp_two | |
| (bridge_eval_law _).hasGaussianLaw.memLp_two ((bridge_eval_law u).hasGaussianLaw.memLp_two.const_mul _), | |
| covariance_const_mul_right,bridge_covariance,bridge_covariance, | |
| min_eq_left ((prefixTime_le u a).trans (le_suffixTime u s)),min_eq_left (prefixTime_le u a)] | |
| change (u:β)*(a:β)-((u:β)*(a:β))*((u:β)+(1-(u:β))*(s:β))- | |
| (1-(s:β))*((u:β)*(a:β)-((u:β)*(a:β))*(u:β))=0 | |
| ring | |
| have hi := (prefixRemainder_gaussian u).indepFun_of_covariance_eq_zero | |
| (fun s β¦ ((continuous_eval_const s).measurable.comp ((prefixMap u).continuous.measurable.comp measurable_bridge)).aemeasurable) | |
| (fun s β¦ ((continuous_eval_const s).measurable.comp ((bridgeRemainder u).continuous.measurable.comp measurable_bridge)).aemeasurable) hc | |
| have hid := hi.comp | |
| (Measurable.of_eval fun n β¦ measurable_pi_apply (TopologicalSpace.denseSeq Time n)) | |
| (Measurable.of_eval fun n β¦ measurable_pi_apply (TopologicalSpace.denseSeq Time n)) | |
| have hh := hid.comp denseEval_embedding.measurable_invFun denseEval_embedding.measurable_invFun | |
| convert hh using 1 <;> funext Ο <;> exact (denseEval_embedding.leftInverse_invFun _).symm | |
| lemma prefixValue_gaussian (u : Time) : | |
| IsGaussianProcess (Sum.elim (fun _ : Unit β¦ fun Ο β¦ bridge Ο u) | |
| (fun s Ο β¦ bridgePrefix u (bridge Ο) s)) law := by | |
| classical | |
| constructor | |
| intro I | |
| let loc : Option I β Time := fun i β¦ i.elim u | |
| (fun j β¦ j.val.elim (fun _ β¦ u) (prefixTime u)) | |
| let ev (i : Option I) : (Option I β β) βL[β] β := ContinuousLinearMap.proj i | |
| let L : (Option I β β) βL[β] (I β β) := ContinuousLinearMap.pi | |
| (fun j β¦ match j.val with | |
| | .inl _ => ev (some j) | |
| | .inr s => ev (some j) - (s:β) β’ ev none) | |
| convert! (finite_bridge_gaussian loc).map_fun L using 1 | |
| funext Ο j | |
| cases hj : j.val <;> simp [L,loc,ev,hj] | |
| lemma prefixValue_independent (u : Time) : | |
| IndepFun (fun Ο β¦ bridge Ο u) (fun Ο β¦ bridgePrefix u (bridge Ο)) law := by | |
| have hc (_ : Unit) (s : Time) : | |
| cov[fun Ο β¦ bridge Ο u,fun Ο β¦ bridgePrefix u (bridge Ο) s;law]=0 := by | |
| simp only [bridgePrefix_apply] | |
| rw [covariance_fun_sub_right (bridge_eval_law _).hasGaussianLaw.memLp_two | |
| (bridge_eval_law _).hasGaussianLaw.memLp_two ((bridge_eval_law u).hasGaussianLaw.memLp_two.const_mul _), | |
| covariance_const_mul_right,bridge_covariance,bridge_covariance, | |
| min_eq_right (prefixTime_le u s),min_self] | |
| change (u:β)*(s:β)-(u:β)*((u:β)*(s:β))- | |
| (s:β)*((u:β)-(u:β)*(u:β))=0 | |
| ring | |
| have hi := (prefixValue_gaussian u).indepFun_of_covariance_eq_zero | |
| (fun _ β¦ ((continuous_eval_const u).measurable.comp measurable_bridge).aemeasurable) | |
| (fun s β¦ ((continuous_eval_const s).measurable.comp ((bridgePrefix u).continuous.measurable.comp measurable_bridge)).aemeasurable) hc | |
| have hid := hi.comp (measurable_pi_apply ()) | |
| (Measurable.of_eval fun n β¦ measurable_pi_apply (TopologicalSpace.denseSeq Time n)) | |
| have hh := hid.comp measurable_id denseEval_embedding.measurable_invFun | |
| convert hh using 1 | |
| Β· rfl | |
| Β· funext Ο | |
| exact (denseEval_embedding.leftInverse_invFun _).symm | |
| lemma bridge_three_law (u : Time) : | |
| bridgeLaw.map (fun Ξ² β¦ ((Ξ² u,bridgePrefix u Ξ²),bridgeRemainder u Ξ²))= | |
| ((gaussianReal 0 (Real.toNNReal ((u:β)-(u:β)^2))).prod | |
| (bridgeLaw.map (fun Ξ² β¦ Real.sqrt (u:β) β’ Ξ²))).prod | |
| (bridgeLaw.map (fun Ξ² β¦ Real.sqrt (1-(u:β)) β’ Ξ²)) := by | |
| have hi := (prefixRemainder_independent u).comp | |
| (show Measurable (fun f : C(Time,β) β¦ (f 1,centerMap f)) from by fun_prop) measurable_id | |
| have he : (fun Ο β¦ (prefixMap u (bridge Ο) 1,centerMap (prefixMap u (bridge Ο))))= | |
| (fun Ο β¦ (bridge Ο u,bridgePrefix u (bridge Ο))) := by | |
| funext Ο | |
| apply Prod.ext | |
| Β· simp only [prefixMap_apply] | |
| congr 1 | |
| apply Subtype.ext | |
| simp [prefixTime] | |
| Β· rfl | |
| simp only [Function.comp_def,id_eq] at hi | |
| rw [he] at hi | |
| rw [bridgeLaw,Measure.map_map (by fun_prop) measurable_bridge] | |
| simp only [Function.comp_def] | |
| have hh := hi.map_prod_eq_prod_map_map | |
| ((((continuous_eval_const u).measurable.comp measurable_bridge).prodMk | |
| ((bridgePrefix u).continuous.measurable.comp measurable_bridge)).aemeasurable) | |
| (((bridgeRemainder u).continuous.measurable.comp measurable_bridge).aemeasurable) | |
| simp only [Function.comp_def] at hh | |
| rw [hh] | |
| have hp := (prefixValue_independent u).map_prod_eq_prod_map_map | |
| ((continuous_eval_const u).measurable.comp measurable_bridge).aemeasurable | |
| ((bridgePrefix u).continuous.measurable.comp measurable_bridge).aemeasurable | |
| simp only [Function.comp_def] at hp | |
| rw [hp,(bridge_eval_law u).map_eq,bridgePrefix_law,bridgeRemainder_law] | |
| rfl | |
| end HardSphere.Wiener | |
| end | |
| end | |
| end | |
| end OAI | |