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.Surgery.Continuation.Construction.Terminal.Ends.CanonicalCover |
| 2 | import PoincareLib.Topology.Manifold.NeckCap.Chain.Extension.InteriorThickness |
| 3 | import Mathlib.Topology.EMetricSpace.Basic |
| 4 | |
| 5 | /-! |
| 6 | # Finiteness of disjoint terminal necks at one scalar level |
| 7 | |
| 8 | The center-to-complement distance of an actual neck gives a uniform packing |
| 9 | radius. Compactness of a terminal scalar sublevel then bounds every disjoint |
| 10 | family selected at the same scalar level. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.EpsilonNeck |
| 22 | |
| 23 | variable {M : Type*} [TopologicalSpace M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 25 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 26 | [T2Space M] [T3Space M] {g : RiemannianMetric 3 M} |
| 27 | |
| 28 | /-- Disjoint actual necks with a positive common scale lower bound and |
| 29 | centers in one compact set have a finite index type. -/ |
| 30 | theorem finite_of_disjoint_of_scale_lower_bound {ι : Type*} |
| 31 | (N : ι → EpsilonNeck g) {K : Set M} (hK : IsCompact K) |
| 32 | (hcenter : ∀ i, (N i).center ∈ K) |
| 33 | {s : ℝ} (hs : 0 < s) (hscale : ∀ i, s ≤ (N i).scale) |
| 34 | (hdisjoint : Pairwise fun i j => Disjoint (N i).carrier (N j).carrier) : |
| 35 | Finite ι := by |
| 36 | classical |
| 37 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 38 | ⟨g.toRiemannianMetric⟩ |
| 39 | let : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin 3)) |
| 40 | (TangentSpace (𝓡 3) : M → Type _) := |
| 41 | ⟨⟨g.inner, g.toContinuousRiemannianMetric.continuous, fun _ _ _ => rfl⟩⟩ |
| 42 | let : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 3) M |
| 43 | have hsep {i j : ι} (hij : i ≠ j) : |
| 44 | ENNReal.ofReal (s / 4) ≤ edist (N i).center (N j).center := by |
| 45 | have hNi := (N i).mem_central_sphere_iff (N i).center |>.mp |
| 46 | (N i).center_on_central_sphere |
| 47 | have hNj := (N j).central_sphere_subset (N j).center_on_central_sphere |
| 48 | have hinv : 1 ≤ (N i).epsilon⁻¹ := by |
| 49 | apply (one_le_inv₀ (N i).epsilon_pos).mpr |
| 50 | linarith [(N i).epsilon_lt_half] |
| 51 | have hmid : (N i).center ∈ |
| 52 | (N i).region (-(N i).epsilon⁻¹ / 2) ((N i).epsilon⁻¹ / 2) := by |
| 53 | refine ⟨hNi.1, ?_, ?_⟩ <;> rw [hNi.2] <;> linarith |
| 54 | have hout : (N j).center ∉ (N i).carrier := |
| 55 | fun hi => disjoint_left.mp (hdisjoint hij) hi hNj |
| 56 | apply (ENNReal.ofReal_le_ofReal ?_).trans |
| 57 | ((N i).quarter_width_le_edist_of_mem_middle_half hmid hout) |
| 58 | have hmul := mul_le_mul_of_nonneg_left hinv (N i).scale_pos.le |
| 59 | linarith [hscale i] |
| 60 | obtain ⟨S, hS⟩ := hK.elim_finite_subcover |
| 61 | (fun p : M => Metric.eball p (ENNReal.ofReal (s / 8))) |
| 62 | (fun _ => Metric.isOpen_eball) (by |
| 63 | intro x hx |
| 64 | exact mem_iUnion.mpr ⟨x, by simp [Metric.mem_eball, hs]⟩) |
| 65 | have hfinite (p : M) : |
| 66 | {i : ι | (N i).center ∈ Metric.eball p (ENNReal.ofReal (s / 8))}.Finite := by |
| 67 | apply Set.Subsingleton.finite |
| 68 | intro i hi j hj |
| 69 | by_contra hij |
| 70 | have hlt : edist (N i).center (N j).center < ENNReal.ofReal (s / 4) := by |
| 71 | calc |
| 72 | edist (N i).center (N j).center ≤ |
| 73 | edist (N i).center p + edist p (N j).center := edist_triangle _ _ _ |
| 74 | _ < ENNReal.ofReal (s / 8) + ENNReal.ofReal (s / 8) := |
| 75 | ENNReal.add_lt_add hi (by simpa only [mem_ofPred_eq, Metric.mem_eball, |
| 76 | edist_comm] using hj) |
| 77 | _ = ENNReal.ofReal (s / 4) := by |
| 78 | rw [← ENNReal.ofReal_add (by positivity) (by positivity)] |
| 79 | congr 1 |
| 80 | ring |
| 81 | exact (not_lt_of_ge (hsep hij)) hlt |
| 82 | apply Set.finite_univ_iff.mp |
| 83 | apply (S.finite_toSet.biUnion fun p _ => hfinite p).subset |
| 84 | intro i hi |
| 85 | obtain ⟨p, hp, hc⟩ := mem_iUnion₂.mp (hS (hcenter i)) |
| 86 | exact mem_iUnion₂.mpr ⟨p, hp, hc⟩ |
| 87 | |
| 88 | end PoincareMT.EpsilonNeck |
| 89 | |
| 90 | namespace PoincareMT.SingularLimitConclusion |
| 91 | |
| 92 | variable {M : Type u} [TopologicalSpace M] |
| 93 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 94 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 95 | [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 96 | {G : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 97 | {H : SingularTimeAssumptions G T M} |
| 98 | |
| 99 | /-- Proper scalar curvature makes every disjoint family of terminal strong |
| 100 | necks centered on a fixed positive scalar level finite. -/ |
| 101 | theorem finite_disjoint_necks_at_scalar_level (Q : SingularLimitConclusion H) |
| 102 | {ι : Type*} {epsilon q : ℝ} (hε : epsilon < 1 / 2) (hq : 0 < q) |
| 103 | (N : ι → TerminalStrongNeck Q.extension epsilon) |
| 104 | (hlevel : ∀ i, Q.terminal_scalar (N i).center = q) |
| 105 | (hdisjoint : Pairwise fun i j => Disjoint (N i).carrier (N j).carrier) : |
| 106 | Finite ι := by |
| 107 | refine EpsilonNeck.finite_of_disjoint_of_scale_lower_bound |
| 108 | (fun i => (N i).spatialNeck hε) (Q.isCompact_scalar_sublevel q) |
| 109 | ?_ (Real.rpow_pos_of_pos hq (-1 / 2 : ℝ)) ?_ hdisjoint |
| 110 | · intro i |
| 111 | change (Q.extension.extended.connection T).scalarCurvature (N i).center ≤ q |
| 112 | rw [← Q.terminal_scalar_eq, hlevel i] |
| 113 | · intro i |
| 114 | change q ^ (-1 / 2 : ℝ) ≤ (N i).scale |
| 115 | rw [(N i).scale_scalar, ← Q.terminal_scalar_eq, hlevel i] |
| 116 | |
| 117 | end PoincareMT.SingularLimitConclusion |