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.Completeness |
| 2 | |
| 3 | /-! |
| 4 | # Completeness at the endpoint of an actual closed slab |
| 5 | |
| 6 | Morgan--Tian, Lemma 3.15, p. 42, and Proposition 5.14, pp. 90-91; |
| 7 | Topping, Theorem 1.7, p. 179. Radius-dependent curvature bounds on terminal |
| 8 | balls compare the actual terminal distances with those of a supplied |
| 9 | complete earlier slice. The generic main completeness transfer then applies |
| 10 | on the same carrier. Only the included closed slab is used. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle ENNReal NNReal Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M30 |
| 22 | |
| 23 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 24 | FlowCarrier.isManifold FlowCarrier.t2Space |
| 25 | |
| 26 | /-- Morgan--Tian, Lemma 3.15, p. 42, and Proposition 5.14, pp. 90-91; |
| 27 | Topping, Theorem 1.7, p. 179: a complete earlier slice and local curvature |
| 28 | bounds on terminal balls, uniform on one included closed slab, make the |
| 29 | actual terminal metric complete on the same carrier. -/ |
| 30 | theorem metricComplete_terminal_of_closed_slab_curvature_bound |
| 31 | {n : ℕ} (C : FlowCarrier.{u} n) {J : Set ℝ} |
| 32 | (F : RicciFlow n C.carrier J) (p : C.carrier) |
| 33 | {a : ℝ} (ha : a ≤ 0) (hslab : Icc a 0 ⊆ J) |
| 34 | (hcomplete : C.metricComplete (F.metric a)) |
| 35 | (hcurv : ∀ A : ℝ, 0 < A → ∃ K : ℝ, 0 ≤ K ∧ |
| 36 | ∀ t ∈ Icc a 0, ∀ x ∈ (F.metric 0).ball p A, |
| 37 | (F.connection t).curvatureTensorNorm x ≤ K) : |
| 38 | C.metricComplete (F.metric 0) := by |
| 39 | let d₀ := (C.metricEMetricSpace (F.metric a)).toPseudoEMetricSpace |
| 40 | let d₁ := (C.metricEMetricSpace (F.metric 0)).toPseudoEMetricSpace |
| 41 | change @CompleteSpace C.carrier d₁.toUniformSpace |
| 42 | apply Poincare.completeSpace_of_continuous_local_edist_bound d₀ d₁ p hcomplete |
| 43 | · change @Continuous C.carrier C.carrier C.topologicalSpace C.topologicalSpace id |
| 44 | exact continuous_id |
| 45 | · exact fun x => @Poincare.edist_ne_top_of_preconnected C.carrier d₁ |
| 46 | (C.preconnected_metricEMetricSpace (F.metric 0)) x p |
| 47 | · intro R |
| 48 | let r : ℝ := R + 1 |
| 49 | have hr : 0 < r := by dsimp only [r]; positivity |
| 50 | obtain ⟨K, _, hK⟩ := hcurv (3 * r) (by positivity) |
| 51 | let L : ℝ := (n : ℝ) ^ 3 * K |
| 52 | let E : ℝ := Real.exp (L * |a|) |
| 53 | refine ⟨Real.toNNReal E, fun x y hx hy => ?_⟩ |
| 54 | have hRic : ∀ t ∈ Icc a 0, ∀ z ∈ (F.metric 0).ball p (3 * r), |
| 55 | ∀ v : C.tangent z, |
| 56 | |(F.connection t).ricci z v v| ≤ L * (F.metric t).inner z v v := by |
| 57 | intro t ht z hz v |
| 58 | have hQ : 0 ≤ (F.metric t).inner z v v := by |
| 59 | by_cases hv : v = 0 |
| 60 | · subst v; simp |
| 61 | · exact ((F.metric t).pos z v hv).le |
| 62 | have hnorm := (F.connection t).abs_ricci_quadratic_le_curvatureTensorNorm z v |
| 63 | have hdim : Module.finrank ℝ (TangentSpace (𝓡 n) z) = n := |
| 64 | finrank_euclideanSpace_fin |
| 65 | simp only [Fintype.card_fin, hdim] at hnorm |
| 66 | exact hnorm.trans (mul_le_mul_of_nonneg_right |
| 67 | (mul_le_mul_of_nonneg_left (hK t ht z hz) (by positivity)) hQ) |
| 68 | have hR : (R : ℝ≥0∞) < ENNReal.ofReal r := by |
| 69 | rw [← ENNReal.ofReal_coe_nnreal] |
| 70 | exact ENNReal.ofReal_lt_ofReal_iff hr |>.mpr (by dsimp only [r]; linarith) |
| 71 | have hmem (z : C.carrier) (hz : d₁.edist z p ≤ R) : |
| 72 | z ∈ (F.metric 0).ball p r := by |
| 73 | change d₁.edist p z < ENNReal.ofReal r |
| 74 | rw [d₁.edist_comm] |
| 75 | exact hz.trans_lt hR |
| 76 | have hdist := F.edist_le_exp_mul_of_ricci_bound (convex_Icc a 0) |
| 77 | hslab p r L hr |
| 78 | (show (0 : ℝ) ∈ Icc a 0 from ⟨ha, le_rfl⟩) |
| 79 | (show a ∈ Icc a 0 from ⟨le_rfl, ha⟩) hRic (hmem x hx) (hmem y hy) |
| 80 | change (F.metric a).edist x y ≤ ENNReal.ofReal E * (F.metric 0).edist x y |
| 81 | simpa only [sub_zero] using hdist |
| 82 | |
| 83 | end PoincareMT.M30 |