import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Basic import PoincareLib.Geometry.Riemannian.ScalarOperators import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Topology.OpenPartialHomeomorph.Defs /-! # Reduced length and its differential quantities This file records the local regular-locus data used by Morgan--Tian's Theorem 6.50 and Corollary 6.51. A regular point carries an actual local representative of the already-defined reduced length, a minimizing path, and derivative witnesses. The witnesses prevent Mathlib's totalized derivatives from standing in for the analytic hypotheses. -/ set_option autoImplicit false open scoped Manifold ContDiff Bundle intervalIntegral BigOperators universe u namespace PoincareMT variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] /-- The Harnack density `H(X)` along a backward-time curve. -/ noncomputable def reducedHarnackDensity {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) (Ξ³ : ℝ β†’ M) (timeDerivative : ℝ β†’ ℝ) (Ο„ : ℝ) : ℝ := -timeDerivative Ο„ - (F.connection (T - Ο„)).scalarCurvature (Ξ³ Ο„) / Ο„ - 2 * (mvfderiv (𝓑 n) (fun y ↦ (F.connection (T - Ο„)).scalarCurvature y) (Ξ³ Ο„)) (curveVelocity (n := n) Ξ³ Ο„) + 2 * (F.connection (T - Ο„)).ricci (Ξ³ Ο„) (curveVelocity (n := n) Ξ³ Ο„) (curveVelocity (n := n) Ξ³ Ο„) /-- The `K^Ο„` integral appearing in the reduced-length formulas. -/ noncomputable def reducedHarnackIntegral {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) (Ξ³ : ℝ β†’ M) (timeDerivative : ℝ β†’ ℝ) (Ο„ : ℝ) : ℝ := ∫ s in 0..Ο„, s * Real.sqrt s * reducedHarnackDensity F T Ξ³ timeDerivative s /-- The squared norm of the spatial differential of a local reduced length. -/ noncomputable def reducedLengthGradientNormSq {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) (representative : M Γ— ℝ β†’ ℝ) (Ο„ : ℝ) (q : M) : ℝ := let b := (F.metric (T - Ο„)).orthonormalBasis q βˆ‘ i, (mvfderiv (𝓑 n) (fun x ↦ representative (x, Ο„)) q (b i)) ^ 2 /-- The spatial Laplacian of a local reduced length representative. -/ noncomputable def reducedLengthLaplacian {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) (representative : M Γ— ℝ β†’ ℝ) (Ο„ : ℝ) (q : M) : ℝ := (F.connection (T - Ο„)).laplacian (fun x ↦ representative (x, Ο„)) q /-- A regular point of the reduced length from `(p,T)`. -/ structure ReducedLengthRegularPoint {J : Set ℝ} (F : RicciFlow n M J) (T Ο„max : ℝ) (p q : M) (Ο„ : ℝ) where tau_pos : 0 < Ο„ tau_lt : Ο„ < Ο„max path : BackwardTimePath F T 0 Ο„ path_start : path.curve 0 = p path_end : path.curve Ο„ = q minimizing : IsMinimizingBackwardLPath F T 0 Ο„ path path_realizes_reduced_length : reducedLength F T p q Ο„ = backwardLLength F T 0 Ο„ path.curve / (2 * Real.sqrt Ο„) unique_minimizing_path : βˆ€ q' : BackwardTimePath F T 0 Ο„, q'.curve 0 = p β†’ q'.curve Ο„ = q β†’ IsMinimizingBackwardLPath F T 0 Ο„ q' β†’ Set.EqOn q'.curve path.curve (Set.Icc 0 Ο„) neighborhood : Set (M Γ— ℝ) neighborhood_open : IsOpen neighborhood center_mem : (q, Ο„) ∈ neighborhood representative : M Γ— ℝ β†’ ℝ representative_eq : βˆ€ z ∈ neighborhood, representative z = reducedLength F T p z.1 z.2 representative_spacetime_smooth : ContMDiffAt ((𝓑 n).prod (π“˜(ℝ, ℝ))) (π“˜(ℝ, ℝ)) ∞ representative (q, Ο„) representative_space_smooth_on : ContMDiffOn (𝓑 n) (π“˜(ℝ, ℝ)) ∞ (fun x ↦ representative (x, Ο„)) {x | (x, Ο„) ∈ neighborhood} representative_space_smooth : ContMDiffAt (𝓑 n) (π“˜(ℝ, ℝ)) ∞ (fun x ↦ representative (x, Ο„)) q representative_time_derivative : βˆƒ d : ℝ, HasDerivAt (fun s ↦ representative (q, s)) d Ο„ path_scalar_time_derivative : ℝ β†’ ℝ path_scalar_time_derivative_spec : βˆ€ s, s ∈ Set.Ioo 0 Ο„ β†’ HasDerivWithinAt (fun r ↦ (F.connection (T - r)).scalarCurvature (path.curve s)) (path_scalar_time_derivative s) (Set.Icc 0 Ο„) s harnack_integrable : IntervalIntegrable (fun s ↦ s * Real.sqrt s * reducedHarnackDensity F T path.curve path_scalar_time_derivative s) MeasureTheory.volume 0 Ο„ /-- A smooth upper barrier for reduced length at a spacetime point. -/ structure ReducedLengthUpperBarrier {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) (p q : M) (Ο„ : ℝ) where neighborhood : Set (M Γ— ℝ) neighborhood_open : IsOpen neighborhood center_mem : (q, Ο„) ∈ neighborhood representative : M Γ— ℝ β†’ ℝ touches : representative (q, Ο„) = reducedLength F T p q Ο„ dominates : βˆ€ z ∈ neighborhood, reducedLength F T p z.1 z.2 ≀ representative z representative_spacetime_smooth : ContMDiffAt ((𝓑 n).prod (π“˜(ℝ, ℝ))) (π“˜(ℝ, ℝ)) ∞ representative (q, Ο„) representative_space_smooth_on : ContMDiffOn (𝓑 n) (π“˜(ℝ, ℝ)) ∞ (fun x ↦ representative (x, Ο„)) {x | (x, Ο„) ∈ neighborhood} representative_space_smooth : ContMDiffAt (𝓑 n) (π“˜(ℝ, ℝ)) ∞ (fun x ↦ representative (x, Ο„)) q representative_time_derivative : βˆƒ d : ℝ, HasDerivAt (fun s ↦ representative (q, s)) d Ο„ /-- The residual in the first reduced-length barrier inequality. -/ noncomputable def reducedLengthBarrierResidual {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) (p q : M) (Ο„ : ℝ) (B : ReducedLengthUpperBarrier F T p q Ο„) : ℝ := deriv (fun s ↦ B.representative (q, s)) Ο„ + reducedLengthLaplacian F T B.representative Ο„ q - ((n : ℝ) / 2 - B.representative (q, Ο„)) / Ο„ /-- One normalized L-exponential family, with compatible restrictions and initial jets. -/ structure LExponentialFamily {J : Set ℝ} (F : RicciFlow n M J) (T Ο„max : ℝ) (p : M) where gamma : TangentSpace (𝓑 n) p β†’ ℝ β†’ M gamma_at_zero : βˆ€ Z, gamma Z 0 = p path : βˆ€ (_Z : TangentSpace (𝓑 n) p) b, 0 < b β†’ b < Ο„max β†’ BackwardTimePath F T 0 b path_eq : βˆ€ Z b (hb : 0 < b) (hmax : b < Ο„max), (path Z b hb hmax).curve = gamma Z regularization : βˆ€ Z b (hb : 0 < b) (hmax : b < Ο„max), RegularizedLGeodesicData (path Z b hb hmax) squareFamily : TangentSpace (𝓑 n) p β†’ ℝ β†’ M squareDomain : Set (TangentSpace (𝓑 n) p Γ— ℝ) square_open : IsOpen squareDomain square_contains : Set.univ Γ—Λ’ Set.Ico 0 (Real.sqrt Ο„max) βŠ† squareDomain square_smooth : letI : Bundle.RiemannianBundle (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨(F.metric T).toRiemannianMetric⟩ ContMDiffOn ((π“˜(ℝ, TangentSpace (𝓑 n) p)).prod (π“˜(ℝ, ℝ))) (𝓑 n) ∞ (fun z ↦ squareFamily z.1 z.2) squareDomain square_agrees : βˆ€ Z s, s ∈ Set.Ico 0 (Real.sqrt Ο„max) β†’ squareFamily Z s = gamma Z (s ^ 2) square_at_zero : βˆ€ Z, squareFamily Z 0 = p initial_derivative : βˆ€ Z, (square_at_zero Z) β–Έ curveVelocity (squareFamily Z) 0 = (2 : ℝ) β€’ Z gamma_smooth : letI : Bundle.RiemannianBundle (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨(F.metric T).toRiemannianMetric⟩ ContMDiffOn ((π“˜(ℝ, TangentSpace (𝓑 n) p)).prod (π“˜(ℝ, ℝ))) (𝓑 n) ∞ (fun z ↦ gamma z.1 z.2) (Set.univ Γ—Λ’ Set.Ioo 0 Ο„max) /-- The action of the specified L-exponential path, not an independent scalar datum. -/ noncomputable def LExponentialFamily.action {J : Set ℝ} {F : RicciFlow n M J} {T Ο„max : ℝ} {p : M} (E : LExponentialFamily F T Ο„max p) (Z : TangentSpace (𝓑 n) p) (Ο„ : ℝ) : ℝ := backwardLLength F T 0 Ο„ (E.gamma Z) /-- The actual differential in the initial tangent vector at a fixed backward time. -/ noncomputable def LExponentialFamily.sliceDifferential {J : Set ℝ} {F : RicciFlow n M J} {T Ο„max : ℝ} {p : M} (E : LExponentialFamily F T Ο„max p) (Z : TangentSpace (𝓑 n) p) (Ο„ : ℝ) : TangentSpace (𝓑 n) p β†’L[ℝ] TangentSpace (𝓑 n) (E.gamma Z Ο„) := letI : Bundle.RiemannianBundle (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨(F.metric T).toRiemannianMetric⟩ mfderiv (π“˜(ℝ, TangentSpace (𝓑 n) p)) (𝓑 n) (fun V ↦ E.gamma V Ο„) Z /-- Unique minimality concerns the same family, up to equality on the geometric interval. -/ def LExponentialFamily.uniqueMinimizing {J : Set ℝ} {F : RicciFlow n M J} {T Ο„max : ℝ} {p : M} (E : LExponentialFamily F T Ο„max p) (Z : TangentSpace (𝓑 n) p) (Ο„ : ℝ) : Prop := βˆƒ (hΟ„ : 0 < Ο„) (hmax : Ο„ < Ο„max), IsMinimizingBackwardLPath F T 0 Ο„ (E.path Z Ο„ hΟ„ hmax) ∧ βˆ€ q : BackwardTimePath F T 0 Ο„, q.curve 0 = p β†’ q.curve Ο„ = E.gamma Z Ο„ β†’ IsMinimizingBackwardLPath F T 0 Ο„ q β†’ Set.EqOn q.curve (E.gamma Z) (Set.Icc 0 Ο„) /-- The canonical minimizing, nonconjugate initial-vector and time domain. -/ def LExponentialFamily.regularDomain {J : Set ℝ} {F : RicciFlow n M J} {T Ο„max : ℝ} {p : M} (E : LExponentialFamily F T Ο„max p) : Set (TangentSpace (𝓑 n) p Γ— ℝ) := {z | E.uniqueMinimizing z.1 z.2 ∧ Function.Bijective (E.sliceDifferential z.1 z.2)} /-- The fixed-time minimizing-neighborhood condition in Morgan-Tian Definition 6.25. -/ def LExponentialFamily.localRegularDomain {J : Set ℝ} {F : RicciFlow n M J} {T Ο„max : ℝ} {p : M} (E : LExponentialFamily F T Ο„max p) : Set (TangentSpace (𝓑 n) p Γ— ℝ) := {z | 0 < z.2 ∧ z.2 < Ο„max ∧ Function.Bijective (E.sliceDifferential z.1 z.2) ∧ βˆƒ N : Set (TangentSpace (𝓑 n) p), IsOpen N ∧ z.1 ∈ N ∧ βˆ€ Z ∈ N, E.uniqueMinimizing Z z.2} /-- The coherent L-exponential geometry used by reduced length and reduced volume. The one chart has the entire canonical regular domain as its source. Its regular-point data use the same inverse branch, path and action. These are geometric outputs; no reduced-volume or sharp-equality result is a premise. -/ structure LExponentialGeometry {J : Set ℝ} (F : RicciFlow n M J) (T Ο„max : ℝ) (p : M) extends LExponentialFamily F T Ο„max p where action_smooth : letI : Bundle.RiemannianBundle (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨(F.metric T).toRiemannianMetric⟩ ContDiffOn ℝ ∞ (fun z : TangentSpace (𝓑 n) p Γ— ℝ ↦ toLExponentialFamily.action z.1 z.2) (Set.univ Γ—Λ’ Set.Ioo 0 Ο„max) action_initial_differential : letI : Bundle.RiemannianBundle (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨(F.metric T).toRiemannianMetric⟩ βˆ€ Z Ο„, 0 < Ο„ β†’ Ο„ < Ο„max β†’ βˆ€ W : TangentSpace (𝓑 n) p, fderiv ℝ (fun V ↦ toLExponentialFamily.action V Ο„) Z W = 2 * Real.sqrt Ο„ * (F.metric (T - Ο„)).inner (gamma Z Ο„) (curveVelocity (gamma Z) Ο„) (toLExponentialFamily.sliceDifferential Z Ο„ W) action_time_derivative : βˆ€ Z Ο„, 0 < Ο„ β†’ Ο„ < Ο„max β†’ HasDerivAt (fun s ↦ toLExponentialFamily.action Z s) (backwardLIntegrand F T (gamma Z) Ο„) Ο„ jacobi_differential : βˆ€ (Z W : TangentSpace (𝓑 n) p) b (hb : 0 < b) (hmax : b < Ο„max), βˆƒ Y : βˆ€ Ο„, TangentSpace (𝓑 n) ((path Z b hb hmax).curve Ο„), IsLJacobiField F T 0 b (path Z b hb hmax) Y ∧ HasLJacobiInitialDerivative (regularization Z b hb hmax) Y (((congrFun (path_eq Z b hb hmax) 0).trans (gamma_at_zero Z)).symm β–Έ ((2 : ℝ) β€’ W)) ∧ βˆ€ Ο„ ∈ Set.Icc 0 b, ((congrFun (path_eq Z b hb hmax) Ο„) β–Έ Y Ο„ : TangentSpace (𝓑 n) (gamma Z Ο„)) = toLExponentialFamily.sliceDifferential Z Ο„ W minimizers_lift : βˆ€ Ο„ (_hΟ„ : 0 < Ο„) (_hmax : Ο„ < Ο„max), βˆ€ q : BackwardTimePath F T 0 Ο„, q.curve 0 = p β†’ IsMinimizingBackwardLPath F T 0 Ο„ q β†’ βˆƒ! Z : TangentSpace (𝓑 n) p, Set.EqOn q.curve (gamma Z) (Set.Icc 0 Ο„) minimizing_initial_bounded : βˆ€ Q : Set (M Γ— ℝ), IsCompact Q β†’ Q βŠ† Set.univ Γ—Λ’ Set.Ioo 0 Ο„max β†’ βˆƒ A : ℝ, 0 ≀ A ∧ βˆ€ Z Ο„ (hΟ„ : 0 < Ο„) (hmax : Ο„ < Ο„max), (gamma Z Ο„, Ο„) ∈ Q β†’ IsMinimizingBackwardLPath F T 0 Ο„ (path Z Ο„ hΟ„ hmax) β†’ (F.metric T).tangentNorm p Z ≀ A regular_chart : OpenPartialHomeomorph (TangentSpace (𝓑 n) p Γ— ℝ) (M Γ— ℝ) regular_source : regular_chart.source = toLExponentialFamily.regularDomain regular_forward : βˆ€ z, regular_chart z = (gamma z.1 z.2, z.2) regular_forward_smooth : letI : Bundle.RiemannianBundle (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨(F.metric T).toRiemannianMetric⟩ ContMDiffOn ((π“˜(ℝ, TangentSpace (𝓑 n) p)).prod (π“˜(ℝ, ℝ))) ((𝓑 n).prod (π“˜(ℝ, ℝ))) ∞ regular_chart regular_chart.source regular_inverse_smooth : letI : Bundle.RiemannianBundle (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨(F.metric T).toRiemannianMetric⟩ ContMDiffOn ((𝓑 n).prod (π“˜(ℝ, ℝ))) ((π“˜(ℝ, TangentSpace (𝓑 n) p)).prod (π“˜(ℝ, ℝ))) ∞ regular_chart.symm regular_chart.target regular_target_times : regular_chart.target βŠ† Set.univ Γ—Λ’ Set.Ioo 0 Ο„max regular_inverse_time : βˆ€ z ∈ regular_chart.target, (regular_chart.symm z).2 = z.2 regular_domain_eq_local : toLExponentialFamily.regularDomain = toLExponentialFamily.localRegularDomain regular_point : βˆ€ z ∈ regular_chart.target, ReducedLengthRegularPoint F T Ο„max p z.1 z.2 regular_point_path : βˆ€ z (hz : z ∈ regular_chart.target), Set.EqOn (regular_point z hz).path.curve (gamma (regular_chart.symm z).1) (Set.Icc 0 z.2) regular_point_neighborhood : βˆ€ z (hz : z ∈ regular_chart.target), (regular_point z hz).neighborhood βŠ† regular_chart.target regular_point_representative : βˆ€ z (hz : z ∈ regular_chart.target), (regular_point z hz).representative = fun w ↦ toLExponentialFamily.action (regular_chart.symm w).1 w.2 / (2 * Real.sqrt w.2) backward_nesting : βˆ€ Z Ο„β‚‚, (Z, Ο„β‚‚) ∈ toLExponentialFamily.regularDomain β†’ βˆ€ τ₁, 0 < τ₁ β†’ τ₁ ≀ Ο„β‚‚ β†’ (Z, τ₁) ∈ toLExponentialFamily.regularDomain bounded_initial_coverage : βˆ€ A : ℝ, 0 ≀ A β†’ βˆƒ Ξ΄ : ℝ, 0 < Ξ΄ ∧ Ξ΄ < Ο„max ∧ βˆ€ Z : TangentSpace (𝓑 n) p, (F.metric T).tangentNorm p Z ≀ A β†’ βˆ€ Ο„, 0 < Ο„ β†’ Ο„ < Ξ΄ β†’ (Z, Ο„) ∈ toLExponentialFamily.regularDomain /-- The canonical open regular spacetime image of the selected L-exponential geometry. -/ def LExponentialGeometry.regularImage {J : Set ℝ} {F : RicciFlow n M J} {T Ο„max : ℝ} {p : M} (G : LExponentialGeometry F T Ο„max p) : Set (M Γ— ℝ) := G.regular_chart.target /-- The reduced-length representative obtained from the actual inverse exponential branch. -/ noncomputable def LExponentialGeometry.representative {J : Set ℝ} {F : RicciFlow n M J} {T Ο„max : ℝ} {p : M} (G : LExponentialGeometry F T Ο„max p) (z : M Γ— ℝ) : ℝ := G.toLExponentialFamily.action (G.regular_chart.symm z).1 z.2 / (2 * Real.sqrt z.2) end PoincareMT