import Mathlib import OAI.Analysis.HardSphere.Thermodynamics.BridgeScaleTail namespace OAI section section noncomputable section open MeasureTheory ProbabilityTheory Set open scoped ENNReal NNReal Topology BigOperators namespace HardSphere.Bridge open Wiener GaussianPacking PathCutoff lemma leg_window_coord {t S C : ℝ} (hS : 0< S) (hC : 0≤ C) (y u : Point) (hdis : ‖u-y‖≤ C) (β : Noise) (w q : Time) (hq : (q:ℝ)≤(w:ℝ)) (i : Fin 3) : |leg t y u β q i-leg t y u β 0 i|≤ (w:ℝ)*C+S*incrementFluctuation t S 0 w β := by have he : suffixTime 0 q=q := by apply Subtype.ext; simp [suffixTime] have hd : |(q:ℝ)*(u i-y i)|≤(w:ℝ)*C := by rw [abs_mul,abs_of_nonneg q.property.1] exact (mul_le_mul_of_nonneg_left ((norm_le_pi_norm (u-y) i).trans hdis) q.property.1).trans (mul_le_mul_of_nonneg_right hq hC) have hn := incrementFluctuation_eval (t:=t) hS 0 w q hq β i rw [he] at hn have hl := leg_segment_increment t y u β 0 q i rw [he] at hl simp only [show ((0:Time):ℝ)=0 from rfl,sub_zero,one_mul] at hl rw [hl,show leg t y u β 0 i+(q:ℝ)*(u i-y i)+Real.sqrt (2*t)*(β i q-β i 0)-leg t y u β 0 i=(q:ℝ)*(u i-y i)+Real.sqrt (2*t)*(β i q-β i 0) by ring] exact (abs_add_le _ _).trans (add_le_add hd hn) lemma leg_window_diameter {t S C : ℝ} (hS : 0< S) (hC : 0≤ C) (y u : Point) (hdis : ‖u-y‖≤ C) (β : Noise) (w : Time) : liftedDiameter 0 w (pathCoordinates (leg t y u β))≤ 6*((w:ℝ)*C+S*incrementFluctuation t S 0 w β) := by have hR : 0≤(w:ℝ)*C+S*incrementFluctuation t S 0 w β := add_nonneg (mul_nonneg w.property.1 hC) (mul_nonneg hS.le (incrementFluctuation_nonneg hS.le 0 w β)) have hw (q : Time) : (intervalTime 0 w q:ℝ)≤(w:ℝ) := by change (1-(q:ℝ))*0+(q:ℝ)*(w:ℝ)≤(w:ℝ) nlinarith [q.property.2,w.property.1] have h := liftedDiameter_coord_le (pathCoordinates (leg t y u β)) 0 w (mul_nonneg (by norm_num : (0:ℝ)≤2) hR) (fun i s q ↦ by have hs := leg_window_coord (t:=t) hS hC y u hdis β w (intervalTime 0 w s) (hw s) i have hq := leg_window_coord (t:=t) hS hC y u hdis β w (intervalTime 0 w q) (hw q) i change |leg t y u β (intervalTime 0 w s) i-leg t y u β (intervalTime 0 w q) i|≤_ have he : leg t y u β (intervalTime 0 w s) i-leg t y u β (intervalTime 0 w q) i= (leg t y u β (intervalTime 0 w s) i-leg t y u β 0 i)-(leg t y u β (intervalTime 0 w q) i-leg t y u β 0 i) := by ring rw [he] exact (abs_sub _ _).trans (by linarith)) linarith lemma leg_window_tail {t S C : ℝ} (ht : 0≤ t) (hS : 0< S) (hC : 0≤ C) (y u : Point) (hdis : ‖u-y‖≤ C) (w : Time) (hdrift : (w:ℝ)*C≤ S/12) (p : ℕ) (hp : p≠0) : law {β | S≤ liftedDiameter 0 w (pathCoordinates (leg t y u β))}≤ ENNReal.ofReal (scaleMoment p t S 0 w)/(ENNReal.ofReal (1/12:ℝ))^p := by apply (measure_mono (show {β | S≤ liftedDiameter 0 w (pathCoordinates (leg t y u β))}⊆ {β | (1/12:ℝ)≤ incrementFluctuation t S 0 w β} from ?_)).trans (incrementFluctuation_scale_tail ht hS (by norm_num) 0 w p hp) intro β hβ have h := leg_window_diameter (t:=t) hS hC y u hdis β w change S≤_ at hβ change (1/12:ℝ)≤ incrementFluctuation t S 0 w β nlinarith end HardSphere.Bridge end end section noncomputable section open MeasureTheory Set Filter ProbabilityTheory open scoped ENNReal NNReal Topology BigOperators namespace HardSphere.Bridge open Wiener PathCutoff GaussianPacking lemma torusDistance_nonnegative (L : Length) (x y : Torus L) : 0≤torusDistance L x y := Real.sqrt_nonneg _ abbrev projectPoint (L : Length) (y : Point) : Torus L := fun j ↦ (y j : AddCircle L.val) def nearestLift (L : Length) (v : Point) (x : Torus L) : Point := fun j ↦ (((AddCircle.equivIco L.val (-L.val/2)) (x j-(v j : AddCircle L.val))).val)+v j lemma nearestLift_project (L : Length) (v : Point) (x : Torus L) : projectPoint L (nearestLift L v x)=x := by ext j simp only [projectPoint,nearestLift,AddCircle.coe_add,AddCircle.coe_equivIco,sub_add_cancel] lemma nearestLift_coord (L : Length) (v : Point) (x : Torus L) (j : Fin 3) : |nearestLift L v x j-v j|=dist (x j) (projectPoint L v j) := by let z := (AddCircle.equivIco L.val (-L.val/2)) (x j-(v j : AddCircle L.val)) have hz : |z.val|≤|L.val|/2 := by rw [abs_of_pos L.property,abs_le] exact ⟨by linarith [z.property.1],by linarith [z.property.2]⟩ have he := (AddCircle.norm_coe_eq_abs_iff L.val L.property.ne').mpr hz rw [AddCircle.coe_equivIco,←dist_eq_norm] at he simpa only [nearestLift,add_sub_cancel_right] using he.symm lemma nearestLift_bound (L : Length) (v : Point) (x : Torus L) {R : ℝ} (h : torusDistance L x (projectPoint L v)≤R) : ‖nearestLift L v x-v‖≤R := by apply (pi_norm_le_iff_of_nonneg ((torusDistance_nonnegative L x _).trans h)).mpr intro j change |nearestLift L v x j-v j|≤R rw [nearestLift_coord] exact (CellOrbital.dist_coord_le_torusDistance L _ _ j).trans h lemma exists_pathLift_at {L : Length} (ω : ConfigurationPath 1 L) (y : Point) (hy : projectPoint L y=ω 0 0) : ∃ζ : EuclideanPath,IsPathLift ω ζ ∧ (fun j ↦ ζ j 0)=y := by have hx (j : Fin 3) : ∃ ζ : C(Time,ℝ),(∀s,(ζ s : AddCircle L.val)=ω s 0 j) ∧ ζ 0=y j := by let γ : C(Time,AddCircle L.val) := ⟨fun s ↦ ω s 0 j,by fun_prop⟩ have h0 : γ 0=(y j : AddCircle L.val) := (congrFun hy j).symm obtain ⟨ζ,hζ,hζ0⟩ := (AddCircle.isCoveringMap_coe L.val).exists_path_lifts γ (y j) h0 exact ⟨ζ,(fun s ↦ congrFun hζ s),hζ0⟩ choose ζ hζ using hx exact ⟨ζ,fun j s ↦ (hζ j).1 s,funext (fun j ↦ (hζ j).2)⟩ lemma local_collision_lifts {L : Length} {v x c c₀ : Point} (hL : 50