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.Geometry.RicciFlow.Generalized.BoundedDistance.Analysis.FiniteHessian.Pullback |
| 3 | |
| 4 | /-! |
| 5 | # Uniform finite pullback-error tails |
| 6 | |
| 7 | A single family containing every tolerance level fixes the pullback |
| 8 | constant before the desired tolerance. Uniform ambient jet convergence |
| 9 | therefore gives uniform pullback jet convergence on the same source tails. |
| 10 | Source: Morgan--Tian Proposition 9.79, pp. 232-234, and Proposition 10.7, |
| 11 | p. 253; M28 derivations 103 and 105. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped ContDiff Topology |
| 18 | |
| 19 | namespace PoincareMT.Proofs.M28.FiniteHessian |
| 20 | |
| 21 | variable {ι E F G : Type*} |
| 22 | [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 23 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 24 | [NormedAddCommGroup G] [NormedSpace ℝ G] |
| 25 | |
| 26 | /-- Uniformly small ambient jets on source tails give uniformly small |
| 27 | pullback jets on source tails. Empty stage fibres are allowed. One common |
| 28 | estimate is applied before choosing the output tolerance; the coordinate |
| 29 | maps need not converge. Source: M28 derivation 105. -/ |
| 30 | theorem exists_bilinear_pullback_error_tail (n : ℕ) (stage : ι → ℕ) |
| 31 | {f : ι → E → F} {A : ι → F → F →L[ℝ] F →L[ℝ] G} {x : ι → E} |
| 32 | (hf : HasUniformJetBoundsAt n (fun i => fderiv ℝ (f i)) x) |
| 33 | (hcf : ∀ i, ContDiffAt ℝ ∞ (f i) (x i)) |
| 34 | (hcA : ∀ i, ContDiffAt ℝ ∞ (A i) (f i (x i))) |
| 35 | (hA : ∀ delta : ℝ, 0 < delta → ∃ K : ℕ, ∀ i, K ≤ stage i → |
| 36 | ∀ m ≤ n, ‖iteratedFDeriv ℝ m (A i) (f i (x i))‖ ≤ delta) : |
| 37 | ∀ rho : ℝ, 0 < rho → ∃ K : ℕ, ∀ i, K ≤ stage i → ∀ m ≤ n, |
| 38 | ‖iteratedFDeriv ℝ m (fun y => (A i (f i y)).bilinearComp |
| 39 | (fderiv ℝ (f i) y) (fderiv ℝ (f i) y)) (x i)‖ ≤ rho := by |
| 40 | classical |
| 41 | have hpos (l : ℕ) : 0 < (1 / ((l : ℝ) + 1) : ℝ) := by positivity |
| 42 | choose K hK using fun l : ℕ => hA (1 / ((l : ℝ) + 1)) (hpos l) |
| 43 | let J := {p : ℕ × ι // K p.1 ≤ stage p.2} |
| 44 | let error : J → ℝ := fun p => 1 / ((p.1.1 : ℝ) + 1) |
| 45 | have hfj : HasUniformJetBoundsAt n |
| 46 | (fun p : J => fderiv ℝ (f p.1.2)) (fun p => x p.1.2) := by |
| 47 | intro m hm |
| 48 | obtain ⟨C, hC⟩ := hf m hm |
| 49 | exact ⟨C, fun p => hC p.1.2⟩ |
| 50 | obtain ⟨C, _, hC⟩ := exists_bilinear_pullback_error_bound n |
| 51 | (f := fun p : J => f p.1.2) (A := fun p : J => A p.1.2) |
| 52 | (x := fun p : J => x p.1.2) (error := error) |
| 53 | (fun p => hpos p.1.1) hfj (fun p => hcf p.1.2) (fun p => hcA p.1.2) |
| 54 | (fun m hm p => hK p.1.1 p.1.2 p.2 m hm) |
| 55 | intro rho hrho |
| 56 | obtain ⟨l, hl⟩ := exists_nat_gt (C / rho) |
| 57 | have hsmall : C * (1 / ((l : ℝ) + 1)) ≤ rho := by |
| 58 | rw [mul_one_div, div_le_iff₀ (by positivity : 0 < (l : ℝ) + 1)] |
| 59 | have h := (div_lt_iff₀ hrho).mp hl |
| 60 | nlinarith |
| 61 | refine ⟨K l, fun i hi m hm => ?_⟩ |
| 62 | exact (hC m hm (⟨(l, i), hi⟩ : J)).trans hsmall |
| 63 | |
| 64 | end PoincareMT.Proofs.M28.FiniteHessian |