Download data/lean/OAI/Geometry/IsometricImmersion/Flows/FlowVariation.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.56 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Flows/FlowVariation.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/IsometricImmersion/Flows/FlowVariation.lean
-
curl -L -o FlowVariation.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Flows/FlowVariation.lean
6.56 kB
| import OAI.Geometry.IsometricImmersion.Flows.FlowParameterContinuity | |
| import Mathlib.Analysis.Calculus.Deriv.Slope | |
| namespace OAI | |
| noncomputable section | |
| open Set Metric Filter Function MeasureTheory | |
| open scoped ContDiff Topology Interval | |
| namespace SmoothLocal.Flow | |
| open SmoothLocal.Geometry SmoothLocal.ODE SmoothLocal.Weighted | |
| theorem hasDerivAt_of_exact_secant {f g : β β β} {s : β} | |
| (hg : ContinuousAt g s) | |
| (he : βαΆ u in π s, f u - f s = (u - s) * g u) : | |
| HasDerivAt f (g s) s := by | |
| rw [hasDerivAt_iff_tendsto_slope] | |
| have hslope : slope f s =αΆ [π[β ] s] g := by | |
| filter_upwards [he.filter_mono nhdsWithin_le_nhds, self_mem_nhdsWithin] with u hu hne | |
| have hne' : u β s := by simpa only [mem_compl_iff, mem_singleton_iff] using hne | |
| rw [slope_def_field, hu] | |
| exact mul_div_cancel_leftβ (g u) (sub_ne_zero.mpr hne') | |
| exact (hg.mono_left nhdsWithin_le_nhds).congr' hslope.symm | |
| variable {q : Coord β β} {U : Set Coord} {Y : β β β β β} | |
| theorem flow_difference_formula | |
| (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) | |
| {s0 s1 t : β} (hs0 : s0 β Icc (-2 : β) 2) (hs1 : s1 β Icc (-2 : β) 2) | |
| (ht : t β Ioo (-2 : β) 2) : | |
| Y s1 t - Y s0 t = (s1 - s0) * | |
| Real.exp (-(β« u in 0..t, flowAverageCoefficient q Y s0 s1 u)) := by | |
| have hcoeff := flowAverageCoefficient_continuous hq hU hSU hY hrange | |
| have ha : ContinuousOn (flowAverageCoefficient q Y s0 s1) (Icc (-2 : β) 2) := by | |
| rw [continuousOn_iff_continuous_domRestrict] | |
| exact hcoeff.comp | |
| ((continuous_const (y := (β¨s0, hs0β© : CapInterval))).prodMk | |
| ((continuous_const (y := (β¨s1, hs1β© : CapInterval))).prodMk continuous_id)) | |
| have hz (u : β) (hu : u β Ioo (-2 : β) 2) : | |
| HasDerivAt (fun v => Y s1 v - Y s0 v) | |
| (-flowAverageCoefficient q Y s0 s1 u * (Y s1 u - Y s0 u)) u := by | |
| exact (flow_difference_hasDerivWithinAt hq hU hSU β¨hu.1.le, hu.2.leβ© | |
| (hrange s0 hs0 u β¨hu.1.le, hu.2.leβ©) (hrange s1 hs1 u β¨hu.1.le, hu.2.leβ©) | |
| (hode s0 hs0 u β¨hu.1.le, hu.2.leβ©) (hode s1 hs1 u β¨hu.1.le, hu.2.leβ©)).hasDerivAt | |
| (Icc_mem_nhds hu.1 hu.2) | |
| have he := scalar_linear_evolution_formula (show (0 : β) < 2 by norm_num) | |
| (ha.mono Ioo_subset_Icc_self) hz ht | |
| simpa only [hstart s0 hs0, hstart s1 hs1] using he | |
| theorem cap_flow_hasDerivAt_initial | |
| (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) | |
| {s t : β} (hs : s β Ioo (-2 : β) 2) (ht : t β Ioo (-2 : β) 2) : | |
| HasDerivAt (fun u => Y u t) | |
| (Real.exp (-(β« r in 0..t, coordPartial 1 q (coordinatePoint r (Y s r))))) s := by | |
| let G (u : β) := Real.exp (-(β« r in 0..t, flowAverageCoefficient q Y s u r)) | |
| have hG : ContinuousOn G (Icc (-2 : β) 2) := by | |
| rw [continuousOn_iff_continuous_domRestrict] | |
| exact (((flowAverageIntegral_continuous hq hU hSU hY hrange | |
| β¨ht.1.le, ht.2.leβ©).comp | |
| ((continuous_const (y := (β¨s, β¨hs.1.le, hs.2.leβ©β© : CapInterval))).prodMk continuous_id)).neg).rexp | |
| have he : βαΆ u in π s, Y u t - Y s t = (u - s) * G u := by | |
| filter_upwards [Icc_mem_nhds hs.1 hs.2] with u hu | |
| exact flow_difference_formula hq hU hSU hY hrange hstart hode β¨hs.1.le, hs.2.leβ© hu ht | |
| have hd := hasDerivAt_of_exact_secant (hG.continuousAt (Icc_mem_nhds hs.1 hs.2)) he | |
| have hdiag : G s = Real.exp (-(β« r in 0..t, | |
| coordPartial 1 q (coordinatePoint r (Y s r)))) := by | |
| simp only [G, flowAverageCoefficient, verticalAverageDerivative_diagonal] | |
| rw [hdiag] at hd | |
| exact hd | |
| theorem cap_flow_initial_deriv_pos | |
| (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) | |
| {s t : β} (hs : s β Ioo (-2 : β) 2) (ht : t β Ioo (-2 : β) 2) : | |
| 0 < deriv (fun u => Y u t) s := by | |
| rw [(cap_flow_hasDerivAt_initial hq hU hSU hY hrange hstart hode hs ht).deriv] | |
| exact Real.exp_pos _ | |
| theorem exists_cap_flow_first_variation | |
| (hq : ContDiffOn β β q U) (hU : IsOpen U) (hSU : modelSquare β U) | |
| (hsmall : β p β modelSquare, |q p| β€ (1 : β) / 100) : | |
| β Y : β β β β β, | |
| ContinuousOn (uncurry Y) (Icc (-2 : β) 2 ΓΛ’ Icc (-2 : β) 2) β§ | |
| (β s β Icc (-2 : β) 2, ContDiffOn β β (Y s) (Icc (-2 : β) 2)) β§ | |
| (β s β Icc (-2 : β) 2, Y s 0 = s) β§ | |
| (β s β Icc (-2 : β) 2, β t β Icc (-2 : β) 2, | |
| HasDerivWithinAt (Y s) (-q (coordinatePoint t (Y s t))) (Icc (-2 : β) 2) t) β§ | |
| (β s β Icc (-2 : β) 2, β t β Icc (-2 : β) 2, | |
| |Y s t - s| β€ (1 : β) / 50) β§ | |
| (β s β Ioo (-2 : β) 2, β t β Ioo (-2 : β) 2, | |
| HasDerivAt (fun u => Y u t) | |
| (Real.exp (-(β« r in 0..t, coordPartial 1 q (coordinatePoint r (Y s r))))) s β§ | |
| 0 < deriv (fun u => Y u t) s) := by | |
| obtain β¨Y, hY, htime, hstart, hode, hdisp, hdisp', hrange, hLipβ© := | |
| exists_cap_flow hq hU hSU hsmall | |
| have hrange' (s : β) (hs : s β Icc (-2 : β) 2) (t : β) | |
| (ht : t β Icc (-2 : β) 2) : Y s t β Icc (-3 : β) 3 := | |
| abs_le.mp ((hrange s hs t ht).1.trans (by norm_num)) | |
| refine β¨Y, hY, htime, hstart, hode, hdisp', ?_β© | |
| intro s hs t ht | |
| exact β¨cap_flow_hasDerivAt_initial hq hU hSU hY hrange' hstart hode hs ht, | |
| cap_flow_initial_deriv_pos hq hU hSU hY hrange' hstart hode hs htβ© | |
| end SmoothLocal.Flow | |
| end | |
| end OAI | |