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.AncientKappa.Compactness.Nonflatness |
| 2 | |
| 3 | /-! |
| 4 | # Packaging the actual terminal limit after boundedness |
| 5 | |
| 6 | A terminal scalar bound and whole-past control give one global ancient |
| 7 | curvature bound. Backward nonflatness is then proved before the actual flow |
| 8 | is packaged as an ancient kappa-solution. |
| 9 | |
| 10 | Reference: Morgan--Tian, Theorem 9.64, pp. 225-229. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | namespace PoincareMT.RicciFlow |
| 20 | |
| 21 | variable {M : Type} [TopologicalSpace M] [MeasurableSpace M] [BorelSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 23 | [T2Space M] [T3Space M] [SecondCountableTopology M] [ConnectedSpace M] |
| 24 | |
| 25 | /-- Package the specified closed flow only after proving its global bound |
| 26 | and backward nonflatness. Its metric, connection and kappa are unchanged. -/ |
| 27 | def ancientKappaSolutionOfTerminalScalarBound |
| 28 | (F : RicciFlow 3 M (Iic 0)) (P : M23NormalizedKappaCompactnessPredecessors) |
| 29 | {κ B : ℝ} (hκ : 0 < κ) (hB : 0 ≤ B) |
| 30 | (hcomplete : ∀ t : ℝ, t ≤ 0 → MetricComplete (F.metric t)) |
| 31 | (hoperator : ∀ t : ℝ, t ≤ 0 → ∀ x : M, |
| 32 | (F.connection t).NonnegativeCurvatureOperator x) |
| 33 | (hnc : AncientKappaNoncollapsed F κ) |
| 34 | (hpositive : ∃ p : M, 0 < (F.connection 0).scalarCurvature p) |
| 35 | (hpast : ∀ t : ℝ, t ≤ 0 → ∀ x : M, |
| 36 | |(F.connection t).curvatureTensorNorm x| ≤ (F.connection 0).scalarCurvature x) |
| 37 | (hbound : ∀ x : M, (F.connection 0).scalarCurvature x ≤ B) : |
| 38 | AncientKappaSolution 3 M := by |
| 39 | have hcurv (t : ℝ) (ht : t ≤ 0) (x : M) : |
| 40 | (F.connection t).curvatureTensorNorm x ≤ B := |
| 41 | (le_abs_self _).trans ((hpast t ht x).trans (hbound x)) |
| 42 | have hnonflat := F.scalarCurvature_positive_somewhere_of_bounded_ancient_of_m23_predecessors |
| 43 | P hcomplete hoperator hB hcurv hpositive |
| 44 | exact { |
| 45 | flow := F |
| 46 | kappa := κ |
| 47 | kappa_pos := hκ |
| 48 | complete := hcomplete |
| 49 | nonnegative_curvature_operator := hoperator |
| 50 | bounded_curvature := fun t ht => ⟨B, hB, fun x => (hpast t ht x).trans (hbound x)⟩ |
| 51 | nonflat := fun t ht => by |
| 52 | obtain ⟨x, hx⟩ := hnonflat t ht |
| 53 | refine ⟨x, fun hz => ?_⟩ |
| 54 | have h := (F.connection t).abs_scalarCurvature_le_curvatureTensorNorm x |
| 55 | rw [hz, mul_zero] at h |
| 56 | exact hx.not_ge ((le_abs_self _).trans h) |
| 57 | noncollapsed := hnc } |
| 58 | |
| 59 | end PoincareMT.RicciFlow |