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.Metric.Hessian.ChartMetricDual |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Measure.Chart.ChartDensityDerivative |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Metric.Trace.WeightedTrace |
| 4 | |
| 5 | /-! |
| 6 | # The frozen Laplacian in actual chart divergence form |
| 7 | |
| 8 | Morgan-Tian (1.1)-(1.4), pp. 4-5, and the Green step of Claim 7.22, |
| 9 | pp. 161-162. The trace uses one frozen normalized frame; its density |
| 10 | is the genuine pullback Gram density used by calibrated transport. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle BigOperators Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.ReducedVolume |
| 21 | |
| 22 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 24 | |
| 25 | set_option backward.isDefEq.respectTransparency false in |
| 26 | /-- The actual density times the frozen Laplacian is the Euclidean divergence of its metric dual. -/ |
| 27 | theorem chart_laplacian_divergence (g : RiemannianMetric n M) (D : LeviCivitaData g) |
| 28 | {f : M → ℝ} (q₀ : M) {y : EuclideanSpace ℝ (Fin n)} |
| 29 | (hy : y ∈ (extChartAt (𝓡 n) q₀).target) |
| 30 | (hf : ContMDiffAt (𝓡 n) (𝓘(ℝ, ℝ)) 2 f ((extChartAt (𝓡 n) q₀).symm y)) : |
| 31 | let e := extChartAt (𝓡 n) q₀ |
| 32 | let B := pullbackMetricForm g e.symm |
| 33 | let ρ := pullbackJacobian g e.symm |
| 34 | let a := fun z ↦ (B z).inverse (fderiv ℝ (f ∘ e.symm) z) |
| 35 | ρ y * D.laplacian f (e.symm y) = |
| 36 | LinearMap.trace ℝ (EuclideanSpace ℝ (Fin n)) |
| 37 | (fderiv ℝ (fun z ↦ ρ z • a z) y).toLinearMap := by |
| 38 | let e := extChartAt (𝓡 n) q₀ |
| 39 | let B := pullbackMetricForm g e.symm |
| 40 | let ρ := pullbackJacobian g e.symm |
| 41 | let a := fun z ↦ (B z).inverse (fderiv ℝ (f ∘ e.symm) z) |
| 42 | let b := EuclideanSpace.basisFun (Fin n) ℝ |
| 43 | have hB : ContDiffAt ℝ 1 B y := |
| 44 | ((chartMetricForm_contDiffOn g q₀).contDiffAt |
| 45 | ((isOpen_extChartAt_target (I := 𝓡 n) q₀).mem_nhds hy)).of_le (by simp) |
| 46 | have hρ : DifferentiableAt ℝ ρ y := |
| 47 | ((chartJacobian_contDiffOn g q₀).contDiffAt |
| 48 | ((isOpen_extChartAt_target (I := 𝓡 n) q₀).mem_nhds hy)).differentiableAt (by simp) |
| 49 | have hD := inverseChart_mfderiv_isInvertible q₀ hy |
| 50 | have hDin : Function.Injective (mfderiv (𝓡 n) (𝓡 n) e.symm y) := by |
| 51 | obtain ⟨L, hL⟩ := hD |
| 52 | rw [← hL] |
| 53 | exact L.injective |
| 54 | obtain ⟨C, hC⟩ := exists_pullback_source_normalization g hD |
| 55 | have hnorm (v w : EuclideanSpace ℝ (Fin n)) : B y (C v) (C w) = inner ℝ v w := by |
| 56 | change g.inner (e.symm y) |
| 57 | (mfderiv (𝓡 n) (𝓡 n) e.symm y (C v)) |
| 58 | (mfderiv (𝓡 n) (𝓡 n) e.symm y (C w)) = _ |
| 59 | rw [hC, hC, metricCoordinates_inner] |
| 60 | have hi := positive_bilinear_isInvertible (B y) |
| 61 | (fun _ hv ↦ chartMetricForm_pos g q₀ hy hv) |
| 62 | have ha : DifferentiableAt ℝ a y := |
| 63 | (metricDual_contDiffAt hB (fixedChart_scalar_contDiffAt q₀ hy hf) hi).differentiableAt |
| 64 | one_ne_zero |
| 65 | have htrace := trace_eq_sum_normalized_metric b (B y) C hnorm (fderiv ℝ a y).toLinearMap |
| 66 | have hlap : D.laplacian f (e.symm y) = |
| 67 | LinearMap.trace ℝ (EuclideanSpace ℝ (Fin n)) (fderiv ℝ a y).toLinearMap + |
| 68 | (∑ i : Fin n, fderiv ℝ B y (a y) (C (b i)) (C (b i))) / 2 := by |
| 69 | rw [← sum_metricCoordinates_hessian g D f (e.symm y), htrace] |
| 70 | rw [Finset.sum_div, ← Finset.sum_add_distrib] |
| 71 | apply Finset.sum_congr rfl |
| 72 | intro i _ |
| 73 | simpa only [e, B, a, b, ContinuousLinearMap.coe_coe, hC] using |
| 74 | chartMetricDual_hessian g D q₀ hy hf (C (b i)) |
| 75 | have hdρ := pullbackJacobian_fderiv_eq g hB hDin C hC (a y) |
| 76 | have hprod := trace_fderiv_smul hρ ha |
| 77 | dsimp only |
| 78 | change ρ y * D.laplacian f (e.symm y) = _ |
| 79 | rw [hprod, hlap, hdρ] |
| 80 | ring |
| 81 | |
| 82 | end PoincareMT.ReducedVolume |