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.Coordinates |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.GeometricLimit.Overlap.Metric |
| 3 | |
| 4 | /-! # Joint smoothness of canonical chart metrics -/ |
| 5 | |
| 6 | set_option autoImplicit false |
| 7 | set_option backward.isDefEq.respectTransparency false |
| 8 | open Set Filter Poincare.Gluing Bundle |
| 9 | open scoped Manifold ContDiff Topology Bundle |
| 10 | |
| 11 | namespace PoincareMT.ChartDistance |
| 12 | |
| 13 | theorem canonicalMetric_isSmoothFamilyOn_of_coefficients |
| 14 | {ι : Type*} {n : ℕ} |
| 15 | (U : ι → Set (EuclideanSpace ℝ (Fin n))) (hU : ∀ i, IsOpen (U i)) |
| 16 | [∀ i, Nonempty (Piece U i)] (i : ι) |
| 17 | (g : ℝ → CanonicalMetric U hU i) {J : Set ℝ} |
| 18 | (B : ℝ × EuclideanSpace ℝ (Fin n) → |
| 19 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 20 | (hB : ContDiffOn ℝ ∞ B (J ×ˢ U i)) |
| 21 | (hcoeff : |
| 22 | letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 23 | letI := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 n) (n := ∞) |
| 24 | ∀ t ∈ J, ∀ (x : Piece U i) v w, (g t).inner x v w = B (t, x) v w) : |
| 25 | letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 26 | letI := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 n) (n := ∞) |
| 27 | RiemannianMetric.IsSmoothFamilyOn g J := by |
| 28 | let := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 29 | let := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 n) (n := ∞) |
| 30 | apply RiemannianMetric.isSmoothFamilyOn_of_constant_chart (fun _ _ => rfl) g |
| 31 | (fun p => B (p.1, p.2)) ?_ hcoeff |
| 32 | have hv := contMDiff_isOpenEmbedding (I := 𝓡 n) (n := ∞) |
| 33 | (hU i).isOpenEmbedding_subtypeVal |
| 34 | have hmap : ContMDiff (𝓘(ℝ, ℝ).prod (𝓡 n)) 𝓘(ℝ, ℝ × EuclideanSpace ℝ (Fin n)) ∞ |
| 35 | (fun p : ℝ × Piece U i => (p.1, (p.2 : EuclideanSpace ℝ (Fin n)))) := |
| 36 | contMDiff_fst.prodMk_space (hv.comp contMDiff_snd) |
| 37 | exact hB.contMDiffOn.comp hmap.contMDiffOn (fun p hp => ⟨hp.1, p.2.property⟩) |
| 38 | |
| 39 | end PoincareMT.ChartDistance |