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.Positive.PositiveHistoryComponent |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Positive.PositiveHistoryOrdinary |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Positive.PositiveHistoryOnset |
| 4 | |
| 5 | /-! |
| 6 | # The actual closed positive history after its onset |
| 7 | |
| 8 | The original birth cylinder remains available to its caller. This |
| 9 | construction restricts its unchanged maps and actual ordinary flow to |
| 10 | the included nonnegative onset. Source: Morgan--Tian, pp. 393-394. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M47Positive |
| 22 | |
| 23 | /-- A nonzero-age based whole-component cylinder ending positively has |
| 24 | an actual closed ordinary history from its nonnegative onset, with the |
| 25 | same cylinder maps and literal physical readouts. Earlier included |
| 26 | ancestors are nonpositive; the original birth remains separate. |
| 27 | Morgan--Tian, pp. 393-394. -/ |
| 28 | theorem exists_positive_component_history |
| 29 | (P : M47Predecessors.{u}) {F : SurgeryFlowData.{u}} {origin b : ℝ} |
| 30 | (hb : b < 0) (U : TopologicalSpace.Opens (F.slice origin).carrier) |
| 31 | (hcompact : IsCompact (U : Set (F.slice origin).carrier)) |
| 32 | (hconnected : IsConnected (U : Set (F.slice origin).carrier)) (x0 : U) |
| 33 | (e : SurgeryFlowCylinder F (F.slice origin) origin 1 (Icc b 0) U) |
| 34 | (hbased : ∀ h x, x ∈ U → HEq (e.forward 0 h x) x) |
| 35 | (hpositive : SurgeryPositiveComponentAt F origin x0.val) : |
| 36 | ∃ (a : ℝ) (ha : a ∈ Ico (origin + b) origin), |
| 37 | ∃ G : RicciFlow 3 U (Icc a origin), |
| 38 | ∃ d : SurgeryFlowCylinder F (F.slice origin) origin 1 (Icc (a - origin) 0) U, |
| 39 | (∀ s hs hse x, d.forward s hs x = e.forward s hse x) ∧ |
| 40 | (∀ h x, x ∈ U → HEq (d.forward 0 h x) x) ∧ |
| 41 | (∀ (s : ℝ) (hs : s ∈ Icc (a - origin) 0) (x : U), |
| 42 | (∀ v w : TangentSpace (𝓡 3) x, |
| 43 | (F.metric (origin + s / 1)).inner (d.forward s hs x.val) |
| 44 | (mfderiv (𝓡 3) (𝓡 3) (fun y : U => d.forward s hs y.val) x v) |
| 45 | (mfderiv (𝓡 3) (𝓡 3) (fun y : U => d.forward s hs y.val) x w) = |
| 46 | (G.metric (origin + s / 1)).inner x v w) ∧ |
| 47 | (G.connection (origin + s / 1)).scalarCurvature x = |
| 48 | (F.connection (origin + s / 1)).scalarCurvature (d.forward s hs x.val) ∧ |
| 49 | (G.connection (origin + s / 1)).curvatureTensorNorm x = |
| 50 | (F.connection (origin + s / 1)).curvatureTensorNorm (d.forward s hs x.val)) ∧ |
| 51 | (∀ x : U, ∀ v w : TangentSpace (𝓡 3) x, |
| 52 | 0 ≤ (G.connection a).curvatureTensor x v w v w) ∧ |
| 53 | (∀ t ∈ Ioc a origin, ∀ x : U, ∀ v w : TangentSpace (𝓡 3) x, |
| 54 | LeviCivitaData.IsOrthonormalPair (G.metric t) x v w → |
| 55 | 0 < (G.connection t).sectionalCurvature x v w) ∧ |
| 56 | (∀ s ∈ Ico b (a - origin), ∀ (hse : s ∈ Icc b 0) (x : U), |
| 57 | ¬ SurgeryPositiveComponentAt F (origin + s / 1) (e.forward s hse x.val)) ∧ |
| 58 | (a = origin + b ∨ ∀ x : U, |
| 59 | ¬ SurgeryPositiveComponentAt F (origin + (a - origin) / 1) |
| 60 | (d.forward (a - origin) ⟨le_rfl, sub_nonpos.mpr ha.2.le⟩ x.val)) := by |
| 61 | let : CompactSpace U := isCompact_iff_compactSpace.mp hcompact |
| 62 | obtain ⟨G0, hread⟩ := exists_component_closed_ordinary_history P hb U hconnected.nonempty e |
| 63 | have h0 : 0 ∈ Icc b 0 := ⟨hb.le, le_rfl⟩ |
| 64 | have hphysical : SurgeryPositiveComponentAt F (origin + 0 / 1) (e.forward 0 h0 x0.val) := by |
| 65 | have htransfer (r : ℝ) (hr : r = origin) (y : (F.slice r).carrier) |
| 66 | (hy : HEq y x0.val) : SurgeryPositiveComponentAt F r y := by |
| 67 | cases hr |
| 68 | rw [eq_of_heq hy] |
| 69 | exact hpositive |
| 70 | exact htransfer _ (by simp) _ (hbased h0 x0.val x0.property) |
| 71 | have hterminal := (component_cylinder_positive_iff U e hcompact hconnected 0 h0 |
| 72 | (G0.metric (origin + 0 / 1)) (G0.connection (origin + 0 / 1)) |
| 73 | (fun x v w => ((hread 0 h0 x).1 v w).symm) x0).mpr hphysical |
| 74 | have hterminal' : ∀ x : U, ∀ v w : TangentSpace (𝓡 3) x, |
| 75 | LeviCivitaData.IsOrthonormalPair (G0.metric origin) x v w → |
| 76 | 0 < (G0.connection origin).sectionalCurvature x v w := by |
| 77 | exact (congrArg (fun t => ∀ x : U, ∀ v w : TangentSpace (𝓡 3) x, |
| 78 | LeviCivitaData.IsOrthonormalPair (G0.metric t) x v w → |
| 79 | 0 < (G0.connection t).sectionalCurvature x v w) |
| 80 | (show origin + 0 / 1 = origin by simp)).mp hterminal |
| 81 | obtain ⟨a, ha, hnonnegative, hafter, hbefore, honset⟩ := |
| 82 | exists_positive_history_onset (by linarith : origin + b < origin) G0 hterminal' |
| 83 | have hI : Icc a origin ⊆ Icc (origin + b) origin := Icc_subset_Icc ha.1 le_rfl |
| 84 | let G : RicciFlow 3 U (Icc a origin) := { |
| 85 | metric := G0.metric |
| 86 | connection := G0.connection |
| 87 | interval := ordConnected_Icc |
| 88 | nontrivial := ⟨a, ⟨le_rfl, ha.2.le⟩, origin, ⟨ha.2.le, le_rfl⟩, ha.2.ne⟩ |
| 89 | smooth := G0.smooth.mono (prod_mono hI Subset.rfl) |
| 90 | equation := fun t ht x v w => (G0.equation t (hI ht) x v w).mono hI } |
| 91 | have hparam : Icc (a - origin) 0 ⊆ Icc b 0 := |
| 92 | Icc_subset_Icc (by linarith [ha.1]) le_rfl |
| 93 | let d := e.restrict hparam ordConnected_Icc (Subset.refl (U : Set (F.slice origin).carrier)) |
| 94 | refine ⟨a, ha, G, d, ?_, ?_, ?_, hnonnegative, hafter, ?_, ?_⟩ |
| 95 | · intro s hs hse x |
| 96 | rfl |
| 97 | · intro h x hx |
| 98 | exact hbased (hparam h) x hx |
| 99 | · intro s hs x |
| 100 | exact hread s (hparam hs) x |
| 101 | · intro s hs hse x hpos |
| 102 | have ht : origin + s / 1 ∈ Ico (origin + b) a := by |
| 103 | simp only [div_one] |
| 104 | constructor <;> linarith [hs.1, hs.2] |
| 105 | apply hbefore _ ht |
| 106 | exact (component_cylinder_positive_iff U e hcompact hconnected s hse |
| 107 | (G0.metric (origin + s / 1)) (G0.connection (origin + s / 1)) |
| 108 | (fun y v w => ((hread s hse y).1 v w).symm) x).mpr hpos |
| 109 | · rcases honset with heq | hnot |
| 110 | · exact Or.inl heq |
| 111 | · right |
| 112 | intro x hpos |
| 113 | have hs : a - origin ∈ Icc (a - origin) 0 := ⟨le_rfl, sub_nonpos.mpr ha.2.le⟩ |
| 114 | have hp := (component_cylinder_positive_iff U e hcompact hconnected (a - origin) |
| 115 | (hparam hs) (G0.metric (origin + (a - origin) / 1)) |
| 116 | (G0.connection (origin + (a - origin) / 1)) |
| 117 | (fun y v w => ((hread (a - origin) (hparam hs) y).1 v w).symm) x).mpr hpos |
| 118 | apply hnot |
| 119 | exact (congrArg (fun t => ∀ y : U, ∀ v w : TangentSpace (𝓡 3) y, |
| 120 | LeviCivitaData.IsOrthonormalPair (G0.metric t) y v w → |
| 121 | 0 < (G0.connection t).sectionalCurvature y v w) |
| 122 | (show origin + (a - origin) / 1 = a by simp)).mp hp |
| 123 | |
| 124 | end PoincareMT.M47Positive |