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.Blowup.Construction.ShortTime.ParallelSections.FiniteLocalNullSections |
| 2 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.ShortTime.Nullity.NullNeckBound |
| 3 | import PoincareLib.Geometry.RicciFlow.Local.Connection.CurvatureIndependence |
| 4 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.Neck.Separation.Scale |
| 5 | import PoincareLib.Geometry.Riemannian.Curvature.Scalar.Regularity |
| 6 | |
| 7 | /-! |
| 8 | # Terminal boundedness from the local limit flows |
| 9 | |
| 10 | Morgan--Tian Claim 11.7, pp. 270--271: finite local backward extensions, |
| 11 | nonnegative curvature and the canonical neck-scale comparison bound the |
| 12 | terminal curvature. The local flow intervals may depend on their domains. |
| 13 | The null branch uses the compact transverse flowout proved in NullNeckBound. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set Manifold PoincareMT.RicciFlow.Splitting |
| 19 | open scoped Manifold ContDiff Bundle |
| 20 | |
| 21 | universe u v w |
| 22 | |
| 23 | namespace PoincareMT.M30 |
| 24 | |
| 25 | /-- A static cap supplies the neck-scale comparison used in Claim 11.7 |
| 26 | (pp. 270--271) through its end neck and Definition 9.72(5), p. 230. -/ |
| 27 | theorem exists_related_neck_of_static_canonical |
| 28 | {M : Type v} [TopologicalSpace M] [T3Space M] |
| 29 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 30 | [MeasurableSpace M] [BorelSpace M] |
| 31 | {g : RiemannianMetric 3 M} (D : LeviCivitaData g) |
| 32 | {epsilon C : ℝ} {x : M} |
| 33 | (hcanonical : |
| 34 | (∃ N : EpsilonNeck g, N.epsilon = epsilon ∧ N.center = x) ∨ |
| 35 | (∃ K : CapCertificate g, |
| 36 | K.epsilon = epsilon ∧ K.cap_constant ≤ C ∧ x ∈ K.carrier)) : |
| 37 | ∃ N : EpsilonNeck g, N.epsilon = epsilon ∧ |
| 38 | D.scalarCurvature x ≤ max 1 C * D.scalarCurvature N.center := by |
| 39 | rcases hcanonical with ⟨N, hN, rfl⟩ | ⟨K, hK, hKC, hxK⟩ |
| 40 | · refine ⟨N, hN, ?_⟩ |
| 41 | have hpos : 0 < D.scalarCurvature N.center := by |
| 42 | rw [D.scalarCurvature_eq N.connection] |
| 43 | exact N.scalar_center_pos |
| 44 | exact (one_mul _).symm.trans_le |
| 45 | (mul_le_mul_of_nonneg_right (le_max_left _ _) hpos.le) |
| 46 | · have hz : K.end_neck.center ∈ K.carrier := |
| 47 | K.end_neck_subset |
| 48 | (K.end_neck.central_sphere_subset K.end_neck.center_on_central_sphere) |
| 49 | have hzpos : 0 < D.scalarCurvature K.end_neck.center := by |
| 50 | rw [D.scalarCurvature_eq K.connection] |
| 51 | exact K.scalar_pos _ hz |
| 52 | obtain ⟨b, hb, hratio⟩ := K.scalar_ratio |
| 53 | have hratio' := hratio K.end_neck.center hz x hxK |
| 54 | rw [K.connection.scalarCurvature_eq D x, |
| 55 | K.connection.scalarCurvature_eq D K.end_neck.center] at hratio' |
| 56 | exact ⟨K.end_neck, K.end_neck_epsilon.trans hK, |
| 57 | hratio'.trans (mul_le_mul_of_nonneg_right |
| 58 | ((hb.le.trans hKC).trans (le_max_right _ _)) hzpos.le)⟩ |
| 59 | |
| 60 | /-- The canonical neck-scale comparison and actual finite local backward |
| 61 | flows imply bounded terminal curvature (Claim 11.7, pp. 270--271), with |
| 62 | one geometric accuracy threshold chosen before the manifold and flows. -/ |
| 63 | theorem exists_terminal_curvature_bound_threshold : |
| 64 | ∃ epsilon0 : ℝ, 0 < epsilon0 ∧ epsilon0 ≤ 1 / 200 ∧ |
| 65 | ∀ {ι : Type w} {N : ι → Type u} {M : Type v} |
| 66 | [∀ i, TopologicalSpace (N i)] [TopologicalSpace M] |
| 67 | [∀ i, T2Space (N i)] [∀ i, ConnectedSpace (N i)] |
| 68 | [T3Space M] [ConnectedSpace M] |
| 69 | [∀ i, ChartedSpace (EuclideanSpace ℝ (Fin 3)) (N i)] |
| 70 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 71 | [∀ i, IsManifold (𝓡 3) ∞ (N i)] [IsManifold (𝓡 3) ∞ M] |
| 72 | [MeasurableSpace M] [BorelSpace M], |
| 73 | ∀ (_hC : RicciFlowCurvatureTheory.{u}) |
| 74 | (a : ι → ℝ) (_ha : ∀ i, a i < 0) |
| 75 | (F : ∀ i, RicciFlow 3 (N i) (Icc (a i) 0)), |
| 76 | (∀ i, ∀ t ∈ Icc (a i) 0, ∀ z : N i, |
| 77 | ((F i).connection t).NonnegativeCurvatureOperator z) → |
| 78 | ∀ {g : RiemannianMetric 3 M} (D : LeviCivitaData g), |
| 79 | D.CurvatureTensorCalculus → MetricComplete g → |
| 80 | D.NonnegativeSectionalCurvature → |
| 81 | ∀ (e : ∀ i, N i → M), |
| 82 | (∀ i, IsLocalDiffeomorph (𝓡 3) (𝓡 3) ∞ (e i)) → |
| 83 | (∀ i, ∀ z : N i, ∀ v1 v2 : TangentSpace (𝓡 3) z, |
| 84 | ((F i).metric 0).inner z v1 v2 = g.inner (e i z) |
| 85 | (mfderiv (𝓡 3) (𝓡 3) (e i) z v1) |
| 86 | (mfderiv (𝓡 3) (𝓡 3) (e i) z v2)) → |
| 87 | ∀ p0 : M, D.curvatureTensorNorm p0 ≠ 0 → |
| 88 | (∀ x y : M, ∃ i, x ∈ range (e i) ∧ p0 ∈ range (e i) ∧ y ∈ range (e i)) → |
| 89 | ∀ epsilon C : ℝ, 0 < epsilon → epsilon ≤ epsilon0 → |
| 90 | (∀ x : M, 4 < D.scalarCurvature x → |
| 91 | (∃ N : EpsilonNeck g, N.epsilon = epsilon ∧ |
| 92 | D.scalarCurvature x ≤ max 1 C * D.scalarCurvature N.center) ∨ |
| 93 | IsCompact (univ : Set M)) → |
| 94 | ∃ B : ℝ, 4 ≤ B ∧ (∀ x : M, D.scalarCurvature x ≤ B) ∧ |
| 95 | ∀ x : M, |D.curvatureTensorNorm x| ≤ 13 * B := by |
| 96 | classical |
| 97 | obtain ⟨epsilonPos, hpos, _, hpositive⟩ := |
| 98 | RiemannianMetric.exists_universal_neck_scale_lower_bound.{v} |
| 99 | obtain ⟨epsilonNull, hnull, hsmall, hnullBound⟩ := |
| 100 | exists_neck_scalar_and_curvature_bound_of_local_parallel_null_sections.{v} |
| 101 | refine ⟨min epsilonPos epsilonNull, lt_min hpos hnull, |
| 102 | (min_le_right _ _).trans hsmall, ?_⟩ |
| 103 | intro ι N M _ _ _ _ _ _ _ _ _ _ _ _ hC a ha F hoperator |
| 104 | g D hD hcomplete hsec e he hmetric p0 hnonflat hcapture epsilon C hepsilon hle hcanonical |
| 105 | let : Nonempty M := ⟨p0⟩ |
| 106 | have hscalar : ∃ B : ℝ, 4 ≤ B ∧ ∀ x : M, D.scalarCurvature x ≤ B := by |
| 107 | by_cases hcompact : IsCompact (univ : Set M) |
| 108 | · obtain ⟨B, hB⟩ := hcompact.bddAbove_image |
| 109 | hD.contMDiff_scalarCurvature.continuous.continuousOn |
| 110 | exact ⟨max 4 B, le_max_left _ _, fun x => |
| 111 | (hB (mem_image_of_mem _ (mem_univ x))).trans (le_max_right _ _)⟩ |
| 112 | have hcanonical' (x : M) (hx : 4 < D.scalarCurvature x) : |
| 113 | ∃ N : EpsilonNeck g, N.epsilon = epsilon ∧ |
| 114 | D.scalarCurvature x ≤ max 1 C * D.scalarCurvature N.center := |
| 115 | (hcanonical x hx).resolve_right hcompact |
| 116 | by_cases hpositive' : D.StrictlyPositiveSectionalCurvature |
| 117 | · obtain ⟨rho, hrho, hfloor⟩ := hpositive M g D hcomplete hpositive' |
| 118 | epsilon hepsilon (hle.trans (min_le_left _ _)) |
| 119 | refine ⟨max 4 (max 1 C * rho ^ (-2 : ℝ)), le_max_left _ _, ?_⟩ |
| 120 | intro x |
| 121 | by_cases hx : 4 < D.scalarCurvature x |
| 122 | · obtain ⟨N, hN, hratio⟩ := hcanonical' x hx |
| 123 | have hcenter : 0 < D.scalarCurvature N.center := by |
| 124 | rw [D.scalarCurvature_eq N.connection] |
| 125 | exact N.scalar_center_pos |
| 126 | have hscale : N.scale = D.scalarCurvature N.center ^ (-1 / 2 : ℝ) := by |
| 127 | rw [D.scalarCurvature_eq N.connection] |
| 128 | exact N.scale_eq_scalar |
| 129 | have hneck : D.scalarCurvature N.center ≤ rho ^ (-2 : ℝ) := by |
| 130 | calc |
| 131 | D.scalarCurvature N.center = N.scale ^ (-2 : ℝ) := by |
| 132 | rw [hscale, ← Real.rpow_mul hcenter.le] |
| 133 | norm_num |
| 134 | _ ≤ rho ^ (-2 : ℝ) := |
| 135 | Real.rpow_le_rpow_of_nonpos hrho (hfloor N hN) (by norm_num) |
| 136 | exact (hratio.trans (mul_le_mul_of_nonneg_left hneck |
| 137 | (zero_le_one.trans (le_max_left _ _)))).trans (le_max_right _ _) |
| 138 | · exact (le_of_not_gt hx).trans (le_max_left _ _) |
| 139 | by_cases hlow : ∀ x : M, D.scalarCurvature x ≤ 4 |
| 140 | · exact ⟨4, le_rfl, hlow⟩ |
| 141 | push Not at hlow |
| 142 | obtain ⟨q, hq⟩ := hlow |
| 143 | obtain ⟨neck, hneck, _⟩ := hcanonical' q hq |
| 144 | unfold LeviCivitaData.StrictlyPositiveSectionalCurvature at hpositive' |
| 145 | push Not at hpositive' |
| 146 | obtain ⟨x, v1, v2, hv1, hv2, horth, hzero⟩ := hpositive' |
| 147 | have hzero' : D.curvatureTensor x v1 v2 v1 v2 = 0 := by |
| 148 | have hle' : D.curvatureTensor x v1 v2 v1 v2 ≤ 0 := by |
| 149 | simpa only [LeviCivitaData.sectionalCurvature, hv1, hv2, horth, |
| 150 | one_mul, zero_pow (by decide : 2 ≠ 0), sub_zero, div_one] using hzero |
| 151 | exact le_antisymm hle' (hsec x v1 v2) |
| 152 | obtain ⟨hdim, hlocal⟩ := terminal_nullity_and_local_parallel_sections |
| 153 | hC a ha F hoperator D e he hmetric p0 hnonflat x v1 v2 hv1 hv2 horth hzero' |
| 154 | (hcapture x) |
| 155 | obtain ⟨B, _, hB, _⟩ := hnullBound D hD hcomplete hsec hdim hlocal neck |
| 156 | (hneck ▸ hle.trans (min_le_right _ _)) |
| 157 | exact ⟨max 4 B, le_max_left _ _, fun y => |
| 158 | ((le_abs_self _).trans (hB y)).trans (le_max_right _ _)⟩ |
| 159 | obtain ⟨B, hB, hscalar⟩ := hscalar |
| 160 | refine ⟨B, hB, hscalar, ?_⟩ |
| 161 | intro x |
| 162 | have hleast : 0 ≤ D.leastSectionalCurvature x := by |
| 163 | apply Real.sInf_nonneg |
| 164 | rintro k ⟨v1, v2, _, rfl⟩ |
| 165 | exact hsec x v1 v2 |
| 166 | have hdefect : D.negativeCurvaturePart x = 0 := max_eq_right (neg_nonpos.mpr hleast) |
| 167 | apply curvatureTensorNorm_le_of_scalar_negativeDefect_le D hD x (by linarith) |
| 168 | (hscalar x) |
| 169 | rw [hdefect] |
| 170 | linarith |
| 171 | |
| 172 | end PoincareMT.M30 |