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.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.Neck.Geometry.FullNeckMetricRealization |
| 3 | |
| 4 | /-! |
| 5 | # One actual target metric near the cap-end accumulation point |
| 6 | |
| 7 | Morgan-Tian Theorem 12.28, pp. 323-324. A normalized metric in an |
| 8 | ambient chart has a genuine smooth positive Euclidean realization on |
| 9 | one open neighborhood of the image accumulation point. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | set_option maxSynthPendingDepth 5 |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.RiemannianMetric |
| 22 | |
| 23 | /-- Theorem 12.28: realize the actual normalized ambient chart |
| 24 | metric on an open neighborhood, before choosing the late neck centers. -/ |
| 25 | theorem exists_normalized_chart_realization |
| 26 | {M : Type u} [TopologicalSpace M] |
| 27 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 28 | (g : RiemannianMetric 3 M) (Q : ℝ) (hQ : 0 < Q) (c : M) : |
| 29 | ∃ (gB : RiemannianMetric 3 (EuclideanSpace ℝ (Fin 3))) |
| 30 | (V : Set (EuclideanSpace ℝ (Fin 3))), |
| 31 | IsOpen V ∧ extChartAt (𝓡 3) c c ∈ V ∧ V ⊆ (extChartAt (𝓡 3) c).target ∧ |
| 32 | ∀ y ∈ V, gB.euclideanCoefficients y = |
| 33 | Q • g.pullbackCoefficients (extChartAt (𝓡 3) c).symm y := by |
| 34 | let phi := (extChartAt (𝓡 3) c).symm |
| 35 | have hregular (y : EuclideanSpace ℝ (Fin 3)) |
| 36 | (hy : y ∈ (extChartAt (𝓡 3) c).target) : |
| 37 | ContMDiffAt (𝓡 3) (𝓡 3) ∞ phi y := |
| 38 | (contMDiffOn_extChartAt_symm (n := ∞) c).contMDiffAt |
| 39 | ((isOpen_extChartAt_target (I := 𝓡 3) c).mem_nhds hy) |
| 40 | have hinvertible (y : EuclideanSpace ℝ (Fin 3)) |
| 41 | (hy : y ∈ (extChartAt (𝓡 3) c).target) : |
| 42 | (mfderiv (𝓡 3) (𝓡 3) phi y).IsInvertible := by |
| 43 | have h := isInvertible_mfderivWithin_extChartAt_symm hy |
| 44 | simpa only [ModelWithCorners.range_eq_univ, mfderivWithin_univ] using h |
| 45 | obtain ⟨gB, _D, V, hV, hcV, hVU, hmetric⟩ := RiemannianMetric.exists_local_realization |
| 46 | (isOpen_extChartAt_target (I := 𝓡 3) c) (mem_extChartAt_target c) |
| 47 | (fun y => Q • g.pullbackCoefficients phi y) |
| 48 | (fun y hy => |
| 49 | ((g.contDiffAt_pullbackCoefficients (hregular y hy)).const_smul Q).contDiffWithinAt) |
| 50 | (fun y _ v w => congrArg (fun a : ℝ => Q * a) (g.symm (phi y) _ _)) |
| 51 | (fun y hy v hv => mul_pos hQ (g.pos (phi y) _ (fun hz => hv |
| 52 | ((hinvertible y hy).injective |
| 53 | (hz.trans (map_zero (mfderiv (𝓡 3) (𝓡 3) phi y)).symm))))) |
| 54 | exact ⟨gB, V, hV, hcV, hVU, hmetric⟩ |
| 55 | |
| 56 | end PoincareMT.RiemannianMetric |