import PoincareLib.Geometry.CurveShortening.Ramp.Data import Mathlib.Geometry.Manifold.ContMDiffMFDeriv import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace /-! # Actual embedded data of arbitrary C2 solutions The actual tangent map transfers the closed bundle continuity fields to the fixed Euclidean target. The pure-normal equation gives a witnessed time derivative only in the interior. MT2007 Claim 19.1, p. 437; `2026-09-22-uniqueness-embedded-curve-data.md`. -/ 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 ℝ ΞΉ /-- Smooth ambient composition preserves actual spatial C2 data and the closed value, first derivative and pushed-curvature continuity. MT2007 Claim 19.1, p. 437; embedded-curve-data derivation, statement 1. No assertion about continuity of the raw second derivative is made. -/ theorem c2ShrinkingCurve_embedded_closed_data {F : RicciFlow n M (Icc a b)} {c : ℝ β†’ ℝ β†’ M} {J : Set ℝ} (hc : M63C2ShrinkingCurveOn F c J) {e : M β†’ W} (he : ContMDiff (𝓑 n) π“˜(ℝ, W) ∞ e) : (βˆ€ t ∈ J, ContDiff ℝ 2 (fun x => e (c x t))) ∧ (βˆ€ t ∈ J, βˆ€ x, HasDerivAt (fun y => e (c y t)) (mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (curveVelocity (n := n) (fun y => c y t) x) : W) x) ∧ ContinuousOn (fun z : ℝ Γ— ℝ => e (c z.1 z.2)) (univ Γ—Λ’ J) ∧ ContinuousOn (fun z : ℝ Γ— ℝ => deriv (fun y => e (c y z.2)) z.1) (univ Γ—Λ’ J) ∧ ContinuousOn (fun z : ℝ Γ— ℝ => (mfderiv (𝓑 n) π“˜(ℝ, W) e (c z.1 z.2) (m62CurvatureVector F c z.2 z.1) : W)) (univ Γ—Λ’ J) := by have hspace (t : ℝ) (ht : t ∈ J) : ContDiff ℝ 2 (fun x => e (c x t)) := ((he.of_le (ENat.natCast_le_of_coe_top_le_withTop le_rfl 2)).comp (hc.spatial_regular t ht)).contDiff have hderiv (t : ℝ) (ht : t ∈ J) (x : ℝ) : HasDerivAt (fun y => e (c y t)) (mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (curveVelocity (n := n) (fun y => c y t) x) : W) x := by have hchain : fderiv ℝ (fun y => e (c y t)) x = (mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t)).comp (mfderiv π“˜(ℝ, ℝ) (𝓑 n) (fun y => c y t) x) := by rw [← mfderiv_eq_fderiv] exact mfderiv_comp x (he.mdifferentiable (by simp)).mdifferentiableAt ((hc.spatial_regular t ht x).mdifferentiableAt (by norm_num)) have hd := ((hspace t ht).differentiable (by norm_num) x).hasDerivAt have heq := congrArg (fun L : ℝ β†’L[ℝ] W => L 1) hchain exact hd.congr_deriv heq 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)) refine ⟨hspace, hderiv, he.continuous.comp_continuousOn hc.continuous, ?_, ?_⟩ Β· exact (hpush.comp_continuousOn hc.velocity_continuous).congr (fun z hz => (hderiv z.2 hz.2 z.1).deriv) Β· exact hpush.comp_continuousOn hc.curvature_continuous /-- The actual frozen pure-normal equation becomes a witnessed ambient time derivative in the interior, with joint C1 regularity there. MT2007 Claim 19.1, p. 437; embedded-curve-data derivation, statement 2. -/ theorem c2ShrinkingCurve_embedded_interior_equation {F : RicciFlow n M (Icc a b)} {c : ℝ β†’ ℝ β†’ M} {J : Set ℝ} (hc : M63C2ShrinkingCurveOn F c J) {e : M β†’ W} (he : ContMDiff (𝓑 n) π“˜(ℝ, W) ∞ e) : ContDiffOn ℝ 1 (fun z : ℝ Γ— ℝ => e (c z.1 z.2)) (univ Γ—Λ’ interior J) ∧ βˆ€ t ∈ interior J, βˆ€ x, HasDerivAt (fun s => e (c x s)) (mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (m62CurvatureVector F c t x) : W) t := by have hC1 : ContDiffOn ℝ 1 (fun z : ℝ Γ— ℝ => e (c z.1 z.2)) (univ Γ—Λ’ interior J) := ((he.of_le (ENat.natCast_le_of_coe_top_le_withTop le_rfl 1)).comp_contMDiffOn hc.joint_c1).contDiffOn refine ⟨hC1, ?_⟩ intro t ht x have hmem : (x, t) ∈ univ Γ—Λ’ interior J := ⟨mem_univ _, ht⟩ have htime : MDifferentiableAt π“˜(ℝ, ℝ) π“˜(ℝ, ℝ Γ— ℝ) (fun s : ℝ => (x, s)) t := ((differentiableAt_const x).prodMk differentiableAt_id).mdifferentiableAt have hct := (((hc.joint_c1 (x, t) hmem).contMDiffAt ((isOpen_univ.prod isOpen_interior).mem_nhds hmem)).mdifferentiableAt (by norm_num)).comp t htime have hqd : DifferentiableAt ℝ (fun s => e (c x s)) t := ((hC1.contDiffAt ((isOpen_univ.prod isOpen_interior).mem_nhds hmem)).differentiableAt (by norm_num)).comp t ((differentiableAt_const x).prodMk differentiableAt_id) have hchain : fderiv ℝ (fun s => e (c x s)) t = (mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t)).comp (mfderiv π“˜(ℝ, ℝ) (𝓑 n) (fun s => c x s) t) := by rw [← mfderiv_eq_fderiv] exact mfderiv_comp t (he.mdifferentiable (by simp)).mdifferentiableAt hct have heq := congrArg (fun L : ℝ β†’L[ℝ] W => L 1) hchain change deriv (fun s => e (c x s)) t = mfderiv (𝓑 n) π“˜(ℝ, W) e (c x t) (curveVelocity (fun s => c x s) t) at heq rw [hc.equation t ht x] at heq exact hqd.hasDerivAt.congr_deriv heq end PoincareMT.M63