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.Uniqueness.Heat.RawJointRegularity |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.RawFlow.IntrinsicRadialVelocity |
| 4 | |
| 5 | /-! |
| 6 | # Actual time derivatives of the radial axis metric |
| 7 | |
| 8 | Morgan-Tian Section 12.6, pp. 309-313. The retained raw Ricci-flow |
| 9 | equation differentiates the positive radial speed and the signed orbit |
| 10 | radius in the original fixed coordinates. All coefficient families are |
| 11 | jointly smooth on the actual domain, including its initial endpoint. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle |
| 18 | |
| 19 | namespace PoincareMT.M35.Uniqueness |
| 20 | |
| 21 | private noncomputable abbrev e (i : Fin 3) : StandardCapSpace := EuclideanSpace.single i 1 |
| 22 | |
| 23 | variable {g₀ : StandardInitialMetric} (G : PartialStandardCapFlow g₀) |
| 24 | |
| 25 | private theorem raw_axis_pair_contDiffOn (i : Fin 3) : |
| 26 | ContDiffOn ℝ ∞ (fun p : ℝ × ℝ => |
| 27 | (G.flow.metric p.1).inner (p.2 • e 2) (e i) (e i)) |
| 28 | (Ico 0 G.lifetime ×ˢ univ) := by |
| 29 | have h := Heat.raw_metric_pair_family_contDiffOn G.flow (e i) (e i) |
| 30 | have hc : ContDiff ℝ ∞ (fun p : ℝ × ℝ => (p.1, p.2 • e 2)) := |
| 31 | contDiff_fst.prodMk (contDiff_snd.smul contDiff_const) |
| 32 | exact h.comp hc.contDiffOn (fun _ hp => ⟨hp.1, mem_univ _⟩) |
| 33 | |
| 34 | theorem raw_axisRadialCoefficient_contDiffOn : |
| 35 | ContDiffOn ℝ ∞ (fun p : ℝ × ℝ => axisRadialCoefficient (G.flow.metric p.1) p.2) |
| 36 | (Ico 0 G.lifetime ×ˢ univ) := raw_axis_pair_contDiffOn G 2 |
| 37 | |
| 38 | theorem raw_axisAngularCoefficient_contDiffOn : |
| 39 | ContDiffOn ℝ ∞ (fun p : ℝ × ℝ => axisAngularCoefficient (G.flow.metric p.1) p.2) |
| 40 | (Ico 0 G.lifetime ×ˢ univ) := raw_axis_pair_contDiffOn G 0 |
| 41 | |
| 42 | theorem raw_axisRadialSpeed_contDiffOn : |
| 43 | ContDiffOn ℝ ∞ (fun p : ℝ × ℝ => axisRadialSpeed (G.flow.metric p.1) p.2) |
| 44 | (Ico 0 G.lifetime ×ˢ univ) := |
| 45 | (raw_axisRadialCoefficient_contDiffOn G).sqrt |
| 46 | (fun p _ => (axisRadialCoefficient_pos (G.flow.metric p.1) p.2).ne') |
| 47 | |
| 48 | theorem raw_axisWarpingRadius_contDiffOn : |
| 49 | ContDiffOn ℝ ∞ (fun p : ℝ × ℝ => axisWarpingRadius (G.flow.metric p.1) p.2) |
| 50 | (Ico 0 G.lifetime ×ˢ univ) := |
| 51 | contDiffOn_snd.mul ((raw_axisAngularCoefficient_contDiffOn G).sqrt |
| 52 | (fun p _ => (axisAngularCoefficient_pos (G.flow.metric p.1) p.2).ne')) |
| 53 | |
| 54 | /-- The literal radial-speed time derivative in the original coordinates. -/ |
| 55 | noncomputable def rawAxisSpeedTimeDerivative (t r : ℝ) : ℝ := |
| 56 | -(G.flow.connection t).ricci (r • e 2) (e 2) (e 2) / |
| 57 | axisRadialSpeed (G.flow.metric t) r |
| 58 | |
| 59 | theorem rawAxisSpeedTimeDerivative_contDiffOn : |
| 60 | ContDiffOn ℝ ∞ (Function.uncurry (rawAxisSpeedTimeDerivative G)) |
| 61 | (Ico 0 G.lifetime ×ˢ univ) := by |
| 62 | have hc : ContDiff ℝ ∞ (fun p : ℝ × ℝ => (p.1, p.2 • e 2)) := |
| 63 | contDiff_fst.prodMk (contDiff_snd.smul contDiff_const) |
| 64 | have hm : MapsTo (fun p : ℝ × ℝ => (p.1, p.2 • e 2)) |
| 65 | (Ico 0 G.lifetime ×ˢ univ) (Ico 0 G.lifetime ×ˢ univ) := |
| 66 | fun _ hp => ⟨hp.1, mem_univ _⟩ |
| 67 | have hr := (Heat.raw_ricci_pair_family_contDiffOn G.flow (e 2) (e 2)).comp |
| 68 | hc.contDiffOn hm |
| 69 | exact hr.neg.div (raw_axisRadialSpeed_contDiffOn G) |
| 70 | (fun p _ => (axisRadialSpeed_pos (G.flow.metric p.1) p.2).ne') |
| 71 | |
| 72 | /-- The raw equation gives this derivative also at the initial endpoint. -/ |
| 73 | theorem raw_axisRadialSpeed_hasDerivWithinAt {t : ℝ} (ht : t ∈ Ico 0 G.lifetime) |
| 74 | (r : ℝ) : HasDerivWithinAt (fun s => axisRadialSpeed (G.flow.metric s) r) |
| 75 | (rawAxisSpeedTimeDerivative G t r) (Ico 0 G.lifetime) t := by |
| 76 | have h := (G.flow.equation t ht (r • e 2) (e 2) (e 2)).sqrt |
| 77 | (axisRadialCoefficient_pos (G.flow.metric t) r).ne' |
| 78 | convert! h using 1 |
| 79 | change -(G.flow.connection t).ricci (r • e 2) (e 2) (e 2) / |
| 80 | Real.sqrt (axisRadialCoefficient (G.flow.metric t) r) = |
| 81 | -2 * (G.flow.connection t).ricci (r • e 2) (e 2) (e 2) / |
| 82 | (2 * Real.sqrt (axisRadialCoefficient (G.flow.metric t) r)) |
| 83 | field_simp [(Real.sqrt_pos.mpr (axisRadialCoefficient_pos (G.flow.metric t) r)).ne'] |
| 84 | |
| 85 | /-- The original-coordinate orbit radius has its actual Ricci time derivative. -/ |
| 86 | theorem raw_axisWarpingRadius_hasDerivWithinAt {t : ℝ} (ht : t ∈ Ico 0 G.lifetime) |
| 87 | (r : ℝ) : HasDerivWithinAt (fun s => axisWarpingRadius (G.flow.metric s) r) |
| 88 | (-r * (G.flow.connection t).ricci (r • e 2) (e 0) (e 0) / |
| 89 | Real.sqrt (axisAngularCoefficient (G.flow.metric t) r)) (Ico 0 G.lifetime) t := by |
| 90 | have h := ((G.flow.equation t ht (r • e 2) (e 0) (e 0)).sqrt |
| 91 | (axisAngularCoefficient_pos (G.flow.metric t) r).ne').const_mul r |
| 92 | convert! h using 1 |
| 93 | change -r * (G.flow.connection t).ricci (r • e 2) (e 0) (e 0) / |
| 94 | Real.sqrt (axisAngularCoefficient (G.flow.metric t) r) = |
| 95 | r * (-2 * (G.flow.connection t).ricci (r • e 2) (e 0) (e 0) / |
| 96 | (2 * Real.sqrt (axisAngularCoefficient (G.flow.metric t) r))) |
| 97 | field_simp [(Real.sqrt_pos.mpr (axisAngularCoefficient_pos (G.flow.metric t) r)).ne'] |
| 98 | |
| 99 | end PoincareMT.M35.Uniqueness |