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.CurveShortening.Integral.Regularized |
| 2 | import PoincareLib.Geometry.RicciFlow.CurveShortening.Integral.TotalCurvature |
| 3 | import PoincareLib.Geometry.RicciFlow.Spacetime.Product.Identities |
| 4 | |
| 5 | /-! |
| 6 | # Corrected curve theory on a specified ambient flow |
| 7 | |
| 8 | The positive regularization is integrated before taking its zero limit. |
| 9 | All curve laws and quantitative estimates use the same actual spacetime. |
| 10 | Source: MT2015Correction Lemmas 0.1-0.4, pp. 3-8; |
| 11 | see `references/ricci-flow/mapher/curve-evolution/derivations/2026-09-20-regularized-integral.md`. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle |
| 17 | |
| 18 | namespace PoincareMT.M62 |
| 19 | |
| 20 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 22 | {a b : ℝ} |
| 23 | |
| 24 | /-- The corrected estimates include the integrated limit and initial-time |
| 25 | forward quotients; MT2015Correction Corollary 0.3 and Lemma 0.4, pp. 6-8. -/ |
| 26 | theorem curve_estimates [T2Space M] |
| 27 | (F : RicciFlow n M (Set.Icc a b)) (c : ℝ → ℝ → M) |
| 28 | (hc : M62ShrinkingCurve F c) {K0 K1 K2 : ℝ} |
| 29 | (h0 : 0 ≤ K0) (h1 : 0 ≤ K1) (h2 : 0 ≤ K2) |
| 30 | (hBounds : CurveEvolutionAmbientBounds F K0 K1 K2) : |
| 31 | M62CurveEstimates F c K0 K1 K2 := by |
| 32 | have hL := length_continuous F c hc |
| 33 | have hT := total_curvature_continuous F c hc |
| 34 | have hR := fun ε (_ : 0 < ε) => regularized_total_continuous F c hc ε |
| 35 | have hd := fun ε (hε : 0 < ε) t (ht : t ∈ Set.Ioo a b) => |
| 36 | (hasDerivAt_regularizedTotal F c hc hε ht).differentiableAt |
| 37 | have hb := fun ε (hε : 0 < ε) t (ht : t ∈ Set.Ioo a b) => |
| 38 | regularized_total_deriv_le F c hc h0 h1 h2 hBounds hε ht |
| 39 | have he := fun ε (hε : 0 < ε) t (ht : t ∈ Set.Icc a b) => |
| 40 | shrinkingCurve_regularization_error F c hc hε.le ht |
| 41 | have hi := fun s t (hs : s ∈ Set.Icc a b) (ht : t ∈ Set.Icc a b) (hst : s ≤ t) => |
| 42 | total_curvature_integral_of_regularized_bound F c h0 h1 h2 hL hT hR hd hb he hs ht hst |
| 43 | exact |
| 44 | { spatial_squared_bound := fun _ ht x => spatial_squared_bound F c hc h0 h1 h2 hBounds ht x |
| 45 | regularized_positive := fun _ hε t _ x => regularized_pos F c hε t x |
| 46 | regularized_smooth := fun _ hε => |
| 47 | regularized_smooth F c hε (curvatureSquared_contDiffOn F c hc) |
| 48 | regularized_gradient := fun _ hε _ ht x => regularized_gradient_le F c hc hε ht x |
| 49 | regularized_bound := fun _ hε _ ht x => regularized_deriv_le F c hc h0 h1 h2 hBounds hε ht x |
| 50 | length_integrable := fun _ ht => length_integrable F c hc ht |
| 51 | total_curvature_integrable := fun _ ht => total_curvature_integrable F c hc ht |
| 52 | regularized_integrable := fun ε _ _ ht => regularized_integrable F c hc ε ht |
| 53 | length_continuous := hL |
| 54 | total_curvature_continuous := hT |
| 55 | regularized_continuous := hR |
| 56 | length_derivative := fun _ ht => hasDerivAt_length F c hc ht |
| 57 | length_bound := fun _ ht => length_deriv_le_integral F c hc hBounds ht |
| 58 | length_scalar_bound := fun _ ht => length_deriv_le F c hc hBounds ht |
| 59 | regularized_differentiable := hd |
| 60 | regularized_total_bound := hb |
| 61 | regularization_error := he |
| 62 | total_curvature_integral := hi |
| 63 | total_curvature_forward := fun _ ht _ hε => |
| 64 | total_curvature_forward_of_integral_bound F c hL hT hi ht hε } |
| 65 | |
| 66 | /-- One actual spacetime supports all curves and ambient constants for |
| 67 | the specified flow; MT2015Correction Lemmas 0.1-0.4, pp. 3-8. -/ |
| 68 | theorem nonempty_curveTheory [T2Space M] [SecondCountableTopology M] |
| 69 | (F : RicciFlow n M (Set.Icc a b)) : Nonempty (M62CurveTheory F) := by |
| 70 | obtain ⟨G, hG⟩ := exists_spacetimeData F |
| 71 | exact ⟨ |
| 72 | { spacetime := G |
| 73 | spacetime_identities := hG |
| 74 | curves := fun c hc => G.curve_laws c hc |
| 75 | estimates := fun _ _ _ h0 h1 h2 hb c hc => |
| 76 | ⟨curve_estimates F c hc h0 h1 h2 hb, G.curvature_squared_bound c hc h0 h1 h2 hb⟩ }⟩ |
| 77 | |
| 78 | end PoincareMT.M62 |