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 | /- Adapted from Mapher `PoincareMT/Proofs/M03/CoordinateCutoff.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import PoincareLib.Geometry.Riemannian.Connection |
| 6 | |
| 7 | /-! |
| 8 | # Smooth cutoffs in Euclidean coordinates |
| 9 | |
| 10 | The pinned smooth transition composed with the squared norm constructs a |
| 11 | cutoff between two concentric balls, including in dimension zero. |
| 12 | Derivation and source bindings: proof-work/tasks/M03/reviews/coordinate-cutoff-derivation.md. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open scoped ContDiff Topology |
| 18 | open Set |
| 19 | |
| 20 | namespace PoincareMT.RicciFlow.Local |
| 21 | |
| 22 | theorem exists_smooth_coordinate_cutoff |
| 23 | {n : ℕ} (c : EuclideanSpace ℝ (Fin n)) {r R : ℝ} |
| 24 | (hr : 0 < r) (hrR : r < R) : |
| 25 | ∃ φ : EuclideanSpace ℝ (Fin n) → ℝ, |
| 26 | ContDiff ℝ ∞ φ ∧ HasCompactSupport φ ∧ |
| 27 | (∀ x, φ x ∈ Icc (0 : ℝ) 1) ∧ |
| 28 | EqOn φ (fun _ => 1) (Metric.closedBall c r) ∧ |
| 29 | tsupport φ ⊆ Metric.closedBall c R := by |
| 30 | have hR : 0 < R := hr.trans hrR |
| 31 | have hd : 0 < R ^ 2 - r ^ 2 := |
| 32 | sub_pos.mpr ((sq_lt_sq₀ hr.le hR.le).mpr hrR) |
| 33 | let φ : EuclideanSpace ℝ (Fin n) → ℝ := |
| 34 | fun x => Real.smoothTransition ((R ^ 2 - ‖x - c‖ ^ 2) / (R ^ 2 - r ^ 2)) |
| 35 | have hφ : ContDiff ℝ ∞ φ := |
| 36 | Real.smoothTransition.contDiff.comp |
| 37 | ((contDiff_const.sub ((contDiff_id.sub contDiff_const).norm_sq ℝ)).div_const _) |
| 38 | have hsupp : tsupport φ ⊆ Metric.closedBall c R := by |
| 39 | apply closure_minimal ?_ Metric.isClosed_closedBall |
| 40 | intro x hx |
| 41 | by_contra hball |
| 42 | have hnorm : R < ‖x - c‖ := by |
| 43 | change ¬ dist x c ≤ R at hball |
| 44 | rw [dist_eq_norm] at hball |
| 45 | exact lt_of_not_ge hball |
| 46 | apply hx |
| 47 | apply Real.smoothTransition.zero_of_nonpos |
| 48 | exact div_nonpos_of_nonpos_of_nonneg |
| 49 | (sub_nonpos.mpr ((sq_le_sq₀ hR.le (norm_nonneg _)).mpr hnorm.le)) hd.le |
| 50 | refine ⟨φ, hφ, (isCompact_closedBall c R).of_isClosed_subset |
| 51 | (isClosed_tsupport φ) hsupp, ?_, ?_, hsupp⟩ |
| 52 | · intro x |
| 53 | exact ⟨Real.smoothTransition.nonneg _, Real.smoothTransition.le_one _⟩ |
| 54 | · intro x hx |
| 55 | apply Real.smoothTransition.one_of_one_le |
| 56 | apply (le_div_iff₀ hd).mpr |
| 57 | have hnorm : ‖x - c‖ ≤ r := by |
| 58 | change dist x c ≤ r at hx |
| 59 | rw [dist_eq_norm] at hx |
| 60 | exact hx |
| 61 | have hsq := (sq_le_sq₀ (norm_nonneg (x - c)) hr.le).mpr hnorm |
| 62 | linarith |
| 63 | |
| 64 | end PoincareMT.RicciFlow.Local |