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.OrdinarySquareEuler |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Basic.SquareInitialValue |
| 3 | |
| 4 | /-! |
| 5 | # Positive square-root survival in the actual ordinary product |
| 6 | |
| 7 | An ordinary minimizer supplies a regularized Euler solution. Its actual |
| 8 | lift yields a positive-time initial-value path, which proves the required |
| 9 | survival premise before the M14 stable-set theorem is applied. |
| 10 | Source: Morgan-Tian Proposition 12.13, pp. 304-306; sections 7-8 of |
| 11 | `proof-work/tasks/M34/derivations/ordinary-square-survival.md`. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | namespace PoincareMT.M34 |
| 20 | |
| 21 | variable {n : ℕ} {I : SpacetimeInterval} |
| 22 | {F : RicciFlow n (EuclideanSpace ℝ (Fin n)) I.domain} |
| 23 | |
| 24 | set_option backward.isDefEq.respectTransparency false in |
| 25 | /-- Any supplied generalized exponential family on the actual product |
| 26 | has a survivor at each positive time in the ordinary complete window. |
| 27 | Survival comes from the actual square-root Euler path, not domain-zero |
| 28 | membership (Proposition 12.13, pp. 304-306). -/ |
| 29 | theorem ordinaryProduct_positive_survival |
| 30 | (R : OrdinaryProductRicciGeometry F.metric I) |
| 31 | (hRicci : IntrinsicGeneralizedRicciEquation R.leafwiseConnection) |
| 32 | {T taumax tau : ℝ} (L : LGeodesicTheory F T taumax) (hT : T ∈ I.domain) |
| 33 | (htau : 0 < tau) (hmax : tau ≤ taumax) (p : EuclideanSpace ℝ (Fin n)) |
| 34 | (E : M14ExponentialFamily (ordinaryProductLGeometry R hRicci) T |
| 35 | (R.product.productCylinder.toSpacetime (⟨T, hT⟩, p))) : |
| 36 | ∃ Z, (Z, Real.sqrt tau) ∈ E.domain := by |
| 37 | obtain ⟨q, hq0, _, hqmin⟩ := L.minimizing_existence 0 tau le_rfl htau hmax p p |
| 38 | obtain ⟨A⟩ := L.regularized_geodesic 0 tau le_rfl htau hmax q |
| 39 | (L.euler_lagrange 0 tau le_rfl htau hmax q hqmin) |
| 40 | obtain ⟨Z, hZ⟩ := exists_squareInitialValue_of_euler (ordinaryLiftedPath R hRicci q) |
| 41 | (ordinarySquarePath R hRicci q A.path) (ordinarySquareExtension R hRicci q A.path) |
| 42 | (fun _ hs W => ordinarySquarePath_euler R hRicci q A hs W) |
| 43 | let xq : (ordinaryProductLGeometry R hRicci).Point := |
| 44 | R.product.productCylinder.toSpacetime |
| 45 | (⟨T - 0, q.time_mem 0 ⟨le_rfl, q.ordered.le⟩⟩, q.curve 0) |
| 46 | have H : ∃ (Z : (ordinaryProductLGeometry R hRicci).Horizontal xq) |
| 47 | (y : (ordinaryProductLGeometry R hRicci).Point), |
| 48 | Nonempty (M14SquareRootInitialValuePath (ordinaryProductLGeometry R hRicci) |
| 49 | T tau xq y Z) := ⟨Z, _, hZ⟩ |
| 50 | have hx : xq = R.product.productCylinder.toSpacetime (⟨T, hT⟩, p) := by |
| 51 | apply congrArg R.product.productCylinder.toSpacetime |
| 52 | exact Prod.ext (Subtype.ext (sub_zero T)) hq0 |
| 53 | rw [hx] at H |
| 54 | obtain ⟨Z, y, hy⟩ := H |
| 55 | refine ⟨Z, (E.positive_survival_iff Z (Real.sqrt tau) (Real.sqrt_pos.mpr htau)).mpr ?_⟩ |
| 56 | simpa only [Real.sq_sqrt htau.le] using (show ∃ y, |
| 57 | Nonempty (M14SquareRootInitialValuePath (ordinaryProductLGeometry R hRicci) |
| 58 | T tau (R.product.productCylinder.toSpacetime (⟨T, hT⟩, p)) y Z) from ⟨y, hy⟩) |
| 59 | |
| 60 | /-- The actual ordinary product supplies the stable set only after its |
| 61 | positive-survival premise has been proved (Proposition 12.13). -/ |
| 62 | theorem ordinaryProduct_stableSet |
| 63 | (R : OrdinaryProductRicciGeometry F.metric I) |
| 64 | (hRicci : IntrinsicGeneralizedRicciEquation R.leafwiseConnection) |
| 65 | (C : M14ExponentialConclusion (ordinaryProductLGeometry R hRicci)) |
| 66 | {T taumax tau : ℝ} (L : LGeodesicTheory F T taumax) (hT : T ∈ I.domain) |
| 67 | (htau : 0 < tau) (hmax : tau ≤ taumax) (p : EuclideanSpace ℝ (Fin n)) : |
| 68 | ∃ E : M14ExponentialFamily (ordinaryProductLGeometry R hRicci) T |
| 69 | (R.product.productCylinder.toSpacetime (⟨T, hT⟩, p)), |
| 70 | Nonempty (M14StableSet (ordinaryProductLGeometry R hRicci) T tau |
| 71 | (R.product.productCylinder.toSpacetime (⟨T, hT⟩, p)) E) := by |
| 72 | have hbase : (ordinaryProductLGeometry R hRicci).spacetime.timeFunction |
| 73 | (R.product.productCylinder.toSpacetime (⟨T, hT⟩, p)) = T := |
| 74 | R.product.productCylinder.time_eq _ |
| 75 | obtain ⟨E⟩ := C.family T _ hbase |
| 76 | exact ⟨E, C.stable T tau _ hbase htau E |
| 77 | (ordinaryProduct_positive_survival R hRicci L hT htau hmax p E)⟩ |
| 78 | |
| 79 | end PoincareMT.M34 |