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.Annulus |
| 2 | import PoincareLib.Geometry.Riemannian.MinimalSurface.Sphere.AreaEnergy |
| 3 | import PoincareLib.Geometry.CurveShortening.Comparison.AreaComparison.Gram.Comparison |
| 4 | |
| 5 | /-! |
| 6 | # Pointwise metric Jacobian comparison under the circle-product projection |
| 7 | |
| 8 | At differentiability points, `M62.CircleProductData.metric_eq` writes the |
| 9 | product Gram matrix as the base Gram matrix plus the circle-column Gram |
| 10 | matrix. `m64_gramDet_add_nonneg` then gives the Jacobian inequality. |
| 11 | |
| 12 | Morgan--Tian context: Section 19.6, Lemmas 19.30-19.31, printed pp. 461-466. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open scoped Manifold ContDiff Bundle |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 25 | {a b : ℝ} {F : RicciFlow n M (Set.Icc a b)} |
| 26 | {circumference : ℝ} (P : M62.CircleProductData F circumference) |
| 27 | |
| 28 | /-- The product metric Gram decomposition bounds the projected Jacobian at every |
| 29 | differentiability point. Source: Auxiliary step for MT Lemma 19.30, p. 462; the actual |
| 30 | half-disk collar in `proof-work/tasks/M64/reports/2026-09-24-sharp-polar-collar.md`. -/ |
| 31 | theorem m64CircleProduct_projected_density_le |
| 32 | (t : ℝ) (f : LoopPlane → P.charts.Point) (z : LoopPlane) |
| 33 | (hf : MDifferentiableAt (𝓡 2) (𝓡 (n + 1)) f z) : |
| 34 | m60AreaDensity (F.metric t) (fun w => (f w).1) z ≤ |
| 35 | m60AreaDensity (P.flow.metric t) f z := by |
| 36 | let := P.charts.chartedSpace |
| 37 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 38 | ⟨(F.metric t).toRiemannianMetric⟩ |
| 39 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 1) : P.circle.Point → Type _) := |
| 40 | ⟨P.circle.metricOnPoints.toRiemannianMetric⟩ |
| 41 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 (n + 1)) : P.charts.Point → Type _) := |
| 42 | ⟨(P.flow.metric t).toRiemannianMetric⟩ |
| 43 | let hfst : ContMDiff (𝓡 (n + 1)) (𝓡 n) ∞ |
| 44 | (Prod.fst : P.charts.Point → M) := |
| 45 | contMDiff_fst.comp P.charts.to_product_smooth |
| 46 | have hcomp (i : Fin 2) : |
| 47 | mfderiv (𝓡 2) (𝓡 n) (fun w => (f w).1) z |
| 48 | (EuclideanSpace.basisFun (Fin 2) ℝ i) = |
| 49 | (P.charts.split (f z) |
| 50 | (mfderiv (𝓡 2) (𝓡 (n + 1)) f z |
| 51 | (EuclideanSpace.basisFun (Fin 2) ℝ i))).1 := by |
| 52 | have h := mfderiv_comp_apply (f := f) (g := (Prod.fst : P.charts.Point → M)) |
| 53 | z (hfst.mdifferentiableAt (by simp)) hf |
| 54 | (EuclideanSpace.basisFun (Fin 2) ℝ i) |
| 55 | rw [P.charts.split_space] |
| 56 | simpa +instances only [Function.comp_def] using h |
| 57 | let e (i : Fin 2) : TangentSpace (𝓡 (n + 1)) (f z) := |
| 58 | mfderiv (𝓡 2) (𝓡 (n + 1)) f z (EuclideanSpace.basisFun (Fin 2) ℝ i) |
| 59 | let b00 : ℝ := (F.metric t).inner (f z).1 (P.charts.split (f z) (e 0)).1 |
| 60 | (P.charts.split (f z) (e 0)).1 |
| 61 | let b01 : ℝ := (F.metric t).inner (f z).1 (P.charts.split (f z) (e 0)).1 |
| 62 | (P.charts.split (f z) (e 1)).1 |
| 63 | let b11 : ℝ := (F.metric t).inner (f z).1 (P.charts.split (f z) (e 1)).1 |
| 64 | (P.charts.split (f z) (e 1)).1 |
| 65 | let s00 : ℝ := P.circle.metricOnPoints.inner (f z).2 |
| 66 | (P.charts.split (f z) (e 0)).2 (P.charts.split (f z) (e 0)).2 |
| 67 | let s01 : ℝ := P.circle.metricOnPoints.inner (f z).2 |
| 68 | (P.charts.split (f z) (e 0)).2 (P.charts.split (f z) (e 1)).2 |
| 69 | let s11 : ℝ := P.circle.metricOnPoints.inner (f z).2 |
| 70 | (P.charts.split (f z) (e 1)).2 (P.charts.split (f z) (e 1)).2 |
| 71 | have hb00 : 0 ≤ b00 := by |
| 72 | exact (F.metric t).toRiemannianMetric.toCore (f z).1 |>.re_inner_nonneg _ |
| 73 | have hb11 : 0 ≤ b11 := by |
| 74 | exact (F.metric t).toRiemannianMetric.toCore (f z).1 |>.re_inner_nonneg _ |
| 75 | have hs00 : 0 ≤ s00 := by |
| 76 | exact P.circle.metricOnPoints.toRiemannianMetric.toCore (f z).2 |>.re_inner_nonneg _ |
| 77 | have hs11 : 0 ≤ s11 := by |
| 78 | exact P.circle.metricOnPoints.toRiemannianMetric.toCore (f z).2 |>.re_inner_nonneg _ |
| 79 | have hbdet : b01 ^ 2 ≤ b00 * b11 := by |
| 80 | dsimp [b00, b01, b11] |
| 81 | change (inner ℝ (P.charts.split (f z) (e 0)).1 |
| 82 | (P.charts.split (f z) (e 1)).1) ^ 2 ≤ |
| 83 | inner ℝ (P.charts.split (f z) (e 0)).1 |
| 84 | (P.charts.split (f z) (e 0)).1 * |
| 85 | inner ℝ (P.charts.split (f z) (e 1)).1 |
| 86 | (P.charts.split (f z) (e 1)).1 |
| 87 | simpa only [pow_two] using real_inner_mul_inner_self_le |
| 88 | (P.charts.split (f z) (e 0)).1 (P.charts.split (f z) (e 1)).1 |
| 89 | have hsdet : s01 ^ 2 ≤ s00 * s11 := by |
| 90 | dsimp [s00, s01, s11] |
| 91 | change (inner ℝ (P.charts.split (f z) (e 0)).2 |
| 92 | (P.charts.split (f z) (e 1)).2) ^ 2 ≤ |
| 93 | inner ℝ (P.charts.split (f z) (e 0)).2 |
| 94 | (P.charts.split (f z) (e 0)).2 * |
| 95 | inner ℝ (P.charts.split (f z) (e 1)).2 |
| 96 | (P.charts.split (f z) (e 1)).2 |
| 97 | simpa only [pow_two] using real_inner_mul_inner_self_le |
| 98 | (P.charts.split (f z) (e 0)).2 (P.charts.split (f z) (e 1)).2 |
| 99 | have hB00 : m60AreaGram (F.metric t) (fun w => (f w).1) z 0 0 = b00 := by |
| 100 | simp only [m60AreaGram] |
| 101 | change (F.metric t).inner (f z).1 |
| 102 | (mfderiv (𝓡 2) (𝓡 n) (fun w => (f w).1) z |
| 103 | (EuclideanSpace.basisFun (Fin 2) ℝ 0)) |
| 104 | (mfderiv (𝓡 2) (𝓡 n) (fun w => (f w).1) z |
| 105 | (EuclideanSpace.basisFun (Fin 2) ℝ 0)) = b00 |
| 106 | rw [hcomp 0] |
| 107 | have hB01 : m60AreaGram (F.metric t) (fun w => (f w).1) z 0 1 = b01 := by |
| 108 | simp only [m60AreaGram] |
| 109 | change (F.metric t).inner (f z).1 |
| 110 | (mfderiv (𝓡 2) (𝓡 n) (fun w => (f w).1) z |
| 111 | (EuclideanSpace.basisFun (Fin 2) ℝ 0)) |
| 112 | (mfderiv (𝓡 2) (𝓡 n) (fun w => (f w).1) z |
| 113 | (EuclideanSpace.basisFun (Fin 2) ℝ 1)) = b01 |
| 114 | rw [hcomp 0, hcomp 1] |
| 115 | have hB11 : m60AreaGram (F.metric t) (fun w => (f w).1) z 1 1 = b11 := by |
| 116 | simp only [m60AreaGram] |
| 117 | change (F.metric t).inner (f z).1 |
| 118 | (mfderiv (𝓡 2) (𝓡 n) (fun w => (f w).1) z |
| 119 | (EuclideanSpace.basisFun (Fin 2) ℝ 1)) |
| 120 | (mfderiv (𝓡 2) (𝓡 n) (fun w => (f w).1) z |
| 121 | (EuclideanSpace.basisFun (Fin 2) ℝ 1)) = b11 |
| 122 | rw [hcomp 1] |
| 123 | have hG00 : m60AreaGram (P.flow.metric t) f z 0 0 = b00 + s00 := by |
| 124 | simp [m60AreaGram, e, b00, s00, P.metric_eq] |
| 125 | have hG01 : m60AreaGram (P.flow.metric t) f z 0 1 = b01 + s01 := by |
| 126 | simp [m60AreaGram, e, b01, s01, P.metric_eq] |
| 127 | have hG11 : m60AreaGram (P.flow.metric t) f z 1 1 = b11 + s11 := by |
| 128 | simp [m60AreaGram, e, b11, s11, P.metric_eq] |
| 129 | have hdet : |
| 130 | Matrix.det (m60AreaGram (F.metric t) (fun w => (f w).1) z) ≤ |
| 131 | Matrix.det (m60AreaGram (P.flow.metric t) f z) := by |
| 132 | rw [Matrix.det_fin_two, Matrix.det_fin_two] |
| 133 | rw [m60AreaGram_symm (F.metric t) (fun w => (f w).1) z 1 0] |
| 134 | rw [m60AreaGram_symm (P.flow.metric t) f z 1 0] |
| 135 | rw [hB00, hB11, hB01, hG00, hG11, hG01] |
| 136 | simpa only [pow_two] using |
| 137 | (m64_gramDet_add_nonneg hb00 hb11 hs00 hs11 hbdet hsdet) |
| 138 | unfold m60AreaDensity |
| 139 | exact Real.sqrt_le_sqrt (max_le_max (le_refl _) hdet) |
| 140 | |
| 141 | end PoincareMT |