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.Metric |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Generalized.GeneralizedBridgeGeometry |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Source.TerminalSourceNormalTransfer |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Blowup.Controls.BlowupControlsSequence |
| 5 | |
| 6 | /-! |
| 7 | # Compact base balls from actual retained source cylinders |
| 8 | |
| 9 | The earlier cylinder parameter retains the whole outer physical ball. |
| 10 | The original history inverse transfers compact physical closures and |
| 11 | exact calibrated volume to the same generalized slice. |
| 12 | MT Claim 17.9, pp. 405-407; terminal-regular-source-compactness.md, B1-B2. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M47 |
| 24 | |
| 25 | /-- A genuine earlier cylinder parameter supplies a retained physical |
| 26 | buffer, compact generalized ball closure and exact ball volume. The |
| 27 | included terminal slice may be a surgery time; MT Proposition 14.12. -/ |
| 28 | theorem terminalSource_regular_history_ball_buffer |
| 29 | {F : SurgeryFlowData.{u}} {W : M33RegularHistoryWindow F} |
| 30 | (H : M33RegularHistoryData W) {base Q tau R r : ℝ} |
| 31 | (hbase : base ∈ H.generalized.interval) (htau : 0 < tau) |
| 32 | (x : (H.generalized.slice base).carrier) (hr : 0 ≤ r) (hrR : r < R) |
| 33 | (e : SurgeryFlowCylinder F (F.slice base) base Q (Icc (-tau) 0) |
| 34 | ((F.metric base).ball (H.history.forward base hbase x) R)) |
| 35 | (hbased : ∀ hs y, y ∈ (F.metric base).ball (H.history.forward base hbase x) R → |
| 36 | HEq (e.forward 0 hs y) y) : |
| 37 | (F.metric base).ball (H.history.forward base hbase x) R ⊆ |
| 38 | range (H.history.forward base hbase) ∧ |
| 39 | IsCompact (closure ((H.generalized.metric base).ball x r)) ∧ |
| 40 | calibratedMetricVolume (H.generalized.metric base) |
| 41 | ((H.generalized.metric base).ball x r) = |
| 42 | calibratedMetricVolume (F.metric base) |
| 43 | ((F.metric base).ball (H.history.forward base hbase x) r) := by |
| 44 | let h0 : (0 : ℝ) ∈ Icc (-tau) 0 := ⟨neg_nonpos.mpr htau.le, le_rfl⟩ |
| 45 | have hregular := e.regular_image_of_earlier h0 |
| 46 | ⟨-tau, ⟨le_rfl, neg_nonpos.mpr htau.le⟩, neg_lt_zero.mpr htau⟩ |
| 47 | have hball : (F.metric base).ball (H.history.forward base hbase x) R ⊆ |
| 48 | range (H.history.forward base hbase) := by |
| 49 | rw [H.regular_range] |
| 50 | intro y hy |
| 51 | have he : (⟨base + 0 / Q, e.forward 0 h0 y⟩ : Σ t, (F.slice t).carrier) = |
| 52 | ⟨base, y⟩ := Sigma.ext (by simp) (hbased h0 y hy) |
| 53 | exact (congrArg (fun p : Σ t, (F.slice t).carrier => |
| 54 | p.2 ∈ m33RegularRegion F p.1) he).mp (hregular ⟨y, hy, rfl⟩) |
| 55 | let phi := regular_history_slice_chart H base hbase |
| 56 | have hm (y : (H.generalized.slice base).carrier) |
| 57 | (v w : TangentSpace (𝓡 3) y) : |
| 58 | (H.generalized.metric base).inner y v w = (F.metric base).inner (phi y) |
| 59 | (mfderiv (𝓡 3) (𝓡 3) phi y v) (mfderiv (𝓡 3) (𝓡 3) phi y w) := |
| 60 | (H.history.metric_pullback base hbase y v w).symm |
| 61 | let a := (R - r) / 2 |
| 62 | have ha : 0 < a := by dsimp only [a]; linarith |
| 63 | have hcenter : H.history.forward base hbase x ∈ |
| 64 | (F.metric base).ball (H.history.forward base hbase x) a := by |
| 65 | change (F.metric base).edist _ _ < ENNReal.ofReal a |
| 66 | rw [M36.metric_edist_self] |
| 67 | exact ENNReal.ofReal_pos.mpr ha |
| 68 | have hcl : closure ((F.metric base).ball (H.history.forward base hbase x) r) ⊆ |
| 69 | (F.metric base).ball (H.history.forward base hbase x) R := |
| 70 | (F.metric base).closure_ball_subset_ball_of_margin ha.le hr |
| 71 | (by dsimp only [a]; linarith) hcenter |
| 72 | have hcompact := F.slices_compact base (H.history.time_subset hbase) |
| 73 | refine ⟨hball, ?_, ?_⟩ |
| 74 | · exact terminalSourceNormal_compact_ball (H.generalized.metric base) (F.metric base) |
| 75 | phi rfl hm x r (hcompact.of_isClosed_subset isClosed_closure (subset_univ _)) |
| 76 | (hcl.trans hball) |
| 77 | · apply H.ball_volume_of_subset base hbase x r |
| 78 | rw [← H.regular_range base hbase] |
| 79 | intro y hy |
| 80 | exact hball (hy.trans_le (ENNReal.ofReal_le_ofReal hrR.le)) |
| 81 | |
| 82 | variable (F : ℕ → SurgeryFlowData.{u}) (W : ∀ n, M33RegularHistoryWindow (F n)) |
| 83 | (H : ∀ n, M33RegularHistoryData (W n)) (t : ℕ → ℝ) |
| 84 | (ht : ∀ n, t n ∈ (H n).generalized.interval) |
| 85 | (x : ∀ n, ((H n).generalized.slice (t n)).carrier) |
| 86 | (hPositive : ∀ n, 0 < ((F n).connection (t n)).scalarCurvature |
| 87 | ((H n).history.forward (t n) (ht n) (x n))) |
| 88 | (hDiverges : Tendsto (fun n => ((F n).connection (t n)).scalarCurvature |
| 89 | ((H n).history.forward (t n) (ht n) (x n))) atTop atTop) |
| 90 | |
| 91 | local notation "V" => regularHistoryBlowupSequence F W H t ht x hPositive hDiverges |
| 92 | |
| 93 | /-- Cofinal actual retained source balls supply precisely the compact-base- |
| 94 | ball field of the original regular-history blowup sequence. Stage lifetimes |
| 95 | remain independent; MT Claim 17.9. -/ |
| 96 | theorem terminalSource_blowup_base_balls_compact |
| 97 | (A tau : ℕ → ℝ) (htau : ∀ j, 0 < tau j) |
| 98 | (hA : ∀ a : ℝ, 0 < a → ∃ j, a < A j) |
| 99 | (hstage : ∀ j, ∀ᶠ n in atTop, |
| 100 | ∃ e : SurgeryFlowCylinder (F n) ((F n).slice (t n)) (t n) ((V).scale n) |
| 101 | (Icc (-(tau j)) 0) (((F n).metric (t n)).ball |
| 102 | ((H n).history.forward (t n) (ht n) (x n)) (A j / Real.sqrt ((V).scale n))), |
| 103 | ∀ hs y, y ∈ ((F n).metric (t n)).ball |
| 104 | ((H n).history.forward (t n) (ht n) (x n)) (A j / Real.sqrt ((V).scale n)) → |
| 105 | HEq (e.forward 0 hs y) y) : |
| 106 | BlowupBaseBallsCompact V := by |
| 107 | intro a ha |
| 108 | obtain ⟨j, hj⟩ := hA a ha |
| 109 | filter_upwards [hstage j] with n hn |
| 110 | obtain ⟨e, he⟩ := hn |
| 111 | have hroot : 0 < Real.sqrt ((V).scale n) := Real.sqrt_pos.mpr ((V).base_scalar_pos n) |
| 112 | exact (terminalSource_regular_history_ball_buffer (H n) (ht n) (htau j) (x n) |
| 113 | (div_pos ha hroot).le (div_lt_div_of_pos_right hj hroot) e he).2.1 |
| 114 | |
| 115 | end PoincareMT.M47 |