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.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.TerminalCap.OriginalComparison |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.RadialCoreScalarWitness |
| 4 | |
| 5 | /-! |
| 6 | # The genuine scalar scale at the radial cap boundary |
| 7 | |
| 8 | Morgan-Tian Theorem 12.32, pp. 326-327. Nonnegative curvature and |
| 9 | concavity give the boundary scalar lower bound directly from the actual |
| 10 | central orbit radius. The second neck therefore fits in the first cap. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | namespace PoincareMT.M35.Uniqueness |
| 20 | |
| 21 | variable (g : RiemannianMetric 3 StandardCapSpace) |
| 22 | (hrotation : ∀ A : Matrix.specialOrthogonalGroup (Fin 3) ℝ, |
| 23 | ∀ x u v : StandardCapSpace, |
| 24 | g.inner (standardRotation A x) |
| 25 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x u) |
| 26 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x v) = g.inner x u v) |
| 27 | (hcomplete : MetricComplete g) |
| 28 | |
| 29 | theorem radialArclength_intrinsic_center (q : UnitTwoSphere) {a : ℝ} |
| 30 | (ha : 0 ≤ a) : |
| 31 | radialArclength g ‖intrinsicSpatialInverse g hrotation hcomplete (a • q.val)‖ = a := by |
| 32 | rw [intrinsicSpatialInverse_norm, norm_smul, Real.norm_eq_abs, abs_of_nonneg ha, |
| 33 | norm_eq_of_mem_sphere, mul_one] |
| 34 | exact (radialArclengthOrderIso g hrotation hcomplete).apply_symm_apply a |
| 35 | |
| 36 | /-- A full radial neck has orbit radius less than twice its own |
| 37 | scalar length. Past four such lengths the true boundary scalar is at |
| 38 | least one quarter of the central scalar. -/ |
| 39 | theorem radial_boundary_scalar_gt_quarter (P : M35StandardCapPredecessors) |
| 40 | (D : LeviCivitaData g) (hsec : D.NonnegativeSectionalCurvature) |
| 41 | (q : UnitTwoSphere) {a b Q epsilon : ℝ} |
| 42 | (ha : 0 < a) (hb : 0 < b) (hQ : 0 < Q) (he : 0 < epsilon) |
| 43 | (hunit : Q * b ^ 2 = 1) |
| 44 | (hradius : Q * intrinsicWarpingRadius g hrotation hcomplete a ^ 2 < 4) |
| 45 | (hroom : 4 * b < a - b * epsilon⁻¹) : |
| 46 | Q < 4 * D.scalarCurvature |
| 47 | (intrinsicSpatialInverse g hrotation hcomplete ((a - b * epsilon⁻¹) • q.val)) := by |
| 48 | let f := intrinsicWarpingRadius g hrotation hcomplete a |
| 49 | let a' := a - b * epsilon⁻¹ |
| 50 | let y := intrinsicSpatialInverse g hrotation hcomplete (a' • q.val) |
| 51 | have hf : 0 < f := intrinsicWarpingRadius_pos g hrotation hcomplete ha |
| 52 | have hfb : f < 2 * b := by |
| 53 | have hsq : f ^ 2 < 4 * b ^ 2 := by |
| 54 | apply (mul_lt_mul_iff_of_pos_left hQ).mp |
| 55 | nlinarith only [hradius, hunit] |
| 56 | nlinarith only [hsq, hf, hb] |
| 57 | have ha' : 0 < a' := (mul_pos (by norm_num) hb).trans hroom |
| 58 | have hr : radialArclength g ‖y‖ = a' := |
| 59 | radialArclength_intrinsic_center g hrotation hcomplete q ha'.le |
| 60 | have hw : 0 < b * epsilon⁻¹ := mul_pos hb (inv_pos.mpr he) |
| 61 | have hs := radial_core_scalar_witness P g D hrotation hcomplete hsec ha y |
| 62 | (by rw [hr]; change 2 * f ≤ a'; linarith only [hfb, hroom]) |
| 63 | (by rw [hr]; dsimp only [a']; linarith only [hw]) |
| 64 | have hR : 0 < D.scalarCurvature y := by |
| 65 | by_contra hbad |
| 66 | have hprod := mul_nonpos_of_nonneg_of_nonpos (sq_nonneg f) (not_lt.mp hbad) |
| 67 | change 1 ≤ f ^ 2 * D.scalarCurvature y at hs |
| 68 | linarith only [hs, hprod] |
| 69 | have hmul := mul_lt_mul_of_pos_right hradius hR |
| 70 | have hscalar := mul_le_mul_of_nonneg_left hs hQ.le |
| 71 | change Q < 4 * D.scalarCurvature y |
| 72 | nlinarith only [hmul, hscalar] |
| 73 | |
| 74 | /-- The own-scalar length of the boundary neck fits inside twice |
| 75 | the own-scalar length of the end neck. -/ |
| 76 | theorem scalar_length_lt_twice {Q Q' b b' : ℝ} |
| 77 | (hQ' : 0 < Q') (hb : 0 < b) (hb' : 0 < b') |
| 78 | (hunit : Q * b ^ 2 = 1) (hunit' : Q' * b' ^ 2 = 1) |
| 79 | (hscalar : Q < 4 * Q') : b' < 2 * b := by |
| 80 | have h := mul_lt_mul_of_pos_right hscalar (sq_pos_of_pos hb) |
| 81 | rw [hunit] at h |
| 82 | have hsq : b' ^ 2 < 4 * b ^ 2 := by |
| 83 | apply (mul_lt_mul_iff_of_pos_left hQ').mp |
| 84 | nlinarith only [h, hunit'] |
| 85 | nlinarith only [hsq, hb', hb] |
| 86 | |
| 87 | end PoincareMT.M35.Uniqueness |