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.Blowup.Construction.SourceNames |
| 2 | import PoincareLib.Geometry.Riemannian.Curvature.IntrinsicCalculus |
| 3 | import PoincareLib.Geometry.Riemannian.Curvature.ThreeDimensional |
| 4 | import PoincareLib.Geometry.Riemannian.Connection.ScalarJets |
| 5 | import PoincareLib.Geometry.Riemannian.Curvature.Euclidean |
| 6 | import PoincareLib.Geometry.RicciFlow.Surgery.Metric.Curvature.Conformal.ConformalPinching |
| 7 | import PoincareLib.Geometry.Riemannian.Curvature.Bounds.Sectional |
| 8 | |
| 9 | /-! |
| 10 | # Curvature-operator nonnegativity from vanishing negative defect |
| 11 | |
| 12 | Morgan--Tian Theorem 5.33, pp. 99--100, and Theorem 11.8, p. 272, use the |
| 13 | vanishing negative part to obtain nonnegative curvature in a smooth limit. |
| 14 | Here second scalar metric jets give the actual tensor limits, and the |
| 15 | existing three-dimensional operator representation gives the frozen |
| 16 | curvature-operator quadratic inequality. |
| 17 | |
| 18 | See `proof-work/tasks/M30/derivations/vanishing-negative-defect-closure.md`. |
| 19 | -/ |
| 20 | |
| 21 | set_option autoImplicit false |
| 22 | |
| 23 | open Filter |
| 24 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 25 | |
| 26 | namespace PoincareMT.M30 |
| 27 | |
| 28 | -- Preserve the reviewed finite-basis telescope of the scalar metric-jet donor. |
| 29 | set_option linter.unusedFintypeInType false in |
| 30 | /-- Second scalar metric jets and vanishing native negative curvature part |
| 31 | give nonnegative curvature operator for the actual target connection |
| 32 | (Morgan--Tian Theorem 5.33, pp. 99--100; Theorem 11.8, p. 272). -/ |
| 33 | theorem nonnegativeCurvatureOperator_of_scalar_metric_jets_of_vanishing_defect |
| 34 | {alpha : Type*} {l : Filter alpha} [l.NeBot] |
| 35 | {gseq : alpha → RiemannianMetric 3 (EuclideanSpace ℝ (Fin 3))} |
| 36 | {g : RiemannianMetric 3 (EuclideanSpace ℝ (Fin 3))} |
| 37 | (Dseq : ∀ i, LeviCivitaData (gseq i)) (D : LeviCivitaData g) |
| 38 | (x : EuclideanSpace ℝ (Fin 3)) |
| 39 | {iota : Type*} [Fintype iota] |
| 40 | (b : Module.Basis iota ℝ (EuclideanSpace ℝ (Fin 3))) |
| 41 | (hjets : ∀ r : ℕ, r ≤ 2 → ∀ a c : iota, |
| 42 | Tendsto (fun i => iteratedFDeriv ℝ r |
| 43 | (fun y => (gseq i).inner y (b a) (b c)) x) l |
| 44 | (𝓝 (iteratedFDeriv ℝ r |
| 45 | (fun y => g.inner y (b a) (b c)) x))) |
| 46 | (hdefect : Tendsto (fun i => (Dseq i).negativeCurvaturePart x) |
| 47 | l (𝓝 0)) : |
| 48 | D.NonnegativeCurvatureOperator x := by |
| 49 | classical |
| 50 | obtain ⟨hzero, hone, htwo⟩ := |
| 51 | RiemannianMetric.tendsto_euclideanCoefficients_of_scalar_jets x b hjets |
| 52 | have hinner (u v : EuclideanSpace ℝ (Fin 3)) : |
| 53 | Tendsto (fun i => (gseq i).inner x u v) l (𝓝 (g.inner x u v)) := by |
| 54 | have hu := (continuous_fst.clm_apply continuous_snd).continuousAt.tendsto.comp |
| 55 | (hzero.prodMk_nhds (tendsto_const_nhds (x := u))) |
| 56 | convert! (continuous_fst.clm_apply continuous_snd).continuousAt.tendsto.comp |
| 57 | (hu.prodMk_nhds (tendsto_const_nhds (x := v))) using 1 |
| 58 | have hsource (i : alpha) (u v : EuclideanSpace ℝ (Fin 3)) : |
| 59 | -(Dseq i).negativeCurvaturePart x ≤ (Dseq i).sectionalCurvature x u v := by |
| 60 | have hnonneg : 0 ≤ (Dseq i).negativeCurvaturePart x := le_max_right _ _ |
| 61 | apply (Dseq i).sectionalCurvature_lower_bound_of_orthonormal x |
| 62 | (neg_nonpos.mpr hnonneg) _ u v |
| 63 | intro a c ha hc hac |
| 64 | exact MetricSurgery.neg_negativeCurvaturePart_le_sectional_of_orthonormal |
| 65 | (Dseq i) x ⟨ha, hc, hac⟩ |
| 66 | have hplane (u v : EuclideanSpace ℝ (Fin 3)) |
| 67 | (huv : LeviCivitaData.IsOrthonormalPair g x u v) : |
| 68 | 0 ≤ D.curvatureTensor x u v u v := by |
| 69 | have hgram : Tendsto (fun i => |
| 70 | (gseq i).inner x u u * (gseq i).inner x v v - |
| 71 | ((gseq i).inner x u v) ^ 2) l (𝓝 1) := by |
| 72 | simpa only [huv.1, huv.2.1, huv.2.2, one_mul, zero_pow (by decide : 2 ≠ 0), |
| 73 | sub_zero] using ((hinner u u).mul (hinner v v)).sub ((hinner u v).pow 2) |
| 74 | have hR := LeviCivitaData.tendsto_curvatureTensor_of_metric_jets |
| 75 | Dseq D x u v u v hzero hone htwo |
| 76 | have hsec : Tendsto (fun i => (Dseq i).sectionalCurvature x u v) l |
| 77 | (𝓝 (D.curvatureTensor x u v u v)) := by |
| 78 | simpa only [LeviCivitaData.sectionalCurvature, Pi.div_def, div_one] using |
| 79 | hR.div hgram (by norm_num : (1 : ℝ) ≠ 0) |
| 80 | have hsum : Tendsto (fun i => (Dseq i).negativeCurvaturePart x + |
| 81 | (Dseq i).sectionalCurvature x u v) l (𝓝 (D.curvatureTensor x u v u v)) := by |
| 82 | simpa only [zero_add] using hdefect.add hsec |
| 83 | exact ge_of_tendsto hsum (Eventually.of_forall fun i => by |
| 84 | linarith only [hsource i u v]) |
| 85 | let : Bundle.RiemannianBundle |
| 86 | (TangentSpace (𝓡 3) : EuclideanSpace ℝ (Fin 3) → Type _) := |
| 87 | ⟨g.toRiemannianMetric⟩ |
| 88 | obtain ⟨b3, _, _, hunit, hpair, _⟩ := |
| 89 | D.three_dimensional_curvature_operator_spectrum D.curvatureTensorCalculus x |
| 90 | let W := fun u v : TangentSpace (𝓡 3) x => |
| 91 | (WithLp.toLp 2 (crossProduct (b3.repr u) (b3.repr v)) : |
| 92 | EuclideanSpace ℝ (Fin 3)) |
| 93 | let L := Poincare.Geometry.Curvature.Operator.curvatureOperator |
| 94 | (fun i j k m => D.curvatureTensor x (b3 i) (b3 j) (b3 k) (b3 m)) |
| 95 | change ∀ z : EuclideanSpace ℝ (Fin 3), ‖z‖ = 1 → |
| 96 | ∃ u v, LeviCivitaData.IsOrthonormalPair g x u v ∧ W u v = z at hunit |
| 97 | change ∀ u v w z, D.curvatureTensor x u v w z = |
| 98 | inner ℝ (W u v) (L (W w z)) at hpair |
| 99 | have hLunit (z : EuclideanSpace ℝ (Fin 3)) (hz : ‖z‖ = 1) : |
| 100 | 0 ≤ inner ℝ z (L z) := by |
| 101 | obtain ⟨u, v, huv, hW⟩ := hunit z hz |
| 102 | have hp := hplane u v huv |
| 103 | rw [hpair, hW] at hp |
| 104 | exact hp |
| 105 | have hL (z : EuclideanSpace ℝ (Fin 3)) : 0 ≤ inner ℝ z (L z) := by |
| 106 | by_cases hz : z = 0 |
| 107 | · simp [hz] |
| 108 | have hnorm : 0 < ‖z‖ := norm_pos_iff.mpr hz |
| 109 | have hp := hLunit (‖z‖⁻¹ • z) (norm_smul_inv_norm hz) |
| 110 | rw [map_smul, real_inner_smul_left, real_inner_smul_right] at hp |
| 111 | exact (mul_nonneg_iff_of_pos_left (inv_pos.mpr hnorm)).mp |
| 112 | ((mul_nonneg_iff_of_pos_left (inv_pos.mpr hnorm)).mp hp) |
| 113 | intro A _hA |
| 114 | let e := g.orthonormalBasis x |
| 115 | let Z : EuclideanSpace ℝ (Fin 3) := ∑ i, ∑ j, A i j • W (e i) (e j) |
| 116 | have hquad : D.curvatureOperatorQuadratic x A = inner ℝ Z (L Z) := by |
| 117 | change (∑ i, ∑ j, ∑ k, ∑ m, |
| 118 | A i j * A k m * D.curvatureTensor x (e i) (e j) (e k) (e m)) = _ |
| 119 | simp_rw [Z, map_sum, map_smul, sum_inner, inner_sum, |
| 120 | real_inner_smul_left, real_inner_smul_right] |
| 121 | refine Finset.sum_congr rfl fun i _ => ?_ |
| 122 | refine Finset.sum_congr rfl fun j _ => ?_ |
| 123 | refine Finset.sum_congr rfl fun k _ => ?_ |
| 124 | refine Finset.sum_congr rfl fun m _ => ?_ |
| 125 | rw [hpair] |
| 126 | ring |
| 127 | rw [hquad] |
| 128 | exact hL Z |
| 129 | |
| 130 | end PoincareMT.M30 |