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.Topology.Manifold.NeckCap.Models |
| 2 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.Cap |
| 3 | import Mathlib.Topology.Homeomorph.Lemmas |
| 4 | |
| 5 | /-! |
| 6 | # Actual closed-component models under slice diffeomorphisms |
| 7 | |
| 8 | The same standard model and smooth covering data describe the whole |
| 9 | image component. Only its actual forward and inverse maps are composed |
| 10 | with the supplied global diffeomorphism. |
| 11 | Source: Morgan--Tian Definition 9.75 and Proposition 14.12. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M47 |
| 22 | |
| 23 | variable {M X : Type u} [TopologicalSpace M] [TopologicalSpace X] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) X] |
| 26 | [IsManifold (𝓡 3) ∞ M] [IsManifold (𝓡 3) ∞ X] |
| 27 | (f : Diffeomorph (𝓡 3) (𝓡 3) M X ∞) |
| 28 | |
| 29 | omit [IsManifold (𝓡 3) ∞ M] [IsManifold (𝓡 3) ∞ X] in |
| 30 | /-- A global slice diffeomorphism maps an actual whole component onto |
| 31 | the actual whole component of the image basepoint. -/ |
| 32 | theorem diffeomorph_image_connectedComponent (x : M) : |
| 33 | f '' connectedComponent x = connectedComponent (f x) := by |
| 34 | apply (f.continuous.image_connectedComponent_subset x).antisymm |
| 35 | intro y hy |
| 36 | refine ⟨f.symm y, ?_, f.apply_symm_apply y⟩ |
| 37 | have h := f.symm.continuous.image_connectedComponent_subset (f x) ⟨y, hy, rfl⟩ |
| 38 | simpa only [f.symm_apply_apply] using h |
| 39 | |
| 40 | /-- The original smooth closed model retains its actual standard smooth |
| 41 | data when its carrier is transported by a global diffeomorphism. -/ |
| 42 | noncomputable def diffeomorph_image_smooth_closed_model |
| 43 | {kind : ClosedComponentKind} {U : Set M} (N : SmoothClosedComponentModel kind U) : |
| 44 | SmoothClosedComponentModel kind (f '' U) := by |
| 45 | letI := N.model_topology |
| 46 | letI := N.model_charted |
| 47 | letI := N.model_manifold |
| 48 | refine { |
| 49 | model := N.model |
| 50 | model_topology := N.model_topology |
| 51 | model_charted := N.model_charted |
| 52 | model_manifold := N.model_manifold |
| 53 | standard_model := N.standard_model |
| 54 | standard_smooth := N.standard_smooth |
| 55 | forward := f ∘ N.forward |
| 56 | inverse := N.inverse ∘ f.symm |
| 57 | forward_mem := fun y => ⟨N.forward y, N.forward_mem y, rfl⟩ |
| 58 | left_inverse := ?_ |
| 59 | right_inverse := ?_ |
| 60 | forward_smooth := f.contMDiff.comp N.forward_smooth |
| 61 | inverse_smooth := N.inverse_smooth.comp f.symm.contMDiff.contMDiffOn ?_ |
| 62 | } |
| 63 | · rintro _ ⟨x, hx, rfl⟩ |
| 64 | simp only [Function.comp_apply, f.symm_apply_apply, N.left_inverse x hx] |
| 65 | · intro y |
| 66 | simp only [Function.comp_apply, f.symm_apply_apply, N.right_inverse y] |
| 67 | · rintro _ ⟨x, hx, rfl⟩ |
| 68 | change f.symm (f x) ∈ U |
| 69 | rw [f.symm_apply_apply] |
| 70 | exact hx |
| 71 | |
| 72 | /-- The complete closed-component certificate transports with its actual |
| 73 | smooth model, connected component and model-identification equality. -/ |
| 74 | noncomputable def diffeomorph_image_closed_certificate |
| 75 | {kind : ClosedComponentKind} {U : Set M} (N : ClosedComponentCertificate kind U) : |
| 76 | ClosedComponentCertificate kind (f '' U) := by |
| 77 | letI := N.model.carrier_topology |
| 78 | refine { |
| 79 | model := N.model |
| 80 | homeomorph := (f.toHomeomorph.image U).symm.trans N.homeomorph |
| 81 | connected := N.connected.image f f.continuous.continuousOn |
| 82 | compact := N.compact.image f.continuous |
| 83 | component := ?_ |
| 84 | smooth_model := diffeomorph_image_smooth_closed_model f N.smooth_model |
| 85 | model_transport := ?_ |
| 86 | } |
| 87 | · obtain ⟨x, hx⟩ := N.component |
| 88 | exact ⟨f x, hx ▸ diffeomorph_image_connectedComponent f x⟩ |
| 89 | · let := N.smooth_model.model_topology |
| 90 | obtain ⟨e, he⟩ := N.model_transport |
| 91 | exact ⟨e, fun x => he ((f.toHomeomorph.image U).symm x)⟩ |
| 92 | |
| 93 | end PoincareMT.M47 |