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.Minimizer |
| 2 | |
| 3 | /-! |
| 4 | # The actual constrained minimizer directed from base to vertex |
| 5 | |
| 6 | Use the literal boundary competitor in its original orientation and |
| 7 | retain the metric Lipschitz bound for boundary-contact arguments. |
| 8 | Source: MT Claim 19.40, pp. 470-471; minimal-contact derivation, Section 7. |
| 9 | -/ |
| 10 | |
| 11 | noncomputable section |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set |
| 16 | open scoped ENNReal Manifold ContDiff Bundle |
| 17 | |
| 18 | namespace PoincareMT |
| 19 | |
| 20 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 21 | normedSpaceTangentSpaceVectorSpace |
| 22 | |
| 23 | /-- The literal boundary competitor produces a short embedded minimizer from any selected |
| 24 | base point to the collision vertex, with its actual metric speed bound and confined subarc |
| 25 | minimality. 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_base_to_vertex_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 = intrinsicAnnulusBoundary 1 p ∧ |
| 41 | gamma L = alpha A ∧ MapsTo gamma (Icc 0 L) K ∧ InjOn gamma (Icc 0 L) ∧ |
| 42 | (∀ s ∈ Icc 0 L, ∀ t ∈ Icc 0 L, |
| 43 | N.metric.edist (gamma s) (gamma t) ≤ ENNReal.ofReal |s - t|) ∧ |
| 44 | (∀ s ∈ Icc 0 L, ∀ t ∈ Icc 0 L, |
| 45 | m64IntrinsicCurveVariation N.metric gamma s t = ENNReal.ofReal (t - s)) ∧ |
| 46 | N.metric.IsGeodesicOn gamma {u | u ∈ Ioo 0 L ∧ gamma u ∈ interior K} ∧ |
| 47 | (∀ u ∈ Ioo 0 L, gamma u ∈ interior K → |
| 48 | ContMDiffAt 𝓘(ℝ, ℝ) (𝓡 2) ∞ gamma u) ∧ |
| 49 | (∀ s ∈ Icc 0 L, ∀ t ∈ Icc 0 L, s ≤ t → |
| 50 | ∀ tau : ℝ → AnnulusCoordinates, ContinuousOn tau (Icc 0 1) → |
| 51 | tau 0 = gamma s → tau 1 = gamma t → MapsTo tau (Icc 0 1) K → |
| 52 | ENNReal.ofReal (t - s) ≤ m64IntrinsicCurveVariation N.metric tau 0 1) := by |
| 53 | obtain ⟨tau, htc, ht0, ht1, htconf, htvar⟩ := |
| 54 | m64Intrinsic_exists_short_collision_competitor N hp hA hB ha hb hunitA hunitB |
| 55 | ha0 hb0 hmeet hsideA hsideB hbase |
| 56 | obtain ⟨gamma, L, hL, hLB, hc, hg0, hgL, hconf, hinj, hlip, hvar, hmin⟩ := |
| 57 | m64Intrinsic_exists_embedded_region_minimizer N.metric hK htc ht0 ht1 htconf htvar |
| 58 | have hbudget : 0 ≤ intrinsicBoundaryLength N.metric 1 a b / 2 + max A B := |
| 59 | add_nonneg (div_nonneg (m64Intrinsic_boundaryLength_nonneg N 1 a b (hp.1.trans hp.2)) |
| 60 | (by norm_num)) (hA.trans (le_max_left A B)) |
| 61 | obtain ⟨hgeo, hsmooth⟩ := |
| 62 | m64Intrinsic_constrained_minimizer_interior_geodesic N.metric hK hlip hmin |
| 63 | exact ⟨gamma, L, hL, by simpa only [max_eq_left hbudget] using hLB, |
| 64 | hc, hg0, hgL, hconf, hinj, hlip, hvar, hgeo, hsmooth, hmin⟩ |
| 65 | |
| 66 | end PoincareMT |