import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Variation.Coordinates.ChartPullback import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Jacobi.JacobiFieldPackaging import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Variation.Extension.SmoothSectionExtension /-! Adapted from Mapher `PoincareMT/Proofs/M08/JacobiRepresentative.lean` at `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false noncomputable section open Set Filter Topology 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 curveVelocityWithin_restrict {C D : Set ℝ} (Ξ± : ℝ β†’ M) {s : ℝ} (hC : UniqueDiffWithinAt ℝ C s) (hD : UniqueDiffWithinAt ℝ D s) (hΞ± : MDifferentiableAt (π“˜(ℝ, ℝ)) (𝓑 n) Ξ± s) : curveVelocityWithin (n := n) Ξ± C s = curveVelocityWithin (n := n) Ξ± D s := by unfold curveVelocityWithin rw [mfderivWithin_eq_mfderiv hC.uniqueMDiffWithinAt hΞ±, mfderivWithin_eq_mfderiv hD.uniqueMDiffWithinAt hΞ±] theorem pullbackCovariantDerivative_restrict {J C D : Set ℝ} (F : RicciFlow n M J) (time : ℝ β†’ ℝ) {Ξ± : ℝ β†’ M} {Y : βˆ€ s, TangentSpace (𝓑 n) (Ξ± s)} (hDC : D βŠ† C) (E : ParametricAlongCurveExtensionOn C Ξ± Y) {s : ℝ} (hC : UniqueDiffWithinAt ℝ C s) (hD : UniqueDiffWithinAt ℝ D s) (hΞ± : MDifferentiableAt (π“˜(ℝ, ℝ)) (𝓑 n) Ξ± s) : pullbackCovariantDerivative F time Ξ± Y C E s = pullbackCovariantDerivative F time Ξ± Y D (restrictParametricSectionExtension hDC E) s := by unfold pullbackCovariantDerivative restrictParametricSectionExtension rw [curveVelocityWithin_restrict Ξ± hC hD hΞ±] theorem pullbackCovariantDerivative_restrict_congr {J C D : Set ℝ} (F : RicciFlow n M J) (time : ℝ β†’ ℝ) {Ξ± : ℝ β†’ M} {Y : βˆ€ s, TangentSpace (𝓑 n) (Ξ± s)} (hDC : D βŠ† C) (EC : ParametricAlongCurveExtensionOn C Ξ± Y) (ED : ParametricAlongCurveExtensionOn D Ξ± Y) {s : ℝ} (hs : s ∈ D) (hC : UniqueDiffWithinAt ℝ C s) (hD : UniqueDiffWithinAt ℝ D s) (hΞ± : MDifferentiableAt (π“˜(ℝ, ℝ)) (𝓑 n) Ξ± s) : pullbackCovariantDerivative F time Ξ± Y C EC s = pullbackCovariantDerivative F time Ξ± Y D ED s := by rw [pullbackCovariantDerivative_restrict F time hDC EC hC hD hΞ±] exact pullbackCovariantDerivative_extension_independent F time (restrictParametricSectionExtension hDC EC) ED hs hD hΞ± theorem tangent_cast_eq {x y : M} (h : x = y) (v : TangentSpace (𝓑 n) x) : ((h β–Έ v) : TangentSpace (𝓑 n) y) = v := by cases h rfl variable {J : Set ℝ} {F : RicciFlow n M J} {T τ₁ Ο„β‚‚ : ℝ} {p : BackwardTimePath F T τ₁ Ο„β‚‚} theorem sqrtRegularPath_eqOn (R R' : SqrtRegularPath p) : EqOn R.curve R'.curve (sqrtParameterInterval τ₁ Ο„β‚‚) := fun s hs ↦ (R.agrees s hs).trans (R'.agrees s hs).symm theorem sqrtRegularPath_mdifferentiableAt (R : SqrtRegularPath p) {s : ℝ} (hs : s ∈ sqrtParameterInterval τ₁ Ο„β‚‚) : MDifferentiableAt (π“˜(ℝ, ℝ)) (𝓑 n) R.curve s := ((R.smooth s (R.interval_subset hs)).contMDiffAt (R.open_domain.mem_nhds (R.interval_subset hs))).mdifferentiableAt (by simp) theorem sqrtRegularField_field_eq {R R' : SqrtRegularPath p} {Y : βˆ€ Ο„, TangentSpace (𝓑 n) (p.curve Ο„)} (Q : SqrtRegularField R Y) (Q' : SqrtRegularField R' Y) {s : ℝ} (hs : s ∈ sqrtParameterInterval τ₁ Ο„β‚‚) : Q.field s = Q'.field s := by have hQ := (Q.agrees s hs).trans (tangent_cast_eq (n := n) (R.agrees s hs).symm (Y (s ^ 2))) have hQ' := (Q'.agrees s hs).trans (tangent_cast_eq (n := n) (R'.agrees s hs).symm (Y (s ^ 2))) exact hQ.trans hQ'.symm theorem sqrtRegularField_firstDerivative_eq {R R' : SqrtRegularPath p} {Y : βˆ€ Ο„, TangentSpace (𝓑 n) (p.curve Ο„)} (Q : SqrtRegularField R Y) (Q' : SqrtRegularField R' Y) {s : ℝ} (hs : s ∈ sqrtParameterInterval τ₁ Ο„β‚‚) : Q.firstDerivative s = Q'.firstDerivative s := by exact pullbackCovariantDerivative_congr F (fun r ↦ T - r ^ 2) (sqrtRegularPath_eqOn R R') (fun r hr ↦ sqrtRegularField_field_eq Q Q' hr) Q.extension Q'.extension hs (uniqueDiffOn_Icc (Real.sqrt_lt_sqrt p.nonnegative p.ordered) s hs) (sqrtRegularPath_mdifferentiableAt R' hs) theorem sqrtRegularField_secondDerivative_eq {R R' : SqrtRegularPath p} {Y : βˆ€ Ο„, TangentSpace (𝓑 n) (p.curve Ο„)} (Q : SqrtRegularField R Y) (Q' : SqrtRegularField R' Y) {s : ℝ} (hs : s ∈ sqrtParameterInterval τ₁ Ο„β‚‚) : Q.secondDerivative s = Q'.secondDerivative s := by exact pullbackCovariantDerivative_congr F (fun r ↦ T - r ^ 2) (sqrtRegularPath_eqOn R R') (fun r hr ↦ sqrtRegularField_firstDerivative_eq Q Q' hr) Q.derivative_extension Q'.derivative_extension hs (uniqueDiffOn_Icc (Real.sqrt_lt_sqrt p.nonnegative p.ordered) s hs) (sqrtRegularPath_mdifferentiableAt R' hs) def transferSqrtRegularField {R : SqrtRegularPath p} {Y : βˆ€ Ο„, TangentSpace (𝓑 n) (p.curve Ο„)} (Q : SqrtRegularField R Y) (R' : SqrtRegularPath p) : SqrtRegularField R' Y := by let E := transferParametricExtension (sqrtRegularPath_eqOn R R') (fun _ _ ↦ rfl) Q.extension have hfirst : βˆ€ s ∈ sqrtParameterInterval τ₁ Ο„β‚‚, Q.firstDerivative s = pullbackCovariantDerivative F (fun r ↦ T - r ^ 2) R'.curve Q.field (sqrtParameterInterval τ₁ Ο„β‚‚) E s := by intro s hs exact pullbackCovariantDerivative_transfer F (fun r ↦ T - r ^ 2) (sqrtRegularPath_eqOn R R') (fun _ _ ↦ rfl) Q.extension hs exact { field := Q.field agrees := fun s hs ↦ ((Q.agrees s hs).trans (tangent_cast_eq (n := n) (R.agrees s hs).symm (Y (s ^ 2)))).trans (tangent_cast_eq (n := n) (R'.agrees s hs).symm (Y (s ^ 2))).symm extension := E derivative_extension := transferParametricExtension (sqrtRegularPath_eqOn R R') hfirst Q.derivative_extension } theorem regularizedJacobiResidual_representative_eq (R R' : RegularizedLGeodesicData p) {Y : βˆ€ Ο„, TangentSpace (𝓑 n) (p.curve Ο„)} (Q : SqrtRegularField R.path Y) (Q' : SqrtRegularField R'.path Y) {s : ℝ} (hs : s ∈ sqrtParameterInterval τ₁ Ο„β‚‚) (W : TangentSpace (𝓑 n) (R.path.curve s)) : regularizedJacobiResidual R Q s W = regularizedJacobiResidual R' Q' s W := by have hcurve := sqrtRegularPath_eqOn R.path R'.path have hfield := sqrtRegularField_field_eq Q Q' hs have hfirst := sqrtRegularField_firstDerivative_eq Q Q' hs have hsecond := sqrtRegularField_secondDerivative_eq Q Q' hs have hvelocity := curveVelocityWithin_congr (n := n) hcurve hs unfold regularizedJacobiResidual rw [hcurve hs, hfield, hfirst, hsecond, hvelocity] theorem hasLJacobiInitialDerivative_representative_iff (R R' : RegularizedLGeodesicData p) (Y : βˆ€ Ο„, TangentSpace (𝓑 n) (p.curve Ο„)) (Z : TangentSpace (𝓑 n) (p.curve τ₁)) : HasLJacobiInitialDerivative R Y Z ↔ HasLJacobiInitialDerivative R' Y Z := by have htransfer (A B : RegularizedLGeodesicData p) : HasLJacobiInitialDerivative A Y Z β†’ HasLJacobiInitialDerivative B Y Z := by rintro ⟨Q, hQ⟩ let Q' := transferSqrtRegularField Q B.path refine ⟨Q', ?_⟩ have hs : Real.sqrt τ₁ ∈ sqrtParameterInterval τ₁ Ο„β‚‚ := ⟨le_rfl, Real.sqrt_le_sqrt p.ordered.le⟩ have heq := sqrtRegularField_firstDerivative_eq Q Q' hs dsimp only at hQ ⊒ rw [tangent_cast_eq (n := n)] at hQ ⊒ exact heq.symm.trans hQ exact ⟨htransfer R R', htransfer R' R⟩ theorem isLJacobiField_residual_for_representative {Y : βˆ€ Ο„, TangentSpace (𝓑 n) (p.curve Ο„)} (hY : IsLJacobiField F T τ₁ Ο„β‚‚ p Y) (R : RegularizedLGeodesicData p) : βˆƒ Q : SqrtRegularField R.path Y, Y τ₁ = 0 ∧ βˆ€ s ∈ sqrtParameterInterval τ₁ Ο„β‚‚, βˆ€ W : TangentSpace (𝓑 n) (R.path.curve s), regularizedJacobiResidual R Q s W = 0 := by obtain ⟨Rβ‚€, Qβ‚€, hzero, hres⟩ := hY let Q := transferSqrtRegularField Qβ‚€ R.path refine ⟨Q, hzero, ?_⟩ intro s hs W rw [← regularizedJacobiResidual_representative_eq Rβ‚€ R Qβ‚€ Q hs W] exact hres s hs W end PoincareMT.LGeometry