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.Riemannian.Surface.Boundary |
| 2 | |
| 3 | /-! |
| 4 | # The metric norm bound for surface turning |
| 5 | |
| 6 | The quarter-turn of a metric-unit vector in an orthonormal surface frame |
| 7 | has unit length. Cauchy--Schwarz bounds its turning coefficient by the |
| 8 | metric norm of the covariant derivative. This is the pointwise estimate |
| 9 | used for Morgan--Tian, Claim 19.39 and Lemma 19.46, pp. 470 and 474-475; |
| 10 | see `proof-work/tasks/M64/derivations/2026-09-25-boundary-arc-turning.md`. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle |
| 17 | |
| 18 | namespace PoincareMT.LeviCivitaData |
| 19 | |
| 20 | variable {S : Type*} [TopologicalSpace S] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin 2)) S] [IsManifold (𝓡 2) ∞ S] |
| 22 | {g : RiemannianMetric 2 S} |
| 23 | |
| 24 | /-- In an orthonormal surface frame, the absolute turning coefficient of |
| 25 | a unit field is bounded by the metric norm of its covariant derivative. |
| 26 | This supplies the pointwise boundary-turning estimate for Morgan--Tian, |
| 27 | Claim 19.39 and Lemma 19.46, pp. 470 and 474-475. -/ |
| 28 | theorem abs_surfaceTurningForm_le_tangentNorm (D : LeviCivitaData g) |
| 29 | (e1 e2 T V : (x : S) → TangentSpace (𝓡 2) x) (x : S) |
| 30 | (he1 : g.inner x (e1 x) (e1 x) = 1) |
| 31 | (he2 : g.inner x (e2 x) (e2 x) = 1) |
| 32 | (horth : g.inner x (e1 x) (e2 x) = 0) |
| 33 | (hT : g.inner x (T x) (T x) = 1) : |
| 34 | |D.surfaceTurningForm e1 e2 T V x| ≤ |
| 35 | g.tangentNorm x (D.connection T x (V x)) := by |
| 36 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 2) : S → Type _) := |
| 37 | ⟨g.toRiemannianMetric⟩ |
| 38 | let N := -g.inner x (T x) (e2 x) • e1 x + g.inner x (T x) (e1 x) • e2 x |
| 39 | have horth' : g.inner x (e2 x) (e1 x) = 0 := by |
| 40 | rw [g.symm] |
| 41 | exact horth |
| 42 | have hcoeff := (g.inner_self_eq_frameCoordinates_sq x he1 he2 horth (T x)).symm.trans hT |
| 43 | have hN : g.inner x N N = 1 := by |
| 44 | simp only [N, map_add, add_apply, map_smul, smul_apply, smul_eq_mul, |
| 45 | he1, he2, horth, horth', mul_one, mul_zero, add_zero, zero_add] |
| 46 | nlinarith only [hcoeff] |
| 47 | have hNnorm : g.tangentNorm x N = 1 := by |
| 48 | rw [RiemannianMetric.tangentNorm, hN, Real.sqrt_one] |
| 49 | have hbound : |g.inner x (D.connection T x (V x)) N| ≤ |
| 50 | g.tangentNorm x (D.connection T x (V x)) * g.tangentNorm x N := by |
| 51 | have h := abs_real_inner_le_norm (D.connection T x (V x)) N |
| 52 | simpa only [norm_eq_sqrt_real_inner, RiemannianMetric.tangentNorm] using! h |
| 53 | change |g.inner x (D.connection T x (V x)) N| ≤ |
| 54 | g.tangentNorm x (D.connection T x (V x)) |
| 55 | simpa only [hNnorm, mul_one] using hbound |
| 56 | |
| 57 | end PoincareMT.LeviCivitaData |