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.Comparison.VolumeComparison |
| 2 | import Mathlib.MeasureTheory.Measure.OpenPos |
| 3 | |
| 4 | /-! |
| 5 | # Equality of the actual weighted rays |
| 6 | |
| 7 | Morgan-Tian Theorem 7.26 and Proposition 7.27, pp. 165-167. Equality in the |
| 8 | global Gaussian comparison forces equality almost everywhere on the source. |
| 9 | The Gaussian is positive, so the canonical regular source is conull. The |
| 10 | raw weight is continuous on every initial vector, which makes its equality |
| 11 | pointwise, including initial vectors outside the canonical regular source. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter MeasureTheory |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.ReducedVolume |
| 22 | |
| 23 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 25 | [T3Space M] [ConnectedSpace M] [MeasurableSpace M] [BorelSpace M] |
| 26 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 27 | |
| 28 | /-- Equality at one time persists at every earlier positive time. -/ |
| 29 | theorem reducedVolume_eq_euclidean_of_le |
| 30 | (hL : LGeodesicTheory F T τmax) (hDifferential : ReducedLengthDifferentialTheory F T τmax) |
| 31 | (G : LExponentialGeometry F T τmax p) (hmax : 0 < τmax) |
| 32 | (hT : T ∈ J) (hwindow : Icc (T - τmax) T ⊆ J) |
| 33 | (hcurvature : CompleteBoundedCurvatureOn F (Icc (T - τmax) T)) |
| 34 | {b τ : ℝ} (hb : 0 < b) (hbmax : b < τmax) (hτ : 0 < τ) (hτb : τ ≤ b) |
| 35 | (heq : reducedVolume F T p b = euclideanReducedVolume n) : |
| 36 | reducedVolume F T p τ = euclideanReducedVolume n := by |
| 37 | apply le_antisymm |
| 38 | (reducedVolume_le_euclidean hL hDifferential G hmax hT hwindow hcurvature |
| 39 | hτ (hτb.trans_lt hbmax)) |
| 40 | rw [← heq] |
| 41 | exact reducedVolume_antitoneOn hL hDifferential G hmax hT hwindow hcurvature |
| 42 | ⟨hτ, hτb.trans_lt hbmax⟩ ⟨hb, hbmax⟩ hτb |
| 43 | |
| 44 | /-- Equality in integral comparison makes the zero extension Gaussian almost everywhere. -/ |
| 45 | theorem regularWeightedJacobian_ae_eq_gaussian_of_volume_eq |
| 46 | (hL : LGeodesicTheory F T τmax) (hDifferential : ReducedLengthDifferentialTheory F T τmax) |
| 47 | (G : LExponentialGeometry F T τmax p) (hmax : 0 < τmax) |
| 48 | (hT : T ∈ J) (hwindow : Icc (T - τmax) T ⊆ J) |
| 49 | (hcurvature : CompleteBoundedCurvatureOn F (Icc (T - τmax) T)) |
| 50 | {τ : ℝ} (hτ : 0 < τ) (hτmax : τ < τmax) |
| 51 | (heq : reducedVolume F T p τ = euclideanReducedVolume n) : |
| 52 | regularWeightedJacobian G τ =ᵐ[volume] |
| 53 | (fun x : EuclideanSpace ℝ (Fin n) ↦ (2 : ℝ) ^ n * Real.exp (-‖x‖ ^ 2)) := by |
| 54 | apply (integral_eq_iff_of_ae_le |
| 55 | (regularWeightedJacobian_integrable hL hDifferential G hmax hT hwindow hcurvature hτ hτmax) |
| 56 | (sourceGaussian_integrable n) |
| 57 | (ae_of_all _ (regularWeightedJacobian_le_sourceGaussian hL hDifferential G hmax hT |
| 58 | hwindow hcurvature τ))).mp |
| 59 | rw [← reducedVolume_eq_integral_regularWeight hL hDifferential G hmax hT hwindow |
| 60 | hcurvature hτ hτmax, integral_sourceGaussian, heq] |
| 61 | |
| 62 | omit [T3Space M] [ConnectedSpace M] [MeasurableSpace M] [BorelSpace M] in |
| 63 | /-- A Gaussian zero extension forces the actual regular source to be conull. -/ |
| 64 | theorem ae_mem_exponentialSlice_source_of_gaussian |
| 65 | (G : LExponentialGeometry F T τmax p) {τ : ℝ} |
| 66 | (heq : regularWeightedJacobian G τ =ᵐ[volume] |
| 67 | (fun x : EuclideanSpace ℝ (Fin n) ↦ (2 : ℝ) ^ n * Real.exp (-‖x‖ ^ 2))) : |
| 68 | ∀ᵐ x, x ∈ (exponentialSliceChart G τ).source := by |
| 69 | classical |
| 70 | filter_upwards [heq] with x hx |
| 71 | by_contra hmem |
| 72 | have hz : regularWeightedJacobian G τ x = 0 := indicator_of_notMem hmem _ |
| 73 | exact (sourceGaussian_pos n x).ne' (hz ▸ hx).symm |
| 74 | |
| 75 | omit [T3Space M] [ConnectedSpace M] [MeasurableSpace M] [BorelSpace M] in |
| 76 | /-- Full-source continuity upgrades Gaussian equality to raw pointwise equality. -/ |
| 77 | theorem weightedExponentialJacobian_eq_gaussian_of_ae |
| 78 | (G : LExponentialGeometry F T τmax p) {τ : ℝ} (hτ : 0 < τ) (hτmax : τ < τmax) |
| 79 | (heq : regularWeightedJacobian G τ =ᵐ[volume] |
| 80 | (fun x : EuclideanSpace ℝ (Fin n) ↦ (2 : ℝ) ^ n * Real.exp (-‖x‖ ^ 2))) : |
| 81 | weightedExponentialJacobian G τ = |
| 82 | (fun x : EuclideanSpace ℝ (Fin n) ↦ (2 : ℝ) ^ n * Real.exp (-‖x‖ ^ 2)) := by |
| 83 | have hmem := ae_mem_exponentialSlice_source_of_gaussian G heq |
| 84 | have hg : Continuous (fun x : EuclideanSpace ℝ (Fin n) ↦ |
| 85 | (2 : ℝ) ^ n * Real.exp (-‖x‖ ^ 2)) := by fun_prop |
| 86 | apply Measure.eq_of_ae_eq (μ := volume) ?_ |
| 87 | (weightedExponentialJacobian_continuous G hτ hτmax) hg |
| 88 | filter_upwards [heq, hmem] with x hx hxs |
| 89 | simpa only [regularWeightedJacobian, indicator_of_mem hxs] using hx |
| 90 | |
| 91 | /-- Maximal reduced volume gives the exact Gaussian weight at every source vector. -/ |
| 92 | theorem weightedExponentialJacobian_eq_gaussian_of_volume_eq |
| 93 | (hL : LGeodesicTheory F T τmax) (hDifferential : ReducedLengthDifferentialTheory F T τmax) |
| 94 | (G : LExponentialGeometry F T τmax p) (hmax : 0 < τmax) |
| 95 | (hT : T ∈ J) (hwindow : Icc (T - τmax) T ⊆ J) |
| 96 | (hcurvature : CompleteBoundedCurvatureOn F (Icc (T - τmax) T)) |
| 97 | {τ : ℝ} (hτ : 0 < τ) (hτmax : τ < τmax) |
| 98 | (heq : reducedVolume F T p τ = euclideanReducedVolume n) : |
| 99 | weightedExponentialJacobian G τ = |
| 100 | (fun x : EuclideanSpace ℝ (Fin n) ↦ (2 : ℝ) ^ n * Real.exp (-‖x‖ ^ 2)) := |
| 101 | weightedExponentialJacobian_eq_gaussian_of_ae G hτ hτmax |
| 102 | (regularWeightedJacobian_ae_eq_gaussian_of_volume_eq hL hDifferential G hmax hT |
| 103 | hwindow hcurvature hτ hτmax heq) |
| 104 | |
| 105 | omit [T3Space M] [ConnectedSpace M] [MeasurableSpace M] [BorelSpace M] in |
| 106 | /-- Pointwise Gaussian equality makes the actual Gram Jacobian strictly positive everywhere. -/ |
| 107 | theorem exponentialSliceJacobian_pos_of_gaussian |
| 108 | (G : LExponentialGeometry F T τmax p) {τ : ℝ} (hτ : 0 < τ) |
| 109 | (heq : weightedExponentialJacobian G τ = |
| 110 | (fun x : EuclideanSpace ℝ (Fin n) ↦ (2 : ℝ) ^ n * Real.exp (-‖x‖ ^ 2))) |
| 111 | (x : EuclideanSpace ℝ (Fin n)) : 0 < exponentialSliceJacobian G τ x := by |
| 112 | have hw : 0 < weightedExponentialJacobian G τ x := by |
| 113 | rw [heq] |
| 114 | exact sourceGaussian_pos n x |
| 115 | exact pos_of_mul_pos_right hw |
| 116 | (mul_pos (Real.rpow_pos_of_pos hτ _) (Real.exp_pos _)).le |
| 117 | |
| 118 | end PoincareMT.ReducedVolume |