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.IntrinsicComparison.Region.Minimizer |
| 2 | import PoincareLib.Geometry.Riemannian.Comparison.Volume.Conjugate.Energy.Length |
| 3 | |
| 4 | /-! Intrinsic metric variation of the actual boundary and unit-speed sides. |
| 5 | These are the two finite length bounds in MT Claim 19.40, p. 470. -/ |
| 6 | |
| 7 | noncomputable section |
| 8 | set_option autoImplicit false |
| 9 | set_option warningAsError true |
| 10 | set_option backward.isDefEq.respectTransparency false |
| 11 | |
| 12 | open Set |
| 13 | open scoped ENNReal Manifold ContDiff |
| 14 | |
| 15 | namespace PoincareMT |
| 16 | |
| 17 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 18 | normedSpaceTangentSpaceVectorSpace |
| 19 | |
| 20 | /-- The Riemannian path length of a nonconstant radius circle equals its actual boundary |
| 21 | speed integral on the ordered interval. Source: MT Claim 19.40, pp. 470-471; |
| 22 | `proof-work/tasks/M64/derivations/2026-09-27-minimal-contact-regularity.md`, Section 7. -/ |
| 23 | theorem m64Intrinsic_boundary_pathELength |
| 24 | (N : IntrinsicAnnulus) {radius a b : ℝ} (hradius : radius ≠ 0) (hab : a ≤ b) : |
| 25 | N.metric.pathELength (intrinsicAnnulusBoundary radius) a b = |
| 26 | ENNReal.ofReal (intrinsicBoundaryLength N.metric radius a b) := by |
| 27 | exact N.metric.pathELength_eq_ofReal_integral_speed hab |
| 28 | (m64Intrinsic_contDiff_boundarySpeed N hradius).continuous.continuousOn |
| 29 | |
| 30 | /-- Intrinsic metric variation of a nonconstant radius circle is bounded by its actual |
| 31 | boundary speed integral. Source: MT Claim 19.40, pp. 470-471; |
| 32 | `proof-work/tasks/M64/derivations/2026-09-27-minimal-contact-regularity.md`, Section 7. -/ |
| 33 | theorem m64Intrinsic_boundary_curveVariation_le |
| 34 | (N : IntrinsicAnnulus) {radius a b : ℝ} (hradius : radius ≠ 0) (hab : a ≤ b) : |
| 35 | m64IntrinsicCurveVariation N.metric (intrinsicAnnulusBoundary radius) a b ≤ |
| 36 | ENNReal.ofReal (intrinsicBoundaryLength N.metric radius a b) := by |
| 37 | rw [← m64Intrinsic_boundary_pathELength N hradius hab] |
| 38 | exact m64Intrinsic_curveVariation_le_pathELength N.metric |
| 39 | ((contMDiff_iff_contDiff.mpr |
| 40 | (m64Intrinsic_contDiff_boundary radius)).of_le (by simp)).contMDiffOn |
| 41 | |
| 42 | /-- A smooth curve with metric speed one has intrinsic variation at most the parameter |
| 43 | length, including the empty-interval case. Source: MT Claim 19.40, pp. 470-471; |
| 44 | `proof-work/tasks/M64/derivations/2026-09-27-minimal-contact-regularity.md`, Section 7. -/ |
| 45 | theorem m64Intrinsic_unit_curveVariation_le |
| 46 | (N : IntrinsicAnnulus) {γ : ℝ → AnnulusCoordinates} {a b : ℝ} |
| 47 | (hγ : ContDiff ℝ ∞ γ) |
| 48 | (hunit : ∀ t ∈ Icc a b, N.metric.inner (γ t) (deriv γ t) (deriv γ t) = 1) : |
| 49 | m64IntrinsicCurveVariation N.metric γ a b ≤ ENNReal.ofReal (b - a) := by |
| 50 | have hlength : N.metric.pathELength γ a b = ENNReal.ofReal (b - a) := by |
| 51 | have h := N.metric.pathELength_eq_of_tangentNorm_eq (C := 1) (by |
| 52 | intro t ht |
| 53 | change Real.sqrt (N.metric.inner (γ t) (curveVelocity (n := 2) γ t) |
| 54 | (curveVelocity (n := 2) γ t)) = 1 |
| 55 | rw [m64Intrinsic_curveVelocity_eq_deriv] |
| 56 | exact (congrArg Real.sqrt (hunit t ht)).trans Real.sqrt_one) |
| 57 | simpa only [ENNReal.ofReal_one, one_mul] using h |
| 58 | rw [← hlength] |
| 59 | exact m64Intrinsic_curveVariation_le_pathELength N.metric |
| 60 | ((contMDiff_iff_contDiff.mpr hγ).of_le (by simp)).contMDiffOn |
| 61 | |
| 62 | end PoincareMT |