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.RawFlow.IntrinsicEvolution |
| 3 | import PoincareLib.Geometry.RicciFlow.Local.Energy.Comparison.ScalarMixedDerivative |
| 4 | |
| 5 | local notation "Proofs.M03.contDiffOn_fderiv_family" => PoincareMT.RicciFlow.Local.contDiffOn_fderiv_family |
| 6 | local notation "Proofs.M03.hasDerivAt_fderiv_family" => PoincareMT.RicciFlow.Local.hasDerivAt_fderiv_family |
| 7 | |
| 8 | /-! |
| 9 | # The actual intrinsic radial-slope equation |
| 10 | |
| 11 | Morgan-Tian Section 12.6, pp. 309-314. Commutation of the actual mixed |
| 12 | derivatives differentiates the warping equation. The identity v_s=2f_ss/f |
| 13 | cancels its first-order quotient term, leaving the bounded tangential |
| 14 | sectional curvature as the reaction coefficient. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Bundle Topology |
| 21 | |
| 22 | namespace PoincareMT.M35.Uniqueness |
| 23 | |
| 24 | variable (P : RicciFlowCurvatureTheory.{0}) {g₀ : StandardInitialMetric} |
| 25 | (G : PartialStandardCapFlow g₀) |
| 26 | (hrotation : ∀ t ∈ Ico 0 G.lifetime, |
| 27 | ∀ A : Matrix.specialOrthogonalGroup (Fin 3) ℝ, ∀ x u v : StandardCapSpace, |
| 28 | (G.flow.metric t).inner (standardRotation A x) |
| 29 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x u) |
| 30 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x v) = (G.flow.metric t).inner x u v) |
| 31 | |
| 32 | noncomputable def rawWarpingSlope (t s : ℝ) : ℝ := |
| 33 | deriv (rawWarpingRadius P G hrotation t) s |
| 34 | |
| 35 | noncomputable def rawTangentialCurvature (t s : ℝ) : ℝ := |
| 36 | (1 - rawWarpingSlope P G hrotation t s ^ 2) / |
| 37 | rawWarpingRadius P G hrotation t s ^ 2 |
| 38 | |
| 39 | theorem rawRadialVelocity_hasDerivAt {t s : ℝ} (ht : t ∈ Ico 0 G.lifetime) |
| 40 | (hs : 0 < s) : HasDerivAt (rawRadialVelocity P G hrotation t) |
| 41 | (2 * deriv (deriv (rawWarpingRadius P G hrotation t)) s / |
| 42 | rawWarpingRadius P G hrotation t s) s := by |
| 43 | rw [rawRadialVelocity_eq P G hrotation ht, rawWarpingRadius_eq P G hrotation ht, |
| 44 | ← intrinsicRadialAcceleration_eq (G.flow.metric t) (hrotation t ht) (G.complete P ht) hs] |
| 45 | exact intrinsicRadialVelocity_hasDerivAt (G.flow.metric t) (hrotation t ht) |
| 46 | (G.complete P ht) s |
| 47 | |
| 48 | theorem rawWarpingSlope_contDiff {t : ℝ} (ht : t ∈ Ico 0 G.lifetime) : |
| 49 | ContDiff ℝ ∞ (rawWarpingSlope P G hrotation t) := by |
| 50 | change ContDiff ℝ ∞ (deriv (rawWarpingRadius P G hrotation t)) |
| 51 | rw [rawWarpingRadius_eq P G hrotation ht] |
| 52 | exact (contDiff_infty_iff_deriv.mp |
| 53 | (intrinsicWarpingRadius_contDiff (G.flow.metric t) (hrotation t ht) (G.complete P ht))).2 |
| 54 | |
| 55 | theorem rawWarpingSlope_contDiffOn : |
| 56 | ContDiffOn ℝ ∞ (Function.uncurry (rawWarpingSlope P G hrotation)) |
| 57 | (Ioo 0 G.lifetime ×ˢ univ) := by |
| 58 | change ContDiffOn ℝ ∞ |
| 59 | (fun z : ℝ × ℝ => deriv (rawWarpingRadius P G hrotation z.1) z.2) _ |
| 60 | have h := Proofs.M03.contDiffOn_fderiv_family isOpen_Ioo isOpen_univ |
| 61 | (rawWarpingRadius P G hrotation) (rawWarpingRadius_contDiffOn P G hrotation) |
| 62 | simpa only [fderiv_apply_one_eq_deriv, Function.uncurry, rawWarpingSlope] using |
| 63 | h.clm_apply (contDiffOn_const (c := (1 : ℝ))) |
| 64 | |
| 65 | /-- The genuine slope of the actual intrinsic metric satisfies the |
| 66 | linear drift-reaction equation used by the half-line comparison. -/ |
| 67 | theorem rawWarpingSlope_hasDerivAt_time {t s : ℝ} |
| 68 | (ht : t ∈ Ioo 0 G.lifetime) (hs : 0 < s) : |
| 69 | HasDerivAt (fun a => rawWarpingSlope P G hrotation a s) |
| 70 | (deriv (deriv (rawWarpingSlope P G hrotation t)) s - |
| 71 | rawRadialVelocity P G hrotation t s * deriv (rawWarpingSlope P G hrotation t) s + |
| 72 | rawTangentialCurvature P G hrotation t s * rawWarpingSlope P G hrotation t s) t := by |
| 73 | have htG : t ∈ Ico 0 G.lifetime := ⟨ht.1.le, ht.2⟩ |
| 74 | let f := rawWarpingRadius P G hrotation t |
| 75 | let p := deriv f |
| 76 | let v := rawRadialVelocity P G hrotation t |
| 77 | have hf : ContDiff ℝ ∞ f := by |
| 78 | dsimp only [f] |
| 79 | rw [rawWarpingRadius_eq P G hrotation htG] |
| 80 | exact intrinsicWarpingRadius_contDiff (G.flow.metric t) (hrotation t htG) |
| 81 | (G.complete P htG) |
| 82 | have hp : ContDiff ℝ ∞ p := (contDiff_infty_iff_deriv.mp hf).2 |
| 83 | have hpp : ContDiff ℝ ∞ (deriv p) := (contDiff_infty_iff_deriv.mp hp).2 |
| 84 | have hfn : f s ≠ 0 := by |
| 85 | dsimp only [f] |
| 86 | rw [rawWarpingRadius_eq P G hrotation htG] |
| 87 | exact (intrinsicWarpingRadius_pos (G.flow.metric t) (hrotation t htG) |
| 88 | (G.complete P htG) hs).ne' |
| 89 | have hf' := (hf.differentiable (by simp) s).hasDerivAt |
| 90 | have hp' := (hp.differentiable (by simp) s).hasDerivAt |
| 91 | have hpp' := (hpp.differentiable (by simp) s).hasDerivAt |
| 92 | have hv : HasDerivAt v (2 * deriv p s / f s) s := |
| 93 | rawRadialVelocity_hasDerivAt P G hrotation htG hs |
| 94 | have hR := (hpp'.add (((hp'.pow 2).sub_const 1).div hf' hfn)).sub (hv.mul hp') |
| 95 | change HasDerivAt (fun r => deriv p r + (p r ^ 2 - 1) / f r - v r * p r) |
| 96 | (deriv (deriv p) s + |
| 97 | ((2 : ℝ) * p s ^ (2 - 1) * deriv p s * f s - (p s ^ 2 - 1) * p s) / f s ^ 2 - |
| 98 | (2 * deriv p s / f s * p s + v s * deriv p s)) s at hR |
| 99 | have heq : (fun r => deriv (fun a => rawWarpingRadius P G hrotation a r) t) =ᶠ[𝓝 s] |
| 100 | (fun r => deriv p r + (p r ^ 2 - 1) / f r - v r * p r) := by |
| 101 | filter_upwards [eventually_gt_nhds hs] with r hr |
| 102 | exact (rawWarpingRadius_hasDerivAt_time P G hrotation ht hr).deriv |
| 103 | have hspace : deriv (fun r => deriv (fun a => rawWarpingRadius P G hrotation a r) t) s = |
| 104 | deriv (deriv p) s - v s * deriv p s + ((1 - p s ^ 2) / f s ^ 2) * p s := by |
| 105 | rw [heq.deriv_eq, hR.deriv] |
| 106 | field_simp [hfn] |
| 107 | ring |
| 108 | have hm := Proofs.M03.hasDerivAt_fderiv_family isOpen_Ioo isOpen_univ |
| 109 | (rawWarpingRadius P G hrotation) (rawWarpingRadius_contDiffOn P G hrotation) |
| 110 | ht (mem_univ s) |
| 111 | have hm' := hm.clm_apply (hasDerivAt_const t (1 : ℝ)) |
| 112 | simp only [map_zero, add_zero, fderiv_apply_one_eq_deriv] at hm' |
| 113 | rw [hspace] at hm' |
| 114 | exact hm' |
| 115 | |
| 116 | end PoincareMT.M35.Uniqueness |