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.Volume.Surgery.Measure.Calibration |
| 2 | import Mathlib.Analysis.InnerProductSpace.NormDet |
| 3 | |
| 4 | /-! |
| 5 | Adapted from Mapher `PoincareMT/Proofs/M10/CalibratedComparison.lean` at |
| 6 | revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. |
| 7 | |
| 8 | # Calibrated image measure from sharp metric comparisons |
| 9 | |
| 10 | The Hausdorff Lipschitz estimate and exact linear norm determinant give |
| 11 | both local measure bounds. Multiplication by the fixed calibration uses |
| 12 | no cancellation and permits arbitrary subsets of infinite measure. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set MeasureTheory |
| 18 | open scoped Manifold ContDiff Bundle Topology ENNReal NNReal |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.SurgeryVolume.Measure |
| 23 | |
| 24 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 26 | [T3Space M] [MeasurableSpace M] [BorelSpace M] |
| 27 | {Y : Type*} [NormedAddCommGroup Y] [InnerProductSpace ℝ Y] |
| 28 | [MeasurableSpace Y] [BorelSpace Y] |
| 29 | |
| 30 | set_option backward.isDefEq.respectTransparency false in |
| 31 | /-- A normalized Lipschitz map gives the upper calibrated image bound with the exact determinant. -/ |
| 32 | theorem calibratedMetricVolume_image_le_of_normalized_lipschitz |
| 33 | (g : RiemannianMetric n M) (L : EuclideanSpace ℝ (Fin n) ≃L[ℝ] Y) |
| 34 | {f : EuclideanSpace ℝ (Fin n) → M} {S A : Set (EuclideanSpace ℝ (Fin n))} |
| 35 | {C : ℝ≥0} (hAS : A ⊆ S) |
| 36 | (hf : |
| 37 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 38 | ⟨g.toRiemannianMetric⟩ |
| 39 | letI : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) |
| 40 | (TangentSpace (𝓡 n) : M → Type _) := |
| 41 | ⟨⟨g.inner, g.toContinuousRiemannianMetric.continuous, fun _ _ _ ↦ rfl⟩⟩ |
| 42 | letI : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 n) M |
| 43 | LipschitzOnWith C (f ∘ L.symm) (L '' S)) : |
| 44 | calibratedMetricVolume g (f '' A) ≤ |
| 45 | (C : ℝ≥0∞) ^ n * ENNReal.ofReal L.toLinearMap.normDet * volume A := by |
| 46 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 47 | ⟨g.toRiemannianMetric⟩ |
| 48 | let : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) |
| 49 | (TangentSpace (𝓡 n) : M → Type _) := |
| 50 | ⟨⟨g.inner, g.toContinuousRiemannianMetric.continuous, fun _ _ _ ↦ rfl⟩⟩ |
| 51 | let : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 n) M |
| 52 | change LipschitzOnWith C (f ∘ L.symm) (L '' S) at hf |
| 53 | have hH := (hf.mono (image_mono hAS)).hausdorffMeasure_image_le |
| 54 | (d := (n : ℝ)) (by positivity) |
| 55 | have himage : (f ∘ L.symm) '' (L '' A) = f '' A := by |
| 56 | rw [image_image] |
| 57 | congr 1 |
| 58 | ext x |
| 59 | simp only [Function.comp_apply, L.symm_apply_apply] |
| 60 | have hL := L.toLinearMap.hausdorffMeasure_image A |
| 61 | simp only [finrank_euclideanSpace, Fintype.card_fin] at hL |
| 62 | change Measure.hausdorffMeasure (n : ℝ) (L '' A) = |
| 63 | ENNReal.ofReal L.toLinearMap.normDet * Measure.hausdorffMeasure (n : ℝ) A at hL |
| 64 | rw [himage, ENNReal.rpow_natCast, hL] at hH |
| 65 | have hcal : euclideanVolumeCalibration n * Measure.hausdorffMeasure (n : ℝ) A = |
| 66 | volume A := by |
| 67 | simpa only [Measure.smul_apply, smul_eq_mul] using |
| 68 | congrArg (fun μ : Measure (EuclideanSpace ℝ (Fin n)) ↦ μ A) |
| 69 | (euclideanVolumeCalibration_smul_hausdorff n) |
| 70 | change euclideanVolumeCalibration n * Measure.hausdorffMeasure (n : ℝ) (f '' A) ≤ _ |
| 71 | calc |
| 72 | _ ≤ euclideanVolumeCalibration n * |
| 73 | ((C : ℝ≥0∞) ^ n * (ENNReal.ofReal L.toLinearMap.normDet * |
| 74 | Measure.hausdorffMeasure (n : ℝ) A)) := mul_le_mul_right hH _ |
| 75 | _ = (C : ℝ≥0∞) ^ n * ENNReal.ofReal L.toLinearMap.normDet * |
| 76 | (euclideanVolumeCalibration n * Measure.hausdorffMeasure (n : ℝ) A) := by ac_rfl |
| 77 | _ = _ := by rw [hcal] |
| 78 | |
| 79 | set_option backward.isDefEq.respectTransparency false in |
| 80 | /-- A normalized Lipschitz inverse gives the lower calibrated image bound without division. -/ |
| 81 | theorem normDet_volume_le_calibratedMetricVolume_image |
| 82 | (g : RiemannianMetric n M) (L : EuclideanSpace ℝ (Fin n) ≃L[ℝ] Y) |
| 83 | {f : EuclideanSpace ℝ (Fin n) → M} {k : M → Y} |
| 84 | {S A : Set (EuclideanSpace ℝ (Fin n))} {C : ℝ≥0} (hAS : A ⊆ S) |
| 85 | (hleft : ∀ x ∈ S, k (f x) = L x) |
| 86 | (hk : |
| 87 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 88 | ⟨g.toRiemannianMetric⟩ |
| 89 | letI : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) |
| 90 | (TangentSpace (𝓡 n) : M → Type _) := |
| 91 | ⟨⟨g.inner, g.toContinuousRiemannianMetric.continuous, fun _ _ _ ↦ rfl⟩⟩ |
| 92 | letI : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 n) M |
| 93 | LipschitzOnWith C k (f '' S)) : |
| 94 | ENNReal.ofReal L.toLinearMap.normDet * volume A ≤ |
| 95 | (C : ℝ≥0∞) ^ n * calibratedMetricVolume g (f '' A) := by |
| 96 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 97 | ⟨g.toRiemannianMetric⟩ |
| 98 | let : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) |
| 99 | (TangentSpace (𝓡 n) : M → Type _) := |
| 100 | ⟨⟨g.inner, g.toContinuousRiemannianMetric.continuous, fun _ _ _ ↦ rfl⟩⟩ |
| 101 | let : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 n) M |
| 102 | change LipschitzOnWith C k (f '' S) at hk |
| 103 | have hH := (hk.mono (image_mono hAS)).hausdorffMeasure_image_le |
| 104 | (d := (n : ℝ)) (by positivity) |
| 105 | have himage : k '' (f '' A) = L '' A := by |
| 106 | rw [image_image] |
| 107 | exact image_congr fun x hx ↦ hleft x (hAS hx) |
| 108 | have hL := L.toLinearMap.hausdorffMeasure_image A |
| 109 | simp only [finrank_euclideanSpace, Fintype.card_fin] at hL |
| 110 | change Measure.hausdorffMeasure (n : ℝ) (L '' A) = |
| 111 | ENNReal.ofReal L.toLinearMap.normDet * Measure.hausdorffMeasure (n : ℝ) A at hL |
| 112 | rw [himage, ENNReal.rpow_natCast, hL] at hH |
| 113 | have hcal : euclideanVolumeCalibration n * Measure.hausdorffMeasure (n : ℝ) A = |
| 114 | volume A := by |
| 115 | simpa only [Measure.smul_apply, smul_eq_mul] using |
| 116 | congrArg (fun μ : Measure (EuclideanSpace ℝ (Fin n)) ↦ μ A) |
| 117 | (euclideanVolumeCalibration_smul_hausdorff n) |
| 118 | calc |
| 119 | _ = euclideanVolumeCalibration n * |
| 120 | (ENNReal.ofReal L.toLinearMap.normDet * Measure.hausdorffMeasure (n : ℝ) A) := by |
| 121 | rw [← hcal] |
| 122 | ac_rfl |
| 123 | _ ≤ euclideanVolumeCalibration n * |
| 124 | ((C : ℝ≥0∞) ^ n * Measure.hausdorffMeasure (n : ℝ) (f '' A)) := |
| 125 | mul_le_mul_right hH _ |
| 126 | _ = _ := by |
| 127 | change _ = (C : ℝ≥0∞) ^ n * |
| 128 | (euclideanVolumeCalibration n * Measure.hausdorffMeasure (n : ℝ) (f '' A)) |
| 129 | ac_rfl |
| 130 | |
| 131 | end PoincareMT.SurgeryVolume.Measure |