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.Curvature.Calculus |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.Cylinders.ScalarTime |
| 3 | |
| 4 | /-! |
| 5 | # Positive scalar curvature before the terminal time |
| 6 | |
| 7 | A normalized terminal cylinder has a uniform short backward interval on which |
| 8 | the scalar curvature at its center stays positive. Shifting the base time into |
| 9 | this interval supplies a future-time buffer for pointed compactness without |
| 10 | losing nonflatness. References: Kleiner--Lott, Corollary 44.1, pp. 2682--2683; |
| 11 | Appendix D, Theorem D.1, p. 2847; Appendix E, pp. 2848--2849. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle ENNReal |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | theorem PoincareMT.RicciFlow.exists_terminal_scalar_positive_time_buffer |
| 23 | {m : ℕ} (hC : PoincareMT.RicciFlowCurvatureCalculus.{u}) (hm : 0 < m) : |
| 24 | ∃ δ : ℝ, 0 < δ ∧ δ < 1 ∧ |
| 25 | ∀ (M : Type u) [TopologicalSpace M] [T3Space M] [SecondCountableTopology M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin (m + 1))) M] |
| 27 | [IsManifold (𝓡 (m + 1)) ∞ M] (J : Set ℝ) |
| 28 | (F : PoincareMT.RicciFlow (m + 1) M J), |
| 29 | Icc (-2 : ℝ) 0 ⊆ interior J → |
| 30 | (∀ t ∈ Icc (-2 : ℝ) 0, PoincareMT.MetricComplete (F.metric t)) → |
| 31 | (∀ t ∈ Icc (-2 : ℝ) 0, ∀ x : M, |
| 32 | (F.connection t).NonnegativeCurvatureOperator x) → |
| 33 | ∀ p : M, |
| 34 | (∀ t ∈ Icc (-2 : ℝ) 0, |
| 35 | ∀ x ∈ (F.metric 0).ball p (64 * (((m + 1 : ℕ) : ℝ) + 8)), |
| 36 | (F.connection t).scalarCurvature x ≤ 4) → |
| 37 | (F.connection 0).scalarCurvature p = 1 → |
| 38 | ∀ t ∈ Icc (-δ) 0, (1 : ℝ) / 2 ≤ (F.connection t).scalarCurvature p := by |
| 39 | obtain ⟨D, hD, htime⟩ := exists_terminal_scalar_time_constant hC hm |
| 40 | let δ := min (1 / 2 : ℝ) (1 / (2 * D)) |
| 41 | have hδ : 0 < δ := lt_min (by norm_num) (by positivity) |
| 42 | have hδhalf : δ ≤ 1 / 2 := min_le_left _ _ |
| 43 | have hδD : D * δ ≤ 1 / 2 := by |
| 44 | have h := (le_div_iff₀ (by positivity : 0 < 2 * D)).mp |
| 45 | (show δ ≤ 1 / (2 * D) from min_le_right _ _) |
| 46 | nlinarith |
| 47 | refine ⟨δ, hδ, by linarith, ?_⟩ |
| 48 | intro M _ _ _ _ _ J F hJ hcomplete hoperator p hscalar hnormalize t ht |
| 49 | have ht' : t ∈ Icc (-1 : ℝ) 0 := ⟨by linarith [ht.1], ht.2⟩ |
| 50 | have hcompare := htime M J F hJ hcomplete hoperator p hscalar t ht' |
| 51 | rw [hnormalize] at hcompare |
| 52 | have htime' : D * (0 - t) ≤ D * δ := |
| 53 | mul_le_mul_of_nonneg_left (by linarith [ht.1]) hD.le |
| 54 | linarith |