Download data/lean/OAI/Geometry/IsometricImmersion/Flows/Existence.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.98 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Flows/Existence.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/IsometricImmersion/Flows/Existence.lean
-
curl -L -o Existence.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Flows/Existence.lean
3.98 kB
| import Mathlib.Analysis.ODE.ExistUnique | |
| import Mathlib.Analysis.Calculus.Deriv.Comp | |
| import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic | |
| import Mathlib.Tactic.Linarith | |
| import Mathlib.Tactic.NormNum | |
| namespace OAI | |
| noncomputable section | |
| open Set Metric | |
| open scoped NNReal Interval | |
| namespace SmoothLocal.ODE | |
| def curvatureField (k : β β β) (t : β) (u : β Γ β) : β Γ β := | |
| (u.2, -k t * u.1) | |
| theorem curvatureField_lipschitz {k : β β β} {t : β} | |
| (hk : |k t| β€ (1 : β) / 1000) : | |
| LipschitzWith 1 (curvatureField k t) := by | |
| apply LipschitzWith.of_dist_le_mul | |
| intro u v | |
| rw [NNReal.coe_one, one_mul, dist_eq_norm, dist_eq_norm] | |
| change max βu.2 - v.2β β-k t * u.1 - -k t * v.1β β€ βu - vβ | |
| refine max_le (norm_snd_le (u - v)) ?_ | |
| calc | |
| β-k t * u.1 - -k t * v.1β = |k t| * βu.1 - v.1β := by | |
| rw [β mul_sub, norm_mul, Real.norm_eq_abs, abs_neg] | |
| _ β€ 1 * βu.1 - v.1β := | |
| mul_le_mul_of_nonneg_right (by linarith) (norm_nonneg _) | |
| _ β€ βu - vβ := by simpa using norm_fst_le (u - v) | |
| theorem curvatureField_norm_le {k : β β β} {t : β} | |
| (hk : |k t| β€ (1 : β) / 1000) {u : β Γ β} | |
| (hu : u β closedBall ((1 : β), (0 : β)) 2) : | |
| βcurvatureField k t uβ β€ 2 := by | |
| have hu' : βu - ((1 : β), (0 : β))β β€ 2 := by | |
| simpa only [mem_closedBall, dist_eq_norm] using hu | |
| have hfst : |u.1 - 1| β€ 2 := by | |
| exact (norm_fst_le (u - ((1 : β), (0 : β)))).trans hu' | |
| have hsnd : βu.2β β€ 2 := by | |
| simpa using (norm_snd_le (u - ((1 : β), (0 : β)))).trans hu' | |
| have hu1 : |u.1| β€ 3 := by | |
| obtain β¨ha, hbβ© := abs_le.mp hfst | |
| exact abs_le.mpr β¨by linarith, by linarithβ© | |
| change max βu.2β β-k t * u.1β β€ 2 | |
| refine max_le hsnd ?_ | |
| rw [norm_mul, Real.norm_eq_abs, Real.norm_eq_abs, abs_neg] | |
| have hh := mul_le_mul hk hu1 (abs_nonneg _) (by norm_num : (0 : β) β€ 1 / 1000) | |
| linarith | |
| theorem exists_curvature_state_on_closed_interval | |
| (k : β β β) (r : β) (hr : 0 β€ r) (hr1 : r β€ 1) | |
| (hkcont : ContinuousOn k (Icc (-r) r)) | |
| (hkbound : β t β Icc (-r) r, |k t| β€ (1 : β) / 1000) : | |
| β Ξ± : β β β Γ β, Ξ± 0 = (1, 0) β§ | |
| β t β Icc (-r) r, | |
| HasDerivWithinAt Ξ± (curvatureField k t (Ξ± t)) (Icc (-r) r) t := by | |
| let tβ : Icc (-r) r := β¨0, by constructor <;> linarithβ© | |
| have hPL : IsPicardLindelof (curvatureField k) tβ (1, 0) 2 0 2 1 := by | |
| refine β¨?_, ?_, ?_, ?_β© | |
| Β· intro t ht | |
| apply LipschitzOnWith.of_dist_le_mul | |
| intro u _ v _ | |
| exact (curvatureField_lipschitz (hkbound t ht)).dist_le_mul u v | |
| Β· intro u _ | |
| exact continuousOn_const.prodMk (hkcont.neg.mul continuousOn_const) | |
| Β· intro t ht u hu | |
| exact curvatureField_norm_le (hkbound t ht) hu | |
| Β· change (2 : β) * max (r - 0) (0 - -r) β€ (2 : β) - 0 | |
| simp only [sub_zero, zero_sub, neg_neg, max_self] | |
| linarith | |
| simpa only [tβ] using hPL.exists_eq_forall_mem_Icc_hasDerivWithinAtβ | |
| theorem curvature_integral_bound (k f : β β β) (x F : β) | |
| (hF : 0 β€ F) | |
| (hk : β t β Set.uIoc 0 x, |k t| β€ (1 : β) / 1000) | |
| (hf : β t β Set.uIoc 0 x, |f t| β€ F) : | |
| |β« t in 0..x, k t * f t| β€ ((1 : β) / 1000) * F * |x| := by | |
| have h := intervalIntegral.norm_integral_le_of_norm_le_const | |
| (a := 0) (b := x) (C := ((1 : β) / 1000) * F) | |
| (f := fun t => k t * f t) (fun t ht => by | |
| rw [Real.norm_eq_abs, abs_mul] | |
| exact (mul_le_mul_of_nonneg_left (hf t ht) (abs_nonneg _)).trans | |
| (mul_le_mul_of_nonneg_right (hk t ht) hF)) | |
| simpa only [Real.norm_eq_abs, sub_zero] using h | |
| theorem positive_of_integral_bounds (f F : β) | |
| (hF : F β€ 1 + ((1 : β) / 1000) * F) | |
| (hf : |f - 1| β€ ((1 : β) / 1000) * F) : | |
| (998 : β) / 999 β€ f β§ f β€ (1000 : β) / 999 := by | |
| obtain β¨ha, hbβ© := abs_le.mp hf | |
| constructor <;> linarith | |
| end SmoothLocal.ODE | |
| end | |
| end OAI | |