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.Persistence.SourceNames.Homothety |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.SourceNames.Normalization |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Schedules.Models.LocalScalar |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Scalar.Bounds.ScalarScaling |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Scalar.Calculus.ScalarJet |
| 6 | |
| 7 | /-! |
| 8 | # Analytic model estimates through one normalized coordinate chart |
| 9 | |
| 10 | The scaling computation is performed on the Euclidean realization, and the |
| 11 | local isometry transfers it to the actual manifold. This retains the frozen |
| 12 | endpoint without a global Hausdorff hypothesis. Morgan--Tian Definition 2.16, |
| 13 | equation (2.1), p. 30, and Definition 9.76, p. 231. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Bundle Topology |
| 21 | |
| 22 | namespace PoincareMT.M45 |
| 23 | |
| 24 | open PoincareMT.M44 |
| 25 | |
| 26 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 27 | |
| 28 | /-- The factor converting the normalized scalar differential to the |
| 29 | physical differential is the three-halves power of the metric scale. |
| 30 | Source: the normalization in Definition 2.16, p. 30. -/ |
| 31 | theorem model_scale_three_halves {Q : ℝ} (hQ : 0 < Q) : |
| 32 | Q * Real.sqrt Q = Q ^ (3 / 2 : ℝ) := by |
| 33 | calc |
| 34 | _ = Q ^ (1 : ℝ) * Q ^ (1 / 2 : ℝ) := by rw [Real.rpow_one, Real.sqrt_eq_rpow] |
| 35 | _ = Q ^ (1 + 1 / 2 : ℝ) := (Real.rpow_add hQ _ _).symm |
| 36 | _ = _ := by norm_num |
| 37 | |
| 38 | /-- A unit-direction scalar differential bound for the normalized |
| 39 | Euclidean metric scales back with the expected three-halves power. |
| 40 | Source: Definition 2.16, equation (2.1), p. 30. -/ |
| 41 | theorem model_differential_bound_of_rescaled |
| 42 | (g : RiemannianMetric 3 E) (D : LeviCivitaData g) {Q : ℝ} (hQ : 0 < Q) |
| 43 | (x : E) {C : ℝ} |
| 44 | (hbound : ∀ v : E, (m01RescaledMetric g Q hQ).inner x v v = 1 → |
| 45 | |fderiv ℝ (m01RescaledMetric_connection g D Q hQ).scalarCurvature x v| ≤ C) |
| 46 | (v : E) (hv : g.inner x v v = 1) : |
| 47 | |fderiv ℝ D.scalarCurvature x v| ≤ C * Q ^ (3 / 2 : ℝ) := by |
| 48 | let DQ := m01RescaledMetric_connection g D Q hQ |
| 49 | have hsqrt : 0 < Real.sqrt Q := Real.sqrt_pos.mpr hQ |
| 50 | have hS : DQ.scalarCurvature = fun y => Q⁻¹ * D.scalarCurvature y := by |
| 51 | funext y |
| 52 | have h := M13.homothety_scalarCurvature_eq g (m01RescaledMetric g Q hQ) |
| 53 | (Diffeomorph.refl (𝓡 3) E ∞) Q hQ (rescaledMetric_identity_homothety hQ) D DQ y |
| 54 | simpa only [Diffeomorph.coe_refl, id_eq, div_eq_mul_inv, mul_comm] using h |
| 55 | let w : E := (Real.sqrt Q)⁻¹ • v |
| 56 | have hw : (m01RescaledMetric g Q hQ).inner x w w = 1 := by |
| 57 | change Q * g.inner x ((Real.sqrt Q)⁻¹ • v) ((Real.sqrt Q)⁻¹ • v) = 1 |
| 58 | simp only [map_smul, smul_apply, smul_eq_mul, hv, mul_one] |
| 59 | rw [M13.inv_sqrt_mul_inv_sqrt Q hQ.le, mul_inv_cancel₀ hQ.ne'] |
| 60 | have hder : fderiv ℝ DQ.scalarCurvature x w = |
| 61 | Q⁻¹ * ((Real.sqrt Q)⁻¹ * fderiv ℝ D.scalarCurvature x v) := by |
| 62 | rw [hS, fderiv_const_mul ((contDiff_scalarCurvature D).differentiable |
| 63 | (by simp) x)] |
| 64 | simp only [w, smul_apply, map_smul, smul_eq_mul] |
| 65 | ring |
| 66 | have h := hbound w hw |
| 67 | change |fderiv ℝ DQ.scalarCurvature x w| ≤ C at h |
| 68 | rw [hder, abs_mul, abs_mul, abs_of_pos (inv_pos.mpr hQ), |
| 69 | abs_of_pos (inv_pos.mpr hsqrt)] at h |
| 70 | have hscale := mul_le_mul_of_nonneg_left h (mul_pos hQ hsqrt).le |
| 71 | have heq : (Q * Real.sqrt Q) * |
| 72 | (Q⁻¹ * ((Real.sqrt Q)⁻¹ * |fderiv ℝ D.scalarCurvature x v|)) = |
| 73 | |fderiv ℝ D.scalarCurvature x v| := by |
| 74 | field_simp |
| 75 | rw [heq, model_scale_three_halves hQ, mul_comm] at hscale |
| 76 | exact hscale |
| 77 | |
| 78 | /-- One actual local chart converts the normalized Euclidean model |
| 79 | bounds to the literal M45 pointwise estimate. The constants are numerical |
| 80 | inputs, so exactly the same constants apply in every carrier universe. |
| 81 | Source: Definitions 2.16 and 9.76, pp. 30 and 231. -/ |
| 82 | theorem model_analytic_of_normalized_chart |
| 83 | {M : Type*} [TopologicalSpace M] [ChartedSpace E M] [IsManifold (𝓡 3) ∞ M] |
| 84 | {g : RiemannianMetric 3 M} (D : LeviCivitaData g) |
| 85 | (gE : RiemannianMetric 3 E) (DE : LeviCivitaData gE) |
| 86 | {Q Cg Ce : ℝ} (hQ : 0 < Q) (hCg : 0 < Cg) (hCe : 0 < Ce) |
| 87 | {f : E → M} {U : Set E} (hU : IsOpen U) (hzero : (0 : E) ∈ U) |
| 88 | (hf : ContMDiffOn (𝓡 3) (𝓡 3) ∞ f U) |
| 89 | (hinv : ∀ y ∈ U, (mfderiv (𝓡 3) (𝓡 3) f y).IsInvertible) |
| 90 | (hmetric : ∀ y ∈ U, ∀ u v : E, |
| 91 | gE.inner y u v = g.inner (f y) (mfderiv (𝓡 3) (𝓡 3) f y u) |
| 92 | (mfderiv (𝓡 3) (𝓡 3) f y v)) |
| 93 | (hscalar : Q ≤ D.scalarCurvature (f 0)) |
| 94 | (hgradient : ∀ v : E, (m01RescaledMetric gE Q hQ).inner 0 v v = 1 → |
| 95 | |fderiv ℝ (m01RescaledMetric_connection gE DE Q hQ).scalarCurvature 0 v| ≤ Cg) |
| 96 | (hevolution : |
| 97 | let DQ := m01RescaledMetric_connection gE DE Q hQ |
| 98 | |DQ.laplacian DQ.scalarCurvature 0 + 2 * DQ.ricciNormSq 0| ≤ Ce) : |
| 99 | M45PointwiseAnalyticEstimate g D (f 0) (max Cg Ce) := by |
| 100 | have hR : 0 < D.scalarCurvature (f 0) := lt_of_lt_of_le hQ hscalar |
| 101 | refine ⟨hR, model_scalarGradientNorm_le g D (f 0) ?_, ?_⟩ |
| 102 | · intro v hv |
| 103 | let L := mfderiv (𝓡 3) (𝓡 3) f 0 |
| 104 | let w : E := L.inverse v |
| 105 | have hLw : L w = v := (hinv 0 hzero).self_apply_inverse v |
| 106 | have hw : gE.inner 0 w w = 1 := by |
| 107 | rw [hmetric 0 hzero] |
| 108 | change g.inner (f 0) (L w) (L w) = 1 |
| 109 | rw [hLw] |
| 110 | exact hv |
| 111 | have hd := model_scalar_differential_eq_of_local_isometry DE D hU hf hmetric hzero w |
| 112 | have hd' : fderiv ℝ DE.scalarCurvature 0 w = |
| 113 | mvfderiv (𝓡 3) D.scalarCurvature (f 0) v := by |
| 114 | change mvfderiv (𝓡 3) DE.scalarCurvature 0 w = |
| 115 | mvfderiv (𝓡 3) D.scalarCurvature (f 0) (L w) at hd |
| 116 | rw [hLw] at hd |
| 117 | simpa only [mvfderiv, mfderiv_eq_fderiv, ContinuousLinearMap.comp_apply] using! hd |
| 118 | rw [← hd'] |
| 119 | calc |
| 120 | _ ≤ Cg * Q ^ (3 / 2 : ℝ) := |
| 121 | model_differential_bound_of_rescaled gE DE hQ 0 hgradient w hw |
| 122 | _ ≤ max Cg Ce * D.scalarCurvature (f 0) ^ (3 / 2 : ℝ) := |
| 123 | mul_le_mul (le_max_left _ _) |
| 124 | (Real.rpow_le_rpow hQ.le hscalar (by norm_num)) |
| 125 | (Real.rpow_nonneg hQ.le _) (hCg.le.trans (le_max_left _ _)) |
| 126 | · have heq := model_scalar_evolution_eq_of_local_isometry DE D hU hf hinv hmetric hzero |
| 127 | have hscale := rescaled_scalar_evolution DE hQ 0 (model_scalar_smooth DE) |
| 128 | dsimp only at hevolution hscale |
| 129 | rw [hscale, abs_div, abs_of_pos (sq_pos_of_pos hQ)] at hevolution |
| 130 | have hbound := (div_le_iff₀ (sq_pos_of_pos hQ)).mp hevolution |
| 131 | rw [heq] at hbound |
| 132 | exact hbound.trans (mul_le_mul (le_max_right _ _) |
| 133 | (sq_le_sq₀ hQ.le hR.le |>.mpr hscalar) (sq_nonneg _) |
| 134 | (hCe.le.trans (le_max_right _ _))) |
| 135 | |
| 136 | end PoincareMT.M45 |