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.InitialMetric.Metric |
| 2 | |
| 3 | /-! |
| 4 | # Invariance under the literal standard rotations |
| 5 | |
| 6 | Definition 12.1 and Lemma 12.2, printed pp. 293-295, require invariance |
| 7 | under the specified SO(3) action, including its actual manifold derivative. |
| 8 | The matrix action is an ambient linear isometry; its derivative is the |
| 9 | same linear map, so the checked bilinear-form identity gives the required |
| 10 | metric invariance. No alternative action is substituted. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Matrix |
| 16 | open scoped Manifold ContDiff |
| 17 | |
| 18 | namespace PoincareMT.M34 |
| 19 | |
| 20 | /-- The literal matrix rotation preserves the ambient inner product |
| 21 | (Definition 12.1 and Lemma 12.2, pp. 293-295). -/ |
| 22 | theorem standardRotation_inner (A : Matrix.specialOrthogonalGroup (Fin 3) ℝ) |
| 23 | (u v : StandardCapSpace) : |
| 24 | inner ℝ (standardRotation A u) (standardRotation A v) = inner ℝ u v := by |
| 25 | have hA : A.1.transpose * A.1 = 1 := |
| 26 | (Matrix.mem_orthogonalGroup_iff' (Fin 3) ℝ).mp |
| 27 | (Matrix.mem_specialOrthogonalGroup_iff.mp A.2).1 |
| 28 | simp only [EuclideanSpace.inner_eq_star_dotProduct, star_trivial] |
| 29 | change (A.1 *ᵥ WithLp.ofLp v) ⬝ᵥ (A.1 *ᵥ WithLp.ofLp u) = |
| 30 | WithLp.ofLp v ⬝ᵥ WithLp.ofLp u |
| 31 | rw [Matrix.dotProduct_mulVec, ← Matrix.vecMul_transpose A.1 (WithLp.ofLp v), |
| 32 | Matrix.vecMul_vecMul, hA, Matrix.vecMul_one] |
| 33 | |
| 34 | /-- The frozen standard rotation as an actual linear isometry |
| 35 | (Definition 12.1, p. 293). -/ |
| 36 | noncomputable def capRotationIsometry (A : Matrix.specialOrthogonalGroup (Fin 3) ℝ) : |
| 37 | StandardCapSpace →ₗᵢ[ℝ] StandardCapSpace := |
| 38 | (Matrix.toLpLin 2 2 A.1).isometryOfInner (standardRotation_inner A) |
| 39 | |
| 40 | /-- The manifold derivative of a standard rotation is its constant |
| 41 | linear map (Definition 12.1, p. 293). -/ |
| 42 | theorem standardRotation_mfderiv (A : Matrix.specialOrthogonalGroup (Fin 3) ℝ) |
| 43 | (x : StandardCapSpace) : |
| 44 | mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x = |
| 45 | (capRotationIsometry A).toContinuousLinearMap := by |
| 46 | rw [mfderiv_eq_fderiv] |
| 47 | exact (capRotationIsometry A).toContinuousLinearMap.fderiv |
| 48 | |
| 49 | /-- Invariance of the constructed cap metric under the contract's exact |
| 50 | SO(3) action and actual tangent derivative (Definition 12.1 and |
| 51 | Lemma 12.2, pp. 293-295). -/ |
| 52 | theorem capRiemannianMetric_rotation_invariant (a : ℝ) (ha : 0 < a) |
| 53 | (hapi : a ≤ Real.pi / 2) (A : Matrix.specialOrthogonalGroup (Fin 3) ℝ) |
| 54 | (x : StandardCapSpace) (u v : TangentSpace (𝓡 3) x) : |
| 55 | (capRiemannianMetric a ha hapi).inner (standardRotation A x) |
| 56 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x u) |
| 57 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x v) = |
| 58 | (capRiemannianMetric a ha hapi).inner x u v := by |
| 59 | rw [standardRotation_mfderiv] |
| 60 | exact capMetricInner_linearIsometry a (capRotationIsometry A) x u v |
| 61 | |
| 62 | end PoincareMT.M34 |