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.Induction.Noncollapse.Compat.ParabolicRescaling |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.SourceNames.ParabolicRescaling |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.SourceNames.Homothety |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Compat.MetricSurgery |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Scalar.Round.RoundActualScalar |
| 6 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Scalar.Round.RoundFourJets |
| 7 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Schedules.Models.NeckBounds |
| 8 | import PoincareLib.Geometry.RicciFlow.Surgery.Metric.Curvature.Conformal.CurvatureTrace |
| 9 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Assembly.PositiveComponents.PositiveLocalIsometry |
| 10 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Assembly.RegularRegion |
| 11 | |
| 12 | /-! |
| 13 | # Positive canonical components in Proposition 16.3 |
| 14 | |
| 15 | Morgan--Tian Definition 9.76, p. 231, and Remark 16.2, p. 368. |
| 16 | The round metric-error estimate gives a sectional lower bound on every |
| 17 | actual tangent plane. Thus both compact-component alternatives are |
| 18 | excluded by the literal positive-component guard of the noncollapse test. |
| 19 | -/ |
| 20 | |
| 21 | set_option autoImplicit false |
| 22 | -- The comparison charts and rescaled metrics use the native tangent instance. |
| 23 | set_option backward.isDefEq.respectTransparency false |
| 24 | |
| 25 | open Set Filter |
| 26 | open scoped Manifold ContDiff Topology |
| 27 | |
| 28 | universe u |
| 29 | |
| 30 | namespace PoincareMT.Proofs.M46 |
| 31 | |
| 32 | open M44 |
| 33 | |
| 34 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 35 | |
| 36 | /-- The plane estimate already used inside M44's scalar lower bound, |
| 37 | retained before taking the scalar trace. -/ |
| 38 | theorem round_metric_error_sectional_half {g h : RiemannianMetric 3 E} |
| 39 | (D : LeviCivitaData g) (D' : LeviCivitaData h) (x : E) {epsilon : ℝ} |
| 40 | (hepsilon : 0 ≤ epsilon) (hsmall : epsilon ≤ 1 / 200) |
| 41 | (hcurv : D.curvatureTensorNorm x ≤ 9) |
| 42 | (hgram : ∀ u v : E, D.curvatureTensor x u v u v = |
| 43 | g.inner x u u * g.inner x v v - g.inner x u v ^ 2) |
| 44 | (herror : ∀ j ≤ 2, |
| 45 | g.tensorNorm (D.iteratedCovariantTensorDerivative (metricError g h) j) x ≤ epsilon) |
| 46 | (u v : E) (huv : LeviCivitaData.IsOrthonormalPair h x u v) : |
| 47 | (1 / 2 : ℝ) ≤ D'.sectionalCurvature x u v := by |
| 48 | have hmetric (u v : E) : |h.inner x u v - g.inner x u v| ≤ |
| 49 | epsilon * (g.tangentNorm x u * g.tangentNorm x v) := by |
| 50 | simpa! only [Nat.add_zero, LeviCivitaData.iteratedCovariantTensorDerivative, metricError, |
| 51 | Fin.prod_univ_two, Matrix.cons_val_zero, Matrix.cons_val_one] using |
| 52 | metricError_jet_evaluation_le D 0 x (herror 0 (by omega)) ![u, v] |
| 53 | have hquad (v : E) : g.tangentNorm x v ^ 2 = g.inner x v v := by |
| 54 | apply Real.sq_sqrt |
| 55 | by_cases hv : v = 0 |
| 56 | · simp [hv] |
| 57 | · exact (g.pos x v hv).le |
| 58 | have hplane (u v : E) : |D'.curvatureTensor x u v u v - |
| 59 | (g.inner x u u * g.inner x v v - g.inner x u v ^ 2)| ≤ |
| 60 | 13 * epsilon * (g.inner x u u * g.inner x v v) := by |
| 61 | have hh := abs_curvatureTensor_difference_le D D' x hepsilon |
| 62 | (show epsilon ≤ 1 / 4 by linarith) hcurv herror u v u v |
| 63 | rw [hgram] at hh |
| 64 | have hp : g.tangentNorm x u * g.tangentNorm x v * |
| 65 | g.tangentNorm x u * g.tangentNorm x v = g.inner x u u * g.inner x v v := by |
| 66 | rw [← hquad, ← hquad] |
| 67 | ring |
| 68 | rw [hp] at hh |
| 69 | have hcoeff : (9 + 3 : ℝ) * epsilon + 10 * epsilon ^ 2 ≤ 13 * epsilon := by |
| 70 | nlinarith |
| 71 | exact hh.trans (mul_le_mul_of_nonneg_right hcoeff (by |
| 72 | rw [← hquad, ← hquad] |
| 73 | positivity)) |
| 74 | exact sectional_half_le_of_round_plane_error D' x hepsilon hsmall hmetric hplane u v huv |
| 75 | |
| 76 | /-- Strict sectional positivity survives undoing a positive constant |
| 77 | rescaling of the actual metric. -/ |
| 78 | theorem positive_sectional_of_rescaled_positive |
| 79 | (g : RiemannianMetric 3 E) (D : LeviCivitaData g) {Q : ℝ} (hQ : 0 < Q) |
| 80 | (x : E) |
| 81 | (hpositive : ∀ u v : E, |
| 82 | LeviCivitaData.IsOrthonormalPair (m01RescaledMetric g Q hQ) x u v → |
| 83 | 0 < (m01RescaledMetric_connection g D Q hQ).sectionalCurvature x u v) : |
| 84 | ∀ u v : E, LeviCivitaData.IsOrthonormalPair g x u v → |
| 85 | 0 < D.sectionalCurvature x u v := by |
| 86 | intro u v huv |
| 87 | let a := (Real.sqrt Q)⁻¹ |
| 88 | have ha : a ≠ 0 := inv_ne_zero (Real.sqrt_pos.mpr hQ).ne' |
| 89 | have hfactor : a * a * Q = 1 := by |
| 90 | rw [show a * a = Q⁻¹ from M13.inv_sqrt_mul_inv_sqrt Q hQ.le, |
| 91 | inv_mul_cancel₀ hQ.ne'] |
| 92 | have hinner (v w : E) : |
| 93 | (m01RescaledMetric g Q hQ).inner x (a • v) (a • w) = g.inner x v w := by |
| 94 | rw [m01RescaledMetric_inner] |
| 95 | simp only [map_smul, smul_apply, smul_eq_mul] |
| 96 | calc |
| 97 | Q * (a * (a * g.inner x v w)) = (a * a * Q) * g.inner x v w := by ring |
| 98 | _ = _ := by rw [hfactor, one_mul] |
| 99 | have hpair : LeviCivitaData.IsOrthonormalPair (m01RescaledMetric g Q hQ) x |
| 100 | (a • u) (a • v) := by |
| 101 | simpa only [LeviCivitaData.IsOrthonormalPair, hinner] using huv |
| 102 | have hp := hpositive _ _ hpair |
| 103 | rw [M36.sectionalCurvature_smul_pair _ x u v ha ha] at hp |
| 104 | have hscale : (m01RescaledMetric_connection g D Q hQ).sectionalCurvature x u v = |
| 105 | D.sectionalCurvature x u v / Q := by |
| 106 | simpa only [Diffeomorph.coe_refl, id_eq, mfderiv_id, ContinuousLinearMap.id_apply] using |
| 107 | M13.homothety_sectionalCurvature_eq g (m01RescaledMetric g Q hQ) |
| 108 | (Diffeomorph.refl (𝓡 3) E ∞) Q hQ (rescaledMetric_identity_homothety hQ) |
| 109 | D (m01RescaledMetric_connection g D Q hQ) x u v |
| 110 | rw [hscale] at hp |
| 111 | exact (div_pos_iff_of_pos_right hQ).mp hp |
| 112 | |
| 113 | /-- Every actual point of a sufficiently close round component has |
| 114 | positive sectional curvature for the selected physical connection. -/ |
| 115 | theorem round_component_positive |
| 116 | {M : Type u} [TopologicalSpace M] [ChartedSpace E M] [IsManifold (𝓡 3) ∞ M] |
| 117 | (g : RiemannianMetric 3 M) (D : LeviCivitaData g) {epsilon : ℝ} |
| 118 | (N : SingularRoundComponent g epsilon) (hsmall : epsilon ≤ 1 / 200) |
| 119 | {x : M} (hx : x ∈ N.carrier) : |
| 120 | ∀ u v : TangentSpace (𝓡 3) x, LeviCivitaData.IsOrthonormalPair g x u v → |
| 121 | 0 < D.sectionalCurvature x u v := by |
| 122 | obtain ⟨B, _, hB⟩ := exists_round_comparison_coordinate_bounds |
| 123 | obtain ⟨_, horder⟩ := M45.model_four_jet_order N.epsilon_pos hsmall |
| 124 | obtain ⟨f, V, gB, DB, hfzero, hV, hzeroV, hf, hinv, hcurv, hgram, hactual⟩ := |
| 125 | hB N (by linarith) horder (N.inverse x) |
| 126 | have hfzero' : f 0 = x := hfzero.trans (N.right_inverse hx) |
| 127 | obtain ⟨gE, DE, W, hW, hzeroW, hWV, hmetric⟩ := |
| 128 | M45.model_metric_realization g hV hzeroV hf hinv |
| 129 | let gQ := m01RescaledMetric gE N.scale N.scale_pos |
| 130 | let DQ := m01RescaledMetric_connection gE DE N.scale N.scale_pos |
| 131 | have hcoeff : gQ.euclideanCoefficients =ᶠ[𝓝 0] |
| 132 | (fun y => N.scale • g.pullbackCoefficients f y) := by |
| 133 | filter_upwards [hW.mem_nhds hzeroW] with y hy |
| 134 | exact congrArg (fun B => N.scale • B) (hmetric y hy) |
| 135 | obtain ⟨_, _, herror⟩ := hactual gQ hcoeff |
| 136 | have hpositiveQ : ∀ u v : E, LeviCivitaData.IsOrthonormalPair gQ 0 u v → |
| 137 | 0 < DQ.sectionalCurvature 0 u v := by |
| 138 | intro u v huv |
| 139 | exact (by norm_num : (0 : ℝ) < 1 / 2).trans_le |
| 140 | (round_metric_error_sectional_half DB DQ 0 N.epsilon_pos.le hsmall hcurv hgram |
| 141 | (fun j hj => herror j (by omega)) u v huv) |
| 142 | have hpositiveE := positive_sectional_of_rescaled_positive gE DE N.scale_pos 0 hpositiveQ |
| 143 | have hgeom (y : E) (hy : y ∈ W) (v w : E) : |
| 144 | gE.inner y v w = g.inner (f y) (mfderiv (𝓡 3) (𝓡 3) f y v) |
| 145 | (mfderiv (𝓡 3) (𝓡 3) f y w) := |
| 146 | congrArg (fun B => B v w) (hmetric y hy) |
| 147 | have hp := (sectional_positive_iff_of_local_isometry DE D hW (hf.mono hWV) |
| 148 | hgeom hzeroW).mp hpositiveE |
| 149 | exact hfzero' ▸ hp |
| 150 | |
| 151 | /-- The public nonpositive-component guard eliminates both compact |
| 152 | canonical alternatives, leaving precisely a neck or a cap. -/ |
| 153 | theorem canonical_neck_or_cap_of_not_positive |
| 154 | {F : SurgeryFlowData.{u}} {t : ℝ} {x : (F.slice t).carrier} |
| 155 | (hcanonical : SurgeryCanonicalControl F t x F.parameters.epsilon F.parameters.C) |
| 156 | (hpositive : ¬ SurgeryPositiveComponentAt F t x) : |
| 157 | (∃ N : SurgeryStrongNeck F t F.parameters.epsilon, N.neck.center = x) ∨ |
| 158 | ∃ N : CapCertificate (F.metric t), N.epsilon = F.parameters.epsilon ∧ |
| 159 | N.cap_constant ≤ F.parameters.C ∧ N.connection = F.connection t ∧ x ∈ N.core := by |
| 160 | cases hcanonical with |
| 161 | | neck N hx => exact Or.inl ⟨N, hx⟩ |
| 162 | | cap N he hC hD hx => exact Or.inr ⟨N, he, hC, hD, hx⟩ |
| 163 | | component N hx => |
| 164 | have hxcomponent : x ∈ connectedComponent N.basepoint := by rwa [← N.component_eq] |
| 165 | have hcomponent : connectedComponent x = N.carrier := |
| 166 | (connectedComponent_eq hxcomponent).symm.trans N.component_eq.symm |
| 167 | exact (hpositive (fun y hy => N.positive_sectional y (hcomponent ▸ hy))).elim |
| 168 | | round N hx => |
| 169 | have hxcomponent : x ∈ connectedComponent N.basepoint := by rwa [← N.component_eq] |
| 170 | have hcomponent : connectedComponent x = N.carrier := |
| 171 | (connectedComponent_eq hxcomponent).symm.trans N.component_eq.symm |
| 172 | exact (hpositive (fun y hy => round_component_positive (F.metric t) (F.connection t) |
| 173 | N F.parameters.epsilon_le (hcomponent ▸ hy))).elim |
| 174 | |
| 175 | end PoincareMT.Proofs.M46 |