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.Terminal.Common.TerminalCommonIntervalStopped |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Blowup.Controls.BlowupControlsSourceSearch |
| 3 | |
| 4 | /-! |
| 5 | # Constructed radius-independent bounded searches |
| 6 | |
| 7 | The initial source is an actual open physical set with its terminal scalar |
| 8 | ceiling. The search is constructed, and its included cap-stop alternative |
| 9 | is retained for the positive author's exclusion. Source: C2-C3. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M47 |
| 21 | |
| 22 | /-- The prescribed large-scale tail places the whole search in the |
| 23 | original observation, without a surviving-cylinder premise. -/ |
| 24 | theorem terminalCommonInterval_search_window |
| 25 | {C : MetricSurgeryConstants} (p : SurgeryParameterPrefix C) |
| 26 | {F : SurgeryFlowData.{u}} (O : SurgeryObservation F) {base Q T : ℝ} |
| 27 | (hbase : base ∈ Ico (surgeryEpochStart p.i) O.H) |
| 28 | (hT : 0 ≤ T) (hQ : 64 * (T + 1) ≤ Q) : |
| 29 | Icc (base - T / Q) base ⊆ F.time_domain := by |
| 30 | have hQpos : 0 < Q := by linarith |
| 31 | have hshort : T / Q ≤ 1 / 64 := (div_le_iff₀ hQpos).mpr (by linarith) |
| 32 | have hepoch : 1 / 32 ≤ surgeryEpochStart p.i := |
| 33 | div_le_div_of_nonneg_right (one_le_pow₀ (by norm_num : (1 : ℝ) ≤ 2)) |
| 34 | (by norm_num) |
| 35 | intro s hs |
| 36 | exact O.interval_subset ⟨by linarith [hbase.1, hs.1], hs.2.trans_lt hbase.2⟩ |
| 37 | |
| 38 | private theorem scalar_eq_of_heq {F : SurgeryFlowData.{u}} {s t : ℝ} |
| 39 | {x : (F.slice s).carrier} {y : (F.slice t).carrier} (hst : s = t) (hxy : HEq x y) : |
| 40 | (F.connection s).scalarCurvature x = (F.connection t).scalarCurvature y := by |
| 41 | cases hst |
| 42 | cases hxy |
| 43 | rfl |
| 44 | |
| 45 | /-- Construct the actual whole-source search with its included bounds. |
| 46 | The only unresolved geometric alternative is an actual early cap contact, |
| 47 | including age zero; the constants precede the choice of the source. -/ |
| 48 | theorem terminalCommonInterval_exists_bounded_search |
| 49 | (S : RepairedControlledSchedulesData.{u}) |
| 50 | (B : M47ComponentAnalyticBounds.{u} S.setup.C) |
| 51 | {K : ℝ} (hK : 1 ≤ K) (p : SurgeryParameterPrefix S.constants) |
| 52 | {F : SurgeryFlowData.{u}} (O : SurgeryObservation F) |
| 53 | (hInitial : F.standard_initial = S.setup.standard_initial) |
| 54 | (hConstants : F.local_constants = S.constants) (hC : F.parameters.C = S.setup.C) |
| 55 | {base Q r eta : ℝ} (hBase : base ∈ Ico (surgeryEpochStart p.i) O.H) |
| 56 | (hScale : 64 * (2 * terminalCommonIntervalDuration S B K + 1) ≤ Q) |
| 57 | (hLarge : B.curvature_threshold ≤ Q) (hThreshold : r⁻¹ ^ 2 ≤ Q) |
| 58 | (hPinched : SurgeryFlowPinched F) |
| 59 | (hEarlier : SurgeryCanonicalOn F (surgeryObservationInterval O ∩ Iio base) r) |
| 60 | (hOverlap : ∀ t ∈ surgeryObservationInterval O ∩ |
| 61 | Ico (surgeryEpochStart (p.i - 1)) O.H, |
| 62 | F.parameters.delta t ≤ B.delta S.setup.standard_initial S.constants) |
| 63 | (P : M46Predecessors.{u}) (U : Set (F.slice base).carrier) |
| 64 | (hU : IsOpen U) (hne : U.Nonempty) |
| 65 | (hTerminal : ∀ x ∈ U, (F.connection base).scalarCurvature x ≤ (2 * K) * Q) |
| 66 | (heta : 0 < eta) (hPinchingScale : blowupPinchingThreshold (8 * K) eta ≤ Q) : |
| 67 | ∃ (b : ℝ) (hb : b ∈ Icc (-2 * terminalCommonIntervalDuration S B K) 0), |
| 68 | ∃ e : SurgeryFlowCylinder F (F.slice base) base Q (Icc b 0) U, |
| 69 | (∀ hs x, x ∈ U → HEq (e.forward 0 hs x) x) ∧ |
| 70 | (∀ s (hs : s ∈ Icc b 0), ∀ x ∈ U, |
| 71 | (F.connection (base + s / Q)).scalarCurvature (e.forward s hs x) ≤ (8 * K) * Q ∧ |
| 72 | |(F.connection (base + s / Q)).curvatureTensorNorm (e.forward s hs x)| ≤ |
| 73 | (13 * max (8 * K) 1) * Q ∧ |
| 74 | (F.connection (base + s / Q)).negativeCurvaturePart (e.forward s hs x) ≤ eta * Q) ∧ |
| 75 | (b < -terminalCommonIntervalDuration S B K ∨ |
| 76 | b ∈ Icc (-terminalCommonIntervalDuration S B K) 0 ∧ |
| 77 | ∃ hT : base + b / Q ∈ F.surgery_times, |
| 78 | ∀ [Nonempty (F.slice (base + b / Q)).carrier], |
| 79 | ∃ i : Fin (F.event (base + b / Q) hT).cap_count, |
| 80 | (e.forward b ⟨le_rfl, hb.2⟩ '' U ∩ |
| 81 | ((F.event (base + b / Q) hT).caps i).carrier).Nonempty) := by |
| 82 | have hd := (terminalCommonInterval_duration_bounds S B hK).1 |
| 83 | have hT : 0 ≤ 2 * terminalCommonIntervalDuration S B K := by positivity |
| 84 | have hQ : 0 < Q := by linarith |
| 85 | have hwindow : Icc (base + (-2 * terminalCommonIntervalDuration S B K) / Q) base ⊆ |
| 86 | F.time_domain := by |
| 87 | rw [show base + (-2 * terminalCommonIntervalDuration S B K) / Q = |
| 88 | base - 2 * terminalCommonIntervalDuration S B K / Q by ring] |
| 89 | exact terminalCommonInterval_search_window p O hBase hT hScale |
| 90 | obtain ⟨b, hb, e, hbased, hstop⟩ := exists_normalized_open_region_search F hQ |
| 91 | (by linarith only [hd]) hwindow U hU hne |
| 92 | have hceiling : ∀ x ∈ U, (F.connection (base + 0 / Q)).scalarCurvature |
| 93 | (e.forward 0 ⟨hb.2, le_rfl⟩ x) ≤ (2 * K) * Q := by |
| 94 | intro x hx |
| 95 | rw [scalar_eq_of_heq (by simp) (hbased _ x hx)] |
| 96 | exact hTerminal x hx |
| 97 | refine ⟨b, hb, e, hbased, |
| 98 | terminalCommonInterval_stopped_curvature S B hK p O hInitial hConstants hC |
| 99 | hBase hScale hLarge hThreshold hPinched hEarlier hOverlap P e hb hceiling |
| 100 | heta hPinchingScale, ?_⟩ |
| 101 | by_cases hlong : b < -terminalCommonIntervalDuration S B K |
| 102 | · exact Or.inl hlong |
| 103 | · refine Or.inr ⟨⟨le_of_not_gt hlong, hb.2⟩, hstop.resolve_left ?_⟩ |
| 104 | intro heq |
| 105 | apply hlong |
| 106 | rw [heq] |
| 107 | linarith only [hd] |
| 108 | |
| 109 | end PoincareMT.M47 |