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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Blowup.Controlled.Geometry |
| 3 | import Mathlib.Topology.MetricSpace.Pseudo.Defs |
| 4 | |
| 5 | /-! |
| 6 | # A common flow-box lifetime around a compact set |
| 7 | |
| 8 | A compact set in an actual slice is covered by finitely many original |
| 9 | boxes. Relative openness gives one positive time radius on which every |
| 10 | retained box exists. This is the compactness step in the dense-time |
| 11 | extension of Morgan--Tian Theorem 10.2; see task derivation 08. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | /-- A compact subset of a slice has a finite original-box cover with one |
| 24 | common relative lifetime, including at time endpoints (task derivation 08). -/ |
| 25 | theorem GeneralizedRicciFlowData.exists_common_box_lifetime |
| 26 | (F : GeneralizedRicciFlowData.{u}) (t : ℝ) |
| 27 | (K : Set (F.slice t).carrier) (hK : IsCompact K) : |
| 28 | ∃ B : Finset {b : F.box_index // t ∈ (F.box b).interval}, |
| 29 | K ⊆ ⋃ b ∈ B, range ((F.box b.val).forward t b.property) ∧ |
| 30 | ∃ δ : ℝ, 0 < δ ∧ ∀ s ∈ F.interval, |s - t| < δ → |
| 31 | ∀ b ∈ B, s ∈ (F.box b.val).interval := by |
| 32 | obtain ⟨B, hB⟩ := hK.elim_finite_subcover |
| 33 | (fun b : {b : F.box_index // t ∈ (F.box b).interval} => |
| 34 | range ((F.box b.val).forward t b.property)) |
| 35 | (fun b => ((F.box b.val).forward_openEmbedding t b.property).isOpen_range) (by |
| 36 | intro x _ |
| 37 | obtain ⟨b, ht, y, hy⟩ := F.box_covers t x |
| 38 | exact mem_iUnion.mpr ⟨⟨b, ht⟩, y, hy⟩) |
| 39 | have hcommon : {s : ℝ | ∀ b ∈ B, s ∈ (F.box b.val).interval} ∈ |
| 40 | 𝓝[F.interval] t := by |
| 41 | apply (eventually_all_finset B).mpr |
| 42 | intro b _ |
| 43 | obtain ⟨V, hV, hI⟩ := (F.box b.val).relatively_open |
| 44 | have htV : t ∈ V := by |
| 45 | have ht := b.property |
| 46 | rw [hI] at ht |
| 47 | exact ht.2 |
| 48 | filter_upwards [self_mem_nhdsWithin, |
| 49 | mem_nhdsWithin_of_mem_nhds (hV.mem_nhds htV)] with s hs hsV |
| 50 | rw [hI] |
| 51 | exact ⟨hs, hsV⟩ |
| 52 | obtain ⟨δ, hδ, hlocal⟩ := Metric.mem_nhdsWithin_iff.mp hcommon |
| 53 | refine ⟨B, hB, δ, hδ, fun s hs hst => hlocal ⟨?_, hs⟩⟩ |
| 54 | simpa only [Metric.mem_ball, Real.dist_eq] using hst |
| 55 | |
| 56 | end PoincareMT |