import PoincareLib.Geometry.RicciFlow.CurveShortening.Evolution.Curvature import PoincareLib.Geometry.RicciFlow.CurveShortening.Evolution.Commutator import PoincareLib.Geometry.RicciFlow.CurveShortening.Evolution.NormalDecomposition /-! # Exact corrected curve laws The evolving metric rule and scalar curvature identities give the genuine time derivative in MT2015Correction Lemma 0.2, pp. 4-6. Together with the speed and commutator laws of Lemma 0.1, p. 3, they assemble the frozen spatial and full spacetime laws. See `references/ricci-flow/mapher/curve-evolution/derivations/2026-09-20-curve-laws-assembly.md`. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set open scoped Manifold ContDiff Bundle Topology namespace PoincareMT.M62 variable {n : β„•} {M : Type*} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] {a b : ℝ} /-- The actual squared curvature has the corrected spatial evolution derivative; MT2015Correction Lemma 0.2, pp. 4-6. -/ theorem hasDerivAt_curvatureSquared [T2Space M] (F : RicciFlow n M (Set.Icc a b)) (c : ℝ β†’ ℝ β†’ M) (hc : M62ShrinkingCurve F c) {t : ℝ} (ht : t ∈ Set.Ioo a b) (x : ℝ) : HasDerivAt (fun s => m62CurvatureSquared F c s x) (m62SpatialEvolutionRhs F c t x) t := by have hmem : (x, t) ∈ (Set.univ Γ—Λ’ Set.Ioo a b : Set (ℝ Γ— ℝ)) := ⟨mem_univ _, ht⟩ have hopen : IsOpen (Set.univ Γ—Λ’ Set.Ioo a b : Set (ℝ Γ— ℝ)) := isOpen_univ.prod isOpen_Ioo have htime : MDifferentiableAt π“˜(ℝ, ℝ) π“˜(ℝ, ℝ Γ— ℝ) (fun s : ℝ => (x, s)) t := ((differentiableAt_const x).prodMk differentiableAt_id).mdifferentiableAt have hΞ³ : MDifferentiableAt π“˜(ℝ, ℝ) (𝓑 n) (fun s => c x s) t := ((hc.joint_smooth.contMDiffAt (hopen.mem_nhds hmem)).mdifferentiableAt (by simp)).comp t htime have hH : MDifferentiableAt π“˜(ℝ, ℝ) ((𝓑 n).prod (𝓑 n)) (fun s => (⟨c x s, m62CurvatureVector F c s x⟩ : TangentBundle (𝓑 n) M)) t := (((curvature_joint_contMDiff F c hc).contMDiffAt (hopen.mem_nhds hmem)).mdifferentiableAt (by simp)).comp t htime have h := hasDerivAt_flow_metric_pairing F ht hΞ³ hH hH apply h.congr_deriv rw [(F.metric t).symm (c x t) (m62CurvatureVector F c t x) (rampHorizontalCovariantDerivative (F.connection t) (fun s => c x s) (fun s => m62CurvatureVector F c s x) t)] rw [curvature_squared_time_pair F c hc ht x] dsimp only [m62SpatialEvolutionRhs] rw [curvature_squared_arcSecond_eq F c hc ht x, spatialDerivative_norm_split F c hc ht x] dsimp only [m62TangentRicci] ring /-- All spatial evolution laws hold for the displayed shrinking curve; MT2015Correction Lemmas 0.1-0.2, pp. 3-6. -/ theorem spatial_evolution [T2Space M] (F : RicciFlow n M (Set.Icc a b)) (c : ℝ β†’ ℝ β†’ M) (hc : M62ShrinkingCurve F c) : M62SpatialEvolution F c where speed_positive := fun _ ht x => speed_pos F c hc ht x speed_squared := fun _ ht x => hasDerivAt_speed_sq F c hc ht x speed_derivative := fun _ ht x => hasDerivAt_speed F c hc ht x commutator := fun f hf _ ht x => arc_time_commutator F c hc f hf ht x curvature_squared_smooth := curvatureSquared_contDiffOn F c hc exact_curvature := fun _ ht x => hasDerivAt_curvatureSquared F c hc ht x /-- The spatial evolution and full-normal identities assemble the exact spacetime curve laws; MT2015Correction Lemma 0.2 and pp. 6-7. -/ theorem SpacetimeData.curve_laws [T2Space M] {F : RicciFlow n M (Set.Icc a b)} (G : SpacetimeData F) (c : ℝ β†’ ℝ β†’ M) (hc : M62ShrinkingCurve F c) : M62CurveLaws G c where spatial := spatial_evolution F c hc lifted_time := G.lifted_time c hc normal_norm := G.normal_norm c hc exact_curvature := fun t x => by rw [G.spacetimeEvolutionRhs_eq_spatial c hc t x] exact hasDerivAt_curvatureSquared F c hc t.property x regularized_gradient := fun _ hΞ΅ t x => G.regularized_gradient_le c hc hΞ΅ t x end PoincareMT.M62