Poincaré conjecture: the Lean proof, cleaned up together
The 2026 Lean proof of the Poincaré conjecture after Morgan and Tian, 3 million lines, cleaned up together: smaller, faster to build, more readable, the theorems unchanged

| 1 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.Distance.LengthVariation |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.Distance.RicciIntegral |
| 3 | import PoincareLib.Geometry.Riemannian.Comparison.Laplacian.Distance |
| 4 | import PoincareLib.Geometry.Riemannian.Comparison.Laplacian.FiniteDistance |
| 5 | import PoincareLib.Geometry.Riemannian.ScalarOperators.Locality |
| 6 | import PoincareLib.Geometry.Riemannian.Distance.CurveLength |
| 7 | |
| 8 | /-! # Spacetime distance supports with an additive time bound |
| 9 | |
| 10 | The fixed-time Calabi radial curves give upper bounds for distance in every |
| 11 | metric. Their length derivatives are bounded by the localized Ricci integral |
| 12 | estimate. See the reviewed source adaptation in |
| 13 | `references/ricci-flow/chow-liao-qin-2026/length-variation-reuse.md`. |
| 14 | -/ |
| 15 | |
| 16 | noncomputable section |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter MeasureTheory Bundle |
| 21 | open scoped Manifold ContDiff Topology ENNReal |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.RicciFlow |
| 26 | |
| 27 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 28 | normedSpaceTangentSpaceVectorSpace |
| 29 | |
| 30 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] [T3Space M] |
| 31 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 32 | {J : Set ℝ} |
| 33 | |
| 34 | private lemma radial_parameter_open (w : EuclideanSpace ℝ (Fin n)) (R : ℝ) : |
| 35 | IsOpen {s : ℝ | s • w ∈ Metric.ball 0 R} := |
| 36 | Metric.isOpen_ball.preimage (continuous_id.smul continuous_const) |
| 37 | |
| 38 | private lemma radial_parameter_contains {w : EuclideanSpace ℝ (Fin n)} {R : ℝ} |
| 39 | (hw : w ∈ Metric.ball 0 R) : |
| 40 | Icc (0 : ℝ) 1 ⊆ {s : ℝ | s • w ∈ Metric.ball 0 R} := by |
| 41 | intro s hs |
| 42 | rw [mem_ofPred_eq, Metric.mem_ball, dist_zero_right, norm_smul, |
| 43 | Real.norm_of_nonneg hs.1] |
| 44 | exact (mul_le_of_le_one_left (norm_nonneg w) hs.2).trans_lt |
| 45 | (by simpa only [Metric.mem_ball, dist_zero_right] using hw) |
| 46 | |
| 47 | private lemma hasDerivAt_radial_length |
| 48 | (F : RicciFlow n M J) {t : ℝ} (ht : t ∈ interior J) |
| 49 | {e : EuclideanSpace ℝ (Fin n) → M} {R : ℝ} |
| 50 | {w : EuclideanSpace ℝ (Fin n)} (hw : w ∈ Metric.ball 0 R) (hw0 : w ≠ 0) |
| 51 | (hgeo : (F.metric t).IsGeodesicOn (fun s : ℝ => e (s • w)) |
| 52 | {s : ℝ | s • w ∈ Metric.ball 0 R}) |
| 53 | (hspeed : ∀ s ∈ Icc (0 : ℝ) 1, |
| 54 | (F.metric t).tangentNorm (e (s • w)) |
| 55 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 n) (fun u : ℝ => e (u • w)) s 1) = ‖w‖) : |
| 56 | HasDerivAt (fun s => ∫ u in (0 : ℝ)..1, |
| 57 | (F.metric s).tangentNorm (e (u • w)) |
| 58 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 n) (fun a : ℝ => e (a • w)) u 1)) |
| 59 | (-(∫ u in (0 : ℝ)..1, (F.connection t).ricci (e (u • w)) |
| 60 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 n) (fun a : ℝ => e (a • w)) u 1) |
| 61 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 n) (fun a : ℝ => e (a • w)) u 1) / ‖w‖)) t := by |
| 62 | have h := F.hasDerivAt_integral_speed zero_le_one (radial_parameter_open w R) |
| 63 | (radial_parameter_contains hw) |
| 64 | (fun s hs => (Conjugate.Realization.contMDiffAt_of_isGeodesicOn |
| 65 | hgeo hs).contMDiffWithinAt) ht (by |
| 66 | intro s hs hzero |
| 67 | have h := hspeed s hs |
| 68 | rw [hzero, RiemannianMetric.tangentNorm, map_zero, Real.sqrt_zero] at h |
| 69 | exact hw0 (norm_eq_zero.mp h.symm)) |
| 70 | apply h.congr_deriv |
| 71 | rw [← intervalIntegral.integral_neg] |
| 72 | apply intervalIntegral.integral_congr |
| 73 | intro s hs |
| 74 | rw [uIcc_of_le zero_le_one] at hs |
| 75 | dsimp only |
| 76 | rw [hspeed s hs] |
| 77 | exact neg_div _ _ |
| 78 | |
| 79 | theorem exists_calabi_radial_data_of_finite |
| 80 | {m : ℕ} {N : Type u} [TopologicalSpace N] [T3Space N] |
| 81 | [ChartedSpace (EuclideanSpace ℝ (Fin (m + 1))) N] |
| 82 | [IsManifold (𝓡 (m + 1)) ∞ N] |
| 83 | (g : RiemannianMetric (m + 1) N) (D : LeviCivitaData g) |
| 84 | (hm : 0 < m) (hc : MetricComplete g) |
| 85 | (hRic : ∀ y : N, ∀ z : TangentSpace (𝓡 (m + 1)) y, 0 ≤ D.ricci y z z) |
| 86 | (p x : N) {r : ℝ} (hx : x ∈ g.ball p r) (hpx : p ≠ x) |
| 87 | (hfinite : g.edist p x ≠ ⊤) : |
| 88 | ∃ (R : ℝ) (e : EuclideanSpace ℝ (Fin (m + 1)) → N) |
| 89 | (w v : EuclideanSpace ℝ (Fin (m + 1))) |
| 90 | (B : OpenPartialHomeomorph (EuclideanSpace ℝ (Fin (m + 1))) N), |
| 91 | (∀ z ∈ Metric.ball 0 R, g.IsGeodesicOn (fun s : ℝ => e (s • z)) |
| 92 | {s : ℝ | s • z ∈ Metric.ball 0 R}) ∧ |
| 93 | (∀ z ∈ Metric.ball 0 R, ∀ s ∈ Icc (0 : ℝ) 1, |
| 94 | g.tangentNorm (e (s • z)) |
| 95 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 (m + 1)) (fun u : ℝ => e (u • z)) s 1) = ‖z‖) ∧ |
| 96 | w ∈ Metric.ball 0 R ∧ w ≠ 0 ∧ e w = p ∧ |
| 97 | v ∈ B.source ∧ B.source ⊆ Metric.ball 0 R ∧ EqOn e B B.source ∧ e v = x ∧ |
| 98 | (∀ y ∈ B.target, B.symm y ≠ 0) ∧ |
| 99 | ContMDiffOn (𝓡 (m + 1)) 𝓘(ℝ, ℝ) ∞ (fun y => ‖B.symm y‖) B.target ∧ |
| 100 | ‖w‖ + ‖v‖ = (g.edist p x).toReal ∧ |
| 101 | (∀ z ∈ ({w, v} : Set (EuclideanSpace ℝ (Fin (m + 1)))), |
| 102 | g.edist (e 0) (e z) = ENNReal.ofReal ‖z‖ ∧ |
| 103 | ∀ s ∈ Icc (0 : ℝ) 1, e (s • z) ∈ g.ball p r) ∧ |
| 104 | g.inner x (D.gradient (fun y => ‖B.symm y‖) x) |
| 105 | (D.gradient (fun y => ‖B.symm y‖) x) = 1 ∧ |
| 106 | D.laplacian (fun y => ‖B.symm y‖) x ≤ 2 * (m : ℝ) / (g.edist p x).toReal := by |
| 107 | have hdpos : 0 < (g.edist p x).toReal := by |
| 108 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 (m + 1)) : N → Type _) := |
| 109 | ⟨g.toRiemannianMetric⟩ |
| 110 | let : EMetricSpace N := EMetricSpace.ofRiemannianMetric (𝓡 (m + 1)) N |
| 111 | exact ENNReal.toReal_pos (edist_pos.mpr hpx).ne' hfinite |
| 112 | let R := (g.edist p x).toReal + 1 |
| 113 | have hR : 0 < R := by dsimp [R]; positivity |
| 114 | obtain ⟨ε, hε, γ, hγ, hγ0, hγ1, hmin⟩ := |
| 115 | g.exists_minimizing_geodesic_of_metricComplete_of_finite hc hfinite |
| 116 | obtain ⟨L, e, hL, he, he0, hed, hrad⟩ := |
| 117 | g.exists_orthonormal_radial_exponential_of_metricComplete hc (γ (1 / 4)) hR |
| 118 | have hgeo := fun z hz => (hrad z hz).1 |
| 119 | have hspeed := fun z hz s hs => ((hrad z hz).2 s hs).1 |
| 120 | obtain ⟨v, hv, hnorm, hxv, hsplit, hmatch⟩ := g.exists_quarter_shifted_radial_vector |
| 121 | hε hγ hγ0 hγ1 hmin (by dsimp [R]; linarith) L e hL he0 hed hgeo |
| 122 | have hv0 : v ≠ 0 := norm_pos_iff.mp (by rw [hnorm]; positivity) |
| 123 | have heorigin := he.contMDiffAt (Metric.isOpen_ball.mem_nhds |
| 124 | (show (0 : EuclideanSpace ℝ (Fin (m + 1))) ∈ Metric.ball 0 R by simpa using hR)) |
| 125 | have hmetric := g.pullbackCoefficients_zero_of_orthonormal (γ (1 / 4)) heorigin he0 hed hL |
| 126 | have hinit := RiemannianMetric.isInvertible_mfderiv_zero_of_chart_derivative |
| 127 | (heorigin.mdifferentiableAt (by simp)) he0 hed |
| 128 | let w := (-1 / 3 : ℝ) • v |
| 129 | have hw : w ∈ Metric.ball 0 R := by |
| 130 | rw [Metric.mem_ball, dist_zero_right] |
| 131 | calc |
| 132 | ‖w‖ = (1 / 3 : ℝ) * ‖v‖ := by dsimp [w]; rw [norm_smul]; norm_num |
| 133 | _ ≤ ‖v‖ := by nlinarith [norm_nonneg v] |
| 134 | _ < R := by simpa only [Metric.mem_ball, dist_zero_right] using hv |
| 135 | have hw0 : w ≠ 0 := smul_ne_zero (by norm_num) hv0 |
| 136 | have hback : e w = p := by |
| 137 | have h := (hmatch (-1 / 3) (by norm_num)).self_of_nhds |
| 138 | norm_num only [show (3 / 4 : ℝ) * (-1 / 3) + 1 / 4 = 0 by ring] at h |
| 139 | simpa only [w, neg_div] using h.trans hγ0 |
| 140 | have hminback : g.edist (e ((-1 / 3 : ℝ) • v)) (e v) = |
| 141 | ENNReal.ofReal ((4 / 3 : ℝ) * ‖v‖) := by |
| 142 | rw [show e ((-1 / 3 : ℝ) • v) = p from hback, hxv, hnorm, |
| 143 | show (4 / 3 : ℝ) * ((3 / 4) * (g.edist p x).toReal) = (g.edist p x).toReal by ring, |
| 144 | ENNReal.ofReal_toReal hfinite] |
| 145 | have hend := g.isInvertible_mfderiv_of_minimizing_backward_extension |
| 146 | D he hinit hgeo hspeed hv hv0 hminback |
| 147 | have htailmin : g.edist (γ (1 / 4)) (e v) = ENNReal.ofReal ‖v‖ := by |
| 148 | have h := hmin (1 / 4) (by norm_num) 1 (by norm_num) |
| 149 | rw [hγ1] at h |
| 150 | rw [hxv, h, hnorm, show |(1 / 4 : ℝ) - 1| = 3 / 4 by norm_num, |
| 151 | ENNReal.ofReal_mul (by norm_num : (0 : ℝ) ≤ 3 / 4), |
| 152 | ENNReal.ofReal_toReal hfinite] |
| 153 | have hquarter_finite : g.edist p (γ (1 / 4)) ≠ ⊤ := by |
| 154 | rw [← hγ0, hmin 0 (by norm_num) (1 / 4) (by norm_num)] |
| 155 | exact ENNReal.mul_ne_top ENNReal.ofReal_ne_top hfinite |
| 156 | have hi := g.isInvertible_mfderiv_on_minimizing_segment D he he0 hinit |
| 157 | hgeo hspeed hv hv0 htailmin hend |
| 158 | obtain ⟨B, hvB, hBU, heB, hB, hBi, hzero, hBnorm⟩ := |
| 159 | RiemannianMetric.exists_smooth_radial_inverse_branch Metric.isOpen_ball he hv hv0 hend |
| 160 | have hgauss := g.radial_gauss_identity D he hmetric hgeo |
| 161 | have hgrad : g.inner x (D.gradient (fun y => ‖B.symm y‖) x) |
| 162 | (D.gradient (fun y => ‖B.symm y‖) x) = 1 := by |
| 163 | rw [← hxv] |
| 164 | exact g.inner_gradient_inverse_branch D B heB hB hBi hvB hv0 (hgauss v hv) |
| 165 | let θ := ‖v‖⁻¹ • v |
| 166 | have hn : 0 < ‖v‖ := norm_pos_iff.mpr hv0 |
| 167 | have hθ : ‖θ‖ = 1 := by |
| 168 | rw [norm_smul, Real.norm_of_nonneg (inv_nonneg.mpr hn.le), inv_mul_cancel₀ hn.ne'] |
| 169 | have hnormθ (s : ℝ) (hs : 0 ≤ s) : ‖s • θ‖ = s := by |
| 170 | rw [norm_smul, Real.norm_of_nonneg hs, hθ, mul_one] |
| 171 | have hRv : ‖v‖ < R := by simpa only [Metric.mem_ball, dist_zero_right] using hv |
| 172 | have hsub : ∀ s ∈ Icc 0 ‖v‖, s • θ ∈ Metric.ball 0 R := by |
| 173 | intro s hs |
| 174 | rw [Metric.mem_ball, dist_zero_right, hnormθ s hs.1] |
| 175 | exact hs.2.trans_lt hRv |
| 176 | have hi' : ∀ s ∈ Icc 0 ‖v‖, |
| 177 | (mfderiv (𝓡 (m + 1)) (𝓡 (m + 1)) e (s • θ)).IsInvertible := by |
| 178 | intro s hs |
| 179 | have hst : s / ‖v‖ ∈ Icc (0 : ℝ) 1 := |
| 180 | ⟨div_nonneg hs.1 hn.le, (div_le_one hn).mpr hs.2⟩ |
| 181 | rw [show s • θ = (s / ‖v‖) • v by simp only [θ, smul_smul, div_eq_mul_inv]] |
| 182 | exact hi (s / ‖v‖) hst |
| 183 | obtain ⟨b, hnb, hbsub, hbi⟩ := RiemannianMetric.exists_regular_radial_extension |
| 184 | Metric.isOpen_ball he θ hn.le hsub hi' |
| 185 | have htθ : ‖v‖ • θ = v := by |
| 186 | dsimp only [θ] |
| 187 | rw [smul_smul, mul_inv_cancel₀ hn.ne', one_smul] |
| 188 | have hgaussNear : ∀ᶠ y in 𝓝 (‖v‖ • θ), ∀ z, |
| 189 | g.inner (e y) (mfderiv (𝓡 (m + 1)) (𝓡 (m + 1)) e y y) |
| 190 | (mfderiv (𝓡 (m + 1)) (𝓡 (m + 1)) e y z) = inner ℝ y z := by |
| 191 | rw [htθ] |
| 192 | filter_upwards [Metric.isOpen_ball.mem_nhds hv] with y hy |
| 193 | exact hgauss y hy |
| 194 | have hlap := g.laplacian_inverse_branch_le_of_ricci D hm Metric.isOpen_ball |
| 195 | (by simpa using hn.trans hRv) he hgeo hmetric θ hθ (hn.trans hnb) |
| 196 | ⟨hn, hnb⟩ (k := 0) le_rfl hbsub (fun s hs => (hbi s hs).injective) |
| 197 | (fun s _ z => by simpa using hRic (e (s • θ)) z) B heB hB hBi |
| 198 | (by simpa only [htθ] using hvB) hgaussNear |
| 199 | rw [htθ, hxv] at hlap |
| 200 | have hwlen : ‖w‖ = (g.edist p (γ (1 / 4))).toReal := by |
| 201 | dsimp only [w] |
| 202 | rw [norm_smul] |
| 203 | norm_num only [Real.norm_eq_abs, abs_div, abs_neg, abs_one, abs_of_pos (by norm_num : (0 : ℝ) < 3)] |
| 204 | linarith |
| 205 | have hcurveball : ∀ s ∈ Icc (0 : ℝ) 1, γ s ∈ g.ball p r := by |
| 206 | intro s hs |
| 207 | change g.edist p (γ s) < ENNReal.ofReal r |
| 208 | rw [← hγ0, hmin 0 (by norm_num) s hs, zero_sub, abs_neg, abs_of_nonneg hs.1] |
| 209 | exact (mul_le_of_le_one_left (zero_le : (0 : ℝ≥0∞) ≤ g.edist p x) |
| 210 | (by simpa only [ENNReal.ofReal_le_one] using hs.2)).trans_lt hx |
| 211 | refine ⟨R, e, w, v, B, hgeo, hspeed, hw, hw0, hback, hvB, hBU, heB, hxv, |
| 212 | hzero, hBnorm, by rw [hwlen]; exact hsplit, ?_, hgrad, ?_⟩ |
| 213 | · intro z hz |
| 214 | rcases hz with hz | hz |
| 215 | · subst z |
| 216 | refine ⟨?_, ?_⟩ |
| 217 | · rw [he0, hback, hwlen] |
| 218 | have hcomm : g.edist p (γ (1 / 4)) = g.edist (γ (1 / 4)) p := by |
| 219 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 (m + 1)) : N → Type _) := |
| 220 | ⟨g.toRiemannianMetric⟩ |
| 221 | exact Manifold.riemannianEDist_comm |
| 222 | rw [hcomm] |
| 223 | have hquarter_finite' := hquarter_finite |
| 224 | rw [hcomm] at hquarter_finite' |
| 225 | exact (ENNReal.ofReal_toReal hquarter_finite').symm |
| 226 | · intro s hs |
| 227 | have h := (hmatch (-s / 3) ⟨by linarith [hs.2], by linarith [hs.1]⟩).self_of_nhds |
| 228 | dsimp only at h |
| 229 | rw [show s • w = (-s / 3) • v by dsimp [w]; rw [smul_smul]; congr 1; ring, h] |
| 230 | exact hcurveball _ ⟨by linarith [hs.2], by linarith [hs.1]⟩ |
| 231 | · have hz' : z = v := mem_singleton_iff.mp hz |
| 232 | subst z |
| 233 | refine ⟨by rw [he0]; exact htailmin, ?_⟩ |
| 234 | intro s hs |
| 235 | have h := (hmatch s ⟨by linarith [hs.1], hs.2⟩).self_of_nhds |
| 236 | dsimp only at h |
| 237 | rw [h] |
| 238 | exact hcurveball _ ⟨by linarith [hs.1], by linarith [hs.2]⟩ |
| 239 | · have hhalf : (g.edist p x).toReal / 2 ≤ ‖v‖ := by rw [hnorm]; linarith |
| 240 | simpa using hlap.trans |
| 241 | (RiemannianMetric.radius_comparison_of_half_le (k := 0) (Nat.cast_nonneg m) hdpos hhalf) |
| 242 | |
| 243 | /-- A Calabi upper support for evolving distance, with the time derivative |
| 244 | controlled by a Ricci upper bound on the selected time's ball. -/ |
| 245 | theorem exists_distance_spacetime_upper_support |
| 246 | {m : ℕ} {N : Type u} [TopologicalSpace N] [T3Space N] [ConnectedSpace N] |
| 247 | [ChartedSpace (EuclideanSpace ℝ (Fin (m + 1))) N] |
| 248 | [IsManifold (𝓡 (m + 1)) ∞ N] |
| 249 | {J : Set ℝ} (F : RicciFlow (m + 1) N J) |
| 250 | {t r Λ scale : ℝ} (ht : t ∈ interior J) (hm : 0 < m) |
| 251 | (hcomplete : MetricComplete (F.metric t)) |
| 252 | (hRic : ∀ y : N, ∀ v : TangentSpace (𝓡 (m + 1)) y, |
| 253 | 0 ≤ (F.connection t).ricci y v v) |
| 254 | (hΛ : 0 ≤ Λ) (hscale : 0 < scale) (p x : N) |
| 255 | (hx : x ∈ (F.metric t).ball p r) (hpx : p ≠ x) |
| 256 | (hupper : ∀ y ∈ (F.metric t).ball p r, |
| 257 | ∀ v : TangentSpace (𝓡 (m + 1)) y, |
| 258 | (F.connection t).ricci y v v ≤ Λ * (F.metric t).inner y v v) : |
| 259 | ∃ (U : Set N) (rho : ℝ → N → ℝ), IsOpen U ∧ x ∈ U ∧ |
| 260 | ContMDiffOn (𝓡 (m + 1)) 𝓘(ℝ, ℝ) ∞ (rho t) U ∧ |
| 261 | rho t x = ((F.metric t).edist p x).toReal ∧ |
| 262 | (∀ s : ℝ, ∀ y ∈ U, ((F.metric s).edist p y).toReal ≤ rho s y) ∧ |
| 263 | (F.metric t).inner x ((F.connection t).gradient (rho t) x) |
| 264 | ((F.connection t).gradient (rho t) x) = 1 ∧ |
| 265 | (F.connection t).laplacian (rho t) x ≤ |
| 266 | 2 * (m : ℝ) / ((F.metric t).edist p x).toReal ∧ |
| 267 | DifferentiableAt ℝ (fun s => rho s x) t ∧ |
| 268 | -(4 * ((m + 1 : ℕ) : ℝ) * scale + 8 * Λ / scale) ≤ |
| 269 | deriv (fun s => rho s x) t := by |
| 270 | obtain ⟨R, e, w, v, B, hgeo, hspeed, hw, hw0, hwp, hvB, hBU, heB, hvx, |
| 271 | hzero, hBnorm, hsum, hsegments, hgrad, hlap⟩ := |
| 272 | exists_calabi_radial_data_of_finite (F.metric t) (F.connection t) hm hcomplete hRic |
| 273 | p x hx hpx ((F.metric t).edist_ne_top p x) |
| 274 | have hxB : x ∈ B.target := by rw [← hvx, heB hvB]; exact B.map_source hvB |
| 275 | have hinvx : B.symm x = v := by rw [← hvx, heB hvB, B.left_inv hvB] |
| 276 | have hv0 : v ≠ 0 := by simpa only [hinvx] using hzero x hxB |
| 277 | have hv : v ∈ Metric.ball 0 R := hBU hvB |
| 278 | let len : ℝ → EuclideanSpace ℝ (Fin (m + 1)) → ℝ := fun s z => |
| 279 | ∫ u in (0 : ℝ)..1, (F.metric s).tangentNorm (e (u • z)) |
| 280 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 (m + 1)) (fun a : ℝ => e (a • z)) u 1) |
| 281 | let rho : ℝ → N → ℝ := fun s y => len s w + len s (B.symm y) |
| 282 | have hlen (z : EuclideanSpace ℝ (Fin (m + 1))) (hz : z ∈ Metric.ball 0 R) : |
| 283 | len t z = ‖z‖ := by |
| 284 | calc |
| 285 | len t z = ∫ _u in (0 : ℝ)..1, ‖z‖ := by |
| 286 | apply intervalIntegral.integral_congr |
| 287 | intro u hu |
| 288 | exact hspeed z hz u (by simpa only [uIcc_of_le zero_le_one] using hu) |
| 289 | _ = ‖z‖ := by simp |
| 290 | have hsliceeq : EqOn (rho t) (fun y => ‖w‖ + ‖B.symm y‖) B.target := by |
| 291 | intro y hy |
| 292 | dsimp only [rho] |
| 293 | rw [hlen w hw, hlen (B.symm y) (hBU (B.map_target hy))] |
| 294 | have hslicegerm : rho t =ᶠ[𝓝 x] (fun y => ‖w‖ + ‖B.symm y‖) := |
| 295 | hsliceeq.eventuallyEq_of_mem (B.open_target.mem_nhds hxB) |
| 296 | have htime (z : EuclideanSpace ℝ (Fin (m + 1))) (hz : z ∈ Metric.ball 0 R) |
| 297 | (hz0 : z ≠ 0) : |
| 298 | HasDerivAt (fun s => len s z) |
| 299 | (-(∫ u in (0 : ℝ)..1, (F.connection t).ricci (e (u • z)) |
| 300 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 (m + 1)) (fun a : ℝ => e (a • z)) u 1) |
| 301 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 (m + 1)) (fun a : ℝ => e (a • z)) u 1) / ‖z‖)) t := |
| 302 | hasDerivAt_radial_length F ht hz hz0 (hgeo z hz) (hspeed z hz) |
| 303 | have htimeLower (z : EuclideanSpace ℝ (Fin (m + 1))) |
| 304 | (hz : z ∈ Metric.ball 0 R) (hz0 : z ≠ 0) (hzseg : z ∈ ({w, v} : Set _)) : |
| 305 | -(2 * ((m + 1 : ℕ) : ℝ) * scale + 4 * Λ / scale) ≤ |
| 306 | deriv (fun s => len s z) t := by |
| 307 | rw [(htime z hz hz0).deriv] |
| 308 | apply neg_le_neg |
| 309 | apply (F.connection t).integral_ricci_div_speed_le_of_minimizing |
| 310 | (radial_parameter_open z R) (radial_parameter_contains hz) (hgeo z hz) |
| 311 | zero_le_one (norm_pos_iff.mpr hz0) (hspeed z hz) |
| 312 | (by simpa only [zero_smul, one_smul, one_mul] using (hsegments z hzseg).1) hΛ hscale |
| 313 | intro u hu |
| 314 | have h := hupper (e (u • z)) ((hsegments z hzseg).2 u hu) |
| 315 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 (m + 1)) (fun a : ℝ => e (a • z)) u 1) |
| 316 | have hsq : (F.metric t).inner (e (u • z)) |
| 317 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 (m + 1)) (fun a : ℝ => e (a • z)) u 1) |
| 318 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 (m + 1)) (fun a : ℝ => e (a • z)) u 1) = ‖z‖ ^ 2 := by |
| 319 | have hh := congrArg (fun c : ℝ => c ^ 2) (hspeed z hz u hu) |
| 320 | dsimp only [RiemannianMetric.tangentNorm] at hh |
| 321 | rw [Real.sq_sqrt] at hh |
| 322 | · exact hh |
| 323 | · by_cases hzv : mfderiv 𝓘(ℝ, ℝ) (𝓡 (m + 1)) (fun a : ℝ => e (a • z)) u 1 = 0 |
| 324 | · simp [hzv] |
| 325 | · exact ((F.metric t).pos _ _ hzv).le |
| 326 | rwa [hsq] at h |
| 327 | have hrad : ContMDiffAt (𝓡 (m + 1)) 𝓘(ℝ, ℝ) ∞ |
| 328 | (fun y => ‖B.symm y‖) x := hBnorm.contMDiffAt (B.open_target.mem_nhds hxB) |
| 329 | refine ⟨B.target, rho, B.open_target, hxB, |
| 330 | (contMDiffOn_const.add hBnorm).congr hsliceeq, ?_, ?_, ?_, ?_, ?_, ?_⟩ |
| 331 | · rw [hsliceeq hxB] |
| 332 | dsimp only |
| 333 | rw [hinvx] |
| 334 | exact hsum |
| 335 | · intro s y hy |
| 336 | have hdist (z : EuclideanSpace ℝ (Fin (m + 1))) (hz : z ∈ Metric.ball 0 R) : |
| 337 | ((F.metric s).edist (e 0) (e z)).toReal ≤ len s z := by |
| 338 | have h := (F.metric s).toReal_edist_le_integral_speed zero_le_one |
| 339 | (radial_parameter_open z R) (radial_parameter_contains hz) |
| 340 | (fun u hu => (Conjugate.Realization.contMDiffAt_of_isGeodesicOn (hgeo z hz) hu).contMDiffWithinAt) |
| 341 | simpa only [zero_smul, one_smul] using h |
| 342 | have hfirst := hdist w hw |
| 343 | have hsecond := hdist (B.symm y) (hBU (B.map_target hy)) |
| 344 | rw [hwp] at hfirst |
| 345 | rw [heB (B.map_target hy), B.right_inv hy] at hsecond |
| 346 | have hcomm : (F.metric s).edist (e 0) p = (F.metric s).edist p (e 0) := by |
| 347 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 (m + 1)) : N → Type _) := |
| 348 | ⟨(F.metric s).toRiemannianMetric⟩ |
| 349 | exact Manifold.riemannianEDist_comm |
| 350 | rw [hcomm] at hfirst |
| 351 | exact ((F.metric s).toReal_edist_triangle p (e 0) y).trans (add_le_add hfirst hsecond) |
| 352 | · have hgerm : (F.connection t).gradient (rho t) x = |
| 353 | (F.connection t).gradient (fun y => ‖w‖ + ‖B.symm y‖) x := by |
| 354 | unfold LeviCivitaData.gradient |
| 355 | rw [Poincare.mvfderiv_eq_of_eventuallyEq hslicegerm] |
| 356 | rw [hgerm, (F.connection t).gradient_const_add_at (hrad.mdifferentiableAt (by simp))] |
| 357 | exact hgrad |
| 358 | · rw [(F.connection t).laplacian_eq_of_eventuallyEq hslicegerm, |
| 359 | (F.connection t).laplacian_const_add_at hrad] |
| 360 | exact hlap |
| 361 | · dsimp only [rho] |
| 362 | rw [hinvx] |
| 363 | exact (htime w hw hw0).differentiableAt.add (htime v hv hv0).differentiableAt |
| 364 | · dsimp only [rho] |
| 365 | rw [hinvx, deriv_fun_add (htime w hw hw0).differentiableAt |
| 366 | (htime v hv hv0).differentiableAt] |
| 367 | have hwlo := htimeLower w hw hw0 (by simp) |
| 368 | have hvlo := htimeLower v hv hv0 (by simp) |
| 369 | have htwice : -(4 * ((m + 1 : ℕ) : ℝ) * scale + 8 * Λ / scale) = |
| 370 | -(2 * ((m + 1 : ℕ) : ℝ) * scale + 4 * Λ / scale) + |
| 371 | -(2 * ((m + 1 : ℕ) : ℝ) * scale + 4 * Λ / scale) := by ring |
| 372 | rw [htwice] |
| 373 | exact add_le_add hwlo hvlo |
| 374 | |
| 375 | end PoincareMT.RicciFlow |