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 Mathlib.MeasureTheory.Integral.IntegrableOn |
| 2 | import Mathlib.Topology.OpenPartialHomeomorph.Basic |
| 3 | |
| 4 | /-! |
| 5 | # Pulling a restricted measure through an actual inverse branch |
| 6 | |
| 7 | The arbitrary total extensions of a partial homeomorphism need not be |
| 8 | measurable. Restriction to its open target makes the inverse measurable |
| 9 | almost everywhere and yields the exact image formula on source subsets. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open MeasureTheory Set |
| 15 | |
| 16 | namespace PoincareMT.ReducedVolume |
| 17 | |
| 18 | variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] |
| 19 | [MeasurableSpace X] [BorelSpace X] [MeasurableSpace Y] [BorelSpace Y] |
| 20 | |
| 21 | /-- The inverse pushforward evaluates to the actual image measure on source subsets. -/ |
| 22 | theorem map_inverse_restrict_apply (e : OpenPartialHomeomorph X Y) (μ : Measure Y) |
| 23 | {A : Set X} (hA : MeasurableSet A) (hAsource : A ⊆ e.source) : |
| 24 | ((μ.restrict e.target).map e.symm) A = μ (e '' A) := by |
| 25 | have hmeas : AEMeasurable e.symm (μ.restrict e.target) := |
| 26 | e.symm.continuousOn.aemeasurable e.open_target.measurableSet |
| 27 | rw [Measure.map_apply_of_aemeasurable hmeas hA, |
| 28 | Measure.restrict_apply' e.open_target.measurableSet, |
| 29 | e.image_eq_target_inter_inv_preimage hAsource, inter_comm] |
| 30 | |
| 31 | end PoincareMT.ReducedVolume |