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.InitialEstimates.AxisCurvature |
| 2 | import Mathlib.Analysis.Calculus.Deriv.MeanValue |
| 3 | |
| 4 | /-! |
| 5 | # Monotonicity and nonnegativity of the weighted warping slope |
| 6 | |
| 7 | Morgan-Tian Lemma 12.3, pp. 294-295. Nonnegative radial curvature makes |
| 8 | q=f'/a nonincreasing. A negative value would force the positive warping |
| 9 | function to decrease at least linearly in metric radial length. The |
| 10 | unbounded length already proved from completeness rules this out. |
| 11 | See the weighted-radial-positivity derivation. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped ContDiff |
| 18 | |
| 19 | namespace PoincareMT.M34 |
| 20 | |
| 21 | /-- Nonnegative actual radial curvature gives the derivative sign of |
| 22 | the weighted slope (Lemma 12.3, pp. 294-295). -/ |
| 23 | theorem initialWeightedSlope_deriv_nonpos (g₀ : StandardInitialMetric) |
| 24 | {r : ℝ} (hr : 0 < r) : deriv (initialWeightedSlope g₀) r ≤ 0 := by |
| 25 | have h := g₀.nonnegative_sectional (EuclideanSpace.single (0 : Fin 3) r) |
| 26 | (EuclideanSpace.single (0 : Fin 3) (1 : ℝ)) |
| 27 | (EuclideanSpace.single (1 : Fin 3) (1 : ℝ)) |
| 28 | rw [initialCurvatureTensor_radial_axis g₀ hr] at h |
| 29 | have hp : 0 < initialRadialSpeed g₀ r * initialWarping g₀ r / r ^ 2 := |
| 30 | div_pos (mul_pos (initialRadialSpeed_pos g₀ r) (initialWarping_pos g₀ hr)) |
| 31 | (sq_pos_of_pos hr) |
| 32 | nlinarith |
| 33 | |
| 34 | /-- The weighted slope is nonincreasing on the positive half-line |
| 35 | (Lemma 12.3, pp. 294-295). -/ |
| 36 | theorem initialWeightedSlope_antitoneOn (g₀ : StandardInitialMetric) : |
| 37 | AntitoneOn (initialWeightedSlope g₀) (Ioi 0) := by |
| 38 | apply antitoneOn_of_deriv_nonpos (convex_Ioi 0) |
| 39 | (initialWeightedSlope_contDiff g₀).continuous.continuousOn |
| 40 | ((initialWeightedSlope_contDiff g₀).differentiable (by simp)).differentiableOn |
| 41 | intro r hr |
| 42 | exact initialWeightedSlope_deriv_nonpos g₀ (by simpa using hr) |
| 43 | |
| 44 | /-- Positive radial speed makes radial length strictly increasing |
| 45 | (Lemma 12.3, p. 295). -/ |
| 46 | theorem initialRadialLength_strictMono (g₀ : StandardInitialMetric) : |
| 47 | StrictMono (initialRadialLength g₀) := by |
| 48 | apply strictMono_of_deriv_pos |
| 49 | intro r |
| 50 | rw [(initialRadialLength_hasDerivAt g₀ r).deriv] |
| 51 | exact initialRadialSpeed_pos g₀ r |
| 52 | |
| 53 | /-- A complete standard initial metric cannot have negative weighted |
| 54 | warping slope (Lemma 12.3, pp. 294-295). -/ |
| 55 | theorem initialWeightedSlope_nonneg (g₀ : StandardInitialMetric) |
| 56 | {r₀ : ℝ} (hr₀ : 0 < r₀) : 0 ≤ initialWeightedSlope g₀ r₀ := by |
| 57 | by_contra h |
| 58 | have hq : initialWeightedSlope g₀ r₀ < 0 := lt_of_not_ge h |
| 59 | have hf₀ := initialWarping_pos g₀ hr₀ |
| 60 | obtain ⟨r, _, hlarge⟩ := initialRadialLength_unbounded g₀ |
| 61 | (initialRadialLength g₀ r₀ + (initialWarping g₀ r₀ + 1) / |
| 62 | (-initialWeightedSlope g₀ r₀)) |
| 63 | have hlength : initialRadialLength g₀ r₀ < initialRadialLength g₀ r := by |
| 64 | have hp : 0 < (initialWarping g₀ r₀ + 1) / (-initialWeightedSlope g₀ r₀) := |
| 65 | div_pos (by linarith) (neg_pos.mpr hq) |
| 66 | linarith |
| 67 | have hrr : r₀ < r := (initialRadialLength_strictMono g₀).lt_iff_lt.mp hlength |
| 68 | have hd (t : ℝ) : HasDerivAt |
| 69 | (fun s => initialWarping g₀ s - initialWeightedSlope g₀ r₀ * initialRadialLength g₀ s) |
| 70 | (deriv (initialWarping g₀) t - initialWeightedSlope g₀ r₀ * initialRadialSpeed g₀ t) t := |
| 71 | ((((initialWarping_contDiff g₀).differentiable (by simp)) t).hasDerivAt).sub |
| 72 | ((initialRadialLength_hasDerivAt g₀ t).const_mul (initialWeightedSlope g₀ r₀)) |
| 73 | have hm : AntitoneOn |
| 74 | (fun s => initialWarping g₀ s - initialWeightedSlope g₀ r₀ * initialRadialLength g₀ s) |
| 75 | (Ici r₀) := by |
| 76 | apply antitoneOn_of_deriv_nonpos (convex_Ici r₀) |
| 77 | (fun t _ => (hd t).continuousAt.continuousWithinAt) |
| 78 | (fun t _ => (hd t).differentiableAt.differentiableWithinAt) |
| 79 | intro t ht |
| 80 | have hrt : r₀ < t := by simpa using ht |
| 81 | have hle := initialWeightedSlope_antitoneOn g₀ hr₀ (hr₀.trans hrt) hrt.le |
| 82 | have ha := initialRadialSpeed_pos g₀ t |
| 83 | change deriv (initialWarping g₀) t / initialRadialSpeed g₀ t ≤ |
| 84 | initialWeightedSlope g₀ r₀ at hle |
| 85 | rw [(hd t).deriv] |
| 86 | exact sub_nonpos.mpr ((div_le_iff₀ ha).mp hle) |
| 87 | have hfall := hm (mem_Ici.mpr le_rfl) (mem_Ici.mpr hrr.le) hrr.le |
| 88 | have hproduct : initialWarping g₀ r₀ + 1 < |
| 89 | (initialRadialLength g₀ r - initialRadialLength g₀ r₀) * |
| 90 | (-initialWeightedSlope g₀ r₀) := by |
| 91 | apply (div_lt_iff₀ (neg_pos.mpr hq)).mp |
| 92 | linarith |
| 93 | have hf := initialWarping_pos g₀ (hr₀.trans hrr) |
| 94 | dsimp only at hfall |
| 95 | nlinarith |
| 96 | |
| 97 | end PoincareMT.M34 |