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.Continuation.Construction.Terminal.Extinction.Flow.Extension |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Continuation.Construction.Terminal.Extinction.Flow.Canonical |
| 3 | |
| 4 | /-! |
| 5 | # Old terminal neck cylinders in the empty continuation |
| 6 | |
| 7 | Every old boundary cylinder is pushed through the actual extension. Its |
| 8 | terminal carrier, neck chart and scale are retained literally, as is the |
| 9 | full backward metric comparison. |
| 10 | Source: Morgan--Tian, Definitions 9.78 and 15.8, pp. 232 and 362. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.Surgery.Extinction |
| 23 | |
| 24 | variable {F : SurgeryFlowData.{u}} {T : ℝ} (I : RepairedContinuationInput F T) |
| 25 | (V : SurgeryVanishingEventData F.parameters F.slice F.metric T) |
| 26 | (hV : ∀ a b hab hJ hfree, ∀ s t : ℝ, ∀ hs : s ∈ Icc a b, ∀ ht : t ∈ Icc a b, |
| 27 | ∀ hs' : s ∈ Ico V.tMinus T, ∀ ht' : t ∈ Ico V.tMinus T, ∀ x, |
| 28 | (F.regular_slabs a b hab hJ hfree).transport ⟨s, hs⟩ ⟨t, ht⟩ |
| 29 | (V.pre_identify ⟨s, hs'⟩ x) = V.pre_identify ⟨t, ht'⟩ x) |
| 30 | |
| 31 | def strongBoundary (U : ℝ) (hU : U ∈ F.surgery_times) |
| 32 | (hU' : U ∈ (flow I V hV).surgery_times) [Nonempty (F.slice U).carrier] |
| 33 | [Nonempty ((flow I V hV).slice U).carrier] |
| 34 | (i : Fin (F.event U hU).cap_count) (N : SurgeryTerminalStrongNeck F U hU i) : |
| 35 | SurgeryTerminalStrongNeck (flow I V hV) U hU' i := by |
| 36 | let E := extension I V hV |
| 37 | have hUT : U < T := (I.time_domain_eq ▸ F.surgery_times_subset hU).2 |
| 38 | refine { |
| 39 | cylinder := E.pushCylinder N.cylinder |
| 40 | reference_compatibility := ?_ |
| 41 | comparison := ?_ } |
| 42 | · intro s hs ht x hx |
| 43 | have hident := Splice.oldEvent_pre_identify F T (emptyCarrier (F.slice 0)) |
| 44 | (emptyFlow (F.metric 0) T) U hU hUT ⟨_, ht⟩ ((F.event U hU).limit_identify.inverse x) |
| 45 | have hinverse := Splice.oldEvent_limit_inverse F T (emptyCarrier (F.slice 0)) |
| 46 | (emptyFlow (F.metric 0) T) U hU hUT x |
| 47 | exact (congrArg (E.identify _ (N.cylinder.time_subset ⟨s, hs, rfl⟩)) |
| 48 | (N.reference_compatibility s hs ht x hx)).trans |
| 49 | (hident.symm.trans (congrArg |
| 50 | ((Splice.oldEvent F T (emptyCarrier (F.slice 0)) (emptyFlow (F.metric 0) T) |
| 51 | U hU hUT).pre_identify ⟨_, ht⟩) hinverse.symm)) |
| 52 | · apply RoundCylinderFamilyClose.congr (B' := fun s => if s = 0 then |
| 53 | fun z v w => ((F.event U hU).necks i).neck.scale⁻¹ ^ 2 * |
| 54 | roundCylinderPullback (F.event U hU).limit_metric |
| 55 | ((F.event U hU).necks i).neck.coordinate_map z v w |
| 56 | else surgeryCylinderPullback N.cylinder ((F.event U hU).necks i).neck.coordinate_map s) |
| 57 | ?_ N.comparison |
| 58 | intro s hs z hz v w |
| 59 | by_cases hzero : s = 0 |
| 60 | · simp only [if_pos hzero] |
| 61 | rfl |
| 62 | · have hsi : s ∈ Ioo (-1 : ℝ) 0 := ⟨hs.1, lt_of_le_of_ne hs.2 hzero⟩ |
| 63 | have hz' : z.2 ∈ Ioo (-((F.event U hU).necks i).neck.epsilon⁻¹) |
| 64 | ((F.event U hU).necks i).neck.epsilon⁻¹ := by |
| 65 | simpa only [(F.event U hU).neck_delta i] using hz |
| 66 | have hcoord := ((F.event U hU).necks i).neck.coordinate_map_eq (z.1, ⟨z.2, hz'⟩) |
| 67 | have hmem : ((F.event U hU).necks i).neck.coordinate_map z ∈ |
| 68 | ((F.event U hU).necks i).neck.carrier := |
| 69 | hcoord ▸ (((F.event U hU).necks i).neck.coordinate (z.1, ⟨z.2, hz'⟩)).property |
| 70 | simp only [if_neg hzero, surgeryCylinderPullback, dif_pos hsi] |
| 71 | exact E.pushCylinder_pullbackInner N.cylinder ((F.event U hU).necks i).neck.carrier_open |
| 72 | s hsi (((F.event U hU).necks i).neck.coordinate_map z) hmem _ _ |
| 73 | |
| 74 | end PoincareMT.Surgery.Extinction |