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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Analysis.Calculus.Diffeomorphism.Perturbation |
| 3 | import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct |
| 4 | import Mathlib.Topology.Order.IntermediateValue |
| 5 | |
| 6 | /-! |
| 7 | # Actual smooth axial compression of a cap end |
| 8 | |
| 9 | A compactly supported perturbation of the axial identity shortens the |
| 10 | outer endpoint while fixing the entire inner side and a neighborhood |
| 11 | of the neck center. The lower M07 inverse theorem constructs the actual |
| 12 | smooth inverse. This is the one-dimensional part of the cap recut in |
| 13 | Morgan--Tian Proposition 9.79, pp. 232-234; see the axial-compression |
| 14 | derivation in the M28 cap-topology records. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open Set Filter Metric Poincare.Analysis.Calculus |
| 20 | open scoped ContDiff Topology |
| 21 | |
| 22 | namespace PoincareMT.CapRecut |
| 23 | |
| 24 | /-- A fixed cutoff supported near the old outer endpoint, chosen before |
| 25 | the compression amount (Proposition 9.79, pp. 232-234). -/ |
| 26 | noncomputable def axialCutoff (A : ℝ) (hA : 0 < A) : ContDiffBump A where |
| 27 | rIn := A / 8 |
| 28 | rOut := A / 4 |
| 29 | rIn_pos := by positivity |
| 30 | rIn_lt_rOut := by linarith |
| 31 | |
| 32 | /-- The cutoff vanishes on a fixed neighborhood of the inner side and |
| 33 | the center, independently of the compression amount. -/ |
| 34 | theorem axialCutoff_eq_zero {A : ℝ} (hA : 0 < A) {x : ℝ} (hx : x ≤ A / 2) : |
| 35 | axialCutoff A hA x = 0 := by |
| 36 | apply (axialCutoff A hA).zero_of_le_dist |
| 37 | change A / 4 ≤ dist x A |
| 38 | rw [Real.dist_eq, abs_of_nonpos (by linarith : x - A ≤ 0)] |
| 39 | linarith |
| 40 | |
| 41 | /-- The old outer endpoint is moved by exactly the chosen amount. -/ |
| 42 | theorem axialCutoff_at_endpoint {A : ℝ} (hA : 0 < A) : |
| 43 | axialCutoff A hA A = 1 := |
| 44 | (axialCutoff A hA).one_of_mem_closedBall |
| 45 | (mem_closedBall_self (axialCutoff A hA).rIn_pos.le) |
| 46 | |
| 47 | /-- Actual smooth real-line diffeomorphisms compress the old neck |
| 48 | interval onto a shorter interval and fix the entire inner side. The |
| 49 | strict interval inequalities follow eventually from a positive amount |
| 50 | tending to zero (Proposition 9.79, pp. 232-234). -/ |
| 51 | theorem eventually_exists_axial_compression {A : ℝ} (hA : 0 < A) |
| 52 | {δ : ℕ → ℝ} (hδ : Tendsto δ atTop (𝓝 0)) (hδpos : ∀ᶠ k in atTop, 0 < δ k) : |
| 53 | ∀ᶠ k in atTop, A / 2 < A - δ k ∧ A - δ k < A ∧ |
| 54 | ∃ e : ℝ ≃ₜ ℝ, ContDiff ℝ ∞ e ∧ ContDiff ℝ ∞ e.symm ∧ StrictMono e ∧ |
| 55 | (∀ x, e x = x - δ k * axialCutoff A hA x) ∧ |
| 56 | (∀ x, x ≤ A / 2 → e x = x) ∧ |
| 57 | e '' Ioo (-A) A = Ioo (-A) (A - δ k) := by |
| 58 | let χ := axialCutoff A hA |
| 59 | have hzero : TendstoUniformlyOn (fun k (x : ℝ) => x - δ k) id atTop (tsupport χ) := by |
| 60 | apply Metric.tendstoUniformlyOn_iff.mpr |
| 61 | intro ε hε |
| 62 | have hnorm : Tendsto (fun k => ‖δ k‖) atTop (𝓝 0) := by simpa using hδ.norm |
| 63 | filter_upwards [(tendsto_order.mp hnorm).2 ε hε] with k hk x _ |
| 64 | simpa [Real.dist_eq] using hk |
| 65 | have hone : TendstoUniformlyOn (fun k => fderiv ℝ (fun x : ℝ => x - δ k)) |
| 66 | (fun _ => ContinuousLinearMap.id ℝ ℝ) atTop (tsupport χ) := by |
| 67 | apply Metric.tendstoUniformlyOn_iff.mpr |
| 68 | intro ε hε |
| 69 | exact Eventually.of_forall fun k x _ => by simpa only |
| 70 | [fderiv_sub_const, fderiv_fun_id, dist_self] using hε |
| 71 | have hsmooth : ∀ᶠ k in atTop, ∀ x ∈ tsupport χ, |
| 72 | ContDiffAt ℝ ∞ (fun y : ℝ => y - δ k) x := |
| 73 | Eventually.of_forall fun k x _ => (contDiff_id.sub contDiff_const).contDiffAt |
| 74 | filter_upwards [eventually_exists_cutoff_diffeomorphism_of_contDiffAt |
| 75 | χ.contDiff χ.hasCompactSupport hsmooth hzero hone, |
| 76 | hδpos, (tendsto_order.mp hδ).2 (A / 2) (by positivity)] with k hk hkpos hksmall |
| 77 | obtain ⟨e, he, hes, hei, _, _⟩ := hk |
| 78 | have hformula (x : ℝ) : e x = x - δ k * χ x := by |
| 79 | rw [he] |
| 80 | simp only [smul_eq_mul] |
| 81 | ring |
| 82 | have hfix (x : ℝ) (hx : x ≤ A / 2) : e x = x := by |
| 83 | rw [hformula, axialCutoff_eq_zero hA hx, mul_zero, sub_zero] |
| 84 | have hmono : StrictMono e := by |
| 85 | rcases e.continuous.strictMono_of_inj e.injective with h | h |
| 86 | · exact h |
| 87 | · have hbad := h (show -A < (0 : ℝ) by linarith) |
| 88 | rw [hfix _ (by linarith), hfix _ (by linarith)] at hbad |
| 89 | linarith |
| 90 | refine ⟨by linarith, by linarith, e, hes, hei, hmono, hformula, hfix, ?_⟩ |
| 91 | rw [e.continuous.image_Ioo_of_strictMono hmono, hfix _ (by linarith), |
| 92 | hformula, axialCutoff_at_endpoint hA, mul_one] |
| 93 | |
| 94 | /-- Every finite actual derivative of the displayed axial perturbations |
| 95 | converges uniformly on the whole real line. No bound uniform in the |
| 96 | derivative order is asserted (Proposition 9.79, pp. 232-234). -/ |
| 97 | theorem axial_perturbation_jets_tendsto {A : ℝ} (hA : 0 < A) |
| 98 | {δ : ℕ → ℝ} (hδ : Tendsto δ atTop (𝓝 0)) (m : ℕ) : |
| 99 | TendstoUniformlyOn |
| 100 | (fun k => iteratedFDeriv ℝ m (fun x : ℝ => x - δ k * axialCutoff A hA x)) |
| 101 | (iteratedFDeriv ℝ m (id : ℝ → ℝ)) atTop univ := by |
| 102 | let χ := axialCutoff A hA |
| 103 | have hχ : ContDiff ℝ m χ := χ.contDiff |
| 104 | obtain ⟨B, hB⟩ := (χ.hasCompactSupport.iteratedFDeriv (𝕜 := ℝ) m).exists_bound_of_continuous |
| 105 | hχ.continuous_iteratedFDeriv' |
| 106 | have hnorm : Tendsto (fun k => ‖δ k‖) atTop (𝓝 0) := by simpa using hδ.norm |
| 107 | have hscale : Tendsto (fun k => ‖δ k‖ * (max B 0 + 1)) atTop (𝓝 0) := by |
| 108 | simpa using hnorm.mul_const (max B 0 + 1) |
| 109 | apply Metric.tendstoUniformlyOn_iff.mpr |
| 110 | intro ε hε |
| 111 | filter_upwards [(tendsto_order.mp hscale).2 ε hε] with k hk x _ |
| 112 | have hjet : iteratedFDeriv ℝ m (fun y : ℝ => y - δ k * χ y) x = |
| 113 | iteratedFDeriv ℝ m (id : ℝ → ℝ) x - δ k • iteratedFDeriv ℝ m χ x := by |
| 114 | have hsub := iteratedFDeriv_sub_apply (𝕜 := ℝ) (i := m) (x := x) |
| 115 | (f := id) contDiffAt_id (hχ.const_smul (δ k)).contDiffAt |
| 116 | change iteratedFDeriv ℝ m (fun y : ℝ => y - δ k * χ y) x = |
| 117 | iteratedFDeriv ℝ m (id : ℝ → ℝ) x - |
| 118 | iteratedFDeriv ℝ m (fun y => δ k • χ y) x at hsub |
| 119 | rw [iteratedFDeriv_const_smul_apply' hχ.contDiffAt] at hsub |
| 120 | exact hsub |
| 121 | rw [hjet, dist_comm, dist_self_sub_left, norm_smul] |
| 122 | exact lt_of_le_of_lt |
| 123 | (mul_le_mul_of_nonneg_left ((hB x).trans (by linarith [le_max_left B 0])) (norm_nonneg _)) hk |
| 124 | |
| 125 | end PoincareMT.CapRecut |