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.Surgery.StandardCap.Existence.Geometry.Curvature.NonnegativeRicciMetric |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Metric.CalibratedMetricComparison |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Curvature.Nonnegative |
| 4 | import PoincareLib.Geometry.RicciFlow.Positivity.PointwiseFlatness |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Fields.ConnectionScalar |
| 6 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Fields.FixedExtension |
| 7 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Identities.CurvatureAlgebra |
| 8 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Identities.CurvatureSymmetries |
| 9 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Tensors.RicciRegularity |
| 10 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Tensors.RiemannRegularity |
| 11 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Positivity.PointwiseFlatness |
| 12 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.RiemannianProper |
| 13 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.RiemannianProper |
| 14 | |
| 15 | /-! |
| 16 | # One fixed radius around all compactly located centers |
| 17 | |
| 18 | The actual nonnegative-curvature flow decreases distances from their |
| 19 | initial values. Compactness of the center set and the fixed region then |
| 20 | gives one radius containing the region at every included time. |
| 21 | Source: Morgan-Tian Theorem 12.29, pp. 324-325; |
| 22 | exterior-scalar-and-second-blowup.md, section 7. |
| 23 | -/ |
| 24 | |
| 25 | set_option autoImplicit false |
| 26 | |
| 27 | open Set |
| 28 | open scoped Manifold ContDiff Bundle ENNReal |
| 29 | |
| 30 | namespace PoincareMT.M34 |
| 31 | |
| 32 | /-- All actual cap-flow distances are bounded by their initial values, |
| 33 | including the initial endpoint (Theorem 12.29). -/ |
| 34 | theorem partialFlow_edist_le_initial {g0 : StandardInitialMetric} |
| 35 | (F : PartialStandardCapFlow g0) (P : RicciFlowCurvatureTheory.{0}) |
| 36 | (E0 : StandardCapEstimate g0) {t : ℝ} (ht : t ∈ Ico 0 F.lifetime) |
| 37 | (x y : StandardCapSpace) : (F.flow.metric t).edist x y ≤ g0.metric.edist x y := by |
| 38 | have hnorm (z : StandardCapSpace) (v : TangentSpace (𝓡 3) z) : |
| 39 | (F.flow.metric t).tangentNorm z v ≤ (1 : ℝ) * g0.metric.tangentNorm z v := by |
| 40 | have hmono := F.flow.inner_self_antitoneOn_of_nonnegative_ricci |
| 41 | (convex_Ico 0 F.lifetime) (Subset.refl _) z v (fun s hs => |
| 42 | M04.nonneg_ricci_of_nonnegativeSectionalAt (F.flow.connection s) z |
| 43 | (partialFlow_nonnegativeSectionalCurvature P E0 F s hs z) v) |
| 44 | have hi := hmono ⟨le_rfl, F.lifetime_pos⟩ ht ht.1 |
| 45 | dsimp only at hi |
| 46 | rw [F.initial_metric] at hi |
| 47 | change Real.sqrt ((F.flow.metric t).inner z v v) ≤ |
| 48 | 1 * Real.sqrt (g0.metric.inner z v v) |
| 49 | simpa only [one_mul] using Real.sqrt_le_sqrt hi |
| 50 | simpa only [ENNReal.ofReal_one, one_mul] using |
| 51 | edist_le_of_tangentNorm_le g0.metric (F.flow.metric t) zero_lt_one hnorm x y |
| 52 | |
| 53 | /-- One positive radius contains a fixed relatively compact region in |
| 54 | every evolving ball centered in a fixed compact set. It is selected |
| 55 | before the time and center, and does not require either set nonempty. -/ |
| 56 | theorem partialFlow_exists_compact_center_ball_radius {g0 : StandardInitialMetric} |
| 57 | (F : PartialStandardCapFlow g0) (P : RicciFlowCurvatureTheory.{0}) |
| 58 | (E0 : StandardCapEstimate g0) {X Omega : Set StandardCapSpace} |
| 59 | (hX : IsCompact X) (hOmega : IsCompact (closure Omega)) : |
| 60 | ∃ D : ℝ, 0 < D ∧ ∀ t ∈ Ico 0 F.lifetime, ∀ x ∈ X, |
| 61 | Omega ⊆ (F.flow.metric t).ball x D := by |
| 62 | let d := Proofs.M09.selectedMetricSpace g0.metric |
| 63 | have hcont : Continuous (fun z : StandardCapSpace × StandardCapSpace => d.dist z.1 z.2) := |
| 64 | @continuous_dist StandardCapSpace d.toPseudoMetricSpace |
| 65 | obtain ⟨C, hC⟩ := (hX.prod hOmega).exists_bound_of_continuousOn |
| 66 | hcont.continuousOn |
| 67 | let D := max C 0 + 1 |
| 68 | have hD : 0 < D := by dsimp [D]; positivity |
| 69 | have hCD : C < D := by dsimp [D]; linarith [le_max_left C 0] |
| 70 | refine ⟨D, hD, ?_⟩ |
| 71 | intro t ht x hx y hy |
| 72 | have hd : d.dist x y ≤ C := |
| 73 | (le_abs_self _).trans (hC (x, y) ⟨hx, subset_closure hy⟩) |
| 74 | apply (partialFlow_edist_le_initial F P E0 ht x y).trans_lt |
| 75 | have hed : g0.metric.edist x y = ENNReal.ofReal (d.dist x y) := |
| 76 | @edist_dist StandardCapSpace d.toPseudoMetricSpace x y |
| 77 | rw [hed] |
| 78 | exact (ENNReal.ofReal_lt_ofReal_iff hD).mpr (hd.trans_lt hCD) |
| 79 | |
| 80 | end PoincareMT.M34 |