import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Basic import PoincareLib.Geometry.Riemannian.Tensor.Operations import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic /-! # Curve shortening in an ambient Ricci flow The real parameter interval below is a periodic representative of `Sยน`. All vector derivatives below use the actual spatial Levi-Civita connection. The milestone retains the corrected upper bounds; constructing the auxiliary spacetime curvature used in their source proof is not part of these definitions. -/ set_option autoImplicit false open scoped Manifold ContDiff Bundle intervalIntegral universe u namespace PoincareMT variable {n : โ„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] variable {tโ‚€ tโ‚ : โ„} variable {F : RicciFlow n M (Set.Icc tโ‚€ tโ‚)} /-- The period of the real representative of the parameter circle. -/ noncomputable def curvePeriod : โ„ := 2 * Real.pi /-- Speed of a periodic curve at a fixed time. -/ noncomputable def curveSpeed (F : RicciFlow n M (Set.Icc tโ‚€ tโ‚)) (curve : โ„ โ†’ โ„ โ†’ M) (t x : โ„) : โ„ := (F.metric t).tangentNorm (curve x t) (curveVelocity (n := n) (fun y โ†ฆ curve y t) x) /-- Unit tangent in the increasing parameter direction. -/ noncomputable def spatialUnitTangent (F : RicciFlow n M (Set.Icc tโ‚€ tโ‚)) (curve : โ„ โ†’ โ„ โ†’ M) (t x : โ„) : TangentSpace (๐“ก n) (curve x t) := (curveSpeed F curve t x)โปยน โ€ข curveVelocity (n := n) (fun y โ†ฆ curve y t) x namespace CurveShrinkingFlow /-- A smooth immersed periodic family in the ambient Ricci flow. -/ structure Data (F : RicciFlow n M (Set.Icc tโ‚€ tโ‚)) where curve : โ„ โ†’ โ„ โ†’ M time_nontrivial : tโ‚€ < tโ‚ regular : โˆ€ t : โ„, ContMDiffOn (๐“˜(โ„, โ„)) (๐“ก n) 2 (fun x โ†ฆ curve x t) Set.univ time_regular : โˆ€ x : โ„, ContMDiffOn (๐“˜(โ„, โ„)) (๐“ก n) 2 (fun t โ†ฆ curve x t) (Set.Icc tโ‚€ tโ‚) joint_regular : ContMDiffOn ((๐“˜(โ„, โ„)).prod (๐“˜(โ„, โ„))) (๐“ก n) โˆž (fun z : โ„ ร— โ„ โ†ฆ curve z.1 z.2) (Set.univ ร—หข Set.Icc tโ‚€ tโ‚) periodic : โˆ€ (x t : โ„), curve (x + curvePeriod) t = curve x t immersed : โˆ€ (x t : โ„), curveVelocity (n := n) (fun y โ†ฆ curve y t) x โ‰  0 spatial_unit_extension : โˆ€ (t : โ„), SmoothAlongCurveExtensionOn Set.univ (fun x โ†ฆ curve x t) (fun x โ†ฆ spatialUnitTangent F (curve := curve) t x) end CurveShrinkingFlow open CurveShrinkingFlow /-- Curvature vector `H = โˆ‡_S S`, using the supplied local unit-tangent extension. -/ noncomputable def curveCurvatureVector (P : CurveShrinkingFlow.Data (n := n) (M := M) F) (t x : โ„) : TangentSpace (๐“ก n) (P.curve x t) := alongCovariantDerivative F (fun _ โ†ฆ t) (fun y โ†ฆ P.curve y t) (fun y โ†ฆ spatialUnitTangent F P.curve t y) Set.univ (P.spatial_unit_extension t) (spatialUnitTangent F P.curve t) x (by simp) /-- The curve-shrinking equation `โˆ‚โ‚œc = H`. -/ def SatisfiesCurveShrinkingEquation (P : CurveShrinkingFlow.Data (n := n) (M := M) F) : Prop := โˆ€ (x t : โ„), t โˆˆ Set.Icc tโ‚€ tโ‚ โ†’ curveVelocity (n := n) (fun s โ†ฆ P.curve x s) t = curveCurvatureVector P t x /-- Squared curvature `kยฒ = โŸจH,HโŸฉ`. -/ noncomputable def curveCurvatureSquared (P : CurveShrinkingFlow.Data (n := n) (M := M) F) (t x : โ„) : โ„ := (F.metric t).inner (P.curve x t) (curveCurvatureVector P t x) (curveCurvatureVector P t x) /-- Curvature `k = |H|`, totalized by the nonnegative square root. -/ noncomputable def curveCurvature (P : CurveShrinkingFlow.Data (n := n) (M := M) F) (t x : โ„) : โ„ := Real.sqrt (curveCurvatureSquared P t x) /-- The normal component of `โˆ‡_S H`. -/ noncomputable def normalCovariantDerivative (P : CurveShrinkingFlow.Data (n := n) (M := M) F) (t x : โ„) (E : SmoothAlongCurveExtensionOn Set.univ (fun y โ†ฆ P.curve y t) (fun y โ†ฆ curveCurvatureVector P t y)) : TangentSpace (๐“ก n) (P.curve x t) := let A := alongCovariantDerivative F (fun _ โ†ฆ t) (fun y โ†ฆ P.curve y t) (fun y โ†ฆ curveCurvatureVector P t y) Set.univ E (spatialUnitTangent F P.curve t) x (by simp) A - (F.metric t).inner (P.curve x t) A (spatialUnitTangent F P.curve t x) โ€ข spatialUnitTangent F P.curve t x /-- First derivative with respect to arc length at a fixed time. -/ noncomputable def arcLengthDerivative (P : CurveShrinkingFlow.Data (n := n) (M := M) F) (t : โ„) (f : โ„ โ†’ โ„) (x : โ„) : โ„ := (curveSpeed F P.curve t x)โปยน * deriv f x /-- Second arc-length derivative, obtained by iterating the preceding operator. -/ noncomputable def arcLengthSecondDerivativeOf (P : CurveShrinkingFlow.Data (n := n) (M := M) F) (t : โ„) (f : โ„ โ†’ โ„) (x : โ„) : โ„ := arcLengthDerivative P t (fun y โ†ฆ arcLengthDerivative P t f y) x /-- Second arc-length derivative of the squared curvature. -/ noncomputable def arcLengthSecondDerivative (P : CurveShrinkingFlow.Data (n := n) (M := M) F) (t x : โ„) : โ„ := arcLengthDerivative P t (fun y โ†ฆ arcLengthDerivative P t (fun z โ†ฆ curveCurvatureSquared P t z) y) x /-- Total length of a periodic curve. -/ noncomputable def totalCurveLength (P : CurveShrinkingFlow.Data (n := n) (M := M) F) (t : โ„) : โ„ := โˆซ x in (0 : โ„)..curvePeriod, curveSpeed F P.curve t x /-- Total curvature of a periodic curve. -/ noncomputable def totalCurveCurvature (P : CurveShrinkingFlow.Data (n := n) (M := M) F) (t : โ„) : โ„ := โˆซ x in (0 : โ„)..curvePeriod, curveCurvature P t x * curveSpeed F P.curve t x end PoincareMT