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.Tube.Spheres.RoundMetricDerivatives |
| 3 | import PoincareLib.Geometry.Riemannian.Tensor.MaximumPrinciple.BundleContact |
| 4 | import PoincareLib.Geometry.Riemannian.Tensor.MaximumPrinciple.Transport.Radial |
| 5 | |
| 6 | /-! |
| 7 | # Second ordinary jet at a normal point |
| 8 | |
| 9 | At a Gauss centre the model connection itself vanishes. The second ordinary |
| 10 | derivative of a tensor section therefore differs from the second covariant |
| 11 | derivative by one term: the first derivative of the connection acting on the |
| 12 | zeroth-order tensor. This file keeps that term explicit and supplies the |
| 13 | corresponding norm estimate. The result is local and is not an atlas-wide |
| 14 | coordinate-control assertion. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | set_option maxSynthPendingDepth 12 |
| 20 | |
| 21 | open Set |
| 22 | open scoped ContDiff Bundle BigOperators Topology Manifold |
| 23 | |
| 24 | namespace PoincareMT.M28.tube |
| 25 | |
| 26 | open Poincare |
| 27 | |
| 28 | variable {E F : Type*} |
| 29 | [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] |
| 30 | [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] |
| 31 | |
| 32 | local notation "covDer" => Poincare.Riemannian.RadialTransport.covariantDerivative |
| 33 | |
| 34 | omit [FiniteDimensional ℝ E] [CompleteSpace F] in |
| 35 | private lemma covDer_contDiffAt |
| 36 | {Γ : E → E →L[ℝ] F →L[ℝ] F} {S : E → F} |
| 37 | {x : E} (hΓ : ContDiffAt ℝ ∞ Γ x) (hS : ContDiffAt ℝ ∞ S x) |
| 38 | (v : E) : |
| 39 | ContDiffAt ℝ ∞ (fun y => covDer Γ S y v) x := by |
| 40 | exact ((hS.fderiv_right (by simp)).clm_apply contDiffAt_const).add |
| 41 | ((hΓ.clm_apply contDiffAt_const).clm_apply hS) |
| 42 | |
| 43 | /- The exact identity is stated before taking norms. At `x`, the zeroth |
| 44 | connection term is killed by `hzero`; the remaining product derivative is |
| 45 | the derivative of the connection acting on `S x`. -/ |
| 46 | omit [FiniteDimensional ℝ E] [CompleteSpace F] in |
| 47 | omit [FiniteDimensional ℝ E] [CompleteSpace F] in |
| 48 | theorem second_fderiv_eq_covariant_sub_connectionJet |
| 49 | {Γ : E → E →L[ℝ] F →L[ℝ] F} {S : E → F} {x : E} |
| 50 | (hΓ : ContDiffAt ℝ ∞ Γ x) (hS : ContDiffAt ℝ ∞ S x) |
| 51 | (hzero : Γ x = 0) (u v : E) : |
| 52 | fderiv ℝ (fun y => fderiv ℝ S y v) x u = |
| 53 | covDer Γ (fun y => covDer Γ S y v) x u - |
| 54 | (fderiv ℝ Γ x u) v (S x) := by |
| 55 | let A : E → F := fun y => covDer Γ S y v |
| 56 | have hΓd : DifferentiableAt ℝ Γ x := hΓ.differentiableAt (by simp) |
| 57 | have hSd : DifferentiableAt ℝ S x := hS.differentiableAt (by simp) |
| 58 | have hfd : ContDiffAt ℝ ∞ (fun y => fderiv ℝ S y v) x := |
| 59 | (hS.fderiv_right (by simp)).clm_apply contDiffAt_const |
| 60 | have hconn : ContDiffAt ℝ ∞ (fun y => Γ y v (S y)) x := |
| 61 | (hΓ.clm_apply contDiffAt_const).clm_apply hS |
| 62 | have hsum : A = |
| 63 | (fun y => fderiv ℝ S y v) + (fun y => Γ y v (S y)) := by |
| 64 | funext y |
| 65 | rfl |
| 66 | have hA : ContDiffAt ℝ ∞ A x := covDer_contDiffAt hΓ hS v |
| 67 | have hprod : fderiv ℝ (fun y => Γ y v (S y)) x u = |
| 68 | (fderiv ℝ Γ x u) v (S x) := by |
| 69 | rw [fderiv_clm_apply (hΓd.clm_apply (differentiableAt_const (c := v))) hSd, |
| 70 | fderiv_clm_apply hΓd (differentiableAt_const (c := v))] |
| 71 | simp only [ContinuousLinearMap.comp_apply, |
| 72 | ContinuousLinearMap.flip_apply, add_apply, hzero, zero_apply, zero_add] |
| 73 | have hadd := fderiv_fun_add (hfd.differentiableAt (by simp)) |
| 74 | (hconn.differentiableAt (by simp)) |
| 75 | have hAder : fderiv ℝ A x u = |
| 76 | fderiv ℝ (fun y => fderiv ℝ S y v) x u + |
| 77 | fderiv ℝ (fun y => Γ y v (S y)) x u := by |
| 78 | change fderiv ℝ (fun y => A y) x u = _ |
| 79 | rw [hsum] |
| 80 | exact congrArg (fun L => L u) hadd |
| 81 | have hcov : covDer Γ A x u = fderiv ℝ A x u := by |
| 82 | change fderiv ℝ A x u + Γ x u (A x) = fderiv ℝ A x u |
| 83 | simp only [hzero, zero_apply, add_zero] |
| 84 | rw [hcov, hAder, hprod] |
| 85 | abel |
| 86 | |
| 87 | /- A norm form suited to the metric error: the covariant second jet and the |
| 88 | connection first jet are independent inputs, while the zeroth tensor norm is |
| 89 | multiplied by them exactly as in the product rule above. -/ |
| 90 | omit [FiniteDimensional ℝ E] [CompleteSpace F] in |
| 91 | theorem norm_second_fderiv_le_of_zero_connection |
| 92 | {Γ : E → E →L[ℝ] F →L[ℝ] F} {S : E → F} {x : E} |
| 93 | (hΓ : ContDiffAt ℝ ∞ Γ x) (hS : ContDiffAt ℝ ∞ S x) |
| 94 | (hzero : Γ x = 0) (u v : E) {A G V W : ℝ} |
| 95 | (hA : ‖covDer Γ (fun y => covDer Γ S y v) x u‖ ≤ A) |
| 96 | (hG : ‖fderiv ℝ Γ x u‖ ≤ G) |
| 97 | (hV : ‖v‖ ≤ V) (hW : ‖S x‖ ≤ W) |
| 98 | (_hA0 : 0 ≤ A) (hG0 : 0 ≤ G) (hV0 : 0 ≤ V) (_hW0 : 0 ≤ W) : |
| 99 | ‖fderiv ℝ (fun y => fderiv ℝ S y v) x u‖ ≤ A + G * V * W := by |
| 100 | rw [second_fderiv_eq_covariant_sub_connectionJet hΓ hS hzero u v] |
| 101 | calc |
| 102 | ‖covDer Γ (fun y => covDer Γ S y v) x u - (fderiv ℝ Γ x u) v (S x)‖ ≤ |
| 103 | ‖covDer Γ (fun y => covDer Γ S y v) x u‖ + |
| 104 | ‖(fderiv ℝ Γ x u) v (S x)‖ := norm_sub_le _ _ |
| 105 | _ ≤ A + (G * ‖v‖) * ‖S x‖ := by |
| 106 | have hv' : ‖(fderiv ℝ Γ x u) v‖ ≤ G * ‖v‖ := |
| 107 | (ContinuousLinearMap.le_opNorm (fderiv ℝ Γ x u) v).trans |
| 108 | (mul_le_mul_of_nonneg_right hG (norm_nonneg v)) |
| 109 | have hS' : ‖(fderiv ℝ Γ x u) v (S x)‖ ≤ |
| 110 | (G * ‖v‖) * ‖S x‖ := |
| 111 | (ContinuousLinearMap.le_opNorm ((fderiv ℝ Γ x u) v) (S x)).trans |
| 112 | (mul_le_mul_of_nonneg_right hv' (norm_nonneg (S x))) |
| 113 | exact add_le_add hA hS' |
| 114 | _ ≤ A + G * V * W := by |
| 115 | gcongr |
| 116 | |
| 117 | end PoincareMT.M28.tube |