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.OrdinaryProductCurvature |
| 2 | |
| 3 | /-! |
| 4 | # Projection of actual generalized paths to the ordinary product |
| 5 | |
| 6 | The actual projection differentiates the horizontal velocity and preserves |
| 7 | the scalar-plus-kinetic density on the open path interval. Endpoint-free |
| 8 | integral congruence retains the genuine finite action. |
| 9 | Source: Morgan-Tian Proposition 12.13, pp. 304-306, ordinary capture. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set MeasureTheory |
| 15 | open scoped Manifold ContDiff Bundle Topology intervalIntegral |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M34 |
| 20 | |
| 21 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 23 | {I : SpacetimeInterval} {F : RicciFlow n M I.domain} |
| 24 | (R : OrdinaryProductRicciGeometry F.metric I) |
| 25 | (hRicci : IntrinsicGeneralizedRicciEquation R.leafwiseConnection) |
| 26 | |
| 27 | set_option backward.isDefEq.respectTransparency false in |
| 28 | /-- The projected curve's actual velocity is the spatial projection of |
| 29 | the given horizontal velocity (Proposition 12.13, pp. 304-306). -/ |
| 30 | theorem ordinaryProjectedCurve_velocity {T a b : ℝ} |
| 31 | {x y : (ordinaryProductLGeometry R hRicci).Point} |
| 32 | (p : M14BackwardPath (ordinaryProductLGeometry R hRicci) T a b x y) |
| 33 | {s : ℝ} (hs : s ∈ Ioo a b) : |
| 34 | curveVelocity (ordinaryProductProjection R.product ∘ p.curve) s = |
| 35 | mfderiv (spacetimeModel n) (𝓡 n) (ordinaryProductProjection R.product) |
| 36 | (p.curve s) (p.horizontal_velocity s).val := by |
| 37 | have hreg := (p.curve_regular.contMDiffAt (isOpen_Ioo.mem_nhds hs)).mdifferentiableAt |
| 38 | (by norm_num) |
| 39 | have hd := mfderiv_comp s |
| 40 | (ordinaryProductProjection_contMDiff R.product |>.mdifferentiableAt (by simp)) hreg |
| 41 | have hv := congrArg (fun L : ℝ →L[ℝ] EuclideanSpace ℝ (Fin n) => L 1) hd |
| 42 | change curveVelocity (ordinaryProductProjection R.product ∘ p.curve) s = |
| 43 | mfderiv (spacetimeModel n) (𝓡 n) (ordinaryProductProjection R.product) (p.curve s) |
| 44 | (mfderiv (𝓘(ℝ, ℝ)) (spacetimeModel n) p.curve s 1) at hv |
| 45 | rw [p.derivative_eq s hs, map_add, map_neg] at hv |
| 46 | have hzero : mfderiv (spacetimeModel n) (𝓡 n) (ordinaryProductProjection R.product) |
| 47 | (p.curve s) ((ordinaryProductLGeometry R hRicci).spacetime.timeVector (p.curve s)) = 0 := |
| 48 | ordinaryProductProjection_timeVector_at R.product (p.curve s) |
| 49 | rw [hzero, neg_zero, zero_add] at hv |
| 50 | exact hv |
| 51 | |
| 52 | /-- Projection preserves the actual L-density at every interior parameter, |
| 53 | with no endpoint derivative assertion (Proposition 12.13, pp. 304-306). -/ |
| 54 | theorem ordinaryProjectedCurve_integrand {T a b : ℝ} |
| 55 | {x y : (ordinaryProductLGeometry R hRicci).Point} |
| 56 | (p : M14BackwardPath (ordinaryProductLGeometry R hRicci) T a b x y) |
| 57 | {s : ℝ} (hs : s ∈ Ioo a b) : |
| 58 | backwardLIntegrand F T (ordinaryProductProjection R.product ∘ p.curve) s = |
| 59 | M14BackwardLIntegrand (ordinaryProductLGeometry R hRicci) p s := by |
| 60 | have htime : (p.curve s).1.val = T - s := p.curve_time s (Ioo_subset_Icc_self hs) |
| 61 | have hscalar := ordinaryProduct_scalar_eq R F.connection (p.curve s).1 (p.curve s).2 |
| 62 | rw [R.product.productCylinder_eq, htime] at hscalar |
| 63 | have hmetric := ordinaryProductProjection_inner R.product (p.curve s) |
| 64 | (p.horizontal_velocity s) (p.horizontal_velocity s) |
| 65 | rw [htime] at hmetric |
| 66 | change Real.sqrt s * ((F.connection (T - s)).scalarCurvature |
| 67 | (ordinaryProductProjection R.product (p.curve s)) + |
| 68 | (F.metric (T - s)).inner (ordinaryProductProjection R.product (p.curve s)) |
| 69 | (curveVelocity (ordinaryProductProjection R.product ∘ p.curve) s) |
| 70 | (curveVelocity (ordinaryProductProjection R.product ∘ p.curve) s)) = _ |
| 71 | rw [ordinaryProjectedCurve_velocity R hRicci p hs, hmetric, |
| 72 | ordinaryProductProjection_eq, hscalar] |
| 73 | rfl |
| 74 | |
| 75 | /-- An actual generalized path projects to an admissible ordinary path, |
| 76 | including its genuine action integrability (Proposition 12.13). -/ |
| 77 | noncomputable def ordinaryProjectedPath {T a b : ℝ} (hT : T ∈ I.domain) |
| 78 | {x y : (ordinaryProductLGeometry R hRicci).Point} |
| 79 | (p : M14BackwardPath (ordinaryProductLGeometry R hRicci) T a b x y) : |
| 80 | BackwardTimePath F T a b where |
| 81 | curve := ordinaryProductProjection R.product ∘ p.curve |
| 82 | nonnegative := p.tau_nonneg |
| 83 | ordered := p.tau_lt |
| 84 | terminal_mem := hT |
| 85 | time_mem := by |
| 86 | intro s hs |
| 87 | exact (p.curve_time s hs) ▸ (p.curve s).1.property |
| 88 | continuous := (ordinaryProductProjection_contMDiff R.product).continuous.comp_continuousOn |
| 89 | p.curve_continuous |
| 90 | regular := ((ordinaryProductProjection_contMDiff R.product).of_le (by simp)).comp_contMDiffOn |
| 91 | p.curve_regular |
| 92 | l_integrable := p.action_integrable.congr_uIoo (by |
| 93 | rw [uIoo_of_le p.tau_lt.le] |
| 94 | intro s hs |
| 95 | exact (ordinaryProjectedCurve_integrand R hRicci p hs).symm) |
| 96 | |
| 97 | /-- Projecting a path preserves its actual action integral |
| 98 | (Proposition 12.13, pp. 304-306). -/ |
| 99 | theorem ordinaryProjectedPath_action {T a b : ℝ} (hT : T ∈ I.domain) |
| 100 | {x y : (ordinaryProductLGeometry R hRicci).Point} |
| 101 | (p : M14BackwardPath (ordinaryProductLGeometry R hRicci) T a b x y) : |
| 102 | backwardLLength F T a b (ordinaryProjectedPath R hRicci hT p).curve = |
| 103 | M14BackwardLAction (ordinaryProductLGeometry R hRicci) p := by |
| 104 | apply intervalIntegral.integral_congr_Ioo_of_le p.tau_lt.le |
| 105 | intro s hs |
| 106 | exact ordinaryProjectedCurve_integrand R hRicci p hs |
| 107 | |
| 108 | end PoincareMT.M34 |