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.Cylinders.CylinderMiddleModel |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Cylinders.CylinderTailModel |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Cylinders.CylinderUniformScalar |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Spacetime.NeckGeometry.NeckCoverEnd |
| 6 | import PoincareLib.Geometry.Riemannian.Surface.Regularity |
| 7 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.Neck.Separation.Connected |
| 8 | import Mathlib.Topology.Connected.Clopen |
| 9 | |
| 10 | /-! |
| 11 | # Scalar control and whole-neck containment on the actual smooth recut |
| 12 | |
| 13 | Morgan--Tian Claim 10.8, p. 254; M28 derivations 94 and 128. Finite-volume |
| 14 | packing and the proper ambient closure first give uniform divergence. |
| 15 | The compact recut frontier then excludes every sufficiently high neck. |
| 16 | A smooth height change places that threshold at the middle sphere. |
| 17 | -/ |
| 18 | |
| 19 | set_option autoImplicit false |
| 20 | |
| 21 | open Set |
| 22 | open scoped Manifold ContDiff Topology ENNReal |
| 23 | |
| 24 | universe u |
| 25 | |
| 26 | namespace PoincareMT.M28 |
| 27 | |
| 28 | /-- An actual proper recut of the neck-covered end has smooth coordinates |
| 29 | with bounded initial scalar, uniformly divergent terminal scalar and full |
| 30 | ordinary necks inside its positive half. Quantitative backward models and |
| 31 | intrinsic diameter are separate obligations (MT Claim 10.8, p. 254). -/ |
| 32 | theorem exists_neck_recut_scalar_model_accuracy : |
| 33 | ∃ epsilon0 : ℝ, 0 < epsilon0 ∧ epsilon0 ≤ (1 / 200 : ℝ) ∧ |
| 34 | ∀ (M : Type u) [TopologicalSpace M] |
| 35 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 36 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 37 | (g : RiemannianMetric 3 M) (D : LeviCivitaData g) (K : NeckOnlyCover g), |
| 38 | K.epsilon ≤ epsilon0 → (∀ N ∈ K.necks, N.connection = D) → |
| 39 | g.volumeMeasure univ ≠ ⊤ → |
| 40 | ∀ (U : Set M) (A : OpenCylinderModel U) (W : Set M), |
| 41 | W = A.tail true (1 / 2) → IsOpen W → IsCompact (frontier W) → |
| 42 | W ⊆ K.X → closure W ⊆ U → |
| 43 | ∃ Z : OpenCylinderModel W, |
| 44 | (∃ B : ℝ, ∀ x ∈ Z.tail false (1 / 2), D.scalarCurvature x ≤ B) ∧ |
| 45 | (∀ B : ℝ, ∃ a ∈ Ioo (0 : ℝ) 1, |
| 46 | ∀ x ∈ Z.tail true a, B < D.scalarCurvature x) ∧ |
| 47 | ∀ x ∈ Z.tail true (1 / 2), |
| 48 | ∃ N ∈ K.necks, N.center = x ∧ N.connection = D ∧ N.carrier ⊆ W := by |
| 49 | obtain ⟨epsilon0, hpos, hsmall, hratio⟩ := tube.exists_cylinder_scalar_ratio_accuracy.{u} |
| 50 | refine ⟨epsilon0, hpos, hsmall, ?_⟩ |
| 51 | intro M _ _ _ _ _ instT3 g D K hepsilon hD hfinite U A W hWA hWo hfront hWK hclosure |
| 52 | let : T2Space M := @T25Space.t2Space M _ (@T3Space.t25Space M _ instT3) |
| 53 | have hWU : W ⊆ U := hWA.symm ▸ A.tail_subset_m28 true (by norm_num) (by norm_num) |
| 54 | have hheight : Continuous (fun x : U => (A.inverse x).2) := continuous_snd.comp |
| 55 | (A.inverse_smooth.continuousOn.comp_continuous continuous_subtype_val (fun x => x.property)) |
| 56 | have hside (x : U) (hx : (1 / 2 : ℝ) < (A.inverse x).2) : x.val ∈ W := by |
| 57 | rw [hWA] |
| 58 | exact (A.mem_tail_iff_m28 true (by norm_num) (by norm_num)).mpr ⟨x.property, hx⟩ |
| 59 | have hdiverge := scalar_diverges_on_proper_neck_cover_end K D hD hfinite |
| 60 | (fun x : U => (A.inverse x).2) hheight |
| 61 | (fun x => (A.inverse_mem x x.property).2.2) hWK hclosure hside |
| 62 | obtain ⟨B0, hB0⟩ := hfront.bddAbove_image D.continuous_scalarCurvature.continuousOn |
| 63 | obtain ⟨d, hd, hd1, hhigh⟩ := hdiverge (2 * B0) |
| 64 | let alpha : ℝ := 2 * d - 1 |
| 65 | have halpha : alpha ∈ Ioo (0 : ℝ) 1 := by |
| 66 | dsimp [alpha] |
| 67 | constructor <;> linarith |
| 68 | have hR := A.exists_positive_tail_model (by norm_num : (0 : ℝ) < 1 / 2) |
| 69 | (by norm_num : (1 / 2 : ℝ) < 1) |
| 70 | rw [← hWA] at hR |
| 71 | obtain ⟨R, _hcR, hvR⟩ := hR |
| 72 | obtain ⟨Z, _hcZ, hvZ, hhalf⟩ := R.exists_midlevel_model halpha |
| 73 | have hread (x : M) : (R.inverse x).2 = 2 * (A.inverse x).2 - 1 := by |
| 74 | rw [hvR] |
| 75 | dsimp |
| 76 | ring |
| 77 | refine ⟨Z, ?_, ?_, ?_⟩ |
| 78 | · have hupper : (1 + alpha) / 2 < 1 := by linarith [halpha.2] |
| 79 | obtain ⟨B, hB⟩ := (A.isCompact_compactSlab |
| 80 | (by norm_num : (0 : ℝ) < 1 / 2) hupper).bddAbove_image |
| 81 | D.continuous_scalarCurvature.continuousOn |
| 82 | refine ⟨B, ?_⟩ |
| 83 | intro x hx |
| 84 | have hxZ := (Z.mem_tail_iff_m28 false (by norm_num) (by norm_num)).mp hx |
| 85 | have hlow := (A.mem_tail_iff_m28 true (by norm_num) (by norm_num)).mp (hWA ▸ hxZ.1) |
| 86 | have hRle : (R.inverse x).2 ≤ alpha := by |
| 87 | by_contra! hnot |
| 88 | have hh := (hhalf x hxZ.1).mpr hnot |
| 89 | exact (not_lt_of_ge hh.le) hxZ.2 |
| 90 | have hslab : x ∈ A.compactSlab (1 / 2) ((1 + alpha) / 2) := by |
| 91 | apply (A.mem_compactSlab_iff (by norm_num) hupper).mpr |
| 92 | refine ⟨hWU hxZ.1, hlow.2.le, ?_⟩ |
| 93 | rw [hread] at hRle |
| 94 | linarith |
| 95 | exact hB (mem_image_of_mem D.scalarCurvature hslab) |
| 96 | · intro B |
| 97 | obtain ⟨e, he, he1, hB⟩ := hdiverge B |
| 98 | have ht : 2 * e - 1 ∈ Ioo (0 : ℝ) 1 := by constructor <;> linarith |
| 99 | have hbeta : 1 - alpha ∈ Ioo (0 : ℝ) 1 := |
| 100 | ⟨sub_pos.mpr halpha.2, by linarith [halpha.1]⟩ |
| 101 | let c := Poincare.unitIntervalReparam (1 - alpha) (2 * e - 1) |
| 102 | have hc : c ∈ Ioo (0 : ℝ) 1 := |
| 103 | (Poincare.unitIntervalReparam_properties hbeta).2.1 ht |
| 104 | refine ⟨c, hc, ?_⟩ |
| 105 | intro x hx |
| 106 | have hxZ := (Z.mem_tail_iff_m28 true hc.1 hc.2).mp hx |
| 107 | have hheightZ : Poincare.unitIntervalReparam (1 - alpha) (2 * e - 1) < |
| 108 | Poincare.unitIntervalReparam (1 - alpha) (R.inverse x).2 := by |
| 109 | simpa only [hvZ, if_true, c] using hxZ.2 |
| 110 | have hh := ((Poincare.unitIntervalReparam_strictMonoOn hbeta).lt_iff_lt |
| 111 | ht (R.inverse_mem x hxZ.1).2).mp hheightZ |
| 112 | apply hB ⟨x, hWU hxZ.1⟩ |
| 113 | rw [hread] at hh |
| 114 | linarith |
| 115 | · intro x hx |
| 116 | have hxZ := (Z.mem_tail_iff_m28 true (by norm_num) (by norm_num)).mp hx |
| 117 | have hRhigh := (hhalf x hxZ.1).mp hxZ.2 |
| 118 | have hAhigh : d < (A.inverse x).2 := by |
| 119 | rw [hread] at hRhigh |
| 120 | dsimp [alpha] at hRhigh |
| 121 | linarith |
| 122 | have hxhigh := hhigh ⟨x, hWU hxZ.1⟩ hAhigh |
| 123 | obtain ⟨N, hN, hcenter⟩ := K.pointwise_center_cover x (hWK hxZ.1) |
| 124 | have hepsN : N.epsilon ≤ epsilon0 := (K.neck_epsilon N hN).trans_le hepsilon |
| 125 | have hNc : N.center ∈ N.carrier := N.central_sphere_subset N.center_on_central_sphere |
| 126 | have hdisj : Disjoint (frontier W) N.carrier := by |
| 127 | apply disjoint_left.mpr |
| 128 | intro y hyfront hyN |
| 129 | have hybound := hB0 (mem_image_of_mem D.scalarCurvature hyfront) |
| 130 | have hcompare := hratio M g D N hepsN N.center hNc y hyN |
| 131 | rw [hcenter] at hcompare |
| 132 | linarith |
| 133 | have hsub : N.carrier ⊆ W := by |
| 134 | let : ConnectedSpace N.carrier := Subtype.connectedSpace N.isConnected_carrier |
| 135 | have hclopen : IsClopen ((Subtype.val : N.carrier → M) ⁻¹' W) := |
| 136 | isClopen_preimage_val hWo hdisj |
| 137 | have hfull := hclopen.eq_univ ⟨⟨N.center, hNc⟩, hcenter.symm ▸ hxZ.1⟩ |
| 138 | intro y hy |
| 139 | have hh : (⟨y, hy⟩ : N.carrier) ∈ (univ : Set N.carrier) := mem_univ _ |
| 140 | rw [← hfull] at hh |
| 141 | exact hh |
| 142 | exact ⟨N, hN, hcenter, hD N hN, hsub⟩ |
| 143 | |
| 144 | end PoincareMT.M28 |