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.JetBounds |
| 3 | |
| 4 | /-! |
| 5 | # A finite pointwise Hessian estimate |
| 6 | |
| 7 | The local connection equation bounds derivatives of a coordinate map without |
| 8 | bounding its value. This supplies the map-jet estimate for Morgan-Tian |
| 9 | Proposition 9.79, pp. 233-234, and Proposition 10.7 and Claim 10.8, pp. 253-254. |
| 10 | The hypotheses are finite quantitative jet bounds and actual smooth germs, |
| 11 | as derived in M28 derivation 10, section 3. |
| 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 : Type*} |
| 22 | [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 23 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 24 | |
| 25 | /-- Finite connection jets and the actual Hessian germ bound `Df` through |
| 26 | order `n+1`, hence the map through positive order `n+2`. No bound on the |
| 27 | map's value is assumed. Source: M28 derivation 10, section 3, for |
| 28 | Morgan-Tian Proposition 9.79, pp. 233-234. -/ |
| 29 | theorem hasUniformJetBoundsAt_fderiv_of_hessian |
| 30 | (n : ℕ) {f : ι → E → F} {x : ι → E} |
| 31 | {A : ι → E → E →L[ℝ] E →L[ℝ] E} |
| 32 | {B : ι → F → F →L[ℝ] F →L[ℝ] F} |
| 33 | (hf : ∀ i, ContDiffAt ℝ ∞ (f i) (x i)) |
| 34 | (hA : ∀ i, ContDiffAt ℝ ∞ (A i) (x i)) |
| 35 | (hB : ∀ i, ContDiffAt ℝ ∞ (B i) (f i (x i))) |
| 36 | (hAj : HasUniformJetBoundsAt n A x) |
| 37 | (hBj : HasUniformJetBoundsAt n B (fun i => f i (x i))) |
| 38 | (hfirst : ∃ C : ℝ, ∀ i, ‖fderiv ℝ (f i) (x i)‖ ≤ C) |
| 39 | (hEq : ∀ i, ∀ᶠ y in 𝓝 (x i), ∀ u v, |
| 40 | fderiv ℝ (fderiv ℝ (f i)) y u v = |
| 41 | fderiv ℝ (f i) y (A i y u v) - |
| 42 | B i (f i y) (fderiv ℝ (f i) y u) (fderiv ℝ (f i) y v)) : |
| 43 | HasUniformJetBoundsAt (n + 1) (fun i => fderiv ℝ (f i)) x := by |
| 44 | let D := fun i => fderiv ℝ (f i) |
| 45 | have hD : ∀ i, ContDiffAt ℝ ∞ (D i) (x i) := |
| 46 | fun i => (hf i).fderiv_right (by simp) |
| 47 | have hBc : ∀ i, ContDiffAt ℝ ∞ (fun y => B i (f i y)) (x i) := |
| 48 | fun i => (hB i).comp (x i) (hf i) |
| 49 | let postL : (E →L[ℝ] F) →L[ℝ] (E →L[ℝ] E) →L[ℝ] E →L[ℝ] F := |
| 50 | ContinuousLinearMap.compL ℝ E E F |
| 51 | let flip₁ := (ContinuousLinearMap.flipₗᵢ ℝ E F F).toLinearIsometry.toContinuousLinearMap |
| 52 | let flip₂ := (ContinuousLinearMap.flipₗᵢ ℝ E E F).toLinearIsometry.toContinuousLinearMap |
| 53 | have hpostL : ContDiff ℝ ∞ postL := |
| 54 | ContinuousLinearMap.contDiff (𝕜 := ℝ) (E := E →L[ℝ] F) |
| 55 | (F := (E →L[ℝ] E) →L[ℝ] E →L[ℝ] F) postL |
| 56 | have hflip₁ : ContDiff ℝ ∞ flip₁ := |
| 57 | ContinuousLinearMap.contDiff (𝕜 := ℝ) (E := E →L[ℝ] F →L[ℝ] F) |
| 58 | (F := F →L[ℝ] E →L[ℝ] F) flip₁ |
| 59 | have hflip₂ : ContDiff ℝ ∞ flip₂ := |
| 60 | ContinuousLinearMap.contDiff (𝕜 := ℝ) (E := E →L[ℝ] E →L[ℝ] F) |
| 61 | (F := E →L[ℝ] E →L[ℝ] F) flip₂ |
| 62 | have hsteps : ∀ k, k ≤ n + 1 → HasUniformJetBoundsAt k D x := by |
| 63 | intro k |
| 64 | induction k with |
| 65 | | zero => |
| 66 | intro _ m hm |
| 67 | have hm0 : m = 0 := by omega |
| 68 | subst m |
| 69 | simpa only [norm_iteratedFDeriv_zero] using hfirst |
| 70 | | succ k ih => |
| 71 | intro hk |
| 72 | have hkn : k ≤ n := by omega |
| 73 | have ih := ih (by omega) |
| 74 | have hBfj := ih.comp_of_fderiv (hBj.mono_order hkn) hf hB |
| 75 | have hpost := ih.clm (G := (E →L[ℝ] E) →L[ℝ] E →L[ℝ] F) |
| 76 | hD postL |
| 77 | have hcpost : ∀ i, ContDiffAt ℝ ∞ |
| 78 | (fun y => postL (D i y)) (x i) := |
| 79 | fun i => hpostL.contDiffAt.comp (x i) (hD i) |
| 80 | have hleft := hpost.clm_comp (hAj.mono_order hkn) hcpost hA |
| 81 | have hcleft : ∀ i, ContDiffAt ℝ ∞ |
| 82 | (fun y => (postL (D i y)).comp (A i y)) (x i) := |
| 83 | fun i => (hcpost i).clm_comp (hA i) |
| 84 | have hpre := hBfj.clm_comp ih hBc hD |
| 85 | have hcpre : ∀ i, ContDiffAt ℝ ∞ |
| 86 | (fun y => (B i (f i y)).comp (D i y)) (x i) := |
| 87 | fun i => (hBc i).clm_comp (hD i) |
| 88 | have hflip := hpre.clm (G := F →L[ℝ] E →L[ℝ] F) hcpre flip₁ |
| 89 | have hcflip : ∀ i, ContDiffAt ℝ ∞ |
| 90 | (fun y => flip₁ ((B i (f i y)).comp (D i y))) (x i) := |
| 91 | fun i => hflip₁.contDiffAt.comp (x i) (hcpre i) |
| 92 | have hpre' := hflip.clm_comp ih hcflip hD |
| 93 | have hcpre' : ∀ i, ContDiffAt ℝ ∞ |
| 94 | (fun y => (flip₁ ((B i (f i y)).comp (D i y))).comp (D i y)) (x i) := |
| 95 | fun i => (hcflip i).clm_comp (hD i) |
| 96 | have hright := hpre'.clm (G := E →L[ℝ] E →L[ℝ] F) hcpre' flip₂ |
| 97 | have hcright : ∀ i, ContDiffAt ℝ ∞ |
| 98 | (fun y => flip₂ ((flip₁ ((B i (f i y)).comp (D i y))).comp (D i y))) (x i) := |
| 99 | fun i => hflip₂.contDiffAt.comp (x i) (hcpre' i) |
| 100 | apply HasUniformJetBoundsAt.succ_of_fderiv hfirst |
| 101 | apply (hleft.sub hright hcleft hcright).congr_germ |
| 102 | intro i |
| 103 | filter_upwards [hEq i] with y hy |
| 104 | ext u v |
| 105 | exact (hy u v).symm |
| 106 | exact hsteps (n + 1) le_rfl |
| 107 | |
| 108 | /-- One common nonnegative bound controls all positive map derivatives |
| 109 | through order `n+2`. This is the coordinate-map output needed for the |
| 110 | bilinear pullback estimate in M28 derivation 10, section 3. -/ |
| 111 | theorem exists_uniform_positive_jet_bound_of_hessian |
| 112 | (n : ℕ) {f : ι → E → F} {x : ι → E} |
| 113 | {A : ι → E → E →L[ℝ] E →L[ℝ] E} |
| 114 | {B : ι → F → F →L[ℝ] F →L[ℝ] F} |
| 115 | (hf : ∀ i, ContDiffAt ℝ ∞ (f i) (x i)) |
| 116 | (hA : ∀ i, ContDiffAt ℝ ∞ (A i) (x i)) |
| 117 | (hB : ∀ i, ContDiffAt ℝ ∞ (B i) (f i (x i))) |
| 118 | (hAj : HasUniformJetBoundsAt n A x) |
| 119 | (hBj : HasUniformJetBoundsAt n B (fun i => f i (x i))) |
| 120 | (hfirst : ∃ C : ℝ, ∀ i, ‖fderiv ℝ (f i) (x i)‖ ≤ C) |
| 121 | (hEq : ∀ i, ∀ᶠ y in 𝓝 (x i), ∀ u v, |
| 122 | fderiv ℝ (fderiv ℝ (f i)) y u v = |
| 123 | fderiv ℝ (f i) y (A i y u v) - |
| 124 | B i (f i y) (fderiv ℝ (f i) y u) (fderiv ℝ (f i) y v)) : |
| 125 | ∃ C : ℝ, 0 ≤ C ∧ ∀ m, 1 ≤ m → m ≤ n + 2 → ∀ i, |
| 126 | ‖iteratedFDeriv ℝ m (f i) (x i)‖ ≤ C := by |
| 127 | obtain ⟨C, hC0, hC⟩ := |
| 128 | (hasUniformJetBoundsAt_fderiv_of_hessian n hf hA hB hAj hBj hfirst hEq).bound_all |
| 129 | refine ⟨C, hC0, ?_⟩ |
| 130 | intro m hmpos hm i |
| 131 | obtain ⟨k, rfl⟩ := Nat.exists_eq_succ_of_ne_zero (by omega : m ≠ 0) |
| 132 | simpa only [norm_iteratedFDeriv_fderiv] using hC k (by omega) i |
| 133 | |
| 134 | end PoincareMT.Proofs.M28.FiniteHessian |