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.Frame.TransportInterval |
| 2 | import PoincareLib.Geometry.RicciFlow.Frame.Curvature |
| 3 | |
| 4 | /-! |
| 5 | # Curvature evolution in constructed Ricci transport |
| 6 | |
| 7 | The transport is produced from the retained flow. Its Ricci endomorphism is |
| 8 | identified with the moving-input equation before differentiating curvature. |
| 9 | |
| 10 | Reference: Morgan--Tian, Claim 3.16, p. 42, and Proposition 3.19, p. 44. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.RicciFlow.Frame |
| 21 | |
| 22 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 24 | {a b : ℝ} |
| 25 | |
| 26 | /-- The curvature PDE on a metric-preserving transport constructed from M04 |
| 27 | and the flow, retaining the spatial tensor Laplacian. -/ |
| 28 | theorem exists_curvature_transport (hC : RicciFlowCurvatureTheory.{u}) |
| 29 | (F : RicciFlow n M (Ico a b)) (hab : a < b) (x : M) : |
| 30 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 31 | ⟨(F.metric a).toRiemannianMetric⟩ |
| 32 | ∃ U : ℝ → TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x, |
| 33 | U a = ContinuousLinearMap.id ℝ _ ∧ |
| 34 | (∀ t ∈ Ico a b, HasDerivWithinAt U |
| 35 | ((ricciEndomorphism F x t).comp (U t)) (Ico a b) t) ∧ |
| 36 | (∀ t ∈ Ico a b, ∀ v w, |
| 37 | (F.metric t).inner x (U t v) (U t w) = (F.metric a).inner x v w) ∧ |
| 38 | (∀ t ∈ Ico a b, (U t).IsInvertible) ∧ |
| 39 | (∀ t ∈ Ioo a b, ∀ u v w z, |
| 40 | HasDerivAt |
| 41 | (fun s => (F.connection s).curvatureTensor x (U s u) (U s v) (U s w) (U s z)) |
| 42 | ((F.connection t).tensorLaplacian (F.connection t).riemannEvaluation x |
| 43 | ![U t u, U t v, U t w, U t z] + |
| 44 | 2 * ((F.connection t).curvatureB x (U t u) (U t v) (U t w) (U t z) - |
| 45 | (F.connection t).curvatureB x (U t u) (U t v) (U t z) (U t w) - |
| 46 | (F.connection t).curvatureB x (U t u) (U t z) (U t v) (U t w) + |
| 47 | (F.connection t).curvatureB x (U t u) (U t w) (U t v) (U t z))) t) := by |
| 48 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 49 | ⟨(F.metric a).toRiemannianMetric⟩ |
| 50 | obtain ⟨U, hUa, hUd, hpair, hinv⟩ := exists_ricciTransport_on hC F hab x |
| 51 | refine ⟨U, hUa, hUd, hpair, hinv, ?_⟩ |
| 52 | intro t ht u v w z |
| 53 | have htab : t ∈ Ico a b := ⟨ht.1.le, ht.2⟩ |
| 54 | have hinput (q : TangentSpace (𝓡 n) x) : |
| 55 | HasDerivWithinAt (fun s => U s q) |
| 56 | (ricciSharp (F.connection t) x (U t q)) (Ico a b) t := by |
| 57 | have h := (hUd t htab).clm_apply (hasDerivWithinAt_const t (Ico a b) q) |
| 58 | simpa only [map_zero, add_zero, ContinuousLinearMap.comp_apply, |
| 59 | ricciEndomorphism_eq_sum F x htab, ricciSharp] using h |
| 60 | have hinterior : t ∈ interior (Ico a b) := by |
| 61 | simpa only [interior_Ico] using ht |
| 62 | exact (hasDerivWithinAt_curvature_moving_inputs hC F hinterior x |
| 63 | (fun s => U s u) (fun s => U s v) (fun s => U s w) (fun s => U s z) |
| 64 | (hinput u) (hinput v) (hinput w) (hinput z)).hasDerivAt |
| 65 | (mem_interior_iff_mem_nhds.mp hinterior) |
| 66 | |
| 67 | end PoincareMT.RicciFlow.Frame |