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.CanonicalInduction.Terminal.Curvature.TerminalCurvaturePartialInverse |
| 2 | |
| 3 | /-! |
| 4 | # The unchanged atlas map in an actual ordinary source |
| 5 | |
| 6 | Actual compact capture allows composition with the real terminal source |
| 7 | inverse. The full original atlas map and its exhaustion domain are kept. |
| 8 | MT Theorem 5.11; terminal-regular-atlas-inverse.md, F2. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff Topology |
| 16 | |
| 17 | universe u v w |
| 18 | |
| 19 | namespace PoincareMT.M47 |
| 20 | |
| 21 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 22 | |
| 23 | /-- The captured original atlas embedding factors through the actual |
| 24 | source inverse, retaining its full map and literal exhaustion domain. -/ |
| 25 | theorem terminalSource_atlas_actual_inverse |
| 26 | {X : Type u} {Y : Type v} {M : Type w} |
| 27 | [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace M] |
| 28 | [ChartedSpace E X] [ChartedSpace E Y] [ChartedSpace E M] |
| 29 | [IsManifold (𝓡 3) ∞ X] [IsManifold (𝓡 3) ∞ Y] [IsManifold (𝓡 3) ∞ M] |
| 30 | [Nonempty X] |
| 31 | (j : PartialDiffeomorph (𝓡 3) (𝓡 3) Y M ∞) (hj : j.source = univ) |
| 32 | {V : Set X} (hV : IsOpen V) (f : X → M) |
| 33 | (hembed : Topology.IsOpenEmbedding (fun x : V => f x)) |
| 34 | (hsmooth : IsLocalDiffeomorphOn (𝓡 3) (𝓡 3) ∞ f V) |
| 35 | (hcapture : MapsTo f V j.target) : |
| 36 | ∃ phi : PartialDiffeomorph (𝓡 3) (𝓡 3) X Y ∞, |
| 37 | (phi : X → Y) = j.symm ∘ f ∧ phi.source = V ∧ |
| 38 | (∀ x ∈ V, j (phi x) = f x) ∧ |
| 39 | ∀ p ∈ V, ∀ y0 : Y, f p = j y0 → phi p = y0 := by |
| 40 | obtain ⟨q, hq, hsource, _htarget⟩ := |
| 41 | terminalCurvature_exists_actual_partial_inverse hV hembed hsmooth |
| 42 | let phi := q.trans j.symm |
| 43 | have hphi : (phi : X → Y) = j.symm ∘ f := by |
| 44 | change j.symm ∘ (q : X → M) = j.symm ∘ f |
| 45 | rw [hq] |
| 46 | have hdomain : phi.source = V := by |
| 47 | ext x |
| 48 | change (x ∈ q.source ∧ q x ∈ j.target) ↔ x ∈ V |
| 49 | rw [hsource, hq] |
| 50 | exact ⟨And.left, fun hx => ⟨hx, hcapture hx⟩⟩ |
| 51 | refine ⟨phi, hphi, hdomain, ?_, ?_⟩ |
| 52 | · intro x hx |
| 53 | rw [hphi] |
| 54 | exact j.right_inv (hcapture hx) |
| 55 | · intro p _hp y0 heq |
| 56 | rw [hphi] |
| 57 | change j.symm (f p) = y0 |
| 58 | rw [heq] |
| 59 | exact j.left_inv (hj.symm ▸ mem_univ y0) |
| 60 | |
| 61 | end PoincareMT.M47 |