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.Curvature.Operator.Bounds |
| 2 | import PoincareLib.Geometry.RicciFlow.Basic |
| 3 | import Mathlib.Geometry.Manifold.Riemannian.Basic |
| 4 | import Mathlib.Geometry.Manifold.MFDeriv.NormedSpace |
| 5 | import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic |
| 6 | |
| 7 | /-! |
| 8 | # Completeness and spacetime energy |
| 9 | |
| 10 | These are the unchanged definitions in the frozen M06 snapshot |
| 11 | `contracts/definitions/ricci-flow/DifferentialHarnackAncientFlow.lean`. |
| 12 | The curvature-operator definitions live in `Geometry.Curvature.Operator.Bounds`. |
| 13 | See `references/ricci-flow/mapher/harnack-interface.json` for provenance. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open scoped Manifold ContDiff Bundle intervalIntegral |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 26 | [IsManifold (𝓡 n) ∞ M] |
| 27 | |
| 28 | /-- Completeness for the emetric induced by the specified Riemannian metric. -/ |
| 29 | def MetricComplete (g : RiemannianMetric n M) [T3Space M] : Prop := |
| 30 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 31 | ⟨g.toRiemannianMetric⟩ |
| 32 | letI : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) |
| 33 | (TangentSpace (𝓡 n) : M → Type _) := |
| 34 | ⟨⟨g.inner, g.toContinuousRiemannianMetric.continuous, fun _ _ _ ↦ rfl⟩⟩ |
| 35 | letI : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 n) M |
| 36 | CompleteSpace M |
| 37 | |
| 38 | /-- Squared speed action for a path in a time-dependent Ricci flow. -/ |
| 39 | noncomputable def spacetimeEnergy {J : Set ℝ} (F : RicciFlow n M J) |
| 40 | (γ : ℝ → M) (a b : ℝ) : ℝ := |
| 41 | ∫ s in a..b, |
| 42 | (F.metric s).inner (γ s) |
| 43 | (mfderiv (𝓘(ℝ, ℝ)) (𝓡 n) γ s 1) |
| 44 | (mfderiv (𝓘(ℝ, ℝ)) (𝓡 n) γ s 1) |
| 45 | |
| 46 | end PoincareMT |