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.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.Cap |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.RiemannianProper |
| 4 | import PoincareLib.Geometry.RicciFlow.Blowup.Controlled.Geometry |
| 5 | |
| 6 | /-! |
| 7 | # Compact closure of the actual quantitative cap carrier |
| 8 | |
| 9 | Morgan-Tian Definition 9.72 and Theorem 12.28, pp. 323-324. |
| 10 | The intrinsic diameter bounds the actual ambient distance. Completeness |
| 11 | therefore puts the full cap closure inside a compact Riemannian ball, |
| 12 | as required for transport through one selected convergence cylinder. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M35 |
| 23 | |
| 24 | /-- Definition 9.72 in Theorem 12.28: restricting the admissible |
| 25 | paths to a carrier can only increase the actual Riemannian distance. -/ |
| 26 | theorem edist_le_intrinsicEDist |
| 27 | {M : Type u} [TopologicalSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 29 | (g : RiemannianMetric 3 M) (U : Set M) (x y : M) : |
| 30 | g.edist x y ≤ intrinsicEDist g U x y := by |
| 31 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 32 | ⟨g.toRiemannianMetric⟩ |
| 33 | apply le_sInf |
| 34 | rintro L ⟨gamma, hsmooth, hstart, hend, _, rfl⟩ |
| 35 | exact Manifold.riemannianEDist_le_pathELength hsmooth hstart hend zero_le_one |
| 36 | |
| 37 | end PoincareMT.M35 |
| 38 | |
| 39 | namespace PoincareMT.CapCertificate |
| 40 | |
| 41 | private theorem ratio_on_closure {X : Type*} [TopologicalSpace X] |
| 42 | {f : X → ℝ} {U : Set X} {B : ℝ} (hf : Continuous f) |
| 43 | (hratio : ∀ x ∈ U, ∀ y ∈ U, f y ≤ B * f x) : |
| 44 | ∀ x ∈ closure U, ∀ y ∈ closure U, f y ≤ B * f x := by |
| 45 | have hleft (y : X) (hy : y ∈ U) : closure U ⊆ {x | f y ≤ B * f x} := |
| 46 | closure_minimal (fun x hx => hratio x hx y hy) |
| 47 | (isClosed_le continuous_const (continuous_const.mul hf)) |
| 48 | intro x hx |
| 49 | exact closure_minimal (fun y hy => hleft y hy hx) |
| 50 | (isClosed_le hf continuous_const) |
| 51 | |
| 52 | /-- Definition 9.72 in Theorem 12.28: the entire cap carrier has |
| 53 | compact closure in the actual complete ambient Riemannian metric. -/ |
| 54 | theorem isCompact_closure |
| 55 | {M : Type u} [TopologicalSpace M] |
| 56 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 57 | [MeasurableSpace M] [BorelSpace M] [T3Space M] [ConnectedSpace M] |
| 58 | {g : RiemannianMetric 3 M} (N : CapCertificate g) (hcomplete : MetricComplete g) : |
| 59 | IsCompact (closure N.carrier) := by |
| 60 | obtain ⟨x, hx⟩ := N.core_nonempty |
| 61 | have hxU : x ∈ N.carrier := by |
| 62 | have hc := N.core_eq_interior_closed_core ▸ hx |
| 63 | exact (N.closed_core_eq_complement_end ▸ interior_subset hc).1 |
| 64 | let r := N.cap_constant * scalarCurvatureSupOn g N.connection N.carrier ^ (-1 / 2 : ℝ) |
| 65 | have hball : N.carrier ⊆ g.ball x r := by |
| 66 | intro y hy |
| 67 | have hdiam : intrinsicEDist g N.carrier x y ≤ intrinsicDiameter g N.carrier := |
| 68 | le_sSup ⟨(⟨x, hxU⟩, ⟨y, hy⟩), rfl⟩ |
| 69 | exact ((M35.edist_le_intrinsicEDist g N.carrier x y).trans hdiam).trans_lt |
| 70 | N.intrinsic_diameter_bound |
| 71 | exact (Proofs.M09.isCompact_closure_metric_ball g hcomplete x r).of_isClosed_subset |
| 72 | isClosed_closure (closure_mono hball) |
| 73 | |
| 74 | /-- Definition 9.72 in Theorem 12.28: the single scalar-ratio |
| 75 | witness extends to the full carrier closure and remains strictly below |
| 76 | the cap constant. Continuity is later supplied by the actual flow. -/ |
| 77 | theorem scalar_ratio_on_closure |
| 78 | {M : Type u} [TopologicalSpace M] |
| 79 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 80 | [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 81 | {g : RiemannianMetric 3 M} (N : CapCertificate g) |
| 82 | (hR : Continuous N.connection.scalarCurvature) : |
| 83 | ∃ B : ℝ, 0 < B ∧ B < N.cap_constant ∧ |
| 84 | ∀ x ∈ closure N.carrier, ∀ y ∈ closure N.carrier, |
| 85 | N.connection.scalarCurvature y ≤ B * N.connection.scalarCurvature x := by |
| 86 | obtain ⟨B, hBC, hratio⟩ := N.scalar_ratio |
| 87 | obtain ⟨x, hx⟩ := N.core_nonempty |
| 88 | have hxU : x ∈ N.carrier := by |
| 89 | have hc := N.core_eq_interior_closed_core ▸ hx |
| 90 | exact (N.closed_core_eq_complement_end ▸ interior_subset hc).1 |
| 91 | have hB : 0 < B := by |
| 92 | have hpos := N.scalar_pos x hxU |
| 93 | have hself := hratio x hxU x hxU |
| 94 | nlinarith |
| 95 | exact ⟨B, hB, hBC, ratio_on_closure hR hratio⟩ |
| 96 | |
| 97 | /-- Theorem 12.28: positive scalar curvature on a quantitative cap |
| 98 | has one positive lower bound and one finite upper bound on its closure. -/ |
| 99 | theorem exists_positive_scalar_bounds_on_closure |
| 100 | {M : Type u} [TopologicalSpace M] |
| 101 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 102 | [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 103 | {g : RiemannianMetric 3 M} (N : CapCertificate g) |
| 104 | (hR : Continuous N.connection.scalarCurvature) : |
| 105 | ∃ a b : ℝ, 0 < a ∧ 0 < b ∧ ∀ x ∈ closure N.carrier, |
| 106 | a ≤ N.connection.scalarCurvature x ∧ N.connection.scalarCurvature x ≤ b := by |
| 107 | obtain ⟨B, hB, _, hratio⟩ := N.scalar_ratio_on_closure hR |
| 108 | obtain ⟨y, hy⟩ := N.core_nonempty |
| 109 | have hyU : y ∈ N.carrier := by |
| 110 | have hc := N.core_eq_interior_closed_core ▸ hy |
| 111 | exact (N.closed_core_eq_complement_end ▸ interior_subset hc).1 |
| 112 | have hpos := N.scalar_pos y hyU |
| 113 | refine ⟨N.connection.scalarCurvature y / B, B * N.connection.scalarCurvature y, |
| 114 | div_pos hpos hB, mul_pos hB hpos, ?_⟩ |
| 115 | intro x hx |
| 116 | refine ⟨(div_le_iff₀ hB).mpr ?_, hratio y (subset_closure hyU) x hx⟩ |
| 117 | simpa only [mul_comm] using hratio x hx y (subset_closure hyU) |
| 118 | |
| 119 | end PoincareMT.CapCertificate |