Download data/lean/OAI/Geometry/IsometricImmersion/Flows/FlowInverse.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.8 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Flows/FlowInverse.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/IsometricImmersion/Flows/FlowInverse.lean
-
curl -L -o FlowInverse.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Flows/FlowInverse.lean
5.8 kB
| import OAI.Geometry.IsometricImmersion.Flows.FlowBounds | |
| import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ContDiff | |
| namespace OAI | |
| noncomputable section | |
| open Set Filter MeasureTheory Function | |
| open scoped ContDiff Topology Interval | |
| namespace SmoothLocal.Flow | |
| open SmoothLocal.Geometry SmoothLocal.ODE SmoothLocal.Weighted | |
| def triangularLinearEquiv (a b : β) (hb : b β 0) : (β Γ β) βL[β] (β Γ β) where | |
| toFun v := (v.1, a * v.1 + b * v.2) | |
| invFun w := (w.1, (w.2 - a * w.1) / b) | |
| left_inv v := by | |
| apply Prod.ext | |
| Β· rfl | |
| Β· dsimp | |
| field_simp [hb] | |
| ring | |
| right_inv w := by | |
| apply Prod.ext | |
| Β· rfl | |
| Β· dsimp | |
| field_simp [hb] | |
| ring | |
| map_add' v w := by | |
| apply Prod.ext <;> simp only [Prod.fst_add, Prod.snd_add] | |
| ring | |
| map_smul' c v := by | |
| apply Prod.ext <;> simp only [Prod.smul_fst, Prod.smul_snd, smul_eq_mul, RingHom.id_apply] | |
| ring | |
| continuous_toFun := by fun_prop | |
| continuous_invFun := by fun_prop | |
| variable {q : Coord β β} {U : Set Coord} {Y : β β β β β} | |
| theorem triangularFlow_hasFDerivAt_equiv | |
| (hq : ContDiffOn β β q U) (hU : IsOpen U) (hSU : modelSquare β U) | |
| (hY : ContinuousOn (uncurry Y) (Icc (-2 : β) 2 ΓΛ’ Icc (-2 : β) 2)) | |
| (hrange : β s β Icc (-2 : β) 2, β t β Icc (-2 : β) 2, | |
| Y s t β Icc (-3 : β) 3) | |
| (hstart : β s β Icc (-2 : β) 2, Y s 0 = s) | |
| (hode : β s β Icc (-2 : β) 2, β t β Icc (-2 : β) 2, | |
| HasDerivWithinAt (Y s) (-q (coordinatePoint t (Y s t))) (Icc (-2 : β) 2) t) | |
| {p : β Γ β} (hp : p β pairRectangle 2 (-2) 2) : | |
| β A : (β Γ β) βL[β] (β Γ β), HasFDerivAt (triangularFlow Y) (A : (β Γ β) βL[β] (β Γ β)) p := by | |
| let F (v : β Γ β) := Y v.2 v.1 | |
| let a := -q (coordinatePoint p.1 (Y p.2 p.1)) | |
| let b := Real.exp (-(β« r in 0..p.1, coordPartial 1 q (coordinatePoint r (Y p.2 r)))) | |
| have hF : ContDiffOn β β F (pairRectangle 2 (-2) 2) := | |
| cap_flow_joint_contDiffOn hq hU hSU hY hrange hstart hode | |
| have hd := ((hF.contDiffAt ((pairRectangle_isOpen 2 (-2) 2).mem_nhds hp)).differentiableAt | |
| (by simp)).hasFDerivAt | |
| have hdx : HasDerivAt (fun t => F (t, p.2)) a p.1 := | |
| (hode p.2 β¨hp.2.1.le, hp.2.2.leβ© p.1 β¨hp.1.1.le, hp.1.2.leβ©).hasDerivAt | |
| (Icc_mem_nhds hp.1.1 hp.1.2) | |
| have hdy : HasDerivAt (fun s => F (p.1, s)) b p.2 := | |
| cap_flow_hasDerivAt_initial hq hU hSU hY hrange hstart hode hp.2 hp.1 | |
| have hdx' : HasDerivAt (fun t => F (t, p.2)) (fderiv β F p (1, 0)) p.1 := by | |
| convert hd.comp_hasDerivAt p.1 ((hasDerivAt_id p.1).prodMk | |
| (hasDerivAt_const p.1 p.2)) using 1 | |
| rfl | |
| have hdy' : HasDerivAt (fun s => F (p.1, s)) (fderiv β F p (0, 1)) p.2 := by | |
| convert hd.comp_hasDerivAt p.2 ((hasDerivAt_const p.2 p.1).prodMk | |
| (hasDerivAt_id p.2)) using 1 | |
| rfl | |
| have hx : fderiv β F p (1, 0) = a := hdx'.unique hdx | |
| have hy : fderiv β F p (0, 1) = b := hdy'.unique hdy | |
| have hdeq : fderiv β F p = jointDifferential a b := by | |
| apply ContinuousLinearMap.ext | |
| intro v | |
| have hv : v = v.1 β’ ((1, 0) : β Γ β) + v.2 β’ ((0, 1) : β Γ β) := by | |
| ext <;> simp | |
| calc | |
| fderiv β F p v = v.1 * a + v.2 * b := by | |
| conv_lhs => rw [hv] | |
| simp only [map_add, map_smul, smul_eq_mul, hx, hy] | |
| _ = jointDifferential a b v := by simp [jointDifferential] | |
| have hFD : HasFDerivAt F (jointDifferential a b) p := hd.congr_fderiv hdeq | |
| have hb : b β 0 := (Real.exp_pos _).ne' | |
| refine β¨triangularLinearEquiv a b hb, ?_β© | |
| have hTF := (hasFDerivAt_fst (π := β) (p := p)).prodMk hFD | |
| convert hTF using 1 <;> first | |
| | rfl | |
| | (ext <;> simp [triangularLinearEquiv, jointDifferential]) | |
| theorem exists_triangularFlow_smooth_chart | |
| (hq : ContDiffOn β β q U) (hU : IsOpen U) (hSU : modelSquare β U) | |
| (hY : ContinuousOn (uncurry Y) (Icc (-2 : β) 2 ΓΛ’ Icc (-2 : β) 2)) | |
| (hrange : β s β Icc (-2 : β) 2, β t β Icc (-2 : β) 2, | |
| Y s t β Icc (-3 : β) 3) | |
| (hstart : β s β Icc (-2 : β) 2, Y s 0 = s) | |
| (hode : β s β Icc (-2 : β) 2, β t β Icc (-2 : β) 2, | |
| HasDerivWithinAt (Y s) (-q (coordinatePoint t (Y s t))) (Icc (-2 : β) 2) t) | |
| {p : β Γ β} (hp : p β pairRectangle 2 (-2) 2) : | |
| β e : OpenPartialHomeomorph (β Γ β) (β Γ β), | |
| p β e.source β§ e.source β pairRectangle 2 (-2) 2 β§ | |
| (e : (β Γ β) β (β Γ β)) = triangularFlow Y β§ | |
| ContDiffOn β β e e.source β§ ContDiffOn β β e.symm e.target := by | |
| let D := pairRectangle 2 (-2) 2 | |
| have hD : IsOpen D := pairRectangle_isOpen 2 (-2) 2 | |
| have hTF : ContDiffOn β β (triangularFlow Y) D := | |
| contDiffOn_fst.prodMk (cap_flow_joint_contDiffOn hq hU hSU hY hrange hstart hode) | |
| have hTFp := hTF.contDiffAt (hD.mem_nhds hp) | |
| obtain β¨A, hAβ© := triangularFlow_hasFDerivAt_equiv hq hU hSU hY hrange hstart hode hp | |
| let e0 := hTFp.toOpenPartialHomeomorph (triangularFlow Y) hA (by simp) | |
| let e := e0.restrOpen D hD | |
| have heq : (e : (β Γ β) β (β Γ β)) = triangularFlow Y := rfl | |
| have hsub : e.source β D := fun _ hx => hx.2 | |
| refine β¨e, β¨hTFp.mem_toOpenPartialHomeomorph_source hA (by simp), hpβ©, | |
| hsub, heq, ?_, ?_β© | |
| Β· rw [heq] | |
| exact hTF.mono hsub | |
| Β· intro y hy | |
| have hx : e.symm y β D := hsub (e.map_target hy) | |
| obtain β¨L, hLβ© := triangularFlow_hasFDerivAt_equiv hq hU hSU hY hrange hstart hode hx | |
| have hLe : HasFDerivAt e (L : (β Γ β) βL[β] (β Γ β)) (e.symm y) := by | |
| rw [heq] | |
| exact hL | |
| have hfe : ContDiffAt β β e (e.symm y) := by | |
| rw [heq] | |
| exact hTF.contDiffAt (hD.mem_nhds hx) | |
| exact (e.contDiffAt_symm hy hLe hfe).contDiffWithinAt | |
| end SmoothLocal.Flow | |
| end | |
| end OAI | |