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.Analysis.Basic.RadialCalculus |
| 2 | |
| 3 | /-! |
| 4 | # Cartesian radial connection algebra |
| 5 | |
| 6 | The radial connection expression is tested against the metric pairing |
| 7 | and Koszul identity. These algebraic facts are used to identify the actual |
| 8 | Levi-Civita connection in Morgan-Tian Lemma 12.2, pp. 294-295; they do not |
| 9 | replace that connection by an assumed one. See the M34 radial-curvature |
| 10 | derivation. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | namespace Poincare |
| 16 | |
| 17 | variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] |
| 18 | |
| 19 | /-- The three rotationally invariant terms in a constant-field |
| 20 | connection coefficient (Lemma 12.2 computation, pp. 294-295). -/ |
| 21 | noncomputable def radialChristoffel (A B C : ℝ) (x u v : E) : E := |
| 22 | A • (inner ℝ x u • v + inner ℝ x v • u) + |
| 23 | (B * inner ℝ u v) • x + (C * inner ℝ x u * inner ℝ x v) • x |
| 24 | |
| 25 | /-- Pairing the candidate connection with a radial metric whose radial |
| 26 | eigenvalue is one (Lemma 12.2 computation, pp. 294-295). -/ |
| 27 | theorem radialChristoffel_pairing (c b A B C : ℝ) (x u v w : E) |
| 28 | (hr : c + b * ‖x‖ ^ 2 = 1) : |
| 29 | c * inner ℝ (radialChristoffel A B C x u v) w + |
| 30 | b * (inner ℝ x (radialChristoffel A B C x u v) * inner ℝ x w) = |
| 31 | c * A * (inner ℝ x u * inner ℝ v w + inner ℝ x v * inner ℝ u w) + |
| 32 | B * inner ℝ u v * inner ℝ x w + |
| 33 | (C + 2 * A * b) * inner ℝ x u * inner ℝ x v * inner ℝ x w := by |
| 34 | simp only [radialChristoffel, inner_add_left, inner_add_right, |
| 35 | real_inner_smul_left, real_inner_smul_right, real_inner_self_eq_norm_sq] |
| 36 | linear_combination |
| 37 | (B * inner ℝ u v * inner ℝ x w + |
| 38 | C * inner ℝ x u * inner ℝ x v * inner ℝ x w) * hr |
| 39 | |
| 40 | /-- The coefficient identities that make the radial candidate satisfy |
| 41 | the constant-frame Koszul identity (Lemma 12.2, pp. 294-295). -/ |
| 42 | theorem radialChristoffel_koszul (c b d e A B C : ℝ) (x u v w : E) |
| 43 | (hr : c + b * ‖x‖ ^ 2 = 1) (hA : 2 * c * A = d) |
| 44 | (hB : 2 * B = 2 * b - d) (hC : 2 * (C + 2 * A * b) = e) : |
| 45 | 2 * (c * inner ℝ (radialChristoffel A B C x u v) w + |
| 46 | b * (inner ℝ x (radialChristoffel A B C x u v) * inner ℝ x w)) = |
| 47 | (d * inner ℝ x u * inner ℝ v w + |
| 48 | e * inner ℝ x u * (inner ℝ x v * inner ℝ x w) + |
| 49 | b * (inner ℝ u v * inner ℝ x w + inner ℝ x v * inner ℝ u w)) + |
| 50 | (d * inner ℝ x v * inner ℝ w u + |
| 51 | e * inner ℝ x v * (inner ℝ x w * inner ℝ x u) + |
| 52 | b * (inner ℝ v w * inner ℝ x u + inner ℝ x w * inner ℝ v u)) - |
| 53 | (d * inner ℝ x w * inner ℝ u v + |
| 54 | e * inner ℝ x w * (inner ℝ x u * inner ℝ x v) + |
| 55 | b * (inner ℝ w u * inner ℝ x v + inner ℝ x u * inner ℝ w v)) := by |
| 56 | rw [radialChristoffel_pairing c b A B C x u v w hr] |
| 57 | rw [real_inner_comm u w, real_inner_comm u v, real_inner_comm v w] |
| 58 | linear_combination |
| 59 | (inner ℝ x u * inner ℝ v w + inner ℝ x v * inner ℝ u w) * hA + |
| 60 | (inner ℝ u v * inner ℝ x w) * hB + |
| 61 | (inner ℝ x u * inner ℝ x v * inner ℝ x w) * hC |
| 62 | |
| 63 | end Poincare |