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.Topology.Manifold.Poincare.Final.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Cylinder.Stopping.PreterminalIntervals |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Construction.Curvature.CompactCurvatureBound |
| 4 | import PoincareLib.Geometry.Riemannian.Homothety.Curvature.ContractionTransport |
| 5 | |
| 6 | /-! |
| 7 | # Surgery-free preterminal intervals from full-curvature continuity |
| 8 | |
| 9 | The compact ordinary pre-flow has bounded full curvature on every included |
| 10 | closed subinterval. An earlier surgery inside that interval would contradict |
| 11 | the raw flow's maximality. Source: Proposition 16.5, pp. 374-375, used in |
| 12 | the backward component history on pp. 402-405. |
| 13 | See `proof-work/tasks/M47/derivations/component-estimate.md`, Stage E1. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set |
| 20 | open scoped Manifold ContDiff Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M47 |
| 25 | |
| 26 | set_option maxHeartbeats 1200000 in |
| 27 | -- The actual pre-flow curvature norm and changing slice types need extra elaboration. |
| 28 | /-- Full-curvature regularity excludes an earlier surgery in the actual |
| 29 | preterminal ordinary interval without a pinching premise; Proposition 16.5, |
| 30 | pp. 374-375, used on pp. 402-405. -/ |
| 31 | theorem component_event_preterminal_surgery_free |
| 32 | (F : SurgeryFlowData.{u}) {T : ℝ} (hT : T ∈ F.surgery_times) |
| 33 | [Nonempty (F.slice T).carrier] : |
| 34 | Disjoint F.surgery_times (Ioo (F.event T hT).tMinus T) := by |
| 35 | let event := F.event T hT |
| 36 | have hdomain := F.surgery_times_subset hT |
| 37 | have hprefix : Icc 0 T ⊆ F.time_domain := |
| 38 | F.time_domain_interval.out F.zero_mem hdomain |
| 39 | have hminus : event.tMinus ∈ F.time_domain := |
| 40 | hprefix ⟨event.tMinus_nonnegative, event.tMinus_lt.le⟩ |
| 41 | apply Set.disjoint_left.mpr |
| 42 | intro S hS hSI |
| 43 | let := M44.slice_nonempty_of_later F (F.surgery_times_subset hS) hdomain hSI.2.le |
| 44 | let c := (event.tMinus + S) / 2 |
| 45 | have hc : event.tMinus < c ∧ c < S := by |
| 46 | dsimp only [c] |
| 47 | constructor <;> linarith [hSI.1] |
| 48 | have hrect : Icc c S ×ˢ (univ : Set (F.slice event.tMinus).carrier) ⊆ |
| 49 | Ico event.tMinus T ×ˢ univ := |
| 50 | fun _ hp => ⟨⟨hc.1.le.trans hp.1.1, hp.1.2.trans_lt hSI.2⟩, hp.2⟩ |
| 51 | have hcompact : IsCompact (Icc c S ×ˢ (univ : Set (F.slice event.tMinus).carrier)) := |
| 52 | isCompact_Icc.prod (F.slices_compact event.tMinus hminus) |
| 53 | have hnorm : ContinuousOn |
| 54 | (fun p : ℝ × (F.slice event.tMinus).carrier => |
| 55 | (event.pre_flow.connection p.1).curvatureTensorNorm p.2) (Icc c S ×ˢ univ) := |
| 56 | (M34.continuousOn_flow_curvatureTensorNorm event.pre_flow).mono hrect |
| 57 | obtain ⟨B, hB⟩ := hcompact.bddAbove_image hnorm |
| 58 | have hbound (t : ℝ) (ht : t ∈ Icc c S) (x : (F.slice t).carrier) : |
| 59 | (F.connection t).curvatureTensorNorm x ≤ B := by |
| 60 | have htime : t ∈ Ico event.tMinus T := |
| 61 | ⟨hc.1.le.trans ht.1, ht.2.trans_lt hSI.2⟩ |
| 62 | let q := (event.pre_identify ⟨t, htime⟩).symm x |
| 63 | have hhom : MetricHomothety (event.pre_flow.metric t) (F.metric t) |
| 64 | (event.pre_identify ⟨t, htime⟩) 1 := by |
| 65 | intro y v w |
| 66 | simpa only [one_mul] using event.pre_metric ⟨t, htime⟩ y v w |
| 67 | have heq := M13.homothety_curvatureTensorNorm_eq _ _ _ 1 zero_lt_one hhom |
| 68 | (event.pre_flow.connection t) (F.connection t) q |
| 69 | have heqx : (F.connection t).curvatureTensorNorm x = |
| 70 | (event.pre_flow.connection t).curvatureTensorNorm q := by |
| 71 | simpa only [q, Diffeomorph.apply_symm_apply, div_one] using heq |
| 72 | have hBq : (event.pre_flow.connection t).curvatureTensorNorm q ≤ B := by |
| 73 | apply hB |
| 74 | exact ⟨(t, q), ⟨ht, mem_univ q⟩, rfl⟩ |
| 75 | exact heqx.trans_le hBq |
| 76 | obtain ⟨t, ht, x, hx⟩ := M44.curvature_unbounded_before_surgery F hS B c hc.2 |
| 77 | exact (not_lt_of_ge (hbound t ⟨ht.1.le, ht.2.le⟩ x)) hx |
| 78 | |
| 79 | end PoincareMT.M47 |