File size: 4,739 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | 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
|