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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.SourceNames |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Spacetime.StrongNecks.Geometry.StrongNeckHalfFlow |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.IntrinsicGeometry.IntrinsicOpenMetric |
| 5 | |
| 6 | /-! |
| 7 | # Original strong-neck flows in the global normalization |
| 8 | |
| 9 | Rescale the once-chosen neck half flow by `Q * S.scale ^ 2` and restrict |
| 10 | it to a closed backward interval contained in its quarter window. The |
| 11 | terminal metric is the original slice metric scaled by Q, restricted to |
| 12 | the same open neck. Definition 9.78 and Claims 10.10-10.11, Morgan--Tian |
| 13 | pp. 232 and 254-255; M28 derivation 74. |
| 14 | -/ |
| 15 | |
| 16 | noncomputable section |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set |
| 21 | open scoped Manifold ContDiff Bundle Topology |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.M28 |
| 26 | |
| 27 | private def strongNeckHalfInterval : SpacetimeInterval where |
| 28 | domain := Icc (-(1 / 2 : ℝ)) 0 |
| 29 | ordConnected := ordConnected_Icc |
| 30 | nontrivial := ⟨-(1 / 2 : ℝ), by norm_num, 0, by norm_num, by norm_num⟩ |
| 31 | |
| 32 | variable {F : GeneralizedRicciFlowData.{u}} {t epsilon : ℝ} |
| 33 | (S : GeneralizedStrongNeck F t epsilon) |
| 34 | (H : RescaledRawCylinderData (C := F.slice t) |
| 35 | (U := strongNeckOpen S) (J := strongNeckBackwardInterval) |
| 36 | (strongNeckCylinder S) (GeneralizedStrongNeck.physical_interval_subset S)) |
| 37 | (Q : ℝ) (hQ : 0 < Q) |
| 38 | |
| 39 | include hQ |
| 40 | |
| 41 | /-- A positive global normalization gives a positive secondary factor |
| 42 | (Definition 9.78, p. 232; derivation 74). -/ |
| 43 | theorem GeneralizedStrongNeck.global_scale_pos : 0 < Q * S.scale ^ 2 := |
| 44 | mul_pos hQ (sq_pos_of_pos S.scale_pos) |
| 45 | |
| 46 | /-- Select the M13 rescaling of the supplied half flow once, keeping the |
| 47 | original open neck carrier (Claims 10.10-10.11, pp. 254-255). -/ |
| 48 | def GeneralizedStrongNeck.global_rescaling : |
| 49 | OrdinaryParabolicRescaling (I := strongNeckHalfInterval) |
| 50 | (GeneralizedStrongNeck.rescaled_half_flow S H) (Q * S.scale ^ 2) |
| 51 | (GeneralizedStrongNeck.global_scale_pos S Q hQ) 0 := |
| 52 | Classical.choice (M13.ordinaryParabolicRescaling strongNeckHalfInterval |
| 53 | (GeneralizedStrongNeck.rescaled_half_flow S H) (Q * S.scale ^ 2) |
| 54 | (GeneralizedStrongNeck.global_scale_pos S Q hQ) 0) |
| 55 | |
| 56 | /-- The common closed global window lies in the original normalized |
| 57 | quarter window, with both endpoints included (derivation 74). -/ |
| 58 | theorem GeneralizedStrongNeck.global_time_mem_quarter {tau s : ℝ} |
| 59 | (hwindow : tau ≤ Q * S.scale ^ 2 / 4) (hs : s ∈ Icc (-tau) 0) : |
| 60 | s / (Q * S.scale ^ 2) ∈ Icc (-(1 / 4 : ℝ)) 0 := by |
| 61 | have ha := GeneralizedStrongNeck.global_scale_pos S Q hQ |
| 62 | constructor |
| 63 | · apply (le_div_iff₀ ha).2 |
| 64 | linarith [hs.1] |
| 65 | · exact div_nonpos_of_nonpos_of_nonneg hs.2 ha.le |
| 66 | |
| 67 | /-- A genuine Ricci flow on the common closed backward window, produced |
| 68 | from the supplied original neck (Claims 10.10-10.11, pp. 254-255). -/ |
| 69 | def GeneralizedStrongNeck.global_flow (tau : ℝ) (htau : 0 < tau) |
| 70 | (hwindow : tau ≤ Q * S.scale ^ 2 / 4) : |
| 71 | RicciFlow 3 (strongNeckOpen S) (Icc (-tau) 0) := by |
| 72 | let R := GeneralizedStrongNeck.global_rescaling S H Q hQ |
| 73 | have hsub : Icc (-tau) 0 ⊆ |
| 74 | (parabolicInterval (Q * S.scale ^ 2) |
| 75 | (GeneralizedStrongNeck.global_scale_pos S Q hQ) 0 |
| 76 | strongNeckHalfInterval).domain := by |
| 77 | intro s hs |
| 78 | apply (mem_parabolicInterval_iff _ _ _ _ _).2 |
| 79 | have hquarter := GeneralizedStrongNeck.global_time_mem_quarter S Q hQ hwindow hs |
| 80 | change (0 + s / (Q * S.scale ^ 2)) ∈ Icc (-(1 / 2 : ℝ)) 0 |
| 81 | exact ⟨by linarith [hquarter.1], by simpa using hquarter.2⟩ |
| 82 | exact Poincare.Geometry.RicciFlow.Harnack.restrictFlow R.flow |
| 83 | hsub ordConnected_Icc |
| 84 | ⟨-tau, ⟨le_rfl, neg_nonpos.mpr htau.le⟩, |
| 85 | 0, ⟨neg_nonpos.mpr htau.le, le_rfl⟩, ne_of_lt (neg_lt_zero.mpr htau)⟩ |
| 86 | |
| 87 | /-- All total metric representatives retain the exact M13 scaling formula; |
| 88 | only the declared interval carries the Ricci equation (derivation 74). -/ |
| 89 | theorem GeneralizedStrongNeck.global_flow_metric (tau : ℝ) (htau : 0 < tau) |
| 90 | (hwindow : tau ≤ Q * S.scale ^ 2 / 4) (s : ℝ) |
| 91 | (x : strongNeckOpen S) (v w : TangentSpace (𝓡 3) x) : |
| 92 | ((GeneralizedStrongNeck.global_flow S H Q hQ tau htau hwindow).metric s).inner |
| 93 | x v w = |
| 94 | (Q * S.scale ^ 2) * |
| 95 | ((GeneralizedStrongNeck.rescaled_half_flow S H).metric |
| 96 | (s / (Q * S.scale ^ 2))).inner x v w := by |
| 97 | change ((GeneralizedStrongNeck.global_rescaling S H Q hQ).flow.metric s).inner |
| 98 | x v w = _ |
| 99 | simpa only [parabolicTimeInv, zero_add] using |
| 100 | (GeneralizedStrongNeck.global_rescaling S H Q hQ).metric_eq s x v w |
| 101 | |
| 102 | /-- Interval restriction keeps the same selected connection at every real |
| 103 | time, for curvature transport through M13 (derivation 74). -/ |
| 104 | @[simp] theorem GeneralizedStrongNeck.global_flow_connection |
| 105 | (tau : ℝ) (htau : 0 < tau) (hwindow : tau ≤ Q * S.scale ^ 2 / 4) (s : ℝ) : |
| 106 | (GeneralizedStrongNeck.global_flow S H Q hQ tau htau hwindow).connection s = |
| 107 | (GeneralizedStrongNeck.global_rescaling S H Q hQ).flow.connection s := rfl |
| 108 | |
| 109 | /-- The terminal bilinear metric is the global Q scaling of the original |
| 110 | slice, pulled back by the actual open inclusion (derivation 74). -/ |
| 111 | theorem GeneralizedStrongNeck.global_flow_metric_at_zero |
| 112 | (tau : ℝ) (htau : 0 < tau) (hwindow : tau ≤ Q * S.scale ^ 2 / 4) |
| 113 | (x : strongNeckOpen S) (v w : TangentSpace (𝓡 3) x) : |
| 114 | ((GeneralizedStrongNeck.global_flow S H Q hQ tau htau hwindow).metric 0).inner |
| 115 | x v w = |
| 116 | Q * (F.metric t).inner x.val |
| 117 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : strongNeckOpen S → (F.slice t).carrier) |
| 118 | x v) |
| 119 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : strongNeckOpen S → (F.slice t).carrier) |
| 120 | x w) := by |
| 121 | rw [GeneralizedStrongNeck.global_flow_metric, zero_div, |
| 122 | GeneralizedStrongNeck.rescaled_half_flow_metric, |
| 123 | GeneralizedStrongNeck.rescaled_metric_at_zero] |
| 124 | field_simp [S.scale_pos.ne'] |
| 125 | |
| 126 | /-- Equality of the actual terminal metrics, without any assertion about |
| 127 | ambient versus intrinsic distances (Claims 10.10-10.11; derivation 74). -/ |
| 128 | theorem GeneralizedStrongNeck.global_flow_metric_eq_restriction |
| 129 | (tau : ℝ) (htau : 0 < tau) (hwindow : tau ≤ Q * S.scale ^ 2 / 4) : |
| 130 | (GeneralizedStrongNeck.global_flow S H Q hQ tau htau hwindow).metric 0 = |
| 131 | intrinsicOpenMetric (M13.scaleSmoothMetric (F.metric t) Q hQ) (strongNeckOpen S) := by |
| 132 | have hinner : ∀ (x : strongNeckOpen S) (v w : TangentSpace (𝓡 3) x), |
| 133 | ((GeneralizedStrongNeck.global_flow S H Q hQ tau htau hwindow).metric 0).inner |
| 134 | x v w = |
| 135 | (intrinsicOpenMetric (M13.scaleSmoothMetric (F.metric t) Q hQ) |
| 136 | (strongNeckOpen S)).inner x v w := by |
| 137 | intro x v w |
| 138 | rw [intrinsicOpenMetric_inner, M13.scaleSmoothMetric_inner] |
| 139 | exact GeneralizedStrongNeck.global_flow_metric_at_zero S H Q hQ tau htau hwindow x v w |
| 140 | cases h₁ : (GeneralizedStrongNeck.global_flow S H Q hQ tau htau hwindow).metric 0 |
| 141 | cases h₂ : intrinsicOpenMetric (M13.scaleSmoothMetric (F.metric t) Q hQ) (strongNeckOpen S) |
| 142 | rw [h₁, h₂] at hinner |
| 143 | simp only [Bundle.ContMDiffRiemannianMetric.mk.injEq] |
| 144 | funext x |
| 145 | exact ContinuousLinearMap.ext (fun v => ContinuousLinearMap.ext (hinner x v)) |
| 146 | |
| 147 | /-- The physical affine clock is exactly the original time plus sigma/Q; |
| 148 | no normalized-time pinching assertion is used (derivation 74). -/ |
| 149 | theorem GeneralizedStrongNeck.global_physical_time (s : ℝ) : |
| 150 | t + (s / (Q * S.scale ^ 2)) / (S.scale⁻¹ ^ 2) = t + s / Q := by |
| 151 | field_simp [hQ.ne', S.scale_pos.ne'] |
| 152 | |
| 153 | /-- Every time in the new closed window is a genuine original-flow time |
| 154 | supplied by the original neck cylinder (Definition 9.78, p. 232). -/ |
| 155 | theorem GeneralizedStrongNeck.global_physical_time_mem {tau s : ℝ} |
| 156 | (hwindow : tau ≤ Q * S.scale ^ 2 / 4) (hs : s ∈ Icc (-tau) 0) : |
| 157 | t + s / Q ∈ F.interval := by |
| 158 | have hquarter := GeneralizedStrongNeck.global_time_mem_quarter S Q hQ hwindow hs |
| 159 | have hsource : s / (Q * S.scale ^ 2) ∈ Ioc (-1 : ℝ) 0 := |
| 160 | ⟨by linarith [hquarter.1], hquarter.2⟩ |
| 161 | rw [← GeneralizedStrongNeck.global_physical_time S Q hQ s] |
| 162 | exact S.backward_time_mem hsource |
| 163 | |
| 164 | end PoincareMT.M28 |