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.CanonicalInduction.Positive.PositiveHistoryOrdinary |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Seed.Cylinder.SeedCylinderClock |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Spacetime.GeneralizedCylinderMetric |
| 5 | import PoincareLib.Geometry.Riemannian.Homothety.Curvature.ContractionTransport |
| 6 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Curvature.LocalHomothetyCurvature |
| 7 | |
| 8 | /-! |
| 9 | # Actual closed normalized source cylinders |
| 10 | |
| 11 | MT Definitions 3.34-3.40, pp. 59-61, and Lemma 17.2, pp. 397-398. |
| 12 | The given included cylinder supplies an ordinary flow on its unchanged |
| 13 | open source. Exact parabolic rescaling retains both endpoints and the |
| 14 | literal metric, scalar and full-curvature readouts. Cylinder survival, |
| 15 | terminal normal charts and raw curvature estimates remain upstream. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | set_option backward.isDefEq.respectTransparency false |
| 20 | |
| 21 | open Set |
| 22 | open scoped Manifold ContDiff Bundle Topology |
| 23 | |
| 24 | universe u |
| 25 | |
| 26 | namespace PoincareMT.M47 |
| 27 | |
| 28 | private theorem exists_closed_normalization |
| 29 | (P : GeneralizedParabolicRescalingTheory.{u} 3) |
| 30 | {M : Type u} [TopologicalSpace M] |
| 31 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 32 | [T2Space M] [SecondCountableTopology M] |
| 33 | {I : SpacetimeInterval} (G : RicciFlow 3 M I.domain) |
| 34 | {b Q τ : ℝ} (hτ : 0 < τ) (hQ : 0 < Q) |
| 35 | (hI : I.domain = Icc (b - τ / Q) b) : |
| 36 | ∃ F : RicciFlow 3 M (Icc (-τ) 0), |
| 37 | ∀ (s : ℝ), s ∈ Icc (-τ) 0 → ∀ x : M, |
| 38 | (∀ v w : TangentSpace (𝓡 3) x, |
| 39 | (F.metric s).inner x v w = Q * (G.metric (b + s / Q)).inner x v w) ∧ |
| 40 | (F.connection s).scalarCurvature x = |
| 41 | (G.connection (b + s / Q)).scalarCurvature x / Q ∧ |
| 42 | (F.connection s).curvatureTensorNorm x = |
| 43 | (G.connection (b + s / Q)).curvatureTensorNorm x / Q := by |
| 44 | obtain ⟨R⟩ := P.ordinary_flow M I G Q hQ b |
| 45 | have hdomain : (parabolicInterval Q hQ b I).domain = Icc (-τ) 0 := by |
| 46 | change (parabolicTimeOrderIso Q hQ b) '' I.domain = _ |
| 47 | rw [hI, OrderIso.image_Icc] |
| 48 | have hleft : parabolicTime Q b (b - τ / Q) = -τ := by |
| 49 | dsimp only [parabolicTime] |
| 50 | field_simp |
| 51 | ring |
| 52 | simp only [parabolicTimeOrderIso_apply] |
| 53 | rw [hleft] |
| 54 | simp only [parabolicTime, sub_self, mul_zero] |
| 55 | have hsub : Icc (-τ) 0 ⊆ (parabolicInterval Q hQ b I).domain := by |
| 56 | rw [hdomain] |
| 57 | let F : RicciFlow 3 M (Icc (-τ) 0) := { |
| 58 | metric := R.flow.metric |
| 59 | connection := R.flow.connection |
| 60 | interval := ordConnected_Icc |
| 61 | nontrivial := ⟨-τ, ⟨le_rfl, by linarith⟩, 0, ⟨by linarith, le_rfl⟩, by linarith⟩ |
| 62 | smooth := R.flow.smooth.mono (prod_mono hsub Subset.rfl) |
| 63 | equation := fun t ht x v w => (R.flow.equation t (hsub ht) x v w).mono hsub } |
| 64 | refine ⟨F, ?_⟩ |
| 65 | intro s _hs x |
| 66 | refine ⟨R.metric_eq s x, ?_, ?_⟩ |
| 67 | · simpa only [parabolicTimeInv, Diffeomorph.coe_refl, id_eq] using |
| 68 | M13.homothety_scalarCurvature_eq _ _ (Diffeomorph.refl (𝓡 3) M ∞) |
| 69 | Q hQ (R.metric_homothety s) (G.connection _) (R.flow.connection s) x |
| 70 | · simpa only [parabolicTimeInv, Diffeomorph.coe_refl, id_eq] using |
| 71 | M13.homothety_curvatureTensorNorm_eq _ _ (Diffeomorph.refl (𝓡 3) M ∞) |
| 72 | Q hQ (R.metric_homothety s) (G.connection _) (R.flow.connection s) x |
| 73 | |
| 74 | /-- An actual included surgery cylinder has its literal normalized ordinary |
| 75 | flow on the same Type-u open source, including both endpoints; MT pp. 397-398. -/ |
| 76 | theorem terminalSourceRealization_surgery |
| 77 | (P : M47Predecessors.{u}) {S : SurgeryFlowData.{u}} |
| 78 | {C : GeneralizedSliceCarrier.{u}} {b Q τ : ℝ} (hτ : 0 < τ) |
| 79 | (U : TopologicalSpace.Opens C.carrier) (hne : (U : Set C.carrier).Nonempty) |
| 80 | (e : SurgeryFlowCylinder S C b Q (Icc (-τ) 0) U) : |
| 81 | ∃ F : RicciFlow 3 U (Icc (-τ) 0), |
| 82 | ∀ (s : ℝ) (hs : s ∈ Icc (-τ) 0) (x : U), |
| 83 | (∀ v w : TangentSpace (𝓡 3) x, |
| 84 | (F.metric s).inner x v w = e.pullbackInner s hs x.val |
| 85 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U → C.carrier) x v) |
| 86 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U → C.carrier) x w)) ∧ |
| 87 | (F.connection s).scalarCurvature x = |
| 88 | (S.connection (b + s / Q)).scalarCurvature (e.forward s hs x.val) / Q ∧ |
| 89 | (F.connection s).curvatureTensorNorm x = |
| 90 | (S.connection (b + s / Q)).curvatureTensorNorm (e.forward s hs x.val) / Q := by |
| 91 | have ha : -τ / Q < 0 := div_neg_of_neg_of_pos (neg_neg_of_pos hτ) e.scale_pos |
| 92 | have hmem : MapsTo (fun r : ℝ => Q * r) (Icc (-τ / Q) 0) (Icc (-τ) 0) := by |
| 93 | intro r hr |
| 94 | exact ⟨by simpa only [mul_comm] using (div_le_iff₀ e.scale_pos).mp hr.1, |
| 95 | mul_nonpos_of_nonneg_of_nonpos e.scale_pos.le hr.2⟩ |
| 96 | have hmono : StrictMonoOn (fun r : ℝ => Q * r) (Icc (-τ / Q) 0) := |
| 97 | fun _ _ _ _ hrs => mul_lt_mul_of_pos_left hrs e.scale_pos |
| 98 | have hclock : ∀ r ∈ Icc (-τ / Q) 0, b + r / 1 = b + (Q * r) / Q := by |
| 99 | intro r _hr |
| 100 | simp only [div_one, mul_div_cancel_left₀ r e.scale_pos.ne'] |
| 101 | let E := Proofs.M47.seedCylinderReclock e (by norm_num : (0 : ℝ) < 1) |
| 102 | ordConnected_Icc (fun r : ℝ => Q * r) hmem hmono hclock |
| 103 | obtain ⟨G, hG⟩ := M47Positive.exists_component_closed_ordinary_history P ha U hne E |
| 104 | let I : SpacetimeInterval := { |
| 105 | domain := Icc (b + (-τ / Q)) b |
| 106 | ordConnected := G.interval |
| 107 | nontrivial := G.nontrivial } |
| 108 | have hI : I.domain = Icc (b - τ / Q) b := by |
| 109 | simp only [I, neg_div, sub_eq_add_neg] |
| 110 | obtain ⟨F, hF⟩ := exists_closed_normalization P.m13 (I := I) G hτ e.scale_pos hI |
| 111 | refine ⟨F, ?_⟩ |
| 112 | intro s hs x |
| 113 | have hu : s / Q ∈ Icc (-τ / Q) 0 := |
| 114 | ⟨div_le_div_of_nonneg_right hs.1 e.scale_pos.le, |
| 115 | div_nonpos_of_nonpos_of_nonneg hs.2 e.scale_pos.le⟩ |
| 116 | have hparam : Q * (s / Q) = s := by |
| 117 | rw [← mul_div_assoc, mul_div_cancel_left₀ s e.scale_pos.ne'] |
| 118 | have htime : b + (s / Q) / 1 = b + s / Q := by simp only [div_one] |
| 119 | have hfunctions : |
| 120 | (⟨b + (s / Q) / 1, fun y : U => E.forward (s / Q) hu y.val⟩ : |
| 121 | (t : ℝ) × (U → (S.slice t).carrier)) = |
| 122 | ⟨b + s / Q, fun y : U => e.forward s hs y.val⟩ := by |
| 123 | apply Sigma.ext htime |
| 124 | apply Function.hfunext rfl |
| 125 | intro y y' hyy |
| 126 | cases hyy |
| 127 | have hf := Proofs.M47.seedCylinderReclock_forward_heq e |
| 128 | (by norm_num : (0 : ℝ) < 1) ordConnected_Icc |
| 129 | (fun r : ℝ => Q * r) hmem hmono hclock (s / Q) hu y.val |
| 130 | have heq : ∀ r (hr : r ∈ Icc (-τ) 0), r = s → |
| 131 | HEq (e.forward r hr y.val) (e.forward s hs y.val) := by |
| 132 | intro r hr hrs |
| 133 | subst r |
| 134 | rfl |
| 135 | exact hf.trans (heq _ _ hparam) |
| 136 | refine ⟨?_, ?_, ?_⟩ |
| 137 | · intro v w |
| 138 | have hm := congrArg (fun p : (t : ℝ) × (U → (S.slice t).carrier) => |
| 139 | (S.metric p.1).inner (p.2 x) |
| 140 | (mfderiv (𝓡 3) (𝓡 3) p.2 x v) (mfderiv (𝓡 3) (𝓡 3) p.2 x w)) hfunctions |
| 141 | have hphysical := ((hG (s / Q) hu x).1 v w).symm.trans hm |
| 142 | simp only [div_one] at hphysical |
| 143 | rw [(hF s hs x).1 v w, hphysical] |
| 144 | have hf := (e.forward_smooth s hs x.val x.property).contMDiffAt |
| 145 | (U.isOpen.mem_nhds x.property) |
| 146 | have hd := mfderiv_comp x (hf.mdifferentiableAt (by simp)) |
| 147 | (contMDiff_subtype_val (n := ∞) x |>.mdifferentiableAt (by simp)) |
| 148 | change mfderiv (𝓡 3) (𝓡 3) (fun y : U => e.forward s hs y.val) x = _ at hd |
| 149 | rw [hd] |
| 150 | rfl |
| 151 | · have hr := congrArg (fun p : (t : ℝ) × (U → (S.slice t).carrier) => |
| 152 | (S.connection p.1).scalarCurvature (p.2 x)) hfunctions |
| 153 | have hphysical := (hG (s / Q) hu x).2.1.trans hr |
| 154 | have hread := (congrArg (fun t => (G.connection t).scalarCurvature x) htime).symm.trans |
| 155 | hphysical |
| 156 | exact ((hF s hs x).2.1).trans (congrArg (fun z : ℝ => z / Q) hread) |
| 157 | · have hr := congrArg (fun p : (t : ℝ) × (U → (S.slice t).carrier) => |
| 158 | (S.connection p.1).curvatureTensorNorm (p.2 x)) hfunctions |
| 159 | have hphysical := (hG (s / Q) hu x).2.2.trans hr |
| 160 | have hread := (congrArg (fun t => (G.connection t).curvatureTensorNorm x) htime).symm.trans |
| 161 | hphysical |
| 162 | exact ((hF s hs x).2.2).trans (congrArg (fun z : ℝ => z / Q) hread) |
| 163 | |
| 164 | /-- The verified M12 cylinder gauge and exact M13 rescaling realize the |
| 165 | given generalized cylinder on its unchanged open source; MT pp. 59-61. -/ |
| 166 | theorem terminalSourceRealization_generalized |
| 167 | (P : M47Predecessors.{u}) {G : GeneralizedRicciFlowData.{u}} |
| 168 | {C : GeneralizedSliceCarrier.{u}} {b Q τ : ℝ} (hτ : 0 < τ) |
| 169 | (U : TopologicalSpace.Opens C.carrier) (hne : (U : Set C.carrier).Nonempty) |
| 170 | (e : GeneralizedFlowCylinder G C b Q (Icc (-τ) 0) U) : |
| 171 | ∃ F : RicciFlow 3 U (Icc (-τ) 0), |
| 172 | ∀ (s : ℝ) (hs : s ∈ Icc (-τ) 0) (x : U), |
| 173 | (∀ v w : TangentSpace (𝓡 3) x, |
| 174 | (F.metric s).inner x v w = e.pullbackInner s hs x.val |
| 175 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U → C.carrier) x v) |
| 176 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U → C.carrier) x w)) ∧ |
| 177 | (F.connection s).scalarCurvature x = |
| 178 | (G.connection (b + s / Q)).scalarCurvature (e.forward s hs x.val) / Q ∧ |
| 179 | (F.connection s).curvatureTensorNorm x = |
| 180 | (G.connection (b + s / Q)).curvatureTensorNorm (e.forward s hs x.val) / Q := by |
| 181 | have htime (s : ℝ) (hs : s ∈ Icc (-τ) 0) : b + s / Q ∈ G.interval := |
| 182 | (G.slice_nonempty_iff _).mp ⟨e.forward s hs hne.choose⟩ |
| 183 | let J : SpacetimeInterval := { |
| 184 | domain := Icc (-τ) 0 |
| 185 | ordConnected := ordConnected_Icc |
| 186 | nontrivial := ⟨-τ, ⟨le_rfl, by linarith⟩, 0, ⟨by linarith, le_rfl⟩, by linarith⟩ } |
| 187 | let I := Proofs.M12.cylinderPhysicalInterval b Q e.scale_pos J |
| 188 | have hI : I.domain ⊆ G.interval := by |
| 189 | rintro _ ⟨s, hs, rfl⟩ |
| 190 | exact htime s hs |
| 191 | obtain ⟨geometry⟩ := Proofs.M12.flowBoxRicciGeometry G P.m11 P.m12 |
| 192 | let R := geometry.realization |
| 193 | let metric := Proofs.M12.rawCylinderMetric R e hI |
| 194 | let gauges := P.m12.gauges G.point Sigma.fst (Proofs.M12.flowInterval G) |
| 195 | R.spacetime R.slices R.timeIntervals R.gaugeCover geometry.leafwise |
| 196 | obtain ⟨ordinary⟩ := gauges.compatible_ordinary U I |
| 197 | (Proofs.M12.rawCylinderTransport R e hI) metric (fun p _hp => geometry.equation p) |
| 198 | have hdomain : I.domain = Icc (b - τ / Q) b := by |
| 199 | change (parabolicTimeOrderIso Q e.scale_pos b).symm '' Icc (-τ) 0 = _ |
| 200 | rw [OrderIso.image_Icc] |
| 201 | simp only [parabolicTimeOrderIso_symm_apply, parabolicTimeInv, zero_div, |
| 202 | add_zero, neg_div, sub_eq_add_neg] |
| 203 | obtain ⟨F, hF⟩ := exists_closed_normalization P.m13 ordinary.flow hτ e.scale_pos hdomain |
| 204 | have hm (s : ℝ) (hs : s ∈ Icc (-τ) 0) (x : U) (v w : TangentSpace (𝓡 3) x) : |
| 205 | (F.metric s).inner x v w = e.pullbackInner s hs x.val |
| 206 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U → C.carrier) x v) |
| 207 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U → C.carrier) x w) := by |
| 208 | have hraw := Proofs.M12.rawCylinderMetric_eq R e hI metric ⟨s, hs⟩ |
| 209 | (geometry.sliceIdentification (b + s / Q)) x v w |
| 210 | rw [(hF s hs x).1 v w, ordinary.metric_eq, hraw] |
| 211 | rw [← mul_div_assoc, mul_div_cancel_left₀ _ e.scale_pos.ne'] |
| 212 | refine ⟨F, ?_⟩ |
| 213 | intro s hs x |
| 214 | have hf : ContMDiff (𝓡 3) (𝓡 3) ∞ (fun y : U => e.forward s hs y.val) := by |
| 215 | intro y |
| 216 | exact ((e.forward_smooth s hs y.val y.property).contMDiffAt |
| 217 | (U.isOpen.mem_nhds y.property)).comp y (contMDiff_subtype_val (n := ∞) y) |
| 218 | have hlink (y : U) (v w : TangentSpace (𝓡 3) y) : |
| 219 | (F.metric s).inner y v w = Q * (G.metric (b + s / Q)).inner |
| 220 | (e.forward s hs y.val) |
| 221 | (mfderiv (𝓡 3) (𝓡 3) (fun z : U => e.forward s hs z.val) y v) |
| 222 | (mfderiv (𝓡 3) (𝓡 3) (fun z : U => e.forward s hs z.val) y w) := by |
| 223 | rw [hm s hs y v w] |
| 224 | have hforward := (e.forward_smooth s hs y.val y.property).contMDiffAt |
| 225 | (U.isOpen.mem_nhds y.property) |
| 226 | have hd := mfderiv_comp y (hforward.mdifferentiableAt (by simp)) |
| 227 | (contMDiff_subtype_val (n := ∞) y |>.mdifferentiableAt (by simp)) |
| 228 | change mfderiv (𝓡 3) (𝓡 3) (fun z : U => e.forward s hs z.val) y = _ at hd |
| 229 | rw [hd] |
| 230 | rfl |
| 231 | refine ⟨hm s hs x, ?_, ?_⟩ |
| 232 | · exact (F.connection s).scalarCurvature_eq_of_local_homothety |
| 233 | (G.connection (b + s / Q)) e.scale_pos isOpen_univ hf.contMDiffOn |
| 234 | (fun y _hy v w => hlink y v w) (mem_univ x) |
| 235 | · exact (F.connection s).curvatureTensorNorm_eq_of_local_homothety |
| 236 | (G.connection (b + s / Q)) e.scale_pos isOpen_univ hf.contMDiffOn |
| 237 | (fun y _hy v w => hlink y v w) (mem_univ x) |
| 238 | |
| 239 | end PoincareMT.M47 |