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.Surgery.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.InitialCanonicalSlab |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.FarTipUniformWindow |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.IndependentScalarRate |
| 5 | |
| 6 | /-! |
| 7 | # The exact canonical alternatives from the two terminal regions |
| 8 | |
| 9 | Morgan-Tian Theorem 12.32, pp. 326-327. The independent scalar lower |
| 10 | rate places every sufficiently late point above both fixed thresholds. |
| 11 | The actual initial-slab theorem covers the remaining closed interval. |
| 12 | The only input below is the literal bounded-tip terminal cap producer; |
| 13 | the other alternatives already retain their exact frozen clocks. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff Bundle Topology |
| 20 | |
| 21 | namespace PoincareMT.M35.Uniqueness |
| 22 | |
| 23 | /-- Theorem 12.32: the literal bounded-tip cap producer completes |
| 24 | the canonical package with one constant chosen before point and time. -/ |
| 25 | theorem canonical_of_bounded_tip_caps |
| 26 | (P : M35StandardCapPredecessors) {g₀ : StandardInitialMetric} |
| 27 | (E : RepairedStandardCapExistenceData g₀) (epsilon : ℝ) |
| 28 | (he : 0 < epsilon) (hehalf : epsilon < 1 / 2) |
| 29 | (hbounded : ∀ D : ℝ, 0 ≤ D → ∃ C₀ H : ℝ, 0 < C₀ ∧ 0 < H ∧ |
| 30 | ∀ C ≥ C₀, ∀ t, ∀ _ht : t ∈ Ico 0 E.flow.base.lifetime, |
| 31 | ∀ x : StandardCapSpace, H ≤ (E.flow.connection t).scalarCurvature x → |
| 32 | ((E.flow.metric t).edist 0 x).toReal * |
| 33 | Real.sqrt ((E.flow.connection t).scalarCurvature x) ≤ D → |
| 34 | Nonempty (StandardCapNeighborhood E.atlas E.flow t epsilon C x)) : |
| 35 | ∃ C : ℝ, 0 < C ∧ ∀ t ∈ Ico 0 E.flow.base.lifetime, |
| 36 | ∀ x : StandardCapSpace, |
| 37 | StandardCanonicalAlternative E.atlas E.flow t x epsilon C := by |
| 38 | obtain ⟨B, hB, hfar⟩ := OrdinaryRealization.exists_far_tip_prescribed_window_threshold |
| 39 | P E epsilon he hehalf |
| 40 | obtain ⟨C₀, H, hC₀, _hH, hnear⟩ := hbounded B hB.le |
| 41 | obtain ⟨c, hc, hrate⟩ := E.scalar_lower_rate_from_unit_time P |
| 42 | let M := max B H |
| 43 | have hM : 0 < M := hB.trans_le (le_max_left _ _) |
| 44 | let theta := max (1 / 2 : ℝ) (1 - c / M) |
| 45 | have htheta : 0 < theta := (by norm_num : (0 : ℝ) < 1 / 2).trans_le |
| 46 | (le_max_left _ _) |
| 47 | have hthetaone : theta < 1 := max_lt (by norm_num) |
| 48 | (sub_lt_self 1 (div_pos hc hM)) |
| 49 | have hthetalt : theta < E.flow.base.lifetime := E.lifetime_one.symm ▸ hthetaone |
| 50 | obtain ⟨C₁, _hC₁, hinitial⟩ := initial_slab_canonical P E htheta hthetalt he hehalf |
| 51 | refine ⟨max C₀ C₁, hC₀.trans_le (le_max_left _ _), ?_⟩ |
| 52 | intro t ht x |
| 53 | by_cases htinitial : t ≤ theta |
| 54 | · exact hinitial (max C₀ C₁) (le_max_right _ _) t ⟨ht.1, htinitial⟩ x |
| 55 | · have htlater : theta ≤ t := (lt_of_not_ge htinitial).le |
| 56 | have htone : t < 1 := E.lifetime_one ▸ ht.2 |
| 57 | have hden : 0 < 1 - t := sub_pos.mpr htone |
| 58 | have hclock : 1 - t ≤ c / M := by |
| 59 | have h := (le_max_right (1 / 2 : ℝ) (1 - c / M)).trans htlater |
| 60 | linarith only [h] |
| 61 | have hproduct : M * (1 - t) ≤ c := calc |
| 62 | M * (1 - t) ≤ M * (c / M) := mul_le_mul_of_nonneg_left hclock hM.le |
| 63 | _ = c := mul_div_cancel₀ c hM.ne' |
| 64 | have hhigh : M ≤ (E.flow.connection t).scalarCurvature x := |
| 65 | ((le_div_iff₀ hden).mpr hproduct).trans (hrate t ht x) |
| 66 | by_cases hdist : B ≤ ((E.flow.metric t).edist 0 x).toReal * |
| 67 | Real.sqrt ((E.flow.connection t).scalarCurvature x) |
| 68 | · obtain ⟨N⟩ := hfar t ht x ((le_max_left B H).trans hhigh) hdist |
| 69 | exact StandardCanonicalAlternative.evolving_neck N |
| 70 | · obtain ⟨N⟩ := hnear (max C₀ C₁) (le_max_left _ _) t ht x |
| 71 | ((le_max_right B H).trans hhigh) (le_of_not_ge hdist) |
| 72 | exact StandardCanonicalAlternative.cap N |
| 73 | |
| 74 | end PoincareMT.M35.Uniqueness |