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.Comparison.Approximation |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.Estimates |
| 3 | |
| 4 | /-! |
| 5 | # M64 uniform polygon approximation and the exact evolving family |
| 6 | |
| 7 | Morgan--Tian Definition 19.18, Claims 19.19-19.20, Corollary 19.21, |
| 8 | Lemma 19.17 and Claim 19.22, pp. 449-453. Thresholds precede both polygon |
| 9 | count and family member. The evolving family retains the literal static |
| 10 | approximation and applied estimates on those same solutions for M65. |
| 11 | |
| 12 | Source and primitive contract: reviews/contracts/M64-round1.md. |
| 13 | Corrections: reviews/errata/2026-09-14-m64-annulus-comparison.md and the |
| 14 | 2015 correction's dependence on initial length and total curvature. |
| 15 | These statements contain no predecessor theorem service or admission. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open scoped Manifold ContDiff Bundle |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT |
| 25 | |
| 26 | variable {M : Type u} [TopologicalSpace M] |
| 27 | [ChartedSpace LoopAmbient M] [IsManifold (𝓡 3) ∞ M] |
| 28 | |
| 29 | /-- Static approximation for the actual metric and compatible connection. |
| 30 | The full M64 theorem supplies this for compact Hausdorff second-countable |
| 31 | smooth three-manifolds. Nullity is required only for the disk conclusions. -/ |
| 32 | structure M64StaticApproximationTheory (g : RiemannianMetric 3 M) |
| 33 | (D : LeviCivitaData g) : Prop where |
| 34 | sampled_exists : ∀ gamma : C1FreeLoopSpace (M := M), ∀ N : ℕ, 0 < N → |
| 35 | ∃ polygon : M63GeodesicPolygon g D N, |
| 36 | M64SampledPolygon gamma polygon ∧ Nonempty (M64PolygonBoundary polygon) |
| 37 | polygon_length : ∀ N : ℕ, 0 < N → ∀ polygon : M63GeodesicPolygon g D N, |
| 38 | m64PolygonLength polygon = ∑ j : Fin N, m63CellLength N * (polygon.side j).speed |
| 39 | uniform_compact : ∀ X : Set (C1FreeLoopSpace (M := M)), IsCompact X → |
| 40 | ∀ zeta : ℝ, 0 < zeta → ∃ N0 : ℕ, 0 < N0 ∧ |
| 41 | ∀ N : ℕ, N0 ≤ N → ∀ gamma : C1FreeLoopSpace (M := M), gamma ∈ X → |
| 42 | ∃ polygon : M63GeodesicPolygon g D N, |
| 43 | M64SampledPolygon gamma polygon ∧ |
| 44 | (∀ other : M63GeodesicPolygon g D N, M64SampledPolygon gamma other → |
| 45 | ∀ x, other.map x = polygon.map x) ∧ |
| 46 | Nonempty (M64PolygonBoundary polygon) ∧ |
| 47 | (0 ≤ freeLoopLength g gamma - m64PolygonLength polygon ∧ |
| 48 | freeLoopLength g gamma - m64PolygonLength polygon < zeta) ∧ |
| 49 | ∃ A : M64Annulus g (periodicFreeLoop gamma) polygon.map, |
| 50 | M64PiecewiseC1Annulus A ∧ M64GeodesicAnnulus D A ∧ |
| 51 | 0 ≤ A.area ∧ A.area < zeta |
| 52 | raw_family : ∀ Gamma : ContinuousMap LoopTwoSphere (C1FreeLoopSpace (M := M)), |
| 53 | M61NullFamily Gamma → ∀ zeta : ℝ, 0 < zeta → |
| 54 | ∃ N0 : ℕ, 0 < N0 ∧ ∀ N : ℕ, N0 ≤ N → |
| 55 | ∃ A : M64RawFamilyApproximation g D Gamma zeta, A.count = N |
| 56 | |
| 57 | variable {a b : ℝ} {F : RicciFlow 3 M (Set.Icc a b)} |
| 58 | |
| 59 | /-- Applied geometric estimates for every displayed solution. The chosen |
| 60 | products, curves, time slab and three constants are exactly those of C. -/ |
| 61 | structure M64AppliedFamilyEstimates (G : M63AmbientGeometry F) |
| 62 | {Gamma : ContinuousMap LoopTwoSphere (C1FreeLoopSpace (M := M))} |
| 63 | {zeta : ℝ} (C : M63FamilyConclusion G Gamma zeta) : Prop where |
| 64 | curve_estimates : ∀ circumference (h : 0 < circumference), ∀ z : LoopTwoSphere, |
| 65 | M63C2CurveEstimates (G.product circumference h).flow |
| 66 | ((C.solutions circumference h).curve z) b G.K0 G.K1 G.K2 |
| 67 | |
| 68 | /-- The all-N approximation with its exact M63 family and applied estimates. |
| 69 | Equality of the retained approximation identifies the same polygon maps, |
| 70 | flattened C1 loops, initial ramps and all subsequent projected families. -/ |
| 71 | structure M64EvolvingApproximation (G : M63AmbientGeometry F) |
| 72 | (Gamma : ContinuousMap LoopTwoSphere (C1FreeLoopSpace (M := M))) |
| 73 | (zeta : ℝ) (N : ℕ) where |
| 74 | raw : M64RawFamilyApproximation (F.metric a) (F.connection a) Gamma zeta |
| 75 | count_eq : raw.count = N |
| 76 | family : M63FamilyConclusion G Gamma zeta |
| 77 | approximation_eq : family.approximation = raw.toM63 |
| 78 | estimates : M64AppliedFamilyEstimates G family |
| 79 | |
| 80 | /-- Full all-N construction on the one selected actual product geometry. |
| 81 | The universal M63 analytic service is used by the M64 proof, then only its |
| 82 | applied conclusions on the returned solutions are retained. -/ |
| 83 | def M64FamilyApproximationTheory (F : RicciFlow 3 M (Set.Icc a b)) |
| 84 | (G : M63AmbientGeometry F) : Prop := |
| 85 | ∀ Gamma : ContinuousMap LoopTwoSphere (C1FreeLoopSpace (M := M)), |
| 86 | M61NullFamily Gamma → ∀ zeta : ℝ, 0 < zeta → |
| 87 | ∃ N0 : ℕ, 0 < N0 ∧ ∀ N : ℕ, N0 ≤ N → |
| 88 | Nonempty (M64EvolvingApproximation G Gamma zeta N) |
| 89 | |
| 90 | end PoincareMT |