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.CurveShortening.Comparison.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalEstimates.Tangent.RicciDerivatives |
| 3 | import PoincareLib.Geometry.RicciFlow.CurveShortening.Estimates.Pointwise |
| 4 | |
| 5 | /-! |
| 6 | # Spatial control of the actual normal-speed coefficient |
| 7 | |
| 8 | The literal first Ricci derivative and metric product rule control the |
| 9 | spatial derivative of tangent Ricci plus squared curvature. This is the |
| 10 | integrable derivative input for the C2 initial trace in MT2007 Claim 19.1, |
| 11 | p. 437; MT2015Correction Lemma 0.2, pp. 4-6. See |
| 12 | `2026-09-21-c2-normalization-spatial-bound.md`. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set Bundle Manifold |
| 18 | open scoped Manifold ContDiff Bundle BigOperators |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M63 |
| 23 | |
| 24 | open M62 |
| 25 | |
| 26 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 27 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 28 | {a b : ℝ} |
| 29 | |
| 30 | /-- The ordinary parameter derivative of the actual speed normalization |
| 31 | coefficient retains the speed factor and needs only first ambient Ricci |
| 32 | derivatives. MT2007 Claim 19.1, p. 437; MT2015Correction Lemma 0.2, |
| 33 | pp. 4-6; normalization spatial-bound derivation. -/ |
| 34 | theorem normalizationCoefficient_spatial_abs_bound [T2Space M] |
| 35 | (F : RicciFlow n M (Icc a b)) (c : ℝ → ℝ → M) |
| 36 | (hc : M62ShrinkingCurve F c) {K0 K1 K2 : ℝ} |
| 37 | (hBounds : CurveEvolutionAmbientBounds F K0 K1 K2) |
| 38 | {t : ℝ} (ht : t ∈ Ioo a b) (x : ℝ) : |
| 39 | |deriv (fun y => m62TangentRicci F c t y + m62CurvatureSquared F c t y) x| ≤ |
| 40 | curveSpeed F c t x * (K1 + 2 * K2 * m62Curvature F c t x + |
| 41 | 2 * m62Curvature F c t x * |
| 42 | (F.metric t).tangentNorm (c x t) (m63CurvatureJet F c 1 t x)) := by |
| 43 | let p := c x t |
| 44 | let g := F.metric t |
| 45 | let D := F.connection t |
| 46 | let S := spatialUnitTangent F c t x |
| 47 | let H := m63CurvatureJet F c 0 t x |
| 48 | let B := m63CurvatureJet F c 1 t x |
| 49 | let v := curveSpeed F c t x |
| 50 | let k := m62Curvature F c t x |
| 51 | let u := g.tangentNorm p B |
| 52 | let r := m62TangentRicci F c t |
| 53 | let q := m62CurvatureSquared F c t |
| 54 | let A : ℝ → ℝ := fun y => r y + q y |
| 55 | have ht' := Ioo_subset_Icc_self ht |
| 56 | have hv : 0 < v := speed_pos F c hc ht' x |
| 57 | have hS : g.tangentNorm p S = 1 := unitTangent_norm F c hc ht' x |
| 58 | have hH : g.tangentNorm p H = k := rfl |
| 59 | have hB : g.tangentNorm p B = u := rfl |
| 60 | have hA : ContDiff ℝ ∞ A := |
| 61 | (normalization_coefficient_contDiffOn F c hc).comp_contDiff |
| 62 | (contDiff_id.prodMk contDiff_const) (fun _ => ⟨mem_univ _, ht⟩) |
| 63 | have hq : ContDiff ℝ ∞ q := |
| 64 | (curvatureSquared_contDiffOn F c hc).comp_contDiff |
| 65 | (contDiff_id.prodMk contDiff_const) (fun _ => ⟨mem_univ _, ht⟩) |
| 66 | have hr : ContDiff ℝ ∞ r := by |
| 67 | convert! hA.sub hq using 1 |
| 68 | funext y |
| 69 | dsimp only [A] |
| 70 | ring |
| 71 | have hsplit : m62ArcDerivative F c t A x = |
| 72 | m62ArcDerivative F c t r x + m62ArcDerivative F c t q x := by |
| 73 | have hd : HasDerivAt A (deriv r x + deriv q x) x := |
| 74 | ((hr.differentiable (by simp) x).hasDerivAt).add |
| 75 | ((hq.differentiable (by simp) x).hasDerivAt) |
| 76 | rw [m62ArcDerivative, hd.deriv] |
| 77 | dsimp only [m62ArcDerivative] |
| 78 | ring |
| 79 | have hqarc : m62ArcDerivative F c t q x = 2 * g.inner p H B := by |
| 80 | have hHsmooth := curvatureJet_joint_contMDiff F c hc 0 |
| 81 | have h := m63ArcDerivative_metric_pairing F c hc |
| 82 | (fun z => m63CurvatureJet F c 0 z.2 z.1) |
| 83 | (fun z => m63CurvatureJet F c 0 z.2 z.1) hHsmooth hHsmooth ht x |
| 84 | change m62ArcDerivative F c t q x = g.inner p B H + g.inner p H B at h |
| 85 | rw [g.symm p B H] at h |
| 86 | linarith |
| 87 | have hrarc : m62ArcDerivative F c t r x = |
| 88 | D.covariantTensorDerivative D.ricciEvaluation p ![S, S, S] + |
| 89 | 2 * D.ricci p H S := (m63TangentRicci_arc_derivatives F c hc ht x).1 |
| 90 | have hdx : v * m62ArcDerivative F c t A x = deriv A x := by |
| 91 | dsimp only [m62ArcDerivative] |
| 92 | change v * (v⁻¹ * deriv A x) = deriv A x |
| 93 | rw [← mul_assoc, mul_inv_cancel₀ hv.ne', one_mul] |
| 94 | have hDer : |D.covariantTensorDerivative D.ricciEvaluation p ![S, S, S]| ≤ K1 := by |
| 95 | apply hBounds.ricci_derivative t ht' p |
| 96 | intro i |
| 97 | fin_cases i <;> simpa [g] using hS.le |
| 98 | have hRic : |D.ricci p H S| ≤ K2 * k := by |
| 99 | have h := tensor_abs_le_of_unit_bound g D.ricciEvaluation |
| 100 | (M04.isSmoothCovariantTensor_ricciEvaluation D) p |
| 101 | (fun w hw => hBounds.ricci t ht' p (w 0) (w 1) (hw 0) (hw 1)) ![H, S] |
| 102 | simpa [LeviCivitaData.ricciEvaluation, Fin.prod_univ_succ, hH, hS] using h |
| 103 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 104 | ⟨g.toRiemannianMetric⟩ |
| 105 | have hn (Z : TangentSpace (𝓡 n) p) : ‖Z‖ = g.tangentNorm p Z := by |
| 106 | rw [norm_eq_sqrt_real_inner] |
| 107 | rfl |
| 108 | have hN : |g.inner p H B| ≤ k * u := by |
| 109 | change |inner ℝ H B| ≤ k * u |
| 110 | simpa only [hn, hH, hB] using abs_real_inner_le_norm H B |
| 111 | change |deriv A x| ≤ v * (K1 + 2 * K2 * k + 2 * k * u) |
| 112 | rw [← hdx, hsplit, hrarc, hqarc, abs_mul, abs_of_pos hv] |
| 113 | apply mul_le_mul_of_nonneg_left _ hv.le |
| 114 | apply abs_le.mpr |
| 115 | constructor |
| 116 | · nlinarith only [(abs_le.mp hDer).1, (abs_le.mp hRic).1, (abs_le.mp hN).1] |
| 117 | · nlinarith only [(abs_le.mp hDer).2, (abs_le.mp hRic).2, (abs_le.mp hN).2] |
| 118 | |
| 119 | end PoincareMT.M63 |