import Mathlib import OAI.Analysis.HardSphere.Bridges.PrefixMap import OAI.Analysis.HardSphere.Geometry.ConfigurationPath namespace OAI noncomputable section open MeasureTheory Filter Set open scoped ENNReal Topology BigOperators open scoped BigOperators ComplexConjugate open MeasureTheory ProbabilityTheory Filter Set open scoped ENNReal NNReal Topology BigOperators open MeasureTheory ProbabilityTheory Real Complex open scoped ENNReal ComplexConjugate namespace HardSphere namespace Wiener def normalizedPrefix (u : Time) : C(Time,ℝ) →L[ℝ] C(Time,ℝ) := (Real.sqrt (u:ℝ))⁻¹ • prefixMap u def normalizedSuffix (u : Time) : C(Time,ℝ) →L[ℝ] C(Time,ℝ) := (Real.sqrt (1-(u:ℝ)))⁻¹ • suffixMap u lemma normalized_split_preserving (u : Time) (hu : 0<(u:ℝ)) (hu' : (u:ℝ)<1) : MeasurePreserving (fun w : C(Time,ℝ) ↦ (normalizedPrefix u w,normalizedSuffix u w)) wiener (wiener.prod wiener) := by have hm : Measurable (fun w : C(Time,ℝ) ↦ (prefixMap u w,suffixMap u w)) := by fun_prop have heq : wiener.map (fun w : C(Time,ℝ) ↦ (prefixMap u w,suffixMap u w)) = (wiener.map (fun f ↦ Real.sqrt (u:ℝ) • f)).prod (wiener.map (fun f ↦ Real.sqrt (1-(u:ℝ)) • f)) := by rw [wiener,Measure.map_map hm measurable_path] exact split_path_law u refine ⟨by fun_prop,?_⟩ rw [Measure.map_prod_map _ _ (by fun_prop) (by fun_prop)] at heq have hh := congrArg (fun μ : Measure (C(Time,ℝ) × C(Time,ℝ)) ↦ μ.map (fun p ↦ ((Real.sqrt (u:ℝ))⁻¹ • p.1,(Real.sqrt (1-(u:ℝ)))⁻¹ • p.2))) heq rw [Measure.map_map (by fun_prop) hm, Measure.map_map (by fun_prop) (by fun_prop)] at hh simpa only [normalizedPrefix,normalizedSuffix,smul_apply, Function.comp_def,Prod.map,smul_smul, inv_mul_cancel₀ (ne_of_gt (Real.sqrt_pos.mpr hu)), inv_mul_cancel₀ (ne_of_gt (Real.sqrt_pos.mpr (sub_pos.mpr hu'))), one_smul,Prod.mk.eta,Measure.map_id'] using hh end Wiener open Wiener def splitTime (s t : ℝ) (hs : 0.comp (continuous_fst.fst.prodMk continuous_snd)).prodMk (freeTrajectory_continuous N L t |>.comp (continuous_fst.snd.prodMk ((freeTrajectory_continuous N L s |>.comp (continuous_fst.fst.prodMk continuous_snd)).eval continuous_const)))).measurable rw [freePathLaw,Measure.map_map ((configurationPrefix_continuous N L _).prodMk (configurationSuffix_continuous N L _)).measurable (freeTrajectory_continuous N L (s+t)).measurable,← h.map_eq,Measure.map_map hm h.measurable] congr 1 funext p apply Prod.ext · exact prefix_freeTrajectory N L s t hs ht p.1 p.2 · dsimp only [Function.comp_def,Prod.map,id_eq] rw [suffix_freeTrajectory N L s t hs ht] congr 1 have heq := congrArg (fun ω : ConfigurationPath N L ↦ ω 1) (prefix_freeTrajectory N L s t hs ht p.1 p.2) simpa only [configurationPrefix,ContinuousMap.comp_apply,prefixTime_one] using heq end HardSphere end end OAI