Download data/lean/OAI/Geometry/IsometricImmersion/Flows/FlowImageMargin.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.91 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Flows/FlowImageMargin.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/IsometricImmersion/Flows/FlowImageMargin.lean
-
curl -L -o FlowImageMargin.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Flows/FlowImageMargin.lean
6.91 kB
| import OAI.Geometry.IsometricImmersion.Flows.FlowImageFirstBounds | |
| import OAI.Geometry.IsometricImmersion.Flows.FlowCurvature | |
| import OAI.Geometry.IsometricImmersion.Energy.RectangleSobolev | |
| import Mathlib.Topology.Order.IntermediateValue | |
| namespace OAI | |
| noncomputable section | |
| open Set Function Filter | |
| open scoped ContDiff Topology | |
| namespace SmoothLocal.Flow | |
| open SmoothLocal.Geometry SmoothLocal.ODE SmoothLocal.Weighted | |
| def openCoordinateRectangle (tl tr sb st : β) : Set Coord := | |
| {p | p 0 β Ioo tl tr β§ p 1 β Ioo sb st} | |
| def flowInteriorRadius (M dt ds : β) : β := | |
| min (dt / 2) (((50 : β) / 101) * Real.exp (-2 * M) * ds) | |
| theorem flowInteriorRadius_pos (M : β) {dt ds : β} (ht : 0 < dt) (hs : 0 < ds) : | |
| 0 < flowInteriorRadius M dt ds := by | |
| apply lt_min | |
| Β· exact half_pos ht | |
| Β· exact mul_pos (mul_pos (by norm_num) (Real.exp_pos _)) hs | |
| theorem flowInteriorRadius_lt_time (M : β) {dt ds : β} (ht : 0 < dt) : | |
| flowInteriorRadius M dt ds < dt := by | |
| have h := min_le_left (dt / 2) (((50 : β) / 101) * Real.exp (-2 * M) * ds) | |
| change flowInteriorRadius M dt ds β€ dt / 2 at h | |
| linarith | |
| theorem flowInteriorRadius_vertical_margin (M : β) {dt ds : β} (hs : 0 < ds) : | |
| ((101 : β) / 100) * flowInteriorRadius M dt ds < Real.exp (-2 * M) * ds := by | |
| have h := min_le_right (dt / 2) (((50 : β) / 101) * Real.exp (-2 * M) * ds) | |
| change flowInteriorRadius M dt ds β€ ((50 : β) / 101) * Real.exp (-2 * M) * ds at h | |
| have hp := mul_pos (Real.exp_pos (-2 * M)) hs | |
| nlinarith | |
| 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 actual_flow_ordinary_rectangle_inclusion | |
| {M tl tr sb st dt ds t0 s0 : β} (hM : 0 β€ M) | |
| (hq0 : β p β modelSquare, |q p| β€ (1 : β) / 100) | |
| (hq1 : β p β modelSquare, |coordPartial 1 q p| β€ M) | |
| (htl : -2 < tl) (htr : tr < 2) (hsb : -2 < sb) (hst : st < 2) | |
| (hdt : 0 < dt) (hds : 0 < ds) | |
| (ht0 : t0 β Icc (tl + dt) (tr - dt)) | |
| (hs0 : s0 β Icc (sb + ds) (st - ds)) : | |
| closedRectangle (t0 - flowInteriorRadius M dt ds) (t0 + flowInteriorRadius M dt ds) | |
| (Y s0 t0 - flowInteriorRadius M dt ds) (Y s0 t0 + flowInteriorRadius M dt ds) β | |
| capChart Y '' openCoordinateRectangle tl tr sb st := by | |
| intro p hp | |
| let r := flowInteriorRadius M dt ds | |
| have hr : 0 < r := flowInteriorRadius_pos M hdt hds | |
| have hrt : r < dt := flowInteriorRadius_lt_time M hdt | |
| have hrs : ((101 : β) / 100) * r < Real.exp (-2 * M) * ds := | |
| flowInteriorRadius_vertical_margin M hds | |
| have hpx : p 0 β Icc (t0 - r) (t0 + r) := hp.1 | |
| have hpy : p 1 β Icc (Y s0 t0 - r) (Y s0 t0 + r) := hp.2 | |
| have htime : p 0 β Ioo tl tr := by constructor <;> linarith [ht0.1, ht0.2, hpx.1, hpx.2] | |
| have htimeGlobal : p 0 β Ioo (-2 : β) 2 := β¨htl.trans htime.1, htime.2.trans htrβ© | |
| have ht0Global : t0 β Ioo (-2 : β) 2 := by constructor <;> linarith [ht0.1, ht0.2] | |
| have hs0Global : s0 β Ioo (-2 : β) 2 := by constructor <;> linarith [hs0.1, hs0.2] | |
| have hsbGlobal : sb β Ioo (-2 : β) 2 := by constructor <;> linarith [hs0.1, hs0.2] | |
| have hstGlobal : st β Ioo (-2 : β) 2 := by constructor <;> linarith [hs0.1, hs0.2] | |
| have hsb0 : sb β€ s0 := by linarith [hs0.1] | |
| have hs0t : s0 β€ st := by linarith [hs0.2] | |
| have hlow := cap_flow_seed_gap hq hU hSU hY hrange hstart hode hM hq1 | |
| hsbGlobal hs0Global htimeGlobal hsb0 | |
| have hupp := cap_flow_seed_gap hq hU hSU hY hrange hstart hode hM hq1 | |
| hs0Global hstGlobal htimeGlobal hs0t | |
| have hgap0 : Real.exp (-2 * M) * ds β€ Real.exp (-2 * M) * (s0 - sb) := | |
| mul_le_mul_of_nonneg_left (by linarith [hs0.1]) (Real.exp_pos _).le | |
| have hgap1 : Real.exp (-2 * M) * ds β€ Real.exp (-2 * M) * (st - s0) := | |
| mul_le_mul_of_nonneg_left (by linarith [hs0.2]) (Real.exp_pos _).le | |
| have hxdist : |p 0 - t0| β€ r := abs_le.mpr β¨by linarith [hpx.1], by linarith [hpx.2]β© | |
| have hmove : |Y s0 (p 0) - Y s0 t0| β€ ((1 : β) / 100) * r := | |
| (cap_flow_time_lipschitz hq hU hSU hY hrange hstart hode hq0 | |
| hs0Global ht0Global htimeGlobal).trans | |
| (mul_le_mul_of_nonneg_left hxdist (by norm_num)) | |
| have hlo : Y sb (p 0) < p 1 := by | |
| have hm := (abs_le.mp hmove).2 | |
| nlinarith [hlow, hgap0, hpy.1, hrs] | |
| have hhi : p 1 < Y st (p 0) := by | |
| have hm := (abs_le.mp hmove).1 | |
| nlinarith [hupp, hgap1, hpy.2, hrs] | |
| have hsb_st : sb β€ st := hsb0.trans hs0t | |
| have hseedCont : ContinuousOn (fun s : β => (s, p 0)) (Icc sb st) := by fun_prop | |
| have hseedMap : MapsTo (fun s : β => (s, p 0)) (Icc sb st) | |
| (Icc (-2 : β) 2 ΓΛ’ Icc (-2 : β) 2) := by | |
| intro s hs | |
| exact β¨β¨by linarith [hs.1], by linarith [hs.2]β©, | |
| β¨htimeGlobal.1.le, htimeGlobal.2.leβ©β© | |
| have hcont : ContinuousOn (fun s => Y s (p 0)) (Icc sb st) := by | |
| convert hY.comp hseedCont hseedMap using 1; rfl | |
| obtain β¨s, hs, hseβ© := intermediate_value_Icc hsb_st hcont β¨hlo.le, hhi.leβ© | |
| have hsStrict : s β Ioo sb st := by | |
| constructor | |
| Β· by_contra hnot | |
| have he : s = sb := le_antisymm (le_of_not_gt hnot) hs.1 | |
| subst s | |
| linarith | |
| Β· by_contra hnot | |
| have he : s = st := le_antisymm hs.2 (le_of_not_gt hnot) | |
| subst s | |
| linarith | |
| refine β¨boxPoint (p 0) s, ?_, ?_β© | |
| Β· simpa [openCoordinateRectangle, boxPoint] using And.intro htime hsStrict | |
| Β· ext i | |
| fin_cases i <;> simp [capChart, capFlowHeight, boxPoint, coordinatePoint, hse] | |
| theorem actual_flow_uniform_image_margin | |
| {M tl tr sb st dt ds : β} (hM : 0 β€ M) | |
| (hq0 : β p β modelSquare, |q p| β€ (1 : β) / 100) | |
| (hq1 : β p β modelSquare, |coordPartial 1 q p| β€ M) | |
| (htl : -2 < tl) (htr : tr < 2) (hsb : -2 < sb) (hst : st < 2) | |
| (hdt : 0 < dt) (hds : 0 < ds) : | |
| 0 < flowInteriorRadius M dt ds β§ | |
| β p β capChart Y '' closedRectangle (tl + dt) (tr - dt) (sb + ds) (st - ds), | |
| closedRectangle (p 0 - flowInteriorRadius M dt ds) (p 0 + flowInteriorRadius M dt ds) | |
| (p 1 - flowInteriorRadius M dt ds) (p 1 + flowInteriorRadius M dt ds) β | |
| capChart Y '' openCoordinateRectangle tl tr sb st := by | |
| refine β¨flowInteriorRadius_pos M hdt hds, ?_β© | |
| rintro p β¨a, ha, rflβ© | |
| simpa [capChart, capFlowHeight, coordinatePoint] using | |
| actual_flow_ordinary_rectangle_inclusion hq hU hSU hY hrange hstart hode | |
| hM hq0 hq1 htl htr hsb hst hdt hds ha.1 ha.2 | |
| end SmoothLocal.Flow | |
| end | |
| end OAI | |