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.Lifetime.CanonicalGeometry.StrongNeckComparison |
| 2 | |
| 3 | /-! |
| 4 | # Locality of the frozen cylinder comparison |
| 5 | |
| 6 | Agreement of the actual tensors on the open cylinder gives agreement of |
| 7 | every coefficient derivative and covariant array there. This permits the |
| 8 | actual ordinary time-cylinder wrapper in Morgan-Tian Theorem 12.28, |
| 9 | pp. 323-324, without identifying arbitrary total maps outside their source. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff BigOperators Topology |
| 17 | |
| 18 | namespace PoincareMT.M34 |
| 19 | |
| 20 | local notation "E₂" => EuclideanSpace ℝ (Fin 2) |
| 21 | |
| 22 | /-- Frozen covariant arrays depend only on the tensor germ on the |
| 23 | actual open axial cylinder. No smoothness assumption is needed for |
| 24 | the locality identity itself. -/ |
| 25 | theorem roundCylinderIteratedDerivative_eq_of_eqOn_cylinder |
| 26 | {epsilon : ℝ} {B D : RoundCylinderTwoTensor} |
| 27 | (hBD : ∀ z : RoundCylinderSpace, z.2 ∈ Ioo (-epsilon⁻¹) epsilon⁻¹ → |
| 28 | ∀ v w : RoundCylinderTangent z, B z v w = D z v w) |
| 29 | (u : ℝ) (q : UnitTwoSphere) (k : ℕ) |
| 30 | {x : RoundCylinderCoordinates} (hx : x.2 ∈ Ioo (-epsilon⁻¹) epsilon⁻¹) |
| 31 | (a : Fin (2 + k) → Fin 3) : |
| 32 | roundCylinderIteratedDerivative u (chartAt E₂ q) B k x a = |
| 33 | roundCylinderIteratedDerivative u (chartAt E₂ q) D k x a := by |
| 34 | induction k generalizing x with |
| 35 | | zero => |
| 36 | dsimp only [roundCylinderIteratedDerivative, roundCylinderTensorCoefficient] |
| 37 | rw [hBD ((chartAt E₂ q).symm x.1, x.2) hx] |
| 38 | | succ k ih => |
| 39 | have heq : (fun y => roundCylinderIteratedDerivative u (chartAt E₂ q) B k y |
| 40 | (fun i => a i.succ)) =ᶠ[𝓝 x] |
| 41 | (fun y => roundCylinderIteratedDerivative u (chartAt E₂ q) D k y |
| 42 | (fun i => a i.succ)) := by |
| 43 | filter_upwards [(isOpen_univ.prod isOpen_Ioo).mem_nhds |
| 44 | (show x ∈ (univ : Set E₂) ×ˢ Ioo (-epsilon⁻¹) epsilon⁻¹ from ⟨mem_univ _, hx⟩)] |
| 45 | with y hy |
| 46 | exact ih hy.2 _ |
| 47 | dsimp only [roundCylinderIteratedDerivative, roundCylinderTensorDerivative] |
| 48 | apply congrArg₂ (fun v w : ℝ => v - w) |
| 49 | · exact congrArg (fun L : RoundCylinderCoordinates →L[ℝ] ℝ => |
| 50 | L (roundCylinderCoordinateBasis (a 0))) (heq.fderiv_eq (𝕜 := ℝ)) |
| 51 | · apply Finset.sum_congr rfl |
| 52 | intro i _ |
| 53 | apply Finset.sum_congr rfl |
| 54 | intro d _ |
| 55 | exact congrArg (fun v : ℝ => |
| 56 | roundCylinderChristoffel u (chartAt E₂ q) x d (a 0) (a i.succ) * v) |
| 57 | (ih hx (Function.update (fun j => a j.succ) i d)) |
| 58 | |
| 59 | /-- The full finite frozen squared error is unchanged by an actual |
| 60 | tensor identity on the open cylinder. -/ |
| 61 | theorem roundCylinderJetErrorSquared_eq_of_eqOn_cylinder |
| 62 | {epsilon : ℝ} {B D : RoundCylinderTwoTensor} |
| 63 | (hBD : ∀ z : RoundCylinderSpace, z.2 ∈ Ioo (-epsilon⁻¹) epsilon⁻¹ → |
| 64 | ∀ v w : RoundCylinderTangent z, B z v w = D z v w) |
| 65 | (u : ℝ) (m : ℕ) {z : RoundCylinderSpace} |
| 66 | (hz : z.2 ∈ Ioo (-epsilon⁻¹) epsilon⁻¹) : |
| 67 | roundCylinderJetErrorSquared u B m z = roundCylinderJetErrorSquared u D m z := by |
| 68 | unfold roundCylinderJetErrorSquared |
| 69 | apply Finset.sum_congr rfl |
| 70 | intro k _ |
| 71 | congr 1 |
| 72 | funext a |
| 73 | exact roundCylinderIteratedDerivative_eq_of_eqOn_cylinder hBD u z.1 k hz a |
| 74 | |
| 75 | end PoincareMT.M34 |
| 76 | |
| 77 | namespace PoincareMT.RoundCylinderTensorSmoothOn |
| 78 | |
| 79 | /-- Smoothness of cylinder coefficients transfers under equality of |
| 80 | the actual tensors on the open cylinder. -/ |
| 81 | theorem congr_cylinder {epsilon : ℝ} {B D : RoundCylinderTwoTensor} |
| 82 | (hB : RoundCylinderTensorSmoothOn epsilon B) |
| 83 | (hBD : ∀ z : RoundCylinderSpace, z.2 ∈ Ioo (-epsilon⁻¹) epsilon⁻¹ → |
| 84 | ∀ v w : RoundCylinderTangent z, B z v w = D z v w) : |
| 85 | RoundCylinderTensorSmoothOn epsilon D := by |
| 86 | intro q a b |
| 87 | apply (hB q a b).congr |
| 88 | intro x hx |
| 89 | exact (hBD _ hx.2 _ _).symm |
| 90 | |
| 91 | end PoincareMT.RoundCylinderTensorSmoothOn |
| 92 | |
| 93 | namespace PoincareMT.RoundCylinderFamilyClose |
| 94 | |
| 95 | /-- Actual tensor equality on the whole tested open cylinder transfers |
| 96 | a family comparison with its original single strict error bound. -/ |
| 97 | theorem congr_cylinder {epsilon : ℝ} {I : Set ℝ} |
| 98 | {B D : ℝ → RoundCylinderTwoTensor} |
| 99 | (hB : RoundCylinderFamilyClose epsilon I B) |
| 100 | (hBD : ∀ u ∈ I, ∀ z : RoundCylinderSpace, |
| 101 | z.2 ∈ Ioo (-epsilon⁻¹) epsilon⁻¹ → |
| 102 | ∀ v w : RoundCylinderTangent z, B u z v w = D u z v w) : |
| 103 | RoundCylinderFamilyClose epsilon I D := by |
| 104 | obtain ⟨hs, b, hb, hbound⟩ := hB |
| 105 | refine ⟨fun u hu => (hs u hu).congr_cylinder (hBD u hu), b, hb, ?_⟩ |
| 106 | intro u hu z hz |
| 107 | rw [← M34.roundCylinderJetErrorSquared_eq_of_eqOn_cylinder (hBD u hu) u _ hz] |
| 108 | exact hbound u hu z hz |
| 109 | |
| 110 | end PoincareMT.RoundCylinderFamilyClose |