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.Supremum |
| 2 | |
| 3 | /-! |
| 4 | # Persistence of cap-ball scalar calibration on the captured carrier |
| 5 | |
| 6 | Transport an actual old cap ball into the regular region by the exact |
| 7 | reference map. Its scalar supremum equals the frozen inverse-square core |
| 8 | radius. Compact capture therefore controls its terminal scalar supremum with |
| 9 | an error tending to zero, uniformly over all such captured cap balls. |
| 10 | |
| 11 | This estimate concerns the transported old ball. Constructing an exactly |
| 12 | calibrated ball for the terminal metric requires a further distance argument. |
| 13 | Reference: Morgan--Tian, Definition 9.72(6), pp. 230--231, and |
| 14 | Lemma 11.24, pp. 281--284. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Bundle Topology |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | noncomputable section |
| 26 | |
| 27 | namespace PoincareMT.SingularTimeAssumptions |
| 28 | |
| 29 | variable {M : Type u} [TopologicalSpace M] |
| 30 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 31 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 32 | [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 33 | {F : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 34 | |
| 35 | /-- A subset of an old slice pulled back into the full regular region. -/ |
| 36 | def regularReferencePreimage (H : SingularTimeAssumptions F T M) |
| 37 | (P04 : RicciFlowCurvatureTheory.{u}) (t : ℝ) (ht : t ∈ Ico H.reference.tMinus T) |
| 38 | (S : Set (F.slice t).carrier) : Set (H.regularRegion P04) := |
| 39 | (fun x : H.regularRegion P04 => H.reference.forward t ht x) ⁻¹' S |
| 40 | |
| 41 | /-- Scalar suprema on captured old sets are unchanged by the reference pullback. -/ |
| 42 | theorem scalar_sup_regularReferencePreimage (H : SingularTimeAssumptions F T M) |
| 43 | (P04 : RicciFlowCurvatureTheory.{u}) (t : ℝ) (ht : t ∈ Ico H.reference.tMinus T) |
| 44 | (S : Set (F.slice t).carrier) |
| 45 | (hregular : H.reference.inverse t ht '' S ⊆ H.reference.regularLimitSet) : |
| 46 | sSup (range (fun x : H.regularReferencePreimage P04 t ht S => |
| 47 | H.reference.scalar t (x : H.regularRegion P04))) = |
| 48 | scalarCurvatureSupOn (F.metric t) (F.connection t) S := by |
| 49 | apply congrArg sSup |
| 50 | ext z |
| 51 | constructor |
| 52 | · rintro ⟨x, rfl⟩ |
| 53 | exact ⟨⟨H.reference.forward t ht (x : H.regularRegion P04), x.property⟩, |
| 54 | H.reference.scalar_pullback t ht (x : H.regularRegion P04)⟩ |
| 55 | · rintro ⟨y, rfl⟩ |
| 56 | let x : H.regularRegion P04 := |
| 57 | ⟨H.reference.inverse t ht y, hregular ⟨y, y.property, rfl⟩⟩ |
| 58 | have hx : x ∈ H.regularReferencePreimage P04 t ht S := by |
| 59 | change H.reference.forward t ht (H.reference.inverse t ht y) ∈ S |
| 60 | exact (H.reference.right_inverse t ht y).symm ▸ y.property |
| 61 | refine ⟨⟨x, hx⟩, ?_⟩ |
| 62 | exact (H.reference.scalar_pullback t ht (H.reference.inverse t ht y)).symm.trans |
| 63 | (congrArg (F.connection t).scalarCurvature (H.reference.right_inverse t ht y)) |
| 64 | |
| 65 | /-- Captured old sets pull back into the corresponding compact regular set. -/ |
| 66 | theorem regularReferencePreimage_subset (H : SingularTimeAssumptions F T M) |
| 67 | (P04 : RicciFlowCurvatureTheory.{u}) (t : ℝ) (ht : t ∈ Ico H.reference.tMinus T) |
| 68 | (S : Set (F.slice t).carrier) {A : Set (H.regularRegion P04)} |
| 69 | (hcapture : H.reference.inverse t ht '' S ⊆ Subtype.val '' A) : |
| 70 | H.regularReferencePreimage P04 t ht S ⊆ A := by |
| 71 | intro x hx |
| 72 | obtain ⟨a, ha, hax⟩ := hcapture |
| 73 | ⟨H.reference.forward t ht x, hx, H.reference.left_inverse t ht x⟩ |
| 74 | have heq : a = x := Subtype.ext hax |
| 75 | exact heq ▸ ha |
| 76 | |
| 77 | /-- One error bound compares every captured old cap's exact inverse-square |
| 78 | core radius with the actual terminal scalar supremum on its transported ball. -/ |
| 79 | theorem eventually_cap_core_calibration_close |
| 80 | (H : SingularTimeAssumptions F T M) (P04 : RicciFlowCurvatureTheory.{u}) |
| 81 | {A : Set (H.regularRegion P04)} (hA : IsCompact A) {δ : ℝ} (hδ : 0 < δ) : |
| 82 | ∀ᶠ t in 𝓝[<] T, ∀ ht : t ∈ Ico H.reference.tMinus T, |
| 83 | ∀ N : CapCertificate (F.metric t), N.connection = F.connection t → |
| 84 | H.reference.inverse t ht '' N.carrier ⊆ Subtype.val '' A → |
| 85 | ∀ y ∈ N.core, |
| 86 | |(N.core_radius y)⁻¹ ^ 2 - |
| 87 | scalarCurvatureSupOn (H.terminalMetric P04) (H.terminalConnection P04) |
| 88 | (H.regularReferencePreimage P04 t ht ((F.metric t).ball y (N.core_radius y)))| < δ := by |
| 89 | filter_upwards [H.eventually_scalar_suprema_close_on_subsets P04 hA hδ] with t hsup |
| 90 | intro ht N hconnection hcapture y hy |
| 91 | let B := (F.metric t).ball y (N.core_radius y) |
| 92 | have hyB : y ∈ B := by |
| 93 | change (F.metric t).edist y y < ENNReal.ofReal (N.core_radius y) |
| 94 | simpa only [RiemannianMetric.edist, Manifold.riemannianEDist_self] using |
| 95 | ENNReal.ofReal_pos.mpr (N.core_radius_pos y hy) |
| 96 | have hBN : B ⊆ N.carrier := fun z hz => N.core_ball_subset y hy (subset_closure hz) |
| 97 | have hBcapture : H.reference.inverse t ht '' B ⊆ Subtype.val '' A := |
| 98 | (image_mono hBN).trans hcapture |
| 99 | have hBregular : H.reference.inverse t ht '' B ⊆ H.reference.regularLimitSet := by |
| 100 | intro z hz |
| 101 | obtain ⟨a, _, rfl⟩ := hBcapture hz |
| 102 | exact a.property |
| 103 | let x : H.regularRegion P04 := |
| 104 | ⟨H.reference.inverse t ht y, hBregular ⟨y, hyB, rfl⟩⟩ |
| 105 | have hx : x ∈ H.regularReferencePreimage P04 t ht B := by |
| 106 | change H.reference.forward t ht (H.reference.inverse t ht y) ∈ B |
| 107 | exact (H.reference.right_inverse t ht y).symm ▸ hyB |
| 108 | have h := hsup (H.regularReferencePreimage P04 t ht B) ⟨x, hx⟩ |
| 109 | (H.regularReferencePreimage_subset P04 t ht B hBcapture) |
| 110 | rw [H.scalar_sup_regularReferencePreimage P04 t ht B hBregular, ← hconnection, |
| 111 | N.core_radius_eq y hy] at h |
| 112 | exact h |
| 113 | |
| 114 | end PoincareMT.SingularTimeAssumptions |