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.CanonicalNeighborhood.Cap |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.RiemannianProper |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.RiemannianProper |
| 4 | |
| 5 | /-! |
| 6 | # Scalar normalization and compactness of an actual cap |
| 7 | |
| 8 | The supplied scalar ratio and intrinsic diameter bound put a cap based at |
| 9 | scalar one in a uniformly bounded actual ambient ball. Completeness then |
| 10 | gives compact closure. These are the first cap-persistence steps in |
| 11 | Morgan-Tian Proposition 9.79(3), p. 234, and Theorem 12.28, pp. 323-324; |
| 12 | see cap-persistence-implementation.md, section 1. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle ENNReal |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | variable {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 26 | {g : RiemannianMetric 3 M} |
| 27 | |
| 28 | /-- Restricting admissible paths can only increase the actual distance, |
| 29 | including when no internal path exists (Definition 9.72, pp. 230-231). -/ |
| 30 | theorem edist_le_intrinsicEDist (V : Set M) (x y : M) : |
| 31 | g.edist x y ≤ intrinsicEDist g V x y := by |
| 32 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 33 | ⟨g.toRiemannianMetric⟩ |
| 34 | apply le_sInf |
| 35 | rintro L ⟨γ, hγ, hγ0, hγ1, _, rfl⟩ |
| 36 | exact Manifold.riemannianEDist_le_pathELength hγ hγ0 hγ1 zero_le_one |
| 37 | |
| 38 | /-- Every pair in the set contributes to the frozen intrinsic diameter |
| 39 | (Definition 9.72, pp. 230-231). -/ |
| 40 | theorem intrinsicEDist_le_intrinsicDiameter {V : Set M} {x y : M} |
| 41 | (hx : x ∈ V) (hy : y ∈ V) : |
| 42 | intrinsicEDist g V x y ≤ intrinsicDiameter g V := |
| 43 | le_sSup ⟨(⟨x, hx⟩, ⟨y, hy⟩), rfl⟩ |
| 44 | |
| 45 | namespace CapCertificate |
| 46 | |
| 47 | variable [MeasurableSpace M] [BorelSpace M] [T3Space M] (N : CapCertificate g) |
| 48 | |
| 49 | namespace StandardCapImport |
| 50 | |
| 51 | /-- The closed core is contained in the actual cap carrier by its exact |
| 52 | complement identity (Definition 9.72, pp. 230-231). -/ |
| 53 | theorem closed_core_subset_carrier : N.closed_core ⊆ N.carrier := by |
| 54 | rw [N.closed_core_eq_complement_end] |
| 55 | exact sdiff_subset |
| 56 | |
| 57 | end StandardCapImport |
| 58 | |
| 59 | export StandardCapImport (closed_core_subset_carrier) |
| 60 | |
| 61 | /-- The open core remains inside the actual carrier, using the recorded |
| 62 | interior identity (Definition 9.72, pp. 230-231). -/ |
| 63 | theorem core_subset_carrier' : N.core ⊆ N.carrier := by |
| 64 | rw [N.core_eq_interior_closed_core] |
| 65 | exact interior_subset.trans N.closed_core_subset_carrier |
| 66 | |
| 67 | /-- A scalar-one base gives uniform two-sided actual scalar bounds with |
| 68 | the cap constant chosen before the tested point (Theorem 12.28). -/ |
| 69 | theorem scalar_bounds_of_normalized_base {o : M} (ho : o ∈ N.carrier) |
| 70 | (hnormal : N.connection.scalarCurvature o = 1) |
| 71 | {C : ℝ} (hC : N.cap_constant ≤ C) {x : M} (hx : x ∈ N.carrier) : |
| 72 | C⁻¹ ≤ N.connection.scalarCurvature x ∧ N.connection.scalarCurvature x ≤ C := by |
| 73 | have hCpos : 0 < C := N.cap_constant_pos.trans_le hC |
| 74 | obtain ⟨b, hb, hratio⟩ := N.scalar_ratio |
| 75 | have hupper := hratio o ho x hx |
| 76 | have hlower := hratio x hx o ho |
| 77 | rw [hnormal, mul_one] at hupper |
| 78 | rw [hnormal] at hlower |
| 79 | refine ⟨?_, hupper.trans (hb.le.trans hC)⟩ |
| 80 | apply (inv_le_iff_one_le_mul₀' hCpos).mpr |
| 81 | calc |
| 82 | 1 ≤ b * N.connection.scalarCurvature x := hlower |
| 83 | _ ≤ C * N.connection.scalarCurvature x := |
| 84 | mul_le_mul_of_nonneg_right (hb.le.trans hC) (N.scalar_pos x hx).le |
| 85 | |
| 86 | /-- The frozen scalar supremum is over a nonempty bounded range and lies |
| 87 | between one and the uniform cap constant (Theorem 12.28). -/ |
| 88 | theorem scalarSup_bounds_of_normalized_base {o : M} (ho : o ∈ N.carrier) |
| 89 | (hnormal : N.connection.scalarCurvature o = 1) |
| 90 | {C : ℝ} (hC : N.cap_constant ≤ C) : |
| 91 | 1 ≤ scalarCurvatureSupOn g N.connection N.carrier ∧ |
| 92 | scalarCurvatureSupOn g N.connection N.carrier ≤ C := by |
| 93 | have hb : BddAbove (Set.range |
| 94 | (fun z : N.carrier => N.connection.scalarCurvature z.1)) := |
| 95 | ⟨C, by rintro _ ⟨z, rfl⟩; exact (N.scalar_bounds_of_normalized_base ho hnormal hC z.2).2⟩ |
| 96 | constructor |
| 97 | · rw [← hnormal] |
| 98 | exact le_csSup hb ⟨⟨o, ho⟩, rfl⟩ |
| 99 | · exact csSup_le ⟨_, ⟨⟨o, ho⟩, rfl⟩⟩ (by |
| 100 | rintro _ ⟨z, rfl⟩ |
| 101 | exact (N.scalar_bounds_of_normalized_base ho hnormal hC z.2).2) |
| 102 | |
| 103 | /-- A cap with scalar-one base lies in the actual ambient ball whose |
| 104 | radius is its uniform cap constant (Theorem 12.28). -/ |
| 105 | theorem carrier_subset_ball_of_normalized_base {o : M} (ho : o ∈ N.carrier) |
| 106 | (hnormal : N.connection.scalarCurvature o = 1) |
| 107 | {C : ℝ} (hC : N.cap_constant ≤ C) : N.carrier ⊆ g.ball o C := by |
| 108 | have hsup := (N.scalarSup_bounds_of_normalized_base ho hnormal hC).1 |
| 109 | have hpow : scalarCurvatureSupOn g N.connection N.carrier ^ (-1 / 2 : ℝ) ≤ 1 := |
| 110 | Real.rpow_le_one_of_one_le_of_nonpos hsup (by norm_num) |
| 111 | intro x hx |
| 112 | calc |
| 113 | g.edist o x ≤ intrinsicEDist g N.carrier o x := edist_le_intrinsicEDist _ _ _ |
| 114 | _ ≤ intrinsicDiameter g N.carrier := intrinsicEDist_le_intrinsicDiameter ho hx |
| 115 | _ < ENNReal.ofReal (N.cap_constant * |
| 116 | scalarCurvatureSupOn g N.connection N.carrier ^ (-1 / 2 : ℝ)) := |
| 117 | N.intrinsic_diameter_bound |
| 118 | _ ≤ ENNReal.ofReal C := ENNReal.ofReal_le_ofReal (by |
| 119 | calc |
| 120 | _ ≤ N.cap_constant * 1 := mul_le_mul_of_nonneg_left hpow N.cap_constant_pos.le |
| 121 | _ ≤ C := by simpa only [mul_one] using hC) |
| 122 | |
| 123 | /-- Completeness makes the closure of the actual normalized cap compact; |
| 124 | no new topology or completion is introduced (Theorem 12.28). -/ |
| 125 | theorem isCompact_closure_of_normalized_base [ConnectedSpace M] |
| 126 | (hcomplete : MetricComplete g) {o : M} (ho : o ∈ N.carrier) |
| 127 | (hnormal : N.connection.scalarCurvature o = 1) : IsCompact (closure N.carrier) := by |
| 128 | have hc := Proofs.M09.isCompact_closure_metric_ball g hcomplete o N.cap_constant |
| 129 | exact hc.of_isClosed_subset isClosed_closure |
| 130 | (closure_mono (N.carrier_subset_ball_of_normalized_base ho hnormal le_rfl)) |
| 131 | |
| 132 | end CapCertificate |
| 133 | end PoincareMT |