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.Elliptic.Regularity.InteriorEstimates.Embedding.Profile |
| 2 | |
| 3 | /-! |
| 4 | # Fixed cutoff bounds between concentric balls |
| 5 | -/ |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | open MeasureTheory Set Metric |
| 10 | open scoped ENNReal |
| 11 | |
| 12 | namespace Poincare.Analysis.Elliptic.InteriorEstimates |
| 13 | |
| 14 | variable {d : ℕ} |
| 15 | local notation "E" => EuclideanSpace ℝ (Fin d) |
| 16 | |
| 17 | private theorem exists_cutoff_derivative_bound {χ : E → ℝ} |
| 18 | (hχ : ContDiff ℝ (⊤ : ℕ∞) χ) (hc : HasCompactSupport χ) (k : ℕ) : |
| 19 | ∃ A : ℝ, 0 ≤ A ∧ ∀ j ≤ k, ∀ x, ‖iteratedFDeriv ℝ j χ x‖ ≤ A := by |
| 20 | classical |
| 21 | have hbounds : ∀ j : ℕ, ∃ A : ℝ, ∀ x, ‖iteratedFDeriv ℝ j χ x‖ ≤ A := by |
| 22 | intro j |
| 23 | exact (hc.iteratedFDeriv (𝕜 := ℝ) j).exists_bound_of_continuous |
| 24 | (hχ.continuous_iteratedFDeriv (by exact_mod_cast le_top)) |
| 25 | choose A hA using hbounds |
| 26 | refine ⟨∑ j ∈ Finset.range (k + 1), max 0 (A j), |
| 27 | Finset.sum_nonneg (fun j hj => le_max_left _ _), ?_⟩ |
| 28 | intro j hj x |
| 29 | exact ((hA j x).trans (le_max_right _ _)).trans |
| 30 | (Finset.single_le_sum (fun i hi => le_max_left _ _) |
| 31 | (Finset.mem_range.mpr (Nat.lt_succ_of_le hj))) |
| 32 | |
| 33 | /-- The cutoff and its multiplier bound depend only on the ball and derivative |
| 34 | order, and are chosen before the smooth function to be localized. -/ |
| 35 | theorem exists_fixed_cutoff_profile_bound {x₀ : E} {R : ℝ} (hR : 0 < R) (k : ℕ) : |
| 36 | ∃ χ : E → ℝ, ∃ A : ℝ, |
| 37 | ContDiff ℝ (⊤ : ℕ∞) χ ∧ HasCompactSupport χ ∧ |
| 38 | tsupport χ ⊆ Metric.ball x₀ R ∧ |
| 39 | EqOn χ (fun _ => 1) (Metric.ball x₀ (R / 2)) ∧ 0 ≤ A ∧ |
| 40 | ∀ {u : E → ℝ}, ContDiff ℝ (⊤ : ℕ∞) u → |
| 41 | derivativeProfile 2 (Metric.ball x₀ R) k (fun x => χ x * u x) ≤ |
| 42 | ENNReal.ofReal A * derivativeProfile 2 (Metric.ball x₀ R) k u := by |
| 43 | let χ : ContDiffBump x₀ := |
| 44 | ⟨R / 2, 3 * R / 4, by positivity, by linarith⟩ |
| 45 | obtain ⟨A, hA, hbound⟩ := |
| 46 | exists_cutoff_derivative_bound χ.contDiff χ.hasCompactSupport k |
| 47 | refine ⟨χ, cutoffMultiplier k A, χ.contDiff, χ.hasCompactSupport, ?_, ?_, |
| 48 | cutoffMultiplier_nonneg k hA, ?_⟩ |
| 49 | · rw [χ.tsupport_eq] |
| 50 | exact Metric.closedBall_subset_ball (by dsimp [χ]; linarith) |
| 51 | · intro x hx |
| 52 | exact χ.one_of_mem_closedBall (Metric.ball_subset_closedBall hx) |
| 53 | · intro u hu |
| 54 | exact derivativeProfile_mul_le isOpen_ball (by norm_num) k χ.contDiff hu hA |
| 55 | (fun j hj x hx => hbound j hj x) |
| 56 | |
| 57 | end Poincare.Analysis.Elliptic.InteriorEstimates |