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 | /- Adapted from Mapher `PoincareMT/Proofs/M03/FiniteCompactCoefficientFamily.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import PoincareLib.Geometry.RicciFlow.Local.Energy.Coefficients.CompactFiniteCoefficient |
| 6 | |
| 7 | set_option autoImplicit false |
| 8 | |
| 9 | open scoped BigOperators |
| 10 | |
| 11 | namespace PoincareMT.RicciFlow.Local |
| 12 | |
| 13 | /- A finite chart family admits one coefficient bound after summing the |
| 14 | nonnegative bounds supplied on each compact chart domain. -/ |
| 15 | theorem exists_finite_compact_family_square_sum_bound |
| 16 | {X I B M : Type*} [TopologicalSpace X] |
| 17 | [Fintype I] [Fintype B] |
| 18 | (s : Finset M) (K : M → Set X) |
| 19 | (hK : ∀ a ∈ s, IsCompact (K a)) |
| 20 | (c : M → X → I → B → ℝ) |
| 21 | (hc : ∀ a ∈ s, ∀ i b, ContinuousOn (fun x => c a x i b) (K a)) : |
| 22 | ∃ C : ℝ, 0 ≤ C ∧ |
| 23 | ∀ a ∈ s, ∀ x ∈ K a, (∑ i, ∑ b, (c a x i b) ^ 2) ≤ C := by |
| 24 | classical |
| 25 | let D : M → ℝ := fun a => |
| 26 | if ha : a ∈ s then |
| 27 | Classical.choose (exists_compact_finite_square_sum_bound |
| 28 | (hK a ha) (fun x i b => c a x i b) (fun i b => hc a ha i b)) |
| 29 | else 0 |
| 30 | have hD (a : M) (ha : a ∈ s) : |
| 31 | 0 ≤ D a ∧ ∀ x ∈ K a, (∑ i, ∑ b, (c a x i b) ^ 2) ≤ D a := by |
| 32 | dsimp [D] |
| 33 | rw [dif_pos ha] |
| 34 | exact Classical.choose_spec (exists_compact_finite_square_sum_bound |
| 35 | (hK a ha) (fun x i b => c a x i b) (fun i b => hc a ha i b)) |
| 36 | let C : ℝ := s.sum D |
| 37 | have hC : 0 ≤ C := by |
| 38 | dsimp [C] |
| 39 | exact Finset.sum_nonneg (fun a ha => (hD a ha).1) |
| 40 | refine ⟨C, hC, ?_⟩ |
| 41 | intro a ha x hx |
| 42 | have hlocal := (hD a ha).2 x hx |
| 43 | have hDa : D a ≤ s.sum D := by |
| 44 | exact Finset.single_le_sum (fun b hb => (hD b hb).1) ha |
| 45 | exact hlocal.trans (by simpa [C] using hDa) |
| 46 | |
| 47 | end PoincareMT.RicciFlow.Local |