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.CylinderEndRegions |
| 4 | |
| 5 | /-! |
| 6 | # Move any proper scalar threshold to the cylinder middle |
| 7 | |
| 8 | The same open carrier retains its bounded negative half and uniform |
| 9 | positive-end divergence after a smooth middle-height adjustment. |
| 10 | Source: Morgan--Tian Claim 10.8, p. 254; M28 derivation 108. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.OpenCylinderModel |
| 21 | |
| 22 | variable {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] {U : Set M} |
| 24 | |
| 25 | /-- A continuous uniformly divergent function exceeds any fixed bound |
| 26 | on the positive half of a new smooth model on the same carrier. Its |
| 27 | negative half remains bounded. Source: Claim 10.8; M28 derivation 108. -/ |
| 28 | theorem exists_high_midlevel_model (T : OpenCylinderModel U) |
| 29 | (R : M → ℝ) (hR : ContinuousOn R U) |
| 30 | (hnegative : ∃ B : ℝ, ∀ x ∈ T.tail false (1 / 2), R x ≤ B) |
| 31 | (hdiverge : ∀ B : ℝ, ∃ a ∈ Ioo (0 : ℝ) 1, |
| 32 | ∀ x ∈ T.tail true a, B < R x) (B : ℝ) : |
| 33 | ∃ Z : OpenCylinderModel U, |
| 34 | (∃ C : ℝ, ∀ x ∈ Z.tail false (1 / 2), R x ≤ C) ∧ |
| 35 | (∀ C : ℝ, ∃ a ∈ Ioo (0 : ℝ) 1, ∀ x ∈ Z.tail true a, C < R x) ∧ |
| 36 | ∀ x ∈ Z.tail true (1 / 2), B < R x := by |
| 37 | obtain ⟨d, hd, hhigh⟩ := hdiverge B |
| 38 | let c := max d (1 / 2 : ℝ) |
| 39 | have hc : c ∈ Ioo (0 : ℝ) 1 := |
| 40 | ⟨lt_of_lt_of_le (by norm_num) (le_max_right _ _), max_lt hd.2 (by norm_num)⟩ |
| 41 | obtain ⟨Z, _hcoordinate, hinverse, hhalf⟩ := T.exists_midlevel_model hc |
| 42 | refine ⟨Z, ?_, ?_, ?_⟩ |
| 43 | · obtain ⟨C0, hC0⟩ := hnegative |
| 44 | obtain ⟨C1, hC1⟩ := (T.isCompact_compactSlab |
| 45 | (by norm_num : (0 : ℝ) < 1 / 2) hc.2).bddAbove_image |
| 46 | (hR.mono (T.compactSlab_subset (by norm_num) hc.2)) |
| 47 | refine ⟨max C0 C1, ?_⟩ |
| 48 | intro x hx |
| 49 | have hxZ := (Z.mem_tail_iff_m28 false (by norm_num) (by norm_num)).mp hx |
| 50 | have hxle : (T.inverse x).2 ≤ c := by |
| 51 | by_contra! hnot |
| 52 | have hh := (hhalf x hxZ.1).mpr hnot |
| 53 | exact (not_lt_of_ge hh.le) hxZ.2 |
| 54 | by_cases hlow : (T.inverse x).2 < 1 / 2 |
| 55 | · exact (hC0 x ((T.mem_tail_iff_m28 false (by norm_num) (by norm_num)).mpr |
| 56 | ⟨hxZ.1, hlow⟩)).trans (le_max_left _ _) |
| 57 | · have hslab : x ∈ T.compactSlab (1 / 2) c := |
| 58 | (T.mem_compactSlab_iff (by norm_num) hc.2).mpr |
| 59 | ⟨hxZ.1, le_of_not_gt hlow, hxle⟩ |
| 60 | exact (hC1 (mem_image_of_mem R hslab)).trans (le_max_right _ _) |
| 61 | · intro C |
| 62 | obtain ⟨e, he, hC⟩ := hdiverge C |
| 63 | have hbeta : 1 - c ∈ Ioo (0 : ℝ) 1 := ⟨sub_pos.mpr hc.2, by linarith [hc.1]⟩ |
| 64 | let a := Poincare.unitIntervalReparam (1 - c) e |
| 65 | have ha : a ∈ Ioo (0 : ℝ) 1 := |
| 66 | (Poincare.unitIntervalReparam_properties hbeta).2.1 he |
| 67 | refine ⟨a, ha, ?_⟩ |
| 68 | intro x hx |
| 69 | have hxZ := (Z.mem_tail_iff_m28 true ha.1 ha.2).mp hx |
| 70 | have hh : Poincare.unitIntervalReparam (1 - c) e < |
| 71 | Poincare.unitIntervalReparam (1 - c) (T.inverse x).2 := by |
| 72 | simpa only [hinverse, if_true, a] using hxZ.2 |
| 73 | have hold := ((Poincare.unitIntervalReparam_strictMonoOn hbeta).lt_iff_lt |
| 74 | he (T.inverse_mem x hxZ.1).2).mp hh |
| 75 | exact hC x ((T.mem_tail_iff_m28 true he.1 he.2).mpr ⟨hxZ.1, hold⟩) |
| 76 | · intro x hx |
| 77 | have hxZ := (Z.mem_tail_iff_m28 true (by norm_num) (by norm_num)).mp hx |
| 78 | have hheight := (hhalf x hxZ.1).mp hxZ.2 |
| 79 | exact hhigh x ((T.mem_tail_iff_m28 true hd.1 hd.2).mpr |
| 80 | ⟨hxZ.1, (le_max_left _ _).trans_lt hheight⟩) |
| 81 | |
| 82 | end PoincareMT.OpenCylinderModel |