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.Riemannian.Measure.Calibrated |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Basic |
| 3 | import Mathlib.Geometry.Manifold.Diffeomorph |
| 4 | import Mathlib.MeasureTheory.Measure.Hausdorff |
| 5 | import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls |
| 6 | import Mathlib.MeasureTheory.Integral.Bochner.Basic |
| 7 | import Mathlib.Topology.EMetricSpace.Lipschitz |
| 8 | |
| 9 | /-! |
| 10 | # Reduced-volume and weak reduced-length infrastructure |
| 11 | |
| 12 | The density follows Morgan--Tian's unnormalized convention, so its Euclidean |
| 13 | integral is `(4 * pi) ^ (n / 2)`. The measure is calibrated Hausdorff measure |
| 14 | for the explicitly selected Riemannian metric. Weak inequalities use complete |
| 15 | test-function integrands; the statement file separately requires their |
| 16 | integrability and supplies a full-measure regular locus. |
| 17 | -/ |
| 18 | |
| 19 | set_option autoImplicit false |
| 20 | |
| 21 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT |
| 26 | |
| 27 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 29 | [IsManifold (𝓡 n) ∞ M] |
| 30 | |
| 31 | /-- The reduced-volume density at a positive backward time. -/ |
| 32 | noncomputable def reducedVolumeDensity {J : Set ℝ} (F : RicciFlow n M J) |
| 33 | (T : ℝ) (p : M) (τ : ℝ) (q : M) : ℝ := |
| 34 | if 0 < τ then |
| 35 | Real.rpow τ (-(n : ℝ) / 2) * Real.exp (-reducedLength F T p q τ) |
| 36 | else 0 |
| 37 | |
| 38 | /-- The reduced volume of a spatial subset in the selected time slice. -/ |
| 39 | noncomputable def reducedVolumeOn [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 40 | {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) (p : M) (τ : ℝ) |
| 41 | (A : Set M) : ℝ := |
| 42 | ∫ q in A, reducedVolumeDensity F T p τ q |
| 43 | ∂calibratedMetricVolume (F.metric (T - τ)) |
| 44 | |
| 45 | /-- The whole-space reduced volume. -/ |
| 46 | noncomputable def reducedVolume [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 47 | {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) (p : M) (τ : ℝ) : ℝ := |
| 48 | ∫ q, reducedVolumeDensity F T p τ q |
| 49 | ∂calibratedMetricVolume (F.metric (T - τ)) |
| 50 | |
| 51 | /-- The unnormalized Euclidean value of reduced volume. -/ |
| 52 | noncomputable def euclideanReducedVolume (n : ℕ) : ℝ := |
| 53 | Real.rpow (4 * Real.pi) ((n : ℝ) / 2) |
| 54 | |
| 55 | /-- Local spacetime Lipschitz regularity measured using the terminal metric. -/ |
| 56 | def reducedLengthLocallyLipschitz [T3Space M] {J : Set ℝ} |
| 57 | (F : RicciFlow n M J) (T τmax : ℝ) (p : M) : Prop := |
| 58 | let g := F.metric T |
| 59 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 60 | ⟨g.toRiemannianMetric⟩ |
| 61 | letI : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) |
| 62 | (TangentSpace (𝓡 n) : M → Type _) := |
| 63 | ⟨⟨g.inner, g.toContinuousRiemannianMetric.continuous, fun _ _ _ ↦ rfl⟩⟩ |
| 64 | letI : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 n) M |
| 65 | LocallyLipschitzOn (Set.univ ×ˢ Set.Ioo 0 τmax) |
| 66 | (fun z : M × ℝ ↦ reducedLength F T p z.1 z.2) |
| 67 | |
| 68 | /-- The first weak reduced-length integrand, with the Laplacian on the test function. -/ |
| 69 | noncomputable def reducedLengthFirstWeakIntegrand {J : Set ℝ} |
| 70 | (F : RicciFlow n M J) (T : ℝ) (p : M) (τ : ℝ) |
| 71 | (φ : M → ℝ) (q : M) : ℝ := |
| 72 | φ q * (deriv (fun s ↦ reducedLength F T p q s) τ + |
| 73 | reducedLengthGradientNormSq F T (fun z ↦ reducedLength F T p z.1 z.2) τ q - |
| 74 | (F.connection (T - τ)).scalarCurvature q + (n : ℝ) / (2 * τ)) - |
| 75 | reducedLength F T p q τ * (F.connection (T - τ)).laplacian φ q |
| 76 | |
| 77 | /-- The second weak reduced-length integrand, including the full `n / τ` term. -/ |
| 78 | noncomputable def reducedLengthSecondWeakIntegrand {J : Set ℝ} |
| 79 | (F : RicciFlow n M J) (T : ℝ) (p : M) (τ : ℝ) |
| 80 | (φ : M → ℝ) (q : M) : ℝ := |
| 81 | φ q * (-reducedLengthGradientNormSq F T |
| 82 | (fun z ↦ reducedLength F T p z.1 z.2) τ q + |
| 83 | (F.connection (T - τ)).scalarCurvature q + |
| 84 | (reducedLength F T p q τ - (n : ℝ)) / τ) + |
| 85 | 2 * reducedLength F T p q τ * (F.connection (T - τ)).laplacian φ q |
| 86 | |
| 87 | /-- The regular locus and local bounds needed to interpret weak slice inequalities. -/ |
| 88 | structure ReducedLengthMeasureData [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 89 | {J : Set ℝ} (F : RicciFlow n M J) (T τmax : ℝ) (p : M) where |
| 90 | regularDomain : Set (M × ℝ) |
| 91 | regularDomain_open : IsOpen regularDomain |
| 92 | regularDomain_time : regularDomain ⊆ Set.univ ×ˢ Set.Ioo 0 τmax |
| 93 | regular_points : ∀ z ∈ regularDomain, |
| 94 | Nonempty (ReducedLengthRegularPoint F T τmax p z.1 z.2) |
| 95 | slice_complement_null : ∀ τ : ℝ, 0 < τ → τ < τmax → |
| 96 | calibratedMetricVolume (F.metric (T - τ)) {q | (q, τ) ∉ regularDomain} = 0 |
| 97 | continuous : ContinuousOn (fun z : M × ℝ ↦ reducedLength F T p z.1 z.2) |
| 98 | (Set.univ ×ˢ Set.Ioo 0 τmax) |
| 99 | locally_lipschitz : reducedLengthLocallyLipschitz F T τmax p |
| 100 | local_derivative_bounds : ∀ z : M × ℝ, z ∈ Set.univ ×ˢ Set.Ioo 0 τmax → |
| 101 | ∃ U : Set (M × ℝ), IsOpen U ∧ z ∈ U ∧ |
| 102 | U ⊆ Set.univ ×ˢ Set.Ioo 0 τmax ∧ |
| 103 | ∃ C : ℝ, 0 ≤ C ∧ ∀ w ∈ U ∩ regularDomain, |
| 104 | |deriv (fun s ↦ reducedLength F T p w.1 s) w.2| ≤ C ∧ |
| 105 | reducedLengthGradientNormSq F T |
| 106 | (fun z ↦ reducedLength F T p z.1 z.2) w.2 w.1 ≤ C |
| 107 | |
| 108 | /-- An open regular domain closed under following minimizing L-paths toward the base. -/ |
| 109 | def IsBackwardLStarShaped {J : Set ℝ} (F : RicciFlow n M J) |
| 110 | (T τmax : ℝ) (p : M) (A : Set (M × ℝ)) : Prop := |
| 111 | IsOpen A ∧ A ⊆ Set.univ ×ˢ Set.Ioo 0 τmax ∧ |
| 112 | ∀ z ∈ A, ∃ r : ReducedLengthRegularPoint F T τmax p z.1 z.2, |
| 113 | ∀ σ ∈ Set.Ioc 0 z.2, (r.path.curve σ, σ) ∈ A |
| 114 | |
| 115 | /-- A single Euclidean isometry identifies every metric on the stated time interval. -/ |
| 116 | def IsStaticEuclideanFlowOn {J : Set ℝ} (F : RicciFlow n M J) (I : Set ℝ) : Prop := |
| 117 | ∃ e : Diffeomorph (𝓡 n) (𝓡 n) M (EuclideanSpace ℝ (Fin n)) ∞, |
| 118 | ∀ t ∈ I, ∀ q : M, ∀ v w : TangentSpace (𝓡 n) q, |
| 119 | (F.metric t).inner q v w = |
| 120 | inner ℝ ((mfderiv (𝓡 n) (𝓡 n) e q) v) ((mfderiv (𝓡 n) (𝓡 n) e q) w) |
| 121 | |
| 122 | end PoincareMT |