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.Surgery.StandardCap.Existence.Geometry.Basic.CompatibleSquareCurve |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Noncollapsing.OrdinaryLiftedPath |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Path.RegularizedAction |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.ReducedGeometry.LGeometry.Path.RegularizedAction |
| 5 | |
| 6 | /-! |
| 7 | # The actual square-root path in the retained ordinary product |
| 8 | |
| 9 | The ordinary smooth representative is lifted at the actual physical |
| 10 | clock. The horizontal velocity agrees with the backward path in the |
| 11 | interior, and the full within derivative holds at both endpoints. |
| 12 | Source: Morgan-Tian Proposition 12.13, pp. 304-306; section 4 of |
| 13 | `proof-work/tasks/M34/derivations/ordinary-square-survival.md`. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff Bundle Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M34 |
| 24 | |
| 25 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 27 | {I : SpacetimeInterval} {F : RicciFlow n M I.domain} |
| 28 | |
| 29 | /-- The square-time clock remains in the actual ordinary flow domain, |
| 30 | including its closed parameter endpoints (Proposition 12.13). -/ |
| 31 | theorem ordinarySquarePath_clockMem {T tau : ℝ} (q : BackwardTimePath F T 0 tau) |
| 32 | {s : ℝ} (hs : s ∈ sqrtParameterInterval 0 tau) : T - s ^ 2 ∈ I.domain := by |
| 33 | have hs0 : 0 ≤ s := by simpa only [sqrtParameterInterval, Real.sqrt_zero] using hs.1 |
| 34 | have hsq := (sq_le_sq₀ hs0 (Real.sqrt_nonneg tau)).mpr hs.2 |
| 35 | rw [Real.sq_sqrt q.ordered.le] at hsq |
| 36 | exact q.time_mem (s ^ 2) ⟨sq_nonneg s, hsq⟩ |
| 37 | |
| 38 | set_option backward.isDefEq.respectTransparency false in |
| 39 | /-- Every actual ordinary square-root representative lifts to the exact |
| 40 | M14 square-root path record, retaining its endpoint derivative data |
| 41 | (Proposition 12.13, pp. 304-306). -/ |
| 42 | noncomputable def ordinarySquarePath |
| 43 | (R : OrdinaryProductRicciGeometry F.metric I) |
| 44 | (hRicci : IntrinsicGeneralizedRicciEquation R.leafwiseConnection) |
| 45 | {T tau : ℝ} (q : BackwardTimePath F T 0 tau) (A : SqrtRegularPath q) : |
| 46 | M14SquareRootPath (ordinaryProductLGeometry R hRicci) (ordinaryLiftedPath R hRicci q) where |
| 47 | curve := compatibleSquareCurve R.product.productCylinder T A.curve |
| 48 | domain := sqrtParameterInterval 0 tau |
| 49 | interval_subset := Subset.rfl |
| 50 | smooth := compatibleSquareCurve_smooth R.product.productCylinder T |
| 51 | (fun _ hs => ordinarySquarePath_clockMem q hs) (A.smooth.mono A.interval_subset) |
| 52 | agrees := by |
| 53 | intro s hs |
| 54 | change R.product.productCylinder.toSpacetime |
| 55 | ((R.product.timeIntervals.interval I).realParam (T - s ^ 2), A.curve s) = |
| 56 | R.product.productCylinder.toSpacetime |
| 57 | ((R.product.timeIntervals.interval I).realParam (T - s ^ 2), q.curve (s ^ 2)) |
| 58 | rw [A.agrees s hs] |
| 59 | curve_time := fun _ hs => compatibleSquareCurve_time R.product.productCylinder T A.curve |
| 60 | (ordinarySquarePath_clockMem q hs) |
| 61 | horizontal_velocity := compatibleSquareHorizontal R.product.productCylinder |
| 62 | R.product.productMetric T A.curve |
| 63 | horizontal_agrees := by |
| 64 | intro s hs |
| 65 | have hcast (z w : R.product.spacetime.Point) (h : z = w) |
| 66 | (v : R.product.spacetime.Horizontal w) : |
| 67 | ((h.symm ▸ v) : R.product.spacetime.Horizontal z).val = v.val := by |
| 68 | cases h |
| 69 | rfl |
| 70 | apply Subtype.ext |
| 71 | rw [hcast] |
| 72 | · change (R.product.productMetric.spatialTangentEquiv |
| 73 | ((R.product.timeIntervals.interval I).realParam (T - s ^ 2)) (A.curve s) |
| 74 | (curveVelocity A.curve s)).val = |
| 75 | ((2 * s) • R.product.productMetric.spatialTangentEquiv |
| 76 | ((R.product.timeIntervals.interval I).realParam (T - s ^ 2)) (q.curve (s ^ 2)) |
| 77 | (curveVelocity q.curve (s ^ 2))).val |
| 78 | rw [PoincareMT.M08.sqrtRegularPath_velocity A hs, map_smul, |
| 79 | A.agrees s ⟨hs.1.le, hs.2.le⟩] |
| 80 | · change R.product.productCylinder.toSpacetime |
| 81 | ((R.product.timeIntervals.interval I).realParam (T - s ^ 2), A.curve s) = |
| 82 | R.product.productCylinder.toSpacetime |
| 83 | ((R.product.timeIntervals.interval I).realParam (T - s ^ 2), q.curve (s ^ 2)) |
| 84 | rw [A.agrees s ⟨hs.1.le, hs.2.le⟩] |
| 85 | derivative_eq := by |
| 86 | intro s hs |
| 87 | have hK : UniqueDiffOn ℝ (sqrtParameterInterval 0 tau) := by |
| 88 | simpa only [sqrtParameterInterval, Real.sqrt_zero] using |
| 89 | (uniqueDiffOn_Icc (Real.sqrt_pos.mpr q.ordered)) |
| 90 | exact compatibleSquareCurve_derivative R.product.productCylinder R.product.productMetric T |
| 91 | (fun _ hr => ordinarySquarePath_clockMem q hr) hs (hK s hs) |
| 92 | ((A.smooth.contMDiffAt (A.open_domain.mem_nhds (A.interval_subset hs))).mdifferentiableAt |
| 93 | (by simp)) |
| 94 | |
| 95 | end PoincareMT.M34 |