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.Continuation.Construction.Terminal.Ends.RetainedCompactness.Cover |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Continuation.Construction.Terminal.Gluing.Retained.Policy |
| 3 | |
| 4 | /-! |
| 5 | # Compact closure of the actual policy-retained open set |
| 6 | |
| 7 | The open set used by metric gluing has closure contained in the closed |
| 8 | retained complement. Covering the original relevant ends by the actual cuts |
| 9 | therefore supplies the compact-closure premise of the event constructor. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff Topology |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.SingularLimitConclusion |
| 20 | |
| 21 | variable {M : Type u} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 23 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 24 | {G : GeneralizedRicciFlowData.{u}} {T : ℝ} {H : SingularTimeAssumptions G T M} |
| 25 | |
| 26 | theorem isCompact_closure_policyRetainedOpen (Q : SingularLimitConclusion H) (rho : ℝ) |
| 27 | {ι : Type u} [Finite ι] {C : MetricSurgeryConstants} |
| 28 | (J : ι → MetricSurgeryInput C (Q.extension.extended.metric T)) |
| 29 | (cuts : ∀ i, SurgeryEndCut (J i).neck) |
| 30 | (hcover : ∀ K : TerminalComponentPath Q.extension, |
| 31 | (K.component ∩ {x | Q.terminal_scalar x ≤ rho⁻¹ ^ 2}).Nonempty → |
| 32 | ∀ e : TerminalEnd K, ∃ i n, Subtype.val '' e.tail n ⊆ (cuts i).tail) : |
| 33 | IsCompact (closure (Surgery.Terminal.Gluing.policyRetainedOpen |
| 34 | (Q.extension.extended.connection T) rho J cuts : |
| 35 | Set (Q.extension.extended.slice T).carrier)) := by |
| 36 | exact (Q.isCompact_retained_of_end_cut_cover rho (fun i => (J i).neck) cuts hcover).of_isClosed_subset |
| 37 | isClosed_closure |
| 38 | (Surgery.Terminal.Gluing.closure_policyRetainedOpen_subset |
| 39 | (Q.extension.extended.connection T) rho J cuts) |
| 40 | |
| 41 | end PoincareMT.SingularLimitConclusion |