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.Curvature.Integral.Concentration.CornerModels |
| 2 | import PoincareLib.Geometry.Curvature.Integral.Concentration.SubsetRank |
| 3 | import PoincareLib.Geometry.Alexandrov.Packing.RiemannianLimit |
| 4 | |
| 5 | /-! |
| 6 | # Maximal ambient packing rank among divergent corner limits |
| 7 | |
| 8 | The uniform ambient dimension bound bounds all attained minimum ranks over |
| 9 | the exact limiting fiber sections. Choosing their largest natural rank |
| 10 | retains the actual divergent models and coherent expanding realizations. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | open Set Filter Topology MeasureTheory Function |
| 17 | open Poincare.GromovHausdorff |
| 18 | open Poincare.Geometry.Manifold.RegularFiber |
| 19 | open scoped Manifold ContDiff Bundle |
| 20 | open Poincare.Alexandrov |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | /-- Unbounded actual weighted corner ratios admit a divergent exact-section limit |
| 24 | with maximal minimum ambient angle-packing rank among all such limits. -/ |
| 25 | theorem exists_maximal_rank_corner_counterexample_limit |
| 26 | (m k : ℕ) (hn : 1 ≤ m+k) (θ : ℝ) (hθ : 0 < θ) : |
| 27 | ∃ N : ℕ, ∀ δ H : ℝ, |
| 28 | (∀ C : ℝ, ∃ A : PointedCornerModel m k δ H, C < A.weightedRatio) → |
| 29 | ∃ A : ℕ → PointedCornerModel m k δ H, |
| 30 | ∃ S : CompatiblePointedCompactSystem.{0}, |
| 31 | ∃ K : TopologicalSpace.NonemptyCompacts S.completedLimit.carrier, |
| 32 | IsExpandingCornerLimit A S K ∧ |
| 33 | Tendsto (fun j => (A j).weightedRatio) atTop atTop ∧ |
| 34 | ComparisonAnglePackingBound S.completedLimit.carrier θ N ∧ |
| 35 | (∀ α : ℝ, 0 < α → ∃ L : ℕ, |
| 36 | ComparisonAnglePackingBound S.completedLimit.carrier α L) ∧ |
| 37 | minLocalAnglePackingRankOn θ (K : Set S.completedLimit.carrier) ≤ N ∧ |
| 38 | ∀ (A' : ℕ → PointedCornerModel m k δ H) |
| 39 | (S' : CompatiblePointedCompactSystem.{0}) |
| 40 | (K' : TopologicalSpace.NonemptyCompacts S'.completedLimit.carrier), |
| 41 | IsExpandingCornerLimit A' S' K' → |
| 42 | Tendsto (fun j => (A' j).weightedRatio) atTop atTop → |
| 43 | minLocalAnglePackingRankOn θ (K' : Set S'.completedLimit.carrier) ≤ |
| 44 | minLocalAnglePackingRankOn θ (K : Set S.completedLimit.carrier) := by |
| 45 | classical |
| 46 | obtain ⟨N, hN⟩ := |
| 47 | RiemannianMetric.exists_comparisonAngle_packing_bound_of_sectional_pointed_limit.{0} |
| 48 | (m+k) hθ |
| 49 | refine ⟨N, ?_⟩ |
| 50 | intro δ H hlarge |
| 51 | let ranks : Set ℕ := {r | ∃ A : ℕ → PointedCornerModel m k δ H, |
| 52 | ∃ S : CompatiblePointedCompactSystem.{0}, |
| 53 | ∃ K : TopologicalSpace.NonemptyCompacts S.completedLimit.carrier, |
| 54 | IsExpandingCornerLimit A S K ∧ |
| 55 | Tendsto (fun j => (A j).weightedRatio) atTop atTop ∧ |
| 56 | minLocalAnglePackingRankOn θ (K : Set S.completedLimit.carrier) = r} |
| 57 | have hnonempty : ranks.Nonempty := by |
| 58 | obtain ⟨A, _, hdiv⟩ := exists_pointedCornerModels_tendsto_atTop hlarge |
| 59 | obtain ⟨φ, hφ, S, K, hlim⟩ := exists_subseq_expandingCornerLimit hn A |
| 60 | exact ⟨_, (fun j => A (φ j)), S, K, hlim, hdiv.comp hφ.tendsto_atTop, rfl⟩ |
| 61 | have hbound : ∀ r ∈ ranks, r ≤ N := by |
| 62 | rintro r ⟨A, S, K, hlim, _, hrank⟩ |
| 63 | have hpack := hN (fun j => (A j).metric) (fun j => (A j).ambientPoint) |
| 64 | (fun j => (A j).connection) (fun j => (A j).complete) |
| 65 | (fun j => (A j).sectional_lower) hlim.2.2.1 |
| 66 | rw [← hrank] |
| 67 | exact (minLocalAnglePackingRankOn_spec K.nonempty hpack).2.2 |
| 68 | have hbounded : BddAbove ranks := ⟨N, hbound⟩ |
| 69 | obtain ⟨A, S, K, hlim, hdiv, hrank⟩ := Nat.sSup_mem hnonempty hbounded |
| 70 | have hpack := hN (fun j => (A j).metric) (fun j => (A j).ambientPoint) |
| 71 | (fun j => (A j).connection) (fun j => (A j).complete) |
| 72 | (fun j => (A j).sectional_lower) hlim.2.2.1 |
| 73 | refine ⟨A, S, K, hlim, hdiv, hpack, ?_, |
| 74 | (minLocalAnglePackingRankOn_spec K.nonempty hpack).2.2, ?_⟩ |
| 75 | · intro α hα |
| 76 | obtain ⟨L, hL⟩ := |
| 77 | RiemannianMetric.exists_comparisonAngle_packing_bound_of_sectional_pointed_limit.{0} |
| 78 | (m+k) hα |
| 79 | exact ⟨L, hL (fun j => (A j).metric) (fun j => (A j).ambientPoint) |
| 80 | (fun j => (A j).connection) (fun j => (A j).complete) |
| 81 | (fun j => (A j).sectional_lower) hlim.2.2.1⟩ |
| 82 | · intro A' S' K' hlim' hdiv' |
| 83 | rw [hrank] |
| 84 | exact le_csSup hbounded ⟨A', S', K', hlim', hdiv', rfl⟩ |
| 85 | |
| 86 | end PoincareMT |