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.Persistence.SourceNames.Metric |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Collar.Cylinder.CylinderTimeComparison |
| 3 | |
| 4 | /-! |
| 5 | # Axial reflection of the literal cylinder coordinates |
| 6 | |
| 7 | Reflection preserves the evolving model and changes each axial covariant |
| 8 | slot by a sign. These exact coordinate identities implement the model |
| 9 | isometry invariance in Morgan--Tian Definition 2.16, p. 30. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open scoped Manifold ContDiff BigOperators |
| 16 | |
| 17 | open PoincareMT.MetricSurgery |
| 18 | |
| 19 | namespace PoincareMT.M45 |
| 20 | |
| 21 | open M36 M44 |
| 22 | |
| 23 | local notation "E₂" => EuclideanSpace ℝ (Fin 2) |
| 24 | local notation "V" => RoundCylinderCoordinates |
| 25 | |
| 26 | /-- The axial reflection used to select a cap collar orientation. |
| 27 | Source: model-isometry invariance in Definition 2.16, p. 30. -/ |
| 28 | def cylinderAxialReflection (z : RoundCylinderSpace) : RoundCylinderSpace := |
| 29 | (z.1, -z.2) |
| 30 | |
| 31 | /-- Its exact linear action on cylinder coordinates. -/ |
| 32 | noncomputable def cylinderCoordinateReflection : V ≃L[ℝ] V := |
| 33 | (ContinuousLinearEquiv.refl ℝ E₂).prodCongr (ContinuousLinearEquiv.neg ℝ) |
| 34 | |
| 35 | /-- The action on one coordinate input slot. -/ |
| 36 | def cylinderReflectionSign : Fin 3 → ℝ := ![1, 1, -1] |
| 37 | |
| 38 | @[simp] theorem cylinderCoordinateReflection_apply (p : V) : |
| 39 | cylinderCoordinateReflection p = (p.1, -p.2) := rfl |
| 40 | |
| 41 | @[simp] theorem cylinderReflectionSign_sq (a : Fin 3) : |
| 42 | cylinderReflectionSign a ^ 2 = 1 := by |
| 43 | fin_cases a <;> norm_num [cylinderReflectionSign] |
| 44 | |
| 45 | theorem cylinderCoordinateReflection_basis (a : Fin 3) : |
| 46 | cylinderCoordinateReflection (roundCylinderCoordinateBasis a) = |
| 47 | cylinderReflectionSign a • roundCylinderCoordinateBasis a := by |
| 48 | fin_cases a <;> simp [roundCylinderCoordinateBasis, cylinderReflectionSign] |
| 49 | |
| 50 | /-- The physical pullback under axial reflection. -/ |
| 51 | noncomputable def cylinderReflectedTensor (B : RoundCylinderTwoTensor) : |
| 52 | RoundCylinderTwoTensor := |
| 53 | fun z v w => B (cylinderAxialReflection z) (v.1, -v.2) (w.1, -w.2) |
| 54 | |
| 55 | theorem cylinderReflectedTensor_coefficient (B : RoundCylinderTwoTensor) |
| 56 | (hB : ∀ z, IsBilinearMap ℝ (B z)) |
| 57 | (c : OpenPartialHomeomorph UnitTwoSphere E₂) (p : V) (a b : Fin 3) : |
| 58 | roundCylinderTensorCoefficient (cylinderReflectedTensor B) c p a b = |
| 59 | cylinderReflectionSign a * cylinderReflectionSign b * |
| 60 | roundCylinderTensorCoefficient B c (cylinderCoordinateReflection p) a b := by |
| 61 | have hslot (i : Fin 3) : |
| 62 | (mfderiv (𝓡 2) (𝓡 2) c.symm p.1 (roundCylinderCoordinateBasis i).1, |
| 63 | -(roundCylinderCoordinateBasis i).2) = |
| 64 | cylinderReflectionSign i • |
| 65 | (mfderiv (𝓡 2) (𝓡 2) c.symm p.1 (roundCylinderCoordinateBasis i).1, |
| 66 | (roundCylinderCoordinateBasis i).2) := by |
| 67 | fin_cases i <;> simp [roundCylinderCoordinateBasis, cylinderReflectionSign] |
| 68 | unfold roundCylinderTensorCoefficient cylinderReflectedTensor |
| 69 | dsimp only [cylinderAxialReflection, cylinderCoordinateReflection_apply] |
| 70 | rw [hslot, hslot] |
| 71 | rw [(hB _).smul_left, (hB _).smul_right] |
| 72 | simp only [smul_eq_mul] |
| 73 | ring |
| 74 | |
| 75 | theorem cylinderReflection_gram (t : ℝ) (theta : UnitTwoSphere) (p : V) |
| 76 | (a b : Fin 3) : |
| 77 | roundCylinderGram t (chartAt E₂ theta) p a b = |
| 78 | cylinderReflectionSign a * cylinderReflectionSign b * |
| 79 | roundCylinderGram t (chartAt E₂ theta) (cylinderCoordinateReflection p) a b := by |
| 80 | simp only [evolving_roundCylinderGram_chart, cylinderCoordinateReflection_apply, |
| 81 | cylinderSphereFactor] |
| 82 | fin_cases a <;> fin_cases b <;> norm_num [Matrix.diagonal, cylinderReflectionSign] |
| 83 | |
| 84 | theorem cylinderReflection_christoffel {t : ℝ} (ht : t < 1) |
| 85 | (theta : UnitTwoSphere) (p : V) (a b c : Fin 3) : |
| 86 | roundCylinderChristoffel t (chartAt E₂ theta) p a b c = |
| 87 | cylinderReflectionSign a * cylinderReflectionSign b * cylinderReflectionSign c * |
| 88 | roundCylinderChristoffel t (chartAt E₂ theta) |
| 89 | (cylinderCoordinateReflection p) a b c := by |
| 90 | simp only [evolving_roundCylinderChristoffel_eq ht, roundCylinderChristoffel_chart, |
| 91 | cylinderCoordinateReflection_apply] |
| 92 | fin_cases a <;> fin_cases b <;> fin_cases c <;> |
| 93 | simp [cylinderReflectionSign, cylinderChristoffelLinear, |
| 94 | cylinderHorizontalCovector, cylinderHorizontalGram, roundCylinderCoordinateBasis] |
| 95 | |
| 96 | end PoincareMT.M45 |