import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.PositiveStart.PositiveStartInitialVelocity import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Formulas.HarnackIntegral import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.SquareRoot.Equation.SquareEuler /-! # The actual initial Harnack boundary correction The supplied initial within derivative determines the retained square kinetic energy and hence the exact initial primitive in K. Morgan-Tian Lemmas 6.48-6.49, pp. 130-131. -/ set_option autoImplicit false open Set open scoped Manifold ContDiff universe u namespace PoincareMT.M14 variable {n : β„•} {X : Type u} [TopologicalSpace X] {time : X β†’ ℝ} {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} {T a b : ℝ} {x y : G.Point} {p : M14BackwardPath G T a b x y} /-- The initial Harnack primitive is exactly the prescribed initial scalar-plus-kinetic boundary term, including its absolute time factor, Lemma 6.48 and the positive-start correction to Lemma 6.49, pp. 130-131. -/ theorem positiveStart_initial_harnackPrimitive (R : M14SquareRootPath G p) (hstart : MDifferentiableWithinAt (π“˜(ℝ, ℝ)) (spacetimeModel n) p.curve (Icc a b) a) (hderiv : mfderivWithin (π“˜(ℝ, ℝ)) (spacetimeModel n) p.curve (Icc a b) a 1 = -G.spacetime.timeVector (p.curve a) + (p.horizontal_velocity a).val) : squareHarnackPrimitive R (Real.sqrt a) = a * Real.sqrt a * (horizontalScalarCurvature G.leafwise (p.curve a) + G.spacetime.horizontalMetric.inner (p.curve a) (p.horizontal_velocity a) (p.horizontal_velocity a)) := by have hpoint : R.curve (Real.sqrt a) = p.curve a := by rw [R.agrees _ ⟨le_rfl, Real.sqrt_le_sqrt p.tau_lt.le⟩, Real.sq_sqrt p.tau_nonneg] unfold squareHarnackPrimitive rw [positiveStart_initial_velocity_norm R hstart hderiv, congrArg (horizontalScalarCurvature G.leafwise) hpoint, show (Real.sqrt a) ^ 3 = a * Real.sqrt a by rw [pow_succ, Real.sq_sqrt p.tau_nonneg]] ring /-- The K integral of the actual minimizing path retains the initial positive-start correction determined by the frozen derivative data, Lemmas 6.48-6.49, pp. 130-131. -/ theorem positiveStart_harnackIntegral_eq (hCoordinates : M12MetricPredecessors.{0} n) (hM12 : GeneralizedRicciGaugeTheory.{u} n) (hp : M14IsMinimizing p) (R : M14SquareRootPath G p) (hstart : MDifferentiableWithinAt (π“˜(ℝ, ℝ)) (spacetimeModel n) p.curve (Icc a b) a) (hderiv : mfderivWithin (π“˜(ℝ, ℝ)) (spacetimeModel n) p.curve (Icc a b) a 1 = -G.spacetime.timeVector (p.curve a) + (p.horizontal_velocity a).val) : M14GeneralizedKIntegral G p (fun t => M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) (p.curve t)) = M14BackwardLAction G p / 2 - ((Real.sqrt b) ^ 3 * horizontalScalarCurvature G.leafwise (R.curve (Real.sqrt b)) + Real.sqrt b * G.spacetime.horizontalMetric.inner (R.curve (Real.sqrt b)) (R.horizontal_velocity (Real.sqrt b)) (R.horizontal_velocity (Real.sqrt b)) / 4) + a * Real.sqrt a * (horizontalScalarCurvature G.leafwise (p.curve a) + G.spacetime.horizontalMetric.inner (p.curve a) (p.horizontal_velocity a) (p.horizontal_velocity a)) := by obtain ⟨E⟩ := exists_squareRoot_velocity_extension R have h := squareRoot_harnackIntegral_eq hM12 R E (by intro r hr W exact squareRootEulerResidual_eq_zero_of_minimizing hCoordinates hM12 hp E (Ioo_subset_Icc_self hr) W) rw [positiveStart_initial_harnackPrimitive R hstart hderiv] at h exact h end PoincareMT.M14