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.Existence.Asymptotics.EndCenteredCylinderJets |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Asymptotics.CylinderPullbackSmooth |
| 3 | |
| 4 | /-! |
| 5 | # One uniform intrinsic estimate on every fixed end patch |
| 6 | |
| 7 | A natural floor chooses a positive translated reference index for each |
| 8 | point, while locality keeps that index fixed for its derivative germ. |
| 9 | The resulting bound is uniform on the entire original patch and time |
| 10 | set. This is Proposition 12.7, pp. 298-299 and |
| 11 | asymptotic-certificate-patches.md. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff |
| 19 | |
| 20 | namespace PoincareMT.M34 |
| 21 | |
| 22 | /-- Every sufficiently large height has a positive-index reference |
| 23 | representative in the fixed cutoff plateau |
| 24 | (Proposition 12.7, pp. 298-299). -/ |
| 25 | theorem exists_endTail_reference_index (N : ℕ) {s : ℝ} (hs : (N : ℝ) + 9 / 2 < s) : |
| 26 | ∃ k : ℕ, N ≤ k ∧ s - (k + 1 : ℕ) ∈ Icc (17 / 5 : ℝ) (23 / 5) := by |
| 27 | let k : ℕ := ⌊s - 9 / 2⌋₊ |
| 28 | have hs0 : 0 ≤ s - 9 / 2 := by have := Nat.cast_nonneg (α := ℝ) N; linarith |
| 29 | have hk : N ≤ k := (Nat.le_floor_iff hs0).mpr (by linarith) |
| 30 | have hlo := Nat.floor_le hs0 |
| 31 | have hhi := Nat.lt_floor_add_one (s - 9 / 2) |
| 32 | refine ⟨k, hk, ?_⟩ |
| 33 | change (17 / 5 : ℝ) ≤ s - (k + 1 : ℕ) ∧ s - (k + 1 : ℕ) ≤ 23 / 5 |
| 34 | simp only [Nat.cast_add, Nat.cast_one] |
| 35 | dsimp [k] |
| 36 | constructor <;> linarith |
| 37 | |
| 38 | /-- Uniform tail errors control the full fixed centered cylinder, with |
| 39 | one strict common bound for all included times and points |
| 40 | (Proposition 12.7, pp. 298-299). -/ |
| 41 | theorem endCenteredCylinder_familyClose_of_tail |
| 42 | {g0 : RiemannianMetric 3 StandardCapSpace} (e : StandardCylindricalEnd g0) |
| 43 | (G : ℝ → RiemannianMetric 3 StandardCapSpace) (I : Set ℝ) |
| 44 | {ε : ℝ} (hε : 0 < ε) {N : ℕ} |
| 45 | (htail : ∀ k ≥ N, ∀ t ∈ I, ∀ q : UnitTwoSphere, |
| 46 | ∀ r ∈ Icc (17 / 5 : ℝ) (23 / 5), |
| 47 | roundCylinderJetErrorSquared t |
| 48 | (roundCylinderPullback (G t) (endAxialTranslation e (k + 1 : ℕ) ∘ e.coordinate)) |
| 49 | ⌊ε⁻¹⌋₊ (q, r) ≤ ε ^ 2 / 4) |
| 50 | {H : ℝ} (hH : (N : ℝ) + 9 / 2 < H - ε⁻¹) : |
| 51 | RoundCylinderFamilyClose ε I |
| 52 | (fun t => roundCylinderPullback (G t) (endCenteredCylinderMap e H)) := by |
| 53 | have hHL : ε⁻¹ < H := by have := Nat.cast_nonneg (α := ℝ) N; linarith |
| 54 | refine ⟨?_, ε ^ 2 / 4, by nlinarith [sq_pos_of_pos hε], ?_⟩ |
| 55 | · intro t _ |
| 56 | apply roundCylinderTensorSmoothOn_pullback (G t) |
| 57 | intro z hz |
| 58 | exact (endCenteredCylinderMap_contMDiffAt e H (by linarith [hz.2.1])).contMDiffWithinAt |
| 59 | · intro t ht z hz |
| 60 | obtain ⟨k, hk, hr⟩ := exists_endTail_reference_index N |
| 61 | (s := H + z.2) (by linarith [hz.1]) |
| 62 | have hpos : 0 < z.2 + (H - (k + 1 : ℕ)) := by linarith [hr.1] |
| 63 | rw [endCenteredCylinderJetErrorSquared_eq e (k + 1) H (G t) t ⌊ε⁻¹⌋₊ hpos] |
| 64 | have hpoint : cylinderAxialTranslation (H - (k + 1 : ℕ)) z = |
| 65 | (z.1, H + z.2 - (k + 1 : ℕ)) := by |
| 66 | apply Prod.ext |
| 67 | · rfl |
| 68 | · dsimp [cylinderAxialTranslation] |
| 69 | ring |
| 70 | rw [hpoint] |
| 71 | exact htail k hk t ht z.1 _ hr |
| 72 | |
| 73 | end PoincareMT.M34 |