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.RicciFlow.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.CapGeometry.CapRatio |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Geometry.RelativeCapBarrier |
| 4 | |
| 5 | /-! |
| 6 | # Scalar-band exclusion of actual cap cores |
| 7 | |
| 8 | Morgan--Tian Claim 10.4, pp. 249-250. The frozen finite intrinsic diameter |
| 9 | produces cap-valued paths and hence preconnectedness. The actual scalar |
| 10 | ratio places a cap meeting the high band in its scalar-superlevel component. |
| 11 | Relative A.8 then excludes its core from an actual minimizing scalar band. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle ENNReal |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.CapCertificate |
| 22 | |
| 23 | open M28 |
| 24 | |
| 25 | variable {M : Type u} [TopologicalSpace M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 27 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 28 | [T2Space M] [T3Space M] {g : RiemannianMetric 3 M} |
| 29 | |
| 30 | omit [T2Space M] in |
| 31 | /-- The actual finite intrinsic diameter produces paths inside the cap |
| 32 | between every pair of points, hence a preconnected carrier (Claim 10.4). -/ |
| 33 | theorem isPreconnected_carrier (N : CapCertificate g) : IsPreconnected N.carrier := by |
| 34 | apply isPreconnected_of_forall_pair |
| 35 | intro x hx y hy |
| 36 | have hd : intrinsicEDist g N.carrier x y ≤ intrinsicDiameter g N.carrier := |
| 37 | le_sSup ⟨(⟨x, hx⟩, ⟨y, hy⟩), rfl⟩ |
| 38 | obtain ⟨γ, h0, h1, hγ, hγN, _⟩ := |
| 39 | exists_intrinsic_competitor g (hd.trans_lt N.intrinsic_diameter_bound) |
| 40 | refine ⟨γ '' Icc (0 : ℝ) 1, ?_, ?_, ?_, |
| 41 | isPreconnected_Icc.image γ hγ.continuousOn⟩ |
| 42 | · rintro z ⟨t, ht, rfl⟩ |
| 43 | exact hγN ht |
| 44 | · exact ⟨0, by simp, h0⟩ |
| 45 | · exact ⟨1, by simp, h1⟩ |
| 46 | |
| 47 | omit [T2Space M] in |
| 48 | /-- A cap meeting the retained high scalar band lies wholly in the actual |
| 49 | scalar-superlevel component of that point. Its containment is derived from |
| 50 | the frozen cap ratio and intrinsic diameter (Claim 10.4). -/ |
| 51 | theorem carrier_subset_scalar_component (N : CapCertificate g) (D : LeviCivitaData g) |
| 52 | {B Q : ℝ} (hB : N.cap_constant ≤ B) (hQ : 0 < Q) |
| 53 | {w : M} (hw : w ∈ N.carrier) (hlow : 16 * B * Q ≤ D.scalarCurvature w) : |
| 54 | N.carrier ⊆ connectedComponentIn {p : M | 4 * Q < D.scalarCurvature p} w := by |
| 55 | have hBpos : 0 < B := zero_lt_one.trans (N.one_lt_cap_constant_m28.trans_le hB) |
| 56 | apply N.isPreconnected_carrier.subset_connectedComponentIn hw |
| 57 | intro p hp |
| 58 | have hscalar : 16 * Q < D.scalarCurvature p := by |
| 59 | have hcmp : B * (16 * Q) < B * D.scalarCurvature p := by |
| 60 | calc |
| 61 | B * (16 * Q) = 16 * B * Q := by ring |
| 62 | _ ≤ D.scalarCurvature w := hlow |
| 63 | _ < B * D.scalarCurvature p := N.scalar_lt_mul D hB hp hw |
| 64 | exact (mul_lt_mul_iff_right₀ hBpos).mp hcmp |
| 65 | exact lt_trans (by linarith only [hQ]) hscalar |
| 66 | |
| 67 | omit [T2Space M] in |
| 68 | /-- The low original endpoint and high original endpoint are both outside |
| 69 | any actual cap containing a point of the retained scalar band (Claim 10.4). -/ |
| 70 | theorem endpoints_not_mem_of_scalar_band (N : CapCertificate g) (D : LeviCivitaData g) |
| 71 | {B Q : ℝ} (hB : N.cap_constant ≤ B) (hQ : 0 < Q) |
| 72 | {z y w : M} (hw : w ∈ N.carrier) |
| 73 | (hz : D.scalarCurvature z ≤ 8 * Q) |
| 74 | (hlow : 16 * B * Q ≤ D.scalarCurvature w) |
| 75 | (hhigh : D.scalarCurvature w ≤ D.scalarCurvature y / (2 * B)) : |
| 76 | z ∉ N.carrier ∧ y ∉ N.carrier := by |
| 77 | have hBpos : 0 < B := zero_lt_one.trans (N.one_lt_cap_constant_m28.trans_le hB) |
| 78 | constructor |
| 79 | · intro hzN |
| 80 | have hratio := N.scalar_lt_mul D hB hzN hw |
| 81 | have hzbound := mul_le_mul_of_nonneg_left hz hBpos.le |
| 82 | have hBQ : 0 < B * Q := mul_pos hBpos hQ |
| 83 | nlinarith only [hratio, hzbound, hlow, hBQ] |
| 84 | · intro hyN |
| 85 | have hratio := N.scalar_lt_mul D hB hw hyN |
| 86 | have hupper := (le_div_iff₀ (mul_pos (by norm_num) hBpos)).mp hhigh |
| 87 | have hpositive : 0 < B * D.scalarCurvature w := |
| 88 | mul_pos hBpos (N.scalar_pos_of_connection D hw) |
| 89 | nlinarith only [hratio, hupper, hpositive] |
| 90 | |
| 91 | /-- On an actual finite intrinsic minimizer, the retained scalar band |
| 92 | cannot meet a cap core when its scalar-superlevel component lies in the |
| 93 | minimizing region. The whole-cap containment is produced, not assumed. -/ |
| 94 | theorem not_mem_core_of_scalar_band (N : CapCertificate g) (D : LeviCivitaData g) |
| 95 | (hepsilon : N.epsilon ≤ neckShorteningEpsilon) |
| 96 | {B Q : ℝ} (hB : N.cap_constant ≤ B) (hQ : 0 < Q) |
| 97 | {U : Set M} {γ : ℝ → M} {a b t : ℝ} (ht : t ∈ Icc a b) |
| 98 | (hγ : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 γ (Icc a b)) |
| 99 | (hγU : MapsTo γ (Icc a b) U) |
| 100 | (hfinite : g.pathELength γ a b ≠ ⊤) |
| 101 | (hmin : g.pathELength γ a b = intrinsicEDist g U (γ a) (γ b)) |
| 102 | (hcomponent : connectedComponentIn {p : M | 4 * Q < D.scalarCurvature p} (γ t) ⊆ U) |
| 103 | (hstart : D.scalarCurvature (γ a) ≤ 8 * Q) |
| 104 | (hlow : 16 * B * Q ≤ D.scalarCurvature (γ t)) |
| 105 | (hhigh : D.scalarCurvature (γ t) ≤ D.scalarCurvature (γ b) / (2 * B)) : |
| 106 | γ t ∉ N.core := by |
| 107 | intro hcore |
| 108 | have hw := N.core_subset_carrier_m28 hcore |
| 109 | have hNU : N.carrier ⊆ U := |
| 110 | (N.carrier_subset_scalar_component D hB hQ hw hlow).trans hcomponent |
| 111 | have hendpoints := N.endpoints_not_mem_of_scalar_band D hB hQ hw hstart hlow hhigh |
| 112 | have hclosed : γ t ∈ N.closed_core := by |
| 113 | rw [N.core_eq_interior_closed_core] at hcore |
| 114 | exact interior_subset hcore |
| 115 | rcases N.endpoint_mem_of_intrinsic_minimizer hepsilon hNU ht hγ hγU hfinite hmin |
| 116 | hclosed with ha | hb |
| 117 | · exact hendpoints.1 ha |
| 118 | · exact hendpoints.2 hb |
| 119 | |
| 120 | end PoincareMT.CapCertificate |