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.Induction.Noncollapse.Assembly.PositiveComponents.PositiveFlowPieces |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Assembly.FiniteEventInduction |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Continuation.Construction.RegularHistory |
| 4 | |
| 5 | /-! |
| 6 | # Positive components along actual surgery-cylinder lines |
| 7 | |
| 8 | Morgan--Tian Remark 16.2 and p. 393. The finite-event argument uses the |
| 9 | physical clock and the cylinder's actual slab and retention maps. It |
| 10 | applies also to a partial cylinder under backward construction. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.Proofs.M46 |
| 22 | |
| 23 | /-- Every fixed actual cylinder line carries its positive physical |
| 24 | component forward, including all surgeries in its closed time segment. -/ |
| 25 | theorem positive_component_cylinder_line |
| 26 | {F : SurgeryFlowData.{u}} {C : GeneralizedSliceCarrier.{u}} |
| 27 | {origin scale : ℝ} {I : Set ℝ} {U : Set C.carrier} |
| 28 | (e : SurgeryFlowCylinder F C origin scale I U) {x : C.carrier} (hx : x ∈ U) |
| 29 | {a b : ℝ} (ha : a ∈ I) (hb : b ∈ I) (hab : a ≤ b) |
| 30 | (hpos : SurgeryPositiveComponentAt F (origin + a / scale) (e.forward a ha x)) : |
| 31 | SurgeryPositiveComponentAt F (origin + b / scale) (e.forward b hb x) := by |
| 32 | have hclock : origin + a / scale ≤ origin + b / scale := |
| 33 | add_le_add le_rfl ((div_le_div_iff_of_pos_right e.scale_pos).mpr hab) |
| 34 | have hparam : ∀ t ∈ Icc (origin + a / scale) (origin + b / scale), |
| 35 | ∃ s ∈ I, origin + s / scale = t := by |
| 36 | intro t ht |
| 37 | let s := scale * (t - origin) |
| 38 | have heq : origin + s / scale = t := by |
| 39 | dsimp [s] |
| 40 | field_simp [e.scale_pos.ne'] |
| 41 | ring |
| 42 | refine ⟨s, e.interval_connected.out ha hb ⟨?_, ?_⟩, heq⟩ |
| 43 | · apply (div_le_div_iff_of_pos_right e.scale_pos).mp |
| 44 | linarith only [ht.1, heq] |
| 45 | · apply (div_le_div_iff_of_pos_right e.scale_pos).mp |
| 46 | linarith only [ht.2, heq] |
| 47 | have htime : Icc (origin + a / scale) (origin + b / scale) ⊆ F.time_domain := by |
| 48 | intro t ht |
| 49 | obtain ⟨s, hs, rfl⟩ := hparam t ht |
| 50 | exact e.time_subset (mem_image_of_mem _ hs) |
| 51 | let Q : ℝ → Prop := fun t => ∀ s (hs : s ∈ I), origin + s / scale = t → |
| 52 | SurgeryPositiveComponentAt F (origin + s / scale) (e.forward s hs x) |
| 53 | have hQa : Q (origin + a / scale) := by |
| 54 | intro s hs heq |
| 55 | have : s = a := (div_left_inj' e.scale_pos.ne').mp (by linarith) |
| 56 | subst s |
| 57 | exact hpos |
| 58 | have hfinite : (F.surgery_times ∩ |
| 59 | Ioc (origin + a / scale) (origin + b / scale)).Finite := |
| 60 | (F.surgery_times_finite_on_compact isCompact_Icc htime).subset |
| 61 | (fun _ ht => ⟨ht.1, ht.2.1.le, ht.2.2⟩) |
| 62 | have hQb : Q (origin + b / scale) := by |
| 63 | apply finite_event_forward_induction hclock hfinite Q hQa |
| 64 | · intro s hs t ht hst hfree hQs v hv heq |
| 65 | obtain ⟨w, hw, rfl⟩ := hparam s hs |
| 66 | subst t |
| 67 | rcases lt_or_eq_of_le hst with hlt | heq |
| 68 | · have hsmall : Icc (origin + w / scale) (origin + v / scale) ⊆ |
| 69 | F.time_domain := fun u hu => htime ⟨hs.1.trans hu.1, hu.2.trans ht.2⟩ |
| 70 | have hp := positive_component_regular_transport F hlt hsmall hfree |
| 71 | ⟨origin + w / scale, ⟨le_rfl, hst⟩⟩ |
| 72 | ⟨origin + v / scale, ⟨hst, le_rfl⟩⟩ hst (e.forward w hw x) (hQs w hw rfl) |
| 73 | have hmap := e.slab_compatibility _ _ hlt hsmall hfree w hw v hv |
| 74 | ⟨le_rfl, hst⟩ ⟨hst, le_rfl⟩ x hx |
| 75 | exact hmap ▸ hp |
| 76 | · exact hQs v hv heq.symm |
| 77 | · intro t ht hbefore s hs heq |
| 78 | subst t |
| 79 | let : Nonempty (F.slice (origin + s / scale)).carrier := ⟨e.forward s hs x⟩ |
| 80 | let event := F.event (origin + s / scale) ht.1 |
| 81 | obtain ⟨v, hv, hvt⟩ := exists_between |
| 82 | (max_lt ht.2.1 event.tMinus_lt) |
| 83 | have hav : origin + a / scale < v := (le_max_left _ _).trans_lt hv |
| 84 | have hvm : event.tMinus < v := (le_max_right _ _).trans_lt hv |
| 85 | obtain ⟨w, hw, rfl⟩ := hparam v ⟨hav.le, hvt.le.trans ht.2.2⟩ |
| 86 | let z := (event.pre_identify ⟨origin + w / scale, ⟨hvm.le, hvt⟩⟩).symm |
| 87 | (e.forward w hw x) |
| 88 | have hpv : SurgeryPositiveComponentAt F (origin + w / scale) |
| 89 | (event.pre_identify ⟨origin + w / scale, ⟨hvm.le, hvt⟩⟩ z) := by |
| 90 | simpa only [z, Diffeomorph.apply_symm_apply] using |
| 91 | hbefore (origin + w / scale) ⟨hav.le, hvt⟩ w hw rfl |
| 92 | have hz : z ∈ interior event.retained_pre := |
| 93 | e.pre_retained_at_surgery s hs ht.1 w hw ⟨hvm.le, hvt⟩ x hx |
| 94 | have hp := positive_component_surgery_from_reference F ht.1 |
| 95 | ⟨origin + w / scale, ⟨hvm.le, hvt⟩⟩ z hpv z |
| 96 | ⟨interior_subset hz, mem_connectedComponent⟩ |
| 97 | have hmap := e.surgery_compatibility s hs ht.1 w hw ⟨hvm.le, hvt⟩ x hx |
| 98 | exact hmap ▸ hp |
| 99 | exact hQb b hb rfl |
| 100 | |
| 101 | end PoincareMT.Proofs.M46 |