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.GaussianBound |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Measure.Density.DensityIntegrability |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Rescaling.Measure.RescalingMeasureBasis |
| 4 | |
| 5 | /-! |
| 6 | # The actual stable density on one fixed source space |
| 7 | |
| 8 | Extend the weighted exponential Jacobian by zero outside the full |
| 9 | stable carrier. The extension is measurable and Gaussian dominated, |
| 10 | and its source integral is exactly the frozen reduced volume. |
| 11 | Morgan-Tian Theorem 6.80 and Corollary 6.82, pp. 144-147. |
| 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 | /-- The actual source density, extended by zero off the full stable |
| 27 | carrier, as used in Corollary 6.82, pp. 146-147. -/ |
| 28 | noncomputable def stableSourceDensity (H : M14StableSet G T τ x E) |
| 29 | (b : Module.Basis (Fin n) ℝ (G.Horizontal x)) : G.Horizontal x → ℝ := |
| 30 | H.carrier.indicator (fun Z => exponentialWeightedJacobian E b Z (Real.sqrt τ)) |
| 31 | |
| 32 | /-- The actual source density is nonnegative everywhere, |
| 33 | Definition 6.70, p. 140. -/ |
| 34 | theorem stableSourceDensity_nonneg (H : M14StableSet G T τ x E) |
| 35 | (b : Module.Basis (Fin n) ℝ (G.Horizontal x)) (Z : G.Horizontal x) : |
| 36 | 0 ≤ stableSourceDensity H b Z := |
| 37 | indicator_nonneg (fun Z _ => exponentialWeightedJacobian_nonneg E b Z (Real.sqrt_nonneg τ)) Z |
| 38 | |
| 39 | /-- The zero-extended actual source density is measurable for a |
| 40 | prescribed orthonormal source basis, Lemma 6.71, p. 141. -/ |
| 41 | theorem stableSourceDensity_measurable |
| 42 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 43 | (H : M14StableSet G T τ x E) (b : Module.Basis (Fin n) ℝ (G.Horizontal x)) |
| 44 | (hb : ∀ i j, G.spacetime.horizontalMetric.inner x (b i) (b j) = |
| 45 | if i = j then 1 else 0) : Measurable (stableSourceDensity H b) := by |
| 46 | classical |
| 47 | let D := rescalingMeasureDataWithBasis H b hb |
| 48 | have hw : ContinuousOn (fun Z => exponentialWeightedJacobian E b Z (Real.sqrt τ)) |
| 49 | H.carrier := (stableDensity_jacobian_continuousOn hM04 hM12 H D).congr |
| 50 | (fun _ hZ => (stableDensity_mul_jacobian_eq_weighted E H D hZ).symm) |
| 51 | exact hw.measurable_piecewise continuousOn_const H.carrier_open.measurableSet |
| 52 | |
| 53 | /-- The zero-extended source density has the same pointwise metric |
| 54 | Gaussian bound on the whole source space, Proposition 6.81, |
| 55 | pp. 145-146. -/ |
| 56 | theorem stableSourceDensity_le_gaussian |
| 57 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 58 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 59 | (H : M14StableSet G T τ x E) (b : Module.Basis (Fin n) ℝ (G.Horizontal x)) |
| 60 | (hb : ∀ i j, G.spacetime.horizontalMetric.inner x (b i) (b j) = |
| 61 | if i = j then 1 else 0) (Z : G.Horizontal x) : |
| 62 | stableSourceDensity H b Z ≤ |
| 63 | Real.rpow (2 : ℝ) (n : ℝ) * Real.exp (-G.spacetime.horizontalMetric.inner x Z Z) := by |
| 64 | classical |
| 65 | by_cases hZ : Z ∈ H.carrier |
| 66 | · rw [stableSourceDensity, indicator_of_mem hZ] |
| 67 | exact exponentialWeightedJacobian_le_gaussian hCoordinates hM04 hM12 E b hb H hZ |
| 68 | · rw [stableSourceDensity, indicator_of_notMem hZ] |
| 69 | exact mul_nonneg (Real.rpow_nonneg (by norm_num) _) (Real.exp_pos _).le |
| 70 | |
| 71 | /-- The full source integral equals the frozen reduced volume on the |
| 72 | actual stable image, Lemma 6.71 and Corollary 6.82, pp. 141, 146-147. -/ |
| 73 | theorem integral_stableSourceDensity |
| 74 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 75 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 76 | (H : M14StableSet G T τ x E) (b : Module.Basis (Fin n) ℝ (G.Horizontal x)) |
| 77 | (hb : ∀ i j, G.spacetime.horizontalMetric.inner x (b i) (b j) = |
| 78 | if i = j then 1 else 0) : |
| 79 | (∫ Z, stableSourceDensity H b Z ∂M14HorizontalCoordinateVolume G b) = |
| 80 | M14ReducedVolumeOnStable G T x τ H := by |
| 81 | let D := rescalingMeasureDataWithBasis H b hb |
| 82 | have hi := stableDensity_integrable_of_gaussian hM04 hM12 H D |
| 83 | (fun _ hZ => stableDensity_mul_jacobian_le_gaussian hCoordinates hM04 hM12 E H D hZ) |
| 84 | rw [stableSourceDensity, integral_indicator H.carrier_open.measurableSet] |
| 85 | calc |
| 86 | _ = ∫ Z in H.carrier, stableReducedVolumeDensity H (H.endpoint_slice_map Z) * D.jacobian Z |
| 87 | ∂D.sourceMeasure := by |
| 88 | apply setIntegral_congr_fun H.carrier_open.measurableSet |
| 89 | exact fun _ hZ => (stableDensity_mul_jacobian_eq_weighted E H D hZ).symm |
| 90 | _ = ∫ q in H.endpoint_slice_map '' H.carrier, stableReducedVolumeDensity H q |
| 91 | ∂calibratedMetricVolume (G.slices (T - τ)).metricOnPoints := hi.2.2 |
| 92 | _ = M14ReducedVolumeOnStable G T x τ H := by |
| 93 | apply setIntegral_congr_fun D.image_measurable |
| 94 | exact fun _ hq => stableReducedVolumeDensity_eq H hq |
| 95 | |
| 96 | end PoincareMT.M14 |