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.Local.ArcRetainedDomain |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Local.ArcRetainedBaseLength |
| 3 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Injective.StripArea |
| 4 | |
| 5 | /-! |
| 6 | # Constructing the actual local short retained base |
| 7 | |
| 8 | Local collision focusing constructs the removal set and injective strip. |
| 9 | The actual normal metric and annulus image then give its area bound, and |
| 10 | three literal exceptional-set integrals leave more than 0.87 of the local |
| 11 | arc length. This is Morgan--Tian, Lemma 19.46, Case (ii), pp. 475-477; |
| 12 | individual regional-ray embeddedness and local collision focusing remain |
| 13 | the geometric inputs. |
| 14 | -/ |
| 15 | |
| 16 | noncomputable section |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set MeasureTheory |
| 21 | open scoped Manifold ContDiff Bundle Matrix ENNReal |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | /-- On an actual short boundary arc, construct the measurable focusing |
| 26 | removal and short-fiber base, with strip and endpoint injectivity and the |
| 27 | three actual losses. No retained-set existence, numerical loss, or strip |
| 28 | area estimate is assumed; Lemma 19.46, pp. 475-477. -/ |
| 29 | theorem m64Intrinsic_exists_local_arc_retained_strip |
| 30 | (N : IntrinsicAnnulus) (e : AnnulusCoordinates → AnnulusCoordinates) |
| 31 | (he : Differentiable ℝ e) {height : ℝ → ℝ} (hh : Measurable height) |
| 32 | {l u delta r alpha R rho kappa : ℝ} |
| 33 | (hlu : l < u) (hperiod : u ≤ l + rampPeriod) |
| 34 | (hlength : intrinsicBoundaryLength N.metric 1 l u = r) |
| 35 | (hdelta : 0 < delta) (hdeltaSmall : delta < 1 / 100) (hr : 0 < r) |
| 36 | (hturn : N.SmallBoundaryTurning delta r) (halpha : 100 * delta / r ≤ alpha) |
| 37 | (hR : 0 < R) (hrho : 0 < rho) (hkappa : 0 < kappa) |
| 38 | (hangle : kappa * rho ≤ Real.pi / 4) (hrhoSmall : rho ≤ r / (400 * delta)) |
| 39 | (harea : intrinsicAnnulusArea N.metric < (1 - delta) ^ 2 * R * (r / 10)) |
| 40 | (hheight : ∀ a ∈ Ioo l u, |
| 41 | intrinsicGeodesicCurvature N.metric N.connection 1 a ≤ alpha → 0 ≤ height a) |
| 42 | (hray : ∀ a ∈ Ioo l u, |
| 43 | intrinsicGeodesicCurvature N.metric N.connection 1 a ≤ alpha → |
| 44 | InjOn (fun t => e !₂[a, t]) (Icc 0 (height a))) |
| 45 | (hfocus : ∀ a ∈ Ioo l u, |
| 46 | intrinsicGeodesicCurvature N.metric N.connection 1 a ≤ alpha → |
| 47 | ∀ b ∈ Ioo l u, |
| 48 | intrinsicGeodesicCurvature N.metric N.connection 1 b ≤ alpha → a < b → |
| 49 | (∃ t ∈ Icc 0 (height a), ∃ s ∈ Icc 0 (height b), e !₂[a, t] = e !₂[b, s]) → |
| 50 | Real.cos (kappa * rho) * intrinsicBoundaryLength N.metric 1 a b ≤ |
| 51 | (Real.sin (kappa * rho) / kappa) * |
| 52 | intrinsicGeodesicCurvatureIntegral N.metric N.connection 1 a b) |
| 53 | (hmetric : ∀ x : AnnulusCoordinates, x 0 ∈ Ioo l u → |
| 54 | intrinsicGeodesicCurvature N.metric N.connection 1 (x 0) ≤ alpha → |
| 55 | x 1 ∈ Icc 0 (height (x 0)) → ∀ v : AnnulusCoordinates, |
| 56 | (1 - delta) ^ 2 * |
| 57 | (intrinsicBoundarySpeed N.metric 1 (x 0) ^ 2 * (v 0) ^ 2 + (v 1) ^ 2) ≤ |
| 58 | N.metric.inner (e x) (mfderiv (𝓡 2) (𝓡 2) e x v) (mfderiv (𝓡 2) (𝓡 2) e x v)) |
| 59 | (himage : ∀ x : AnnulusCoordinates, x 0 ∈ Ioo l u → |
| 60 | intrinsicGeodesicCurvature N.metric N.connection 1 (x 0) ≤ alpha → |
| 61 | x 1 ∈ Icc 0 (height (x 0)) → e x ∈ standardAnnulusDomain) : |
| 62 | ∃ E : Set ℝ, MeasurableSet E ∧ E ⊆ Icc l u ∧ |
| 63 | (∫ s in E, intrinsicBoundarySpeed N.metric 1 s) < r / 50 ∧ |
| 64 | let S := (Ioo l u ∩ |
| 65 | {s | intrinsicGeodesicCurvature N.metric N.connection 1 s ≤ alpha}) \ E |
| 66 | let Z := S ∩ {s | height s < R} |
| 67 | MeasurableSet S ∧ MeasurableSet Z ∧ |
| 68 | InjOn e {z : AnnulusCoordinates | z 0 ∈ S ∧ z 1 ∈ Icc 0 (height (z 0))} ∧ |
| 69 | InjOn (fun a => e !₂[a, height a]) Z ∧ |
| 70 | m64IntrinsicLocalHighCurvatureLength N alpha l u < r / 100 ∧ |
| 71 | m64IntrinsicLongFiberLength N S height R < r / 10 ∧ |
| 72 | 87 * r / 100 < ∫ s in Z, intrinsicBoundarySpeed N.metric 1 s := by |
| 73 | let X := Ioo l u ∩ |
| 74 | {s | intrinsicGeodesicCurvature N.metric N.connection 1 s ≤ alpha} |
| 75 | have hX : X ⊆ Ioo l u := inter_subset_left |
| 76 | have hXm : MeasurableSet X := measurableSet_Ioo.inter (measurableSet_le |
| 77 | (m64Intrinsic_continuous_geodesicCurvature N (by norm_num : (1 : ℝ) ≠ 0)).measurable |
| 78 | measurable_const) |
| 79 | obtain ⟨E, hE, hEsub, hfocusBound, hinj⟩ := |
| 80 | m64Intrinsic_exists_local_arc_retained_domain_with_sine_focusing N e height hlu hX |
| 81 | hrho hkappa hangle (fun a ha => hray a ha.1 ha.2) |
| 82 | (fun a ha b hb hab hmeet => hfocus a ha.1 ha.2 b hb.1 hb.2 hab hmeet) |
| 83 | have hturnLocal : intrinsicGeodesicCurvatureIntegral N.metric N.connection 1 l u < delta := |
| 84 | hturn l u hlu.le hperiod hlength.le |
| 85 | have hfocusLoss : (∫ s in E, intrinsicBoundarySpeed N.metric 1 s) < r / 50 := by |
| 86 | have hstrict := hfocusBound.trans_lt (mul_lt_mul_of_pos_left hturnLocal |
| 87 | (by positivity : 0 < 8 * rho)) |
| 88 | have hscale := (le_div_iff₀ (by positivity : 0 < 400 * delta)).mp hrhoSmall |
| 89 | apply hstrict.trans_le |
| 90 | nlinarith only [hscale] |
| 91 | let S := X \ E |
| 92 | let Z := S ∩ {s | height s < R} |
| 93 | have hS : MeasurableSet S := hXm.diff hE |
| 94 | have hZ : MeasurableSet Z := hS.inter (measurableSet_lt hh measurable_const) |
| 95 | have hSsub : S ⊆ Icc l u := sdiff_subset.trans (hX.trans Ioo_subset_Icc_self) |
| 96 | have hweighted : ENNReal.ofReal ((1 - delta) ^ 2) * |
| 97 | (∫⁻ s in S, ENNReal.ofReal (intrinsicBoundarySpeed N.metric 1 s) * |
| 98 | ENNReal.ofReal (height s)) ≤ ENNReal.ofReal (intrinsicAnnulusArea N.metric) := by |
| 99 | apply m64Intrinsic_injective_strip_height_integral_le N.metric he hS hh |
| 100 | (m64Intrinsic_contDiff_boundarySpeed N (by norm_num : (1 : ℝ) ≠ 0)).continuous.measurable |
| 101 | hinj |
| 102 | · intro x hx ht v |
| 103 | exact hmetric x hx.1.1 hx.1.2 ht v |
| 104 | · rintro _ ⟨x, hx, rfl⟩ |
| 105 | exact himage x hx.1.1.1 hx.1.1.2 hx.2 |
| 106 | have hc : 0 < 1 - delta := by linarith |
| 107 | have hlong := m64Intrinsic_local_long_fiber_length_lt_tenth N hS hSsub hh hc hR hr |
| 108 | hweighted harea |
| 109 | have hhigh := m64Intrinsic_local_high_curvature_length_lt_hundredth N |
| 110 | hdelta hr hlu.le hlength hperiod hturn halpha |
| 111 | have hendInj : InjOn (fun a => e !₂[a, height a]) Z := by |
| 112 | intro a ha b hb hab |
| 113 | have hpair : !₂[a, height a] = !₂[b, height b] := by |
| 114 | apply hinj |
| 115 | · exact ⟨ha.1, ⟨hheight a ha.1.1.1 ha.1.1.2, le_rfl⟩⟩ |
| 116 | · exact ⟨hb.1, ⟨hheight b hb.1.1.1 hb.1.1.2, le_rfl⟩⟩ |
| 117 | · exact hab |
| 118 | have hcoord := congrArg (fun z : AnnulusCoordinates => z 0) hpair |
| 119 | simpa only [Matrix.cons_val_zero] using hcoord |
| 120 | refine ⟨E, hE, hEsub, hfocusLoss, hS, hZ, hinj, hendInj, hhigh, hlong, ?_⟩ |
| 121 | have hremaining := m64Intrinsic_local_retained_short_base_length_lower N hlu.le hE hEsub hh |
| 122 | (alpha := alpha) (R := R) |
| 123 | dsimp only at hremaining |
| 124 | change intrinsicBoundaryLength N.metric 1 l u - |
| 125 | m64IntrinsicLocalHighCurvatureLength N alpha l u - |
| 126 | (∫ s in E, intrinsicBoundarySpeed N.metric 1 s) - |
| 127 | m64IntrinsicLongFiberLength N S height R ≤ |
| 128 | ∫ s in Z, intrinsicBoundarySpeed N.metric 1 s at hremaining |
| 129 | rw [hlength] at hremaining |
| 130 | change 87 * r / 100 < ∫ s in Z, intrinsicBoundarySpeed N.metric 1 s |
| 131 | linarith |
| 132 | |
| 133 | end PoincareMT |