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.Compactness.Coordinates.SpacetimeBounds.SpatialRicci |
| 2 | import PoincareLib.Geometry.Riemannian.Metric.LocalExtension |
| 3 | import PoincareLib.Geometry.Riemannian.Curvature.LocalIsometryRicci |
| 4 | import PoincareLib.Geometry.Riemannian.Coordinates.Exponential.JetBounds.CurvatureNaturality |
| 5 | |
| 6 | /-! |
| 7 | # Spatial Ricci estimates in manifold charts |
| 8 | |
| 9 | A local realization transfers the Euclidean Ricci coefficient estimate to an |
| 10 | arbitrary fixed manifold chart. Only the germ is extended, and no estimate on |
| 11 | the extension outside the chart is used. |
| 12 | |
| 13 | Reference: Morgan--Tian, Proposition 5.14, pp. 90--91. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | set_option maxSynthPendingDepth 8 |
| 19 | set_option maxHeartbeats 800000 |
| 20 | |
| 21 | open Set Filter |
| 22 | open scoped Manifold ContDiff Topology Bundle |
| 23 | |
| 24 | namespace PoincareMT.LeviCivitaData |
| 25 | |
| 26 | open CoordinateExponential |
| 27 | |
| 28 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 29 | normedSpaceTangentSpaceVectorSpace |
| 30 | |
| 31 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 32 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 33 | {g : RiemannianMetric n M} |
| 34 | |
| 35 | /-- The spatial Ricci coefficient derivative grows at most linearly in the |
| 36 | first spatial derivative of the actual pullback metric. -/ |
| 37 | theorem norm_fderiv_pullback_ricci_le (D : LeviCivitaData g) |
| 38 | (hM04 : RicciFlowCurvatureTheory.{0}) |
| 39 | {U : Set (EuclideanSpace ℝ (Fin n))} (hU : IsOpen U) |
| 40 | {e : EuclideanSpace ℝ (Fin n) → M} |
| 41 | (he : ContMDiffOn (𝓡 n) (𝓡 n) ∞ e U) |
| 42 | (hi : ∀ y ∈ U, (mfderiv (𝓡 n) (𝓡 n) e y).IsInvertible) |
| 43 | {x : EuclideanSpace ℝ (Fin n)} (hx : x ∈ U) |
| 44 | {a b K L : ℝ} (ha : 0 < a) (hb : 0 ≤ b) (hK : 0 ≤ K) (hL : 0 ≤ L) |
| 45 | (hlower : ∀ w, a * ‖w‖ ^ 2 ≤ g.pullbackCoefficients e x w w) |
| 46 | (hupper : ∀ w, g.pullbackCoefficients e x w w ≤ b * ‖w‖ ^ 2) |
| 47 | (hcurv : D.curvatureDerivativeNorm 0 (e x) ≤ K) |
| 48 | (hcurv' : D.curvatureDerivativeNorm 1 (e x) ≤ L) |
| 49 | (u v : EuclideanSpace ℝ (Fin n)) : |
| 50 | ‖fderiv ℝ (fun y => D.ricci (e y) |
| 51 | (mfderiv (𝓡 n) (𝓡 n) e y u) (mfderiv (𝓡 n) (𝓡 n) e y v)) x‖ ≤ |
| 52 | ((n : ℝ) * L * (Real.sqrt b) ^ 3 + |
| 53 | (3 * (n : ℝ) * K * b / a) * ‖fderiv ℝ (g.pullbackCoefficients e) x‖) * |
| 54 | ‖u‖ * ‖v‖ := by |
| 55 | have hcoeff : ContDiffOn ℝ ∞ (g.pullbackCoefficients e) U := fun y hy => |
| 56 | (g.contDiffAt_pullbackCoefficients (he.contMDiffAt (hU.mem_nhds hy))).contDiffWithinAt |
| 57 | obtain ⟨gE, DE, V, hV, hxV, hVU, heq⟩ := RiemannianMetric.exists_local_realization |
| 58 | hU hx (g.pullbackCoefficients e) hcoeff (fun y _ u v => g.symm (e y) _ _) |
| 59 | (fun y hy w hw => by |
| 60 | apply g.pos (e y) |
| 61 | intro hz |
| 62 | apply hw |
| 63 | apply (hi y hy).injective |
| 64 | rw [map_zero] |
| 65 | convert! hz using 1) |
| 66 | have hmetric (y : EuclideanSpace ℝ (Fin n)) (hy : y ∈ V) (u v) : |
| 67 | gE.inner y u v = g.inner (e y) |
| 68 | (mfderiv (𝓡 n) (𝓡 n) e y u) (mfderiv (𝓡 n) (𝓡 n) e y v) := |
| 69 | congrArg (fun B => B u v) (heq y hy) |
| 70 | have hB : gE.euclideanCoefficients =ᶠ[𝓝 x] g.pullbackCoefficients e := by |
| 71 | filter_upwards [hV.mem_nhds hxV] with y hy |
| 72 | exact heq y hy |
| 73 | have hRic : (fun y => DE.ricci y u v) =ᶠ[𝓝 x] |
| 74 | (fun y => D.ricci (e y) (mfderiv (𝓡 n) (𝓡 n) e y u) |
| 75 | (mfderiv (𝓡 n) (𝓡 n) e y v)) := by |
| 76 | filter_upwards [hV.mem_nhds hxV] with y hy |
| 77 | exact DE.ricci_eq_of_local_isometry D hV (he.mono hVU) hmetric hy u v |
| 78 | have hnorm (w : EuclideanSpace ℝ (Fin n)) : gE.tangentNorm x w ≤ Real.sqrt b * ‖w‖ := by |
| 79 | have h := Real.sqrt_le_sqrt (hupper w) |
| 80 | rw [Real.sqrt_mul hb, Real.sqrt_sq (norm_nonneg w)] at h |
| 81 | change Real.sqrt (gE.euclideanCoefficients x w w) ≤ _ |
| 82 | rw [heq x hxV] |
| 83 | exact h |
| 84 | have hell (w : EuclideanSpace ℝ (Fin n)) : a * ‖w‖ ^ 2 ≤ gE.euclideanCoefficients x w w := by |
| 85 | rw [heq x hxV] |
| 86 | exact hlower w |
| 87 | have hcurvE (m : ℕ) : DE.curvatureDerivativeNorm m x = D.curvatureDerivativeNorm m (e x) := |
| 88 | DE.curvatureDerivativeNorm_eq_pullback D hV (he.mono hVU) |
| 89 | (fun y hy => hi y (hVU hy)) hmetric m hxV |
| 90 | have hbound := DE.norm_fderiv_ricci_le |
| 91 | (hM04.tensor_calculus n (EuclideanSpace ℝ (Fin n)) gE DE) x u v |
| 92 | (Real.sqrt_nonneg b) (by positivity : 0 ≤ (3 / (2 * a)) * ‖fderiv ℝ gE.euclideanCoefficients x‖) |
| 93 | hK hL hnorm (norm_christoffelBilinear_le_of_ellipticity _ x ha hell) |
| 94 | (by rw [hcurvE]; exact hcurv) (by rw [hcurvE]; exact hcurv') |
| 95 | rw [hRic.fderiv_eq, hB.fderiv_eq, Real.sq_sqrt hb] at hbound |
| 96 | convert hbound using 1 |
| 97 | ring |
| 98 | |
| 99 | end PoincareMT.LeviCivitaData |