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.CarrierBuffer |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Predecessors.Necks.Geometry.SliceProjectionDifferential |
| 4 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.Neck.Separation.Diameter |
| 5 | |
| 6 | /-! |
| 7 | # Whole central spheres in overlapping necks |
| 8 | |
| 9 | The ambient carrier buffer, center-scale comparison and lower sphere |
| 10 | diameter bound place an entire central sphere in a neck whose middle |
| 11 | region contains its center. The transverse projection then gives a graph |
| 12 | and isotopy. These are the containment and qualitative graph conclusions |
| 13 | of Morgan--Tian Proposition A.11(4), pp. 503-504; see the reviewed |
| 14 | whole-sphere-containment derivation. Quantitative slope bounds remain |
| 15 | separate. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Set |
| 21 | open scoped Manifold ContDiff ENNReal |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.EpsilonNeck |
| 26 | |
| 27 | /-- A central sphere centered a fixed fractional distance from the ends |
| 28 | of a sufficiently small neck lies entirely in that neck. The second |
| 29 | neck needs no additional smallness for this containment step of |
| 30 | MT Proposition A.11(4), pp. 503-504. -/ |
| 31 | theorem exists_middle_central_sphere_containment {κ : ℝ} (hκ : κ ∈ Ioc 0 1) : |
| 32 | ∃ epsilon0 : ℝ, 0 < epsilon0 ∧ epsilon0 ≤ 1 / 200 ∧ |
| 33 | ∀ {M : Type u} [TopologicalSpace M] |
| 34 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 35 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 36 | {g : RiemannianMetric 3 M}, ∀ (N N' : EpsilonNeck g), |
| 37 | N.epsilon ≤ epsilon0 → N'.center ∈ N.carrier → |
| 38 | |(N.coordinate_inverse N'.center).2| ≤ (1 - κ) * N.epsilon⁻¹ → |
| 39 | N'.central_sphere ⊆ N.carrier := by |
| 40 | obtain ⟨εs, hεs, hcap, hscale⟩ := exists_overlap_scale_control.{u} (α := 1) (by norm_num) |
| 41 | let C := 2 * neckDepthConstant |
| 42 | have hC : 0 < C := mul_pos (by norm_num) neckDepthConstant_pos |
| 43 | have hden : 0 < 16 * Real.pi * C := by positivity |
| 44 | refine ⟨min εs (κ / (16 * Real.pi * C)), |
| 45 | lt_min hεs (div_pos hκ.1 hden), (min_le_left _ _).trans hcap, ?_⟩ |
| 46 | intro M _ _ _ _ _ instT3 g N N' hN hcenter hmiddle y hy |
| 47 | let : T2Space M := @T25Space.t2Space M _ (@T3Space.t25Space M _ instT3) |
| 48 | have hratio := (abs_lt.mp (hscale N (hN.trans (min_le_left _ _)) N' hcenter)).2 |
| 49 | have hscale' : N'.scale < 2 * N.scale := |
| 50 | (div_lt_iff₀ N.scale_pos).mp (by linarith) |
| 51 | let δ := N.epsilon⁻¹ - |(N.coordinate_inverse N'.center).2| |
| 52 | have hδ : 0 < δ := |
| 53 | sub_pos.mpr (abs_lt.mpr (N.coordinate_inverse_mem N'.center hcenter).2) |
| 54 | have hmargin : κ / N.epsilon ≤ δ := by |
| 55 | dsimp only [δ] |
| 56 | rw [div_eq_mul_inv] |
| 57 | linarith |
| 58 | have hsmall : N.epsilon ≤ κ / (16 * Real.pi * C) := |
| 59 | hN.trans (min_le_right _ _) |
| 60 | have hδlarge : 16 * Real.pi * C ≤ δ := by |
| 61 | apply le_trans _ hmargin |
| 62 | apply (le_div_iff₀ N.epsilon_pos).mpr |
| 63 | simpa only [mul_comm N.epsilon] using (le_div_iff₀ hden).mp hsmall |
| 64 | have hhalf : (1 : ℝ) / 2 < Real.sqrt (1 - N.epsilon) := |
| 65 | (Real.lt_sqrt (by norm_num)).mpr (by linarith [N.epsilon_lt_half]) |
| 66 | let R := N.scale * Real.sqrt (1 - N.epsilon) * δ / C |
| 67 | have hR : 8 * Real.pi * N.scale ≤ R := by |
| 68 | apply (le_div_iff₀ hC).mpr |
| 69 | calc |
| 70 | (8 * Real.pi * N.scale) * C = (N.scale * (1 / 2)) * (16 * Real.pi * C) := by ring |
| 71 | _ ≤ (N.scale * (1 / 2)) * δ := |
| 72 | mul_le_mul_of_nonneg_left hδlarge (mul_nonneg N.scale_pos.le (by norm_num)) |
| 73 | _ ≤ N.scale * Real.sqrt (1 - N.epsilon) * δ := |
| 74 | mul_le_mul_of_nonneg_right |
| 75 | (mul_le_mul_of_nonneg_left hhalf.le N.scale_pos.le) hδ.le |
| 76 | apply N.mem_carrier_of_edist_lt_buffer hcenter |
| 77 | change g.edist N'.center y < ENNReal.ofReal R |
| 78 | calc |
| 79 | _ ≤ ENNReal.ofReal ((2 * Real.pi) * N'.scale) := |
| 80 | N'.edist_central_sphere_le_two_pi_mul_scale N'.center_on_central_sphere hy |
| 81 | _ < ENNReal.ofReal ((4 * Real.pi) * N.scale) := by |
| 82 | apply (ENNReal.ofReal_lt_ofReal_iff |
| 83 | (mul_pos (mul_pos (by norm_num) Real.pi_pos) N.scale_pos)).mpr |
| 84 | nlinarith [mul_lt_mul_of_pos_left hscale' Real.pi_pos] |
| 85 | _ ≤ ENNReal.ofReal R := ENNReal.ofReal_le_ofReal (by |
| 86 | have hpos : 0 < Real.pi * N.scale := mul_pos Real.pi_pos N.scale_pos |
| 87 | linarith) |
| 88 | |
| 89 | /-- Sufficiently small necks with the second center in a fixed middle |
| 90 | region have a whole central-sphere graph and isotopy. This proves the |
| 91 | qualitative graph part of MT Proposition A.11(4), pp. 503-504; it does not |
| 92 | assert the separate quantitative derivative estimate. -/ |
| 93 | theorem exists_middle_central_sphere_graph {κ : ℝ} (hκ : κ ∈ Ioc 0 1) : |
| 94 | ∃ epsilon0 : ℝ, 0 < epsilon0 ∧ epsilon0 ≤ 1 / 200 ∧ |
| 95 | ∀ {M : Type u} [TopologicalSpace M] |
| 96 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 97 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 98 | {g : RiemannianMetric 3 M}, ∀ (N N' : EpsilonNeck g), |
| 99 | N.epsilon ≤ epsilon0 → N'.epsilon ≤ epsilon0 → N'.center ∈ N.carrier → |
| 100 | |(N.coordinate_inverse N'.center).2| ≤ (1 - κ) * N.epsilon⁻¹ → |
| 101 | N'.central_sphere ⊆ N.carrier ∧ |
| 102 | (∃ h : UnitTwoSphere → ℝ, ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) ∞ h ∧ |
| 103 | (∀ q, h q ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹) ∧ |
| 104 | range (fun q => N.coordinate_map (q, h q)) = N'.central_sphere) ∧ |
| 105 | SmoothSphereIsotopicIn N.carrier N.central_sphere N'.central_sphere := by |
| 106 | obtain ⟨εc, hcpos, hccap, hcontains⟩ := exists_middle_central_sphere_containment.{u} hκ |
| 107 | obtain ⟨εg, hgpos, _, hgraph⟩ := exists_contained_slice_graph.{u} |
| 108 | refine ⟨min εc εg, lt_min hcpos hgpos, (min_le_left _ _).trans hccap, ?_⟩ |
| 109 | intro M _ _ _ _ _ _ g N N' hN hN' hcenter hmiddle |
| 110 | have hsub := hcontains N N' (hN.trans (min_le_left _ _)) hcenter hmiddle |
| 111 | have hslice (q : UnitTwoSphere) : N'.coordinate_map (q, 0) ∈ N.carrier := by |
| 112 | apply hsub |
| 113 | rw [← N'.coordinate_zero_range] |
| 114 | exact mem_range_self q |
| 115 | have h := hgraph N N' (hN.trans (min_le_right _ _)) (hN'.trans (min_le_right _ _)) |
| 116 | 0 N'.zero_mem_interval hslice |
| 117 | rw [N'.coordinate_zero_range] at h |
| 118 | exact ⟨hsub, h⟩ |
| 119 | |
| 120 | end PoincareMT.EpsilonNeck |