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.Tube.Local.Geometry.LocalGluingSliceProjection |
| 3 | import PoincareLib.Topology.Manifold.NeckCap.Overlap.GraphIsotopy |
| 4 | /-! |
| 5 | # Smooth isotopy of a contained neck slice |
| 6 | |
| 7 | The diffeomorphic sphere projection gives a smooth height graph, so the |
| 8 | existing graph isotopy applies to the actual slice of the second neck. |
| 9 | |
| 10 | Reference: Morgan--Tian, Proposition A.11(4), pp. 503--504, and Lemma A.13, p. 505. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.EpsilonNeck |
| 21 | |
| 22 | /-- A contained sphere slice is a smooth graph, and is smoothly isotopic |
| 23 | inside the containing neck to its central sphere, at one universal threshold. -/ |
| 24 | theorem exists_sphereSlice_graph_and_isotopy_m28 : |
| 25 | ∃ ε₀ : ℝ, 0 < ε₀ ∧ ε₀ ≤ 1 / 200 ∧ |
| 26 | ∀ {M : Type u} [TopologicalSpace M] |
| 27 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 28 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 29 | {g : RiemannianMetric 3 M} (A B : EpsilonNeck g), |
| 30 | A.epsilon ≤ ε₀ → B.epsilon ≤ ε₀ → |
| 31 | ∀ {s : ℝ}, s ∈ Ioo (-B.epsilon⁻¹) B.epsilon⁻¹ → |
| 32 | (∀ q : UnitTwoSphere, B.coordinate_map (q, s) ∈ A.carrier) → |
| 33 | ∃ h : UnitTwoSphere → ℝ, |
| 34 | ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) ∞ h ∧ |
| 35 | (∀ q, h q ∈ Ioo (-A.epsilon⁻¹) A.epsilon⁻¹) ∧ |
| 36 | range (fun q : UnitTwoSphere => B.coordinate_map (q, s)) = |
| 37 | range (fun q : UnitTwoSphere => A.coordinate_map (q, h q)) ∧ |
| 38 | SmoothSphereIsotopicIn A.carrier A.central_sphere |
| 39 | (range (fun q : UnitTwoSphere => B.coordinate_map (q, s))) := by |
| 40 | obtain ⟨ε₀, hε₀, hsmall, hprojection⟩ := exists_sphereSlice_projection_diffeomorph_m28.{u} |
| 41 | refine ⟨ε₀, hε₀, hsmall, ?_⟩ |
| 42 | intro M _ _ _ _ _ _ _ g A B hA hB s hs hc |
| 43 | obtain ⟨e, he⟩ := hprojection A B hA hB hs hc |
| 44 | let h : UnitTwoSphere → ℝ := |
| 45 | fun q => (A.coordinate_inverse (B.coordinate_map (e.symm q, s))).2 |
| 46 | have hh : ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) ∞ h := by |
| 47 | have hcoord : ContMDiff (𝓡 2) ((𝓡 2).prod 𝓘(ℝ, ℝ)) ∞ |
| 48 | (fun q => A.coordinate_inverse (B.coordinate_map (e.symm q, s))) := by |
| 49 | intro q |
| 50 | exact (A.coordinate_inverse_smooth.contMDiffAt |
| 51 | (A.carrier_open.mem_nhds (hc (e.symm q)))).comp q |
| 52 | ((B.sphereSlice_contMDiff hs).comp e.symm.contMDiff q) |
| 53 | exact contMDiff_snd.comp hcoord |
| 54 | have hdom (q : UnitTwoSphere) : h q ∈ Ioo (-A.epsilon⁻¹) A.epsilon⁻¹ := |
| 55 | (A.coordinate_inverse_mem _ (hc (e.symm q))).2 |
| 56 | have hgraph (q : UnitTwoSphere) : |
| 57 | A.coordinate_map (q, h q) = B.coordinate_map (e.symm q, s) := by |
| 58 | have hcoord : (q, h q) = A.coordinate_inverse (B.coordinate_map (e.symm q, s)) := by |
| 59 | refine Prod.ext ?_ (show h q = _ from rfl) |
| 60 | rw [← he, e.apply_symm_apply] |
| 61 | rw [hcoord, A.coordinate_map_coordinate_inverse (hc (e.symm q))] |
| 62 | have hrange : range (fun q : UnitTwoSphere => B.coordinate_map (q, s)) = |
| 63 | range (fun q : UnitTwoSphere => A.coordinate_map (q, h q)) := by |
| 64 | ext x |
| 65 | constructor |
| 66 | · rintro ⟨q, rfl⟩ |
| 67 | exact ⟨e q, by simpa only [e.symm_apply_apply] using hgraph (e q)⟩ |
| 68 | · rintro ⟨q, rfl⟩ |
| 69 | exact ⟨e.symm q, (hgraph q).symm⟩ |
| 70 | refine ⟨h, hh, hdom, hrange, ?_⟩ |
| 71 | have hzero (q : UnitTwoSphere) : (0 : ℝ) ∈ Ioo (-A.epsilon⁻¹) A.epsilon⁻¹ := |
| 72 | ⟨neg_neg_of_pos (inv_pos.mpr A.epsilon_pos), inv_pos.mpr A.epsilon_pos⟩ |
| 73 | have hisotopy := A.coordinate_graphs_isotopic (fun _ => 0) h contMDiff_const hh hzero hdom |
| 74 | rwa [A.centralSphere_range, ← hrange] at hisotopy |
| 75 | |
| 76 | end PoincareMT.EpsilonNeck |