import Mathlib import OAI.Analysis.HardSphere.Comparison.DensityForcesTwoParticles import OAI.Analysis.HardSphere.Geometry.GroundPathWeight namespace OAI namespace HardSphere open MeasureTheory Wiener Set Filter open scoped ComplexConjugate ENNReal Topology BigOperators noncomputable section variable {N : ℕ} {L : Length} def weightedKilledTransition (N : ℕ) (L : Length) (a t : ℝ) (h : ConfigurationPath N L → ℂ) (hh : MemLp h ∞ (freePathLaw N L t)) : ScalarL2 N L →L[ℂ] ScalarL2 N L := (endpointPull N L t 0).toContinuousLinearMap.adjoint ∘L (L2Multiplier.clm h hh ∘L (avoidanceMultiplier N L a t ∘L (endpointPull N L t 1).toContinuousLinearMap)) lemma weightedKilledTransition_pairing (N : ℕ) (L : Length) (a t : ℝ) (h : ConfigurationPath N L → ℂ) (hh : MemLp h ∞ (freePathLaw N L t)) (f g : ScalarL2 N L) : inner ℂ f (weightedKilledTransition N L a t h hh g) = ∫ ω, conj (f (ω 0)) * (h ω*g (ω 1)) ∂killedPathLaw N L a t := by rw [weightedKilledTransition,ContinuousLinearMap.comp_apply, ContinuousLinearMap.adjoint_inner_right,L2.inner_def] change (∫ ω, inner ℂ (endpointPull N L t 0 f ω) (L2Multiplier.clm h hh (avoidanceMultiplier N L a t (endpointPull N L t 1 g)) ω) ∂freePathLaw N L t)=_ rw [killedPathLaw,← integral_indicator (staysAllowed_open N L a).measurableSet] apply integral_congr_ae filter_upwards [endpointPull_ae N L t 0 f,endpointPull_ae N L t 1 g, L2Multiplier.coe_clm h hh (avoidanceMultiplier N L a t (endpointPull N L t 1 g)), avoidanceMultiplier_ae N L a t (endpointPull N L t 1 g)] with ω hf hg hh' ha rw [hh',ha,hf] by_cases hω : ω∈staysAllowed N L a · simp only [Set.indicator_of_mem hω,hg,RCLike.inner_apply,mul_comm] · simp only [Set.indicator_of_notMem hω,mul_zero,inner_zero_right] def weightedKilledAverage (N : ℕ) (L : Length) (a t : ℝ) (h : ConfigurationPath N L → ℂ) (g : Configuration N L → ℂ) (X : Configuration N L) : ℂ := ∫ w, h (freeTrajectory N L t w X)* killedObservable N L a g (freeTrajectory N L t w X) ∂coordinateWiener N lemma weightedKilledAverage_measurable (N : ℕ) (L : Length) (a t : ℝ) {h : ConfigurationPath N L → ℂ} (hh : Measurable h) {g : Configuration N L → ℂ} (hg : Measurable g) : Measurable (weightedKilledAverage N L a t h g) := by exact (((hh.mul (killedObservable_measurable N L a hg)).comp (freeTrajectory_continuous N L t).measurable).stronglyMeasurable.integral_prod_left').measurable lemma weightedKilledAverage_bound (N : ℕ) (L : Length) (a t : ℝ) {h : ConfigurationPath N L → ℂ} {B : ℝ} (hB : 0≤B) (hhB : ∀ ω, ‖h ω‖≤B) {g : Configuration N L → ℂ} {C : ℝ} (hC : 0≤C) (hgC : ∀ X, ‖g X‖≤C) (X : Configuration N L) : ‖weightedKilledAverage N L a t h g X‖≤B*C := by have hb (w : CoordinatePaths N) : ‖h (freeTrajectory N L t w X)* killedObservable N L a g (freeTrajectory N L t w X)‖≤B*C := by rw [norm_mul] exact mul_le_mul (hhB _) (killedObservable_bound N L a hC hgC _) (norm_nonneg _) hB simpa only [weightedKilledAverage,measureReal_def,measure_univ,ENNReal.toReal_one,mul_one] using norm_integral_le_of_norm_le_const (μ := coordinateWiener N) (Eventually.of_forall hb) lemma weightedKilledAverage_memLp (N : ℕ) (L : Length) (a t : ℝ) {h : ConfigurationPath N L → ℂ} (hh : Measurable h) {B : ℝ} (hB : 0≤B) (hhB : ∀ ω, ‖h ω‖≤B) {g : Configuration N L → ℂ} (hg : Measurable g) {C : ℝ} (hC : 0≤C) (hgC : ∀ X, ‖g X‖≤C) : MemLp (weightedKilledAverage N L a t h g) 2 (volume : Measure (Configuration N L)) := MemLp.of_bound (weightedKilledAverage_measurable N L a t hh hg).aestronglyMeasurable (B*C) (Eventually.of_forall (weightedKilledAverage_bound N L a t hB hhB hC hgC)) lemma integrable_weightedAverage_pairing (N : ℕ) (L : Length) (a t : ℝ) (f : C(Configuration N L,ℂ)) {h : ConfigurationPath N L → ℂ} (hh : Measurable h) {B : ℝ} (hB : 0≤B) (hhB : ∀ ω, ‖h ω‖≤B) {g : Configuration N L → ℂ} (hg : Measurable g) {C : ℝ} (hC : 0≤C) (hgC : ∀ X, ‖g X‖≤C) : Integrable (fun p : CoordinatePaths N × Configuration N L ↦ conj (f p.2) * (h (freeTrajectory N L t p.1 p.2)* killedObservable N L a g (freeTrajectory N L t p.1 p.2))) ((coordinateWiener N).prod volume) := by refine (integrable_const (‖f‖*(B*C))).mono' ?_ ?_ · exact (((f.continuous.comp continuous_snd).star.measurable).mul ((hh.mul (killedObservable_measurable N L a hg)).comp (freeTrajectory_continuous N L t).measurable)).aestronglyMeasurable · exact Eventually.of_forall fun p ↦ by simp only [norm_mul,RCLike.norm_conj] exact mul_le_mul (f.norm_coe_le_norm p.2) (mul_le_mul (hhB _) (killedObservable_bound N L a hC hgC _) (norm_nonneg _) hB) (mul_nonneg (norm_nonneg _) (norm_nonneg _)) (norm_nonneg _) lemma weightedKilledTransition_bounded_pairing (N : ℕ) (L : Length) (a t : ℝ) (f : C(Configuration N L,ℂ)) {h : ConfigurationPath N L → ℂ} (hh : Measurable h) (hhLp : MemLp h ∞ (freePathLaw N L t)) {B : ℝ} (hB : 0≤B) (hhB : ∀ ω, ‖h ω‖≤B) {g : Configuration N L → ℂ} (hg : Measurable g) (hgLp : MemLp g 2 (volume : Measure (Configuration N L))) {C : ℝ} (hC : 0≤C) (hgC : ∀ X, ‖g X‖≤C) : inner ℂ (ContinuousMap.toLp 2 volume ℂ f) (weightedKilledTransition N L a t h hhLp (hgLp.toLp g)) = ∫ X, conj (f X) * weightedKilledAverage N L a t h g X := by rw [weightedKilledTransition_pairing,killedPathLaw, ← integral_indicator (staysAllowed_open N L a).measurableSet] have he : (staysAllowed N L a).indicator (fun ω : ConfigurationPath N L ↦ conj (ContinuousMap.toLp 2 volume ℂ f (ω 0)) * (h ω*hgLp.toLp g (ω 1))) =ᵐ[freePathLaw N L t] (fun ω ↦ conj (f (ω 0)) * (h ω*killedObservable N L a g ω)) := by filter_upwards [(freePathLaw_marginal N L t 0).quasiMeasurePreserving.ae (ContinuousMap.coeFn_toLp (𝕜 := ℂ) (p := 2) volume f), (freePathLaw_marginal N L t 1).quasiMeasurePreserving.ae hgLp.coeFn_toLp] with ω hf hg' by_cases ha : ω∈staysAllowed N L a · simp only [Set.indicator_of_mem ha,killedObservable,hf,hg'] · simp only [Set.indicator_of_notMem ha,killedObservable,mul_zero] rw [integral_congr_ae he,freePathLaw] have hm : Measurable (fun ω : ConfigurationPath N L ↦ conj (f (ω 0)) * (h ω*killedObservable N L a g ω)) := by exact (f.continuous.comp (continuous_eval_const (0:Time))).star.measurable.mul (hh.mul (killedObservable_measurable N L a hg)) rw [integral_map (freeTrajectory_continuous N L t).measurable.aemeasurable hm.aestronglyMeasurable] have hzero : (fun p : CoordinatePaths N × Configuration N L ↦ conj (f (freeTrajectory N L t p.1 p.2 0)) * (h (freeTrajectory N L t p.1 p.2)*killedObservable N L a g (freeTrajectory N L t p.1 p.2))) =ᵐ[ (coordinateWiener N).prod volume] (fun p ↦ conj (f p.2) * (h (freeTrajectory N L t p.1 p.2)* killedObservable N L a g (freeTrajectory N L t p.1 p.2))) := by filter_upwards [Measure.quasiMeasurePreserving_fst.ae (freeTrajectory_initial_ae N L t)] with p hp rw [hp] rw [integral_congr_ae hzero, integral_prod_symm _ (integrable_weightedAverage_pairing N L a t f hh hB hhB hg hC hgC)] simp_rw [integral_const_mul] rfl lemma weightedKilledTransition_bounded (N : ℕ) (L : Length) (a t : ℝ) {h : ConfigurationPath N L → ℂ} (hh : Measurable h) (hhLp : MemLp h ∞ (freePathLaw N L t)) {B : ℝ} (hB : 0≤B) (hhB : ∀ ω, ‖h ω‖≤B) {g : Configuration N L → ℂ} (hg : Measurable g) (hgLp : MemLp g 2 (volume : Measure (Configuration N L))) {C : ℝ} (hC : 0≤C) (hgC : ∀ X, ‖g X‖≤C) : weightedKilledTransition N L a t h hhLp (hgLp.toLp g) = (weightedKilledAverage_memLp N L a t hh hB hhB hg hC hgC).toLp (weightedKilledAverage N L a t h g) := by apply ext_inner_left ℂ intro f have hd := ContinuousMap.toLp_denseRange ℂ (volume : Measure (Configuration N L)) ℂ (show (2:ℝ≥0∞) ≠ ∞ by norm_num) have hc : IsClosed {f : ScalarL2 N L | inner ℂ f (weightedKilledTransition N L a t h hhLp (hgLp.toLp g)) = inner ℂ f ((weightedKilledAverage_memLp N L a t hh hB hhB hg hC hgC).toLp (weightedKilledAverage N L a t h g))} := isClosed_eq (continuous_id.inner continuous_const) (continuous_id.inner continuous_const) apply hc.closure_subset_iff.mpr ?_ (hd f) rintro _ ⟨f,rfl⟩ change inner ℂ _ _ = inner ℂ _ _ rw [weightedKilledTransition_bounded_pairing N L a t f hh hhLp hB hhB hg hgLp hC hgC,L2.inner_def] apply integral_congr_ae filter_upwards [ContinuousMap.coeFn_toLp (𝕜 := ℂ) (p := 2) volume f, (weightedKilledAverage_memLp N L a t hh hB hhB hg hC hgC).coeFn_toLp] with X hf hX rw [RCLike.inner_apply,hf,hX,mul_comm] end noncomputable section lemma weightedKilledAverage_prefix (N : ℕ) (L : Length) (a s t : ℝ) (hs : 0 simp [h,hω] have heq : inner ℂ (modulusScalar u.1) (weightedKilledTransition N L a (s+t) (h ∘ configurationPrefix N L (splitTime s t hs ht)) hhp (modulusScalar u.1)) = (Real.exp (-t*energy u):ℂ)*inner ℂ (modulusScalar u.1) (weightedKilledTransition N L a s h hhs (modulusScalar u.1)) := by rw [weightedKilledTransition_prefix N L a s t hs ht hh hhs hhp zero_le_one hb, ContinuousLinearMap.comp_apply] have he := hu.modulus.killed_eigenvector ht.le change killedTransition N L a t (modulusScalar u.1)= (Real.exp (-t*energy (modulusJet u)):ℂ) • modulusScalar u.1 at he rw [hu.energy_modulus] at he rw [he,map_smul,inner_smul_right] have hp : h ∘ configurationPrefix N L (splitTime s t hs ht)= ((configurationPrefix N L (splitTime s t hs ht)) ⁻¹' S).indicator (fun _ ↦ (1:ℂ)) := by ext ω rfl apply Complex.ofReal_injective rw [Complex.ofReal_mul,← weightedKilledTransition_indicator_pairing (a := a) s u.1 u.1 hS, ← weightedKilledTransition_indicator_pairing (a := a) (s+t) u.1 u.1 (hS.preimage (configurationPrefix_continuous N L _).measurable)] simpa only [hp] using heq lemma IsGroundVector.groundPathLaw_prefix {u : Jet N L} (hu : IsGroundVector N L a u) (s t : ℝ) (hs : 0