math / data /lean /OAI /Analysis /HardSphere /PathBounds /FreeVisitProbability.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
8.78 kB
import Mathlib
import OAI.Analysis.HardSphere.Geometry.KilledObservable
import OAI.Analysis.HardSphere.PathBounds.VisitPacking
namespace OAI
section
section
noncomputable section
open MeasureTheory Set Filter
open scoped ENNReal NNReal Topology BigOperators
namespace HardSphere.FreeVisits
open HardSphere.BathSlice HardSphere.Lattice HardSphere.CellOrbital HardSphere.Wiener
lemma pathVisitedSites_card_measurable {S : Type*} {n : β„•} (L : Length)
(v : S β†’ Torus L) (A : Finset S) (i : Fin n) :
Measurable (fun Ο‰ : ConfigurationPath n L ↦ (pathVisitedSites L v A i Ο‰).card) := by
classical
simp only [pathVisitedSites,Finset.card_filter]
apply Finset.measurable_sum
intro a _
exact Measurable.ite (pathVisitsBall_isClosed L 12 (v a) i).measurableSet
measurable_const measurable_const
def visitCount {n K : β„•} (L : Length) (A : Finset (DiscreteTorus K)) (i : Fin n)
(t : ℝ) (X : Configuration n L) (w : CoordinatePaths n) : β„• :=
(pathVisitedSites L (siteCenter L) A i (freeTrajectory n L t w X)).card
lemma visitCount_measurable {n K : β„•} (L : Length) (A : Finset (DiscreteTorus K)) (i : Fin n)
(t : ℝ) (X : Configuration n L) : Measurable (visitCount L A i t X) :=
(pathVisitedSites_card_measurable L (siteCenter L) A i).comp
((freeTrajectory_continuous n L t).comp (continuous_id.prodMk continuous_const)).measurable
lemma one_segment_visit_tail {c : ℝ} {M : ℝβ‰₯0∞}
(htail : βˆ€ R : ℝ, 0≀R β†’ wiener {w | R≀‖wβ€–}≀M*ENNReal.ofReal (Real.exp (-c*R^2)))
{n K : β„•} [NeZero K] (L : Length) (hL : L.val=(K:ℝ))
(A : Finset (DiscreteTorus K)) (i : Fin n) {t : ℝ} (ht : 0<t) (X : Configuration n L) :
coordinateWiener n {w | 29^3<visitCount L A i t X w} ≀
3*M*ENNReal.ofReal (Real.exp (-c/(2*t))) := by
let R : ℝ := (Real.sqrt (2*t))⁻¹
have hs : 0<Real.sqrt (2*t) := Real.sqrt_pos.mpr (by positivity)
have hR : 0≀R := inv_nonneg.mpr hs.le
have hsub : {w | 29^3<visitCount L A i t X w} βŠ†
⋃ j : Fin 3, {w | R≀‖w (i,j)β€–} := by
intro w hw
by_contra hnot
have hn : βˆ€ j, β€–w (i,j)β€–<R := by simpa only [Set.mem_iUnion,Set.mem_ofPred_eq,not_exists,not_le] using hnot
have hb := free_visited_card_le_of_norm L hL A i t w X (fun j ↦ ?_)
Β· exact (not_lt_of_ge hb) hw
Β· calc
Real.sqrt (2*t)*β€–w (i,j)β€– ≀ Real.sqrt (2*t)*R := mul_le_mul_of_nonneg_left (hn j).le hs.le
_ = 1 := mul_inv_cancelβ‚€ (ne_of_gt hs)
have he (j : Fin 3) : coordinateWiener n {w | R≀‖w (i,j)β€–} = wiener {w | R≀‖wβ€–} := by
exact (measurePreserving_eval (fun _ : Direction n ↦ wiener) (i,j)).measure_preimage
(measurableSet_le measurable_const measurable_norm).nullMeasurableSet
calc
_ ≀ coordinateWiener n (⋃ j : Fin 3, {w | R≀‖w (i,j)β€–}) := measure_mono hsub
_ ≀ βˆ‘' j : Fin 3, coordinateWiener n {w | R≀‖w (i,j)β€–} := measure_iUnion_le _
_ = 3 * wiener {w | R≀‖wβ€–} := by simp [he,tsum_fintype]
_ ≀ 3*(M*ENNReal.ofReal (Real.exp (-c*R^2))) := mul_le_mul_right (htail R hR) _
_ = _ := by
dsimp [R]
rw [inv_pow,Real.sq_sqrt (by positivity : 0≀2*t)]
simp only [div_eq_mul_inv,mul_assoc]
lemma visit_count_split {n K : β„•} (L : Length) (A : Finset (DiscreteTorus K)) (i : Fin n)
{s t : ℝ} (hs : 0<s) (ht : 0<t) (w : CoordinatePaths n) (X : Configuration n L) :
visitCount L A i (s+t) X w ≀
visitCount L A i s X (fun p ↦ normalizedPrefix (splitTime s t hs ht) (w p)) +
visitCount L A i t
(freeTrajectory n L s (fun p ↦ normalizedPrefix (splitTime s t hs ht) (w p)) X 1)
(fun p ↦ normalizedSuffix (splitTime s t hs ht) (w p)) := by
have hle := visited_card_split_le L (siteCenter L) A i (freeTrajectory n L (s+t) w X)
(splitTime s t hs ht) (splitTime_pos s t hs ht) (splitTime_lt_one s t hs ht)
have hp := congrArg Prod.fst (split_fixedTrajectory n L s t hs ht w X)
have hq := congrArg Prod.snd (split_fixedTrajectory n L s t hs ht w X)
dsimp only [Prod.fst,Prod.snd] at hp hq
rw [hp,hq] at hle
exact hle
attribute [local irreducible] freeTrajectory pathVisitedSites
lemma visit_tail_add {n K : β„•} (L : Length) (A : Finset (DiscreteTorus K)) (i : Fin n)
{s t : ℝ} (hs : 0<s) (ht : 0<t) (a b : β„•) (p q : ℝβ‰₯0∞)
(hsbound : βˆ€ X, coordinateWiener n {w | a<visitCount L A i s X w}≀p)
(htbound : βˆ€ X, coordinateWiener n {w | b<visitCount L A i t X w}≀q)
(X : Configuration n L) :
coordinateWiener n {w | a+b<visitCount L A i (s+t) X w}≀p+q := by
let u := splitTime s t hs ht
let split : CoordinatePaths n β†’ CoordinatePaths n Γ— CoordinatePaths n := fun w ↦
(fun p ↦ normalizedPrefix u (w p),fun p ↦ normalizedSuffix u (w p))
let E₁ : Set (CoordinatePaths n Γ— CoordinatePaths n) :=
{p | a<visitCount L A i s X p.1}
let Eβ‚‚ : Set (CoordinatePaths n Γ— CoordinatePaths n) :=
{p | b<visitCount L A i t (freeTrajectory n L s p.1 X 1) p.2}
have hE₁ : MeasurableSet E₁ := measurableSet_lt measurable_const
((visitCount_measurable L A i s X).comp measurable_fst)
have hEβ‚‚ : MeasurableSet Eβ‚‚ := by
apply measurableSet_lt measurable_const
exact (pathVisitedSites_card_measurable L (siteCenter L) A i).comp
(measurable_snd.comp (split_fixedTrajectory_measurable n L s t X))
have hsub : {w | a+b<visitCount L A i (s+t) X w} βŠ† split ⁻¹' (E₁βˆͺEβ‚‚) := by
intro w hw
have hle := visit_count_split L A i hs ht w X
change a<visitCount L A i s X (split w).1 ∨
b<visitCount L A i t (freeTrajectory n L s (split w).1 X 1) (split w).2
change a+b<visitCount L A i (s+t) X w at hw
change visitCount L A i (s+t) X w ≀ visitCount L A i s X (split w).1 +
visitCount L A i t (freeTrajectory n L s (split w).1 X 1) (split w).2 at hle
omega
have hp₁ : ((coordinateWiener n).prod (coordinateWiener n)) E₁≀p := by
have he : E₁={w | a<visitCount L A i s X w} Γ—Λ’ Set.univ := by ext v; simp [E₁]
rw [he,Measure.prod_prod,measure_univ,mul_one]
exact hsbound X
have hpβ‚‚ : ((coordinateWiener n).prod (coordinateWiener n)) E₂≀q := by
rw [Measure.prod_apply hEβ‚‚]
calc
_ ≀ ∫⁻ _w : CoordinatePaths n, q βˆ‚coordinateWiener n := by
apply lintegral_mono
intro w
exact htbound (freeTrajectory n L s w X 1)
_ = q := by simp
calc
_ ≀ coordinateWiener n (split ⁻¹' (E₁βˆͺEβ‚‚)) := measure_mono hsub
_ = ((coordinateWiener n).prod (coordinateWiener n)) (E₁βˆͺEβ‚‚) :=
(coordinateSplit_preserving n u (splitTime_pos s t hs ht) (splitTime_lt_one s t hs ht)).measure_preimage
(hE₁.union hEβ‚‚).nullMeasurableSet
_ ≀ ((coordinateWiener n).prod (coordinateWiener n)) E₁ +
((coordinateWiener n).prod (coordinateWiener n)) Eβ‚‚ := measure_union_le _ _
_ ≀ p+q := add_le_add hp₁ hpβ‚‚
lemma n_segment_visit_tail {c : ℝ} {M : ℝβ‰₯0∞}
(htail : βˆ€ R : ℝ, 0≀R β†’ wiener {w | R≀‖wβ€–}≀M*ENNReal.ofReal (Real.exp (-c*R^2)))
{n K : β„•} [NeZero K] (L : Length) (hL : L.val=(K:ℝ))
(A : Finset (DiscreteTorus K)) (i : Fin n) {t : ℝ} (ht : 0<t) :
βˆ€ k : β„•, 0<k β†’ βˆ€ X : Configuration n L,
coordinateWiener n {w | 29^3*k<visitCount L A i ((k:ℝ)*t) X w} ≀
(k:ℝβ‰₯0∞)*(3*M*ENNReal.ofReal (Real.exp (-c/(2*t)))) := by
intro k hk
induction k, hk using Nat.le_induction with
| base =>
intro X
simpa only [Nat.succ_eq_add_one,Nat.zero_add,Nat.cast_one,one_mul,mul_one] using one_segment_visit_tail htail L hL A i ht X
| succ k hk ih =>
intro X
have hkt : 0<(k:ℝ)*t := mul_pos (by exact_mod_cast hk) ht
have h := visit_tail_add L A i hkt ht (29^3*k) (29^3)
((k:ℝβ‰₯0∞)*(3*M*ENNReal.ofReal (Real.exp (-c/(2*t)))))
(3*M*ENNReal.ofReal (Real.exp (-c/(2*t)))) ih
(fun X ↦ one_segment_visit_tail htail L hL A i ht X) X
convert h using 1 <;> push_cast <;> ring_nf
lemma whole_time_visit_tail {c : ℝ} {M : ℝβ‰₯0∞}
(htail : βˆ€ R : ℝ, 0≀R β†’ wiener {w | R≀‖wβ€–}≀M*ENNReal.ofReal (Real.exp (-c*R^2)))
{n K : β„•} [NeZero K] (L : Length) (hL : L.val=(K:ℝ))
(A : Finset (DiscreteTorus K)) (i : Fin n) {t : ℝ} (ht : 0<t)
(k : β„•) (hk : 0<k) (X : Configuration n L) :
coordinateWiener n {w | 29^3*k<visitCount L A i t X w} ≀
(k:ℝβ‰₯0∞)*(3*M*ENNReal.ofReal (Real.exp (-c*(k:ℝ)/(2*t)))) := by
have hk' : (0:ℝ)<k := by exact_mod_cast hk
have h := n_segment_visit_tail htail L hL A i (div_pos ht hk') k hk X
have he : (k:ℝ)*(t/k)=t := mul_div_cancelβ‚€ t (ne_of_gt hk')
rw [he] at h
convert h using 1
congr 3
field_simp
end HardSphere.FreeVisits
end
end
end
end OAI