import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Basic /-! Adapted from Mapher `PoincareMT/Proofs/M08/JacobiFieldPackaging.lean` at `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. -/ set_option autoImplicit false noncomputable section open Set open scoped Manifold ContDiff Bundle universe u namespace PoincareMT.LGeometry variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] theorem tangent_totalSpace_cast {x y : M} (h : x = y) (v : TangentSpace (𝓑 n) x) : Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) y (h β–Έ v) = Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) x v := by cases h rfl theorem tangent_eq_of_totalSpace_eq {x y : M} (h : x = y) {v : TangentSpace (𝓑 n) x} {w : TangentSpace (𝓑 n) y} (heq : Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) x v = Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) y w) : v = h.symm β–Έ w := by cases h exact Bundle.TotalSpace.mk_injective x heq theorem tangent_cast_zero {x y : M} (h : x = y) : (h β–Έ (0 : TangentSpace (𝓑 n) x)) = (0 : TangentSpace (𝓑 n) y) := by cases h rfl variable {J : Set ℝ} {F : RicciFlow n M J} {T τ₁ Ο„β‚‚ : ℝ} {p : BackwardTimePath F T τ₁ Ο„β‚‚} theorem sqrt_mem_sqrtParameterInterval {Ο„ : ℝ} (hΟ„ : Ο„ ∈ Icc τ₁ Ο„β‚‚) : Real.sqrt Ο„ ∈ sqrtParameterInterval τ₁ Ο„β‚‚ := ⟨Real.sqrt_le_sqrt hΟ„.1, Real.sqrt_le_sqrt hΟ„.2⟩ theorem square_mem_backward_interval (p : BackwardTimePath F T τ₁ Ο„β‚‚) {s : ℝ} (hs : s ∈ sqrtParameterInterval τ₁ Ο„β‚‚) : s ^ 2 ∈ Icc τ₁ Ο„β‚‚ := by have hsn : 0 ≀ s := (Real.sqrt_nonneg τ₁).trans hs.1 constructor Β· simpa only [Real.sq_sqrt p.nonnegative] using (sq_le_sqβ‚€ (Real.sqrt_nonneg τ₁) hsn).mpr hs.1 Β· simpa only [Real.sq_sqrt (p.nonnegative.trans p.ordered.le)] using (sq_le_sqβ‚€ hsn (Real.sqrt_nonneg Ο„β‚‚)).mpr hs.2 theorem sqrtRegularPath_point_eq (R : SqrtRegularPath p) {Ο„ : ℝ} (hΟ„ : Ο„ ∈ Icc τ₁ Ο„β‚‚) : R.curve (Real.sqrt Ο„) = p.curve Ο„ := (R.agrees _ (sqrt_mem_sqrtParameterInterval hΟ„)).trans (congrArg p.curve (Real.sq_sqrt (p.nonnegative.trans hΟ„.1))) def backwardFieldOfSqrt (R : SqrtRegularPath p) (Yhat : βˆ€ s, TangentSpace (𝓑 n) (R.curve s)) (Ο„ : ℝ) : TangentSpace (𝓑 n) (p.curve Ο„) := by classical exact if hΟ„ : Ο„ ∈ Icc τ₁ Ο„β‚‚ then sqrtRegularPath_point_eq R hΟ„ β–Έ Yhat (Real.sqrt Ο„) else 0 theorem backwardFieldOfSqrt_totalSpace (R : SqrtRegularPath p) (Yhat : βˆ€ s, TangentSpace (𝓑 n) (R.curve s)) {Ο„ : ℝ} (hΟ„ : Ο„ ∈ Icc τ₁ Ο„β‚‚) : Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) (p.curve Ο„) (backwardFieldOfSqrt R Yhat Ο„) = Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) (R.curve (Real.sqrt Ο„)) (Yhat (Real.sqrt Ο„)) := by rw [backwardFieldOfSqrt, dif_pos hΟ„] exact tangent_totalSpace_cast (sqrtRegularPath_point_eq R hΟ„) _ theorem backwardFieldOfSqrt_agrees (R : SqrtRegularPath p) (Yhat : βˆ€ s, TangentSpace (𝓑 n) (R.curve s)) {s : ℝ} (hs : s ∈ sqrtParameterInterval τ₁ Ο„β‚‚) : Yhat s = (R.agrees s hs).symm β–Έ backwardFieldOfSqrt R Yhat (s ^ 2) := by have h := backwardFieldOfSqrt_totalSpace R Yhat (square_mem_backward_interval p hs) rw [Real.sqrt_sq ((Real.sqrt_nonneg τ₁).trans hs.1)] at h exact tangent_eq_of_totalSpace_eq (R.agrees s hs) h.symm theorem backwardFieldOfSqrt_initial_zero (R : SqrtRegularPath p) (Yhat : βˆ€ s, TangentSpace (𝓑 n) (R.curve s)) (hY : Yhat (Real.sqrt τ₁) = 0) : backwardFieldOfSqrt R Yhat τ₁ = 0 := by have hΟ„ : τ₁ ∈ Icc τ₁ Ο„β‚‚ := ⟨le_rfl, p.ordered.le⟩ rw [backwardFieldOfSqrt, dif_pos hΟ„, hY] exact tangent_cast_zero (sqrtRegularPath_point_eq R hΟ„) def sqrtRegularFieldOfPullback (R : SqrtRegularPath p) (Yhat P : βˆ€ s, TangentSpace (𝓑 n) (R.curve s)) (E : ParametricAlongCurveExtensionOn (sqrtParameterInterval τ₁ Ο„β‚‚) R.curve Yhat) (EP : ParametricAlongCurveExtensionOn (sqrtParameterInterval τ₁ Ο„β‚‚) R.curve P) (hP : βˆ€ s ∈ sqrtParameterInterval τ₁ Ο„β‚‚, pullbackCovariantDerivative F (fun r ↦ T - r ^ 2) R.curve Yhat (sqrtParameterInterval τ₁ Ο„β‚‚) E s = P s) : SqrtRegularField R (backwardFieldOfSqrt R Yhat) where field := Yhat agrees s hs := backwardFieldOfSqrt_agrees R Yhat hs extension := E derivative_extension := { extension := EP.extension domain := EP.domain open_domain := EP.open_domain graph_mem := EP.graph_mem smooth := EP.smooth agrees := fun s hs ↦ (EP.agrees s hs).trans (hP s hs).symm } theorem sqrtRegularFieldOfPullback_firstDerivative (R : SqrtRegularPath p) (Yhat P : βˆ€ s, TangentSpace (𝓑 n) (R.curve s)) (E : ParametricAlongCurveExtensionOn (sqrtParameterInterval τ₁ Ο„β‚‚) R.curve Yhat) (EP : ParametricAlongCurveExtensionOn (sqrtParameterInterval τ₁ Ο„β‚‚) R.curve P) (hP : βˆ€ s ∈ sqrtParameterInterval τ₁ Ο„β‚‚, pullbackCovariantDerivative F (fun r ↦ T - r ^ 2) R.curve Yhat (sqrtParameterInterval τ₁ Ο„β‚‚) E s = P s) {s : ℝ} (hs : s ∈ sqrtParameterInterval τ₁ Ο„β‚‚) : (sqrtRegularFieldOfPullback R Yhat P E EP hP).firstDerivative s = P s := hP s hs theorem sqrtRegularField_totalSpace_agrees {R : SqrtRegularPath p} {Y : βˆ€ Ο„, TangentSpace (𝓑 n) (p.curve Ο„)} (Q : SqrtRegularField R Y) {s : ℝ} (hs : s ∈ sqrtParameterInterval τ₁ Ο„β‚‚) : Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) (R.curve s) (Q.field s) = Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) (p.curve (s ^ 2)) (Y (s ^ 2)) := by rw [Q.agrees s hs] exact tangent_totalSpace_cast (R.agrees s hs).symm _ theorem sqrtRegularField_eq_of_totalSpace_eq {R R' : SqrtRegularPath p} {Y Z : βˆ€ Ο„, TangentSpace (𝓑 n) (p.curve Ο„)} (Q : SqrtRegularField R Y) (Q' : SqrtRegularField R' Z) (heq : βˆ€ s ∈ sqrtParameterInterval τ₁ Ο„β‚‚, Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) (R.curve s) (Q.field s) = Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) (R'.curve s) (Q'.field s)) : βˆ€ Ο„ ∈ Icc τ₁ Ο„β‚‚, Y Ο„ = Z Ο„ := by intro Ο„ hΟ„ have hs := sqrt_mem_sqrtParameterInterval hΟ„ have h := (sqrtRegularField_totalSpace_agrees Q hs).symm.trans ((heq (Real.sqrt Ο„) hs).trans (sqrtRegularField_totalSpace_agrees Q' hs)) have hf := Bundle.TotalSpace.mk_injective (p.curve ((Real.sqrt Ο„) ^ 2)) h exact (congrArg (fun r : ℝ ↦ Y r = Z r) (Real.sq_sqrt (p.nonnegative.trans hΟ„.1))).mp hf end PoincareMT.LGeometry