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.Compactness.Convergence.Volume.SourceBalls |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.Convergence.Volume.MeasureComparison |
| 3 | |
| 4 | /-! |
| 5 | # Two-sided comparison of ball volumes in pointed convergence |
| 6 | |
| 7 | The measure is the normalized Riemannian volume of the selected slice. |
| 8 | Source-ball coverage and local metric distortion give the two inequalities |
| 9 | used in Kleiner--Lott, Corollary 44.1, pp. 2682--2683. |
| 10 | -/ |
| 11 | |
| 12 | noncomputable section |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter MeasureTheory |
| 17 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 18 | |
| 19 | namespace PoincareMT |
| 20 | |
| 21 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 22 | FlowCarrier.isManifold FlowCarrier.measurableSpace FlowCarrier.borelSpace |
| 23 | FlowCarrier.t3Space FlowCarrier.secondCountable |
| 24 | |
| 25 | /-- Intrinsic normalized Riemannian volume of a ball at a selected time. -/ |
| 26 | def BasedFlow.riemannianBallVolume {n : ℕ} {T' T : ℝ} {C : FlowCarrier n} |
| 27 | (F : BasedFlow n T' T C) (t r : ℝ) : ℝ≥0∞ := |
| 28 | (F.metricAt t).volumeMeasure (F.ballAt t r) |
| 29 | |
| 30 | namespace PointedGeometricConvergence |
| 31 | |
| 32 | variable {n : ℕ} {T' T : ℝ} {S : PointedFlowSequence n T' T} |
| 33 | |
| 34 | /-- Eventual volume comparison with arbitrarily small radius and density |
| 35 | distortion, for the embeddings stored in pointed geometric convergence. -/ |
| 36 | theorem eventually_ball_volume_bounds |
| 37 | (G : PointedGeometricConvergence S) (hT : T' < 0 ∧ 0 < T) |
| 38 | {t r C : ℝ} (ht : t ∈ Ioo T' T) |
| 39 | (hcomplete : G.limitCarrier.metricComplete (G.limitFlow.metricAt t)) |
| 40 | (hr : 0 < r) (hC : 1 < C) : |
| 41 | ∀ᶠ k : ℕ in atTop, |
| 42 | (S.flow (G.subsequence k)).riemannianBallVolume t r ≤ |
| 43 | ENNReal.ofReal C ^ n * G.limitFlow.riemannianBallVolume t (C * r) ∧ |
| 44 | G.limitFlow.riemannianBallVolume t (r / C) ≤ |
| 45 | ENNReal.ofReal C ^ n * (S.flow (G.subsequence k)).riemannianBallVolume t r := by |
| 46 | let g := G.limitFlow.metricAt t |
| 47 | let : EMetricSpace G.limitCarrier.carrier := G.limitCarrier.metricEMetricSpace g |
| 48 | let p := G.limitFlow.base |
| 49 | let R := C * r + 1 |
| 50 | let V := g.ball p R |
| 51 | have hCpos : 0 < C := zero_lt_one.trans hC |
| 52 | have hcompact : IsCompact (closure V) := |
| 53 | g.isCompact_closure_ball_of_metricComplete hcomplete p R |
| 54 | have hball (s : ℝ) : IsOpen (g.ball p s) := |
| 55 | isOpen_lt (continuous_const.edist continuous_id) continuous_const |
| 56 | have hV : IsOpen V := hball R |
| 57 | obtain ⟨j, hj⟩ := G.exists_exhaustion_superset hcompact |
| 58 | filter_upwards [G.eventually_pullback_tangentNorm_bounds hcompact ht hC, |
| 59 | G.eventually_source_ball_subset_image_ball hT ht hcomplete hr hC, |
| 60 | eventually_ge_atTop j] with k hk hcover hjk |
| 61 | let h := (S.flow (G.subsequence k)).metricAt t |
| 62 | let e := (G.embedding k).spatialHomeomorph (G.exhaustion_open k) ht |
| 63 | have hVe : V ⊆ e.source := subset_closure.trans (hj.trans (G.exhaustion_monotone hjk)) |
| 64 | have he : ∀ x ∈ e.source, ContMDiffAt (𝓡 n) (𝓡 n) ∞ e x := |
| 65 | fun x hx => (G.embedding k).spatialMap_contMDiffAt (G.exhaustion_open k) ht hx |
| 66 | have hei : ∀ y ∈ e.target, ContMDiffAt (𝓡 n) (𝓡 n) ∞ e.symm y := by |
| 67 | rintro _ ⟨x, hx, rfl⟩ |
| 68 | exact (G.embedding k).spatialInverse_contMDiffAt (G.exhaustion_open k) ht hx |
| 69 | have hed : e.MDifferentiable (𝓡 n) (𝓡 n) := |
| 70 | ⟨fun x hx => (he x hx).mdifferentiableAt (by simp) |>.mdifferentiableWithinAt, |
| 71 | fun y hy => (hei y hy).mdifferentiableAt (by simp) |>.mdifferentiableWithinAt⟩ |
| 72 | have hf : ∀ x ∈ V, ∀ v : TangentSpace (𝓡 n) x, |
| 73 | h.tangentNorm (e x) (mfderiv (𝓡 n) (𝓡 n) e x v) ≤ C * g.tangentNorm x v := |
| 74 | fun x hx v => (hk x (subset_closure hx) v).1 |
| 75 | have hb : ∀ x ∈ V, ∀ v : TangentSpace (𝓡 n) x, |
| 76 | g.tangentNorm x v ≤ C * h.tangentNorm (e x) (mfderiv (𝓡 n) (𝓡 n) e x v) := |
| 77 | fun x hx v => (hk x (subset_closure hx) v).2 |
| 78 | have hlarge : g.ball p (C * r) ⊆ V := by |
| 79 | intro x hx |
| 80 | exact hx.trans_le (ENNReal.ofReal_le_ofReal (by dsimp [R]; linarith)) |
| 81 | have hsmall : g.ball p (r / C) ⊆ V := by |
| 82 | intro x hx |
| 83 | apply hx.trans_le (ENNReal.ofReal_le_ofReal ?_) |
| 84 | have hdiv : r / C ≤ r := (div_le_self hr.le hC.le) |
| 85 | have hmul : r ≤ C * r := by nlinarith |
| 86 | dsimp [R] |
| 87 | linarith |
| 88 | have hbase : e p = (S.flow (G.subsequence k)).base := |
| 89 | congrArg Prod.snd (G.base_preserving_at_time hT k ht) |
| 90 | change h.volumeMeasure (h.ball (S.flow (G.subsequence k)).base r) ≤ |
| 91 | ENNReal.ofReal C ^ n * g.volumeMeasure (g.ball p (C * r)) ∧ |
| 92 | g.volumeMeasure (g.ball p (r / C)) ≤ |
| 93 | ENNReal.ofReal C ^ n * h.volumeMeasure (h.ball (S.flow (G.subsequence k)).base r) |
| 94 | constructor |
| 95 | · apply (measure_mono hcover).trans |
| 96 | exact g.volumeMeasure_image_le_of_tangentNorm_le h e hV hVe |
| 97 | (fun x hx => (he x hx).of_le (by simp) |>.contMDiffWithinAt) hCpos hf |
| 98 | (hball (C * r)).measurableSet hlarge |
| 99 | · have himage : IsOpen (e '' g.ball p (r / C)) := |
| 100 | e.isOpen_image_of_subset_source (hball (r / C)) (hsmall.trans hVe) |
| 101 | have hinv := g.inverse_tangentNorm_le_of_le h e hed hVe hb |
| 102 | have hvol := h.volumeMeasure_image_le_of_tangentNorm_le g e.symm |
| 103 | (e.isOpen_image_of_subset_source hV hVe) |
| 104 | (by rintro _ ⟨x, hx, rfl⟩; exact e.map_source (hVe hx)) |
| 105 | (fun y hy => (hei y hy).of_le (by simp) |>.contMDiffWithinAt) hCpos hinv |
| 106 | himage.measurableSet (image_mono hsmall) |
| 107 | have hback : e.symm '' (e '' g.ball p (r / C)) = g.ball p (r / C) := by |
| 108 | rw [image_image] |
| 109 | exact Set.EqOn.image_eq_self (fun x hx => e.left_inv (hVe (hsmall hx))) |
| 110 | rw [hback] at hvol |
| 111 | apply hvol.trans (mul_le_mul' le_rfl (measure_mono ?_)) |
| 112 | have hi := g.image_ball_subset_ball_of_tangentNorm_le h e p hCpos |
| 113 | (hsmall.trans hVe) (fun x hx => (he x hx).of_le (by simp)) |
| 114 | (fun x hx => hf x (hsmall hx)) |
| 115 | simpa only [hbase, mul_div_cancel₀ _ hCpos.ne'] using hi |
| 116 | |
| 117 | end PointedGeometricConvergence |
| 118 | end PoincareMT |