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.MetricFamily.Descent |
| 2 | import PoincareLib.Geometry.Riemannian.Metric.Gluing.Construction |
| 3 | |
| 4 | /-! # Joint smoothness of quotient metric families -/ |
| 5 | |
| 6 | set_option autoImplicit false |
| 7 | set_option backward.isDefEq.respectTransparency false |
| 8 | open Set Filter Topology Bundle PoincareMT |
| 9 | open scoped Manifold ContDiff |
| 10 | noncomputable section |
| 11 | namespace Poincare.Gluing |
| 12 | variable {n : ℕ} |
| 13 | |
| 14 | variable {A : Type*} (U : A → Set (EuclideanSpace ℝ (Fin n))) |
| 15 | (hU : ∀ i, IsOpen (U i)) [∀ i, Nonempty (Piece U i)] |
| 16 | |
| 17 | /-- The original quotient metric construction preserves joint smoothness of |
| 18 | compatible canonical chart metric families, within any time set. -/ |
| 19 | theorem quotientMetric_isSmoothFamilyOn |
| 20 | (O : OverlapSystem (fun i => Piece U i)) (hs : SmoothOverlap U hU O) |
| 21 | (g : ∀ i, ℝ → CanonicalMetric U hU i) {J : Set ℝ} |
| 22 | (hg : ∀ i, |
| 23 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 24 | (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 25 | letI : IsManifold (𝓡 n) ∞ (Piece U i) := |
| 26 | (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 27 | RiemannianMetric.IsSmoothFamilyOn (g i) J) |
| 28 | (hcompat : ∀ t, CompatibleMetrics U hU O (fun i => g i t)) : |
| 29 | letI := quotientChartedSpace U hU O |
| 30 | letI := quotient_isManifold U hU O hs |
| 31 | RiemannianMetric.IsSmoothFamilyOn |
| 32 | (fun t => quotientMetric U hU O hs (fun i => g i t) (hcompat t)) J := by |
| 33 | let : ∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 34 | fun i => (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 35 | let : ∀ i, IsManifold (𝓡 n) ∞ (Piece U i) := |
| 36 | fun i => (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 37 | let := quotientChartedSpace U hU O |
| 38 | let := quotient_isManifold U hU O hs |
| 39 | refine isSmoothFamilyOn_of_local_diffeomorphisms g _ hg O.include |
| 40 | (include_isLocalDiffeomorph U hU O hs) ?_ ?_ |
| 41 | · intro y |
| 42 | have hy : y ∈ ⋃ i, Set.range (O.include i) := by rw [O.include_cover]; trivial |
| 43 | simpa only [mem_iUnion, mem_range] using hy |
| 44 | · intro t _ i |
| 45 | exact quotientMetric_preserves U hU O hs (fun i => g i t) (hcompat t) i |
| 46 | |
| 47 | end Poincare.Gluing |