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.Singular.RegularLimit.Canonical.Cap.Calibration |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.RegularLimit.CurvatureControl |
| 3 | import PoincareLib.Topology.Manifold.NeckCap.Cap.Bounds |
| 4 | |
| 5 | /-! # Uniform lower bounds for captured calibrated cap radii -/ |
| 6 | |
| 7 | set_option autoImplicit false |
| 8 | set_option backward.isDefEq.respectTransparency false |
| 9 | |
| 10 | open Set Filter |
| 11 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 12 | |
| 13 | universe u |
| 14 | |
| 15 | namespace PoincareMT.CapCertificate |
| 16 | |
| 17 | variable {M : Type*} [TopologicalSpace M] |
| 18 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 19 | [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 20 | {g : RiemannianMetric 3 M} |
| 21 | |
| 22 | /-- A scalar upper bound on the carrier keeps its calibrated core radii away |
| 23 | from zero. -/ |
| 24 | theorem core_radius_lower_of_scalar_upper (N : CapCertificate g) |
| 25 | {B : ℝ} (hB : 0 ≤ B) (hscalar : ∀ z ∈ N.carrier, N.connection.scalarCurvature z ≤ B) |
| 26 | {y : M} (hy : y ∈ N.core) : |
| 27 | (B + 1)⁻¹ ≤ N.core_radius y := by |
| 28 | have hr := N.core_radius_pos y hy |
| 29 | have hyball : y ∈ g.ball y (N.core_radius y) := by |
| 30 | change g.edist y y < ENNReal.ofReal (N.core_radius y) |
| 31 | simpa only [RiemannianMetric.edist, Manifold.riemannianEDist_self] using |
| 32 | ENNReal.ofReal_pos.mpr hr |
| 33 | let : Nonempty (g.ball y (N.core_radius y)) := ⟨⟨y, hyball⟩⟩ |
| 34 | have hsquare : (N.core_radius y)⁻¹ ^ 2 ≤ B := by |
| 35 | rw [← N.core_radius_eq y hy] |
| 36 | apply csSup_le (range_nonempty (fun z : g.ball y (N.core_radius y) => |
| 37 | N.connection.scalarCurvature z)) |
| 38 | rintro _ ⟨z, rfl⟩ |
| 39 | exact hscalar z (N.core_ball_subset y hy (subset_closure z.property)) |
| 40 | have hinv : (N.core_radius y)⁻¹ ≤ B + 1 := by |
| 41 | nlinarith [sq_nonneg ((N.core_radius y)⁻¹ - 1)] |
| 42 | have h := (inv_le_inv₀ (by positivity : 0 < B + 1) (inv_pos.mpr hr)).mpr hinv |
| 43 | simpa only [inv_inv] using h |
| 44 | |
| 45 | end PoincareMT.CapCertificate |
| 46 | |
| 47 | namespace PoincareMT.SingularTimeAssumptions |
| 48 | |
| 49 | variable {M : Type u} [TopologicalSpace M] |
| 50 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 51 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 52 | [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 53 | {F : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 54 | |
| 55 | /-- Compact regular capture bounds scalar curvature and full curvature on all |
| 56 | late cap carriers, and supplies one positive lower bound for every core radius. -/ |
| 57 | theorem exists_eventually_captured_cap_scalar_upper |
| 58 | (H : SingularTimeAssumptions F T M) (P04 : RicciFlowCurvatureTheory.{u}) |
| 59 | {A : Set (H.regularRegion P04)} (hA : IsCompact A) : |
| 60 | ∃ B : ℝ, 0 < B ∧ |
| 61 | ∀ᶠ t in 𝓝[<] T, ∀ ht : t ∈ Ico H.reference.tMinus T, |
| 62 | ∀ N : CapCertificate (F.metric t), N.connection = F.connection t → |
| 63 | H.reference.inverse t ht '' N.carrier ⊆ Subtype.val '' A → |
| 64 | (∀ z ∈ N.carrier, N.connection.scalarCurvature z ≤ B) ∧ |
| 65 | (∀ z ∈ N.carrier, |
| 66 | (F.connection t).curvatureTensorNorm z ≤ 13 * max B (Real.exp 4)) ∧ |
| 67 | ∀ y ∈ N.core, (B + 1)⁻¹ ≤ N.core_radius y := by |
| 68 | obtain ⟨b, hb⟩ := (hA.image |
| 69 | (H.terminalConnection P04).continuous_scalarCurvature).bddAbove |
| 70 | let B := max b 1 + 1 |
| 71 | have hB : 0 < B := by dsimp [B]; linarith [le_max_right b 1] |
| 72 | refine ⟨B, hB, ?_⟩ |
| 73 | filter_upwards [Metric.tendstoUniformlyOn_iff.mp |
| 74 | (H.tendstoUniformlyOn_terminal_scalarCurvature P04 hA) 1 zero_lt_one] with t hclose |
| 75 | intro ht N hconnection hcapture |
| 76 | have hscalar : ∀ z ∈ N.carrier, N.connection.scalarCurvature z ≤ B := by |
| 77 | intro z hz |
| 78 | obtain ⟨x, hx, hxeq⟩ := hcapture (mem_image_of_mem _ hz) |
| 79 | have hf : H.reference.forward t ht x = z := by |
| 80 | rw [hxeq] |
| 81 | exact H.reference.right_inverse t ht z |
| 82 | have hh := hclose x hx |
| 83 | rw [Real.dist_eq, abs_sub_lt_iff] at hh |
| 84 | have hbound := hb (mem_image_of_mem _ hx) |
| 85 | have heq : N.connection.scalarCurvature z = H.reference.scalar t x := by |
| 86 | rw [hconnection, ← hf] |
| 87 | exact H.reference.scalar_pullback t ht x |
| 88 | rw [heq] |
| 89 | dsimp [B] |
| 90 | linarith [le_max_left b 1] |
| 91 | exact ⟨hscalar, fun z hz => H.curvature_norm_le_of_scalar_le P04 |
| 92 | (H.reference.window_subset ht) z (by simpa only [hconnection] using hscalar z hz), |
| 93 | fun y hy => N.core_radius_lower_of_scalar_upper hB.le hscalar hy⟩ |
| 94 | |
| 95 | end PoincareMT.SingularTimeAssumptions |