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.Two.SideRegionalReturn |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Regional.NormalReturn |
| 3 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Central.BoundaryInterval |
| 4 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Nested.ReturnRegion |
| 5 | |
| 6 | /-! Excluding a long circle base in an actual two-side annular region. |
| 7 | Source: MT Lemma 19.46, pp. 474-478; central-regional-descent derivation, |
| 8 | Section 9. Actual regional endpoints produce an impossible child return. -/ |
| 9 | |
| 10 | noncomputable section |
| 11 | set_option autoImplicit false |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Topology ContDiff Manifold Bundle Matrix |
| 16 | |
| 17 | namespace PoincareMT |
| 18 | |
| 19 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 20 | normedSpaceTangentSpaceVectorSpace |
| 21 | |
| 22 | /-- Two embedded unit-speed sides of length at most h cannot bound an annular Jordan region |
| 23 | on a circle base longer than 2q. The central return and its child region are constructed |
| 24 | from the original normal family. Source: MT Lemma 19.46; central-regional-descent |
| 25 | derivation, Section 9. Source/construction: |
| 26 | proof-work/tasks/M64/derivations/2026-09-27-central-regional-descent.md, Section 9. -/ |
| 27 | theorem m64Intrinsic_no_long_two_side_region |
| 28 | (N : IntrinsicAnnulus) {K delta r q mu alpha h : ℝ} |
| 29 | (hK : N.GaussianCurvatureBound K) (hdelta : 0 < delta) (hdeltaSmall : delta < 1 / 100) |
| 30 | (hq : 0 < q) (hqr : 2 * q ≤ r) (hh : 0 < h) (hhq : h ≤ q / 100) |
| 31 | (hturn : N.SmallBoundaryTurning delta r) (halpha : 100 * delta / q ≤ alpha) |
| 32 | (harea : intrinsicAnnulusArea N.metric < mu) |
| 33 | (hbudget : max K 0 * mu + delta ≤ Real.pi / 2) |
| 34 | (hmodel : Real.sqrt (max K 1) * q ≤ 1 / 2) |
| 35 | (hareaLoss : intrinsicAnnulusArea N.metric < (1 - delta) ^ 2 * h * (q / 10)) |
| 36 | {U V : Set AnnulusCoordinates} (hU : IsOpen U) (hV : IsOpen V) |
| 37 | (hpV : IsPreconnected V) (hbV : ¬ Bornology.IsBounded V) (hUV : Disjoint U V) |
| 38 | (hcover : U ∪ V = (frontier U)ᶜ) (hfront : frontier U = frontier V) |
| 39 | (hsub : closure U ⊆ standardAnnulusDomain) |
| 40 | {a b : ℝ} (hab : a < b) (hperiod : b - a < rampPeriod) |
| 41 | (hlong : 2 * q < intrinsicBoundaryLength N.metric 1 a b) |
| 42 | {gamma₁ gamma₂ : ℝ → AnnulusCoordinates} |
| 43 | (hgamma₁ : ContDiff ℝ ∞ gamma₁) (hgamma₂ : ContDiff ℝ ∞ gamma₂) |
| 44 | {A B : ℝ} (hA : 0 ≤ A) (hB : 0 ≤ B) (hAh : A ≤ h) (hBh : B ≤ h) |
| 45 | (hinj₁ : InjOn gamma₁ (Icc 0 A)) (hinj₂ : InjOn gamma₂ (Icc 0 B)) |
| 46 | (hstart₁ : gamma₁ 0 = intrinsicAnnulusBoundary 1 a) |
| 47 | (hstart₂ : gamma₂ 0 = intrinsicAnnulusBoundary 1 b) |
| 48 | (hinside₁ : ∀ t ∈ Ioc 0 A, 1 < ‖gamma₁ t‖) |
| 49 | (hinside₂ : ∀ t ∈ Ioc 0 B, 1 < ‖gamma₂ t‖) |
| 50 | (hunit₁ : ∀ t ∈ Icc 0 A, |
| 51 | N.metric.inner (gamma₁ t) (deriv gamma₁ t) (deriv gamma₁ t) = 1) |
| 52 | (hunit₂ : ∀ t ∈ Icc 0 B, |
| 53 | N.metric.inner (gamma₂ t) (deriv gamma₂ t) (deriv gamma₂ t) = 1) |
| 54 | (hfU : frontier U = intrinsicAnnulusBoundary 1 '' Icc a b ∪ |
| 55 | (gamma₁ '' Icc 0 A ∪ gamma₂ '' Icc 0 B)) |
| 56 | (e : AnnulusCoordinates → AnnulusCoordinates) (he : ContDiff ℝ ∞ e) |
| 57 | (normal : ℝ → AnnulusCoordinates) (height : ℝ → ℝ) |
| 58 | (hbase : ∀ p, e !₂[p, 0] = intrinsicAnnulusBoundary 1 p) |
| 59 | (hderiv : ∀ p, HasDerivAt (fun t => e !₂[p, t]) (normal p) 0) |
| 60 | (hunit0 : ∀ p, N.metric.inner (intrinsicAnnulusBoundary 1 p) (normal p) (normal p) = 1) |
| 61 | (horth0 : ∀ p, N.metric.inner (intrinsicAnnulusBoundary 1 p) |
| 62 | (deriv (intrinsicAnnulusBoundary 1) p) (normal p) = 0) |
| 63 | (hinward0 : ∀ p, 0 < inner ℝ (intrinsicAnnulusBoundary 1 p) (normal p)) |
| 64 | (hAnn : ∀ p, 0 < height p ∧ |
| 65 | (height p = h ∨ ‖e !₂[p, height p]‖ = 1 ∨ ‖e !₂[p, height p]‖ = 2)) |
| 66 | (hgeodesic : ∀ p, N.metric.IsGeodesicOn (fun t => e !₂[p, t]) (Icc 0 (height p))) |
| 67 | (hmetric : ∀ p, intrinsicGeodesicCurvature N.metric N.connection 1 p ≤ alpha → |
| 68 | ∀ t ∈ Icc 0 (height p), ∀ v : AnnulusCoordinates, |
| 69 | (1 - delta) ^ 2 * |
| 70 | (intrinsicBoundarySpeed N.metric 1 p ^ 2 * (v 0) ^ 2 + (v 1) ^ 2) ≤ |
| 71 | N.metric.inner (e !₂[p, t]) |
| 72 | (fderiv ℝ e !₂[p, t] v) (fderiv ℝ e !₂[p, t] v)) : False := by |
| 73 | obtain ⟨l, u, hal, hlu, hub, hlength, _⟩ := |
| 74 | m64Intrinsic_exists_central_boundary_interval N hab hq hlong |
| 75 | obtain ⟨p, hp, w, hw, s, hs, hsHeight, hsi, hprefix, hpoint, hterminal⟩ := |
| 76 | m64Intrinsic_exists_two_side_regional_return N hK hdelta hdeltaSmall hq |
| 77 | (by linarith only [hqr, hq]) hh hhq hturn halpha harea hbudget hmodel hareaLoss |
| 78 | hU hV hpV hbV hUV hcover hfront hsub hal.le hlu hub.le hperiod hlength |
| 79 | hgamma₁ hgamma₂ hA hB hAh hBh hinj₁ hinj₂ hstart₁ hstart₂ hinside₁ hinside₂ |
| 80 | hunit₁ hunit₂ hfU e he normal height (fun p _ => hbase p) (fun p _ => hderiv p) |
| 81 | (fun p _ => hunit0 p) (fun p _ => horth0 p) (fun p _ => hinward0 p) |
| 82 | (fun p _ => hAnn p) (fun p _ => hgeodesic p) (fun p _ => hmetric p) |
| 83 | have hpab : p ∈ Ioo a b := ⟨hal.trans hp.1, hp.2.trans hub⟩ |
| 84 | let ray : ℝ → AnnulusCoordinates := fun t => e !₂[p, t] |
| 85 | have hray : ContDiff ℝ ∞ ray := he.comp (by |
| 86 | apply (contDiff_piLp 2).mpr |
| 87 | intro i |
| 88 | fin_cases i |
| 89 | · exact contDiff_const |
| 90 | · exact contDiff_id) |
| 91 | have h0 : ray 0 = intrinsicAnnulusBoundary 1 p := hbase p |
| 92 | have hd0 : deriv ray 0 = normal p := (hderiv p).deriv |
| 93 | have hpw : p ≠ w := by |
| 94 | intro heq |
| 95 | have hpoints : ray 0 = ray s := h0.trans ((congrArg _ heq).trans hpoint.symm) |
| 96 | exact hs.1.ne (hsi ⟨le_rfl, hs.1.le⟩ ⟨hs.1.le, le_rfl⟩ hpoints) |
| 97 | have hends : |
| 98 | (ray 0 = intrinsicAnnulusBoundary 1 (min p w) ∧ |
| 99 | ray s = intrinsicAnnulusBoundary 1 (max p w)) ∨ |
| 100 | (ray 0 = intrinsicAnnulusBoundary 1 (max p w) ∧ |
| 101 | ray s = intrinsicAnnulusBoundary 1 (min p w)) := by |
| 102 | rcases le_total p w with h | h |
| 103 | · rw [min_eq_left h, max_eq_right h] |
| 104 | exact Or.inl ⟨h0, hpoint⟩ |
| 105 | · rw [min_eq_right h, max_eq_left h] |
| 106 | exact Or.inr ⟨h0, hpoint⟩ |
| 107 | have hcircle : intrinsicAnnulusBoundary 1 '' Icc a b ⊆ frontier U := by |
| 108 | rw [hfU] |
| 109 | exact subset_union_left |
| 110 | obtain ⟨W, Y, hW, hY, _, hpY, _, hbY, hd, hc, hfW, hfY, _, _, _, hsubW⟩ := |
| 111 | m64Intrinsic_exists_nested_inner_return_region hU hV hpV hbV hUV hcover hfront hsub |
| 112 | hcircle (le_min hpab.1.le hw.1) (min_lt_max.mpr hpw) (max_le hpab.2.le hw.2) |
| 113 | hperiod hs.1 hray.continuous hsi hends hprefix |
| 114 | apply m64Intrinsic_no_regional_normal_return N hK hdelta hdeltaSmall hq hqr hh hhq |
| 115 | hturn halpha harea hbudget hmodel hareaLoss hray hs.1 hs.2 hsi h0 hpoint |
| 116 | (fun t ht => (m64Intrinsic_open_region_strictly_inside_annulus hU hsub _ |
| 117 | (hprefix t ht)).1) |
| 118 | (fun t ht => hgeodesic p t ⟨ht.1, ht.2.trans hsHeight⟩) |
| 119 | (by rw [h0, hd0]; exact hunit0 p) |
| 120 | (by rw [hd0]; exact horth0 p) |
| 121 | (by rw [hd0]; exact hinward0 p) hterminal |
| 122 | (by rw [abs_lt]; constructor <;> linarith only [hperiod, hpab.1, hpab.2, hw.1, hw.2]) |
| 123 | hW hY hpY.isConnected.isPreconnected hbY hd |
| 124 | (by simpa only [hfW] using hc) (hfW.trans hfY.symm) hsubW hfW |
| 125 | e he normal height hbase hderiv hunit0 horth0 hinward0 hAnn hgeodesic hmetric |
| 126 | |
| 127 | end PoincareMT |