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.Noncollapse.Compact.Product.OrdinaryProduct |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.Noncollapse.Confinement.Coordinates.LiftedVelocity |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Basic |
| 4 | |
| 5 | /-! Adapted from Mapher `PoincareMT/Proofs/M15/Thm8_10_PathProjection.lean` at |
| 6 | `0c5d5c4e1ecbc12703b1994e226df1b15d2e8d39`. See the source mapping in |
| 7 | `references/ricci-flow/mapher/noncollapse/import.json`. -/ |
| 8 | |
| 9 | /-! |
| 10 | # Ordinary projection of actual product paths |
| 11 | |
| 12 | Morgan-Tian Definitions 6.1-6.2, pp. 105-106, and Theorem 8.10, |
| 13 | p. 177. The product projection preserves the scalar and kinetic |
| 14 | densities on the open parameter interval, hence admissibility. |
| 15 | See `references/ricci-flow/mapher/noncollapse/derivations/2026-09-21-ordinary-capture.md`. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | -- The selected product and tangent models have compatible reducible instances. |
| 20 | set_option backward.isDefEq.respectTransparency false |
| 21 | |
| 22 | open Set |
| 23 | open scoped Manifold ContDiff Bundle Topology |
| 24 | |
| 25 | universe u |
| 26 | |
| 27 | namespace PoincareMT.Generalized.Noncollapse |
| 28 | |
| 29 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 30 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 31 | {I : SpacetimeInterval} |
| 32 | |
| 33 | /-- Ordinary projection preserves the actual action density at interior |
| 34 | times. Source: Definitions 6.1-6.2, pp. 105-106, in Theorem 8.10, p. 177. -/ |
| 35 | theorem ordinaryProduct_backwardIntegrand_eq |
| 36 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 37 | (F : RicciFlow n M I.domain) |
| 38 | (P : OrdinaryProductRicciGeometry F.metric I) |
| 39 | {T a b : ℝ} {x y : (ordinaryProductTransport F P).Point} |
| 40 | (p : M14BackwardPath (ordinaryProductTransport F P) T a b x y) |
| 41 | {s : ℝ} (hs : s ∈ Ioo a b) : |
| 42 | backwardLIntegrand F T (fun t => (p.curve t).2) s = |
| 43 | M14BackwardLIntegrand (ordinaryProductTransport F P) p s := by |
| 44 | let G := ordinaryProductTransport F P |
| 45 | let L : ℝ → (P.product.timeIntervals.interval I).Point × M := |
| 46 | P.product.productIdentification.symm ∘ p.curve |
| 47 | have hid : ∀ q : G.Point, P.product.productIdentification.symm q = q := by |
| 48 | intro q |
| 49 | have h := P.product.productIdentification_eq (P.product.productIdentification.symm q) |
| 50 | rw [P.product.productIdentification.apply_symm_apply] at h |
| 51 | exact h.symm |
| 52 | have hL : L = p.curve := funext fun t => hid (p.curve t) |
| 53 | have he : P.product.productCylinder.toSpacetime ∘ L = p.curve := by |
| 54 | funext t |
| 55 | exact (P.product.productCylinder_eq (L t)).trans (congrFun hL t) |
| 56 | have hreg : ContMDiffOn 𝓘(ℝ) (spacetimeModel n) 1 L (Ioo a b) := |
| 57 | (P.product.productIdentification.symm.contMDiff.of_le (by simp)).comp_contMDiffOn |
| 58 | p.curve_regular |
| 59 | have hnh : Ioo a b ∈ 𝓝 s := isOpen_Ioo.mem_nhds hs |
| 60 | have hproj := compatibleCylinder_horizontalDerivative_lift P.product.productCylinder |
| 61 | (ordinaryProductCylinderMetric F P) L |
| 62 | ((hreg s hs).mdifferentiableWithinAt (by simp)) |
| 63 | (isOpen_Ioo.uniqueDiffWithinAt hs) |
| 64 | rw [he, mfderivWithin_of_mem_nhds hnh, |
| 65 | mfderivWithin_of_mem_nhds hnh] at hproj |
| 66 | have htime : G.spacetime.horizontalProjection (p.curve s) |
| 67 | (G.spacetime.timeVector (p.curve s)) = 0 := by |
| 68 | apply Subtype.ext |
| 69 | simp only [G.spacetime.horizontalProjection_eq, |
| 70 | G.spacetime.timeVector_normalized, one_smul, sub_self] |
| 71 | rfl |
| 72 | have hclock : (p.curve s).1.val = T - s := p.curve_time s (Ioo_subset_Icc_self hs) |
| 73 | have hscalar := (ordinaryProduct_moving_calculus hM12 F P).scalar_eq |
| 74 | (p.curve s).1 (p.curve s).2 |
| 75 | change (F.connection (p.curve s).1.val).scalarCurvature (p.curve s).2 = |
| 76 | horizontalScalarCurvature G.leafwise |
| 77 | (P.product.productCylinder.toSpacetime (p.curve s)) at hscalar |
| 78 | rw [P.product.productCylinder_eq, hclock] at hscalar |
| 79 | have hmetric := (ordinaryProductCylinderMetric F P).metric_eq |
| 80 | (L s).1 (L s).2 |
| 81 | (curveVelocity (n := n) (fun t => (L t).2) s) |
| 82 | (curveVelocity (n := n) (fun t => (L t).2) s) |
| 83 | unfold curveVelocity at hmetric |
| 84 | rw [hproj] at hmetric |
| 85 | erw [hL, P.product.productCylinder_eq] at hmetric |
| 86 | erw [p.derivative_eq s hs, map_add, map_neg, htime, neg_zero, |
| 87 | G.spacetime.horizontalProjection_identity, zero_add] at hmetric |
| 88 | change (F.metric (p.curve s).1.val).inner _ _ _ = _ at hmetric |
| 89 | rw [hclock] at hmetric |
| 90 | unfold backwardLIntegrand M14BackwardLIntegrand M14RawLIntegrand |
| 91 | erw [hscalar, hmetric] |
| 92 | rfl |
| 93 | |
| 94 | /-- Projecting an actual product path gives an admissible ordinary |
| 95 | backward path. Source: Definitions 6.1-6.2, pp. 105-106, and |
| 96 | Theorem 8.10, p. 177. -/ |
| 97 | theorem ordinaryProduct_backwardPath_projection |
| 98 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 99 | (F : RicciFlow n M I.domain) |
| 100 | (P : OrdinaryProductRicciGeometry F.metric I) |
| 101 | {T a b : ℝ} (hT : T ∈ I.domain) |
| 102 | {x y : (ordinaryProductTransport F P).Point} |
| 103 | (p : M14BackwardPath (ordinaryProductTransport F P) T a b x y) : |
| 104 | ∃ q : BackwardTimePath F T a b, |
| 105 | q.curve = (fun t => (p.curve t).2) := by |
| 106 | refine ⟨{ |
| 107 | curve := fun t => (p.curve t).2 |
| 108 | nonnegative := p.tau_nonneg |
| 109 | ordered := p.tau_lt |
| 110 | terminal_mem := hT |
| 111 | time_mem := ?_ |
| 112 | continuous := (ordinaryProduct_spatial_smooth F P).continuous.comp_continuousOn |
| 113 | p.curve_continuous |
| 114 | regular := (ordinaryProduct_spatial_smooth F P).of_le (by simp) |
| 115 | |>.comp_contMDiffOn p.curve_regular |
| 116 | l_integrable := ?_ |
| 117 | }, rfl⟩ |
| 118 | · intro s hs |
| 119 | have h := (p.curve s).1.property |
| 120 | change (p.curve s).1.val ∈ I.domain at h |
| 121 | have ht : (p.curve s).1.val = T - s := p.curve_time s hs |
| 122 | rwa [ht] at h |
| 123 | · apply p.action_integrable.congr_uIoo |
| 124 | intro s hs |
| 125 | have hi : s ∈ Ioo a b := by simpa only [uIoo_of_le p.tau_lt.le] using hs |
| 126 | exact (ordinaryProduct_backwardIntegrand_eq hM12 F P p hi).symm |
| 127 | |
| 128 | end PoincareMT.Generalized.Noncollapse |