math / data /lean /OAI /Analysis /BiholderTransport /Calculus /CompactParameterJets.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
7.9 kB
import Mathlib
import OAI.Analysis.BiholderTransport.Coordinates.ManifoldLipschitz
import OAI.Analysis.BiholderTransport.Coordinates.ChartCostJets
namespace OAI
noncomputable section
namespace WeakMTWTransport
section
open Set Filter
open scoped Topology ContDiff
variable {Q E : Type*} [NormedAddCommGroup Q] [NormedSpace ℝ Q]
[NormedAddCommGroup E] [NormedSpace ℝ E]
lemma compact_parameter_second_jet {K : Set Q} (hK : IsCompact K)
{F : (ℝ×Q) β†’ E β†’ ℝ} {t : ℝ}
(hF : βˆ€ q∈K, ContDiffAt ℝ ∞ (Function.uncurry F) ((t,q),0)) :
βˆƒ B>0, βˆ€αΆ  s in 𝓝 t, βˆ€ q∈K,
ContDiffAt ℝ 2 (F (s,q)) 0 ∧ β€–fderiv ℝ (fderiv ℝ (F (s,q))) 0‖≀B := by
let H := fun z : ℝ×Q => fderiv ℝ (fderiv ℝ (F z)) 0
have hH : βˆ€ q∈K, ContinuousAt H (t,q) := by
intro q hq
exact (ContDiffAt.partial_snd_fderiv_two (hF q hq)).continuousAt.comp
(x := (t,q)) (f := fun z : ℝ×Q => (z,(0:E)))
(continuousAt_id.prodMk continuousAt_const)
obtain ⟨B,hB,HB⟩ := compact_eventually_fiberwise_bound hK
(f := fun _ : Q => ()) continuous_const (g := fun _ : ℝ => ())
(continuousAt_const (x := t)) (h := H) (fun q hq _ => hH q hq)
have HS : βˆ€αΆ  s in 𝓝 t, βˆ€ q∈K, ()=() β†’ ContDiffAt ℝ 2 (F (s,q)) 0 := by
apply compact_eventually_fiberwise hK (f := fun _ : Q => ()) continuous_const
(g := fun _ : ℝ => ()) (continuousAt_const (x := t))
intro q hq _
have He := ((hF q hq).of_le
(m := 2) (ENat.natCast_le_of_coe_top_le_withTop le_rfl 2)).eventually (by simp)
have hc : ContinuousAt (fun z : ℝ×Q => (z,(0:E))) (t,q) :=
continuousAt_id.prodMk continuousAt_const
filter_upwards [hc.tendsto.eventually He] with z hz
exact hz.comp (0:E) (contDiffAt_const.prodMk contDiffAt_id)
refine ⟨B,hB,?_⟩
filter_upwards [HB,HS] with s hb hs
exact fun q hq => ⟨hs q hq rfl,hb q hq rfl⟩
end
open Set Filter Manifold Bundle Metric
open scoped Topology ContDiff NNReal
variable {n : β„•} {M : Type*} [MetricSpace M] [CompactSpace M]
[ChartedSpace (Model n) M] [IsManifold π“˜(ℝ,Model n) ∞ M]
[RiemannianBundle (fun x : M => TangentSpace π“˜(ℝ,Model n) x)]
[IsContMDiffRiemannianBundle π“˜(ℝ,Model n) ∞ (Model n)
(fun x : M => TangentSpace π“˜(ℝ,Model n) x)]
[IsRiemannianManifold π“˜(ℝ,Model n) M]
def shortLegCost (x : M) (t : ℝ) (p h : TangentSpace π“˜(ℝ,Model n) x) : ℝ :=
cost (riemannianExp x (t β€’ (p+h))) (riemannianExp x p)
def movingShortLegCost (a : M) (z : ℝ Γ— (Model n Γ— Model n)) (h : Model n) : ℝ :=
cost (movingNormal a (z.2.1,z.1 β€’ (z.2.2+h))) (movingNormal a z.2)
lemma movingShortLegCost_contDiffAt {a : M} {b p : Model n}
(hb : b∈(extChartAt π“˜(ℝ,Model n) a).target) :
ContDiffAt ℝ ∞ (Function.uncurry (movingShortLegCost a)) ((1,(b,p)),0) := by
let Z := (ℝ Γ— (Model n Γ— Model n)) Γ— Model n
have hA : ContMDiffAt π“˜(ℝ,Z) π“˜(ℝ,Model n) ∞
(fun q : Z => movingNormal a (q.1.2.1,q.1.1 β€’ (q.1.2.2+q.2))) ((1,(b,p)),0) := by
refine (show ContMDiffAt π“˜(ℝ,Model n Γ— Model n) π“˜(ℝ,Model n) ∞
(movingNormal a) (b,(1:ℝ) β€’ (p+0)) from by simpa using movingNormal_contMDiffAt hb).comp
(f := fun q : Z => (q.1.2.1,q.1.1 β€’ (q.1.2.2+q.2))) ((1,(b,p)),0) ?_
exact (contDiffAt_fst.snd.fst.prodMk
(contDiffAt_fst.fst.smul (contDiffAt_fst.snd.snd.add contDiffAt_snd))).contMDiffAt
have hB : ContMDiffAt π“˜(ℝ,Z) π“˜(ℝ,Model n) ∞
(fun q : Z => movingNormal a q.1.2) ((1,(b,p)),0) :=
(movingNormal_contMDiffAt (q := (b,p)) hb).comp ((1,(b,p)),0)
contDiffAt_fst.snd.contMDiffAt
have hC : ContMDiffAt (π“˜(ℝ,Model n).prod π“˜(ℝ,Model n)) π“˜(ℝ,ℝ) ∞
(fun q : M Γ— M => cost q.1 q.2)
(movingNormal a (b,(1:ℝ) β€’ (p+0)),movingNormal a (b,p)) := by
simpa only [add_zero,one_smul,riemannianExp_zero] using
cost_contMDiffAt_of_injectivityDomain
(⟨movingNormal a (b,p),0⟩ : TangentBundle π“˜(ℝ,Model n) M)
(zero_mem_injectivityDomain (movingNormal a (b,p)))
exact (hC.comp ((1,(b,p)),0) (hA.prodMk hB)).contDiffAt
lemma shortLeg_second_bound_near_base (R : ℝ) (a : M) :
βˆƒ C : ℝβ‰₯0, βˆƒ Kβˆˆπ“ a, βˆ€αΆ  t in 𝓝 (1:ℝ), βˆ€ x∈K,
βˆ€ p : TangentSpace π“˜(ℝ,Model n) x, β€–p‖≀R β†’
ContDiffAt ℝ 2 (shortLegCost x t p) 0 ∧
βˆ€ k : TangentSpace π“˜(ℝ,Model n) x,
β€–fderiv ℝ (fderiv ℝ (shortLegCost x t p)) 0 k k‖≀C*β€–kβ€–^2 := by
have : IsContinuousRiemannianBundle (Model n)
(fun x : M => TangentSpace π“˜(ℝ,Model n) x) :=
continuousRiemannianBundle_of_smooth (IB := π“˜(ℝ,Model n))
obtain ⟨B,hBpos,hB⟩ := eventually_norm_trivializationAt_lt (Model n)
(fun x : M => TangentSpace π“˜(ℝ,Model n) x) a
obtain ⟨K,hKn,hKs,hKc⟩ := local_compact_nhds
(inter_mem (extChartAt_source_mem_nhds (I := π“˜(ℝ,Model n)) a) hB)
let Ο‡ := extChartAt π“˜(ℝ,Model n) a
let P := (Ο‡ '' K) Γ—Λ’ closedBall (0 : Model n) (B*R)
have hPc : IsCompact P :=
(hKc.image_of_continuousOn ((continuousOn_extChartAt a).mono
(fun x hx => (hKs hx).1))).prod (isCompact_closedBall _ _)
obtain ⟨D,hDpos,HD⟩ := compact_parameter_second_jet hPc
(F := movingShortLegCost a) (t := 1) (fun q hq => movingShortLegCost_contDiffAt (by
obtain ⟨x,hx,hxq⟩ := hq.1
rw [←hxq]
exact Ο‡.map_source (hKs hx).1))
refine ⟨⟨D*B^2,mul_nonneg hDpos.le (sq_nonneg B)⟩,K,hKn,?_⟩
filter_upwards [HD] with t ht
intro x hx p hp
let A := (trivializationAt (Model n) (TangentSpace π“˜(ℝ,Model n)) a).continuousLinearMapAt ℝ x
have hpP : (Ο‡ x,A p)∈P := by
refine ⟨mem_image_of_mem Ο‡ hx,?_⟩
rw [mem_closedBall,dist_zero_right]
exact (A.le_opNorm p).trans (mul_le_mul (hKs hx).2.le hp (norm_nonneg _) hBpos.le)
have he : shortLegCost x t p = (fun h => movingShortLegCost a (t,(Ο‡ x,A p)) (A h)) := by
funext h
dsimp only [shortLegCost,movingShortLegCost]
rw [←map_add,←map_smul,movingNormal_trivialization_exp (hKs hx).1,
movingNormal_trivialization_exp (hKs hx).1]
rw [he]
have HD' := ht (Ο‡ x,A p) hpP
refine ⟨(show ContDiffAt ℝ 2 (movingShortLegCost a (t,(Ο‡ x,A p))) (A 0) from by
simpa only [map_zero] using HD'.1).comp 0 A.contDiff.contDiffAt,?_⟩
intro k
rw [second_fderiv_comp_linear_zero HD'.1 A k]
let H := fderiv ℝ (fderiv ℝ (movingShortLegCost a (t,(Ο‡ x,A p)))) 0
have hAk : β€–A k‖≀B*β€–kβ€– :=
(A.le_opNorm k).trans (mul_le_mul_of_nonneg_right (hKs hx).2.le (norm_nonneg _))
calc
β€–H (A k) (A k)‖≀‖H (A k)β€–*β€–A kβ€– := (H (A k)).le_opNorm _
_≀(β€–Hβ€–*β€–A kβ€–)*β€–A kβ€– := mul_le_mul_of_nonneg_right (H.le_opNorm _) (norm_nonneg _)
_≀(D*β€–A kβ€–)*β€–A kβ€– := by gcongr; exact HD'.2
_≀(D*(B*β€–kβ€–))*(B*β€–kβ€–) := by gcongr
_=(D*B^2)*β€–kβ€–^2 := by ring
lemma exists_uniform_shortLeg_second_bound (R : ℝ) :
βˆƒ C : ℝβ‰₯0, βˆ€αΆ  t in 𝓝 (1:ℝ), βˆ€ x : M,
βˆ€ p : TangentSpace π“˜(ℝ,Model n) x, β€–p‖≀R β†’
ContDiffAt ℝ 2 (shortLegCost x t p) 0 ∧
βˆ€ k : TangentSpace π“˜(ℝ,Model n) x,
β€–fderiv ℝ (fderiv ℝ (shortLegCost x t p)) 0 k k‖≀C*β€–kβ€–^2 := by
classical
choose C K hKn hK using shortLeg_second_bound_near_base (n := n) (M := M) R
obtain ⟨s,hs⟩ := finite_cover_nhds hKn
refine ⟨s.sup C,?_⟩
have HT := (eventually_all_finset s).mpr (fun a _ => hK a)
filter_upwards [HT] with t ht
intro x p hp
have hx : x∈ ⋃ a∈s,K a := by rw [hs]; trivial
obtain ⟨a,ha,hxa⟩ := mem_iUnionβ‚‚.mp hx
have H := ht a ha x hxa p hp
refine ⟨H.1,fun k => (H.2 k).trans ?_⟩
exact mul_le_mul_of_nonneg_right (by exact_mod_cast Finset.le_sup (f := C) ha) (sq_nonneg _)
end WeakMTWTransport
end
end OAI