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.StandardCap.Persistence.Removal.Terminal.TerminalChart |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Cylinder.Stopping.PreterminalStopping |
| 3 | |
| 4 | /-! |
| 5 | # Terminal neck exclusion implies actual preterminal removal |
| 6 | |
| 7 | The constant preterminal coordinates transfer avoidance from one |
| 8 | actual terminal chart to every preterminal slice. The existing |
| 9 | connected-frontier argument then removes the entire tracked region. |
| 10 | Morgan--Tian, Claim 16.10, p. 375; M44 derivation 73. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M44 |
| 22 | |
| 23 | variable {F : SurgeryFlowData.{u}} {C : GeneralizedSliceCarrier.{u}} |
| 24 | {origin scale c : ℝ} {U : Set C.carrier} |
| 25 | |
| 26 | /-- Avoidance in one terminal chart implies avoidance of the |
| 27 | backward images of the same central spheres at every preterminal |
| 28 | parameter. Source: Claim 16.10, p. 375; M44 derivation 73. -/ |
| 29 | theorem preterminal_neck_avoidance_of_terminal |
| 30 | (P : M44CapPersistencePredecessors.{u}) (hpinch : SurgeryFlowPinched F) |
| 31 | (e : SurgeryFlowCylinder F C origin scale (Ico 0 c) U) (hU : IsOpen U) |
| 32 | (hT : origin + c / scale ∈ F.surgery_times) |
| 33 | [Nonempty (F.slice (origin + c / scale)).carrier] |
| 34 | (r : ℝ) (hr : r ∈ Ico 0 c) |
| 35 | (hr' : origin + r / scale ∈ Ico (F.event (origin + c / scale) hT).tMinus |
| 36 | (origin + c / scale)) |
| 37 | (havoid : ∀ i, Disjoint (cylinderTerminalChart e hU hT r hr hr' '' U) |
| 38 | ((F.event (origin + c / scale) hT).necks i).neck.central_sphere) |
| 39 | (s : ℝ) (hs : s ∈ Ico 0 c) |
| 40 | (hs' : origin + s / scale ∈ Ico (F.event (origin + c / scale) hT).tMinus |
| 41 | (origin + c / scale)) (i : Fin (F.event (origin + c / scale) hT).cap_count) : |
| 42 | Disjoint ((fun x => ((F.event (origin + c / scale) hT).pre_identify |
| 43 | ⟨origin + s / scale, hs'⟩).symm (e.forward s hs x)) '' U) |
| 44 | ((F.event (origin + c / scale) hT).limit_identify.inverse '' |
| 45 | ((F.event (origin + c / scale) hT).necks i).neck.central_sphere) := by |
| 46 | apply disjoint_left.mpr |
| 47 | rintro q ⟨x, hx, rfl⟩ ⟨y, hy, heq⟩ |
| 48 | change (F.event (origin + c / scale) hT).limit_identify.inverse y = |
| 49 | ((F.event (origin + c / scale) hT).pre_identify |
| 50 | ⟨origin + s / scale, hs'⟩).symm (e.forward s hs x) at heq |
| 51 | have hfixed := cylinder_preterminal_coordinates_eq_of_pinched P hpinch e hT |
| 52 | s hs r hr hs' hr' x hx |
| 53 | have hterminal : cylinderTerminalChart e hU hT r hr hr' x = y := by |
| 54 | change (F.event (origin + c / scale) hT).limit_identify.map |
| 55 | (((F.event (origin + c / scale) hT).pre_identify |
| 56 | ⟨origin + r / scale, hr'⟩).symm (e.forward r hr x)) = y |
| 57 | rw [← hfixed, ← heq] |
| 58 | exact (F.event (origin + c / scale) hT).limit_identify.right_inverse (mem_univ y) |
| 59 | apply disjoint_left.mp (havoid i) (mem_image_of_mem _ hx) |
| 60 | rwa [hterminal] |
| 61 | |
| 62 | /-- One terminal neck-exclusion statement and one fixed lost |
| 63 | line give the exact whole-region disappearance alternative. |
| 64 | Source: Claim 16.10, p. 375; M44 derivation 73. -/ |
| 65 | theorem disappears_of_terminal_neck_avoidance |
| 66 | (P : M44CapPersistencePredecessors.{u}) (hpinch : SurgeryFlowPinched F) |
| 67 | {U : Set (F.slice origin).carrier} |
| 68 | (e : SurgeryFlowCylinder F (F.slice origin) origin scale (Ico 0 c) U) |
| 69 | (hU : IsOpen U) (hconnected : IsPreconnected U) |
| 70 | (hT : origin + c / scale ∈ F.surgery_times) |
| 71 | [Nonempty (F.slice (origin + c / scale)).carrier] |
| 72 | (r : ℝ) (hr : r ∈ Ico 0 c) |
| 73 | (hr' : origin + r / scale ∈ Ico (F.event (origin + c / scale) hT).tMinus |
| 74 | (origin + c / scale)) |
| 75 | (hinitial : ∀ h x, x ∈ U → HEq (e.forward 0 h x) x) |
| 76 | (hlost : ∃ x ∈ U, ∀ s (hs : s ∈ Ico 0 c), |
| 77 | ∀ ht : origin + s / scale ∈ |
| 78 | Ico (F.event (origin + c / scale) hT).tMinus (origin + c / scale), |
| 79 | ((F.event (origin + c / scale) hT).pre_identify |
| 80 | ⟨origin + s / scale, ht⟩).symm (e.forward s hs x) ∉ |
| 81 | interior (F.event (origin + c / scale) hT).retained_pre) |
| 82 | (havoid : ∀ i, Disjoint (cylinderTerminalChart e hU hT r hr hr' '' U) |
| 83 | ((F.event (origin + c / scale) hT).necks i).neck.central_sphere) : |
| 84 | SurgeryBallDisappearsAt F e (origin + c / scale) := |
| 85 | disappears_of_fixed_lost_line e (hr.1.trans_lt hr.2) hconnected hT hinitial hlost |
| 86 | (preterminal_neck_avoidance_of_terminal P hpinch e hU hT r hr hr' havoid) |
| 87 | |
| 88 | end PoincareMT.M44 |