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.ReducedGeometry.LGeometry.Jacobi.JacobiLocalUniqueness |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Variation.Second.SecondVariationCoefficients |
| 3 | |
| 4 | /-! Adapted from Mapher `PoincareMT/Proofs/M08/IndexPairAlgebra.lean` at |
| 5 | `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. -/ |
| 6 | |
| 7 | |
| 8 | set_option autoImplicit false |
| 9 | set_option backward.isDefEq.respectTransparency false |
| 10 | |
| 11 | noncomputable section |
| 12 | |
| 13 | open Set Filter Topology |
| 14 | open scoped Manifold ContDiff Bundle |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.LGeometry |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 22 | |
| 23 | theorem scalarHessian_chart_symm {J C : Set ℝ} (F : RicciFlow n M J) |
| 24 | (hM04 : RicciFlowCurvatureTheory.{u}) (T : ℝ) |
| 25 | (htime : ∀ s ∈ C, T - s ^ 2 ∈ J) |
| 26 | {x y : M} (hy : y ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) |
| 27 | {s : ℝ} (hs : s ∈ C) (v w : EuclideanSpace ℝ (Fin n)) : |
| 28 | (F.connection (T - s ^ 2)).hessian (F.connection (T - s ^ 2)).scalarCurvature y |
| 29 | (chartFrame x v y) (chartFrame x w y) = |
| 30 | (F.connection (T - s ^ 2)).hessian (F.connection (T - s ^ 2)).scalarCurvature y |
| 31 | (chartFrame x w y) (chartFrame x v y) := by |
| 32 | let f := (F.connection (T - s ^ 2)).scalarCurvature |
| 33 | let e := extChartAt (𝓡 n) x |
| 34 | have hf : ContMDiff (𝓡 n) (𝓘(ℝ, ℝ)) ∞ f := |
| 35 | fun p ↦ scalarCurvature_slice_contMDiffAt_of_mem F hM04 (htime s hs) p |
| 36 | have hq : e y ∈ e.target := e.map_source |
| 37 | (by simpa only [e, extChartAt_source] using hy) |
| 38 | have hf₀ : ContDiffAt ℝ ∞ (f ∘ e.symm) (e y) := |
| 39 | (hf.contMDiffAt.comp (e y) |
| 40 | (((contMDiffOn_extChartAt_symm (I := 𝓡 n) (n := ∞) x) _ hq).contMDiffAt |
| 41 | ((isOpen_extChartAt_target (I := 𝓡 n) x).mem_nhds hq))).contDiffAt |
| 42 | have htwo : minSmoothness ℝ 2 ≤ (∞ : ℕ∞ω) := by |
| 43 | rw [minSmoothness_of_isRCLikeNormedField] |
| 44 | change (↑(2 : ℕ∞) : ℕ∞ω) ≤ ↑(⊤ : ℕ∞) |
| 45 | exact WithTop.coe_le_coe.mpr le_top |
| 46 | change (F.connection (T - s ^ 2)).hessian f y (chartFrame x v y) (chartFrame x w y) = _ |
| 47 | rw [hessian_chart F T htime hy hs f hf v w, |
| 48 | hessian_chart F T htime hy hs f hf w v, |
| 49 | closedChartChristoffel_symm F T htime hy hs v w] |
| 50 | exact congrArg (fun q : ℝ ↦ q - |
| 51 | fderiv ℝ (f ∘ e.symm) (e y) (closedChartChristoffel F T x C (s, e y) w v)) |
| 52 | ((hf₀.isSymmSndFDerivAt htwo) v w) |
| 53 | |
| 54 | set_option maxHeartbeats 1200000 in |
| 55 | theorem closedChartJacobiPotential_symm {J C : Set ℝ} (F : RicciFlow n M J) |
| 56 | (hM04 : RicciFlowCurvatureTheory.{u}) (T : ℝ) (hC : UniqueDiffOn ℝ C) |
| 57 | (htime : ∀ s ∈ C, T - s ^ 2 ∈ J) |
| 58 | {x y : M} (hy : y ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) |
| 59 | {s : ℝ} (hs : s ∈ C) |
| 60 | (hcl : (s, extChartAt (𝓡 n) x y) ∈ |
| 61 | closure (interior (C ×ˢ (extChartAt (𝓡 n) x).target))) |
| 62 | (A v w : EuclideanSpace ℝ (Fin n)) : |
| 63 | closedChartJacobiPotential F T x C (s, extChartAt (𝓡 n) x y) A v w = |
| 64 | closedChartJacobiPotential F T x C (s, extChartAt (𝓡 n) x y) A w v := by |
| 65 | rw [closedChartJacobiPotential_identification F hM04 T hC htime hy hs hcl, |
| 66 | closedChartJacobiPotential_identification F hM04 T hC htime hy hs hcl] |
| 67 | have hR := ((hM04.tensor_calculus n M (F.metric (T - s ^ 2)) |
| 68 | (F.connection (T - s ^ 2))).2.2.2.1 y |
| 69 | (chartFrame x v y) (chartFrame x A y) (chartFrame x w y) (chartFrame x A y)).2.1 |
| 70 | have hH := scalarHessian_chart_symm F hM04 T htime hy hs v w |
| 71 | have hN₁ := ricciDerivativePairing_chart_symm F hM04 T htime hy hs A v w |
| 72 | unfold backwardConnectionVariationPairing |
| 73 | rw [hR, hH, hN₁] |
| 74 | ring |
| 75 | |
| 76 | def regularizedIndexPairDensity {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) |
| 77 | (α : ℝ → M) (C : Set ℝ) (s : ℝ) |
| 78 | (Y W DY DW : TangentSpace (𝓡 n) (α s)) : ℝ := |
| 79 | (F.metric (T - s ^ 2)).inner (α s) DY DW - |
| 80 | jacobiPairResidual F T α C s Y 0 0 W |
| 81 | |
| 82 | theorem regularizedIndexPairDensity_chart {J : Set ℝ} (F : RicciFlow n M J) |
| 83 | (hM04 : RicciFlowCurvatureTheory.{u}) (T : ℝ) {a b : ℝ} (hab : a < b) |
| 84 | (htime : ∀ s ∈ Icc a b, T - s ^ 2 ∈ J) (x : M) (α : ℝ → M) |
| 85 | {s : ℝ} (hs : s ∈ Icc a b) |
| 86 | (hx : α s ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) |
| 87 | (hα : MDifferentiableAt (𝓘(ℝ, ℝ)) (𝓡 n) α s) |
| 88 | (y w dy dw : EuclideanSpace ℝ (Fin n)) : |
| 89 | regularizedIndexPairDensity F T α (Icc a b) s (chartFrame x y (α s)) |
| 90 | (chartFrame x w (α s)) (chartFrame x dy (α s)) (chartFrame x dw (α s)) = |
| 91 | chartActionMetric F T x (s, extChartAt (𝓡 n) x (α s)) dy dw + |
| 92 | jacobiAlongPotential F T x (Icc a b) α s y w := by |
| 93 | have hres := jacobiPairResidual_chart F hM04 T hab htime x α hs hx hα y 0 0 w |
| 94 | have hzero : chartFrame (n := n) x 0 (α s) = 0 := (by simp only [chartFrame, map_zero]) |
| 95 | rw [hzero] at hres |
| 96 | unfold regularizedIndexPairDensity |
| 97 | rw [hres, ← chartActionMetric_apply F T hx s dy dw] |
| 98 | simp only [map_zero, zero_apply, zero_sub, zero_add, add_zero, sub_neg_eq_add] |
| 99 | |
| 100 | theorem regularizedIndexPairDensity_symm {J : Set ℝ} (F : RicciFlow n M J) |
| 101 | (hM04 : RicciFlowCurvatureTheory.{u}) (T : ℝ) {a b : ℝ} (hab : a < b) |
| 102 | (htime : ∀ s ∈ Icc a b, T - s ^ 2 ∈ J) (α : ℝ → M) |
| 103 | {s : ℝ} (hs : s ∈ Icc a b) |
| 104 | (hα : MDifferentiableAt (𝓘(ℝ, ℝ)) (𝓡 n) α s) |
| 105 | (Y W DY DW : TangentSpace (𝓡 n) (α s)) : |
| 106 | regularizedIndexPairDensity F T α (Icc a b) s Y W DY DW = |
| 107 | regularizedIndexPairDensity F T α (Icc a b) s W Y DW DY := by |
| 108 | let x := α s |
| 109 | let e := trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) x |
| 110 | let coord := e.continuousLinearMapAt ℝ (α s) |
| 111 | have hx : α s ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source := mem_chart_source _ _ |
| 112 | have hframe (v : TangentSpace (𝓡 n) (α s)) : chartFrame x (coord v) (α s) = v := |
| 113 | e.symmL_continuousLinearMapAt hx v |
| 114 | have h₁ := regularizedIndexPairDensity_chart F hM04 T hab htime x α hs hx hα |
| 115 | (coord Y) (coord W) (coord DY) (coord DW) |
| 116 | have h₂ := regularizedIndexPairDensity_chart F hM04 T hab htime x α hs hx hα |
| 117 | (coord W) (coord Y) (coord DW) (coord DY) |
| 118 | simp only [hframe] at h₁ h₂ |
| 119 | rw [h₁, h₂, chartActionMetric_symm_at F T hx s (coord DY) (coord DW)] |
| 120 | congr 1 |
| 121 | exact closedChartJacobiPotential_symm F hM04 T (uniqueDiffOn_Icc hab) htime hx hs |
| 122 | (mem_closure_interior_Icc_prod hab (isOpen_extChartAt_target (I := 𝓡 n) x) hs |
| 123 | ((extChartAt (𝓡 n) x).map_source (by simpa only [extChartAt_source] using hx))) |
| 124 | (deriv ((extChartAt (𝓡 n) x) ∘ α) s) (coord Y) (coord W) |
| 125 | |
| 126 | end PoincareMT.LGeometry |
| 127 |