import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.Distance.LengthVariation import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.Distance.RicciIntegral import PoincareLib.Geometry.Riemannian.Comparison.Laplacian.Distance import PoincareLib.Geometry.Riemannian.Comparison.Laplacian.FiniteDistance import PoincareLib.Geometry.Riemannian.ScalarOperators.Locality import PoincareLib.Geometry.Riemannian.Distance.CurveLength /-! # Spacetime distance supports with an additive time bound The fixed-time Calabi radial curves give upper bounds for distance in every metric. Their length derivatives are bounded by the localized Ricci integral estimate. See the reviewed source adaptation in `references/ricci-flow/chow-liao-qin-2026/length-variation-reuse.md`. -/ noncomputable section set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set Filter MeasureTheory Bundle open scoped Manifold ContDiff Topology ENNReal universe u namespace PoincareMT.RicciFlow attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace normedSpaceTangentSpaceVectorSpace variable {n : β„•} {M : Type u} [TopologicalSpace M] [T3Space M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] {J : Set ℝ} private lemma radial_parameter_open (w : EuclideanSpace ℝ (Fin n)) (R : ℝ) : IsOpen {s : ℝ | s β€’ w ∈ Metric.ball 0 R} := Metric.isOpen_ball.preimage (continuous_id.smul continuous_const) private lemma radial_parameter_contains {w : EuclideanSpace ℝ (Fin n)} {R : ℝ} (hw : w ∈ Metric.ball 0 R) : Icc (0 : ℝ) 1 βŠ† {s : ℝ | s β€’ w ∈ Metric.ball 0 R} := by intro s hs rw [mem_ofPred_eq, Metric.mem_ball, dist_zero_right, norm_smul, Real.norm_of_nonneg hs.1] exact (mul_le_of_le_one_left (norm_nonneg w) hs.2).trans_lt (by simpa only [Metric.mem_ball, dist_zero_right] using hw) private lemma hasDerivAt_radial_length (F : RicciFlow n M J) {t : ℝ} (ht : t ∈ interior J) {e : EuclideanSpace ℝ (Fin n) β†’ M} {R : ℝ} {w : EuclideanSpace ℝ (Fin n)} (hw : w ∈ Metric.ball 0 R) (hw0 : w β‰  0) (hgeo : (F.metric t).IsGeodesicOn (fun s : ℝ => e (s β€’ w)) {s : ℝ | s β€’ w ∈ Metric.ball 0 R}) (hspeed : βˆ€ s ∈ Icc (0 : ℝ) 1, (F.metric t).tangentNorm (e (s β€’ w)) (mfderiv π“˜(ℝ, ℝ) (𝓑 n) (fun u : ℝ => e (u β€’ w)) s 1) = β€–wβ€–) : HasDerivAt (fun s => ∫ u in (0 : ℝ)..1, (F.metric s).tangentNorm (e (u β€’ w)) (mfderiv π“˜(ℝ, ℝ) (𝓑 n) (fun a : ℝ => e (a β€’ w)) u 1)) (-(∫ u in (0 : ℝ)..1, (F.connection t).ricci (e (u β€’ w)) (mfderiv π“˜(ℝ, ℝ) (𝓑 n) (fun a : ℝ => e (a β€’ w)) u 1) (mfderiv π“˜(ℝ, ℝ) (𝓑 n) (fun a : ℝ => e (a β€’ w)) u 1) / β€–wβ€–)) t := by have h := F.hasDerivAt_integral_speed zero_le_one (radial_parameter_open w R) (radial_parameter_contains hw) (fun s hs => (Conjugate.Realization.contMDiffAt_of_isGeodesicOn hgeo hs).contMDiffWithinAt) ht (by intro s hs hzero have h := hspeed s hs rw [hzero, RiemannianMetric.tangentNorm, map_zero, Real.sqrt_zero] at h exact hw0 (norm_eq_zero.mp h.symm)) apply h.congr_deriv rw [← intervalIntegral.integral_neg] apply intervalIntegral.integral_congr intro s hs rw [uIcc_of_le zero_le_one] at hs dsimp only rw [hspeed s hs] exact neg_div _ _ theorem exists_calabi_radial_data_of_finite {m : β„•} {N : Type u} [TopologicalSpace N] [T3Space N] [ChartedSpace (EuclideanSpace ℝ (Fin (m + 1))) N] [IsManifold (𝓑 (m + 1)) ∞ N] (g : RiemannianMetric (m + 1) N) (D : LeviCivitaData g) (hm : 0 < m) (hc : MetricComplete g) (hRic : βˆ€ y : N, βˆ€ z : TangentSpace (𝓑 (m + 1)) y, 0 ≀ D.ricci y z z) (p x : N) {r : ℝ} (hx : x ∈ g.ball p r) (hpx : p β‰  x) (hfinite : g.edist p x β‰  ⊀) : βˆƒ (R : ℝ) (e : EuclideanSpace ℝ (Fin (m + 1)) β†’ N) (w v : EuclideanSpace ℝ (Fin (m + 1))) (B : OpenPartialHomeomorph (EuclideanSpace ℝ (Fin (m + 1))) N), (βˆ€ z ∈ Metric.ball 0 R, g.IsGeodesicOn (fun s : ℝ => e (s β€’ z)) {s : ℝ | s β€’ z ∈ Metric.ball 0 R}) ∧ (βˆ€ z ∈ Metric.ball 0 R, βˆ€ s ∈ Icc (0 : ℝ) 1, g.tangentNorm (e (s β€’ z)) (mfderiv π“˜(ℝ, ℝ) (𝓑 (m + 1)) (fun u : ℝ => e (u β€’ z)) s 1) = β€–zβ€–) ∧ w ∈ Metric.ball 0 R ∧ w β‰  0 ∧ e w = p ∧ v ∈ B.source ∧ B.source βŠ† Metric.ball 0 R ∧ EqOn e B B.source ∧ e v = x ∧ (βˆ€ y ∈ B.target, B.symm y β‰  0) ∧ ContMDiffOn (𝓑 (m + 1)) π“˜(ℝ, ℝ) ∞ (fun y => β€–B.symm yβ€–) B.target ∧ β€–wβ€– + β€–vβ€– = (g.edist p x).toReal ∧ (βˆ€ z ∈ ({w, v} : Set (EuclideanSpace ℝ (Fin (m + 1)))), g.edist (e 0) (e z) = ENNReal.ofReal β€–zβ€– ∧ βˆ€ s ∈ Icc (0 : ℝ) 1, e (s β€’ z) ∈ g.ball p r) ∧ g.inner x (D.gradient (fun y => β€–B.symm yβ€–) x) (D.gradient (fun y => β€–B.symm yβ€–) x) = 1 ∧ D.laplacian (fun y => β€–B.symm yβ€–) x ≀ 2 * (m : ℝ) / (g.edist p x).toReal := by have hdpos : 0 < (g.edist p x).toReal := by let : Bundle.RiemannianBundle (TangentSpace (𝓑 (m + 1)) : N β†’ Type _) := ⟨g.toRiemannianMetric⟩ let : EMetricSpace N := EMetricSpace.ofRiemannianMetric (𝓑 (m + 1)) N exact ENNReal.toReal_pos (edist_pos.mpr hpx).ne' hfinite let R := (g.edist p x).toReal + 1 have hR : 0 < R := by dsimp [R]; positivity obtain ⟨Ρ, hΞ΅, Ξ³, hΞ³, hΞ³0, hΞ³1, hmin⟩ := g.exists_minimizing_geodesic_of_metricComplete_of_finite hc hfinite obtain ⟨L, e, hL, he, he0, hed, hrad⟩ := g.exists_orthonormal_radial_exponential_of_metricComplete hc (Ξ³ (1 / 4)) hR have hgeo := fun z hz => (hrad z hz).1 have hspeed := fun z hz s hs => ((hrad z hz).2 s hs).1 obtain ⟨v, hv, hnorm, hxv, hsplit, hmatch⟩ := g.exists_quarter_shifted_radial_vector hΞ΅ hΞ³ hΞ³0 hΞ³1 hmin (by dsimp [R]; linarith) L e hL he0 hed hgeo have hv0 : v β‰  0 := norm_pos_iff.mp (by rw [hnorm]; positivity) have heorigin := he.contMDiffAt (Metric.isOpen_ball.mem_nhds (show (0 : EuclideanSpace ℝ (Fin (m + 1))) ∈ Metric.ball 0 R by simpa using hR)) have hmetric := g.pullbackCoefficients_zero_of_orthonormal (Ξ³ (1 / 4)) heorigin he0 hed hL have hinit := RiemannianMetric.isInvertible_mfderiv_zero_of_chart_derivative (heorigin.mdifferentiableAt (by simp)) he0 hed let w := (-1 / 3 : ℝ) β€’ v have hw : w ∈ Metric.ball 0 R := by rw [Metric.mem_ball, dist_zero_right] calc β€–wβ€– = (1 / 3 : ℝ) * β€–vβ€– := by dsimp [w]; rw [norm_smul]; norm_num _ ≀ β€–vβ€– := by nlinarith [norm_nonneg v] _ < R := by simpa only [Metric.mem_ball, dist_zero_right] using hv have hw0 : w β‰  0 := smul_ne_zero (by norm_num) hv0 have hback : e w = p := by have h := (hmatch (-1 / 3) (by norm_num)).self_of_nhds norm_num only [show (3 / 4 : ℝ) * (-1 / 3) + 1 / 4 = 0 by ring] at h simpa only [w, neg_div] using h.trans hΞ³0 have hminback : g.edist (e ((-1 / 3 : ℝ) β€’ v)) (e v) = ENNReal.ofReal ((4 / 3 : ℝ) * β€–vβ€–) := by rw [show e ((-1 / 3 : ℝ) β€’ v) = p from hback, hxv, hnorm, show (4 / 3 : ℝ) * ((3 / 4) * (g.edist p x).toReal) = (g.edist p x).toReal by ring, ENNReal.ofReal_toReal hfinite] have hend := g.isInvertible_mfderiv_of_minimizing_backward_extension D he hinit hgeo hspeed hv hv0 hminback have htailmin : g.edist (Ξ³ (1 / 4)) (e v) = ENNReal.ofReal β€–vβ€– := by have h := hmin (1 / 4) (by norm_num) 1 (by norm_num) rw [hΞ³1] at h rw [hxv, h, hnorm, show |(1 / 4 : ℝ) - 1| = 3 / 4 by norm_num, ENNReal.ofReal_mul (by norm_num : (0 : ℝ) ≀ 3 / 4), ENNReal.ofReal_toReal hfinite] have hquarter_finite : g.edist p (Ξ³ (1 / 4)) β‰  ⊀ := by rw [← hΞ³0, hmin 0 (by norm_num) (1 / 4) (by norm_num)] exact ENNReal.mul_ne_top ENNReal.ofReal_ne_top hfinite have hi := g.isInvertible_mfderiv_on_minimizing_segment D he he0 hinit hgeo hspeed hv hv0 htailmin hend obtain ⟨B, hvB, hBU, heB, hB, hBi, hzero, hBnorm⟩ := RiemannianMetric.exists_smooth_radial_inverse_branch Metric.isOpen_ball he hv hv0 hend have hgauss := g.radial_gauss_identity D he hmetric hgeo have hgrad : g.inner x (D.gradient (fun y => β€–B.symm yβ€–) x) (D.gradient (fun y => β€–B.symm yβ€–) x) = 1 := by rw [← hxv] exact g.inner_gradient_inverse_branch D B heB hB hBi hvB hv0 (hgauss v hv) let ΞΈ := β€–v‖⁻¹ β€’ v have hn : 0 < β€–vβ€– := norm_pos_iff.mpr hv0 have hΞΈ : β€–ΞΈβ€– = 1 := by rw [norm_smul, Real.norm_of_nonneg (inv_nonneg.mpr hn.le), inv_mul_cancelβ‚€ hn.ne'] have hnormΞΈ (s : ℝ) (hs : 0 ≀ s) : β€–s β€’ ΞΈβ€– = s := by rw [norm_smul, Real.norm_of_nonneg hs, hΞΈ, mul_one] have hRv : β€–vβ€– < R := by simpa only [Metric.mem_ball, dist_zero_right] using hv have hsub : βˆ€ s ∈ Icc 0 β€–vβ€–, s β€’ ΞΈ ∈ Metric.ball 0 R := by intro s hs rw [Metric.mem_ball, dist_zero_right, hnormΞΈ s hs.1] exact hs.2.trans_lt hRv have hi' : βˆ€ s ∈ Icc 0 β€–vβ€–, (mfderiv (𝓑 (m + 1)) (𝓑 (m + 1)) e (s β€’ ΞΈ)).IsInvertible := by intro s hs have hst : s / β€–vβ€– ∈ Icc (0 : ℝ) 1 := ⟨div_nonneg hs.1 hn.le, (div_le_one hn).mpr hs.2⟩ rw [show s β€’ ΞΈ = (s / β€–vβ€–) β€’ v by simp only [ΞΈ, smul_smul, div_eq_mul_inv]] exact hi (s / β€–vβ€–) hst obtain ⟨b, hnb, hbsub, hbi⟩ := RiemannianMetric.exists_regular_radial_extension Metric.isOpen_ball he ΞΈ hn.le hsub hi' have htΞΈ : β€–vβ€– β€’ ΞΈ = v := by dsimp only [ΞΈ] rw [smul_smul, mul_inv_cancelβ‚€ hn.ne', one_smul] have hgaussNear : βˆ€αΆ  y in 𝓝 (β€–vβ€– β€’ ΞΈ), βˆ€ z, g.inner (e y) (mfderiv (𝓑 (m + 1)) (𝓑 (m + 1)) e y y) (mfderiv (𝓑 (m + 1)) (𝓑 (m + 1)) e y z) = inner ℝ y z := by rw [htΞΈ] filter_upwards [Metric.isOpen_ball.mem_nhds hv] with y hy exact hgauss y hy have hlap := g.laplacian_inverse_branch_le_of_ricci D hm Metric.isOpen_ball (by simpa using hn.trans hRv) he hgeo hmetric ΞΈ hΞΈ (hn.trans hnb) ⟨hn, hnb⟩ (k := 0) le_rfl hbsub (fun s hs => (hbi s hs).injective) (fun s _ z => by simpa using hRic (e (s β€’ ΞΈ)) z) B heB hB hBi (by simpa only [htΞΈ] using hvB) hgaussNear rw [htΞΈ, hxv] at hlap have hwlen : β€–wβ€– = (g.edist p (Ξ³ (1 / 4))).toReal := by dsimp only [w] rw [norm_smul] norm_num only [Real.norm_eq_abs, abs_div, abs_neg, abs_one, abs_of_pos (by norm_num : (0 : ℝ) < 3)] linarith have hcurveball : βˆ€ s ∈ Icc (0 : ℝ) 1, Ξ³ s ∈ g.ball p r := by intro s hs change g.edist p (Ξ³ s) < ENNReal.ofReal r rw [← hΞ³0, hmin 0 (by norm_num) s hs, zero_sub, abs_neg, abs_of_nonneg hs.1] exact (mul_le_of_le_one_left (zero_le : (0 : ℝβ‰₯0∞) ≀ g.edist p x) (by simpa only [ENNReal.ofReal_le_one] using hs.2)).trans_lt hx refine ⟨R, e, w, v, B, hgeo, hspeed, hw, hw0, hback, hvB, hBU, heB, hxv, hzero, hBnorm, by rw [hwlen]; exact hsplit, ?_, hgrad, ?_⟩ Β· intro z hz rcases hz with hz | hz Β· subst z refine ⟨?_, ?_⟩ Β· rw [he0, hback, hwlen] have hcomm : g.edist p (Ξ³ (1 / 4)) = g.edist (Ξ³ (1 / 4)) p := by let : Bundle.RiemannianBundle (TangentSpace (𝓑 (m + 1)) : N β†’ Type _) := ⟨g.toRiemannianMetric⟩ exact Manifold.riemannianEDist_comm rw [hcomm] have hquarter_finite' := hquarter_finite rw [hcomm] at hquarter_finite' exact (ENNReal.ofReal_toReal hquarter_finite').symm Β· intro s hs have h := (hmatch (-s / 3) ⟨by linarith [hs.2], by linarith [hs.1]⟩).self_of_nhds dsimp only at h rw [show s β€’ w = (-s / 3) β€’ v by dsimp [w]; rw [smul_smul]; congr 1; ring, h] exact hcurveball _ ⟨by linarith [hs.2], by linarith [hs.1]⟩ Β· have hz' : z = v := mem_singleton_iff.mp hz subst z refine ⟨by rw [he0]; exact htailmin, ?_⟩ intro s hs have h := (hmatch s ⟨by linarith [hs.1], hs.2⟩).self_of_nhds dsimp only at h rw [h] exact hcurveball _ ⟨by linarith [hs.1], by linarith [hs.2]⟩ Β· have hhalf : (g.edist p x).toReal / 2 ≀ β€–vβ€– := by rw [hnorm]; linarith simpa using hlap.trans (RiemannianMetric.radius_comparison_of_half_le (k := 0) (Nat.cast_nonneg m) hdpos hhalf) /-- A Calabi upper support for evolving distance, with the time derivative controlled by a Ricci upper bound on the selected time's ball. -/ theorem exists_distance_spacetime_upper_support {m : β„•} {N : Type u} [TopologicalSpace N] [T3Space N] [ConnectedSpace N] [ChartedSpace (EuclideanSpace ℝ (Fin (m + 1))) N] [IsManifold (𝓑 (m + 1)) ∞ N] {J : Set ℝ} (F : RicciFlow (m + 1) N J) {t r Ξ› scale : ℝ} (ht : t ∈ interior J) (hm : 0 < m) (hcomplete : MetricComplete (F.metric t)) (hRic : βˆ€ y : N, βˆ€ v : TangentSpace (𝓑 (m + 1)) y, 0 ≀ (F.connection t).ricci y v v) (hΞ› : 0 ≀ Ξ›) (hscale : 0 < scale) (p x : N) (hx : x ∈ (F.metric t).ball p r) (hpx : p β‰  x) (hupper : βˆ€ y ∈ (F.metric t).ball p r, βˆ€ v : TangentSpace (𝓑 (m + 1)) y, (F.connection t).ricci y v v ≀ Ξ› * (F.metric t).inner y v v) : βˆƒ (U : Set N) (rho : ℝ β†’ N β†’ ℝ), IsOpen U ∧ x ∈ U ∧ ContMDiffOn (𝓑 (m + 1)) π“˜(ℝ, ℝ) ∞ (rho t) U ∧ rho t x = ((F.metric t).edist p x).toReal ∧ (βˆ€ s : ℝ, βˆ€ y ∈ U, ((F.metric s).edist p y).toReal ≀ rho s y) ∧ (F.metric t).inner x ((F.connection t).gradient (rho t) x) ((F.connection t).gradient (rho t) x) = 1 ∧ (F.connection t).laplacian (rho t) x ≀ 2 * (m : ℝ) / ((F.metric t).edist p x).toReal ∧ DifferentiableAt ℝ (fun s => rho s x) t ∧ -(4 * ((m + 1 : β„•) : ℝ) * scale + 8 * Ξ› / scale) ≀ deriv (fun s => rho s x) t := by obtain ⟨R, e, w, v, B, hgeo, hspeed, hw, hw0, hwp, hvB, hBU, heB, hvx, hzero, hBnorm, hsum, hsegments, hgrad, hlap⟩ := exists_calabi_radial_data_of_finite (F.metric t) (F.connection t) hm hcomplete hRic p x hx hpx ((F.metric t).edist_ne_top p x) have hxB : x ∈ B.target := by rw [← hvx, heB hvB]; exact B.map_source hvB have hinvx : B.symm x = v := by rw [← hvx, heB hvB, B.left_inv hvB] have hv0 : v β‰  0 := by simpa only [hinvx] using hzero x hxB have hv : v ∈ Metric.ball 0 R := hBU hvB let len : ℝ β†’ EuclideanSpace ℝ (Fin (m + 1)) β†’ ℝ := fun s z => ∫ u in (0 : ℝ)..1, (F.metric s).tangentNorm (e (u β€’ z)) (mfderiv π“˜(ℝ, ℝ) (𝓑 (m + 1)) (fun a : ℝ => e (a β€’ z)) u 1) let rho : ℝ β†’ N β†’ ℝ := fun s y => len s w + len s (B.symm y) have hlen (z : EuclideanSpace ℝ (Fin (m + 1))) (hz : z ∈ Metric.ball 0 R) : len t z = β€–zβ€– := by calc len t z = ∫ _u in (0 : ℝ)..1, β€–zβ€– := by apply intervalIntegral.integral_congr intro u hu exact hspeed z hz u (by simpa only [uIcc_of_le zero_le_one] using hu) _ = β€–zβ€– := by simp have hsliceeq : EqOn (rho t) (fun y => β€–wβ€– + β€–B.symm yβ€–) B.target := by intro y hy dsimp only [rho] rw [hlen w hw, hlen (B.symm y) (hBU (B.map_target hy))] have hslicegerm : rho t =αΆ [𝓝 x] (fun y => β€–wβ€– + β€–B.symm yβ€–) := hsliceeq.eventuallyEq_of_mem (B.open_target.mem_nhds hxB) have htime (z : EuclideanSpace ℝ (Fin (m + 1))) (hz : z ∈ Metric.ball 0 R) (hz0 : z β‰  0) : HasDerivAt (fun s => len s z) (-(∫ u in (0 : ℝ)..1, (F.connection t).ricci (e (u β€’ z)) (mfderiv π“˜(ℝ, ℝ) (𝓑 (m + 1)) (fun a : ℝ => e (a β€’ z)) u 1) (mfderiv π“˜(ℝ, ℝ) (𝓑 (m + 1)) (fun a : ℝ => e (a β€’ z)) u 1) / β€–zβ€–)) t := hasDerivAt_radial_length F ht hz hz0 (hgeo z hz) (hspeed z hz) have htimeLower (z : EuclideanSpace ℝ (Fin (m + 1))) (hz : z ∈ Metric.ball 0 R) (hz0 : z β‰  0) (hzseg : z ∈ ({w, v} : Set _)) : -(2 * ((m + 1 : β„•) : ℝ) * scale + 4 * Ξ› / scale) ≀ deriv (fun s => len s z) t := by rw [(htime z hz hz0).deriv] apply neg_le_neg apply (F.connection t).integral_ricci_div_speed_le_of_minimizing (radial_parameter_open z R) (radial_parameter_contains hz) (hgeo z hz) zero_le_one (norm_pos_iff.mpr hz0) (hspeed z hz) (by simpa only [zero_smul, one_smul, one_mul] using (hsegments z hzseg).1) hΞ› hscale intro u hu have h := hupper (e (u β€’ z)) ((hsegments z hzseg).2 u hu) (mfderiv π“˜(ℝ, ℝ) (𝓑 (m + 1)) (fun a : ℝ => e (a β€’ z)) u 1) have hsq : (F.metric t).inner (e (u β€’ z)) (mfderiv π“˜(ℝ, ℝ) (𝓑 (m + 1)) (fun a : ℝ => e (a β€’ z)) u 1) (mfderiv π“˜(ℝ, ℝ) (𝓑 (m + 1)) (fun a : ℝ => e (a β€’ z)) u 1) = β€–zβ€– ^ 2 := by have hh := congrArg (fun c : ℝ => c ^ 2) (hspeed z hz u hu) dsimp only [RiemannianMetric.tangentNorm] at hh rw [Real.sq_sqrt] at hh Β· exact hh Β· by_cases hzv : mfderiv π“˜(ℝ, ℝ) (𝓑 (m + 1)) (fun a : ℝ => e (a β€’ z)) u 1 = 0 Β· simp [hzv] Β· exact ((F.metric t).pos _ _ hzv).le rwa [hsq] at h have hrad : ContMDiffAt (𝓑 (m + 1)) π“˜(ℝ, ℝ) ∞ (fun y => β€–B.symm yβ€–) x := hBnorm.contMDiffAt (B.open_target.mem_nhds hxB) refine ⟨B.target, rho, B.open_target, hxB, (contMDiffOn_const.add hBnorm).congr hsliceeq, ?_, ?_, ?_, ?_, ?_, ?_⟩ Β· rw [hsliceeq hxB] dsimp only rw [hinvx] exact hsum Β· intro s y hy have hdist (z : EuclideanSpace ℝ (Fin (m + 1))) (hz : z ∈ Metric.ball 0 R) : ((F.metric s).edist (e 0) (e z)).toReal ≀ len s z := by have h := (F.metric s).toReal_edist_le_integral_speed zero_le_one (radial_parameter_open z R) (radial_parameter_contains hz) (fun u hu => (Conjugate.Realization.contMDiffAt_of_isGeodesicOn (hgeo z hz) hu).contMDiffWithinAt) simpa only [zero_smul, one_smul] using h have hfirst := hdist w hw have hsecond := hdist (B.symm y) (hBU (B.map_target hy)) rw [hwp] at hfirst rw [heB (B.map_target hy), B.right_inv hy] at hsecond have hcomm : (F.metric s).edist (e 0) p = (F.metric s).edist p (e 0) := by let : Bundle.RiemannianBundle (TangentSpace (𝓑 (m + 1)) : N β†’ Type _) := ⟨(F.metric s).toRiemannianMetric⟩ exact Manifold.riemannianEDist_comm rw [hcomm] at hfirst exact ((F.metric s).toReal_edist_triangle p (e 0) y).trans (add_le_add hfirst hsecond) Β· have hgerm : (F.connection t).gradient (rho t) x = (F.connection t).gradient (fun y => β€–wβ€– + β€–B.symm yβ€–) x := by unfold LeviCivitaData.gradient rw [Poincare.mvfderiv_eq_of_eventuallyEq hslicegerm] rw [hgerm, (F.connection t).gradient_const_add_at (hrad.mdifferentiableAt (by simp))] exact hgrad Β· rw [(F.connection t).laplacian_eq_of_eventuallyEq hslicegerm, (F.connection t).laplacian_const_add_at hrad] exact hlap Β· dsimp only [rho] rw [hinvx] exact (htime w hw hw0).differentiableAt.add (htime v hv hv0).differentiableAt Β· dsimp only [rho] rw [hinvx, deriv_fun_add (htime w hw hw0).differentiableAt (htime v hv hv0).differentiableAt] have hwlo := htimeLower w hw hw0 (by simp) have hvlo := htimeLower v hv hv0 (by simp) have htwice : -(4 * ((m + 1 : β„•) : ℝ) * scale + 8 * Ξ› / scale) = -(2 * ((m + 1 : β„•) : ℝ) * scale + 4 * Ξ› / scale) + -(2 * ((m + 1 : β„•) : ℝ) * scale + 4 * Ξ› / scale) := by ring rw [htwice] exact add_le_add hwlo hvlo end PoincareMT.RicciFlow