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 | |
| 3 | /-! |
| 4 | # Pulling calibrated almost-everywhere statements into coordinates |
| 5 | |
| 6 | The actual Gram density is strictly positive for a smooth partial |
| 7 | diffeomorphism. The weighted pushforward therefore transports nullity |
| 8 | in both directions on its source, without global chart measurability. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open Set Filter MeasureTheory |
| 14 | open scoped Manifold ContDiff 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 | /-- A calibrated almost-everywhere property holds Lebesgue almost everywhere in a smooth chart. -/ |
| 25 | theorem ae_calibrated_pullback (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 | (hρ : ContinuousOn (pullbackJacobian g e) e.source) |
| 30 | {P : M → Prop} (hP : ∀ᵐ q ∂calibratedMetricVolume g, P q) : |
| 31 | ∀ᵐ y ∂volume, y ∈ e.source → P (e y) := by |
| 32 | let d := fun y ↦ ENNReal.ofReal (pullbackJacobian g e y) |
| 33 | let ν := (volume.withDensity d).restrict e.source |
| 34 | have hm : AEMeasurable e ν := e.continuousOn.aemeasurable e.open_source.measurableSet |
| 35 | have hmap : ∀ᵐ q ∂ν.map e, P q := by |
| 36 | rw [show ν.map e = (calibratedMetricVolume g).restrict e.target from |
| 37 | map_pullbackJacobian_eq_calibratedMetricVolume g e he hei] |
| 38 | exact ae_restrict_of_ae hP |
| 39 | have hw : ∀ᵐ y ∂(volume.restrict e.source).withDensity d, P (e y) := by |
| 40 | have h := ae_of_ae_map hm hmap |
| 41 | simpa only [ν, restrict_withDensity e.open_source.measurableSet] using h |
| 42 | have hd : AEMeasurable d (volume.restrict e.source) := |
| 43 | (hρ.aemeasurable e.open_source.measurableSet).ennreal_ofReal |
| 44 | have heD : e.MDifferentiable (𝓡 n) (𝓡 n) := |
| 45 | ⟨he.mdifferentiableOn one_ne_zero, hei.mdifferentiableOn one_ne_zero⟩ |
| 46 | have hdpos : ∀ᵐ y ∂volume.restrict e.source, d y ≠ 0 := by |
| 47 | filter_upwards [ae_restrict_mem e.open_source.measurableSet] with y hy |
| 48 | exact (ENNReal.ofReal_pos.mpr |
| 49 | (pullbackJacobian_pos g (heD.mfderiv_bijective hy).injective)).ne' |
| 50 | exact (ae_restrict_iff' e.open_source.measurableSet).mp |
| 51 | (hw.filter_mono (withDensity_absolutelyContinuous' hd hdpos).ae_le) |
| 52 | |
| 53 | end PoincareMT.ReducedVolume |