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.ReducedGeometry.ReducedLength.Exponential.FamilySlices |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.VelocityChainRules |
| 3 | |
| 4 | /-! |
| 5 | # The actual square-time velocity of the coherent family |
| 6 | |
| 7 | The square agreement is a curve germ at every positive square time. |
| 8 | Its derivative is the ordinary square-map chain rule. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option maxSynthPendingDepth 3 |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle Topology |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.ReducedLength |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 22 | [IsManifold (𝓡 n) ∞ M] |
| 23 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 24 | |
| 25 | set_option backward.isDefEq.respectTransparency false in |
| 26 | theorem lExponentialFamily_square_velocity_eq (A : LExponentialFamily F T τmax p) |
| 27 | (Z : TangentSpace (𝓡 n) p) (s : ℝ) (hs : s ∈ Set.Ioo 0 (Real.sqrt τmax)) : |
| 28 | (curveVelocity (n := n) (A.squareFamily Z) s : EuclideanSpace ℝ (Fin n)) = |
| 29 | (2 * s) • curveVelocity (n := n) (A.gamma Z) (s ^ 2) := by |
| 30 | have hmaxpos : 0 < τmax := Real.sqrt_pos.mp (hs.1.trans hs.2) |
| 31 | have hsmax : s ^ 2 < τmax := by |
| 32 | nlinarith [hs.1, hs.2, Real.sq_sqrt hmaxpos.le] |
| 33 | have hdiff := (lExponentialFamily_gammaSlice_contMDiffAt A Z (s ^ 2) |
| 34 | (sq_pos_of_pos hs.1) hsmax).mdifferentiableAt (by simp) |
| 35 | have heq : A.squareFamily Z =ᶠ[nhds s] fun r ↦ A.gamma Z (r ^ 2) := by |
| 36 | apply Filter.eventuallyEq_of_mem (isOpen_Ioo.mem_nhds hs) |
| 37 | intro r hr |
| 38 | exact A.square_agrees Z r ⟨hr.1.le, hr.2⟩ |
| 39 | exact (curveVelocity_congr_of_eventuallyEq heq).trans |
| 40 | (curveVelocity_comp_square (A.gamma Z) s hdiff) |
| 41 | |
| 42 | end PoincareMT.ReducedLength |