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.CurveShortening.Ramp.LocalFlow.C2.TraceSpeed |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.CurveEstimates.Relabeling.Geometry |
| 3 | import PoincareLib.Geometry.CurveShortening.Ramp.CurveEstimates.Slice.Congruence |
| 4 | |
| 5 | /-! |
| 6 | # Uniform derivatives of actual normal labels |
| 7 | |
| 8 | The witnessed speed composition and the normal-speed exponential bounds |
| 9 | give two-sided label Jacobian bounds, including both time endpoints. |
| 10 | MT2007 Claim 19.1, p. 437 and Lemma 19.6, pp. 441-442; corrected |
| 11 | Lemma 0.1, p. 3; `2026-09-22-normal-label-jacobian-bounds.md`. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M63 |
| 22 | |
| 23 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 25 | {a b : ℝ} |
| 26 | |
| 27 | /-- Actual normal labels have positive uniform derivative bounds from |
| 28 | gauge ellipticity and the normal curvature cap. MT2007 Claim 19.1, |
| 29 | p. 437; normal-label Jacobian derivation. The physical period-scaling |
| 30 | factor cancels from the final constants. -/ |
| 31 | theorem normalLabel_derivative_bounds |
| 32 | (F : RicciFlow n M (Icc a b)) (hab : a < b) |
| 33 | (d : ℝ → ℝ → M) (ψ : ℝ → ℝ → ℝ) |
| 34 | {κ m mu Lambda K R : ℝ} |
| 35 | (hκ : 0 < κ) (hm : 1 / 2 ≤ m) (hm' : m ≤ 3 / 2) |
| 36 | (hmu : 0 < mu) (hLambda : 0 < Lambda) |
| 37 | (hK : 0 ≤ K) (hR : 0 ≤ R) |
| 38 | (hBounds : CurveEvolutionAmbientBounds F K K K) |
| 39 | (hd : ∀ t ∈ Icc a b, |
| 40 | MDifferentiable 𝓘(ℝ, ℝ) (𝓡 n) (fun x => d x t)) |
| 41 | (himm : ∀ t ∈ Icc a b, ∀ x, |
| 42 | curveVelocity (n := n) (fun y => d y t) x ≠ 0) |
| 43 | (hψ : ∀ t ∈ Icc a b, Differentiable ℝ (ψ t)) |
| 44 | (hpos : ∀ t ∈ Icc a b, ∀ x, 0 < deriv (ψ t) x) |
| 45 | (hzero : ∀ x, ψ a x = x) |
| 46 | (hspeed : ∀ x, curveSpeed F d a x = m) |
| 47 | (hprincipal : ∀ t ∈ Icc a b, ∀ x, |
| 48 | mu ≤ (curveSpeed F d t x ^ 2)⁻¹ ∧ |
| 49 | (curveSpeed F d t x ^ 2)⁻¹ ≤ Lambda) |
| 50 | (hc : M62ShrinkingCurve F (fun x t => d (ψ t (κ * x)) t)) |
| 51 | (hcurv : ∀ t ∈ Ioo a b, ∀ x, |
| 52 | m62CurvatureSquared F (fun y s => d (ψ s (κ * y)) s) t x ≤ R) : |
| 53 | let ell := (1 / 2) * Real.exp (-(K + R) * (b - a)) * Real.sqrt mu |
| 54 | let upper := (3 / 2) * Real.exp ((K + R) * (b - a)) * Real.sqrt Lambda |
| 55 | 0 < ell ∧ 0 < upper ∧ |
| 56 | ∀ t ∈ Icc a b, ∀ x, ell ≤ deriv (ψ t) x ∧ deriv (ψ t) x ≤ upper := by |
| 57 | dsimp only |
| 58 | let c := fun x t => d (ψ t (κ * x)) t |
| 59 | have ha : a ∈ Icc a b := ⟨le_rfl, hab.le⟩ |
| 60 | have hm0 : 0 ≤ m := by linarith only [hm] |
| 61 | have hKR : 0 ≤ K + R := add_nonneg hK hR |
| 62 | have hcomp (t : ℝ) (ht : t ∈ Icc a b) (y : ℝ) : |
| 63 | curveSpeed F c t y = |
| 64 | (κ * deriv (ψ t) (κ * y)) * curveSpeed F d t (ψ t (κ * y)) := by |
| 65 | have hinner : HasDerivAt (fun z : ℝ => ψ t (κ * z)) |
| 66 | (κ * deriv (ψ t) (κ * y)) y := by |
| 67 | simpa +instances only [Function.comp_def, mul_one, mul_comm] using! |
| 68 | ((hψ t ht (κ * y)).hasDerivAt.comp y ((hasDerivAt_id y).const_mul κ)) |
| 69 | calc |
| 70 | _ = curveSpeed F (fun z s => d (ψ t (κ * z)) s) t y := |
| 71 | curveSpeed_congr_slice F (fun _ => rfl) |
| 72 | _ = _ := curveSpeed_comp F d (hd t ht _) hinner (mul_pos hκ (hpos t ht _)).le |
| 73 | have hzero_fun : ψ a = id := funext hzero |
| 74 | have hinitial (y : ℝ) : curveSpeed F c a y = κ * m := by |
| 75 | simpa only [hzero_fun, deriv_id, id_eq, mul_one, hspeed] using hcomp a ha y |
| 76 | have hell : 0 < (1 / 2 : ℝ) * Real.exp (-(K + R) * (b - a)) * Real.sqrt mu := by |
| 77 | positivity |
| 78 | have hupper : 0 < (3 / 2 : ℝ) * Real.exp ((K + R) * (b - a)) * Real.sqrt Lambda := by |
| 79 | positivity |
| 80 | refine ⟨hell, hupper, ?_⟩ |
| 81 | intro t ht x |
| 82 | have hv : 0 < curveSpeed F d t (ψ t x) := by |
| 83 | exact Real.sqrt_pos.mpr ((F.metric t).pos _ _ (himm t ht _)) |
| 84 | have hsqrt : Real.sqrt ((curveSpeed F d t (ψ t x) ^ 2)⁻¹) = |
| 85 | (curveSpeed F d t (ψ t x))⁻¹ := by |
| 86 | rw [Real.sqrt_inv, Real.sqrt_sq_eq_abs, abs_of_pos hv] |
| 87 | have hcancel : κ * (x / κ) = x := by field_simp |
| 88 | have hjac : deriv (ψ t) x = curveSpeed F c t (x / κ) / κ * |
| 89 | Real.sqrt ((curveSpeed F d t (ψ t x) ^ 2)⁻¹) := by |
| 90 | rw [hcomp t ht, hcancel, hsqrt] |
| 91 | field_simp |
| 92 | have hspeed_bounds := curveSpeed_exp_bounds F c hc hBounds (x / κ) |
| 93 | (fun s hs => hcurv s hs (x / κ)) ha ht ht.1 |
| 94 | rw [hinitial] at hspeed_bounds |
| 95 | have hlo : m * Real.exp (-(K + R) * (t - a)) ≤ curveSpeed F c t (x / κ) / κ := |
| 96 | (le_div_iff₀ hκ).mpr (by nlinarith only [hspeed_bounds.1]) |
| 97 | have hhi : curveSpeed F c t (x / κ) / κ ≤ m * Real.exp ((K + R) * (t - a)) := |
| 98 | (div_le_iff₀ hκ).mpr (by nlinarith only [hspeed_bounds.2]) |
| 99 | have htime : t - a ≤ b - a := sub_le_sub_right ht.2 a |
| 100 | have hlowexp : Real.exp (-(K + R) * (b - a)) ≤ Real.exp (-(K + R) * (t - a)) := |
| 101 | Real.exp_le_exp.mpr (mul_le_mul_of_nonpos_left htime (neg_nonpos.mpr hKR)) |
| 102 | have huppexp : Real.exp ((K + R) * (t - a)) ≤ Real.exp ((K + R) * (b - a)) := |
| 103 | Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left htime hKR) |
| 104 | have hlower : (1 / 2 : ℝ) * Real.exp (-(K + R) * (b - a)) ≤ |
| 105 | curveSpeed F c t (x / κ) / κ := |
| 106 | (mul_le_mul hm hlowexp (Real.exp_nonneg _) hm0).trans hlo |
| 107 | have hupper' : curveSpeed F c t (x / κ) / κ ≤ |
| 108 | (3 / 2 : ℝ) * Real.exp ((K + R) * (b - a)) := |
| 109 | hhi.trans (mul_le_mul hm' huppexp (Real.exp_nonneg _) (by norm_num)) |
| 110 | obtain ⟨hprincipal_lo, hprincipal_hi⟩ := hprincipal t ht (ψ t x) |
| 111 | rw [hjac] |
| 112 | exact ⟨mul_le_mul hlower (Real.sqrt_le_sqrt hprincipal_lo) (Real.sqrt_nonneg _) |
| 113 | (div_nonneg (M62.speed_nonneg F c t _) hκ.le), |
| 114 | mul_le_mul hupper' (Real.sqrt_le_sqrt hprincipal_hi) (Real.sqrt_nonneg _) |
| 115 | (by positivity)⟩ |
| 116 | |
| 117 | end PoincareMT.M63 |