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.Reaction |
| 2 | import PoincareLib.Geometry.RicciFlow.Basic |
| 3 | import PoincareLib.Geometry.RicciFlow.Curvature.Evolution.Tensor.RicciEvolutionCoefficients |
| 4 | import PoincareLib.Geometry.RicciFlow.Curvature.Evolution.Tensor.RicciEvolutionEndpoints |
| 5 | import PoincareLib.Geometry.RicciFlow.Curvature.Evolution.Tensor.RicciEvolutionInterior |
| 6 | import PoincareLib.Geometry.RicciFlow.Curvature.Evolution.Tensor.RiemannEvolutionEndpoints |
| 7 | |
| 8 | /-! Adapted from Mapher06/Poincare-MorganTian, `PoincareMT/Proofs/M04/TensorEvolution.lean`, |
| 9 | revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. See the curvature import record under |
| 10 | `references/ricci-flow/mapher/curvature/`. -/ |
| 11 | |
| 12 | /-! |
| 13 | # Evolution of covariant curvature tensors |
| 14 | |
| 15 | The inputs remain fixed in the tangent fiber while time varies. The reactions |
| 16 | therefore include the Ricci input corrections. These are RicciFlowAnalysis proof obligations; |
| 17 | the reviewed convention and source correction are in |
| 18 | `reviews/declarations/tensor-evolution-v1.md`. |
| 19 | -/ |
| 20 | |
| 21 | set_option autoImplicit false |
| 22 | |
| 23 | open scoped Manifold ContDiff Bundle |
| 24 | |
| 25 | universe u |
| 26 | |
| 27 | namespace PoincareMT.RicciFlow |
| 28 | |
| 29 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 30 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 31 | {J : Set ℝ} |
| 32 | |
| 33 | /-- The four-covariant evolution equation with within-domain time derivatives. -/ |
| 34 | theorem hasDerivWithinAt_curvatureTensor (F : RicciFlow n M J) |
| 35 | (t : ℝ) (ht : t ∈ J) (x : M) (u v w z : TangentSpace (𝓡 n) x) : |
| 36 | HasDerivWithinAt (fun s ↦ (F.connection s).curvatureTensor x u v w z) |
| 37 | ((F.connection t).tensorLaplacian (F.connection t).riemannEvaluation x ![u, v, w, z] + |
| 38 | (F.connection t).curvatureReaction x u v w z) J t := by |
| 39 | exact RicciFlowAnalysis.curvatureTensor_timeDerivative_extend F x u v w z |
| 40 | (fun s ↦ |
| 41 | (F.connection s).tensorLaplacian (F.connection s).riemannEvaluation x ![u, v, w, z] + |
| 42 | (F.connection s).curvatureReaction x u v w z) |
| 43 | (RicciFlowAnalysis.continuousOn_curvatureTensor_evolution F x u v w z) |
| 44 | (fun s hs ↦ RicciFlowAnalysis.hasDerivAt_curvatureTensor_evolution F hs x u v w z) t ht |
| 45 | |
| 46 | /-- The covariant Ricci equation with the corrected curvature contraction. -/ |
| 47 | theorem hasDerivWithinAt_ricci (F : RicciFlow n M J) |
| 48 | (t : ℝ) (ht : t ∈ J) (x : M) (u v : TangentSpace (𝓡 n) x) : |
| 49 | HasDerivWithinAt (fun s ↦ (F.connection s).ricci x u v) |
| 50 | ((F.connection t).tensorLaplacian (F.connection t).ricciEvaluation x ![u, v] + |
| 51 | (F.connection t).ricciReaction x u v) J t := by |
| 52 | exact RicciFlowAnalysis.ricci_timeDerivative_extend F x u v |
| 53 | (fun s ↦ (F.connection s).tensorLaplacian (F.connection s).ricciEvaluation x ![u, v] + |
| 54 | (F.connection s).ricciReaction x u v) |
| 55 | (RicciFlowAnalysis.continuousOn_ricciEvolutionRHS_timeSlice F x u v) |
| 56 | (fun s hs ↦ RicciFlowAnalysis.hasDerivAt_ricci_evolution F hs x u v) t ht |
| 57 | |
| 58 | end PoincareMT.RicciFlow |
| 59 |