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.Analysis.Integration.EuclideanGreen |
| 2 | |
| 3 | /-! |
| 4 | # Integrability of a continuous scalar against the weighted test Laplacian |
| 5 | |
| 6 | The test's weighted dual is globally C1 and compactly supported. |
| 7 | Its divergence has the same support bound, even outside the chart. |
| 8 | -/ |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | |
| 12 | open Set MeasureTheory |
| 13 | open scoped ContDiff BigOperators |
| 14 | |
| 15 | namespace PoincareMT.ReducedVolume |
| 16 | |
| 17 | variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] |
| 18 | [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] |
| 19 | {μ : Measure E} [Measure.IsAddHaarMeasure μ] |
| 20 | |
| 21 | omit [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] in |
| 22 | /-- The divergence of a C1 vector field is continuous in a fixed orthonormal basis. -/ |
| 23 | theorem continuous_trace_fderiv {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ E) |
| 24 | {V : E → E} (hV : ContDiff ℝ 1 V) : |
| 25 | Continuous (fun x ↦ LinearMap.trace ℝ E (fderiv ℝ V x).toLinearMap) := by |
| 26 | simp_rw [LinearMap.trace_eq_sum_inner _ b] |
| 27 | exact continuous_finsetSum _ (fun i _ ↦ |
| 28 | continuous_const.inner ((hV.continuous_fderiv one_ne_zero).clm_apply continuous_const)) |
| 29 | |
| 30 | omit [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] in |
| 31 | /-- Differentiation and taking trace do not enlarge closed support. -/ |
| 32 | theorem tsupport_trace_fderiv_subset (V : E → E) : |
| 33 | tsupport (fun x ↦ LinearMap.trace ℝ E (fderiv ℝ V x).toLinearMap) ⊆ tsupport V := by |
| 34 | apply closure_minimal _ (isClosed_tsupport V) |
| 35 | intro x hx |
| 36 | by_contra hnot |
| 37 | apply hx |
| 38 | simp only [fderiv_of_notMem_tsupport ℝ hnot, ContinuousLinearMap.toLinearMap_zero, map_zero] |
| 39 | |
| 40 | /-- The weighted Laplacian of a supported test and its product with a local continuous scalar |
| 41 | are integrable with respect to the coordinate Haar measure. -/ |
| 42 | theorem integrable_mul_trace_weighted_test {ι : Type*} [Fintype ι] |
| 43 | (b : OrthonormalBasis ι ℝ E) {U : Set E} (hU : IsOpen U) |
| 44 | {B : E → E →L[ℝ] E →L[ℝ] ℝ} {ρ u ψ : E → ℝ} |
| 45 | (hB : ContDiffOn ℝ 1 B U) (hρ : ContDiffOn ℝ 1 ρ U) |
| 46 | (hi : ∀ x ∈ U, (B x).IsInvertible) (hu : ContinuousOn u U) |
| 47 | (hψ : ContDiff ℝ 2 ψ) (hc : HasCompactSupport ψ) (hs : tsupport ψ ⊆ U) : |
| 48 | Integrable (fun x ↦ LinearMap.trace ℝ E |
| 49 | (fderiv ℝ (weightedMetricDual B ρ ψ) x).toLinearMap) μ ∧ |
| 50 | Integrable (fun x ↦ u x * LinearMap.trace ℝ E |
| 51 | (fderiv ℝ (weightedMetricDual B ρ ψ) x).toLinearMap) μ := by |
| 52 | have hV := weightedMetricDual_contDiff_of_tsupport_subset hU hB hρ hψ.contDiffOn hi hs |
| 53 | have hcont := continuous_trace_fderiv b hV |
| 54 | have hsup := (tsupport_trace_fderiv_subset (weightedMetricDual B ρ ψ)).trans |
| 55 | (tsupport_weightedMetricDual_subset B ρ ψ) |
| 56 | refine ⟨hcont.integrable_of_hasCompactSupport |
| 57 | (hc.of_isClosed_subset (isClosed_tsupport _) hsup), ?_⟩ |
| 58 | exact integrable_of_continuousOn_of_tsupport_subset hU hc hs |
| 59 | (hu.mul hcont.continuousOn) (tsupport_mul_subset_right.trans hsup) |
| 60 | |
| 61 | end PoincareMT.ReducedVolume |