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.Spacetime.Assembly |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.DeepHorn.Extension.Canonical |
| 3 | |
| 4 | /-! |
| 5 | # Canonical control on late regular worldlines |
| 6 | |
| 7 | Above the strict terminal scalar cutoff, scalar convergence and the final |
| 8 | nonsingular time collar give canonical control at every sufficiently late |
| 9 | old time. The exact extension transports this control with unchanged accuracy |
| 10 | and constant. Source: Morgan--Tian, Theorem 11.19, pp. 279--280, and |
| 11 | Lemma 11.24, pp. 281--284. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.SingularTimeAssumptions |
| 23 | |
| 24 | variable {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 26 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 27 | [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 28 | {F : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 29 | |
| 30 | /-- A strict terminal scalar cutoff holds on one nonsingular tail, where |
| 31 | the original reference worldline has canonical control. -/ |
| 32 | theorem exists_late_reference_canonical_control |
| 33 | (H : SingularTimeAssumptions F T M) (P04 : RicciFlowCurvatureTheory.{u}) |
| 34 | (x : H.regularRegion P04) |
| 35 | (hR : H.r₀⁻¹ ^ 2 < (H.terminalConnection P04).scalarCurvature x) : |
| 36 | ∃ s : ℝ, H.reference.tMinus < s ∧ s < T ∧ |
| 37 | ∀ t (ht : t ∈ Ico H.reference.tMinus T), s < t → |
| 38 | t ∉ H.singularTimes ∧ H.r₀⁻¹ ^ 2 < H.reference.scalar t x ∧ |
| 39 | GeneralizedCanonicalControl (F := F) t (H.reference.forward t ht x) |
| 40 | H.epsilon H.constant := by |
| 41 | obtain ⟨a, haT, hscalar⟩ := mem_nhdsLT_iff_exists_Ioo_subset.mp |
| 42 | ((H.tendsto_terminal_scalarCurvature P04 x).eventually_const_lt hR) |
| 43 | obtain ⟨b, hbref, hbT, hregular⟩ := H.exists_regular_collar |
| 44 | refine ⟨max a b, hbref.trans_le (le_max_right _ _), max_lt haT hbT, ?_⟩ |
| 45 | intro t ht hst |
| 46 | have hregular_t := hregular t ⟨((le_max_right a b).trans_lt hst).le, ht.2⟩ |
| 47 | have hscalar_t := hscalar ⟨(le_max_left a b).trans_lt hst, ht.2⟩ |
| 48 | refine ⟨hregular_t, hscalar_t, H.canonical_control t (H.reference.window_subset ht) |
| 49 | (Or.inr hregular_t) (H.reference.forward t ht x) ?_⟩ |
| 50 | change H.r₀⁻¹ ^ 2 ≤ (F.connection t).scalarCurvature (H.reference.forward t ht x) |
| 51 | rw [H.reference.scalar_pullback t ht x] |
| 52 | exact hscalar_t.le |
| 53 | |
| 54 | /-- The same late-time canonical control holds at the exact image of the |
| 55 | reference point in the constructed nonempty extension. -/ |
| 56 | theorem exists_late_extended_canonical_control |
| 57 | (H : SingularTimeAssumptions F T M) (P04 : RicciFlowCurvatureTheory.{u}) |
| 58 | (hΩ : H.reference.regularLimitSet.Nonempty) (x : H.regularRegion P04) |
| 59 | (hR : H.r₀⁻¹ ^ 2 < (H.terminalConnection P04).scalarCurvature x) : |
| 60 | ∃ s : ℝ, H.reference.tMinus < s ∧ s < T ∧ |
| 61 | ∀ t (ht : t ∈ Ico H.reference.tMinus T), s < t → |
| 62 | t ∉ H.singularTimes ∧ H.r₀⁻¹ ^ 2 < H.reference.scalar t x ∧ |
| 63 | GeneralizedCanonicalControl (F := (H.nonemptyExtension P04 hΩ).extended) t |
| 64 | ((H.nonemptyExtension P04 hΩ).forward t (H.reference.window_subset ht) |
| 65 | (H.reference.forward t ht x)) H.epsilon H.constant := by |
| 66 | obtain ⟨s, hsref, hsT, hcontrol⟩ := H.exists_late_reference_canonical_control P04 x hR |
| 67 | refine ⟨s, hsref, hsT, ?_⟩ |
| 68 | intro t ht hst |
| 69 | obtain ⟨hregular, hscalar, hcanonical⟩ := hcontrol t ht hst |
| 70 | exact ⟨hregular, hscalar, (H.nonemptyExtension P04 hΩ).canonical_control t |
| 71 | (H.reference.window_subset ht) (H.reference.forward t ht x) H.epsilon H.constant hcanonical⟩ |
| 72 | |
| 73 | /-- Canonical control along actual old points tends all the way to the |
| 74 | terminal time; this is the input to the four-alternative limiting argument. -/ |
| 75 | theorem eventually_extended_canonical_control |
| 76 | (H : SingularTimeAssumptions F T M) (P04 : RicciFlowCurvatureTheory.{u}) |
| 77 | (hΩ : H.reference.regularLimitSet.Nonempty) (x : H.regularRegion P04) |
| 78 | (hR : H.r₀⁻¹ ^ 2 < (H.terminalConnection P04).scalarCurvature x) : |
| 79 | ∀ᶠ t in 𝓝[<] T, ∃ ht : t ∈ Ico H.reference.tMinus T, |
| 80 | GeneralizedCanonicalControl (F := (H.nonemptyExtension P04 hΩ).extended) t |
| 81 | ((H.nonemptyExtension P04 hΩ).forward t (H.reference.window_subset ht) |
| 82 | (H.reference.forward t ht x)) H.epsilon H.constant := by |
| 83 | obtain ⟨s, hsref, hsT, hcontrol⟩ := H.exists_late_extended_canonical_control P04 hΩ x hR |
| 84 | filter_upwards [Ioo_mem_nhdsLT hsT] with t ht |
| 85 | have hreference : t ∈ Ico H.reference.tMinus T := ⟨(hsref.trans ht.1).le, ht.2⟩ |
| 86 | exact ⟨hreference, (hcontrol t hreference ht.1).2.2⟩ |
| 87 | |
| 88 | end PoincareMT.SingularTimeAssumptions |