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.Generalized.ReducedGeometry.Regularity.Formulas.RegularTimeDerivative |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Formulas.GradientIdentity |
| 3 | |
| 4 | /-! |
| 5 | # The actual regular time identity with K |
| 6 | |
| 7 | The genuine backward derivative and integrated Harnack boundary give |
| 8 | the time formula for the same actual selected path. Morgan-Tian |
| 9 | Lemma 6.49 and Theorem 6.50, p. 131. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.M14 |
| 19 | |
| 20 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 21 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 22 | {T : ℝ} {x : G.Point} |
| 23 | |
| 24 | /-- The exact regular backward-time identity, with the actual K |
| 25 | integral of the selected exponential path, Theorem 6.50, p. 131. -/ |
| 26 | theorem reducedLengthAt_joint_time_identity |
| 27 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 28 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 29 | (E : M14ExponentialFamily G T x) {Z : G.Horizontal x} {s : ℝ} |
| 30 | (hs : (Z, s) ∈ E.domain) (hpos : 0 < s) (hz : (Z, s) ∈ M14JointDomain G E) |
| 31 | (hpoint : (E.square_path Z s hs hpos).curve s = E.gamma Z s) : |
| 32 | M14BackwardTimeDerivative G (M14ReducedLengthAt G T 0 x) (E.gamma Z s) = |
| 33 | horizontalScalarCurvature G.leafwise (E.gamma Z s) - |
| 34 | M14ReducedLengthValue G T 0 (s ^ 2) x (E.gamma Z s) / s ^ 2 + |
| 35 | M14GeneralizedKIntegral G (E.path Z s hs hpos) |
| 36 | (fun t => M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) |
| 37 | ((E.path Z s hs hpos).curve t)) / (2 * s ^ 2 * Real.sqrt (s ^ 2)) := by |
| 38 | have hK := exponential_harnackIntegral_eq hM12 E hs hpos |
| 39 | have hS := congrArg (horizontalScalarCurvature G.leafwise) hpoint |
| 40 | rw [hS] at hK |
| 41 | obtain ⟨_, _, _, _, _, hl⟩ := jointDomain_action_branch E hz |
| 42 | rw [E.reduced_length_eq Z s hs hpos] at hl |
| 43 | rw [reducedLengthAt_time_derivative_square hCoordinates hM04 hM12 E hs hpos hz hpoint, |
| 44 | ← hl, Real.sqrt_sq hpos.le, hK] |
| 45 | field_simp [hpos.ne'] |
| 46 | ring |
| 47 | |
| 48 | end PoincareMT.M14 |