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.RadialEndSlope |
| 3 | |
| 4 | /-! |
| 5 | # A local scalar floor controls the actual orbit radius |
| 6 | |
| 7 | Morgan-Tian Theorem 12.32, pp. 326-327. On a finite radial interval, |
| 8 | the scalar identity and the actual slope bound force either a bounded |
| 9 | initial orbit radius or a bounded product of that radius and interval |
| 10 | length. This is the local geometric bound needed at moving neck centers. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle |
| 17 | |
| 18 | namespace PoincareMT.M35.Uniqueness |
| 19 | |
| 20 | /-- Theorem 12.32: a scalar floor along an actual radial interval |
| 21 | prevents an arbitrarily large orbit radius on an interval of fixed |
| 22 | positive intrinsic length. -/ |
| 23 | theorem axisWarpingRadius_sq_le_or_mul_arclength_le |
| 24 | {g : RiemannianMetric 3 StandardCapSpace} (D : LeviCivitaData g) |
| 25 | (hrotation : ∀ A : Matrix.specialOrthogonalGroup (Fin 3) ℝ, |
| 26 | ∀ x u v : StandardCapSpace, |
| 27 | g.inner (standardRotation A x) |
| 28 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x u) |
| 29 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x v) = g.inner x u v) |
| 30 | (hsec : D.NonnegativeSectionalCurvature) (hcomplete : MetricComplete g) |
| 31 | {a b c : ℝ} (ha : 0 < a) (hab : a ≤ b) (hc : 0 < c) |
| 32 | (hfloor : ∀ r ∈ Icc a b, |
| 33 | c ≤ D.scalarCurvature (r • EuclideanSpace.single (2 : Fin 3) 1)) : |
| 34 | axisWarpingRadius g a ^ 2 ≤ 4 / c ∨ |
| 35 | c * axisWarpingRadius g a * (radialArclength g b - radialArclength g a) ≤ 8 := by |
| 36 | by_cases hsmall : axisWarpingRadius g a ^ 2 ≤ 4 / c |
| 37 | · exact Or.inl hsmall |
| 38 | right |
| 39 | have hlarge : 4 < c * axisWarpingRadius g a ^ 2 := by |
| 40 | have h := (div_lt_iff₀ hc).mp (lt_of_not_ge hsmall) |
| 41 | nlinarith |
| 42 | have hsecond (u : ℝ) (hu : u ∈ Icc a b) : |
| 43 | axisWarpingSecond g u ≤ -(c * axisWarpingRadius g a / 8) := by |
| 44 | have hu0 : 0 < u := ha.trans_le hu.1 |
| 45 | have hupos := axisWarpingRadius_pos g hu0 |
| 46 | have hfu := axisWarpingRadius_monotoneOn D hrotation hsec hcomplete ha hu0 hu.1 |
| 47 | have hscalar := hfloor u hu |
| 48 | rw [rotational_scalar_axis D hrotation hu0] at hscalar |
| 49 | have hscalar' : c ≤ |
| 50 | 2 * (1 - axisWarpingSlope g u ^ 2) / axisWarpingRadius g u ^ 2 - |
| 51 | 4 * axisWarpingSecond g u / axisWarpingRadius g u := by |
| 52 | calc |
| 53 | c ≤ _ := hscalar |
| 54 | _ = _ := by |
| 55 | rw [show 2 * radialTangentialCurvatureFactor g u / axisAngularCoefficient g u = |
| 56 | 2 * (radialTangentialCurvatureFactor g u / axisAngularCoefficient g u) by ring, |
| 57 | show 4 * radialMixedCurvatureFactor g u / axisRadialCoefficient g u = |
| 58 | 4 * (radialMixedCurvatureFactor g u / axisRadialCoefficient g u) by ring, |
| 59 | radialTangentialCurvatureFactor_eq_warping g hu0, |
| 60 | radialMixedCurvatureFactor_eq_warping g hu0] |
| 61 | ring |
| 62 | have hscaled := mul_le_mul_of_nonneg_right hscalar' |
| 63 | (sq_nonneg (axisWarpingRadius g u)) |
| 64 | have heq : |
| 65 | (2 * (1 - axisWarpingSlope g u ^ 2) / axisWarpingRadius g u ^ 2 - |
| 66 | 4 * axisWarpingSecond g u / axisWarpingRadius g u) * |
| 67 | axisWarpingRadius g u ^ 2 = |
| 68 | 2 * (1 - axisWarpingSlope g u ^ 2) - |
| 69 | 4 * axisWarpingSecond g u * axisWarpingRadius g u := by |
| 70 | field_simp [hupos.ne'] |
| 71 | rw [heq] at hscaled |
| 72 | have hsecond' : 4 * axisWarpingSecond g u ≤ |
| 73 | 2 / axisWarpingRadius g u - c * axisWarpingRadius g u := by |
| 74 | apply le_of_mul_le_mul_right (a := axisWarpingRadius g u) _ hupos |
| 75 | have hcancel : 2 / axisWarpingRadius g u * axisWarpingRadius g u = 2 := |
| 76 | div_mul_cancel₀ _ hupos.ne' |
| 77 | nlinarith [sq_nonneg (axisWarpingSlope g u)] |
| 78 | have hinv : 2 / axisWarpingRadius g u ≤ 2 / axisWarpingRadius g a := |
| 79 | div_le_div_of_nonneg_left (by norm_num) (axisWarpingRadius_pos g ha) hfu |
| 80 | have hmul : c * axisWarpingRadius g a ≤ c * axisWarpingRadius g u := |
| 81 | mul_le_mul_of_nonneg_left hfu hc.le |
| 82 | have hhalf : 2 / axisWarpingRadius g a ≤ c * axisWarpingRadius g a / 2 := by |
| 83 | apply (div_le_iff₀ (axisWarpingRadius_pos g ha)).mpr |
| 84 | nlinarith |
| 85 | linarith |
| 86 | let K := c * axisWarpingRadius g a / 8 |
| 87 | let F (u : ℝ) := axisWarpingSlope g u + K * radialArclength g u |
| 88 | have hd (u : ℝ) (hu : u ∈ Icc a b) : |
| 89 | HasDerivAt F (axisRadialSpeed g u * (axisWarpingSecond g u + K)) u := by |
| 90 | convert! (axisWarpingSlope_hasDerivAt g (ha.trans_le hu.1)).add |
| 91 | ((radialArclength_hasDerivAt g u).const_mul K) using 1 |
| 92 | dsimp only [axisRadialSpeed] |
| 93 | ring |
| 94 | have hanti : AntitoneOn F (Icc a b) := |
| 95 | antitoneOn_of_hasDerivWithinAt_nonpos (convex_Icc a b) |
| 96 | (fun u hu => (hd u hu).continuousAt.continuousWithinAt) |
| 97 | (fun u hu => (hd u (interior_subset hu)).hasDerivWithinAt) |
| 98 | (fun u hu => mul_nonpos_of_nonneg_of_nonpos (axisRadialSpeed_pos g u).le |
| 99 | (by dsimp only [K]; linarith [hsecond u (interior_subset hu)])) |
| 100 | have h := hanti ⟨le_rfl, hab⟩ ⟨hab, le_rfl⟩ hab |
| 101 | dsimp only [F, K] at h |
| 102 | have hb := axisWarpingSlope_nonneg D hrotation hsec hcomplete (ha.trans_le hab) |
| 103 | have ha' := axisWarpingSlope_le_one D hrotation hsec ha |
| 104 | nlinarith |
| 105 | |
| 106 | end PoincareMT.M35.Uniqueness |