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.Noncollapsing.OrdinaryHorizontalExtension |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Noncollapsing.OrdinarySquarePath |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Basic.ModelCurveExtension |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Metric.OrdinaryHorizontalConnection |
| 5 | |
| 6 | /-! |
| 7 | # Pullback connection of the actual square-root lift |
| 8 | |
| 9 | The genuine horizontal extension is constant in the spatial model before |
| 10 | transport. Its fixed-point parameter derivative and full horizontal |
| 11 | connection sum to the ordinary pullback covariant derivative. |
| 12 | Source: Morgan-Tian Proposition 12.13, pp. 304-306; sections 3-6 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 | namespace PoincareMT.M34 |
| 22 | |
| 23 | noncomputable section |
| 24 | |
| 25 | variable {n : ℕ} {I : SpacetimeInterval} |
| 26 | {F : RicciFlow n (EuclideanSpace ℝ (Fin n)) I.domain} |
| 27 | |
| 28 | /-- The ordinary constant-spatial velocity extension on the full |
| 29 | square-root interval, including its endpoints (Proposition 12.13). -/ |
| 30 | def ordinarySquareVelocityExtension {T tau : ℝ} |
| 31 | (q : BackwardTimePath F T 0 tau) (A : SqrtRegularPath q) : |
| 32 | ParametricAlongCurveExtensionOn (n := n) (sqrtParameterInterval 0 tau) A.curve |
| 33 | (curveVelocityWithin (n := n) A.curve (sqrtParameterInterval 0 tau)) := |
| 34 | modelCurveVelocityExtension A.curve (sqrtParameterInterval 0 tau) A.domain |
| 35 | A.open_domain A.interval_subset |
| 36 | (by simpa only [sqrtParameterInterval, Real.sqrt_zero] using |
| 37 | (uniqueDiffOn_Icc (Real.sqrt_pos.mpr q.ordered))) A.smooth |
| 38 | |
| 39 | set_option backward.isDefEq.respectTransparency false in |
| 40 | /-- The actual horizontal extension for the square-root path uses the |
| 41 | same model velocity at every spatial point (Proposition 12.13). -/ |
| 42 | def ordinarySquareExtension |
| 43 | (R : OrdinaryProductRicciGeometry F.metric I) |
| 44 | (hRicci : IntrinsicGeneralizedRicciEquation R.leafwiseConnection) |
| 45 | {T tau : ℝ} (q : BackwardTimePath F T 0 tau) (A : SqrtRegularPath q) : |
| 46 | M14PullbackExtension (ordinaryProductLGeometry R hRicci) |
| 47 | (compatibleSquareCurve R.product.productCylinder T A.curve) |
| 48 | (sqrtParameterInterval 0 tau) |
| 49 | (compatibleSquareHorizontal R.product.productCylinder R.product.productMetric T A.curve) := by |
| 50 | let B := ordinaryModelHorizontalExtension R hRicci |
| 51 | (compatibleSquareCurve R.product.productCylinder T A.curve) |
| 52 | (curveVelocity (n := n) A.curve) (sqrtParameterInterval 0 tau) A.domain |
| 53 | A.open_domain A.interval_subset (model_curveVelocity_contDiffOn A.open_domain A.smooth) |
| 54 | refine { B with agrees := ?_ } |
| 55 | intro s _ |
| 56 | exact ordinaryProductHorizontalLift_cylinder R.product _ _ _ |
| 57 | |
| 58 | set_option backward.isDefEq.respectTransparency false in |
| 59 | /-- The square-root lift preserves the actual pullback connection, |
| 60 | including the explicit parameter derivative and both endpoints |
| 61 | (Proposition 12.13, pp. 304-306). -/ |
| 62 | theorem ordinarySquareExtension_covariantDerivative |
| 63 | (R : OrdinaryProductRicciGeometry F.metric I) |
| 64 | (hRicci : IntrinsicGeneralizedRicciEquation R.leafwiseConnection) |
| 65 | {T tau : ℝ} (q : BackwardTimePath F T 0 tau) (A : SqrtRegularPath q) |
| 66 | {s : ℝ} (hs : s ∈ sqrtParameterInterval 0 tau) : |
| 67 | M14HorizontalCovariantDerivative (ordinaryProductLGeometry R hRicci) |
| 68 | (compatibleSquareCurve R.product.productCylinder T A.curve) |
| 69 | (sqrtParameterInterval 0 tau) |
| 70 | (compatibleSquareHorizontal R.product.productCylinder R.product.productMetric T A.curve) |
| 71 | (ordinarySquareExtension R hRicci q A) s = |
| 72 | R.product.productMetric.spatialTangentEquiv |
| 73 | ((R.product.timeIntervals.interval I).realParam (T - s ^ 2)) (A.curve s) |
| 74 | (pullbackCovariantDerivative F (fun r => T - r ^ 2) A.curve |
| 75 | (curveVelocityWithin A.curve (sqrtParameterInterval 0 tau)) |
| 76 | (sqrtParameterInterval 0 tau) (ordinarySquareVelocityExtension q A) s) := by |
| 77 | let : NormedAddCommGroup (TangentSpace (spacetimeModel n) |
| 78 | (compatibleSquareCurve R.product.productCylinder T A.curve s)) := |
| 79 | inferInstanceAs (NormedAddCommGroup (SpacetimeModelVector n)) |
| 80 | let : NormedSpace ℝ (TangentSpace (spacetimeModel n) |
| 81 | (compatibleSquareCurve R.product.productCylinder T A.curve s)) := |
| 82 | inferInstanceAs (NormedSpace ℝ (SpacetimeModelVector n)) |
| 83 | have hK : UniqueDiffOn ℝ (sqrtParameterInterval 0 tau) := by |
| 84 | simpa only [sqrtParameterInterval, Real.sqrt_zero] using |
| 85 | (uniqueDiffOn_Icc (Real.sqrt_pos.mpr q.ordered)) |
| 86 | have hvel := (ordinarySquareVelocityExtension q A).agrees s hs |
| 87 | change curveVelocity (n := n) A.curve s = |
| 88 | curveVelocityWithin (n := n) A.curve (sqrtParameterInterval 0 tau) s at hvel |
| 89 | have ha := model_curveVelocity_contDiffOn A.open_domain A.smooth |
| 90 | have hpar0 := ordinaryProductHorizontalLift_hasDerivAt R.product |
| 91 | (compatibleSquareCurve R.product.productCylinder T A.curve s) |
| 92 | ((ha.contDiffAt (A.open_domain.mem_nhds (A.interval_subset hs))).differentiableAt |
| 93 | (by simp)).hasDerivAt |
| 94 | have hpar := hpar0.deriv |
| 95 | have hd := compatibleSquareCurve_derivative R.product.productCylinder R.product.productMetric T |
| 96 | (fun _ hr => ordinarySquarePath_clockMem q hr) hs (hK s hs) |
| 97 | ((A.smooth.contMDiffAt (A.open_domain.mem_nhds (A.interval_subset hs))).mdifferentiableAt |
| 98 | (by simp)) |
| 99 | change deriv (fun r => ordinaryProductHorizontalLift R.product |
| 100 | (compatibleSquareCurve R.product.productCylinder T A.curve s) |
| 101 | (curveVelocity (n := n) A.curve r)) s + |
| 102 | rawHorizontalCovariantDerivative R.leafwiseConnection |
| 103 | (fun z => ordinaryProductHorizontalLift R.product z (curveVelocity (n := n) A.curve s)) |
| 104 | (compatibleSquareCurve R.product.productCylinder T A.curve s) |
| 105 | (mfderivWithin (𝓘(ℝ, ℝ)) (spacetimeModel n) |
| 106 | (compatibleSquareCurve R.product.productCylinder T A.curve) |
| 107 | (sqrtParameterInterval 0 tau) s 1) = _ |
| 108 | rw [hpar, hd] |
| 109 | dsimp only [compatibleSquareCurve, compatibleSquareHorizontal] |
| 110 | rw [ordinaryProductHorizontalLift_rawDerivative R F.connection, |
| 111 | ordinaryProductHorizontalLift_cylinder] |
| 112 | dsimp only [pullbackCovariantDerivative, ordinarySquareVelocityExtension, |
| 113 | modelCurveVelocityExtension] |
| 114 | rw [(R.product.timeIntervals.interval I).realParam_val (ordinarySquarePath_clockMem q hs), |
| 115 | ← hvel] |
| 116 | exact (R.product.productMetric.spatialTangentEquiv _ _).map_add _ _ |>.symm |
| 117 | |
| 118 | end |
| 119 | |
| 120 | end PoincareMT.M34 |