import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Jacobi.JacobiLocalExistence /-! Adapted from Mapher `PoincareMT/Proofs/M08/JacobiLocalUniqueness.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] local instance jacobiUniqueDualGroup : NormedAddCommGroup (EuclideanSpace ℝ (Fin n) β†’L[ℝ] ℝ) := ContinuousLinearMap.toNormedAddCommGroup local instance jacobiUniqueDualSpace : NormedSpace ℝ (EuclideanSpace ℝ (Fin n) β†’L[ℝ] ℝ) := ContinuousLinearMap.toNormedSpace local instance jacobiUniqueBilinGroup : NormedAddCommGroup (EuclideanSpace ℝ (Fin n) β†’L[ℝ] EuclideanSpace ℝ (Fin n) β†’L[ℝ] ℝ) := ContinuousLinearMap.toNormedAddCommGroup local instance jacobiUniqueBilinSpace : NormedSpace ℝ (EuclideanSpace ℝ (Fin n) β†’L[ℝ] EuclideanSpace ℝ (Fin n) β†’L[ℝ] ℝ) := ContinuousLinearMap.toNormedSpace def chartPairCoordinates (x : M) (Ξ± : ℝ β†’ M) (z : ℝ β†’ EuclideanSpace ℝ (Fin n) Γ— EuclideanSpace ℝ (Fin n)) (s : ℝ) : EuclideanSpace ℝ (Fin n) Γ— EuclideanSpace ℝ (Fin n) := let e := trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n)) x ((e (Bundle.TotalSpace.mk' (E := TangentSpace (𝓑 n)) (EuclideanSpace ℝ (Fin n)) (Ξ± s) (z s).1)).2, (e (Bundle.TotalSpace.mk' (E := TangentSpace (𝓑 n)) (EuclideanSpace ℝ (Fin n)) (Ξ± s) (z s).2)).2) theorem chartFrame_coordinates_at {x y : M} (hy : y ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) (v : TangentSpace (𝓑 n) y) : chartFrame x ((trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n)) x (Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) y v)).2) y = v := by let e := trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n)) x change e.symmL ℝ y ((e (Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) y v)).2) = v rw [e.symmL_apply (R := ℝ) hy] exact e.symm_apply_apply_mk hy v theorem chartFrame_injective_of_mem {x y : M} (hy : y ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) : Function.Injective (fun v : EuclideanSpace ℝ (Fin n) ↦ chartFrame x v y) := by let e := trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n)) x intro v w hvw have h := congrArg (e.continuousLinearMapAt ℝ y) hvw change e.continuousLinearMapAt ℝ y (e.symmL ℝ y v) = e.continuousLinearMapAt ℝ y (e.symmL ℝ y w) at h simpa only [e.continuousLinearMapAt_symmL hy] using h theorem IsJacobiPairOn.chart_coordinates_smooth {J S : Set ℝ} {F : RicciFlow n M J} {T a b : ℝ} {Ξ± : ℝ β†’ M} {z : ℝ β†’ EuclideanSpace ℝ (Fin n) Γ— EuclideanSpace ℝ (Fin n)} (h : IsJacobiPairOn F T Ξ± S a b z) (x : M) (hsrc : MapsTo Ξ± (Icc a b) (chartAt (EuclideanSpace ℝ (Fin n)) x).source) : ContDiffOn ℝ ∞ (chartPairCoordinates x Ξ± z) (Icc a b) := by let e := trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n)) x have hfirst := e.contMDiffOn.comp h.first_smooth (fun s hs ↦ e.mem_source.mpr (hsrc hs)) have hsecond := e.contMDiffOn.comp h.second_smooth (fun s hs ↦ e.mem_source.mpr (hsrc hs)) exact (ContMDiffOn.contDiffOn (fun s hs ↦ (hfirst s hs).snd)).prodMk (ContMDiffOn.contDiffOn (fun s hs ↦ (hsecond s hs).snd)) set_option maxHeartbeats 2500000 in theorem IsJacobiPairOn.chart_phase {J U : Set ℝ} {F : RicciFlow n M J} (hM04 : RicciFlowCurvatureTheory.{u}) {T A B a b : ℝ} {Ξ± : ℝ β†’ M} {z : ℝ β†’ EuclideanSpace ℝ (Fin n) Γ— EuclideanSpace ℝ (Fin n)} (h : IsJacobiPairOn F T Ξ± (Icc A B) a b z) (hAB : A < B) (htime : βˆ€ s ∈ Icc A B, T - s ^ 2 ∈ J) (x : M) (hU : IsOpen U) (hCU : Icc a b βŠ† U) (hΞ± : ContMDiffOn (π“˜(ℝ, ℝ)) (𝓑 n) ∞ Ξ± U) (hsrc : MapsTo Ξ± (Icc a b) (chartAt (EuclideanSpace ℝ (Fin n)) x).source) : βˆ€ s ∈ Icc a b, HasDerivWithinAt (chartPairCoordinates x Ξ± z) (jacobiAlongPhase F T x (Icc A B) Ξ± s (chartPairCoordinates x Ξ± z s)) (Icc a b) s := by let v := chartPairCoordinates x Ξ± z have hv : ContDiffOn ℝ ∞ v (Icc a b) := h.chart_coordinates_smooth x hsrc have hframe₁ : βˆ€ s ∈ Icc a b, chartFrame x (v s).1 (Ξ± s) = (z s).1 := fun s hs ↦ chartFrame_coordinates_at (hsrc hs) (z s).1 have hframeβ‚‚ : βˆ€ s ∈ Icc a b, chartFrame x (v s).2 (Ξ± s) = (z s).2 := fun s hs ↦ chartFrame_coordinates_at (hsrc hs) (z s).2 obtain ⟨EY, EP, hY, hP⟩ := h.equations intro s hs have hΞ±s := ((hΞ± s (hCU hs)).contMDiffAt (hU.mem_nhds (hCU hs))).mdifferentiableAt (by simp) let dy := derivWithin (fun r ↦ (v r).1) (Icc a b) s let dp := derivWithin (fun r ↦ (v r).2) (Icc a b) s have hdy : HasDerivWithinAt (fun r ↦ (v r).1) dy (Icc a b) s := ((hv.fst.differentiableOn (by simp)) s hs).hasDerivWithinAt have hdp : HasDerivWithinAt (fun r ↦ (v r).2) dp (Icc a b) s := ((hv.snd.differentiableOn (by simp)) s hs).hasDerivWithinAt have hDY := pullbackCovariantDerivative_closedChart_formula F T h.ordered h.interval_subset htime x Ξ± (fun r ↦ (v r).1) hv.fst hsrc (fun r ↦ (z r).1) hframe₁ EY hs dy hdy hΞ±s have hDP := pullbackCovariantDerivative_closedChart_formula F T h.ordered h.interval_subset htime x Ξ± (fun r ↦ (v r).2) hv.snd hsrc (fun r ↦ (z r).2) hframeβ‚‚ EP hs dp hdp hΞ±s have hq : extChartAt (𝓑 n) x (Ξ± s) ∈ (extChartAt (𝓑 n) x).target := (extChartAt (𝓑 n) x).map_source (by simpa only [extChartAt_source] using hsrc hs) have hfirst : dy = (v s).2 - jacobiAlongConnection F T x (Icc A B) Ξ± s (v s).1 := by apply eq_sub_iff_add_eq.mpr apply chartFrame_injective_of_mem (hsrc hs) exact hDY.symm.trans ((hY s hs).trans (hframeβ‚‚ s hs).symm) have hsecond (w : EuclideanSpace ℝ (Fin n)) : chartActionMetric F T x (s, extChartAt (𝓑 n) x (Ξ± s)) (dp + jacobiAlongConnection F T x (Icc A B) Ξ± s (v s).2) w = jacobiAlongPotential F T x (Icc A B) Ξ± s (v s).1 w - jacobiAlongMetricTime F T x (Icc A B) Ξ± s (v s).2 w := by have hr := hP s hs (chartFrame x w (Ξ± s)) rw [hDP, ← hframe₁ s hs, ← hframeβ‚‚ s hs] at hr rw [jacobiPairResidual_chart F hM04 T hAB htime x Ξ± (h.interval_subset hs) (hsrc hs) hΞ±s] at hr change chartActionMetric F T x (s, extChartAt (𝓑 n) x (Ξ± s)) (dp + jacobiAlongConnection F T x (Icc A B) Ξ± s (v s).2) w - jacobiAlongPotential F T x (Icc A B) Ξ± s (v s).1 w + jacobiAlongMetricTime F T x (Icc A B) Ξ± s (v s).2 w = 0 at hr linarith have heq := covariantLinearPhaseOperator_eq_of_pair (jacobiAlongSharp F T x Ξ± s) (chartActionMetric F T x (s, extChartAt (𝓑 n) x (Ξ± s))) (chartMetricDualInverse_left F T x hq) (jacobiAlongConnection F T x (Icc A B) Ξ± s) (jacobiAlongPotential F T x (Icc A B) Ξ± s) (jacobiAlongMetricTime F T x (Icc A B) Ξ± s) (v s).1 (v s).2 dy dp hfirst hsecond change HasDerivWithinAt v (covariantLinearPhaseOperator (jacobiAlongSharp F T x Ξ± s) (jacobiAlongConnection F T x (Icc A B) Ξ± s) (jacobiAlongPotential F T x (Icc A B) Ξ± s) (jacobiAlongMetricTime F T x (Icc A B) Ξ± s) ((v s).1, (v s).2)) (Icc a b) s rw [← heq] simpa only [Prod.eta] using hdy.prodMk hdp theorem chartJacobiPairOn_unique {J U : Set ℝ} {F : RicciFlow n M J} (hM04 : RicciFlowCurvatureTheory.{u}) {T A B a b tβ‚€ : ℝ} {Ξ± : ℝ β†’ M} {f g : ℝ β†’ EuclideanSpace ℝ (Fin n) Γ— EuclideanSpace ℝ (Fin n)} (hf : IsJacobiPairOn F T Ξ± (Icc A B) a b f) (hg : IsJacobiPairOn F T Ξ± (Icc A B) a b g) (hAB : A < B) (htime : βˆ€ s ∈ Icc A B, T - s ^ 2 ∈ J) (x : M) (hU : IsOpen U) (hCU : Icc a b βŠ† U) (hΞ± : ContMDiffOn (π“˜(ℝ, ℝ)) (𝓑 n) ∞ Ξ± U) (hsrc : MapsTo Ξ± (Icc a b) (chartAt (EuclideanSpace ℝ (Fin n)) x).source) (htβ‚€ : tβ‚€ ∈ Icc a b) (hinit : f tβ‚€ = g tβ‚€) : EqOn f g (Icc a b) := by obtain ⟨hB, hC, hV, hH⟩ := jacobiAlongCoefficients_contDiffOn F hM04 T x Ξ± (uniqueDiffOn_Icc hAB) htime hf.interval_subset hU hCU hΞ± hsrc have hcoordinit : chartPairCoordinates x Ξ± f tβ‚€ = chartPairCoordinates x Ξ± g tβ‚€ := by unfold chartPairCoordinates rw [hinit] have heq := covariant_linear_phase_unique (jacobiAlongSharp F T x Ξ±) (jacobiAlongConnection F T x (Icc A B) Ξ±) (jacobiAlongPotential F T x (Icc A B) Ξ±) (jacobiAlongMetricTime F T x (Icc A B) Ξ±) hB hC hV hH htβ‚€ (hf.chart_phase hM04 hAB htime x hU hCU hΞ± hsrc) (hg.chart_phase hM04 hAB htime x hU hCU hΞ± hsrc) hcoordinit intro s hs apply Prod.ext Β· have h₁ := congrArg (fun v : EuclideanSpace ℝ (Fin n) Γ— EuclideanSpace ℝ (Fin n) ↦ chartFrame x v.1 (Ξ± s)) (heq hs) exact (chartFrame_coordinates_at (hsrc hs) (f s).1).symm.trans (h₁.trans (chartFrame_coordinates_at (hsrc hs) (g s).1)) Β· have hβ‚‚ := congrArg (fun v : EuclideanSpace ℝ (Fin n) Γ— EuclideanSpace ℝ (Fin n) ↦ chartFrame x v.2 (Ξ± s)) (heq hs) exact (chartFrame_coordinates_at (hsrc hs) (f s).2).symm.trans (hβ‚‚.trans (chartFrame_coordinates_at (hsrc hs) (g s).2)) end PoincareMT.LGeometry