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.ReducedVolume.WeakInequality.Comparison.SemiconcaveWeakComparison |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Measure.Chart.ChartNullPullback |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Metric.Hessian.LaplacianContinuity |
| 4 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Measure.Chart.SupportedIntegralTransport |
| 5 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Measure.Chart.SupportedPullbackIntegrable |
| 6 | |
| 7 | /-! |
| 8 | # The local calibrated weak comparison |
| 9 | |
| 10 | Morgan-Tian Claim 7.22 and Corollary 7.24. The coordinate comparison |
| 11 | uses the actual metric coefficients and positive Gram density. The |
| 12 | signed calibrated pushforward then restores the original manifold test. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set Filter Metric MeasureTheory |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.ReducedVolume |
| 23 | |
| 24 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 26 | [T3Space M] [MeasurableSpace M] [BorelSpace M] |
| 27 | |
| 28 | noncomputable local instance chartWeakBilinearNormedAddCommGroup : NormedAddCommGroup |
| 29 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) := |
| 30 | ContinuousLinearMap.toNormedAddCommGroup |
| 31 | |
| 32 | noncomputable local instance chartWeakBilinearNormedSpace : NormedSpace ℝ |
| 33 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) := |
| 34 | ContinuousLinearMap.toNormedSpace |
| 35 | |
| 36 | set_option backward.isDefEq.respectTransparency false in |
| 37 | /-- A semiconcave chart scalar with an almost-everywhere upper Laplacian bound satisfies |
| 38 | the original calibrated compact-test comparison on the inner chart neighborhood. -/ |
| 39 | theorem calibrated_weak_comparison_in_chart (g : RiemannianMetric n M) (D : LeviCivitaData g) |
| 40 | (q₀ : M) {u H φ : M → ℝ} (hu : Continuous u) (hH : Measurable H) |
| 41 | {r K S A : ℝ} (hr : 0 < r) (hK : 0 ≤ K) (hS : 0 ≤ S) (_hA : 0 ≤ A) |
| 42 | (htarget : ball (extChartAt (𝓡 n) q₀ q₀) (4 * r) ⊆ (extChartAt (𝓡 n) q₀).target) |
| 43 | (hconc : ConcaveOn ℝ (ball (extChartAt (𝓡 n) q₀ q₀) (4 * r)) |
| 44 | (fun y ↦ u ((extChartAt (𝓡 n) q₀).symm y) - K * ‖y‖ ^ 2 / 2)) |
| 45 | (hcoeff : ∀ y ∈ ball (extChartAt (𝓡 n) q₀ q₀) (4 * r), |
| 46 | ‖fderiv ℝ (pullbackMetricForm g (extChartAt (𝓡 n) q₀).symm) y‖ ≤ S ∧ |
| 47 | ‖(pullbackMetricForm g (extChartAt (𝓡 n) q₀).symm y).inverse‖ ≤ S ∧ |
| 48 | pullbackJacobian g (extChartAt (𝓡 n) q₀).symm y ≤ S ∧ |
| 49 | ‖fderiv ℝ (pullbackJacobian g (extChartAt (𝓡 n) q₀).symm) y‖ ≤ S) |
| 50 | (hregular : ∀ᵐ q ∂calibratedMetricVolume g, |
| 51 | ContMDiffAt (𝓡 n) (𝓘(ℝ, ℝ)) 2 u q ∧ D.laplacian u q ≤ H q) |
| 52 | (hbound : ∀ᵐ q ∂calibratedMetricVolume g, |
| 53 | q ∈ (extChartAt (𝓡 n) q₀).source → |
| 54 | extChartAt (𝓡 n) q₀ q ∈ ball (extChartAt (𝓡 n) q₀ q₀) (4 * r) → |H q| ≤ A) |
| 55 | (hφ : ContMDiff (𝓡 n) (𝓘(ℝ, ℝ)) ∞ φ) (hc : HasCompactSupport φ) |
| 56 | (hs : tsupport φ ⊆ (extChartAt (𝓡 n) q₀).source ∩ |
| 57 | (extChartAt (𝓡 n) q₀) ⁻¹' ball (extChartAt (𝓡 n) q₀ q₀) r) |
| 58 | (hpos : ∀ q, 0 ≤ φ q) : |
| 59 | Integrable (fun q ↦ φ q * H q - u q * D.laplacian φ q) (calibratedMetricVolume g) ∧ |
| 60 | 0 ≤ ∫ q, φ q * H q - u q * D.laplacian φ q ∂calibratedMetricVolume g := by |
| 61 | let e := chartAt (EuclideanSpace ℝ (Fin n)) q₀ |
| 62 | let B := pullbackMetricForm g e.symm |
| 63 | let ρ := pullbackJacobian g e.symm |
| 64 | let uc := u ∘ e.symm |
| 65 | let ψ := chartSupportedTest e φ |
| 66 | let v := fun y ↦ LinearMap.trace ℝ (EuclideanSpace ℝ (Fin n)) |
| 67 | (fderiv ℝ (weightedMetricDual B ρ ψ) y).toLinearMap |
| 68 | have heT : (extChartAt (𝓡 n) q₀).target = e.target := by |
| 69 | simp only [extChartAt_target, modelWithCornersSelf_coe_symm, modelWithCornersSelf_coe, |
| 70 | preimage_id, range_id, inter_univ, e] |
| 71 | have heS : (extChartAt (𝓡 n) q₀).source = e.source := extChartAt_source _ _ |
| 72 | have hefun : ⇑(extChartAt (𝓡 n) q₀) = e := by |
| 73 | simp only [extChartAt_coe, modelWithCornersSelf_coe, Function.id_comp, e] |
| 74 | have heinv : ⇑(extChartAt (𝓡 n) q₀).symm = e.symm := by |
| 75 | simp only [extChartAt_coe_symm, modelWithCornersSelf_coe_symm, Function.comp_id, e] |
| 76 | simp only [hefun, heinv, heS, heT] at htarget hconc hcoeff hbound hs |
| 77 | have he (y : EuclideanSpace ℝ (Fin n)) (hy : y ∈ e.target) : |
| 78 | y ∈ (extChartAt (𝓡 n) q₀).target := heT.symm ▸ hy |
| 79 | have hec : ContMDiffOn (𝓡 n) (𝓡 n) 1 e.symm e.target := contMDiffOn_chart_symm |
| 80 | have heci : ContMDiffOn (𝓡 n) (𝓡 n) 1 e e.source := contMDiffOn_chart |
| 81 | have hB : ContDiffOn ℝ 1 B e.target := by |
| 82 | simpa only [heT, heinv] using (chartMetricForm_contDiffOn g q₀).of_le |
| 83 | (by decide : (1 : ℕ∞ω) ≤ ∞) |
| 84 | have hρ : ContDiffOn ℝ 1 ρ e.target := by |
| 85 | simpa only [heT, heinv] using (chartJacobian_contDiffOn g q₀).of_le |
| 86 | (by decide : (1 : ℕ∞ω) ≤ ∞) |
| 87 | have hsmall : ball (e q₀) r ⊆ ball (e q₀) (4 * r) := ball_subset_ball (by linarith) |
| 88 | have hballT : ball (e q₀) (4 * r) ⊆ e.target := htarget |
| 89 | have hscalar {f : M → ℝ} {y : EuclideanSpace ℝ (Fin n)} (hy : y ∈ e.target) |
| 90 | (hf : ContMDiffAt (𝓡 n) (𝓘(ℝ, ℝ)) 2 f (e.symm y)) : |
| 91 | ContDiffAt ℝ 2 (f ∘ e.symm) y := by |
| 92 | have hf' : ContMDiffAt (𝓡 n) (𝓘(ℝ, ℝ)) 2 f ((extChartAt (𝓡 n) q₀).symm y) := |
| 93 | heinv.symm ▸ hf |
| 94 | simpa only [heinv] using fixedChart_scalar_contDiffAt q₀ (he y hy) hf' |
| 95 | have hdiv {f : M → ℝ} {y : EuclideanSpace ℝ (Fin n)} (hy : y ∈ e.target) |
| 96 | (hf : ContMDiffAt (𝓡 n) (𝓘(ℝ, ℝ)) 2 f (e.symm y)) : |
| 97 | ρ y * D.laplacian f (e.symm y) = LinearMap.trace ℝ (EuclideanSpace ℝ (Fin n)) |
| 98 | (fderiv ℝ (weightedMetricDual B ρ (f ∘ e.symm)) y).toLinearMap := by |
| 99 | have hf' : ContMDiffAt (𝓡 n) (𝓘(ℝ, ℝ)) 2 f ((extChartAt (𝓡 n) q₀).symm y) := |
| 100 | heinv.symm ▸ hf |
| 101 | unfold weightedMetricDual |
| 102 | simpa only [heinv] using chart_laplacian_divergence g D q₀ (he y hy) hf' |
| 103 | have hsφ : tsupport φ ⊆ e.source := fun q hq ↦ (hs hq).1 |
| 104 | have hsψ := chartSupportedTest_support e hc hsφ |
| 105 | have hψball : tsupport ψ ⊆ ball (e q₀) r := by |
| 106 | intro y hy |
| 107 | obtain ⟨q, hq, rfl⟩ := hsψ.2.1 hy |
| 108 | exact (hs hq).2 |
| 109 | have hφ2 := hφ.of_le (by decide : (2 : ℕ∞ω) ≤ ∞) |
| 110 | have hψ : ContDiff ℝ 2 ψ := chartSupportedTest_contDiff e hc hsφ |
| 111 | (fun y hy ↦ (hscalar hy (hφ2 (e.symm y))).contDiffWithinAt) |
| 112 | have hψpos (y : EuclideanSpace ℝ (Fin n)) : 0 ≤ ψ y := by |
| 113 | by_cases hy : y ∈ e.target |
| 114 | · simpa only [ψ, chartSupportedTest, indicator_of_mem hy, Function.comp_apply] using |
| 115 | hpos (e.symm y) |
| 116 | · simp only [ψ, chartSupportedTest, indicator_of_notMem hy, le_refl] |
| 117 | have hregc := ae_calibrated_pullback g e.symm hec heci hρ.continuousOn hregular |
| 118 | have hboundc := ae_calibrated_pullback g e.symm hec heci hρ.continuousOn hbound |
| 119 | have hHprod : Integrable (fun y ↦ ψ y * (ρ y * H (e.symm y))) volume := by |
| 120 | apply integrable_supported_pullback e (A := S * A) |
| 121 | hψ.continuous hsψ.1 hsψ.2.2 hρ.continuousOn hH |
| 122 | filter_upwards [hboundc] with y hy hys |
| 123 | have hyball := hsmall (hψball hys) |
| 124 | have hyT := hballT hyball |
| 125 | have hHy : |H (e.symm y)| ≤ A := |
| 126 | hy hyT (e.map_target hyT) (by simpa only [e.right_inv hyT] using hyball) |
| 127 | rw [abs_mul, abs_of_nonneg (pullbackJacobian_nonneg g e.symm y)] |
| 128 | exact mul_le_mul (hcoeff y hyball).2.2.1 hHy (abs_nonneg _) hS |
| 129 | have hi (y : EuclideanSpace ℝ (Fin n)) (hy : y ∈ ball (e q₀) r) : (B y).IsInvertible := by |
| 130 | apply positive_bilinear_isInvertible _ |
| 131 | intro v hv |
| 132 | simpa only [heinv] using chartMetricForm_pos g q₀ (he y (hballT (hsmall hy))) hv |
| 133 | have hframe (y : EuclideanSpace ℝ (Fin n)) (hy : y ∈ ball (e q₀) r) : |
| 134 | ∃ C : EuclideanSpace ℝ (Fin n) ≃L[ℝ] EuclideanSpace ℝ (Fin n), |
| 135 | ∀ v w, B y (C v) (C w) = inner ℝ v w := by |
| 136 | have hD : (mfderiv (𝓡 n) (𝓡 n) e.symm y).IsInvertible := by |
| 137 | exact (congrArg (fun f : EuclideanSpace ℝ (Fin n) → M ↦ |
| 138 | (mfderiv (𝓡 n) (𝓡 n) f y).IsInvertible) heinv).mp |
| 139 | (inverseChart_mfderiv_isInvertible q₀ (he y (hballT (hsmall hy)))) |
| 140 | obtain ⟨C, hC⟩ := exists_pullback_source_normalization g hD |
| 141 | refine ⟨C, fun v w ↦ ?_⟩ |
| 142 | change g.inner (e.symm y) (mfderiv (𝓡 n) (𝓡 n) e.symm y (C v)) |
| 143 | (mfderiv (𝓡 n) (𝓡 n) e.symm y (C w)) = _ |
| 144 | rw [hC, hC, metricCoordinates_inner] |
| 145 | have hweak := integral_weighted_comparison_of_semiconcave (μ := volume) |
| 146 | (EuclideanSpace.basisFun (Fin n) ℝ) hr hK hS |
| 147 | (hu.continuousOn.comp (e.symm.continuousOn.mono hballT) (fun _ _ ↦ mem_univ _)) |
| 148 | hconc (hB.mono (hsmall.trans hballT)) (hρ.mono (hsmall.trans hballT)) hi |
| 149 | (fun y _ v w ↦ g.symm _ _ _) hframe |
| 150 | (fun y hy ↦ ⟨(hcoeff y (hsmall hy)).1, (hcoeff y (hsmall hy)).2.1, |
| 151 | pullbackJacobian_nonneg g e.symm y, (hcoeff y (hsmall hy)).2.2⟩) |
| 152 | (show ∀ᵐ y ∂volume, y ∈ ball (e q₀) r → ContDiffAt ℝ 2 uc y ∧ |
| 153 | LinearMap.trace ℝ (EuclideanSpace ℝ (Fin n)) |
| 154 | (fderiv ℝ (weightedMetricDual B ρ uc) y).toLinearMap ≤ ρ y * H (e.symm y) by |
| 155 | filter_upwards [hregc] with y hy hyball |
| 156 | have hyT := hballT (hsmall hyball) |
| 157 | obtain ⟨huy, huH⟩ := hy hyT |
| 158 | refine ⟨hscalar hyT huy, ?_⟩ |
| 159 | rw [← hdiv hyT huy] |
| 160 | exact mul_le_mul_of_nonneg_left huH (pullbackJacobian_nonneg g e.symm y)) |
| 161 | hψ hsψ.1 hψball hψpos hHprod |
| 162 | have hvsub : tsupport v ⊆ tsupport ψ := |
| 163 | (tsupport_trace_fderiv_subset _).trans (tsupport_weightedMetricDual_subset B ρ ψ) |
| 164 | let a := fun y ↦ ψ y * (ρ y * H (e.symm y)) - uc y * v y |
| 165 | have htransport := supported_calibrated_integral_transport g e.symm hec heci hρ.continuousOn |
| 166 | (((hφ.continuous.measurable.mul hH).sub |
| 167 | (hu.measurable.mul (continuous_laplacian D hφ2).measurable)).aestronglyMeasurable) |
| 168 | (show ∀ q ∉ e.source, φ q * H q - u q * D.laplacian φ q = 0 by |
| 169 | intro q hq |
| 170 | have hqs : q ∉ tsupport φ := fun h ↦ hq (hsφ h) |
| 171 | have hql : q ∉ tsupport (D.laplacian φ) := fun h ↦ hqs (tsupport_laplacian_subset D φ h) |
| 172 | simp only [image_eq_zero_of_notMem_tsupport hqs, image_eq_zero_of_notMem_tsupport hql, |
| 173 | zero_mul, mul_zero, sub_self]) |
| 174 | (hHprod.sub hweak.1) |
| 175 | (show ∀ y ∉ e.target, a y = 0 by |
| 176 | intro y hy |
| 177 | have hys : y ∉ tsupport ψ := fun h ↦ hy (hsψ.2.2 h) |
| 178 | have hyv : y ∉ tsupport v := fun h ↦ hys (hvsub h) |
| 179 | simp only [a, image_eq_zero_of_notMem_tsupport hys, image_eq_zero_of_notMem_tsupport hyv, |
| 180 | zero_mul, mul_zero, sub_self]) |
| 181 | (show ∀ y ∈ e.target, ρ y * (φ (e.symm y) * H (e.symm y) - |
| 182 | u (e.symm y) * D.laplacian φ (e.symm y)) = a y by |
| 183 | intro y hy |
| 184 | have hψeq := chartSupportedTest_eventuallyEq e φ hy |
| 185 | have hdual : weightedMetricDual B ρ ψ =ᶠ[𝓝 y] weightedMetricDual B ρ (φ ∘ e.symm) := by |
| 186 | filter_upwards [hψeq.fderiv (𝕜 := ℝ)] with z hz |
| 187 | simp only [weightedMetricDual, ψ, hz] |
| 188 | have hv : v y = ρ y * D.laplacian φ (e.symm y) := by |
| 189 | dsimp only [v] |
| 190 | rw [hdual.fderiv_eq] |
| 191 | exact (hdiv hy (hφ2 (e.symm y))).symm |
| 192 | dsimp only [a, uc, Function.comp_apply] |
| 193 | rw [hv, show ψ y = φ (e.symm y) from hψeq.eq_of_nhds] |
| 194 | ring) |
| 195 | refine ⟨htransport.1, ?_⟩ |
| 196 | have hint : (∫ q, φ q * H q - u q * D.laplacian φ q ∂calibratedMetricVolume g) = ∫ y, a y := |
| 197 | htransport.2 |
| 198 | rw [hint, integral_sub hHprod hweak.1] |
| 199 | exact sub_nonneg.mpr hweak.2 |
| 200 | |
| 201 | end PoincareMT.ReducedVolume |