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.Generalized.BoundedDistance.Predecessors.Necks.Geometry.GraphIsotopy |
| 3 | import PoincareLib.Geometry.Manifold.Diffeomorph.Sphere |
| 4 | |
| 5 | /-! |
| 6 | # Smooth graphs from locally invertible sphere projections |
| 7 | |
| 8 | The earlier Horizon sphere-diffeomorphism theorem turns a local projection |
| 9 | into a global one. Composing its inverse with the retained height gives |
| 10 | an actual smooth graph, and the existing graph isotopy gives the sphere |
| 11 | isotopy in Morgan--Tian Proposition A.11(4), pp. 503-504. Whole-slice |
| 12 | containment and local invertibility are explicit hypotheses here; see |
| 13 | the one-sheet-sphere derivation. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.EpsilonNeck |
| 24 | |
| 25 | variable {M : Type u} [TopologicalSpace M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 27 | {g : RiemannianMetric 3 M} |
| 28 | |
| 29 | /-- A retained whole slice with locally invertible sphere projection is |
| 30 | a smooth height graph in the containing neck. This is the global graph |
| 31 | step in MT Proposition A.11(4), pp. 503-504. -/ |
| 32 | theorem exists_coordinate_graph_of_slice_projection_localDiffeomorph |
| 33 | (N N' : EpsilonNeck g) {t : ℝ} (ht : t ∈ Ioo (-N'.epsilon⁻¹) N'.epsilon⁻¹) |
| 34 | (hsub : ∀ q : UnitTwoSphere, N'.coordinate_map (q, t) ∈ N.carrier) |
| 35 | (hlocal : IsLocalDiffeomorph (𝓡 2) (𝓡 2) ∞ |
| 36 | (fun q : UnitTwoSphere => (N.coordinate_inverse (N'.coordinate_map (q, t))).1)) : |
| 37 | ∃ h : UnitTwoSphere → ℝ, ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) ∞ h ∧ |
| 38 | (∀ q, h q ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹) ∧ |
| 39 | range (fun q => N.coordinate_map (q, h q)) = |
| 40 | range (fun q => N'.coordinate_map (q, t)) := by |
| 41 | let : SimplyConnectedSpace UnitTwoSphere := |
| 42 | Poincare.Topology.sphereSimplyConnected_of_two_le (n := 2) (by norm_num) |
| 43 | let F : UnitTwoSphere → UnitTwoSphere := |
| 44 | fun q => (N.coordinate_inverse (N'.coordinate_map (q, t))).1 |
| 45 | let e := Poincare.Geometry.Manifold.sphereDiffeomorphOfLocalDiffeomorph |
| 46 | (n := 0) F hlocal |
| 47 | have he (q : UnitTwoSphere) : e q = F q := rfl |
| 48 | let p : UnitTwoSphere → M := fun q => N'.coordinate_map (e.symm q, t) |
| 49 | have hp : ContMDiff (𝓡 2) (𝓡 3) ∞ p := |
| 50 | (N'.coordinate_slice_isSmoothEmbedding ht).contMDiff.comp e.symm.contMDiff |
| 51 | have hcoord : ContMDiff (𝓡 2) ((𝓡 2).prod 𝓘(ℝ, ℝ)) ∞ |
| 52 | (fun q => N.coordinate_inverse (p q)) := |
| 53 | N.coordinate_inverse_smooth.comp_contMDiff hp (fun q => hsub (e.symm q)) |
| 54 | let h : UnitTwoSphere → ℝ := fun q => (N.coordinate_inverse (p q)).2 |
| 55 | have hh : ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) ∞ h := contMDiff_snd.comp hcoord |
| 56 | have hdom (q : UnitTwoSphere) : h q ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹ := |
| 57 | (N.coordinate_inverse_mem (p q) (hsub (e.symm q))).2 |
| 58 | have hfst (q : UnitTwoSphere) : (N.coordinate_inverse (p q)).1 = q := |
| 59 | (he (e.symm q)).symm.trans (e.apply_symm_apply q) |
| 60 | have hgraph (q : UnitTwoSphere) : N.coordinate_map (q, h q) = p q := by |
| 61 | calc |
| 62 | N.coordinate_map (q, h q) = N.coordinate_map (N.coordinate_inverse (p q)) := |
| 63 | congrArg N.coordinate_map |
| 64 | (show (q, h q) = N.coordinate_inverse (p q) from Prod.ext (hfst q).symm rfl) |
| 65 | _ = p q := N.coordinate_map_coordinate_inverse (hsub (e.symm q)) |
| 66 | refine ⟨h, hh, hdom, ?_⟩ |
| 67 | ext x |
| 68 | constructor |
| 69 | · rintro ⟨q, rfl⟩ |
| 70 | exact ⟨e.symm q, (hgraph q).symm⟩ |
| 71 | · rintro ⟨q, rfl⟩ |
| 72 | refine ⟨e q, ?_⟩ |
| 73 | change N.coordinate_map (e q, h (e q)) = N'.coordinate_map (q, t) |
| 74 | rw [hgraph] |
| 75 | simp only [p, e.symm_apply_apply] |
| 76 | |
| 77 | /-- The whole slice is isotopic to the containing neck's central sphere |
| 78 | once its sphere projection is a local diffeomorphism, as in MT |
| 79 | Proposition A.11(4), pp. 503-504. All embeddings stay in that neck. -/ |
| 80 | theorem slice_isotopic_of_projection_localDiffeomorph |
| 81 | (N N' : EpsilonNeck g) {t : ℝ} (ht : t ∈ Ioo (-N'.epsilon⁻¹) N'.epsilon⁻¹) |
| 82 | (hsub : ∀ q : UnitTwoSphere, N'.coordinate_map (q, t) ∈ N.carrier) |
| 83 | (hlocal : IsLocalDiffeomorph (𝓡 2) (𝓡 2) ∞ |
| 84 | (fun q : UnitTwoSphere => (N.coordinate_inverse (N'.coordinate_map (q, t))).1)) : |
| 85 | SmoothSphereIsotopicIn N.carrier N.central_sphere |
| 86 | (range (fun q => N'.coordinate_map (q, t))) := by |
| 87 | obtain ⟨h, hsmooth, hdom, hrange⟩ := |
| 88 | N.exists_coordinate_graph_of_slice_projection_localDiffeomorph N' ht hsub hlocal |
| 89 | have hi := N.m25_coordinate_graphs_isotopic (fun _ => 0) h contMDiff_const hsmooth |
| 90 | (fun _ => N.zero_mem_interval) hdom |
| 91 | change SmoothSphereIsotopicIn N.carrier (range (fun q => N.coordinate_map (q, 0))) _ at hi |
| 92 | rwa [N.coordinate_zero_range, hrange] at hi |
| 93 | |
| 94 | end PoincareMT.EpsilonNeck |