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.CanonicalNeighborhood.RoundCylinder |
| 3 | |
| 4 | /-! |
| 5 | # Local equality of actual cylinder metric comparisons |
| 6 | |
| 7 | Equality on the open axial strip preserves the frozen spatial jet |
| 8 | recursion and its strict uniform bound. This is the top-slice adapter |
| 9 | from Definition 9.78 to the necks in section 10.3.1, p. 247, of |
| 10 | Morgan--Tian. See task derivation 15. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Topology |
| 18 | |
| 19 | namespace PoincareMT.M28 |
| 20 | |
| 21 | /-- Tensor equality on an open axial strip identifies actual fixed-chart |
| 22 | coefficients (Definition 2.16, p. 30; task derivation 15). -/ |
| 23 | theorem cylinderCoefficient_eq_of_strip |
| 24 | {B C : RoundCylinderTwoTensor} {a b : ℝ} |
| 25 | (h : ∀ z : RoundCylinderSpace, z.2 ∈ Ioo a b → ∀ v w, B z v w = C z v w) |
| 26 | (c : OpenPartialHomeomorph UnitTwoSphere (EuclideanSpace ℝ (Fin 2))) |
| 27 | {p : RoundCylinderCoordinates} (hp : p.2 ∈ Ioo a b) (i j : Fin 3) : |
| 28 | roundCylinderTensorCoefficient B c p i j = roundCylinderTensorCoefficient C c p i j := |
| 29 | h (c.symm p.1, p.2) hp _ _ |
| 30 | |
| 31 | /-- All actual covariant error jets depend only on the tensor on the open |
| 32 | strip, with every earlier derivative slot retained (task derivation 15). -/ |
| 33 | theorem cylinderIteratedDerivative_eq_of_strip |
| 34 | {B C : RoundCylinderTwoTensor} {a b : ℝ} |
| 35 | (h : ∀ z : RoundCylinderSpace, z.2 ∈ Ioo a b → ∀ v w, B z v w = C z v w) |
| 36 | (u : ℝ) (c : OpenPartialHomeomorph UnitTwoSphere (EuclideanSpace ℝ (Fin 2))) |
| 37 | (k : ℕ) {p : RoundCylinderCoordinates} (hp : p.2 ∈ Ioo a b) : |
| 38 | roundCylinderIteratedDerivative u c B k p = |
| 39 | roundCylinderIteratedDerivative u c C k p := by |
| 40 | induction k generalizing p with |
| 41 | | zero => |
| 42 | funext v |
| 43 | simp only [roundCylinderIteratedDerivative, cylinderCoefficient_eq_of_strip h c hp] |
| 44 | | succ k ih => |
| 45 | funext v |
| 46 | have heq : (fun q => roundCylinderIteratedDerivative u c B k q |
| 47 | (fun i => v i.succ)) =ᶠ[𝓝 p] |
| 48 | (fun q => roundCylinderIteratedDerivative u c C k q (fun i => v i.succ)) := by |
| 49 | filter_upwards [continuous_snd.continuousAt.preimage_mem_nhds |
| 50 | (isOpen_Ioo.mem_nhds hp)] with q hq |
| 51 | exact congrFun (ih hq) _ |
| 52 | have hd := heq.fderiv_eq (𝕜 := ℝ) |
| 53 | simp only [roundCylinderIteratedDerivative, roundCylinderTensorDerivative, ih hp] |
| 54 | apply congrArg (fun r : ℝ => r - _) |
| 55 | exact congrArg (fun L : RoundCylinderCoordinates →L[ℝ] ℝ => |
| 56 | L (roundCylinderCoordinateBasis (v 0))) hd |
| 57 | |
| 58 | /-- The frozen squared jet errors agree under open-strip tensor equality |
| 59 | (Definition 2.16, p. 30; task derivation 15). -/ |
| 60 | theorem cylinderJetErrorSquared_eq_of_strip |
| 61 | {B C : RoundCylinderTwoTensor} {a b : ℝ} |
| 62 | (h : ∀ z : RoundCylinderSpace, z.2 ∈ Ioo a b → ∀ v w, B z v w = C z v w) |
| 63 | (u : ℝ) (k : ℕ) {z : RoundCylinderSpace} (hz : z.2 ∈ Ioo a b) : |
| 64 | roundCylinderJetErrorSquared u B k z = roundCylinderJetErrorSquared u C k z := by |
| 65 | unfold roundCylinderJetErrorSquared |
| 66 | apply Finset.sum_congr rfl |
| 67 | intro j _ |
| 68 | rw [cylinderIteratedDerivative_eq_of_strip h u _ j hz] |
| 69 | |
| 70 | /-- Open-strip equality transfers the actual coordinate smoothness in |
| 71 | the metric comparison (task derivation 15). -/ |
| 72 | theorem cylinderTensorSmoothOn_of_eqOn_strip {epsilon : ℝ} |
| 73 | {B C : RoundCylinderTwoTensor} (hB : RoundCylinderTensorSmoothOn epsilon B) |
| 74 | (h : ∀ z : RoundCylinderSpace, z.2 ∈ Ioo (-epsilon⁻¹) epsilon⁻¹ → |
| 75 | ∀ v w, B z v w = C z v w) : RoundCylinderTensorSmoothOn epsilon C := by |
| 76 | intro q i j |
| 77 | exact (hB q i j).congr (fun p hp => |
| 78 | (cylinderCoefficient_eq_of_strip h _ hp.2 i j).symm) |
| 79 | |
| 80 | /-- A frozen strict comparison transfers with its original uniform |
| 81 | witness under equality on the actual cylinder (task derivation 15). -/ |
| 82 | theorem cylinderClose_of_eqOn_strip {epsilon u : ℝ} {B C : RoundCylinderTwoTensor} |
| 83 | (hB : RoundCylinderClose epsilon u B) |
| 84 | (h : ∀ z : RoundCylinderSpace, z.2 ∈ Ioo (-epsilon⁻¹) epsilon⁻¹ → |
| 85 | ∀ v w, B z v w = C z v w) : RoundCylinderClose epsilon u C := by |
| 86 | obtain ⟨hsmooth, bound, hbound, hjet⟩ := hB |
| 87 | refine ⟨cylinderTensorSmoothOn_of_eqOn_strip hsmooth h, bound, hbound, ?_⟩ |
| 88 | intro z hz |
| 89 | rw [← cylinderJetErrorSquared_eq_of_strip h u _ hz] |
| 90 | exact hjet z hz |
| 91 | |
| 92 | end PoincareMT.M28 |