Download data/lean/OAI/Geometry/IsometricImmersion/Flows/FlowThirdVariation.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 13 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Flows/FlowThirdVariation.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/IsometricImmersion/Flows/FlowThirdVariation.lean
-
curl -L -o FlowThirdVariation.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Flows/FlowThirdVariation.lean
13 kB
| import OAI.Geometry.IsometricImmersion.Flows.FlowSecondVariation | |
| 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 initialSecondFlowDerivative (Y : β β β β β) (p : β Γ β) : β := | |
| deriv (fun u => deriv (fun v => Y v p.1) u) p.2 | |
| def initialSecondForcing (q : Coord β β) (Y : β β β β β) (p : β Γ β) : β := | |
| β« r in 0..p.1, coordPartial 1 (coordPartial 1 q) (coordinatePoint r (Y p.2 r)) * | |
| deriv (fun v => Y v r) p.2 | |
| def initialThirdForcing (q : Coord β β) (Y : β β β β β) (p : β Γ β) : β := | |
| β« r in 0..p.1, | |
| coordPartial 1 (coordPartial 1 (coordPartial 1 q)) (coordinatePoint r (Y p.2 r)) * | |
| (deriv (fun v => Y v r) p.2) ^ 2 + | |
| coordPartial 1 (coordPartial 1 q) (coordinatePoint r (Y p.2 r)) * | |
| deriv (fun u => deriv (fun v => Y v r) u) p.2 | |
| section ActualFlow | |
| variable {q : Coord β β} {U : Set Coord} {Y : β β β β β} | |
| variable (hq : ContDiffOn β β q U) (hU : IsOpen U) (hSU : modelSquare β U) | |
| variable (hY : ContinuousOn (uncurry Y) (Icc (-2 : β) 2 ΓΛ’ Icc (-2 : β) 2)) | |
| variable (hrange : β s β Icc (-2 : β) 2, β t β Icc (-2 : β) 2, | |
| Y s t β Icc (-3 : β) 3) | |
| variable (hstart : β s β Icc (-2 : β) 2, Y s 0 = s) | |
| variable (hode : β s β Icc (-2 : β) 2, β t β Icc (-2 : β) 2, | |
| HasDerivWithinAt (Y s) (-q (coordinatePoint t (Y s t))) (Icc (-2 : β) 2) t) | |
| include hq hU hSU hY hrange hstart hode | |
| theorem flowPullback_hasDerivAt_y {C : Coord β β} (hC : ContDiffOn β β C U) | |
| {s t : β} (hs : s β Ioo (-2 : β) 2) (ht : t β Ioo (-2 : β) 2) : | |
| HasDerivAt (fun u => C (coordinatePoint t (Y u t))) | |
| (coordPartial 1 C (coordinatePoint t (Y s t)) * deriv (fun u => Y u t) s) s := by | |
| have hB := flowPullback_contDiffOn hq hU hSU hY hrange hstart hode hC | |
| have hd : HasFDerivAt (fun p : β Γ β => C (flowCoordinateMap Y p)) | |
| (fderiv β (fun p : β Γ β => C (flowCoordinateMap Y p)) (t, s)) (t, s) := | |
| ((hB.contDiffAt ((pairRectangle_isOpen 2 (-2) 2).mem_nhds β¨ht, hsβ©)).differentiableAt | |
| (by simp)).hasFDerivAt | |
| have hh := hd.comp_hasDerivAt s ((hasDerivAt_const s t).prodMk (hasDerivAt_id s)) | |
| change HasDerivAt (fun u => C (coordinatePoint t (Y u t))) | |
| (pairPartialY (fun p => C (flowCoordinateMap Y p)) (t, s)) s at hh | |
| rw [flowPullback_partial_y hq hU hSU hY hrange hstart hode hC β¨ht, hsβ©] at hh | |
| exact hh | |
| theorem initialSecondFlowDerivative_contDiffOn : | |
| ContDiffOn β β (initialSecondFlowDerivative Y) (pairRectangle 2 (-2) 2) := by | |
| have hV := initialFlowDerivative_contDiffOn hq hU hSU hY hrange hstart hode | |
| have hd : ContDiffOn β β (pairPartialY (initialFlowDerivative Y)) | |
| (pairRectangle 2 (-2) 2) := | |
| (hV.fderiv_of_isOpen (pairRectangle_isOpen 2 (-2) 2) (by simp)).clm_apply contDiffOn_const | |
| apply hd.congr | |
| intro p hp | |
| have hder := ((hV.contDiffAt ((pairRectangle_isOpen 2 (-2) 2).mem_nhds hp)).differentiableAt | |
| (by simp)).hasFDerivAt | |
| exact (hder.comp_hasDerivAt p.2 | |
| ((hasDerivAt_const p.2 p.1).prodMk (hasDerivAt_id p.2))).deriv | |
| theorem initialSecondForcing_hasDerivAt {s t : β} | |
| (hs : s β Ioo (-2 : β) 2) (ht : t β Ioo (-2 : β) 2) : | |
| HasDerivAt (fun u => initialSecondForcing q Y (t, u)) | |
| (initialThirdForcing q Y (t, s)) s := by | |
| let C (p : β Γ β) := coordPartial 1 (coordPartial 1 q) (flowCoordinateMap Y p) * | |
| initialFlowDerivative Y p | |
| have hqq := partial_contDiffOn (partial_contDiffOn hq hU 1) hU 1 | |
| have hC : ContDiffOn β β C (pairRectangle 2 (-2) 2) := | |
| (flowPullback_contDiffOn hq hU hSU hY hrange hstart hode hqq).mul | |
| (initialFlowDerivative_contDiffOn hq hU hSU hY hrange hstart hode) | |
| have hi := pairPrimitive_hasDerivAt_y (hC.of_le (by simp)) ht hs | |
| have heq : pairPrimitive (pairPartialY C) (t, s) = initialThirdForcing q Y (t, s) := by | |
| apply intervalIntegral.integral_congr | |
| intro r hr | |
| have hz : (0 : β) β Ioo (-2) 2 := by norm_num | |
| have hr' : r β Ioo (-2 : β) 2 := | |
| β¨(lt_min hz.1 ht.1).trans_le hr.1, hr.2.trans_lt (max_lt hz.2 ht.2)β© | |
| have hqder := flowPullback_hasDerivAt_y hq hU hSU hY hrange hstart hode hqq hs hr' | |
| have hVder := (cap_flow_initial_second_hasDerivAt hq hU hSU hY hrange hstart hode hs hr').differentiableAt.hasDerivAt | |
| have hprod := hqder.mul hVder | |
| have hfd : HasFDerivAt C (fderiv β C (r, s)) (r, s) := | |
| ((hC.contDiffAt ((pairRectangle_isOpen 2 (-2) 2).mem_nhds β¨hr', hsβ©)).differentiableAt | |
| (by simp)).hasFDerivAt | |
| have he := (hfd.comp_hasDerivAt s | |
| ((hasDerivAt_const s r).prodMk (hasDerivAt_id s))).unique hprod | |
| change pairPartialY C (r, s) = _ at he | |
| change pairPartialY C (r, s) = _ | |
| rw [he] | |
| ring | |
| rw [heq] at hi | |
| exact hi | |
| theorem cap_flow_initial_third_hasDerivAt {s t : β} | |
| (hs : s β Ioo (-2 : β) 2) (ht : t β Ioo (-2 : β) 2) : | |
| HasDerivAt (fun u => initialSecondFlowDerivative Y (t, u)) | |
| (-initialSecondFlowDerivative Y (t, s) * initialSecondForcing q Y (t, s) - | |
| initialFlowDerivative Y (t, s) * initialThirdForcing q Y (t, s)) s := by | |
| have hV : HasDerivAt (fun u => initialFlowDerivative Y (t, u)) | |
| (initialSecondFlowDerivative Y (t, s)) s := | |
| (cap_flow_initial_second_hasDerivAt hq hU hSU hY hrange hstart hode hs ht).differentiableAt.hasDerivAt | |
| have hI := initialSecondForcing_hasDerivAt hq hU hSU hY hrange hstart hode hs ht | |
| have hproduct : HasDerivAt | |
| (fun u => -initialFlowDerivative Y (t, u) * initialSecondForcing q Y (t, u)) | |
| (-initialSecondFlowDerivative Y (t, s) * initialSecondForcing q Y (t, s) + | |
| -initialFlowDerivative Y (t, s) * initialThirdForcing q Y (t, s)) s := hV.neg.mul hI | |
| have he : (fun u => initialSecondFlowDerivative Y (t, u)) =αΆ [π s] | |
| (fun u => -initialFlowDerivative Y (t, u) * initialSecondForcing q Y (t, u)) := by | |
| filter_upwards [isOpen_Ioo.mem_nhds hs] with u hu | |
| exact cap_flow_initial_second_formula hq hU hSU hY hrange hstart hode hu ht | |
| convert hproduct.congr_of_eventuallyEq he using 1 | |
| first | rfl | ring | |
| theorem cap_flow_initial_third_formula {s t : β} | |
| (hs : s β Ioo (-2 : β) 2) (ht : t β Ioo (-2 : β) 2) : | |
| deriv (fun u => initialSecondFlowDerivative Y (t, u)) s = | |
| -initialSecondFlowDerivative Y (t, s) * initialSecondForcing q Y (t, s) - | |
| initialFlowDerivative Y (t, s) * initialThirdForcing q Y (t, s) := | |
| (cap_flow_initial_third_hasDerivAt hq hU hSU hY hrange hstart hode hs ht).deriv | |
| theorem initialThirdForcing_integrable_bound {M : β} (hM : 0 β€ M) | |
| (hMq : β p β modelSquare, |coordPartial 1 q p| β€ M) | |
| (hMqq : β p β modelSquare, |coordPartial 1 (coordPartial 1 q) p| β€ M) | |
| (hMqqq : β p β modelSquare, |coordPartial 1 (coordPartial 1 (coordPartial 1 q)) p| β€ M) | |
| {s t : β} (hs : s β Ioo (-2 : β) 2) (ht : t β Ioo (-2 : β) 2) : | |
| IntervalIntegrable (fun r => | |
| coordPartial 1 (coordPartial 1 (coordPartial 1 q)) (coordinatePoint r (Y s r)) * | |
| (deriv (fun v => Y v r) s)^2 + | |
| coordPartial 1 (coordPartial 1 q) (coordinatePoint r (Y s r)) * | |
| deriv (fun u => deriv (fun v => Y v r) u) s) volume 0 t β§ | |
| |initialThirdForcing q Y (t, s)| β€ (2 * M + 4 * M^2) * Real.exp (4 * M) := by | |
| let C (p : β Γ β) := | |
| coordPartial 1 (coordPartial 1 (coordPartial 1 q)) (flowCoordinateMap Y p) * (initialFlowDerivative Y p)^2 + | |
| coordPartial 1 (coordPartial 1 q) (flowCoordinateMap Y p) * initialSecondFlowDerivative Y p | |
| have hqq := partial_contDiffOn (partial_contDiffOn hq hU 1) hU 1 | |
| have hC : ContDiffOn β β C (pairRectangle 2 (-2) 2) := | |
| ((flowPullback_contDiffOn hq hU hSU hY hrange hstart hode (partial_contDiffOn hqq hU 1)).mul | |
| ((initialFlowDerivative_contDiffOn hq hU hSU hY hrange hstart hode).pow 2)).add | |
| ((flowPullback_contDiffOn hq hU hSU hY hrange hstart hode hqq).mul | |
| (initialSecondFlowDerivative_contDiffOn hq hU hSU hY hrange hstart hode)) | |
| have hc : ContinuousOn (fun r => C (r, s)) (Ioo (-2 : β) 2) := | |
| hC.continuousOn.comp (f := fun r => (r, s)) (by fun_prop) (fun r hr => β¨hr, hsβ©) | |
| have hseg : uIcc (0 : β) t β Ioo (-2 : β) 2 := by | |
| intro r hr | |
| have hz : (0 : β) β Ioo (-2 : β) 2 := by norm_num | |
| exact β¨(lt_min hz.1 ht.1).trans_le hr.1, hr.2.trans_lt (max_lt hz.2 ht.2)β© | |
| refine β¨(hc.mono hseg).intervalIntegrable, ?_β© | |
| have hbound (r : β) (hr : r β uIcc (0 : β) t) : | |
| βC (r, s)β β€ (M + 2 * M^2) * Real.exp (4 * M) := by | |
| have hr' := hseg hr | |
| have hp := flowCoordinateMap_mem_modelSquare (p := (r, s)) hq hU hSU hY hrange hstart hode β¨hr', hsβ© | |
| have hV := (cap_flow_initial_deriv_bounds hq hU hSU hY hrange hstart hode hM hMq hs hr').2 | |
| have hVpos := cap_flow_initial_deriv_pos hq hU hSU hY hrange hstart hode hs hr' | |
| have hVsq : |(deriv (fun v => Y v r) s)^2| β€ Real.exp (4 * M) := by | |
| rw [abs_of_nonneg (sq_nonneg _)] | |
| calc | |
| _ β€ (Real.exp (2 * M))^2 := pow_le_pow_leftβ hVpos.le hV 2 | |
| _ = Real.exp (4 * M) := by rw [pow_two, β Real.exp_add]; congr 1; ring | |
| have hW := cap_flow_initial_second_bound hq hU hSU hY hrange hstart hode hM hMq hMqq hs hr' | |
| rw [Real.norm_eq_abs] | |
| calc | |
| |C (r, s)| β€ | |
| |coordPartial 1 (coordPartial 1 (coordPartial 1 q)) (coordinatePoint r (Y s r))| * | |
| |(deriv (fun v => Y v r) s)^2| + | |
| |coordPartial 1 (coordPartial 1 q) (coordinatePoint r (Y s r))| * | |
| |deriv (fun u => deriv (fun v => Y v r) u) s| := by | |
| calc | |
| _ β€ |coordPartial 1 (coordPartial 1 (coordPartial 1 q)) (coordinatePoint r (Y s r)) * | |
| (deriv (fun v => Y v r) s)^2| + | |
| |coordPartial 1 (coordPartial 1 q) (coordinatePoint r (Y s r)) * | |
| deriv (fun u => deriv (fun v => Y v r) u) s| := abs_add_le _ _ | |
| _ = _ := by rw [abs_mul, abs_mul] | |
| _ β€ M * Real.exp (4 * M) + M * (2 * M * Real.exp (4 * M)) := | |
| add_le_add (mul_le_mul (hMqqq _ hp) hVsq (abs_nonneg _) hM) | |
| (mul_le_mul (hMqq _ hp) hW (abs_nonneg _) hM) | |
| _ = (M + 2 * M^2) * Real.exp (4 * M) := by ring | |
| have hi := intervalIntegral.norm_integral_le_of_norm_le_const | |
| (a := 0) (b := t) (C := (M + 2 * M^2) * Real.exp (4 * M)) (f := fun r => C (r, s)) | |
| (fun r hr => hbound r (uIoc_subset_uIcc hr)) | |
| have ht2 : |t| β€ 2 := (abs_lt.mpr ht).le | |
| calc | |
| _ β€ ((M + 2 * M^2) * Real.exp (4 * M)) * |t| := by | |
| simpa only [Real.norm_eq_abs, sub_zero, initialThirdForcing, C, | |
| flowCoordinateMap, initialFlowDerivative, initialSecondFlowDerivative] using hi | |
| _ β€ ((M + 2 * M^2) * Real.exp (4 * M)) * 2 := mul_le_mul_of_nonneg_left ht2 | |
| (mul_nonneg (by positivity) (Real.exp_pos _).le) | |
| _ = (2 * M + 4 * M^2) * Real.exp (4 * M) := by ring | |
| theorem cap_flow_initial_third_bound {M : β} (hM : 0 β€ M) | |
| (hMq : β p β modelSquare, |coordPartial 1 q p| β€ M) | |
| (hMqq : β p β modelSquare, |coordPartial 1 (coordPartial 1 q) p| β€ M) | |
| (hMqqq : β p β modelSquare, |coordPartial 1 (coordPartial 1 (coordPartial 1 q)) p| β€ M) | |
| {s t : β} (hs : s β Ioo (-2 : β) 2) (ht : t β Ioo (-2 : β) 2) : | |
| |deriv (fun u => initialSecondFlowDerivative Y (t, u)) s| β€ | |
| (2 * M + 8 * M^2) * Real.exp (6 * M) := by | |
| rw [cap_flow_initial_third_formula hq hU hSU hY hrange hstart hode hs ht] | |
| have hW := cap_flow_initial_second_bound hq hU hSU hY hrange hstart hode hM hMq hMqq hs ht | |
| have hI := (flow_initial_second_integral_bound hq hU hSU hY hrange hstart hode hM hMq hMqq hs ht).2 | |
| have hJ := (initialThirdForcing_integrable_bound hq hU hSU hY hrange hstart hode hM hMq hMqq hMqqq hs ht).2 | |
| have hV : |initialFlowDerivative Y (t, s)| β€ Real.exp (2 * M) := by | |
| unfold initialFlowDerivative | |
| rw [abs_of_pos (cap_flow_initial_deriv_pos hq hU hSU hY hrange hstart hode hs ht)] | |
| exact (cap_flow_initial_deriv_bounds hq hU hSU hY hrange hstart hode hM hMq hs ht).2 | |
| calc | |
| _ β€ |initialSecondFlowDerivative Y (t, s)| * |initialSecondForcing q Y (t, s)| + | |
| |initialFlowDerivative Y (t, s)| * |initialThirdForcing q Y (t, s)| := by | |
| simpa only [abs_mul, abs_neg] using | |
| abs_sub (-(initialSecondFlowDerivative Y (t, s)) * initialSecondForcing q Y (t, s)) | |
| (initialFlowDerivative Y (t, s) * initialThirdForcing q Y (t, s)) | |
| _ β€ (2 * M * Real.exp (4 * M)) * (2 * M * Real.exp (2 * M)) + | |
| Real.exp (2 * M) * ((2 * M + 4 * M^2) * Real.exp (4 * M)) := | |
| add_le_add (mul_le_mul hW hI (abs_nonneg _) (by positivity)) | |
| (mul_le_mul hV hJ (abs_nonneg _) (Real.exp_pos _).le) | |
| _ = (2 * M + 8 * M^2) * (Real.exp (2 * M) * Real.exp (4 * M)) := by ring | |
| _ = (2 * M + 8 * M^2) * Real.exp (6 * M) := by | |
| rw [β Real.exp_add] | |
| congr 2 | |
| ring | |
| end ActualFlow | |
| end SmoothLocal.Flow | |
| end | |
| end OAI | |