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 | import PoincareLib.Geometry.Riemannian.Coordinates.Coefficients.InverseBounds |
| 4 | import PoincareLib.Geometry.Riemannian.Coordinates.Exponential.Jacobi.Coefficients |
| 5 | |
| 6 | /-! |
| 7 | # Finite pointwise metric and connection jets |
| 8 | |
| 9 | Finite coefficient jets and ellipticity at the tested points suffice for |
| 10 | finite inverse and Christoffel jets. There is no all-orders assumption or |
| 11 | common domain for the germs. Source: Morgan--Tian Proposition 9.79, |
| 12 | pp. 232-234, and Proposition 10.7, p. 253; M28 derivation 100. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | set_option maxSynthPendingDepth 8 |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped ContDiff Topology |
| 22 | |
| 23 | namespace PoincareMT.Proofs.M28.FiniteHessian |
| 24 | |
| 25 | section Derivative |
| 26 | |
| 27 | variable {ι E F : Type*} |
| 28 | [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 29 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 30 | |
| 31 | /-- One fewer order bounds the derivative family at the same points. |
| 32 | Source: the finite coefficient budget in M28 derivation 100. -/ |
| 33 | theorem HasUniformJetBoundsAt.fderiv {n : ℕ} {f : ι → E → F} {x : ι → E} |
| 34 | (h : HasUniformJetBoundsAt (n + 1) f x) : |
| 35 | HasUniformJetBoundsAt n (fun i => fderiv ℝ (f i)) x := by |
| 36 | intro m hm |
| 37 | obtain ⟨C, hC⟩ := h (m + 1) (by omega) |
| 38 | exact ⟨C, fun i => by simpa only [norm_iteratedFDeriv_fderiv] using hC i⟩ |
| 39 | |
| 40 | end Derivative |
| 41 | |
| 42 | variable {ι E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] |
| 43 | [FiniteDimensional ℝ E] |
| 44 | |
| 45 | /-- A finite coefficient budget bounds inverse jets at uniformly elliptic |
| 46 | tested points. The extra derivative is also needed for the connection. |
| 47 | Source: M28 derivation 100, finite composition with actual inversion. -/ |
| 48 | theorem HasUniformJetBoundsAt.inverse_metric {n : ℕ} |
| 49 | {A : ι → E → E →L[ℝ] E →L[ℝ] ℝ} {x : ι → E} |
| 50 | (hjets : HasUniformJetBoundsAt (n + 1) A x) |
| 51 | (hA : ∀ i, ContDiffAt ℝ ∞ (A i) (x i)) {a : ℝ} (ha : 0 < a) |
| 52 | (hell : ∀ i v, a * ‖v‖ ^ 2 ≤ A i (x i) v v) : |
| 53 | HasUniformJetBoundsAt n (fun i y => (A i y).inverse) x := by |
| 54 | obtain ⟨C, hC⟩ := hjets 0 (Nat.zero_le _) |
| 55 | have houter : HasUniformJetBoundsAt n |
| 56 | (fun _ : ι => ContinuousLinearMap.inverse : |
| 57 | ι → (E →L[ℝ] E →L[ℝ] ℝ) → (E →L[ℝ] ℝ) →L[ℝ] E) |
| 58 | (fun i => A i (x i)) := by |
| 59 | intro m hm |
| 60 | obtain ⟨B, hB⟩ := |
| 61 | CoordinateTransition.hasUniformJetBoundsOn_inverse_elliptic (E := E) ha C n m hm |
| 62 | refine ⟨B, fun i => hB () (A i (x i)) ⟨?_, hell i⟩⟩ |
| 63 | simpa only [norm_iteratedFDeriv_zero] using hC i |
| 64 | exact hjets.fderiv.comp_of_fderiv houter hA (fun i => |
| 65 | (CoordinateTransition.isInvertible_of_uniformEllipticity ha (hell i)).contDiffAt_map_inverse) |
| 66 | |
| 67 | /-- The actual coordinate connection has one fewer bounded jet than the |
| 68 | metric coefficients, with ellipticity needed only at the tested points. |
| 69 | Source: the finite Koszul contraction in M28 derivation 100. -/ |
| 70 | theorem hasUniformJetBoundsAt_christoffelBilinear {n : ℕ} |
| 71 | {A : ι → E → E →L[ℝ] E →L[ℝ] ℝ} {x : ι → E} |
| 72 | (hjets : HasUniformJetBoundsAt (n + 1) A x) |
| 73 | (hA : ∀ i, ContDiffAt ℝ ∞ (A i) (x i)) {a : ℝ} (ha : 0 < a) |
| 74 | (hell : ∀ i v, a * ‖v‖ ^ 2 ≤ A i (x i) v v) : |
| 75 | HasUniformJetBoundsAt n |
| 76 | (fun i => CoordinateExponential.christoffelBilinear (A i)) x := by |
| 77 | let flipL := (ContinuousLinearMap.flipₗᵢ ℝ E E ℝ).toLinearIsometry.toContinuousLinearMap |
| 78 | let flipT := |
| 79 | (ContinuousLinearMap.flipₗᵢ ℝ E E (E →L[ℝ] ℝ)).toLinearIsometry.toContinuousLinearMap |
| 80 | let C := ContinuousLinearMap.compL ℝ E (E →L[ℝ] E →L[ℝ] ℝ) |
| 81 | (E →L[ℝ] E →L[ℝ] ℝ) flipL |
| 82 | let K : (E →L[ℝ] E →L[ℝ] E →L[ℝ] ℝ) →L[ℝ] |
| 83 | E →L[ℝ] E →L[ℝ] E →L[ℝ] ℝ := |
| 84 | (2⁻¹ : ℝ) • (ContinuousLinearMap.id ℝ _ + flipT.comp C - C.comp flipT) |
| 85 | let contract : ((E →L[ℝ] ℝ) →L[ℝ] E) →L[ℝ] |
| 86 | (E →L[ℝ] E →L[ℝ] E →L[ℝ] ℝ) →L[ℝ] E →L[ℝ] E →L[ℝ] E := |
| 87 | (ContinuousLinearMap.compL ℝ E (E →L[ℝ] E →L[ℝ] ℝ) (E →L[ℝ] E)).comp |
| 88 | (ContinuousLinearMap.compL ℝ E (E →L[ℝ] ℝ) E) |
| 89 | have hD : ∀ i, ContDiffAt ℝ ∞ (fderiv ℝ (A i)) (x i) := |
| 90 | fun i => (hA i).fderiv_right (by simp) |
| 91 | have hK : ∀ i, ContDiffAt ℝ ∞ (fun y => K (fderiv ℝ (A i) y)) (x i) := |
| 92 | fun i => K.contDiff.contDiffAt.comp (x i) (hD i) |
| 93 | have hI : ∀ i, ContDiffAt ℝ ∞ (fun y => (A i y).inverse) (x i) := |
| 94 | fun i => (CoordinateTransition.isInvertible_of_uniformEllipticity ha |
| 95 | (hell i)).contDiffAt_map_inverse.comp (x i) (hA i) |
| 96 | have hjK := hjets.fderiv.clm hD K |
| 97 | have hjI := hjets.inverse_metric hA ha hell |
| 98 | apply (hjI.bilinear hjK hI hK contract).congr_germ |
| 99 | intro i |
| 100 | exact Filter.Eventually.of_forall (fun _ => rfl) |
| 101 | |
| 102 | end PoincareMT.Proofs.M28.FiniteHessian |