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.Measure.Transport.CalibratedPushforward |
| 2 | import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap |
| 3 | |
| 4 | /-! |
| 5 | # Bochner transport for the actual calibrated chart density |
| 6 | |
| 7 | The proved measure pushforward also transports signed integrability |
| 8 | and integrals. Both sides retain their chart restrictions, since the |
| 9 | inverse chart and its density are totalized outside the chart domain. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set MeasureTheory |
| 15 | open scoped Manifold ContDiff ENNReal |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.ReducedVolume |
| 20 | |
| 21 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 23 | [T3Space M] [MeasurableSpace M] [BorelSpace M] |
| 24 | |
| 25 | /-- Signed integrability is equivalent to integrability of the weighted chart pullback. -/ |
| 26 | theorem integrableOn_calibrated_iff_pullback (g : RiemannianMetric n M) |
| 27 | (e : OpenPartialHomeomorph (EuclideanSpace ℝ (Fin n)) M) |
| 28 | (he : ContMDiffOn (𝓡 n) (𝓡 n) 1 e e.source) |
| 29 | (hei : ContMDiffOn (𝓡 n) (𝓡 n) 1 e.symm e.target) |
| 30 | (hρ : ContinuousOn (pullbackJacobian g e) e.source) {f : M → ℝ} |
| 31 | (hf : AEStronglyMeasurable f ((calibratedMetricVolume g).restrict e.target)) : |
| 32 | IntegrableOn f e.target (calibratedMetricVolume g) ↔ |
| 33 | IntegrableOn (fun y ↦ pullbackJacobian g e y * f (e y)) e.source volume := by |
| 34 | have hmap := map_pullbackJacobian_eq_calibratedMetricVolume g e he hei |
| 35 | have hm := e.continuousOn.aemeasurable (μ := volume.withDensity |
| 36 | (fun y ↦ ENNReal.ofReal (pullbackJacobian g e y))) e.open_source.measurableSet |
| 37 | have hf' := hf |
| 38 | rw [← hmap] at hf' |
| 39 | change Integrable f _ ↔ _ |
| 40 | rw [← hmap, integrable_map_measure hf' hm, restrict_withDensity e.open_source.measurableSet] |
| 41 | rw [integrable_withDensity_iff_integrable_smul₀' |
| 42 | (hρ.aemeasurable e.open_source.measurableSet).ennreal_ofReal |
| 43 | (Filter.Eventually.of_forall (fun _ ↦ ENNReal.ofReal_lt_top))] |
| 44 | simp only [Function.comp_apply, ENNReal.toReal_ofReal (pullbackJacobian_nonneg g e _), |
| 45 | smul_eq_mul, IntegrableOn] |
| 46 | |
| 47 | /-- Signed integrals use exactly the produced Gram density. -/ |
| 48 | theorem integralOn_calibrated_eq_pullback (g : RiemannianMetric n M) |
| 49 | (e : OpenPartialHomeomorph (EuclideanSpace ℝ (Fin n)) M) |
| 50 | (he : ContMDiffOn (𝓡 n) (𝓡 n) 1 e e.source) |
| 51 | (hei : ContMDiffOn (𝓡 n) (𝓡 n) 1 e.symm e.target) |
| 52 | (hρ : ContinuousOn (pullbackJacobian g e) e.source) {f : M → ℝ} |
| 53 | (hf : AEStronglyMeasurable f ((calibratedMetricVolume g).restrict e.target)) : |
| 54 | (∫ q in e.target, f q ∂calibratedMetricVolume g) = |
| 55 | ∫ y in e.source, pullbackJacobian g e y * f (e y) := by |
| 56 | have hmap := map_pullbackJacobian_eq_calibratedMetricVolume g e he hei |
| 57 | have hm := e.continuousOn.aemeasurable (μ := volume.withDensity |
| 58 | (fun y ↦ ENNReal.ofReal (pullbackJacobian g e y))) e.open_source.measurableSet |
| 59 | rw [← hmap] at hf ⊢ |
| 60 | rw [integral_map hm hf, setIntegral_withDensity_eq_setIntegral_toReal_smul₀ |
| 61 | (hρ.aemeasurable e.open_source.measurableSet).ennreal_ofReal |
| 62 | (Filter.Eventually.of_forall (fun _ ↦ ENNReal.ofReal_lt_top)) |
| 63 | (fun y ↦ f (e y)) e.open_source.measurableSet] |
| 64 | simp only [ENNReal.toReal_ofReal (pullbackJacobian_nonneg g e _), smul_eq_mul] |
| 65 | |
| 66 | end PoincareMT.ReducedVolume |