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.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.ScalarOperators.ScalarDerivativeJets |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.Caps.CapScalarEstimates |
| 4 | import Mathlib.Analysis.Normed.Operator.NNNorm |
| 5 | |
| 6 | /-! |
| 7 | # Convergence of the actual scalar-gradient norm |
| 8 | |
| 9 | Morgan-Tian Definition 9.72, pp. 230-231, in Theorem 12.28, |
| 10 | pp. 323-324. The frozen supremum over unit vectors is exactly the |
| 11 | metric norm of the actual gradient, so metric and scalar jets retain it. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option maxSynthPendingDepth 5 |
| 16 | |
| 17 | open Filter Set |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | namespace PoincareMT.M35 |
| 21 | |
| 22 | local notation:max "E" n:max => EuclideanSpace ℝ (Fin n) |
| 23 | |
| 24 | /-- Definition 9.72: the frozen supremum over metric-unit vectors |
| 25 | equals the norm of the actual metric-dual scalar gradient. -/ |
| 26 | theorem scalarGradientNorm_eq_gradient_norm |
| 27 | {M : Type*} [TopologicalSpace M] |
| 28 | [ChartedSpace (E 3) M] [IsManifold (𝓡 3) ∞ M] |
| 29 | {g : RiemannianMetric 3 M} (D : LeviCivitaData g) (x : M) : |
| 30 | scalarGradientNorm g D x = g.tangentNorm x (D.gradient D.scalarCurvature x) := by |
| 31 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 32 | ⟨g.toRiemannianMetric⟩ |
| 33 | let v := D.gradient D.scalarCurvature x |
| 34 | have hunit (w : TangentSpace (𝓡 3) x) : |
| 35 | g.inner x w w = 1 ↔ w ∈ Metric.sphere 0 1 := by |
| 36 | change inner ℝ w w = 1 ↔ dist w 0 = 1 |
| 37 | rw [real_inner_self_eq_norm_sq, dist_zero_right] |
| 38 | constructor |
| 39 | · intro h |
| 40 | nlinarith [norm_nonneg w] |
| 41 | · intro h |
| 42 | rw [h, one_pow] |
| 43 | have heval (w : TangentSpace (𝓡 3) x) : |
| 44 | |mvfderiv (𝓡 3) D.scalarCurvature x w| = ‖innerSL ℝ v w‖ := by |
| 45 | rw [← D.inner_gradient] |
| 46 | rfl |
| 47 | have hset : range (fun w : {w : TangentSpace (𝓡 3) x // g.inner x w w = 1} => |
| 48 | |mvfderiv (𝓡 3) D.scalarCurvature x w.val|) = |
| 49 | (fun w => ‖innerSL ℝ v w‖) '' Metric.sphere 0 1 := by |
| 50 | ext z |
| 51 | constructor |
| 52 | · rintro ⟨⟨w, hw⟩, rfl⟩ |
| 53 | exact ⟨w, (hunit w).mp hw, (heval w).symm⟩ |
| 54 | · rintro ⟨w, hw, rfl⟩ |
| 55 | exact ⟨⟨w, (hunit w).mpr hw⟩, heval w⟩ |
| 56 | change sSup _ = ‖v‖ |
| 57 | rw [hset, (innerSL ℝ v).sSup_sphere_eq_norm, innerSL_apply_norm] |
| 58 | |
| 59 | /-- Theorem 12.28: the actual first scalar differential converges |
| 60 | from three coordinate metric jets, at the selected moving points. -/ |
| 61 | theorem scalar_fderiv_tendsto_of_metric_jets {n : ℕ} |
| 62 | {gseq : ℕ → RiemannianMetric n (E n)} {g : RiemannianMetric n (E n)} |
| 63 | (Dseq : ∀ k, LeviCivitaData (gseq k)) (D : LeviCivitaData g) |
| 64 | (pseq : ℕ → E n) (p : E n) |
| 65 | (hjet : ∀ m ≤ 3, Tendsto |
| 66 | (fun k => iteratedFDeriv ℝ m (gseq k).euclideanCoefficients (pseq k)) atTop |
| 67 | (𝓝 (iteratedFDeriv ℝ m g.euclideanCoefficients p))) : |
| 68 | Tendsto (fun k => fderiv ℝ (Dseq k).scalarCurvature (pseq k)) atTop |
| 69 | (𝓝 (fderiv ℝ D.scalarCurvature p)) := by |
| 70 | let C := continuousMultilinearCurryFin1 ℝ (E n) ℝ |
| 71 | have heq (f : E n → ℝ) (y : E n) : |
| 72 | C (iteratedFDeriv ℝ 1 f y) = fderiv ℝ f y := by |
| 73 | ext v |
| 74 | simp [C, continuousMultilinearCurryFin1_apply, iteratedFDeriv_one_apply] |
| 75 | have h := (C.continuous.tendsto _).comp |
| 76 | (scalarCurvature_jets_tendsto_of_metric_jets Dseq D pseq p 1 hjet) |
| 77 | simpa only [Function.comp_def, heq] using h |
| 78 | |
| 79 | /-- Theorem 12.28: the frozen actual scalar-gradient norm converges |
| 80 | from three metric derivatives, with no continuity assumption on chosen frames. -/ |
| 81 | theorem scalarGradientNorm_tendsto_of_metric_jets |
| 82 | {gseq : ℕ → RiemannianMetric 3 (E 3)} {g : RiemannianMetric 3 (E 3)} |
| 83 | (Dseq : ∀ k, LeviCivitaData (gseq k)) (D : LeviCivitaData g) |
| 84 | (pseq : ℕ → E 3) (p : E 3) |
| 85 | (hjet : ∀ m ≤ 3, Tendsto |
| 86 | (fun k => iteratedFDeriv ℝ m (gseq k).euclideanCoefficients (pseq k)) atTop |
| 87 | (𝓝 (iteratedFDeriv ℝ m g.euclideanCoefficients p))) : |
| 88 | Tendsto (fun k => scalarGradientNorm (gseq k) (Dseq k) (pseq k)) atTop |
| 89 | (𝓝 (scalarGradientNorm g D p)) := by |
| 90 | let G := E 3 →L[ℝ] E 3 →L[ℝ] ℝ |
| 91 | have hzero : Tendsto (fun k => (gseq k).euclideanCoefficients (pseq k)) atTop |
| 92 | (𝓝 (g.euclideanCoefficients p)) := by |
| 93 | have h := ((continuousMultilinearCurryFin0 ℝ (E 3) G).continuous.tendsto _).comp |
| 94 | (hjet 0 (by omega)) |
| 95 | simpa only [G, iteratedFDeriv_zero_eq_comp, Function.comp_def, |
| 96 | LinearIsometryEquiv.apply_symm_apply] using h |
| 97 | have hi : (g.euclideanCoefficients p).IsInvertible := by convert! g.inner_isInvertible p |
| 98 | have hinv := (hi.contDiffAt_map_inverse (n := 0)).continuousAt.tendsto.comp hzero |
| 99 | have hdf := scalar_fderiv_tendsto_of_metric_jets Dseq D pseq p hjet |
| 100 | have hgrad : Tendsto |
| 101 | (fun k => (gseq k).euclideanCoefficients (pseq k) |>.inverse |
| 102 | (fderiv ℝ (Dseq k).scalarCurvature (pseq k))) atTop |
| 103 | (𝓝 ((g.euclideanCoefficients p).inverse (fderiv ℝ D.scalarCurvature p))) := |
| 104 | (continuous_fst.clm_apply continuous_snd).continuousAt.tendsto.comp |
| 105 | (hinv.prodMk_nhds hdf) |
| 106 | have hnorm := Real.continuous_sqrt.continuousAt.tendsto.comp |
| 107 | ((continuous_fst.clm_apply continuous_snd).continuousAt.tendsto.comp |
| 108 | (((continuous_fst.clm_apply continuous_snd).continuousAt.tendsto.comp |
| 109 | (hzero.prodMk_nhds hgrad)).prodMk_nhds hgrad)) |
| 110 | have heq (g' : RiemannianMetric 3 (E 3)) (D' : LeviCivitaData g') (x : E 3) : |
| 111 | D'.gradient D'.scalarCurvature x = |
| 112 | (g'.euclideanCoefficients x).inverse (fderiv ℝ D'.scalarCurvature x) := by |
| 113 | simp only [LeviCivitaData.gradient, mvfderiv, mfderiv_eq_fderiv] |
| 114 | rfl |
| 115 | simp_rw [scalarGradientNorm_eq_gradient_norm, heq] |
| 116 | exact hnorm |
| 117 | |
| 118 | end PoincareMT.M35 |