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.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.PolygonApproximation.Interpolator.ColumnSupplier |
| 3 | import PoincareLib.Geometry.CurveShortening.Comparison.PolygonApproximation.Interpolator.VerticalColumnAE |
| 4 | import PoincareLib.Geometry.CurveShortening.Comparison.PolygonApproximation.Uniform.SampledPolygonCloseness |
| 5 | |
| 6 | /-! |
| 7 | # The vertical interpolator column tends to zero |
| 8 | |
| 9 | The vertical column is the constant speed of the minimizing segment from |
| 10 | the source loop to its sampled polygon. The source speed bound therefore |
| 11 | controls this column by twice the polygon mesh length. |
| 12 | |
| 13 | Morgan--Tian context: Section 19.4, Definition 19.18 and Claims 19.19-19.22, printed pp. |
| 14 | 450-453. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open Set Filter MeasureTheory Bundle |
| 20 | open scoped Manifold ContDiff Topology Bundle ENNReal |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT |
| 25 | |
| 26 | variable {M : Type u} [TopologicalSpace M] [T2Space M] |
| 27 | [ChartedSpace LoopAmbient M] [IsManifold (𝓡 3) ∞ M] |
| 28 | |
| 29 | /-- Endpoint pairs at strictly bounded Riemannian extended distance form an open set. |
| 30 | Source: Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project |
| 31 | construction in `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 32 | theorem m64_isOpen_short_pair_tube (g : RiemannianMetric 3 M) (r : ℝ) : |
| 33 | IsOpen {pq : M × M | g.edist pq.1 pq.2 < ENNReal.ofReal r} := by |
| 34 | let : LocallyCompactSpace M := ChartedSpace.locallyCompactSpace LoopAmbient M |
| 35 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 36 | ⟨g.toRiemannianMetric⟩ |
| 37 | let : IsContinuousRiemannianBundle LoopAmbient (TangentSpace (𝓡 3) : M → Type _) := |
| 38 | ⟨⟨g.inner, g.contMDiff.continuous, fun _ _ _ => rfl⟩⟩ |
| 39 | let : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 3) M |
| 40 | exact isOpen_lt continuous_edist continuous_const |
| 41 | |
| 42 | /-- The sampled interpolator's vertical column is bounded by twice the source speed times |
| 43 | cell length. Source: Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. |
| 44 | 450-453; project construction in |
| 45 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 46 | theorem m64_sampled_interpolator_vertical_column_bound |
| 47 | (g : RiemannianMetric 3 M) (D : LeviCivitaData g) |
| 48 | {r S : ℝ} (hS : 0 ≤ S) (H : ℝ × (M × M) → M) |
| 49 | (hH : ContMDiffOn |
| 50 | (𝓘(ℝ, ℝ).prod ((𝓡 3).prod (𝓡 3))) (𝓡 3) ∞ H |
| 51 | (Ioo (-1 : ℝ) 2 ×ˢ |
| 52 | {pq : M × M | g.edist pq.1 pq.2 < ENNReal.ofReal r})) |
| 53 | (hprops : ∀ p q : M, g.edist p q < ENNReal.ofReal r → |
| 54 | H (0, p, q) = p ∧ H (1, p, q) = q ∧ |
| 55 | g.IsGeodesicOn (fun t => H (t, p, q)) (Ioo (-1 : ℝ) 2) ∧ |
| 56 | (∀ t ∈ Ioo (-1 : ℝ) 2, |
| 57 | g.tangentNorm (H (t, p, q)) |
| 58 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 3) (fun s => H (s, p, q)) t 1) = |
| 59 | (g.edist p q).toReal) ∧ |
| 60 | g.pathELength (fun t => H (t, p, q)) 0 1 = g.edist p q) |
| 61 | {N : ℕ} (hN : 0 < N) (gamma : C1FreeLoopSpace (M := M)) |
| 62 | (polygon : M63GeodesicPolygon g D N) |
| 63 | (hsampled : M64SampledPolygon gamma polygon) |
| 64 | (hbound : ∀ x ∈ Icc (0 : ℝ) curvePeriod, |
| 65 | g.tangentNorm (periodicFreeLoop gamma x) |
| 66 | (curveVelocity (periodicFreeLoop gamma) x) ≤ S) |
| 67 | (hshort : ∀ x : ℝ, |
| 68 | g.edist (periodicFreeLoop gamma x) (polygon.map x) < ENNReal.ofReal r) : |
| 69 | ∀ᵐ z ∂volume.restrict m64AnnulusDomain, |
| 70 | g.tangentNorm (H (z 1, periodicFreeLoop gamma (z 0), polygon.map (z 0))) |
| 71 | (mfderiv (𝓡 2) (𝓡 3) |
| 72 | (fun p : LoopPlane => H (p 1, periodicFreeLoop gamma (p 0), |
| 73 | polygon.map (p 0))) z (EuclideanSpace.basisFun (Fin 2) ℝ 1)) ≤ |
| 74 | 2 * S * m63CellLength N := by |
| 75 | have hpair : ∀ j : Fin N, ∀ p ∈ m64PolygonCellSet j, |
| 76 | (periodicFreeLoop gamma (p 0), (polygon.side j).map |
| 77 | (p 0 - m63CellLeft N j)) ∈ |
| 78 | {pq : M × M | g.edist pq.1 pq.2 < ENNReal.ofReal r} := by |
| 79 | intro j p hp |
| 80 | exact m64_cell_side_short_of_polygon_short polygon hshort j hp |
| 81 | apply m64_interpolator_vertical_column_ae_of_cell_extensions hN polygon rfl |
| 82 | intro j z hz |
| 83 | rw [m64_interpolator_vertical_column_of_global_short polygon |
| 84 | (m64_isOpen_short_pair_tube g r) hH |
| 85 | (Proofs.M58.contMDiff_periodicFreeLoop gamma).contMDiffOn hpair j hz hshort |
| 86 | (hprops _ _)] |
| 87 | have hpoly := (m64_polygon_map_eventuallyEq_side_of_cell_interior polygon j hz).self_of_nhds |
| 88 | rw [← hpoly] |
| 89 | apply ENNReal.toReal_le_of_le_ofReal |
| 90 | (mul_nonneg (mul_nonneg (by norm_num) hS) (m63CellLength_pos hN).le) |
| 91 | exact m64_sampled_polygon_edist_le hN polygon |
| 92 | (Proofs.M58.contMDiff_periodicFreeLoop gamma) |
| 93 | (Proofs.M58.periodic_periodicFreeLoop gamma) hsampled hS hbound (z 0) |
| 94 | |
| 95 | end PoincareMT |