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 Mathlib.Analysis.InnerProductSpace.Dual |
| 2 | import Mathlib.Analysis.Normed.Operator.Compact.Basic |
| 3 | import Mathlib.Topology.ContinuousMap.Bounded.Normed |
| 4 | |
| 5 | /-! |
| 6 | # Continuous evaluation rows of compact operators |
| 7 | |
| 8 | Compactness turns joint evaluation continuity into uniform continuity over |
| 9 | the image of the unit ball. Riesz representation then gives norm-continuous |
| 10 | Hilbert-space rows. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Topology InnerProductSpace BoundedContinuousFunction |
| 19 | |
| 20 | namespace Poincare.Analysis.Dirichlet.Kernel |
| 21 | |
| 22 | variable {E X : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] |
| 23 | [CompleteSpace E] [TopologicalSpace X] |
| 24 | |
| 25 | /-- The Riesz representative of evaluation after a bounded continuous-function |
| 26 | operator. -/ |
| 27 | noncomputable def evaluationRow (T : E →L[ℝ] (X →ᵇ ℝ)) (x : X) : E := |
| 28 | (InnerProductSpace.toDual ℝ E).symm |
| 29 | ((BoundedContinuousFunction.evalCLM ℝ x).comp T) |
| 30 | |
| 31 | theorem inner_evaluationRow (T : E →L[ℝ] (X →ᵇ ℝ)) (x : X) (f : E) : |
| 32 | inner ℝ (evaluationRow T x) f = T f x := |
| 33 | InnerProductSpace.toDual_symm_apply |
| 34 | |
| 35 | theorem norm_evaluationRow_le (T : E →L[ℝ] (X →ᵇ ℝ)) (x : X) : |
| 36 | ‖evaluationRow T x‖ ≤ ‖T‖ := by |
| 37 | rw [evaluationRow, (InnerProductSpace.toDual ℝ E).symm.norm_map] |
| 38 | apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg T) |
| 39 | intro f |
| 40 | exact ((T f).norm_coe_le_norm x).trans (T.le_opNorm f) |
| 41 | |
| 42 | omit [CompleteSpace E] in |
| 43 | private theorem continuous_evaluation_comp (T : E →L[ℝ] (X →ᵇ ℝ)) |
| 44 | (hT : IsCompactOperator T) : |
| 45 | Continuous (fun x => (BoundedContinuousFunction.evalCLM ℝ x).comp T) := by |
| 46 | have hTc : IsCompactOperator T.toLinearMap := hT |
| 47 | obtain ⟨K, hK, hTK⟩ := hTc.image_closedBall_subset_compact 1 |
| 48 | apply continuous_iff_continuousAt.mpr |
| 49 | intro x |
| 50 | apply Metric.continuousAt_iff'.mpr |
| 51 | intro ε hε |
| 52 | have hcont : Continuous (fun p : X × (X →ᵇ ℝ) => dist (p.2 p.1) (p.2 x)) := |
| 53 | (continuous_snd.eval continuous_fst).dist (continuous_snd.eval_const x) |
| 54 | have huniform : ∀ᶠ y in 𝓝 x, ∀ q ∈ K, dist (q y) (q x) < ε / 2 := by |
| 55 | apply hK.eventually_forall_of_forall_eventually |
| 56 | intro q _ |
| 57 | have hqcont : ContinuousAt (fun p : X × (X →ᵇ ℝ) => dist (p.2 p.1) (p.2 x)) |
| 58 | (x, q) := hcont.continuousAt |
| 59 | exact hqcont.eventually (gt_mem_nhds (by simpa using half_pos hε)) |
| 60 | filter_upwards [huniform] with y hy |
| 61 | rw [dist_eq_norm] |
| 62 | have hnorm : ‖(BoundedContinuousFunction.evalCLM ℝ y).comp T - |
| 63 | (BoundedContinuousFunction.evalCLM ℝ x).comp T‖ ≤ ε / 2 := by |
| 64 | apply ContinuousLinearMap.opNorm_le_of_unit_norm (le_of_lt (half_pos hε)) |
| 65 | intro f hf |
| 66 | have hfball : f ∈ Metric.closedBall (0 : E) 1 := by simpa using hf.le |
| 67 | have hq := hy (T f) (hTK ⟨f, hfball, rfl⟩) |
| 68 | simpa only [sub_apply, ContinuousLinearMap.comp_apply, |
| 69 | BoundedContinuousFunction.evalCLM_apply, dist_eq_norm] using hq.le |
| 70 | exact hnorm.trans_lt (half_lt_self hε) |
| 71 | |
| 72 | /-- Compactness into the supremum-norm space makes the Riesz evaluation rows |
| 73 | continuous in the Hilbert norm, on an arbitrary topological point space. -/ |
| 74 | theorem continuous_evaluationRow (T : E →L[ℝ] (X →ᵇ ℝ)) |
| 75 | (hT : IsCompactOperator T) : Continuous (evaluationRow T) := |
| 76 | (InnerProductSpace.toDual ℝ E).symm.continuous.comp (continuous_evaluation_comp T hT) |
| 77 | |
| 78 | end Poincare.Analysis.Dirichlet.Kernel |