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.CalibratedTransport |
| 2 | import Mathlib.MeasureTheory.Integral.Lebesgue.Map |
| 3 | |
| 4 | /-! |
| 5 | # Pushforward of the actual coordinate Jacobian measure |
| 6 | |
| 7 | The geometric image formula gives equality of the actual measures. The |
| 8 | nonnegative integration identity retains its ae-measurable test function. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open Set MeasureTheory |
| 14 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.ReducedVolume |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 22 | [T3Space M] [MeasurableSpace M] [BorelSpace M] |
| 23 | |
| 24 | /-- The actual pullback Gram density pushes forward to calibrated intrinsic volume. -/ |
| 25 | theorem map_pullbackJacobian_eq_calibratedMetricVolume (g : RiemannianMetric n M) |
| 26 | (e : OpenPartialHomeomorph (EuclideanSpace ℝ (Fin n)) M) |
| 27 | (he : ContMDiffOn (𝓡 n) (𝓡 n) 1 e e.source) |
| 28 | (hei : ContMDiffOn (𝓡 n) (𝓡 n) 1 e.symm e.target) : |
| 29 | ((volume.withDensity (fun y ↦ ENNReal.ofReal (pullbackJacobian g e y))).restrict |
| 30 | e.source).map e = (calibratedMetricVolume g).restrict e.target := by |
| 31 | let ν := volume.withDensity (fun y ↦ ENNReal.ofReal (pullbackJacobian g e y)) |
| 32 | have hmeas : AEMeasurable e (ν.restrict e.source) := |
| 33 | e.continuousOn.aemeasurable e.open_source.measurableSet |
| 34 | ext B hB |
| 35 | rw [Measure.map_apply_of_aemeasurable hmeas hB, |
| 36 | Measure.restrict_apply' e.open_source.measurableSet, Measure.restrict_apply hB] |
| 37 | have hsub : MeasurableSet ((Subtype.val : e.source → EuclideanSpace ℝ (Fin n)) ⁻¹' |
| 38 | (e ⁻¹' B)) := hB.preimage e.continuousOn.domRestrict.measurable |
| 39 | have hA : MeasurableSet (e ⁻¹' B ∩ e.source) := by |
| 40 | simpa only [Subtype.range_coe] using |
| 41 | (MeasurableEmbedding.subtype_coe e.open_source.measurableSet).measurableSet_preimage.mp hsub |
| 42 | have himage := calibratedMetricVolume_image_eq_withDensity g e he hei hA inter_subset_right |
| 43 | rw [image_preimage_inter, e.image_source_eq_target] at himage |
| 44 | exact himage.symm |
| 45 | |
| 46 | /-- Integration against calibrated volume is integration against the produced Jacobian measure. -/ |
| 47 | theorem lintegral_calibratedMetricVolume_eq_pullbackJacobian |
| 48 | (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 | {F : M → ℝ≥0∞} |
| 53 | (hF : AEMeasurable F ((calibratedMetricVolume g).restrict e.target)) : |
| 54 | ∫⁻ q in e.target, F q ∂calibratedMetricVolume g = |
| 55 | ∫⁻ y in e.source, F (e y) |
| 56 | ∂volume.withDensity (fun y ↦ ENNReal.ofReal (pullbackJacobian g e y)) := by |
| 57 | have hmap := map_pullbackJacobian_eq_calibratedMetricVolume g e he hei |
| 58 | rw [← hmap] at hF ⊢ |
| 59 | exact lintegral_map' hF (e.continuousOn.aemeasurable e.open_source.measurableSet) |
| 60 | |
| 61 | end PoincareMT.ReducedVolume |