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.Surgery.CanonicalInduction.Terminal.Source.TerminalSourceNormalFiniteCover |
| 2 | |
| 3 | /-! |
| 4 | # Fixed indices for the actual terminal source charts |
| 5 | |
| 6 | Repetitions index the same finite family with zero at its actual base. |
| 7 | Every original normal-chart field and compact core is retained. |
| 8 | MT Theorem 5.6 and Proposition 5.14; terminal-source-indexed-cover.md, G7a. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff ENNReal Topology |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M47 |
| 20 | |
| 21 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 22 | |
| 23 | variable {M : Type u} [TopologicalSpace M] [ChartedSpace E M] |
| 24 | [IsManifold (𝓡 3) ∞ M] |
| 25 | |
| 26 | /-- A fixed finite indexing of the actual static source charts. -/ |
| 27 | structure TerminalSourceIndexedChartCover |
| 28 | (g : RiemannianMetric 3 M) (p : M) (A R rho : ℝ) (N : ℕ) where |
| 29 | chart : Fin (N + 1) → TerminalSourceChart g R |
| 30 | centre_zero : (chart 0).centre = p |
| 31 | centre_mem : ∀ i, (chart i).centre ∈ g.ball p A |
| 32 | compact_image : ∀ i, IsCompact ((chart i).chart '' Metric.closedBall (0 : E) (rho / 4)) |
| 33 | cover : g.ball p A ⊆ ⋃ i, (chart i).chart '' Metric.closedBall (0 : E) (rho / 4) |
| 34 | |
| 35 | private theorem exists_surjective_fin_with_zero {α : Type*} [Fintype α] |
| 36 | (a : α) {N : ℕ} (hN : Fintype.card α ≤ N) : |
| 37 | ∃ f : Fin (N + 1) → α, f 0 = a ∧ Function.Surjective f := by |
| 38 | classical |
| 39 | let : Nonempty α := ⟨a⟩ |
| 40 | let e : α ↪ Fin N := |
| 41 | { toFun := fun x => ⟨(Fintype.equivFin α x).val, |
| 42 | (Fintype.equivFin α x).isLt.trans_le hN⟩ |
| 43 | inj' := fun x y h => (Fintype.equivFin α).injective |
| 44 | (Fin.ext (congrArg (fun z : Fin N => z.val) h)) } |
| 45 | refine ⟨Fin.cases a (Function.invFun e), rfl, ?_⟩ |
| 46 | intro x |
| 47 | exact ⟨(e x).succ, Function.leftInverse_invFun e.injective x⟩ |
| 48 | |
| 49 | /-- Reindex the chosen charts without replacing any map or source readout. -/ |
| 50 | theorem terminalSource_exists_indexed_chart_cover |
| 51 | (g : RiemannianMetric 3 M) (p : M) {A R rho : ℝ} {N : ℕ} |
| 52 | (S : Finset M) (hbase : p ∈ S) (hS : (↑S : Set M) ⊆ g.ball p A) |
| 53 | (hcard : S.card ≤ N) (chart : S → TerminalSourceChart g R) |
| 54 | (hcentre : ∀ q, (chart q).centre = q.val) |
| 55 | (hcompact : ∀ q, IsCompact ((chart q).chart '' Metric.closedBall (0 : E) (rho / 4))) |
| 56 | (hcover : g.ball p A ⊆ ⋃ q : S, (chart q).chart '' Metric.closedBall (0 : E) (rho / 4)) : |
| 57 | ∃ indexed : TerminalSourceIndexedChartCover g p A R rho N, |
| 58 | ∃ f : Fin (N + 1) → S, f 0 = ⟨p, hbase⟩ ∧ Function.Surjective f ∧ |
| 59 | ∀ i, indexed.chart i = chart (f i) := by |
| 60 | classical |
| 61 | obtain ⟨f, hf0, hf⟩ := exists_surjective_fin_with_zero (⟨p, hbase⟩ : S) |
| 62 | (by simpa only [Fintype.card_coe] using hcard) |
| 63 | have hindexed : g.ball p A ⊆ |
| 64 | ⋃ i : Fin (N + 1), (chart (f i)).chart '' Metric.closedBall (0 : E) (rho / 4) := by |
| 65 | intro x hx |
| 66 | obtain ⟨q, hq⟩ := mem_iUnion.mp (hcover hx) |
| 67 | obtain ⟨i, rfl⟩ := hf q |
| 68 | exact mem_iUnion.mpr ⟨i, hq⟩ |
| 69 | refine ⟨{ |
| 70 | chart := fun i => chart (f i) |
| 71 | centre_zero := (hcentre (f 0)).trans (congrArg Subtype.val hf0) |
| 72 | centre_mem := fun i => hcentre (f i) ▸ hS (f i).property |
| 73 | compact_image := fun i => hcompact (f i) |
| 74 | cover := hindexed }, f, hf0, hf, fun _ => rfl⟩ |
| 75 | |
| 76 | variable [MeasurableSpace M] [BorelSpace M] [T3Space M] [SecondCountableTopology M] |
| 77 | |
| 78 | /-- The actual geometric cover has fixed cardinality before the source index. -/ |
| 79 | theorem terminalSourceNormal_nonempty_indexed_chart_cover |
| 80 | (g : RiemannianMetric 3 M) (D : LeviCivitaData g) (p : M) |
| 81 | {A R rho K : ℝ} (hA : 0 < A) (hrho : 0 < rho) (hrhoR : rho / 4 < R) |
| 82 | (hK : 0 ≤ K) (hcompact : IsCompact (closure (g.ball p (5 * A)))) |
| 83 | (hcurv : ∀ x ∈ g.ball p (5 * A), D.curvatureTensorNorm x ≤ K) |
| 84 | (hcharts : ∀ q ∈ g.ball p A, ∃ C : TerminalSourceChart g R, C.centre = q) : |
| 85 | let d := min (A / 2) (rho / 4) |
| 86 | Nonempty (TerminalSourceIndexedChartCover g p A R rho |
| 87 | (⌈RiemannianMetric.modelVolume 3 K (3 * A) / |
| 88 | RiemannianMetric.modelVolume 3 K (d / 2)⌉₊ + 1)) := by |
| 89 | obtain ⟨S, hbase, hS, hcard, chart, hcentre, hcores, hcover⟩ := |
| 90 | terminalSourceNormal_exists_finite_chart_cover g D p hA hrho hrhoR hK |
| 91 | hcompact hcurv hcharts |
| 92 | obtain ⟨indexed, _⟩ := terminalSource_exists_indexed_chart_cover g p S hbase hS hcard |
| 93 | chart hcentre hcores hcover |
| 94 | exact ⟨indexed⟩ |
| 95 | |
| 96 | end PoincareMT.M47 |