Download data/lean/OAI/Geometry/IsometricImmersion/Comparison/QFirstJetComparison.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.95 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Comparison/QFirstJetComparison.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/IsometricImmersion/Comparison/QFirstJetComparison.lean
-
curl -L -o QFirstJetComparison.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Comparison/QFirstJetComparison.lean
4.95 kB
| import OAI.Geometry.IsometricImmersion.Darboux.QFirstJetFunctions | |
| namespace OAI | |
| noncomputable section | |
| open Set Filter | |
| open scoped ContDiff Topology BigOperators Matrix Matrix.Norms.Elementwise | |
| namespace SmoothLocal.Pulse | |
| open SmoothLocal.Geometry SmoothLocal.HighEquation | |
| theorem qFirst_segment_distance_le (a b : QFirstInput) {x : QFirstInput} | |
| (hx : x β segment β a b) : βx-aβ β€ βb-aβ := by | |
| have hball : x β Metric.closedBall a βb-aβ := | |
| (convex_closedBall a βb-aβ).segment_subset | |
| (by simp) (by simp only [Metric.mem_closedBall,dist_eq_norm,le_refl]) hx | |
| simpa only [Metric.mem_closedBall,dist_eq_norm] using hball | |
| theorem qFirst_close_segment_subset_baseTube (a b : QFirstInput) {B d : β} | |
| (ha : βaβ β€ B) (hdet : d β€ qFirstDet a) (hdist : βb-aβ β€ 1) | |
| (hsmall : (4*max B 0+2)*βb-aβ β€ d/2) : | |
| segment β a b β qFirstBaseTube (max B 0+1) (d/2) := by | |
| intro x hx | |
| have hxa := qFirst_segment_distance_le a b hx | |
| have hxnorm : βxβ β€ max B 0+1 := by | |
| calc | |
| _ = β(x-a)+aβ := by rw [sub_add_cancel] | |
| _ β€ βx-aβ+βaβ := norm_add_le _ _ | |
| _ β€ 1+max B 0 := add_le_add (hxa.trans hdist) (ha.trans (le_max_left _ _)) | |
| _ = _ := by ring | |
| have hmatrixD : βx.1.1-a.1.1β β€ βb-aβ := | |
| (show βx.1.1-a.1.1β β€ βx-aβ from | |
| (norm_fst_le (x-a).1).trans (norm_fst_le (x-a))).trans hxa | |
| have hmatrixA : βa.1.1β β€ max B 0 := | |
| ((norm_fst_le a.1).trans (norm_fst_le a)).trans (ha.trans (le_max_left _ _)) | |
| have hdetdiff := det_sub_le_small_first_distance (Matrix.of a.1.1) (Matrix.of x.1.1) | |
| (le_max_right B 0) (norm_nonneg _) hdist hmatrixA hmatrixD | |
| have hxdet : d/2 β€ qFirstDet x := by | |
| have hneg := neg_abs_le (qFirstDet x-qFirstDet a) | |
| change |qFirstDet x-qFirstDet a| β€ (4*max B 0+2)*βb-aβ at hdetdiff | |
| linarith [hdetdiff.trans hsmall] | |
| exact β¨by simpa only [Metric.mem_closedBall,dist_zero_right] using hxnorm,hxdetβ© | |
| theorem exists_uniform_qFirst_comparison (B : β) {d c : β} | |
| (hd : 0 < d) (hc : 0 < c) : | |
| β H F L : β, 0 β€ H β§ 0 β€ F β§ 0 β€ L β§ | |
| β a b : QFirstInput, βaβ β€ B β d β€ qFirstDet a β c β€ |qFirstXX a| β | |
| βb-aβ β€ 1 β (4*max B 0+2)*βb-aβ β€ d/2 β H*βb-aβ β€ c/2 β | |
| (β x β segment β a b, c/2 β€ |qFirstXX x|) β§ | |
| |qFirstDensityFactor b-qFirstDensityFactor a| β€ F*βb-aβ β§ | |
| |qFirstLower b-qFirstLower a| β€ L*βb-aβ := by | |
| obtain β¨H,hH,hHbβ© := qFirstXX_fderiv_bound (max B 0+1) (half_pos hd) | |
| obtain β¨F,hF,hFbβ© := qFirstTube_fderiv_bound qFirstDensityFactor | |
| qFirstDensityFactor_contDiffOn (max B 0+1) (half_pos hd) (half_pos hc) | |
| obtain β¨L,hL,hLbβ© := qFirstTube_fderiv_bound qFirstLower | |
| qFirstLower_contDiffOn (max B 0+1) (half_pos hd) (half_pos hc) | |
| refine β¨H,F,L,hH,hF,hL,?_β© | |
| intro a b ha hdet hxx hdist hsmall hxxsmall | |
| have hbase := qFirst_close_segment_subset_baseTube a b ha hdet hdist hsmall | |
| have hXXdiff : β x β segment β a b, DifferentiableAt β qFirstXX x := by | |
| intro x hx | |
| exact (qFirstXX_contDiffOn.contDiffAt (qFirstBase_isOpen.mem_nhds | |
| (qFirstBaseTube_subset_base (max B 0+1) (half_pos hd) (hbase hx)))).differentiableAt (by simp) | |
| have hfloor : β x β segment β a b, c/2 β€ |qFirstXX x| := by | |
| intro x hx | |
| have herr : |qFirstXX x-qFirstXX a| β€ H*βx-aβ := by | |
| simpa only [Real.norm_eq_abs] using | |
| (convex_segment a b).norm_image_sub_le_of_norm_fderiv_le hXXdiff | |
| (fun y hy => hHb y (hbase hy)) (left_mem_segment β a b) hx | |
| have hsmall' : |qFirstXX x-qFirstXX a| β€ c/2 := | |
| herr.trans ((mul_le_mul_of_nonneg_left (qFirst_segment_distance_le a b hx) hH).trans hxxsmall) | |
| have htriangle : |qFirstXX a| β€ |qFirstXX x|+|qFirstXX x-qFirstXX a| := by | |
| calc | |
| _ = |qFirstXX x-(qFirstXX x-qFirstXX a)| := by congr 1; ring | |
| _ β€ _ := abs_sub _ _ | |
| linarith | |
| have htube : segment β a b β qFirstTube (max B 0+1) (d/2) (c/2) := | |
| fun x hx => β¨hbase hx,hfloor x hxβ© | |
| have hcompare (f : QFirstInput β β) (hf : ContDiffOn β β f qFirstDomain) | |
| (C : β) (hCb : β x β qFirstTube (max B 0+1) (d/2) (c/2), βfderiv β f xβ β€ C) : | |
| |f b-f a| β€ C*βb-aβ := by | |
| have hdiff : β x β segment β a b, DifferentiableAt β f x := by | |
| intro x hx | |
| exact (hf.contDiffAt (qFirstDomain_isOpen.mem_nhds | |
| (qFirstTube_subset_domain (max B 0+1) (half_pos hd) (half_pos hc) | |
| (htube hx)))).differentiableAt (by simp) | |
| simpa only [Real.norm_eq_abs] using | |
| (convex_segment a b).norm_image_sub_le_of_norm_fderiv_le hdiff | |
| (fun x hx => hCb x (htube hx)) (left_mem_segment β a b) (right_mem_segment β a b) | |
| exact β¨hfloor,hcompare _ qFirstDensityFactor_contDiffOn F hFb, | |
| hcompare _ qFirstLower_contDiffOn L hLbβ© | |
| end SmoothLocal.Pulse | |
| end | |
| end OAI | |