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.StableDensity |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Measure.Jacobian.JacobianContinuity |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Measure.Density.SourceGaussian |
| 4 | |
| 5 | /-! |
| 6 | # Integrability from actual Gaussian domination |
| 7 | |
| 8 | Continuity is required only on the stable carrier. The source metric |
| 9 | Gaussian is integrable for the same selected basis measure, and the |
| 10 | supplied calibrated identity transfers integrability and the integral |
| 11 | to the actual image. Morgan-Tian Proposition 6.81, pp. 145-146. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter 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 | /-- The actual stable density times any supplied metric Jacobian |
| 27 | is continuous on the source carrier, Lemma 6.71, p. 141. -/ |
| 28 | theorem stableDensity_jacobian_continuousOn |
| 29 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 30 | (H : M14StableSet G T τ x E) (D : M14MeasureJacobianData G T τ x E H) : |
| 31 | ContinuousOn (fun Z => stableReducedVolumeDensity H (H.endpoint_slice_map Z) * |
| 32 | D.jacobian Z) H.carrier := |
| 33 | ((stableReducedVolumeDensity_continuousOn hM04 hM12 H).comp H.endpoint_slice_continuous |
| 34 | (fun Z hZ => ⟨Z, hZ, rfl⟩)).mul (measureData_jacobian_continuousOn D) |
| 35 | |
| 36 | /-- A pointwise Gaussian bound gives both actual source and image |
| 37 | integrability and their exact calibrated integral equality, |
| 38 | Proposition 6.81, pp. 145-146. -/ |
| 39 | theorem stableDensity_integrable_of_gaussian |
| 40 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 41 | (H : M14StableSet G T τ x E) (D : M14MeasureJacobianData G T τ x E H) |
| 42 | (hbound : ∀ Z ∈ H.carrier, |
| 43 | stableReducedVolumeDensity H (H.endpoint_slice_map Z) * D.jacobian Z ≤ |
| 44 | Real.rpow (2 : ℝ) (n : ℝ) * |
| 45 | Real.exp (-G.spacetime.horizontalMetric.inner x Z Z)) : |
| 46 | IntegrableOn (fun Z => stableReducedVolumeDensity H (H.endpoint_slice_map Z) * |
| 47 | D.jacobian Z) H.carrier D.sourceMeasure ∧ |
| 48 | IntegrableOn (stableReducedVolumeDensity H) (H.endpoint_slice_map '' H.carrier) |
| 49 | (calibratedMetricVolume (G.slices (T - τ)).metricOnPoints) ∧ |
| 50 | (∫ Z in H.carrier, stableReducedVolumeDensity H (H.endpoint_slice_map Z) * |
| 51 | D.jacobian Z ∂D.sourceMeasure) = |
| 52 | ∫ q in H.endpoint_slice_map '' H.carrier, stableReducedVolumeDensity H q |
| 53 | ∂calibratedMetricVolume (G.slices (T - τ)).metricOnPoints := by |
| 54 | have hsource : IntegrableOn (fun Z => stableReducedVolumeDensity H (H.endpoint_slice_map Z) * |
| 55 | D.jacobian Z) H.carrier D.sourceMeasure := by |
| 56 | apply (measureData_sourceGaussian_integrable D).integrableOn.mono_nonneg |
| 57 | ((stableDensity_jacobian_continuousOn hM04 hM12 H D).aestronglyMeasurable |
| 58 | D.carrier_measurable) |
| 59 | · exact Eventually.of_forall (fun Z => mul_nonneg |
| 60 | (stableReducedVolumeDensity_nonneg H _) (D.jacobian_nonnegative Z)) |
| 61 | · filter_upwards [ae_restrict_mem D.carrier_measurable] with Z hZ |
| 62 | exact hbound Z hZ |
| 63 | have htransport := D.change_of_variables (stableReducedVolumeDensity H) |
| 64 | (stableReducedVolumeDensity_measurable hM04 hM12 H) |
| 65 | exact ⟨hsource, htransport.1.mp hsource, htransport.2⟩ |
| 66 | |
| 67 | end PoincareMT.M14 |