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.Construction.Basic.DoubleTopology |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Analysis.Basic.OpenSubsetTransitionSmooth |
| 3 | import PoincareLib.Geometry.Manifold.Gluing.Smooth |
| 4 | import PoincareLib.Geometry.Manifold.LocalDiffeomorph |
| 5 | |
| 6 | /-! |
| 7 | # The smooth manifold structure of the compact double |
| 8 | |
| 9 | Morgan-Tian Theorem 12.5, p. 297. The actual reflection transition is |
| 10 | smooth in the inclusion charts of the open truncations. M07's gluing |
| 11 | construction gives the quotient its Euclidean three-dimensional charts |
| 12 | and makes the two inclusions local diffeomorphisms. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set Topology Poincare.Gluing |
| 18 | open scoped Manifold ContDiff |
| 19 | |
| 20 | namespace PoincareMT.M34 |
| 21 | |
| 22 | variable {g : RiemannianMetric 3 StandardCapSpace} |
| 23 | |
| 24 | /-- Each open cap piece has the singleton chart given by inclusion in R3 |
| 25 | (Theorem 12.5 compact-double construction, p. 297). -/ |
| 26 | noncomputable abbrev endDoublePieceChartedSpace (e : StandardCylindricalEnd g) |
| 27 | {L : ℝ} (hL : 1 < L) : ChartedSpace StandardCapSpace (EndDoublePiece e L) := by |
| 28 | let := endDoublePiece_nonempty e hL |
| 29 | have hU := endTruncation_isOpen e (show 0 ≤ L + 1 by linarith) |
| 30 | exact hU.isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 31 | |
| 32 | /-- The inclusion chart makes each piece a smooth manifold |
| 33 | (Theorem 12.5 compact-double construction, p. 297). -/ |
| 34 | theorem endDoublePiece_isManifold (e : StandardCylindricalEnd g) |
| 35 | {L : ℝ} (hL : 1 < L) : |
| 36 | let := endDoublePieceChartedSpace e hL |
| 37 | IsManifold (𝓡 3) ∞ (EndDoublePiece e L) := by |
| 38 | let := endDoublePiece_nonempty e hL |
| 39 | have hU := endTruncation_isOpen e (show 0 ≤ L + 1 by linarith) |
| 40 | exact hU.isOpenEmbedding_subtypeVal.isManifold_singleton |
| 41 | |
| 42 | /-- The cap-piece inclusion is a local diffeomorphism for its actual chart |
| 43 | (Theorem 12.5 compact-double construction, p. 297). -/ |
| 44 | theorem endDoublePiece_subtypeVal_isLocalDiffeomorph (e : StandardCylindricalEnd g) |
| 45 | {L : ℝ} (hL : 1 < L) : |
| 46 | let := endDoublePieceChartedSpace e hL |
| 47 | IsLocalDiffeomorph (𝓡 3) (𝓡 3) ∞ (Subtype.val : EndDoublePiece e L → StandardCapSpace) := by |
| 48 | let := endDoublePiece_nonempty e hL |
| 49 | exact Poincare.isLocalDiffeomorph_subtypeVal (𝓡 3) _ |
| 50 | (endTruncation_isOpen e (show 0 ≤ L + 1 by linarith)) ∞ |
| 51 | |
| 52 | /-- The restricted reflection is smooth on its exact overlap source |
| 53 | (Theorem 12.5 compact-double construction, p. 297). -/ |
| 54 | theorem endDoubleTransition_contMDiffOn (e : StandardCylindricalEnd g) |
| 55 | {L : ℝ} (hL : 1 < L) : |
| 56 | let := endDoublePieceChartedSpace e hL |
| 57 | ContMDiffOn (𝓡 3) (𝓡 3) ∞ (endDoubleTransition e hL) |
| 58 | (endDoubleTransition e hL).source := by |
| 59 | let := endDoublePiece_nonempty e hL |
| 60 | exact OpenPartialHomeomorph.contMDiffOn_onOpenSubset (𝓡 3) |
| 61 | (endDoubleCollarHomeomorph e hL) |
| 62 | (endTruncation_isOpen e (show 0 ≤ L + 1 by linarith)) |
| 63 | (endAxialReflection_collar_contMDiffOn e hL) (endDoubleCollar_subset_truncation e hL) |
| 64 | |
| 65 | /-- All four transitions are smooth in the canonical inclusion charts |
| 66 | (Theorem 12.5 compact-double construction, p. 297). -/ |
| 67 | theorem endDoubleOverlap_smooth (e : StandardCylindricalEnd g) |
| 68 | {L : ℝ} (hL : 1 < L) : |
| 69 | let := endDoublePiece_nonempty e hL |
| 70 | SmoothOverlap (fun _ : Bool => endTruncation e (L + 1)) |
| 71 | (fun _ => endTruncation_isOpen e (show 0 ≤ L + 1 by linarith)) |
| 72 | (endDoubleOverlap e hL) := by |
| 73 | let := endDoublePiece_nonempty e hL |
| 74 | let := endDoublePieceChartedSpace e hL |
| 75 | dsimp only |
| 76 | intro i j |
| 77 | by_cases hij : i = j |
| 78 | · subst j |
| 79 | rw [(endDoubleOverlap e hL).self] |
| 80 | exact contMDiff_id.contMDiffOn |
| 81 | · rw [show (endDoubleOverlap e hL).transition i j = endDoubleTransition e hL from |
| 82 | twoPieceOverlap_transition_ne _ _ hij] |
| 83 | exact endDoubleTransition_contMDiffOn e hL |
| 84 | |
| 85 | /-- The quotient receives the two inclusion charts constructed by gluing |
| 86 | (Theorem 12.5 compact-double construction, p. 297). -/ |
| 87 | noncomputable instance endDouble_chartedSpace (e : StandardCylindricalEnd g) |
| 88 | {L : ℝ} (hL : 1 < L) : ChartedSpace StandardCapSpace (EndDouble e hL) := by |
| 89 | let := endDoublePiece_nonempty e hL |
| 90 | exact quotientChartedSpace (fun _ : Bool => endTruncation e (L + 1)) |
| 91 | (fun _ => endTruncation_isOpen e (show 0 ≤ L + 1 by linarith)) (endDoubleOverlap e hL) |
| 92 | |
| 93 | /-- The compact double is a smooth three-dimensional manifold |
| 94 | (Theorem 12.5 compact-double construction, p. 297). -/ |
| 95 | instance endDouble_isManifold (e : StandardCylindricalEnd g) |
| 96 | {L : ℝ} (hL : 1 < L) : IsManifold (𝓡 3) ∞ (EndDouble e hL) := by |
| 97 | let := endDoublePiece_nonempty e hL |
| 98 | exact quotient_isManifold (fun _ : Bool => endTruncation e (L + 1)) |
| 99 | (fun _ => endTruncation_isOpen e (show 0 ≤ L + 1 by linarith)) |
| 100 | (endDoubleOverlap e hL) (endDoubleOverlap_smooth e hL) |
| 101 | |
| 102 | /-- A point in either piece supplies a point of the double |
| 103 | (Theorem 12.5 compact-double construction, p. 297). -/ |
| 104 | instance endDouble_nonempty (e : StandardCylindricalEnd g) |
| 105 | {L : ℝ} (hL : 1 < L) : Nonempty (EndDouble e hL) := |
| 106 | let x := Classical.choice (endDoublePiece_nonempty e hL) |
| 107 | ⟨(endDoubleOverlap e hL).include false x⟩ |
| 108 | |
| 109 | /-- Each cap piece includes into the double by a smooth local diffeomorphism |
| 110 | (Theorem 12.5 compact-double construction, p. 297). -/ |
| 111 | theorem endDouble_include_isLocalDiffeomorph (e : StandardCylindricalEnd g) |
| 112 | {L : ℝ} (hL : 1 < L) (i : Bool) : |
| 113 | let := endDoublePieceChartedSpace e hL |
| 114 | IsLocalDiffeomorph (𝓡 3) (𝓡 3) ∞ ((endDoubleOverlap e hL).include i) := by |
| 115 | let := endDoublePiece_nonempty e hL |
| 116 | exact include_isLocalDiffeomorph (fun _ : Bool => endTruncation e (L + 1)) |
| 117 | (fun _ => endTruncation_isOpen e (show 0 ≤ L + 1 by linarith)) |
| 118 | (endDoubleOverlap e hL) (endDoubleOverlap_smooth e hL) i |
| 119 | |
| 120 | end PoincareMT.M34 |