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.Compactness.Ancient.Pointed |
| 2 | |
| 3 | /-! |
| 4 | # Compact spaces in the actual ancient convergence embeddings |
| 5 | |
| 6 | A compact image lies in one exhaustion stage. The stored spatial maps are |
| 7 | open embeddings on the stages, so their compositions with a continuous |
| 8 | injection from a compact space eventually give topological embeddings. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open Set Filter |
| 14 | open scoped Manifold ContDiff Topology |
| 15 | |
| 16 | namespace PoincareMT.AncientPointedGeometricConvergence |
| 17 | |
| 18 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.t2Space |
| 19 | |
| 20 | variable {n : ℕ} {C : ℕ → FlowCarrier.{0} n} |
| 21 | {g : ∀ k, ℝ → (C k).metric} {p : ∀ k, (C k).carrier} {T : ℝ} |
| 22 | |
| 23 | /-- A compact subset of the ancient limit lies in one stored exhaustion stage. -/ |
| 24 | theorem exists_exhaustion_superset |
| 25 | (G : AncientPointedGeometricConvergence C g p T) |
| 26 | {K : Set G.limitCarrier.carrier} (hK : IsCompact K) : |
| 27 | ∃ j, K ⊆ G.exhaustion j := by |
| 28 | have hmono : Monotone G.exhaustion := |
| 29 | monotone_nat_of_le_succ G.exhaustion_increasing |
| 30 | exact hK.elim_directed_cover G.exhaustion G.exhaustion_open |
| 31 | (by rw [G.exhaustion_covers]; exact subset_univ _) hmono.directed_le |
| 32 | |
| 33 | /-- The actual stored maps eventually embed any compact space continuously |
| 34 | and injectively mapped into the limit, without global regularity assumptions |
| 35 | on those stored maps. -/ |
| 36 | theorem eventually_isEmbedding_comp_of_compact |
| 37 | (G : AncientPointedGeometricConvergence C g p T) |
| 38 | {K : Type*} [TopologicalSpace K] [CompactSpace K] |
| 39 | {f : K → G.limitCarrier.carrier} (hf : Continuous f) (hinj : Function.Injective f) : |
| 40 | ∀ᶠ i in atTop, Topology.IsEmbedding (G.embedding i ∘ f) := by |
| 41 | obtain ⟨j, hj⟩ := G.exists_exhaustion_superset (isCompact_range hf) |
| 42 | have hmono : Monotone G.exhaustion := |
| 43 | monotone_nat_of_le_succ G.exhaustion_increasing |
| 44 | have hfembed : Topology.IsEmbedding f := (hf.isClosedEmbedding hinj).isEmbedding |
| 45 | filter_upwards [eventually_ge_atTop j] with i hji |
| 46 | have hmem (x : K) : f x ∈ G.exhaustion i := hmono hji (hj (mem_range_self x)) |
| 47 | exact (G.embedding_open i).isEmbedding.comp |
| 48 | (hfembed.codRestrict (G.exhaustion i) hmem) |
| 49 | |
| 50 | end PoincareMT.AncientPointedGeometricConvergence |