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.Regional.RetainedEndpoints |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Two.CurveEndpointProjection |
| 3 | |
| 4 | /-! Two short sides cannot hold all retained regional endpoints. |
| 5 | Source: MT Lemma 19.46, pp. 475-478; central-regional-descent derivation, |
| 6 | Section 8. The normal cutoff and focusing radius remain distinct. -/ |
| 7 | |
| 8 | noncomputable section |
| 9 | set_option autoImplicit false |
| 10 | set_option backward.isDefEq.respectTransparency false |
| 11 | |
| 12 | open Set Filter MeasureTheory |
| 13 | open scoped Topology ContDiff Manifold Bundle Matrix |
| 14 | |
| 15 | namespace PoincareMT |
| 16 | |
| 17 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 18 | normedSpaceTangentSpaceVectorSpace |
| 19 | |
| 20 | /-- Actual focusing and retained area contradict the total capacity of two unit-speed target |
| 21 | sides of length at most h. Their union need not be embedded. Source: MT Lemma 19.46; |
| 22 | central-regional-descent derivation, Section 8. Source/construction: |
| 23 | proof-work/tasks/M64/derivations/2026-09-27-central-regional-descent.md, Section 8. -/ |
| 24 | theorem m64Intrinsic_no_inner_contact_two_side_capacity |
| 25 | (N : IntrinsicAnnulus) {K delta r q mu alpha h : ℝ} |
| 26 | (hK : N.GaussianCurvatureBound K) (hdelta : 0 < delta) (hdeltaSmall : delta < 1 / 100) |
| 27 | (hq : 0 < q) (hqr : q ≤ r) (hh : 0 < h) (hhq : h ≤ q / 100) |
| 28 | (hturn : N.SmallBoundaryTurning delta r) (halpha : 100 * delta / q ≤ alpha) |
| 29 | (harea : intrinsicAnnulusArea N.metric < mu) |
| 30 | (hbudget : max K 0 * mu + delta ≤ Real.pi / 2) |
| 31 | (hmodel : Real.sqrt (max K 1) * q ≤ 1 / 2) |
| 32 | (hareaLoss : intrinsicAnnulusArea N.metric < (1 - delta) ^ 2 * h * (q / 10)) |
| 33 | {U V : Set AnnulusCoordinates} (hU : IsOpen U) (hV : IsOpen V) |
| 34 | (hpV : IsPreconnected V) (hbV : ¬ Bornology.IsBounded V) (hUV : Disjoint U V) |
| 35 | (hcover : U ∪ V = (frontier U)ᶜ) (hfront : frontier U = frontier V) |
| 36 | (hsub : closure U ⊆ standardAnnulusDomain) |
| 37 | {a b l u : ℝ} (hal : a ≤ l) (hlu : l < u) (hub : u ≤ b) |
| 38 | (hperiod : b - a < rampPeriod) (hlength : intrinsicBoundaryLength N.metric 1 l u = q) |
| 39 | {target₁ target₂ : ℝ → AnnulusCoordinates} |
| 40 | (htarget₁ : ContDiff ℝ ∞ target₁) (htarget₂ : ContDiff ℝ ∞ target₂) |
| 41 | {A B : ℝ} (hA : 0 ≤ A) (hB : 0 ≤ B) (hAh : A ≤ h) (hBh : B ≤ h) |
| 42 | (hinj₁ : InjOn target₁ (Icc 0 A)) (hinj₂ : InjOn target₂ (Icc 0 B)) |
| 43 | (hunit₁ : ∀ t ∈ Icc 0 A, |
| 44 | N.metric.inner (target₁ t) (deriv target₁ t) (deriv target₁ t) = 1) |
| 45 | (hunit₂ : ∀ t ∈ Icc 0 B, |
| 46 | N.metric.inner (target₂ t) (deriv target₂ t) (deriv target₂ t) = 1) |
| 47 | (hfU : frontier U = intrinsicAnnulusBoundary 1 '' Icc a b ∪ |
| 48 | (target₁ '' Icc 0 A ∪ target₂ '' Icc 0 B)) |
| 49 | (e : AnnulusCoordinates → AnnulusCoordinates) (he : ContDiff ℝ ∞ e) |
| 50 | (normal : ℝ → AnnulusCoordinates) {height : ℝ → ℝ} (hheight : Measurable height) |
| 51 | {Good : Set ℝ} (hGood : MeasurableSet Good) (hGoodAE : Good =ᵐ[volume] univ) |
| 52 | (hpositive : ∀ p ∈ Ioo l u, p ∈ Good → 0 < height p) |
| 53 | (hnonneg : ∀ p ∈ Ioo l u, 0 ≤ height p) |
| 54 | (hcap : ∀ p ∈ Ioo l u, height p ≤ h) |
| 55 | (hbase : ∀ p ∈ Ioo l u, e !₂[p, 0] = intrinsicAnnulusBoundary 1 p) |
| 56 | (hderiv : ∀ p ∈ Ioo l u, HasDerivAt (fun t => e !₂[p, t]) (normal p) 0) |
| 57 | (hunit0 : ∀ p ∈ Ioo l u, |
| 58 | N.metric.inner (intrinsicAnnulusBoundary 1 p) (normal p) (normal p) = 1) |
| 59 | (horth : ∀ p ∈ Ioo l u, N.metric.inner (intrinsicAnnulusBoundary 1 p) |
| 60 | (deriv (intrinsicAnnulusBoundary 1) p) (normal p) = 0) |
| 61 | (hinward : ∀ p ∈ Ioo l u, 0 < inner ℝ (intrinsicAnnulusBoundary 1 p) (normal p)) |
| 62 | (hgeo : ∀ p ∈ Ioo l u, |
| 63 | N.metric.IsGeodesicOn (fun t => e !₂[p, t]) (Icc 0 (height p))) |
| 64 | (hray : ∀ p ∈ Ioo l u, InjOn (fun t => e !₂[p, t]) (Icc 0 (height p))) |
| 65 | (hconf : ∀ p ∈ Ioo l u, ∀ t ∈ Icc 0 (height p), e !₂[p, t] ∈ closure U) |
| 66 | (hinside : ∀ p ∈ Ioo l u, |
| 67 | intrinsicGeodesicCurvature N.metric N.connection 1 p ≤ alpha → |
| 68 | ∀ t ∈ Ioc 0 (height p), 1 < ‖e !₂[p, t]‖) |
| 69 | (hcontact : ∀ p ∈ Ioo l u, 0 < height p → height p < h → |
| 70 | e !₂[p, height p] ∈ frontier U) |
| 71 | (hmetric : ∀ p ∈ Ioo l u, |
| 72 | intrinsicGeodesicCurvature N.metric N.connection 1 p ≤ alpha → |
| 73 | ∀ t ∈ Icc 0 (height p), ∀ v : AnnulusCoordinates, |
| 74 | (1 - delta) ^ 2 * |
| 75 | (intrinsicBoundarySpeed N.metric 1 p ^ 2 * (v 0) ^ 2 + (v 1) ^ 2) ≤ |
| 76 | N.metric.inner (e !₂[p, t]) |
| 77 | (fderiv ℝ e !₂[p, t] v) (fderiv ℝ e !₂[p, t] v)) : False := by |
| 78 | have hc : 0 < 1 - delta := by linarith only [hdeltaSmall] |
| 79 | obtain ⟨Z, hZ, hZdata, hEndpoint, hregular, hfrontier, hmass⟩ := |
| 80 | m64Intrinsic_exists_regional_retained_endpoints N hK hdelta hdeltaSmall hq hqr hh hhq |
| 81 | hturn halpha harea hbudget hmodel hareaLoss hU hV hpV hbV hUV hcover hfront hsub |
| 82 | hal hlu hub hperiod hlength (by rw [hfU]; exact subset_union_left) |
| 83 | e he normal hheight hGood hGoodAE hpositive hnonneg hcap hbase hderiv hunit0 |
| 84 | horth hinward hgeo hray hconf hinside hcontact hmetric |
| 85 | have hcapacity := m64Intrinsic_two_unit_curves_endpoint_projection_length_le N e he hheight hZ |
| 86 | (fun p hp => Ioo_subset_Icc_self (hZdata p hp).1) hEndpoint hregular |
| 87 | htarget₁ htarget₂ hA hB hinj₁ hinj₂ hunit₁ hunit₂ |
| 88 | (by |
| 89 | intro p hp |
| 90 | have hd := hZdata p hp |
| 91 | have hf := hfrontier p hp |
| 92 | rw [hfU] at hf |
| 93 | rcases hf with ⟨w, _, heq⟩ | ht |
| 94 | · have hn := hinside p hd.1 hd.2.1 (height p) ⟨hd.2.2.1, le_rfl⟩ |
| 95 | rw [← heq, m64Intrinsic_inner_boundary_norm] at hn |
| 96 | exact ((lt_irrefl (1 : ℝ)) hn).elim |
| 97 | · exact ht) |
| 98 | hc.le (fun p hp => hmetric p (hZdata p hp).1 (hZdata p hp).2.1 |
| 99 | (height p) ⟨(hZdata p hp).2.2.1.le, le_rfl⟩) |
| 100 | have hscaled := mul_lt_mul_of_pos_left hmass hc |
| 101 | have hdeltaQ := mul_lt_mul_of_pos_right hdeltaSmall hq |
| 102 | simp only [sub_zero] at hcapacity |
| 103 | nlinarith only [hscaled, hcapacity, hAh, hBh, hhq, hdeltaQ, hq] |
| 104 | |
| 105 | end PoincareMT |