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.StandardCap.Persistence.Analysis.Jets.UniformCompactDerivative |
| 2 | import Mathlib.Analysis.Normed.Operator.Basic |
| 3 | |
| 4 | /-! |
| 5 | # Uniform evaluation of converging linear maps |
| 6 | |
| 7 | Operator convergence gives uniform evaluation on compact sets. Uniform |
| 8 | directional convergence on a unit ball conversely gives operator |
| 9 | convergence. These are the frame and derivative readouts in |
| 10 | Morgan--Tian, Corollary 16.7, p. 372; see |
| 11 | `derivations/20-exponential-model-and-convergence.md`. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter Metric |
| 17 | open scoped Topology |
| 18 | |
| 19 | variable {E F ι P : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 20 | [NormedAddCommGroup F] [NormedSpace ℝ F] {l : Filter ι} |
| 21 | |
| 22 | /-- Convergence in operator norm gives uniform convergence of the |
| 23 | evaluations on any compact set of vectors. -/ |
| 24 | theorem Filter.Tendsto.tendstoUniformlyOn_clm_apply |
| 25 | {Lseq : ι → E →L[ℝ] F} {L : E →L[ℝ] F} |
| 26 | (hL : Tendsto Lseq l (𝓝 L)) {K : Set E} (hK : IsCompact K) : |
| 27 | TendstoUniformlyOn (fun i x => Lseq i x) (fun x => L x) l K := by |
| 28 | obtain ⟨C, hC⟩ := hK.exists_bound_of_continuousOn continuous_id.continuousOn |
| 29 | let B := max C 1 |
| 30 | have hB : 0 < B := lt_of_lt_of_le zero_lt_one (le_max_right _ _) |
| 31 | rw [Metric.tendstoUniformlyOn_iff] |
| 32 | intro epsilon hepsilon |
| 33 | filter_upwards [hL.eventually (Metric.ball_mem_nhds L (div_pos hepsilon hB))] with i hi |
| 34 | intro x hx |
| 35 | have hn : ‖Lseq i - L‖ < epsilon / B := by |
| 36 | simpa only [Metric.mem_ball, dist_eq_norm] using hi |
| 37 | have hxB : ‖x‖ ≤ B := (hC x hx).trans (le_max_left _ _) |
| 38 | have hbound : ‖(Lseq i - L) x‖ < epsilon := calc |
| 39 | ‖(Lseq i - L) x‖ ≤ ‖Lseq i - L‖ * ‖x‖ := (Lseq i - L).le_opNorm x |
| 40 | _ ≤ ‖Lseq i - L‖ * B := mul_le_mul_of_nonneg_left hxB (norm_nonneg _) |
| 41 | _ < epsilon / B * B := mul_lt_mul_of_pos_right hn hB |
| 42 | _ = epsilon := div_mul_cancel₀ _ hB.ne' |
| 43 | simpa only [dist_eq_norm, sub_apply, norm_sub_rev] using hbound |
| 44 | |
| 45 | /-- Uniform directional convergence on the closed unit ball yields |
| 46 | uniform operator-norm convergence, with no compactness assumption. -/ |
| 47 | theorem TendstoUniformlyOn.clm_of_apply_unitBall |
| 48 | {Lseq : ι → P → E →L[ℝ] F} {L : P → E →L[ℝ] F} {K : Set P} |
| 49 | (hL : TendstoUniformlyOn (fun i (z : P × E) => Lseq i z.1 z.2) |
| 50 | (fun z => L z.1 z.2) l (K ×ˢ closedBall 0 1)) : |
| 51 | TendstoUniformlyOn Lseq L l K := by |
| 52 | rw [Metric.tendstoUniformlyOn_iff] at hL ⊢ |
| 53 | intro epsilon hepsilon |
| 54 | filter_upwards [hL (epsilon / 2) (half_pos hepsilon)] with i hi |
| 55 | intro p hp |
| 56 | have hbound : ‖Lseq i p - L p‖ ≤ epsilon / 2 := by |
| 57 | apply ContinuousLinearMap.opNorm_le_of_unit_norm (half_pos hepsilon).le |
| 58 | intro v hv |
| 59 | have hvB : v ∈ closedBall (0 : E) 1 := by |
| 60 | simpa only [mem_closedBall, dist_zero_right, hv] using (le_refl (1 : ℝ)) |
| 61 | have h := (hi (p, v) ⟨hp, hvB⟩).le |
| 62 | simpa only [dist_eq_norm, sub_apply, norm_sub_rev] using h |
| 63 | simpa only [dist_eq_norm, norm_sub_rev] using hbound.trans_lt (half_lt_self hepsilon) |