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.AtPoint |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.Convergence.Curvature.Uniform |
| 3 | |
| 4 | /-! |
| 5 | # Static noncollapse in a complete pointed limit |
| 6 | |
| 7 | Shrink the radius to make the curvature inequality strict. Uniform curvature |
| 8 | convergence and source-ball coverage allow the source noncollapse inequality |
| 9 | to pass through ball-volume convergence, with no loss in its constant. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set Filter MeasureTheory |
| 16 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 17 | |
| 18 | namespace PoincareMT.PointedGeometricConvergence |
| 19 | |
| 20 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 21 | FlowCarrier.isManifold FlowCarrier.measurableSpace FlowCarrier.borelSpace |
| 22 | FlowCarrier.t3Space FlowCarrier.secondCountable |
| 23 | |
| 24 | variable {n : ℕ} {T' T : ℝ} {S : PointedFlowSequence n T' T} |
| 25 | (G : PointedGeometricConvergence S) |
| 26 | |
| 27 | theorem eventually_source_static_curvature_bound |
| 28 | {t r ρ : ℝ} (ht : t ∈ Ioo T' T) |
| 29 | (hcomplete : G.limitCarrier.metricComplete (G.limitFlow.metricAt t)) |
| 30 | (p : G.limitCarrier.carrier) (hρ : 0 < ρ) (hρr : ρ < r) |
| 31 | (hcurv : ∀ x ∈ (G.limitFlow.metricAt t).ball p r, |
| 32 | |(G.limitFlow.flow.connection t).curvatureTensorNorm x| ≤ r⁻¹ ^ 2) : |
| 33 | ∀ᶠ k in atTop, ∀ x ∈ ((S.flow (G.subsequence k)).metricAt t).ball |
| 34 | ((G.embedding k).toFun (t, p)).2 ρ, |
| 35 | |((S.flow (G.subsequence k)).flow.connection t).curvatureTensorNorm x| ≤ ρ⁻¹ ^ 2 := by |
| 36 | let g := G.limitFlow.metricAt t |
| 37 | let : EMetricSpace G.limitCarrier.carrier := G.limitCarrier.metricEMetricSpace g |
| 38 | obtain ⟨a, hρa, har⟩ := exists_between hρr |
| 39 | have hr : 0 < r := hρ.trans hρr |
| 40 | let C := a / ρ |
| 41 | have hC : 1 < C := (one_lt_div hρ).mpr hρa |
| 42 | have hCr : C * ρ = a := div_mul_cancel₀ a hρ.ne' |
| 43 | let A := closure (g.ball p a) |
| 44 | have hA : IsCompact A := g.isCompact_closure_ball_of_metricComplete hcomplete p a |
| 45 | have hAr : A ⊆ g.ball p r := by |
| 46 | intro x hx |
| 47 | have hd : edist p x ≤ ENNReal.ofReal a := |
| 48 | closure_minimal (fun _ hy => le_of_lt hy) |
| 49 | (isClosed_le (continuous_const.edist continuous_id) continuous_const) hx |
| 50 | exact hd.trans_lt ((ENNReal.ofReal_lt_ofReal_iff hr).mpr har) |
| 51 | have hrad : r⁻¹ ^ 2 < ρ⁻¹ ^ 2 := by |
| 52 | have hi := (inv_lt_inv₀ hr hρ).mpr hρr |
| 53 | nlinarith [inv_pos.mpr hρ, inv_pos.mpr hr] |
| 54 | have hbounds := G.eventually_curvatureTensorNorm_lt_on_compact |
| 55 | ((isCompact_singleton (x := t)).prod hA) |
| 56 | (fun z hz => by rw [mem_singleton_iff.mp hz.1]; exact ht) |
| 57 | (B := ρ⁻¹ ^ 2) (by |
| 58 | rintro ⟨s, x⟩ ⟨hs, hx⟩ |
| 59 | rcases mem_singleton_iff.mp hs with rfl |
| 60 | exact (le_abs_self _).trans (hcurv x (hAr hx)) |>.trans_lt hrad) |
| 61 | filter_upwards [hbounds, G.eventually_source_ball_subset_image_ball_at |
| 62 | ht hcomplete p hρ hC] with k hk hcover x hx |
| 63 | obtain ⟨y, hy, rfl⟩ := hcover hx |
| 64 | rw [hCr] at hy |
| 65 | rw [abs_of_nonneg (show 0 ≤ ((S.flow (G.subsequence k)).flow.connection t).curvatureTensorNorm |
| 66 | ((G.embedding k).toFun (t, y)).2 from Real.sqrt_nonneg _)] |
| 67 | exact (hk (t, y) ⟨mem_singleton t, subset_closure hy⟩).le |
| 68 | |
| 69 | theorem ball_volume_lower_bound_of_eventually_static_noncollapse |
| 70 | {t r : ℝ} (ht : t ∈ Ioo T' T) |
| 71 | (hcomplete : G.limitCarrier.metricComplete (G.limitFlow.metricAt t)) |
| 72 | (p : G.limitCarrier.carrier) (hr : 0 < r) (κ : ℝ) |
| 73 | (hsource : ∀ ρ : ℝ, 0 < ρ → ρ < r → ∀ᶠ k in atTop, |
| 74 | (∀ x ∈ ((S.flow (G.subsequence k)).metricAt t).ball |
| 75 | ((G.embedding k).toFun (t, p)).2 ρ, |
| 76 | |((S.flow (G.subsequence k)).flow.connection t).curvatureTensorNorm x| ≤ ρ⁻¹ ^ 2) → |
| 77 | ENNReal.ofReal (κ * ρ ^ n) ≤ ((S.flow (G.subsequence k)).metricAt t).volumeMeasure |
| 78 | (((S.flow (G.subsequence k)).metricAt t).ball ((G.embedding k).toFun (t, p)).2 ρ)) |
| 79 | (hcurv : ∀ x ∈ (G.limitFlow.metricAt t).ball p r, |
| 80 | |(G.limitFlow.flow.connection t).curvatureTensorNorm x| ≤ r⁻¹ ^ 2) : |
| 81 | ENNReal.ofReal (κ * r ^ n) ≤ |
| 82 | (G.limitFlow.metricAt t).volumeMeasure ((G.limitFlow.metricAt t).ball p r) := by |
| 83 | have hsmall (ρ : ℝ) (hρ : 0 < ρ) (hρr : ρ < r) : |
| 84 | ENNReal.ofReal (κ * ρ ^ n) ≤ |
| 85 | (G.limitFlow.metricAt t).volumeMeasure ((G.limitFlow.metricAt t).ball p r) := by |
| 86 | have hevent := (hsource ρ hρ hρr).mp |
| 87 | ((G.eventually_source_static_curvature_bound ht hcomplete p hρ hρr hcurv).mono |
| 88 | fun _ hk hnoncollapse => hnoncollapse hk) |
| 89 | have hv := ge_of_tendsto (G.tendsto_volumeMeasure_ball_at ht hcomplete p hρ) hevent |
| 90 | exact hv.trans (measure_mono (fun _ hx => |
| 91 | hx.trans_le (ENNReal.ofReal_le_ofReal hρr.le))) |
| 92 | apply le_of_tendsto (f := fun ρ : ℝ => ENNReal.ofReal (κ * ρ ^ n)) |
| 93 | (x := 𝓝[<] r) |
| 94 | ((ENNReal.continuous_ofReal.comp (continuous_const.mul (continuous_id.pow n))).continuousAt.tendsto.mono_left |
| 95 | nhdsWithin_le_nhds) |
| 96 | filter_upwards [self_mem_nhdsWithin, |
| 97 | (eventually_gt_nhds hr).filter_mono nhdsWithin_le_nhds] with ρ hρr hρ |
| 98 | exact hsmall ρ hρ hρr |
| 99 | |
| 100 | end PoincareMT.PointedGeometricConvergence |