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.CanonicalInduction.Limit.Noncollapse.LimitNoncollapseFiniteHarnackDomain |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.BoundedFlow |
| 3 | import PoincareLib.Geometry.RicciFlow.Harnack.Path.Comparison |
| 4 | |
| 5 | /-! |
| 6 | # Finite Harnack through the included terminal slice |
| 7 | |
| 8 | The finite integrated estimate is assembled from its proved lower components |
| 9 | using the actual compact-time bounds. Its constant-path limit retains zero. |
| 10 | Source: MT Proposition 17.1; reviewed limit-tail-finite-harnack-distance F1. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M47 |
| 21 | |
| 22 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 23 | TopologicalSpace L.carrier.carrier := L.carrier.topologicalSpace |
| 24 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 25 | ChartedSpace (EuclideanSpace ℝ (Fin 3)) L.carrier.carrier := L.carrier.chartedSpace |
| 26 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 27 | IsManifold (𝓡 3) ∞ L.carrier.carrier := L.carrier.isManifold |
| 28 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 29 | T3Space L.carrier.carrier := L.carrier.t3Space |
| 30 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 31 | SecondCountableTopology L.carrier.carrier := L.carrier.secondCountable |
| 32 | private local instance {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 33 | ConnectedSpace L.carrier.carrier := L.connectedSpace |
| 34 | |
| 35 | /-- Constant-path finite integrated Harnack with the original left origin. -/ |
| 36 | theorem limitFinite_interior_harnack (h04 : RicciFlowCurvatureTheory.{u}) |
| 37 | {H : ℝ≥0∞} (hH : 0 < H) (hfinite : H ≠ ⊤) |
| 38 | (L : BlowupLimitFlow.{u} (blowupBackwardInterval H)) |
| 39 | {a b : ℝ} (ha : -H.toReal < a) (hab : a < b) (hb : b < 0) |
| 40 | (x : L.carrier.carrier) : |
| 41 | (L.flow.connection a).scalarCurvature x * (a + H.toReal) ≤ |
| 42 | (L.flow.connection b).scalarCurvature x * (b + H.toReal) := by |
| 43 | let F := limitFiniteOpenFlow hH hfinite L |
| 44 | have hsub : Ioo (-H.toReal) 0 ⊆ blowupBackwardInterval H := by |
| 45 | rw [limitFinite_domain_eq hfinite] |
| 46 | exact Ioo_subset_Ioc_self |
| 47 | have hc : ∀ t ∈ Ioo (-H.toReal) 0, MetricComplete (F.metric t) := |
| 48 | fun t ht => L.complete t (hsub ht) |
| 49 | have hn : ∀ t ∈ Ioo (-H.toReal) 0, ∀ y, |
| 50 | (F.connection t).NonnegativeCurvatureOperator y := |
| 51 | fun t ht => L.nonnegative_curvature_operator t (hsub ht) |
| 52 | have hbound : ∀ c d : ℝ, c < d → Icc c d ⊆ Ioo (-H.toReal) 0 → |
| 53 | ∃ K : ℝ, ∀ s ∈ Icc c d, ∀ y, (F.connection s).curvatureTensorNorm y ≤ K := by |
| 54 | intro c d _ hcd |
| 55 | obtain ⟨K, _, hK⟩ := L.curvature_locally_bounded_in_time (Icc c d) |
| 56 | isCompact_Icc (hcd.trans hsub) |
| 57 | exact ⟨K, fun s hs y => (le_abs_self _).trans (hK s hs y)⟩ |
| 58 | have hdiff := Poincare.RicciFlow.Harnack.finite_differential_of_curvature_slab_bounds |
| 59 | h04 F hc hn hbound |
| 60 | have hi := Poincare.Geometry.RicciFlow.Harnack.finite_integrated_of_differential |
| 61 | h04 ha hab hb F hn hdiff (fun _ => x) contMDiffOn_const rfl rfl |
| 62 | simpa [spacetimeEnergy, F, limitFiniteOpenFlow, |
| 63 | Poincare.Geometry.RicciFlow.Harnack.restrictFlow] using hi |
| 64 | |
| 65 | /-- The included terminal limit of the exact finite weighted estimate. -/ |
| 66 | theorem limitFinite_weighted_scalar (h04 : RicciFlowCurvatureTheory.{u}) |
| 67 | {H : ℝ≥0∞} (hH : 0 < H) (hfinite : H ≠ ⊤) |
| 68 | (L : BlowupLimitFlow.{u} (blowupBackwardInterval H)) |
| 69 | (t : ℝ) (ht : t ∈ blowupBackwardInterval H) (x : L.carrier.carrier) : |
| 70 | 0 ≤ (L.flow.connection t).scalarCurvature x ∧ |
| 71 | (L.flow.connection t).scalarCurvature x * (t + H.toReal) ≤ |
| 72 | (L.flow.connection 0).scalarCurvature x * H.toReal := by |
| 73 | refine ⟨limitFinite_scalar_nonneg h04 L t ht x, ?_⟩ |
| 74 | have ht' : t ∈ Ioc (-H.toReal) 0 := by rwa [← limitFinite_domain_eq hfinite] |
| 75 | rcases lt_or_eq_of_le ht'.2 with hneg | rfl |
| 76 | · have hsub : Ioo t 0 ⊆ blowupBackwardInterval H := by |
| 77 | rw [limitFinite_domain_eq hfinite] |
| 78 | exact fun _ hs => ⟨ht'.1.trans hs.1, hs.2.le⟩ |
| 79 | have hc := (Poincare.Geometry.RicciFlow.Harnack.scalarCurvature_contDiffOn_time |
| 80 | h04 _ L.flow x).continuousOn 0 L.zero_mem |
| 81 | have hzero : (0 : ℝ) ∈ closure (Ioo t 0) := by |
| 82 | rw [closure_Ioo hneg.ne] |
| 83 | exact ⟨hneg.le, le_rfl⟩ |
| 84 | have h := ContinuousWithinAt.closure_le hzero continuousWithinAt_const |
| 85 | ((hc.mono hsub).mul (continuousWithinAt_id.add continuousWithinAt_const)) |
| 86 | (fun b hb => limitFinite_interior_harnack h04 hH hfinite L ht'.1 hb.1 hb.2 x) |
| 87 | simpa only [Pi.mul_apply, Pi.add_apply, id_eq, zero_add] using h |
| 88 | · simp |
| 89 | |
| 90 | /-- Any supplied terminal scalar ceiling gives the finite Harnack ceiling. -/ |
| 91 | theorem limitFinite_scalar_le (h04 : RicciFlowCurvatureTheory.{u}) |
| 92 | {H : ℝ≥0∞} (hH : 0 < H) (hfinite : H ≠ ⊤) |
| 93 | (L : BlowupLimitFlow.{u} (blowupBackwardInterval H)) {Q : ℝ} |
| 94 | (hQ0 : ∀ x : L.carrier.carrier, (L.flow.connection 0).scalarCurvature x ≤ Q) |
| 95 | (t : ℝ) (ht : t ∈ blowupBackwardInterval H) (x : L.carrier.carrier) : |
| 96 | (L.flow.connection t).scalarCurvature x ≤ Q * H.toReal / (t + H.toReal) := by |
| 97 | have ht' : t ∈ Ioc (-H.toReal) 0 := by rwa [← limitFinite_domain_eq hfinite] |
| 98 | apply (le_div_iff₀ (by linarith [ht'.1] : 0 < t + H.toReal)).mpr |
| 99 | exact (limitFinite_weighted_scalar h04 hH hfinite L t ht x).2.trans |
| 100 | (mul_le_mul_of_nonneg_right (hQ0 x) (limitFinite_horizon_pos hH hfinite).le) |
| 101 | |
| 102 | /-- The source terminal norm bound supplies the reviewed scalar constant. -/ |
| 103 | theorem limitFinite_scalar_harnack (h04 : RicciFlowCurvatureTheory.{u}) |
| 104 | {H : ℝ≥0∞} (hH : 0 < H) (hfinite : H ≠ ⊤) |
| 105 | (L : BlowupLimitFlow.{u} (blowupBackwardInterval H)) {B0 : ℝ} |
| 106 | (hterminal : ∀ x : L.carrier.carrier, |
| 107 | (L.flow.connection 0).curvatureTensorNorm x ≤ B0) |
| 108 | (t : ℝ) (ht : t ∈ blowupBackwardInterval H) (x : L.carrier.carrier) : |
| 109 | 0 ≤ (L.flow.connection t).scalarCurvature x ∧ |
| 110 | (L.flow.connection t).scalarCurvature x * (t + H.toReal) ≤ |
| 111 | max 1 (3 * B0) * H.toReal := by |
| 112 | have h := limitFinite_weighted_scalar h04 hH hfinite L t ht x |
| 113 | refine ⟨h.1, h.2.trans (mul_le_mul_of_nonneg_right ?_ |
| 114 | (limitFinite_horizon_pos hH hfinite).le)⟩ |
| 115 | exact ((L.flow.connection 0).scalarCurvature_le_curvatureTensorNorm_sharp x).trans |
| 116 | ((mul_le_mul_of_nonneg_left (hterminal x) (by norm_num)).trans (le_max_right _ _)) |
| 117 | |
| 118 | /-- A compact finite slab has its explicit Ricci ceiling from Harnack. -/ |
| 119 | theorem limitFinite_ricci_slab (h04 : RicciFlowCurvatureTheory.{u}) |
| 120 | {H : ℝ≥0∞} (hH : 0 < H) (hfinite : H ≠ ⊤) |
| 121 | (L : BlowupLimitFlow.{u} (blowupBackwardInterval H)) {Q : ℝ} (hQ : 0 < Q) |
| 122 | (hQ0 : ∀ x : L.carrier.carrier, (L.flow.connection 0).scalarCurvature x ≤ Q) |
| 123 | {a b : ℝ} (ha : -H.toReal < a) (hb : b ≤ 0) |
| 124 | (t : ℝ) (ht : t ∈ Icc a b) (x : L.carrier.carrier) |
| 125 | (v : TangentSpace (𝓡 3) x) : |
| 126 | 0 ≤ (L.flow.connection t).ricci x v v ∧ |
| 127 | (L.flow.connection t).ricci x v v ≤ |
| 128 | (Q * H.toReal / (a + H.toReal)) * (L.flow.metric t).inner x v v := by |
| 129 | have htJ : t ∈ blowupBackwardInterval H := by |
| 130 | rw [limitFinite_domain_eq hfinite] |
| 131 | exact ⟨ha.trans_le ht.1, ht.2.trans hb⟩ |
| 132 | have hRic := limitFinite_ricci_bounds h04 L t htJ x v |
| 133 | have hscalar := limitFinite_scalar_le h04 hH hfinite L hQ0 t htJ x |
| 134 | have hle : Q * H.toReal / (t + H.toReal) ≤ Q * H.toReal / (a + H.toReal) := |
| 135 | div_le_div_of_nonneg_left (mul_nonneg hQ.le (limitFinite_horizon_pos hH hfinite).le) |
| 136 | (by linarith) (by linarith [ht.1]) |
| 137 | have hg : 0 ≤ (L.flow.metric t).inner x v v := by |
| 138 | by_cases hv : v = 0 |
| 139 | · subst v; simp |
| 140 | · exact ((L.flow.metric t).pos x v hv).le |
| 141 | exact ⟨hRic.1, hRic.2.trans (mul_le_mul_of_nonneg_right (hscalar.trans hle) hg)⟩ |
| 142 | |
| 143 | end PoincareMT.M47 |