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.CanonicalInduction.Positive.PositiveHistoryRegular |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Components.TerminalComponents |
| 3 | |
| 4 | /-! |
| 5 | # Whole retention of a surviving positive component |
| 6 | |
| 7 | A positive pre-component containing one retained point is entirely |
| 8 | regular. Its actual limit image is a compact whole terminal component, |
| 9 | and Definition 15.8 retains that component whole. This is the event-level |
| 10 | positive-history argument on Morgan--Tian, pp. 393-394. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M47Positive |
| 21 | |
| 22 | variable {g₀ : StandardInitialMetric} {K : MetricSurgeryConstants} |
| 23 | {P : SurgeryParameters} {slice : ℝ → GeneralizedSliceCarrier.{u}} |
| 24 | {metric : ∀ t, RiemannianMetric 3 (slice t).carrier} {T : ℝ} |
| 25 | |
| 26 | /-- The literal limit map carries a compact whole regular pre-component |
| 27 | onto a whole terminal component; MT Definition 15.8, pp. 361-362. -/ |
| 28 | theorem regular_pre_component_limit_image |
| 29 | (E : SurgeryEventData g₀ K P slice metric T) (x : (slice E.tMinus).carrier) |
| 30 | (hcompact : IsCompact (connectedComponent x)) |
| 31 | (hregular : connectedComponent x ⊆ E.regular_limit) : |
| 32 | E.limit_identify.map '' connectedComponent x = |
| 33 | connectedComponent (E.limit_identify.map x) := by |
| 34 | let : LocallyConnectedSpace (slice E.tMinus).carrier := |
| 35 | ChartedSpace.locallyConnectedSpace (EuclideanSpace ℝ (Fin 3)) _ |
| 36 | have hset : E.limit_identify.map '' connectedComponent x = |
| 37 | E.limit_identify.inverse ⁻¹' connectedComponent x := by |
| 38 | ext y |
| 39 | constructor |
| 40 | · rintro ⟨z, hz, rfl⟩ |
| 41 | simpa only [mem_preimage, E.limit_identify.left_inverse (hregular hz)] using hz |
| 42 | · intro hy |
| 43 | exact ⟨E.limit_identify.inverse y, hy, E.limit_identify.right_inverse (mem_univ y)⟩ |
| 44 | have hopen : IsOpen (E.limit_identify.map '' connectedComponent x) := by |
| 45 | rw [hset] |
| 46 | exact isOpen_connectedComponent.preimage |
| 47 | (continuousOn_univ.mp E.limit_identify.inverse_smooth.continuousOn) |
| 48 | have hcont := E.limit_identify.map_smooth.continuousOn.mono hregular |
| 49 | have hcomp := hcompact.image_of_continuousOn hcont |
| 50 | have hconn := (isConnected_connectedComponent (x := x)).image E.limit_identify.map hcont |
| 51 | have hx : E.limit_identify.map x ∈ E.limit_identify.map '' connectedComponent x := |
| 52 | ⟨x, mem_connectedComponent, rfl⟩ |
| 53 | exact Subset.antisymm (hconn.subset_connectedComponent hx) |
| 54 | ((show IsClopen _ from ⟨hcomp.isClosed, hopen⟩).connectedComponent_subset hx) |
| 55 | |
| 56 | /-- Any retained point in a regular whole pre-component gives a genuine |
| 57 | low-curvature point of its terminal component through the actual terminal |
| 58 | policy; Morgan--Tian Definition 15.8, pp. 361-362. -/ |
| 59 | theorem retained_regular_component_meets_core |
| 60 | (E : SurgeryEventData g₀ K P slice metric T) (policy : SurgeryEventTerminalPolicy E) |
| 61 | (x : (slice E.tMinus).carrier) |
| 62 | (hcompact : IsCompact (connectedComponent x)) |
| 63 | (hregular : connectedComponent x ⊆ E.regular_limit) |
| 64 | {q : (slice E.tMinus).carrier} (hq : q ∈ connectedComponent x) |
| 65 | (hretained : q ∈ E.retained_pre) : |
| 66 | ∃ y ∈ connectedComponent (E.limit_identify.map x), |
| 67 | E.limit_connection.scalarCurvature y ≤ (P.delta T * P.r T)⁻¹ ^ 2 := by |
| 68 | have hqterm : E.limit_identify.map q ∈ connectedComponent (E.limit_identify.map x) := |
| 69 | (regular_pre_component_limit_image E x hcompact hregular).subset ⟨q, hq, rfl⟩ |
| 70 | have hqret : E.limit_identify.map q ∈ E.limit_identify.map '' E.retained_pre := |
| 71 | ⟨q, hretained, rfl⟩ |
| 72 | rw [policy.retained_eq] at hqret |
| 73 | obtain ⟨y, hyR, hqy⟩ := hqret.1 |
| 74 | have heq : connectedComponent y = connectedComponent (E.limit_identify.map x) := |
| 75 | (connectedComponent_eq hqy).trans (connectedComponent_eq hqterm).symm |
| 76 | exact ⟨y, heq ▸ mem_connectedComponent, hyR⟩ |
| 77 | |
| 78 | /-- A positive component with an actually retained point is retained |
| 79 | whole and gives a whole post-component missing every inserted closed cap. |
| 80 | Positivity is at the displayed fresh reference time; MT pp. 393-394. -/ |
| 81 | theorem positive_pre_component_whole_retention |
| 82 | (hC : RicciFlowCurvatureTheory.{u}) |
| 83 | (E : SurgeryEventData g₀ K P slice metric T) (policy : SurgeryEventTerminalPolicy E) |
| 84 | [CompactSpace (slice E.tMinus).carrier] |
| 85 | (v : Ico E.tMinus T) (x : (slice E.tMinus).carrier) |
| 86 | (hpos : ∀ y ∈ connectedComponent x, ∀ u w : TangentSpace (𝓡 3) y, |
| 87 | LeviCivitaData.IsOrthonormalPair (E.pre_flow.metric v.1) y u w → |
| 88 | 0 < (E.pre_flow.connection v.1).sectionalCurvature y u w) |
| 89 | {q : (slice E.tMinus).carrier} (hq : q ∈ connectedComponent x) |
| 90 | (hretained : q ∈ E.retained_pre) : |
| 91 | connectedComponent x ⊆ interior E.retained_pre ∧ |
| 92 | E.retention.map '' connectedComponent x = connectedComponent (E.retention.map x) ∧ |
| 93 | ∀ i, Disjoint (E.retention.map '' connectedComponent x) (E.caps i).carrier := by |
| 94 | have hregular := positive_component_subset_regular hC E v x hpos hq |
| 95 | (E.retained_pre_subset hretained) |
| 96 | have hcompact : IsCompact (connectedComponent x) := isClosed_connectedComponent.isCompact |
| 97 | have hcompactT : IsCompact (connectedComponent (E.limit_identify.map x)) := by |
| 98 | rw [← regular_pre_component_limit_image E x hcompact hregular] |
| 99 | exact hcompact.image_of_continuousOn (E.limit_identify.map_smooth.continuousOn.mono hregular) |
| 100 | have hlow := retained_regular_component_meets_core E policy x hcompact hregular hq hretained |
| 101 | have hinv : E.limit_identify.inverse (E.limit_identify.map x) = x := |
| 102 | E.limit_identify.left_inverse (hregular mem_connectedComponent) |
| 103 | refine ⟨?_, ?_, ?_⟩ |
| 104 | · simpa only [hinv] using policy.compact_pre_component_subset_interior hcompactT hlow |
| 105 | · simpa only [hinv] using policy.compact_retention_image_component hcompactT hlow |
| 106 | · intro i |
| 107 | simpa only [hinv] using policy.compact_retention_image_disjoint_cap hcompactT hlow i |
| 108 | |
| 109 | end PoincareMT.M47Positive |