Download data/lean/OAI/Geometry/IsometricImmersion/Caps/CapReflectionCalculus.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 7.97 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Caps/CapReflectionCalculus.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/IsometricImmersion/Caps/CapReflectionCalculus.lean
-
curl -L -o CapReflectionCalculus.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Caps/CapReflectionCalculus.lean
7.97 kB
| import OAI.Geometry.IsometricImmersion.Caps.CapReflectionGeometry | |
| namespace OAI | |
| noncomputable section | |
| open Set Function Filter | |
| open scoped ContDiff Topology Interval | |
| namespace SmoothLocal.Flow.Reflection | |
| open SmoothLocal.Geometry SmoothLocal.ODE SmoothLocal.Weighted SmoothLocal.HighEquation | |
| theorem reflectPoint_coordinatePoint (t s : β) : | |
| reflectPoint (coordinatePoint t s) = coordinatePoint t (-s) := by | |
| ext i | |
| fin_cases i <;> simp [coordinatePoint] | |
| theorem reflectPoint_mem_capChartDomain (p : Coord) : | |
| reflectPoint p β capChartDomain β p β capChartDomain := by | |
| change (reflectPoint p 0 β Ioo (-2 : β) 2 β§ reflectPoint p 1 β Ioo (-2 : β) 2) β _ | |
| simp only [reflectPoint_zero,reflectPoint_one,mem_Ioo] | |
| change ((-2 < p 0 β§ p 0 < 2) β§ -2 < -p 1 β§ -p 1 < 2) β | |
| ((-2 < p 0 β§ p 0 < 2) β§ -2 < p 1 β§ p 1 < 2) | |
| constructor <;> rintro β¨ht,hsβ© <;> refine β¨ht,?_,?_β© <;> linarith [hs.1,hs.2] | |
| theorem coordPartial_reflectedScalar {f : Coord β β} {p : Coord} | |
| (hf : DifferentiableAt β f (reflectPoint p)) (i : Fin 2) : | |
| coordPartial i (reflectedScalar f) p = | |
| if i=0 then coordPartial 0 f (reflectPoint p) else -coordPartial 1 f (reflectPoint p) := by | |
| have hfa : DifferentiableAt β f (affineCoordinates 0 reflectionMatrix p) := by | |
| rwa [βreflectPoint_eq_affine] | |
| have hh := coordPartial_affine_comp 0 reflectionMatrix p hfa i | |
| rw [βreflectPoint_eq_affine] at hh | |
| fin_cases i <;> | |
| simpa [reflectedScalar,reflectionMatrix,Fin.sum_univ_two] using hh | |
| theorem verticalJet_reflectedScalar {f : Coord β β} {U : Set Coord} | |
| (hf : ContDiffOn β β f U) (hU : IsOpen U) (n : β) | |
| {p : Coord} (hp : reflectPoint p β U) : | |
| verticalJet (reflectedScalar f) n p = (-1 : β)^n * verticalJet f n (reflectPoint p) := by | |
| induction n generalizing p with | |
| | zero => simp [verticalJet,reflectedScalar] | |
| | succ n ih => | |
| have he : verticalJet (reflectedScalar f) n =αΆ [π p] | |
| (fun q => (-1 : β)^n * verticalJet f n (reflectPoint q)) := by | |
| filter_upwards [(reflectedDomain_isOpen hU).mem_nhds hp] with q hq | |
| exact ih hq | |
| have hfn := verticalJet_contDiffOn hU hf n | |
| have hdr : DifferentiableAt β (reflectedScalar (verticalJet f n)) p := | |
| ((reflectedScalar_contDiffOn hfn).contDiffAt | |
| ((reflectedDomain_isOpen hU).mem_nhds hp)).differentiableAt (by simp) | |
| have hd : DifferentiableAt β (verticalJet f n) (reflectPoint p) := | |
| (hfn.contDiffAt (hU.mem_nhds hp)).differentiableAt (by simp) | |
| change coordPartial 1 (verticalJet (reflectedScalar f) n) p = _ | |
| rw [coordPartial_eq_of_eventuallyEq he 1] | |
| change coordPartial 1 (fun q => (-1 : β)^n * reflectedScalar (verticalJet f n) q) p = _ | |
| rw [AffineCalculus.coordPartial_const_mul_at hdr, | |
| coordPartial_reflectedScalar hd 1] | |
| simp only [show (1 : Fin 2) β 0 by decide,ite_false,verticalJet,pow_succ] | |
| ring | |
| theorem negOnePow_square (n : β) : ((-1 : β)^n)^2 = 1 := by | |
| rw [βpow_mul,Nat.mul_comm,pow_mul] | |
| norm_num | |
| def conjugateFlow (Y : β β β β β) (s t : β) : β := -Y (-s) t | |
| theorem conjugateFlow_chart (Y : β β β β β) (p : Coord) : | |
| capChart (conjugateFlow Y) p = reflectPoint (capChart Y (reflectPoint p)) := by | |
| simp only [capChart,capFlowHeight,conjugateFlow,reflectPoint_zero,reflectPoint_one, | |
| reflectPoint_coordinatePoint] | |
| theorem conjugateFlow_start {Y : β β β β β} | |
| (h : β s β Icc (-2 : β) 2, Y s 0 = s) : | |
| β s β Icc (-2 : β) 2, conjugateFlow Y s 0 = s := by | |
| intro s hs | |
| have hn : -s β Icc (-2 : β) 2 := by constructor <;> linarith [hs.1,hs.2] | |
| simp [conjugateFlow,h (-s) hn] | |
| theorem conjugateFlow_chart_contDiffOn {Y : β β β β β} | |
| (hY : ContDiffOn β β (capChart Y) capChartDomain) : | |
| ContDiffOn β β (capChart (conjugateFlow Y)) capChartDomain := by | |
| have hh := reflectPoint_contDiff.comp_contDiffOn | |
| (hY.comp reflectPoint_contDiff.contDiffOn | |
| (fun p hp => (reflectPoint_mem_capChartDomain p).mpr hp)) | |
| exact hh.congr (fun p _ => conjugateFlow_chart Y p) | |
| theorem conjugateFlow_displacement {Y : β β β β β} | |
| (hY : β p β capChartDomain, |capFlowHeight Y p-p 1| β€ (1 : β)/50) : | |
| β p β capChartDomain, |capFlowHeight (conjugateFlow Y) p-p 1| β€ (1 : β)/50 := by | |
| intro p hp | |
| have hh := hY (reflectPoint p) ((reflectPoint_mem_capChartDomain p).mpr hp) | |
| change |-Y (-p 1) (p 0)-p 1| β€ _ | |
| have he : -Y (-p 1) (p 0)-p 1 = -(Y (-p 1) (p 0)-(-p 1)) := by ring | |
| rw [he,abs_neg] | |
| simpa only [capFlowHeight,reflectPoint_zero,reflectPoint_one] using hh | |
| theorem conjugateFlow_ode | |
| {g : MetricField} {z : Coord β β} {U : Set Coord} {Y : β β β β β} | |
| (hg : SmoothPositiveOn g U) (hz : ContDiffOn β β z U) (hU : IsOpen U) | |
| (hmap : MapsTo (capChart Y) capChartDomain (reflectPoint β»ΒΉ' U)) | |
| (hode : β s β Icc (-2 : β) 2, β t β Icc (-2 : β) 2, | |
| HasDerivWithinAt (Y s) | |
| (-hessianQuotient (reflectedMetric g) (reflectedScalar z) (coordinatePoint t (Y s t))) | |
| (Icc (-2 : β) 2) t) : | |
| β s β Ioo (-2 : β) 2, β t β Ioo (-2 : β) 2, | |
| HasDerivWithinAt (conjugateFlow Y s) | |
| (-hessianQuotient g z (coordinatePoint t (conjugateFlow Y s t))) | |
| (Ioo (-2 : β) 2) t := by | |
| intro s hs t ht | |
| have hsneg : -s β Icc (-2 : β) 2 := by constructor <;> linarith [hs.1,hs.2] | |
| have hp : coordinatePoint t (-s) β capChartDomain := by | |
| change (coordinatePoint t (-s) 0 β Ioo (-2 : β) 2 β§ | |
| coordinatePoint t (-s) 1 β Ioo (-2 : β) 2) | |
| simp only [coordinatePoint,Pi.add_apply,Pi.smul_apply,Pi.single_apply] | |
| norm_num | |
| exact β¨ht,by constructor <;> linarith [hs.1,hs.2]β© | |
| have hmem : reflectPoint (coordinatePoint t (Y (-s) t)) β U := by | |
| simpa [capChart,capFlowHeight,coordinatePoint] using hmap hp | |
| have hh := ((hode (-s) hsneg t β¨ht.1.le,ht.2.leβ©).neg).mono Ioo_subset_Icc_self | |
| simp only [neg_neg,reflectedMetric_quotient hg hz hU hmem, | |
| reflectPoint_coordinatePoint] at hh | |
| exact hh | |
| theorem rectangleIntegral_reflectedScalar (left right bottom top : β) (f : Coord β β) : | |
| rectangleIntegral left right bottom top (reflectedScalar f) = | |
| rectangleIntegral left right (-top) (-bottom) f := by | |
| unfold rectangleIntegral | |
| have he (t s : β) : reflectedScalar f (boxPoint t s) = f (boxPoint t (-s)) := by | |
| exact congrArg f (reflectPoint_coordinatePoint t s) | |
| simp_rw [he] | |
| exact intervalIntegral.integral_comp_neg (fun s : β => β« t in left..right, f (boxPoint t s)) | |
| theorem reflectedScalar_gradient_square {u : Coord β β} {p : Coord} | |
| (hu : DifferentiableAt β u (reflectPoint p)) : | |
| (coordPartial 0 (reflectedScalar u) p)^2 + (coordPartial 1 (reflectedScalar u) p)^2 = | |
| (coordPartial 0 u (reflectPoint p))^2 + (coordPartial 1 u (reflectPoint p))^2 := by | |
| simp only [coordPartial_reflectedScalar hu,ite_true, | |
| show (1 : Fin 2) β 0 by decide,ite_false,neg_sq] | |
| theorem rectangleGradient_reflectedScalar {u : Coord β β} {U : Set Coord} | |
| (hu : ContDiffOn β β u U) (hU : IsOpen U) | |
| {left right bottom top : β} (hlr : left β€ right) (hbt : bottom β€ top) | |
| (hmap : MapsTo reflectPoint (closedRectangle left right bottom top) U) : | |
| rectangleIntegral left right bottom top (fun p => | |
| (coordPartial 0 (reflectedScalar u) p)^2 + (coordPartial 1 (reflectedScalar u) p)^2) = | |
| rectangleIntegral left right (-top) (-bottom) (fun p => | |
| (coordPartial 0 u p)^2 + (coordPartial 1 u p)^2) := by | |
| calc | |
| _ = rectangleIntegral left right bottom top | |
| (reflectedScalar (fun p => (coordPartial 0 u p)^2+(coordPartial 1 u p)^2)) := by | |
| apply rectangleIntegral_congr hlr hbt | |
| intro p hp | |
| exact reflectedScalar_gradient_square | |
| ((hu.contDiffAt (hU.mem_nhds (hmap hp))).differentiableAt (by simp)) | |
| _ = _ := rectangleIntegral_reflectedScalar _ _ _ _ _ | |
| end SmoothLocal.Flow.Reflection | |
| end | |
| end OAI | |