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.CurveShortening.Evolution.Geometry |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.Geometry |
| 3 | |
| 4 | /-! |
| 5 | # Primitive curve-shortening geometry for M62 |
| 6 | |
| 7 | Morgan--Tian pp. 441-446, with the 2015 Section 19.2 correction, pp. 2-8. |
| 8 | Every quantity is computed from the displayed map and the actual ambient |
| 9 | metric/connection. Parameter pullbacks allow self-intersections and retain |
| 10 | C2 endpoint data. The full milestone statement and its sole admission are |
| 11 | owned by M62; these definitions contain no proof placeholders. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle intervalIntegral |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT |
| 21 | |
| 22 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 24 | {a b : ℝ} |
| 25 | |
| 26 | /-- Actual spatial pullback differentiation with respect to arc length. -/ |
| 27 | noncomputable def m62SpatialDerivative (F : RicciFlow n M (Set.Icc a b)) |
| 28 | (c : ℝ → ℝ → M) (t : ℝ) |
| 29 | (Y : ∀ x, TangentSpace (𝓡 n) (c x t)) (x : ℝ) : |
| 30 | TangentSpace (𝓡 n) (c x t) := |
| 31 | (curveSpeed F c t x)⁻¹ • |
| 32 | rampHorizontalCovariantDerivative (F.connection t) (fun y ↦ c y t) Y x |
| 33 | |
| 34 | /-- Curvature vector of the chosen parameterized curve, including at self-intersections. -/ |
| 35 | noncomputable def m62CurvatureVector (F : RicciFlow n M (Set.Icc a b)) |
| 36 | (c : ℝ → ℝ → M) (t x : ℝ) : TangentSpace (𝓡 n) (c x t) := |
| 37 | m62SpatialDerivative F c t (spatialUnitTangent F c t) x |
| 38 | |
| 39 | noncomputable def m62CurvatureSquared (F : RicciFlow n M (Set.Icc a b)) |
| 40 | (c : ℝ → ℝ → M) (t x : ℝ) : ℝ := |
| 41 | (F.metric t).inner (c x t) (m62CurvatureVector F c t x) |
| 42 | (m62CurvatureVector F c t x) |
| 43 | |
| 44 | noncomputable def m62Curvature (F : RicciFlow n M (Set.Icc a b)) |
| 45 | (c : ℝ → ℝ → M) (t x : ℝ) : ℝ := |
| 46 | Real.sqrt (m62CurvatureSquared F c t x) |
| 47 | |
| 48 | /-- The spatial normal projection removes only the unit curve tangent. -/ |
| 49 | noncomputable def m62SpatialNormalDerivative (F : RicciFlow n M (Set.Icc a b)) |
| 50 | (c : ℝ → ℝ → M) (t x : ℝ) : TangentSpace (𝓡 n) (c x t) := |
| 51 | let A := m62SpatialDerivative F c t (m62CurvatureVector F c t) x |
| 52 | let S := spatialUnitTangent F c t x |
| 53 | A - (F.metric t).inner (c x t) A S • S |
| 54 | |
| 55 | noncomputable def m62ArcDerivative (F : RicciFlow n M (Set.Icc a b)) |
| 56 | (c : ℝ → ℝ → M) (t : ℝ) (f : ℝ → ℝ) (x : ℝ) : ℝ := |
| 57 | (curveSpeed F c t x)⁻¹ * deriv f x |
| 58 | |
| 59 | /-- Iteration retains the spatial variation of the speed coefficient. -/ |
| 60 | noncomputable def m62ArcSecondDerivative (F : RicciFlow n M (Set.Icc a b)) |
| 61 | (c : ℝ → ℝ → M) (t : ℝ) (f : ℝ → ℝ) (x : ℝ) : ℝ := |
| 62 | m62ArcDerivative F c t (m62ArcDerivative F c t f) x |
| 63 | |
| 64 | noncomputable def m62RegularizedCurvature (F : RicciFlow n M (Set.Icc a b)) |
| 65 | (c : ℝ → ℝ → M) (ε t x : ℝ) : ℝ := |
| 66 | Real.sqrt (m62CurvatureSquared F c t x + ε ^ 2) |
| 67 | |
| 68 | noncomputable def m62Length (F : RicciFlow n M (Set.Icc a b)) |
| 69 | (c : ℝ → ℝ → M) (t : ℝ) : ℝ := |
| 70 | ∫ x in (0 : ℝ)..curvePeriod, curveSpeed F c t x |
| 71 | |
| 72 | noncomputable def m62TotalCurvature (F : RicciFlow n M (Set.Icc a b)) |
| 73 | (c : ℝ → ℝ → M) (t : ℝ) : ℝ := |
| 74 | ∫ x in (0 : ℝ)..curvePeriod, m62Curvature F c t x * curveSpeed F c t x |
| 75 | |
| 76 | noncomputable def m62RegularizedTotalCurvature (F : RicciFlow n M (Set.Icc a b)) |
| 77 | (c : ℝ → ℝ → M) (ε t : ℝ) : ℝ := |
| 78 | ∫ x in (0 : ℝ)..curvePeriod, |
| 79 | m62RegularizedCurvature F c ε t x * curveSpeed F c t x |
| 80 | |
| 81 | /-- The actual Ricci pairing of the spatial unit tangent. -/ |
| 82 | noncomputable def m62TangentRicci (F : RicciFlow n M (Set.Icc a b)) |
| 83 | (c : ℝ → ℝ → M) (t x : ℝ) : ℝ := |
| 84 | (F.connection t).ricci (c x t) (spatialUnitTangent F c t x) |
| 85 | (spatialUnitTangent F c t x) |
| 86 | |
| 87 | /-- Primitive regularity and curve-shortening equation for a displayed map. |
| 88 | Only C2 spatial regularity is imposed at the time endpoints. -/ |
| 89 | structure M62ShrinkingCurve (F : RicciFlow n M (Set.Icc a b)) |
| 90 | (c : ℝ → ℝ → M) : Prop where |
| 91 | periodic : ∀ t ∈ Set.Icc a b, ∀ x, c (x + curvePeriod) t = c x t |
| 92 | spatial_regular : ∀ t ∈ Set.Icc a b, |
| 93 | ContMDiff (𝓘(ℝ, ℝ)) (𝓡 n) 2 (fun x ↦ c x t) |
| 94 | joint_smooth : ContMDiffOn (𝓘(ℝ, ℝ × ℝ)) (𝓡 n) ∞ |
| 95 | (fun z : ℝ × ℝ ↦ c z.1 z.2) (Set.univ ×ˢ Set.Ioo a b) |
| 96 | immersed : ∀ t ∈ Set.Icc a b, ∀ x, |
| 97 | curveVelocity (n := n) (fun y ↦ c y t) x ≠ 0 |
| 98 | continuous : ContinuousOn (fun z : ℝ × ℝ ↦ c z.1 z.2) |
| 99 | (Set.univ ×ˢ Set.Icc a b) |
| 100 | velocity_continuous : ContinuousOn |
| 101 | (fun z : ℝ × ℝ ↦ (⟨c z.1 z.2, |
| 102 | curveVelocity (n := n) (fun y ↦ c y z.2) z.1⟩ : TangentBundle (𝓡 n) M)) |
| 103 | (Set.univ ×ˢ Set.Icc a b) |
| 104 | curvature_continuous : ContinuousOn |
| 105 | (fun z : ℝ × ℝ ↦ (⟨c z.1 z.2, m62CurvatureVector F c z.2 z.1⟩ : |
| 106 | TangentBundle (𝓡 n) M)) (Set.univ ×ˢ Set.Icc a b) |
| 107 | equation : ∀ t ∈ Set.Ioo a b, ∀ x, |
| 108 | curveVelocity (n := n) (fun s ↦ c x s) t = m62CurvatureVector F c t x |
| 109 | |
| 110 | /-- Constants from the full spacetime-normal estimate, chosen before the curve. -/ |
| 111 | def m62C0 (K0 K1 K2 : ℝ) : ℝ := |
| 112 | 2 * K0 + 6 * K2 + 2 * K2 ^ 2 + 6 * K1 |
| 113 | |
| 114 | noncomputable def m62C1 (K0 K1 K2 : ℝ) : ℝ := m62C0 K0 K1 K2 / 2 |
| 115 | |
| 116 | end PoincareMT |