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.Ordinary.Capture.OrdinaryCaptureAction |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Coordinates.GaugeVelocity |
| 3 | |
| 4 | /-! |
| 5 | # Closed-interval velocities in the captured cylinder |
| 6 | |
| 7 | Morgan-Tian Definition 3.38, p. 61, and Lemma 6.8, pp. 108-109. |
| 8 | The actual cylinder differential's horizontal part is its spatial |
| 9 | differential. The same identity holds for within velocities at both |
| 10 | closed endpoints and is used to compare normalized initial vectors. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | -- Cylinder products and the horizontal tangent aliases use fixed models. |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff |
| 19 | |
| 20 | universe u v |
| 21 | |
| 22 | namespace PoincareMT.M14 |
| 23 | |
| 24 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 25 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 26 | {C : Type v} [TopologicalSpace C] |
| 27 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) C] [IsManifold (𝓡 n) ∞ C] |
| 28 | {K : SpacetimeInterval} |
| 29 | (e : CompatibleSpacetimeCylinder G.spacetime (G.timeIntervals.interval K) C) |
| 30 | (g : SpacetimeCylinderMetric e) |
| 31 | |
| 32 | /-- Horizontal projection of the full cylinder differential is exactly |
| 33 | its actual spatial tangent map, Definition 3.38, p. 61. -/ |
| 34 | theorem ordinaryCapture_projectedDifferential |
| 35 | (t : (G.timeIntervals.interval K).Point) (c : C) |
| 36 | (v : TangentSpace (spacetimeModel n) (t, c)) : |
| 37 | G.spacetime.horizontalProjection (e.toSpacetime (t, c)) |
| 38 | (mfderiv (spacetimeModel n) (spacetimeModel n) e.toSpacetime (t, c) v) = |
| 39 | g.spatialTangentEquiv t c v.2 := by |
| 40 | let J := G.timeIntervals.interval K |
| 41 | have ht : v.1 = J.inclusionDerivative t v.1 • J.positiveTangent t := by |
| 42 | apply (J.inclusionDerivative t).injective |
| 43 | simp only [map_smul, SmoothSpacetimeInterval.positiveTangent, |
| 44 | ContinuousLinearEquiv.apply_symm_apply, smul_eq_mul, mul_one] |
| 45 | have hd := mfderiv_prod_eq_add_apply (p := (t, c)) |
| 46 | (e.smooth.mdifferentiableAt (by simp)) (v := (v.1, v.2)) |
| 47 | rw [ht, map_smul, e.worldline_derivative, ← g.spatialTangentEquiv_eq] at hd |
| 48 | change G.spacetime.horizontalProjection _ |
| 49 | (mfderiv (spacetimeModel n) (spacetimeModel n) e.toSpacetime (t, c) (v.1, v.2)) = _ |
| 50 | rw [ht, hd, map_add, map_smul, horizontalProjection_timeVector_eq_zero, |
| 51 | smul_zero, zero_add, G.spacetime.horizontalProjection_identity] |
| 52 | |
| 53 | /-- Actual within velocity through the captured cylinder is transported |
| 54 | by its spatial tangent equivalence at every uniquely differentiable |
| 55 | parameter point, Lemma 6.8, pp. 108-109. -/ |
| 56 | theorem ordinaryCapture_cylinderVelocityWithin |
| 57 | (θ : ℝ → (G.timeIntervals.interval K).Point) (q : ℝ → C) |
| 58 | {S : Set ℝ} {s : ℝ} |
| 59 | (hθ : MDifferentiableWithinAt (𝓘(ℝ, ℝ)) (𝓡∂ 1) θ S s) |
| 60 | (hq : MDifferentiableWithinAt (𝓘(ℝ, ℝ)) (𝓡 n) q S s) |
| 61 | (hS : UniqueDiffWithinAt ℝ S s) : |
| 62 | projectedCurveVelocityWithin G (fun r => e.toSpacetime (θ r, q r)) S s = |
| 63 | g.spatialTangentEquiv (θ s) (q s) (curveVelocityWithin q S s) := by |
| 64 | have hβ := hθ.prodMk hq |
| 65 | have hd := congrArg (fun L => L (1 : ℝ)) |
| 66 | (mfderiv_comp_mfderivWithin s (e.smooth.mdifferentiableAt (by simp)) |
| 67 | hβ hS.uniqueMDiffWithinAt) |
| 68 | have hsp := congrArg (fun L => (L (1 : ℝ)).2) |
| 69 | (mfderivWithin_prodMk hθ hq hS.uniqueMDiffWithinAt) |
| 70 | change (mfderivWithin (𝓘(ℝ, ℝ)) (spacetimeModel n) |
| 71 | (fun r => (θ r, q r)) S s 1).2 = curveVelocityWithin q S s at hsp |
| 72 | unfold projectedCurveVelocityWithin |
| 73 | dsimp only [Function.comp_def, ContinuousLinearMap.comp_apply] at hd |
| 74 | erw [hd, ordinaryCapture_projectedDifferential e g, hsp] |
| 75 | |
| 76 | end PoincareMT.M14 |