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.Collision.BoundaryCompetitor |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Interior.Geodesic |
| 3 | |
| 4 | /-! Actual short minimizers in the selected collision region. |
| 5 | The competitor is built from the original boundary and sides; compactness |
| 6 | then gives the embedded minimizer with exact subarc minimality. Boundary |
| 7 | avoidance is not inferred from interior geodesic regularity. |
| 8 | Source: MT Claim 19.40, pp. 470-471. -/ |
| 9 | |
| 10 | noncomputable section |
| 11 | set_option autoImplicit false |
| 12 | set_option warningAsError true |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set |
| 16 | open scoped ENNReal Manifold ContDiff |
| 17 | |
| 18 | namespace PoincareMT |
| 19 | |
| 20 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 21 | normedSpaceTangentSpaceVectorSpace |
| 22 | |
| 23 | /-- Each point of the actual base arc has an embedded shortest path from the collision |
| 24 | vertex in the compact region, with the source's length bound. The geodesic equation is |
| 25 | asserted only where the path lies in its interior. Source: MT Claim 19.40, pp. 470-471; |
| 26 | `proof-work/tasks/M64/derivations/2026-09-27-minimal-contact-regularity.md`, Section 7. -/ |
| 27 | theorem m64Intrinsic_exists_short_collision_minimizer |
| 28 | (N : IntrinsicAnnulus) {K : Set AnnulusCoordinates} (hK : IsCompact K) |
| 29 | {a b A B p : ℝ} (hp : p ∈ Icc a b) (hA : 0 ≤ A) (hB : 0 ≤ B) |
| 30 | {alpha beta : ℝ → AnnulusCoordinates} |
| 31 | (ha : ContDiff ℝ ∞ alpha) (hb : ContDiff ℝ ∞ beta) |
| 32 | (hunitA : ∀ t ∈ Icc 0 A, N.metric.inner (alpha t) (deriv alpha t) (deriv alpha t) = 1) |
| 33 | (hunitB : ∀ t ∈ Icc 0 B, N.metric.inner (beta t) (deriv beta t) (deriv beta t) = 1) |
| 34 | (ha0 : alpha 0 = intrinsicAnnulusBoundary 1 a) |
| 35 | (hb0 : beta 0 = intrinsicAnnulusBoundary 1 b) (hmeet : alpha A = beta B) |
| 36 | (hsideA : MapsTo alpha (Icc 0 A) K) (hsideB : MapsTo beta (Icc 0 B) K) |
| 37 | (hbase : MapsTo (intrinsicAnnulusBoundary 1) (Icc a b) K) : |
| 38 | ∃ (gamma : ℝ → AnnulusCoordinates) (L : ℝ), |
| 39 | 0 ≤ L ∧ L ≤ intrinsicBoundaryLength N.metric 1 a b / 2 + max A B ∧ |
| 40 | ContinuousOn gamma (Icc 0 L) ∧ gamma 0 = alpha A ∧ |
| 41 | gamma L = intrinsicAnnulusBoundary 1 p ∧ MapsTo gamma (Icc 0 L) K ∧ |
| 42 | InjOn gamma (Icc 0 L) ∧ |
| 43 | (∀ s ∈ Icc 0 L, ∀ t ∈ Icc 0 L, |
| 44 | m64IntrinsicCurveVariation N.metric gamma s t = ENNReal.ofReal (t - s)) ∧ |
| 45 | N.metric.IsGeodesicOn gamma {u | u ∈ Ioo 0 L ∧ gamma u ∈ interior K} ∧ |
| 46 | (∀ u ∈ Ioo 0 L, gamma u ∈ interior K → |
| 47 | ContMDiffAt 𝓘(ℝ, ℝ) (𝓡 2) ∞ gamma u) ∧ |
| 48 | (∀ s ∈ Icc 0 L, ∀ t ∈ Icc 0 L, s ≤ t → |
| 49 | ∀ tau : ℝ → AnnulusCoordinates, ContinuousOn tau (Icc 0 1) → |
| 50 | tau 0 = gamma s → tau 1 = gamma t → MapsTo tau (Icc 0 1) K → |
| 51 | ENNReal.ofReal (t - s) ≤ m64IntrinsicCurveVariation N.metric tau 0 1) := by |
| 52 | obtain ⟨tau, htc, ht0, ht1, htconf, htvar⟩ := |
| 53 | m64Intrinsic_exists_short_collision_competitor N hp hA hB ha hb hunitA hunitB |
| 54 | ha0 hb0 hmeet hsideA hsideB hbase |
| 55 | let sigma := fun t : ℝ => tau (1 + (0 - 1) * t) |
| 56 | have hparam : MapsTo (fun t : ℝ => 1 + (0 - 1) * t) (Icc 0 1) (Icc 0 1) := by |
| 57 | intro t ht |
| 58 | constructor <;> linarith [ht.1, ht.2] |
| 59 | have hsc : ContinuousOn sigma (Icc 0 1) := |
| 60 | htc.comp (by fun_prop) hparam |
| 61 | have hs0 : sigma 0 = alpha A := by simpa only [sigma, mul_zero, add_zero] using ht1 |
| 62 | have hs1 : sigma 1 = intrinsicAnnulusBoundary 1 p := by |
| 63 | simpa only [sigma, mul_one, add_sub_cancel] using ht0 |
| 64 | have hsvar : m64IntrinsicCurveVariation N.metric sigma 0 1 = |
| 65 | m64IntrinsicCurveVariation N.metric tau 0 1 := by |
| 66 | simpa only [min_eq_right zero_le_one, max_eq_left zero_le_one] using |
| 67 | m64Intrinsic_curveVariation_affine N.metric tau 1 0 |
| 68 | have hbudget : 0 ≤ intrinsicBoundaryLength N.metric 1 a b / 2 + max A B := |
| 69 | add_nonneg (div_nonneg (m64Intrinsic_boundaryLength_nonneg N 1 a b (hp.1.trans hp.2)) |
| 70 | (by norm_num)) (hA.trans (le_max_left A B)) |
| 71 | obtain ⟨gamma, L, hL, hLB, hrest⟩ := |
| 72 | m64Intrinsic_exists_region_minimizer_geodesic_interior N.metric hK hsc hs0 hs1 |
| 73 | (htconf.comp hparam) (hsvar.le.trans htvar) |
| 74 | exact ⟨gamma, L, hL, by simpa only [max_eq_left hbudget] using hLB, hrest⟩ |
| 75 | |
| 76 | end PoincareMT |