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.Generalized.ReducedGeometry.Measure.Density.DensityIntegrability |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Measure.Transport.SubsetTransport |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Rescaling.Measure.RescalingMeasureBasis |
| 4 | |
| 5 | /-! |
| 6 | # Comparison on one fixed source measure |
| 7 | |
| 8 | A prescribed orthonormal basis gives the same source coordinate measure |
| 9 | at every time. Restricted calibrated transport then integrates the |
| 10 | pointwise weighted-Jacobian comparison on any measurable source subset. |
| 11 | Morgan-Tian Proposition 6.81, pp. 145-146. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set MeasureTheory |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | {T τ σ : ℝ} {x : G.Point} {E : M14ExponentialFamily G T x} |
| 25 | |
| 26 | /-- Prescribing the initial basis makes the source measures identical, |
| 27 | as required when integrating equation 6.21, p. 146. -/ |
| 28 | theorem prescribedBasis_sourceMeasure_eq (H : M14StableSet G T τ x E) |
| 29 | (Hσ : M14StableSet G T σ x E) |
| 30 | (b : Module.Basis (Fin n) ℝ (G.Horizontal x)) |
| 31 | (hb : ∀ i j, G.spacetime.horizontalMetric.inner x (b i) (b j) = |
| 32 | if i = j then 1 else 0) : |
| 33 | (rescalingMeasureDataWithBasis H b hb).sourceMeasure = |
| 34 | (rescalingMeasureDataWithBasis Hσ b hb).sourceMeasure := rfl |
| 35 | |
| 36 | /-- The genuine stable-image integrals inherit a pointwise source |
| 37 | comparison whenever both Jacobians use the same source measure, |
| 38 | Proposition 6.81, pp. 145-146. -/ |
| 39 | theorem stableDensity_integral_mono |
| 40 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 41 | (H : M14StableSet G T τ x E) (Hσ : M14StableSet G T σ x E) |
| 42 | (D : M14MeasureJacobianData G T τ x E H) |
| 43 | (Dσ : M14MeasureJacobianData G T σ x E Hσ) |
| 44 | (hμ : D.sourceMeasure = Dσ.sourceMeasure) |
| 45 | {W : Set (G.Horizontal x)} (hW : W ⊆ H.carrier) (hWσ : W ⊆ Hσ.carrier) |
| 46 | (hm : MeasurableSet W) |
| 47 | (hi : IntegrableOn (fun Z => stableReducedVolumeDensity H (H.endpoint_slice_map Z) * |
| 48 | D.jacobian Z) W D.sourceMeasure) |
| 49 | (hiσ : IntegrableOn (fun Z => stableReducedVolumeDensity Hσ (Hσ.endpoint_slice_map Z) * |
| 50 | Dσ.jacobian Z) W Dσ.sourceMeasure) |
| 51 | (hle : ∀ Z ∈ W, |
| 52 | stableReducedVolumeDensity H (H.endpoint_slice_map Z) * D.jacobian Z ≤ |
| 53 | stableReducedVolumeDensity Hσ (Hσ.endpoint_slice_map Z) * Dσ.jacobian Z) : |
| 54 | (∫ q in H.endpoint_slice_map '' W, stableReducedVolumeDensity H q |
| 55 | ∂calibratedMetricVolume (G.slices (T - τ)).metricOnPoints) ≤ |
| 56 | (∫ q in Hσ.endpoint_slice_map '' W, stableReducedVolumeDensity Hσ q |
| 57 | ∂calibratedMetricVolume (G.slices (T - σ)).metricOnPoints) := by |
| 58 | rw [← (measureData_change_of_variables_subset D hW hm _ |
| 59 | (stableReducedVolumeDensity_measurable hM04 hM12 H)).2, |
| 60 | ← (measureData_change_of_variables_subset Dσ hWσ hm _ |
| 61 | (stableReducedVolumeDensity_measurable hM04 hM12 Hσ)).2] |
| 62 | rw [hμ] at hi ⊢ |
| 63 | exact setIntegral_mono_on hi hiσ hm hle |
| 64 | |
| 65 | end PoincareMT.M14 |