math / data /lean /OAI /Probability /LatticeSurface /Dynamics /ProjectionLimitSupport.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
4.74 kB
import Mathlib
import OAI.Probability.LatticeSurface.Convexity.FreeHilbert
import OAI.Probability.LatticeSurface.Dynamics.ProjectionMesh
import OAI.Probability.LatticeSurface.Skorokhod.SkorokhodRegularity
namespace OAI
namespace ProjectionComparison
open Set ClusterDisplacement
attribute [local instance] Classical.propDecidable
variable {V E : Type*} [Fintype V] [Fintype E]
noncomputable def pathIncrement (S : System V E) (w : ℝ β†’ FreeSpace S) (N : β„•) (i : β„•) : V β†’ ℝ :=
extendFree S (fun _ => 0) (w ((i+1:β„•)/(N:ℝ))-w ((i:ℝ)/N))
noncomputable def pathMesh (S : System V E) (b h : V β†’ ℝ) (hh : h∈feasible S b)
(w : ℝ β†’ FreeSpace S) (N : β„•) (t : ℝ) : V β†’ ℝ :=
recursion S b ⟨h,hh⟩ h (pathIncrement S w N) ⌊t*NβŒ‹β‚Š
def pathTail (S : System V E) (uβ‚€ u₁ : ℝ β†’ V β†’ ℝ) (a t : ℝ) : {x // xβˆ‰S.pins} β†’ ℝ :=
fun x => max (u₁ t x-uβ‚€ t x-a) 0
end ProjectionComparison
namespace ProjectionComparison
open Set Filter ClusterDisplacement
attribute [local instance] Classical.propDecidable
variable {V E : Type*} [Fintype V] [Fintype E]
omit [Fintype V] [Fintype E] in
lemma coordinates_extendFree (S : System V E) (b : V β†’ ℝ) (v : FreeSpace S) :
freeCoordinates S (extendFree S b v)=v := by
apply PiLp.ext
intro x
simp [freeCoordinates,extendFree,x.property]
omit [Fintype E] in
lemma pathMesh_eq_hilbert (S : System V E) (b h : V β†’ ℝ) (hh : h∈feasible S b)
(B : ConvexSkorokhod.Body (FreeSpace S))
(he : βˆ€v:V β†’ ℝ,extendFree S b (ConvexSkorokhod.project B (freeCoordinates S v))=project S b ⟨h,hh⟩ v)
(w : ℝ β†’ FreeSpace S) (N : β„•) (t : ℝ) :
pathMesh S b h hh w N t=
extendFree S b (ConvexSkorokhod.mesh B (freeCoordinates S h) w N t) := by
have hne : (feasible S b).Nonempty := ⟨h,hh⟩
have hi : βˆ€i,recursion S b hne h (pathIncrement S w N) i=
extendFree S b (ConvexSkorokhod.walk B (freeCoordinates S h) (ConvexSkorokhod.sampledDriver w N) i) := by
intro i
induction i with
| zero => exact (extendFree_coordinates S b h hh.2).symm
| succ i ih =>
rw [ProjectionComparison.recursion,←he,ConvexSkorokhod.walk,ih]
apply congrArg (extendFree S b)
apply congrArg (ConvexSkorokhod.project B)
apply PiLp.ext
intro x
simp [freeCoordinates,extendFree,x.property,pathIncrement,ConvexSkorokhod.sampledDriver]
exact hi _
omit [Fintype E] in
lemma extendFree_lipschitz (S : System V E) (b : V β†’ ℝ) : LipschitzWith 1 (extendFree S b) := by
apply LipschitzWith.of_dist_le_mul
intro u v
simp only [NNReal.coe_one,one_mul,dist_eq_norm]
apply (pi_norm_le_iff_of_nonneg (norm_nonneg (u-v))).mpr
intro x
by_cases hx : x∈S.pins
Β· simp only [Pi.sub_apply,extendFree,dite_eq_left hx,sub_self,norm_zero]
exact norm_nonneg _
· simpa only [Pi.sub_apply,extendFree,dite_eq_right hx,PiLp.sub_apply] using PiLp.norm_apply_le (u-v) ⟨x,hx⟩
omit [Fintype E] in
lemma exists_projection_path (S : System V E) (b h : V β†’ ℝ) (hh : h∈feasible S b)
(c : FreeSpace S) (r : ℝ) (hr : 0 < r) (hball : Metric.closedBall c rβŠ†freeCarrier S b)
(w : ℝ β†’ FreeSpace S) (hw : ContinuousOn w (Icc 0 1))
(hosc : βˆ€t∈Icc (0:ℝ) 1,β€–w t-w 0β€– ≀ r/2) :
βˆƒu : ℝ β†’ V β†’ ℝ,ContinuousOn u (Icc 0 1) ∧ u 0=h ∧
(βˆ€t∈Icc (0:ℝ) 1,u t∈feasible S b) ∧
TendstoUniformlyOn (fun n => pathMesh S b h hh w (n+1)) u atTop (Icc 0 1) := by
obtain ⟨B,hB,he⟩ := exists_free_body S b ⟨h,hh⟩
have hh' : freeCoordinates S h∈B.carrier := by
rw [hB];change extendFree S b (freeCoordinates S h)∈feasible S b
rwa [extendFree_coordinates S b h hh.2]
obtain ⟨v,hvcont,hv,hvmem,hvvar⟩ := ConvexSkorokhod.projection_mesh_regular_limit B
(freeCoordinates S h) c r hh' hr (by rwa [hB]) w hw hosc
let u := fun t => extendFree S b (v t)
have hlim : TendstoUniformlyOn (fun n => pathMesh S b h hh w (n+1)) u atTop (Icc 0 1) := by
apply Metric.tendstoUniformlyOn_iff.mpr
intro Ξ΅ hΞ΅
filter_upwards [Metric.tendstoUniformlyOn_iff.mp hv Ξ΅ hΞ΅] with n hn t ht
rw [pathMesh_eq_hilbert S b h hh B he]
exact ((extendFree_lipschitz S b).dist_le_mul _ _).trans_lt (by simpa using hn t ht)
refine ⟨u,(extendFree_continuous S b).comp_continuousOn hvcont,?_,fun t ht => ?_,hlim⟩
Β· have hhlim := hlim.tendsto_at (show (0:ℝ)∈Icc (0:ℝ) 1 by constructor <;> norm_num)
have hhmesh : (fun n => pathMesh S b h hh w (n+1) 0)=fun _ : β„• => h := by
funext n;simp [pathMesh,recursion]
rw [hhmesh] at hhlim
exact tendsto_nhds_unique hhlim tendsto_const_nhds
Β· have hmem := hvmem t ht
rwa [hB] at hmem
end ProjectionComparison
end OAI