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.Calculus.ContDiff.Operations |
| 2 | |
| 3 | /-! |
| 4 | # Local comparison jets under cap-chart dilation |
| 5 | |
| 6 | The two metric slots contribute the scalar factor `a^2`. Every derivative |
| 7 | slot contributes one more factor of `a`. Only local regularity at the |
| 8 | dilated point is used, as required for the actual local cap pullback in |
| 9 | Morgan--Tian Claim 13.1 and Theorem 13.2, printed pp. 331-333. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped ContDiff Topology |
| 15 | |
| 16 | namespace PoincareMT.MetricSurgery |
| 17 | |
| 18 | variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 19 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 20 | |
| 21 | /-- Invertible linear coordinates also transport totalized derivatives. -/ |
| 22 | theorem comparison_iteratedFDeriv_comp_equiv (L : E ≃L[ℝ] E) |
| 23 | (f : E → F) (x : E) (j : ℕ) : |
| 24 | iteratedFDeriv ℝ j (f ∘ L) x = |
| 25 | (iteratedFDeriv ℝ j f (L x)).compContinuousLinearMap |
| 26 | (fun _ => L.toContinuousLinearMap) := by |
| 27 | have h := L.iteratedFDerivWithin_comp_right f uniqueDiffOn_univ |
| 28 | (Set.mem_univ (L x)) j |
| 29 | simpa only [Set.preimage_univ, iteratedFDerivWithin_univ] using h |
| 30 | |
| 31 | theorem norm_iteratedFDeriv_comp_dilation (f : E → F) {a : ℝ} |
| 32 | (ha : a ≠ 0) (x : E) (j : ℕ) : |
| 33 | ‖iteratedFDeriv ℝ j (fun y => f (a • y)) x‖ ≤ |
| 34 | |a| ^ j * ‖iteratedFDeriv ℝ j f (a • x)‖ := by |
| 35 | let L : E ≃L[ℝ] E := ContinuousLinearEquiv.smulLeft (Units.mk0 a ha) |
| 36 | have hL (y : E) : L y = a • y := rfl |
| 37 | have hnorm : ‖L.toContinuousLinearMap‖ ≤ |a| := by |
| 38 | apply L.toContinuousLinearMap.opNorm_le_bound (abs_nonneg a) |
| 39 | intro y |
| 40 | change ‖a • y‖ ≤ |a| * ‖y‖ |
| 41 | rw [norm_smul, Real.norm_eq_abs] |
| 42 | change ‖iteratedFDeriv ℝ j (f ∘ L) x‖ ≤ _ |
| 43 | rw [comparison_iteratedFDeriv_comp_equiv] |
| 44 | calc |
| 45 | _ ≤ ‖iteratedFDeriv ℝ j f (L x)‖ * ‖L.toContinuousLinearMap‖ ^ j := by |
| 46 | simpa only [Finset.prod_const, Finset.card_univ, Fintype.card_fin] using |
| 47 | (iteratedFDeriv ℝ j f (L x)).norm_compContinuousLinearMap_le |
| 48 | (fun _ => L.toContinuousLinearMap) |
| 49 | _ ≤ ‖iteratedFDeriv ℝ j f (L x)‖ * |a| ^ j := |
| 50 | mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (norm_nonneg _) hnorm j) (norm_nonneg _) |
| 51 | _ = _ := by rw [hL, mul_comm] |
| 52 | |
| 53 | /-- Claim 13.1's dilated coefficient error, with no global regularity premise. -/ |
| 54 | theorem norm_iteratedFDeriv_dilation_at {f : E → F} {a b : ℝ} {x : E} {j m : ℕ} |
| 55 | (ha : 0 < a) (ha2 : a ≤ 2) (hf : ContDiffAt ℝ ∞ f (a • x)) |
| 56 | (hb : 0 ≤ b) (hjet : ‖iteratedFDeriv ℝ j f (a • x)‖ ≤ b) (hj : j ≤ m) : |
| 57 | ‖iteratedFDeriv ℝ j (fun y => a ^ 2 • f (a • y)) x‖ ≤ (2 : ℝ) ^ (m + 2) * b := by |
| 58 | have hcomp : ContDiffAt ℝ ∞ (fun y => f (a • y)) x := |
| 59 | hf.comp x (contDiffAt_id.const_smul a) |
| 60 | rw [iteratedFDeriv_const_smul_apply' (hcomp.of_le (by exact_mod_cast le_top)), |
| 61 | norm_smul, Real.norm_eq_abs, abs_of_nonneg (sq_nonneg a)] |
| 62 | calc |
| 63 | _ ≤ a ^ 2 * (|a| ^ j * ‖iteratedFDeriv ℝ j f (a • x)‖) := |
| 64 | mul_le_mul_of_nonneg_left (norm_iteratedFDeriv_comp_dilation f ha.ne' x j) (sq_nonneg a) |
| 65 | _ ≤ a ^ 2 * (a ^ j * b) := by |
| 66 | rw [abs_of_pos ha] |
| 67 | exact mul_le_mul_of_nonneg_left |
| 68 | (mul_le_mul_of_nonneg_left hjet (pow_nonneg ha.le _)) (sq_nonneg a) |
| 69 | _ = a ^ (j + 2) * b := by rw [pow_add]; ring |
| 70 | _ ≤ (2 : ℝ) ^ (j + 2) * b := |
| 71 | mul_le_mul_of_nonneg_right (pow_le_pow_left₀ ha.le ha2 _) hb |
| 72 | _ ≤ (2 : ℝ) ^ (m + 2) * b := by gcongr; norm_num |
| 73 | |
| 74 | end PoincareMT.MetricSurgery |