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.Analysis.Parabolic.Dirichlet.Variational |
| 2 | import Mathlib.Analysis.Normed.Operator.Compact.Basic |
| 3 | |
| 4 | /-! |
| 5 | # Compact maps on an energy completion |
| 6 | |
| 7 | A compact continuous linear map on the smooth energy space remains compact |
| 8 | after passage to its separated completion. This is the density step in the |
| 9 | Dirichlet Rellich argument. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | open Set UniformSpace Metric Topology |
| 17 | |
| 18 | namespace Poincare.Analysis.Dirichlet |
| 19 | |
| 20 | variable {V H : Type*} [SeminormedAddCommGroup V] [InnerProductSpace ℝ V] |
| 21 | [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] |
| 22 | |
| 23 | /-- Compactness of the test-space map extends to its separated completion. -/ |
| 24 | theorem isCompactOperator_completionMap (j : V →L[ℝ] H) |
| 25 | (hj : IsCompactOperator j) : IsCompactOperator (completionMap j) := by |
| 26 | obtain ⟨K, hK, hsub⟩ := hj.image_closedBall_subset_compact (f := j.toLinearMap) 1 |
| 27 | refine (isCompactOperator_iff_image_ball_subset_compact |
| 28 | (completionMap j).toLinearMap zero_lt_one).mpr ⟨K, hK, ?_⟩ |
| 29 | rintro _ ⟨u, hu, rfl⟩ |
| 30 | have hclosed : IsClosed {v : Completion V | ‖v‖ < 1 → completionMap j v ∈ K} := by |
| 31 | have heq : {v : Completion V | ‖v‖ < 1 → completionMap j v ∈ K} = |
| 32 | {v | 1 ≤ ‖v‖} ∪ (completionMap j) ⁻¹' K := by |
| 33 | ext v |
| 34 | simp only [mem_ofPred_eq, mem_union, mem_preimage, imp_iff_not_or, not_lt] |
| 35 | rw [heq] |
| 36 | exact ((isClosed_le continuous_const continuous_norm).union |
| 37 | (hK.isClosed.preimage (completionMap j).continuous)) |
| 38 | have hall : ∀ v : Completion V, ‖v‖ < 1 → completionMap j v ∈ K := by |
| 39 | intro v |
| 40 | induction v using Completion.induction_on with |
| 41 | | hp => exact hclosed |
| 42 | | ih v => |
| 43 | intro hv |
| 44 | rw [completionMap_coe] |
| 45 | exact hsub ⟨v, by simpa using hv.le, rfl⟩ |
| 46 | exact hall u (by simpa using hu) |
| 47 | |
| 48 | end Poincare.Analysis.Dirichlet |