import PoincareLib.Geometry.CurveShortening.Comparison.Compatibility.SourceNames import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.C1.EmbeddingPushforward import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.C2.GaugeWitnesses import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Mixed.EmbeddingHessian import PoincareLib.Geometry.CurveShortening.Ramp.Analysis.Retraction.TangentContinuity import PoincareLib.Geometry.CurveShortening.Ramp.Data import Mathlib.Analysis.Calculus.ContDiff.Deriv import Mathlib.Topology.ContinuousMap.Compact import Mathlib.Topology.Order.ProjIcc /-! # Identifying closed limits as the actual curvature jets Finite C1 retraction witnesses identify the limiting spatial recurrences with the actual covariant jets, including the final time endpoint. MT2007 Claim 19.1, p. 437, and Lemma 19.24, pp. 454-455; `2026-09-22-closed-curvature-jet-limit-identification.md`, statement 2. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set open scoped Manifold ContDiff Bundle universe u v namespace PoincareMT.M63 variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] {ΞΉ : Type v} [Fintype ΞΉ] {a b : ℝ} local notation "W" => EuclideanSpace ℝ ΞΉ local notation "X" => C(AddCircle curvePeriod, W) set_option maxHeartbeats 800000 in -- Dependent tangent-fiber elaboration reached the default 200k budget. /-- Actual spatial derivative witnesses identify every embedded limit with the corresponding intrinsic jet and recover its C1 spatial and closed bundle regularity. MT2007 Claim 19.1, p. 437; closed-jet identification derivation, statement 2, including the final endpoint. -/ theorem curvatureJet_identification_of_embedded_recurrences [T2Space M] (F : RicciFlow n M (Icc a b)) {tau s : ℝ} (_hat : a < tau) (hts : tau < s) (_hsb : s ≀ b) {e : M β†’ W} (he : ContMDiff (𝓑 n) π“˜(ℝ, W) ∞ e) {U : Set W} (hU : IsOpen U) (heU : range e βŠ† U) {ρ : W β†’ M} (hρ : ContMDiffOn π“˜(ℝ, W) (𝓑 n) ∞ ρ U) (hρe : βˆ€ p, ρ (e p) = p) {c : ℝ β†’ ℝ β†’ M} (hc : M63C2ShrinkingCurveOn F c (Icc tau s)) (Ξ· : β„• β†’ C(Icc tau s, X)) (hzero : βˆ€ (t : Icc tau s) (x : ℝ), Ξ· 0 t (x : AddCircle curvePeriod) = mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (m62CurvatureVector F c t x)) (hrec : βˆ€ i (t : Icc tau s) (x : ℝ), HasDerivAt (fun y : ℝ => Ξ· i t (y : AddCircle curvePeriod)) (curveSpeed F c t x β€’ (Ξ· (i + 1) t (x : AddCircle curvePeriod) + coordinateHessian (F.connection t) e (ρ (e (c x t))) (mfderiv π“˜(ℝ, W) (𝓑 n) ρ (e (c x t)) (mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (spatialUnitTangent F c t x))) (mfderiv π“˜(ℝ, W) (𝓑 n) ρ (e (c x t)) (Ξ· i t (x : AddCircle curvePeriod))))) x) : (βˆ€ i (t : Icc tau s) (x : ℝ), Ξ· i t (x : AddCircle curvePeriod) = mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (m63CurvatureJet F c i t x)) ∧ (βˆ€ i (t : Icc tau s), ContMDiff π“˜(ℝ, ℝ) ((𝓑 n).prod (𝓑 n)) 1 (fun x => (⟨c x t, m63CurvatureJet F c i t x⟩ : TangentBundle (𝓑 n) M))) ∧ βˆ€ i, ContinuousOn (fun z : ℝ Γ— ℝ => (⟨c z.1 z.2, m63CurvatureJet F c i z.2 z.1⟩ : TangentBundle (𝓑 n) M)) (univ Γ—Λ’ Icc tau s) := by let : Fact (0 < curvePeriod) := ⟨by unfold curvePeriod; positivity⟩ let B := fun (t : ℝ) (z p q : W) => coordinateHessian (F.connection t) e (ρ z) (mfderiv π“˜(ℝ, W) (𝓑 n) ρ z p) (mfderiv π“˜(ℝ, W) (𝓑 n) ρ z q) have hpush : Continuous (fun p : TangentBundle (𝓑 n) M => (mfderiv (𝓑 n) π“˜(ℝ, W) e p.1 p.2 : W)) := (contMDiff_snd_tangentBundle_modelSpace (n := ∞) W π“˜(ℝ, W)).continuous.comp (he.continuous_tangentMap (by simp)) have hvpos (t : Icc tau s) (x : ℝ) : 0 < curveSpeed F c t x := Real.sqrt_pos.mpr ((F.metric t).pos _ _ (hc.immersed t t.property x)) have hΞ·cont (i : β„•) (t : Icc tau s) : Continuous (fun x : ℝ => Ξ· i t (x : AddCircle curvePeriod)) := (Ξ· i t).continuous.comp (AddCircle.continuous_mk' curvePeriod) have hB : ContinuousOn (fun z : (ℝ Γ— W) Γ— (W Γ— W) => B z.1.1 z.1.2 z.2.1 z.2.2) ((Icc a b Γ—Λ’ U) Γ—Λ’ univ) := (flow_coordinateHessian_mixed_pullback_contDiffOn F he hU hρ).continuousOn have hΞ·C1 (i : β„•) (t : Icc tau s) : ContDiff ℝ 1 (fun x : ℝ => Ξ· i t (x : AddCircle curvePeriod)) := by have hbase := hc.spatial_regular t t.property have hS : Continuous (fun x => (mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (spatialUnitTangent F c t x) : W)) := hpush.comp (unitTangent_contMDiff_of_c2 F c hbase (hc.immersed t t.property)).continuous let coefficientInput : ℝ β†’ (ℝ Γ— W) Γ— (W Γ— W) := fun x => ((t.1, e (c x t)), (mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (spatialUnitTangent F c t x), Ξ· i t (x : AddCircle curvePeriod))) have hmap : Continuous coefficientInput := (continuous_const.prodMk (he.continuous.comp hbase.continuous)).prodMk (hS.prodMk (hΞ·cont i t)) have hBi := hB.comp_continuous (f := coefficientInput) hmap (fun x => show coefficientInput x ∈ ((Icc a b Γ—Λ’ U) Γ—Λ’ univ) from ⟨⟨hc.domain_subset t.property, heU (mem_range_self (c x t))⟩, mem_univ _⟩) have hRHS : Continuous (fun x : ℝ => curveSpeed F c t x β€’ (Ξ· (i + 1) t (x : AddCircle curvePeriod) + B t (e (c x t)) (mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (spatialUnitTangent F c t x)) (Ξ· i t (x : AddCircle curvePeriod)))) := (speed_contDiff_of_c2 F c hbase (hc.immersed t t.property)).continuous.smul ((hΞ·cont (i + 1) t).add hBi) apply contDiff_one_iff_deriv.mpr refine ⟨fun x => (hrec i t x).differentiableAt, ?_⟩ have hd : deriv (fun x : ℝ => Ξ· i t (x : AddCircle curvePeriod)) = fun x => curveSpeed F c t x β€’ (Ξ· (i + 1) t (x : AddCircle curvePeriod) + B t (e (c x t)) (mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (spatialUnitTangent F c t x)) (Ξ· i t (x : AddCircle curvePeriod))) := funext (fun x => (hrec i t x).deriv) rw [hd] exact hRHS have hleft := (smooth_retraction_differentials he hU heU hρ hρe).2.2 have hfield (i : β„•) (hi : βˆ€ (t : Icc tau s) (x : ℝ), Ξ· i t (x : AddCircle curvePeriod) = mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (m63CurvatureJet F c i t x)) (t : Icc tau s) : ContMDiff π“˜(ℝ, ℝ) ((𝓑 n).prod (𝓑 n)) 1 (fun x => (⟨c x t, m63CurvatureJet F c i t x⟩ : TangentBundle (𝓑 n) M)) := by let T : ℝ β†’ TangentBundle π“˜(ℝ, W) W := fun x => ⟨e (c x t), Ξ· i t (x : AddCircle curvePeriod)⟩ have he1 : ContMDiff (𝓑 n) π“˜(ℝ, W) 1 e := he.of_le (by simp) have hc1 : ContMDiff π“˜(ℝ, ℝ) (𝓑 n) 1 (fun x => c x t) := (hc.spatial_regular t t.property).of_le (by norm_num) have hmodel : ContMDiff (π“˜(ℝ, W)).tangent (π“˜(ℝ, W)).tangent 1 (fun q : W Γ— W => (⟨q.1, q.2⟩ : TangentBundle π“˜(ℝ, W) W)) := by convert! (contMDiff_tangentBundleModelSpaceHomeomorph_symm (I := π“˜(ℝ, W)) (n := 1)) using 1 rw [chartedSpaceSelf_prod] rfl have hT : ContMDiff π“˜(ℝ, ℝ) (π“˜(ℝ, W)).tangent 1 T := hmodel.comp ((he1.comp hc1).prodMk (hΞ·C1 i t).contMDiff) have hr := hρ.contMDiffOn_tangentMapWithin (m := 1) (by change (↑(2 : β„•βˆž) : WithTop β„•βˆž) ≀ ↑(⊀ : β„•βˆž) exact WithTop.coe_le_coe.mpr le_top) hU.uniqueMDiffOn have hcomp := hr.comp_contMDiff hT (fun x => heU (mem_range_self (c x t))) have heq : tangentMapWithin π“˜(ℝ, W) (𝓑 n) ρ U ∘ T = fun x => (⟨c x t, m63CurvatureJet F c i t x⟩ : TangentBundle (𝓑 n) M) := by funext x dsimp only [Function.comp_def, T, tangentMapWithin] rw [mfderivWithin_of_isOpen hU (heU (mem_range_self (c x t))), hi t x] apply Bundle.TotalSpace.ext (hρe (c x t)) apply heq_of_eq exact hleft (c x t) (m63CurvatureJet F c i t x) rw [heq] at hcomp exact hcomp have hscale (t : ℝ) (p : M) (Y Z : TangentSpace (𝓑 n) p) (r : ℝ) : coordinateHessian (F.connection t) e p (r β€’ Y) Z = r β€’ coordinateHessian (F.connection t) e p Y Z := by ext k have hek : ContMDiff (𝓑 n) π“˜(ℝ, ℝ) ∞ (fun q => e q k) := (EuclideanSpace.proj k).contDiff.contMDiff.comp he obtain ⟨A, hA⟩ := (M04.isSmoothCovariantTensor_hessian (F.connection t) hek).1 p have hrep (v w : TangentSpace (𝓑 n) p) : (F.connection t).hessian (fun q => e q k) p v w = A ![v, w] := hA ![v, w] change (F.connection t).hessian (fun q => e q k) p (r β€’ Y) Z = r * (F.connection t).hessian (fun q => e q k) p Y Z rw [hrep, hrep] simpa only [Matrix.vecCons, smul_eq_mul] using A.cons_smul ![Z] r Y have hident : βˆ€ i (t : Icc tau s) (x : ℝ), Ξ· i t (x : AddCircle curvePeriod) = mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (m63CurvatureJet F c i t x) := by intro i induction i with | zero => exact hzero | succ i hi => intro t x have hvel : curveVelocity (n := n) (fun y => c y t) x = curveSpeed F c t x β€’ spatialUnitTangent F c t x := by symm change curveSpeed F c t x β€’ ((curveSpeed F c t x)⁻¹ β€’ curveVelocity (n := n) (fun y => c y t) x) = _ rw [smul_smul, mul_inv_cancelβ‚€ (hvpos t x).ne', one_smul] have hcov : rampHorizontalCovariantDerivative (F.connection t) (fun y => c y t) (fun y => m63CurvatureJet F c i t y) x = curveSpeed F c t x β€’ m63CurvatureJet F c (i + 1) t x := by change _ = curveSpeed F c t x β€’ ((curveSpeed F c t x)⁻¹ β€’ _) rw [smul_smul, mul_inv_cancelβ‚€ (hvpos t x).ne', one_smul] have hBi : B t (e (c x t)) (mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (spatialUnitTangent F c t x)) (Ξ· i t (x : AddCircle curvePeriod)) = coordinateHessian (F.connection t) e (c x t) (spatialUnitTangent F c t x) (m63CurvatureJet F c i t x) := by dsimp only [B] rw [hi t x] erw [hleft (c x t) (spatialUnitTangent F c t x), hleft (c x t) (m63CurvatureJet F c i t x), hρe (c x t)] have hp := hasDerivAt_embedding_pushforward_of_contMDiffAt_one (F.connection t) he ((hc.spatial_regular t t.property).of_le (by norm_num) x) (fun y => m63CurvatureJet F c i t y) (hfield i hi t x) have hp' : HasDerivAt (fun y : ℝ => Ξ· i t (y : AddCircle curvePeriod)) (curveSpeed F c t x β€’ (HAdd.hAdd (Ξ± := W) (Ξ² := W) (Ξ³ := W) (mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (m63CurvatureJet F c (i + 1) t x)) (B t (e (c x t)) (mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (spatialUnitTangent F c t x)) (Ξ· i t (x : AddCircle curvePeriod))))) x := by rw [show (fun y : ℝ => Ξ· i t (y : AddCircle curvePeriod)) = (fun y => mfderiv (𝓑 n) π“˜(ℝ, W) e (c y t) (m63CurvatureJet F c i t y)) from funext (hi t)] apply hp.congr_deriv change HAdd.hAdd (Ξ± := W) (Ξ² := W) (Ξ³ := W) (coordinateHessian (F.connection t) e (c x t) (curveVelocity (n := n) (fun y => c y t) x) (m63CurvatureJet F c i t x)) (mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (rampHorizontalCovariantDerivative (F.connection t) (fun y => c y t) (fun y => m63CurvatureJet F c i t y) x)) = _ rw [hvel, hcov, hscale, map_smul, smul_add, hBi] exact add_comm _ _ have hd := congrArg (fun w : W => (curveSpeed F c t x)⁻¹ β€’ w) ((hrec i t x).unique hp') simp only [smul_smul, inv_mul_cancelβ‚€ (hvpos t x).ne', one_smul] at hd exact add_right_cancel hd refine ⟨hident, fun i t => hfield i (hident i) t, ?_⟩ intro i apply continuousOn_tangentSection_of_retraction_pushforward he hU heU hρ hρe (fun z : ℝ Γ— ℝ => c z.1 z.2) (fun z => m63CurvatureJet F c i z.2 z.1) hc.continuous have heval : Continuous (fun z : ℝ Γ— ℝ => Ξ· i (projIcc tau s hts.le z.2) (z.1 : AddCircle curvePeriod)) := ((Ξ· i).continuous.comp (continuous_projIcc.comp continuous_snd)).eval ((AddCircle.continuous_mk' curvePeriod).comp continuous_fst) apply heval.continuousOn.congr intro z hz exact (hident i ⟨z.2, hz.2⟩ z.1).symm.trans (congrArg (fun t : Icc tau s => Ξ· i t (z.1 : AddCircle curvePeriod)) (projIcc_of_mem hts.le hz.2).symm) end PoincareMT.M63