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.Blowup.Controls.BlowupControlsSourceHistory |
| 2 | |
| 3 | /-! |
| 4 | # Included controlled interiors of the actual long search |
| 5 | |
| 6 | Strictly earlier search time supplies regularity at both included endpoints. |
| 7 | Rebasing retains the selected history, actual source map and both metric |
| 8 | slots. The physical ball's preimage is proved using the search's terminal |
| 9 | retention, without assuming a source-image conclusion. Source: 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 | private theorem history_heq_of_forward_heq |
| 23 | {F : SurgeryFlowData.{u}} {W : M33RegularHistoryWindow F} |
| 24 | (H : M33RegularHistoryData W) {s t : ℝ} |
| 25 | (hs : s ∈ H.generalized.interval) (ht : t ∈ H.generalized.interval) |
| 26 | {x : (H.generalized.slice s).carrier} {y : (H.generalized.slice t).carrier} |
| 27 | (hst : s = t) (hxy : HEq (H.history.forward s hs x) (H.history.forward t ht y)) : |
| 28 | HEq x y := by |
| 29 | cases hst |
| 30 | exact heq_of_eq ((H.history.forward_openEmbedding s hs).injective (eq_of_heq hxy)) |
| 31 | |
| 32 | /-- The actual long branch supplies included generalized maps and bounds on |
| 33 | the exact terminal preimage source, retaining both pullback metric slots. -/ |
| 34 | theorem terminalCommonInterval_history_interior |
| 35 | {F : SurgeryFlowData.{u}} {W : M33RegularHistoryWindow F} |
| 36 | (H : M33RegularHistoryData W) {base Q a tau B eta : ℝ} |
| 37 | (hbase : base ∈ H.generalized.interval) (htau : 0 < tau) (ha : a < -tau) |
| 38 | (U : TopologicalSpace.Opens (F.slice base).carrier) (p0 : U) |
| 39 | (e : SurgeryFlowCylinder F (F.slice base) base Q (Icc a 0) U) |
| 40 | (hbased : ∀ hs x, x ∈ U → HEq (e.forward 0 hs x) x) |
| 41 | (hcurv : ∀ s (hs : s ∈ Icc a 0), ∀ x ∈ U, |
| 42 | |(F.connection (base + s / Q)).curvatureTensorNorm (e.forward s hs x)| ≤ B * Q) |
| 43 | (hneg : ∀ s (hs : s ∈ Icc a 0), ∀ x ∈ U, |
| 44 | (F.connection (base + s / Q)).negativeCurvaturePart (e.forward s hs x) ≤ eta * Q) : |
| 45 | ∃ htime : ∀ s ∈ Icc (-tau) 0, base + s / Q ∈ H.generalized.interval, |
| 46 | ∃ d : GeneralizedFlowCylinder H.generalized (H.generalized.slice base) base Q |
| 47 | (Icc (-tau) 0) (H.history.forward base hbase ⁻¹' U), |
| 48 | (∀ hs x, x ∈ H.history.forward base hbase ⁻¹' U → |
| 49 | d.pointMap 0 hs x = (⟨base, x⟩ : H.generalized.point)) ∧ |
| 50 | (∀ s hs x, x ∈ H.history.forward base hbase ⁻¹' U → |
| 51 | H.history.forward (base + s / Q) (htime s hs) (d.forward s hs x) = |
| 52 | e.forward s ⟨ha.le.trans hs.1, hs.2⟩ (H.history.forward base hbase x)) ∧ |
| 53 | (∀ s hs x, x ∈ H.history.forward base hbase ⁻¹' U → |
| 54 | ∀ v w : TangentSpace (𝓡 3) x, |
| 55 | d.pullbackInner s hs x v w = |
| 56 | e.pullbackInner s ⟨ha.le.trans hs.1, hs.2⟩ (H.history.forward base hbase x) |
| 57 | (mfderiv (𝓡 3) (𝓡 3) (H.history.forward base hbase) x v) |
| 58 | (mfderiv (𝓡 3) (𝓡 3) (H.history.forward base hbase) x w)) ∧ |
| 59 | (∀ s hs x, x ∈ H.history.forward base hbase ⁻¹' U → |
| 60 | |H.generalized.curvatureNorm (d.pointMap s hs x)| ≤ B * Q ∧ |
| 61 | (H.generalized.connection (base + s / Q)).negativeCurvaturePart |
| 62 | (d.forward s hs x) ≤ eta * Q) := by |
| 63 | obtain ⟨htime, d, hmap, hmetric, _hidentity⟩ := |
| 64 | exists_regular_history_search_interior H hbase htau ha U p0 e hbased |
| 65 | let d' := regular_history_rebase_cylinder H hbase U d |
| 66 | have hread (s : ℝ) (hs : s ∈ Icc (-tau) 0) |
| 67 | (x : (H.generalized.slice base).carrier) (hx : x ∈ H.history.forward base hbase ⁻¹' U) : |
| 68 | H.history.forward (base + s / Q) (htime s hs) (d'.forward s hs x) = |
| 69 | e.forward s ⟨ha.le.trans hs.1, hs.2⟩ (H.history.forward base hbase x) := |
| 70 | hmap s hs _ hx |
| 71 | refine ⟨htime, d', ?_, hread, ?_, ?_⟩ |
| 72 | · intro hs x hx |
| 73 | apply Sigma.ext (by simp : base + 0 / Q = base) |
| 74 | apply history_heq_of_forward_heq H (htime 0 hs) hbase (by simp) |
| 75 | exact (heq_of_eq (hread 0 hs x hx)).trans (hbased _ _ hx) |
| 76 | · intro s hs x hx v w |
| 77 | exact (regular_history_rebase_pullback H hbase U d U.isOpen s hs x hx v w).trans |
| 78 | (hmetric s hs _ hx _ _) |
| 79 | · intro s hs x hx |
| 80 | have hn := H.curvature_norm_pullback (base + s / Q) (htime s hs) (d'.forward s hs x) |
| 81 | have hnegative := H.negative_part_pullback (base + s / Q) (htime s hs) (d'.forward s hs x) |
| 82 | rw [hread s hs x hx] at hn hnegative |
| 83 | change |(H.generalized.connection (base + s / Q)).curvatureTensorNorm |
| 84 | (d'.forward s hs x)| ≤ B * Q ∧ _ |
| 85 | rw [← hn, ← hnegative] |
| 86 | exact ⟨hcurv _ _ _ hx, hneg _ _ _ hx⟩ |
| 87 | |
| 88 | /-- A long physical ball search proves its exact generalized source ball. |
| 89 | The strict earlier point supplies the previously missing image guard. -/ |
| 90 | theorem terminalCommonInterval_ball_preimage |
| 91 | {F : SurgeryFlowData.{u}} {W : M33RegularHistoryWindow F} |
| 92 | (H : M33RegularHistoryData W) {base Q a radius : ℝ} |
| 93 | (hbase : base ∈ H.generalized.interval) (ha : a < 0) |
| 94 | (x : (H.generalized.slice base).carrier) |
| 95 | (e : SurgeryFlowCylinder F (F.slice base) base Q (Icc a 0) |
| 96 | ((F.metric base).ball (H.history.forward base hbase x) radius)) |
| 97 | (hbased : ∀ hs y, y ∈ (F.metric base).ball (H.history.forward base hbase x) radius → |
| 98 | HEq (e.forward 0 hs y) y) : |
| 99 | H.history.forward base hbase ⁻¹' |
| 100 | (F.metric base).ball (H.history.forward base hbase x) radius = |
| 101 | (H.generalized.metric base).ball x radius := by |
| 102 | let h0 : (0 : ℝ) ∈ Icc a 0 := ⟨ha.le, le_rfl⟩ |
| 103 | have hregular := e.regular_image_of_earlier h0 ⟨a, ⟨le_rfl, ha.le⟩, ha⟩ |
| 104 | have hball : (F.metric base).ball (H.history.forward base hbase x) radius ⊆ |
| 105 | range (H.history.forward base hbase) := by |
| 106 | rw [H.regular_range base hbase] |
| 107 | intro y hy |
| 108 | have he : (⟨base + 0 / Q, e.forward 0 h0 y⟩ : Σ t, (F.slice t).carrier) = |
| 109 | ⟨base, y⟩ := Sigma.ext (by simp) (hbased h0 y hy) |
| 110 | exact (congrArg (fun p : Σ t, (F.slice t).carrier => |
| 111 | p.2 ∈ m33RegularRegion F p.1) he).mp (hregular ⟨y, hy, rfl⟩) |
| 112 | have himage := H.history.ball_image_of_subset base hbase x radius hball |
| 113 | ext y |
| 114 | constructor |
| 115 | · intro hy |
| 116 | obtain ⟨z, hz, hzy⟩ := himage.symm ▸ hy |
| 117 | exact (H.history.forward_openEmbedding base hbase).injective hzy ▸ hz |
| 118 | · intro hy |
| 119 | exact himage ▸ mem_image_of_mem _ hy |
| 120 | |
| 121 | end PoincareMT.M47 |