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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.PartialLimits.RegularSets.RelativeChartMetric |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.PartialLimits.Geometry.RelativeMetricReadout |
| 4 | |
| 5 | /-! |
| 6 | # Uniform relative metric bounds on actual compact limit sets |
| 7 | |
| 8 | A finite compact chart cover and one valid embedding stage give relative |
| 9 | metric comparison before choosing any tested point or vector. Source: |
| 10 | Morgan--Tian Theorem 5.6, pp. 85-87; M28 derivations 116 and 118. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | set_option maxSynthPendingDepth 12 |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M28.RegularPointedMetricConvergence |
| 23 | |
| 24 | variable {n : ℕ} {M : ℕ → Type u} [∀ k, TopologicalSpace (M k)] |
| 25 | [∀ k, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M k)] |
| 26 | [∀ k, IsManifold (𝓡 n) ∞ (M k)] |
| 27 | {g : ∀ k, RiemannianMetric n (M k)} {p : ∀ k, M k} |
| 28 | |
| 29 | /-- Both relative quadratic bounds hold on a common source tail over a |
| 30 | fixed compact set, for the original embedding and all tangent vectors. |
| 31 | Source: Theorem 5.6, pp. 85-87; M28 derivations 116 and 118. -/ |
| 32 | theorem eventually_compact_relative_inner_bounds (G : RegularPointedMetricConvergence g p) : |
| 33 | letI := G.limitCarrier.topologicalSpace |
| 34 | letI := G.limitCarrier.chartedSpace |
| 35 | letI := G.limitCarrier.isManifold |
| 36 | ∀ (K : Set G.limitCarrier.carrier), IsCompact K → |
| 37 | ∀ tau : ℝ, 0 < tau → ∀ᶠ k in atTop, ∀ x ∈ K, |
| 38 | ∀ v : TangentSpace (𝓡 n) x, |
| 39 | (1 + tau)⁻¹ * G.limitMetric.inner x v v ≤ |
| 40 | (g (G.subsequence k)).inner (G.embedding k x) |
| 41 | (mfderiv (𝓡 n) (𝓡 n) (G.embedding k) x v) |
| 42 | (mfderiv (𝓡 n) (𝓡 n) (G.embedding k) x v) ∧ |
| 43 | (g (G.subsequence k)).inner (G.embedding k x) |
| 44 | (mfderiv (𝓡 n) (𝓡 n) (G.embedding k) x v) |
| 45 | (mfderiv (𝓡 n) (𝓡 n) (G.embedding k) x v) ≤ |
| 46 | (1 + tau) * G.limitMetric.inner x v v := by |
| 47 | classical |
| 48 | let := G.limitCarrier.topologicalSpace |
| 49 | let := G.limitCarrier.chartedSpace |
| 50 | let := G.limitCarrier.isManifold |
| 51 | let : LocallyCompactSpace G.limitCarrier.carrier := |
| 52 | ChartedSpace.locallyCompactSpace (EuclideanSpace ℝ (Fin n)) G.limitCarrier.carrier |
| 53 | intro K hK tau htau |
| 54 | obtain ⟨s, C, hC, hcover⟩ := |
| 55 | hK.exists_finite_extChart_cover (𝓡 n) isOpen_univ (subset_univ _) |
| 56 | have hmono : Monotone G.exhaustion := monotone_nat_of_le_succ |
| 57 | (fun j => subset_closure.trans (G.exhaustion_step j)) |
| 58 | obtain ⟨j, hj⟩ := hK.elim_directed_cover G.exhaustion G.exhaustion_open |
| 59 | (by rw [G.exhaustion_covers]; exact subset_univ _) hmono.directed_le |
| 60 | have htail := s.finite_toSet.eventually_all.mpr (fun q hq => |
| 61 | G.eventually_chart_relative_inner_bounds q _ |
| 62 | (hC q hq).2.2.2.2.1 (hC q hq).2.2.2.2.2 tau htau) |
| 63 | filter_upwards [htail, eventually_ge_atTop j] with k hk hjk |
| 64 | intro x hx v |
| 65 | obtain ⟨q, hq, hxC⟩ := mem_iUnion₂.mp (hcover hx) |
| 66 | have hxC' : x ∈ C q := interior_subset hxC |
| 67 | have hxsource : x ∈ (extChartAt (𝓡 n) q).source := ((hC q hq).2.2.2.1 hxC').1 |
| 68 | exact G.limitMetric.relative_inner_bounds_of_chart (g (G.subsequence k)) hxsource |
| 69 | ((G.embedding_smooth k ⟨x, hmono hjk (hj hx)⟩).mdifferentiableAt (by simp)) |
| 70 | (hk q hq _ (mem_image_of_mem _ hxC')) v |
| 71 | |
| 72 | end PoincareMT.M28.RegularPointedMetricConvergence |