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.ArclengthJointSmooth |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.RawFlow.Completeness |
| 4 | |
| 5 | /-! |
| 6 | # The actual inverse arclength family |
| 7 | |
| 8 | Morgan-Tian Section 12.6, pp. 309-313. Completeness constructs the |
| 9 | global signed inverse on each actual slice. The ordinary implicit |
| 10 | function theorem identifies its local family with a smooth inverse; |
| 11 | strict monotonicity makes this the same previously constructed inverse. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | namespace PoincareMT.M35.Uniqueness |
| 20 | |
| 21 | variable (P : RicciFlowCurvatureTheory.{0}) {g₀ : StandardInitialMetric} |
| 22 | (G : PartialStandardCapFlow g₀) |
| 23 | (hrotation : ∀ t ∈ Ico 0 G.lifetime, |
| 24 | ∀ A : Matrix.specialOrthogonalGroup (Fin 3) ℝ, ∀ x u v : StandardCapSpace, |
| 25 | (G.flow.metric t).inner (standardRotation A x) |
| 26 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x u) |
| 27 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x v) = (G.flow.metric t).inner x u v) |
| 28 | |
| 29 | /-- The actual global inverse at every valid time; the unused total |
| 30 | representative outside the raw lifetime is fixed at zero. -/ |
| 31 | noncomputable def rawInverseRadius (t s : ℝ) : ℝ := |
| 32 | if ht : t ∈ Ico 0 G.lifetime then |
| 33 | (radialArclengthOrderIso (G.flow.metric t) (hrotation t ht) (G.complete P ht)).symm s |
| 34 | else 0 |
| 35 | |
| 36 | theorem rawInverseRadius_eq {t : ℝ} (ht : t ∈ Ico 0 G.lifetime) (s : ℝ) : |
| 37 | rawInverseRadius P G hrotation t s = |
| 38 | (radialArclengthOrderIso (G.flow.metric t) (hrotation t ht) (G.complete P ht)).symm s := by |
| 39 | simp only [rawInverseRadius, dif_pos ht] |
| 40 | |
| 41 | theorem radialArclength_rawInverseRadius {t : ℝ} (ht : t ∈ Ico 0 G.lifetime) (s : ℝ) : |
| 42 | radialArclength (G.flow.metric t) (rawInverseRadius P G hrotation t s) = s := by |
| 43 | rw [rawInverseRadius_eq P G hrotation ht] |
| 44 | exact (radialArclengthOrderIso (G.flow.metric t) (hrotation t ht) |
| 45 | (G.complete P ht)).apply_symm_apply s |
| 46 | |
| 47 | theorem rawInverseRadius_radialArclength {t : ℝ} (ht : t ∈ Ico 0 G.lifetime) (r : ℝ) : |
| 48 | rawInverseRadius P G hrotation t (radialArclength (G.flow.metric t) r) = r := by |
| 49 | rw [rawInverseRadius_eq P G hrotation ht] |
| 50 | exact (radialArclengthOrderIso (G.flow.metric t) (hrotation t ht) |
| 51 | (G.complete P ht)).symm_apply_apply r |
| 52 | |
| 53 | theorem rawInverseRadius_pos {t s : ℝ} (ht : t ∈ Ico 0 G.lifetime) (hs : 0 < s) : |
| 54 | 0 < rawInverseRadius P G hrotation t s := by |
| 55 | rw [rawInverseRadius_eq P G hrotation ht] |
| 56 | exact radialArclengthOrderIso_symm_pos (G.flow.metric t) (hrotation t ht) (G.complete P ht) hs |
| 57 | |
| 58 | /-- The same actual inverse coordinate is jointly smooth in time and |
| 59 | signed intrinsic radius on the interior of the raw lifetime. -/ |
| 60 | theorem rawInverseRadius_contDiffAt {p : ℝ × ℝ} (hp : p.1 ∈ Ioo 0 G.lifetime) : |
| 61 | ContDiffAt ℝ ∞ (Function.uncurry (rawInverseRadius P G hrotation)) p := by |
| 62 | have hpG : p.1 ∈ Ico 0 G.lifetime := ⟨hp.1.le, hp.2⟩ |
| 63 | let r := rawInverseRadius P G hrotation p.1 p.2 |
| 64 | let H (z : (ℝ × ℝ) × ℝ) := radialArclength (G.flow.metric z.1.1) z.2 - z.1.2 |
| 65 | have hH : ContDiffAt ℝ ∞ H (p, r) := |
| 66 | ((raw_radialArclength_contDiffAt G (p := (p.1, r)) hp).comp (p, r) |
| 67 | (contDiffAt_fst.fst.prodMk contDiffAt_snd)).sub contDiffAt_fst.snd |
| 68 | have hvalue : H (p, r) = 0 := by |
| 69 | dsimp only [H, r] |
| 70 | rw [radialArclength_rawInverseRadius P G hrotation hpG, sub_self] |
| 71 | let b := Real.sqrt (axisRadialCoefficient (G.flow.metric p.1) r) |
| 72 | have hb : b ≠ 0 := (Real.sqrt_pos.mpr |
| 73 | (axisRadialCoefficient_pos (G.flow.metric p.1) r)).ne' |
| 74 | have hpart : fderiv ℝ H (p, r) ∘L ContinuousLinearMap.inr ℝ (ℝ × ℝ) ℝ = |
| 75 | ContinuousLinearMap.toSpanSingleton ℝ b := by |
| 76 | have hd := (hH.differentiableAt (by simp)).hasFDerivAt.comp r |
| 77 | (hasFDerivAt_prodMk_right p r) |
| 78 | have hs : HasDerivAt (fun a => H (p, a)) b r := |
| 79 | (radialArclength_hasDerivAt (G.flow.metric p.1) r).sub_const p.2 |
| 80 | exact hd.unique hs.hasFDerivAt |
| 81 | have hinv : (fderiv ℝ H (p, r) ∘L ContinuousLinearMap.inr ℝ (ℝ × ℝ) ℝ).IsInvertible := by |
| 82 | rw [hpart] |
| 83 | apply ContinuousLinearMap.IsInvertible.of_inverse |
| 84 | (g := ContinuousLinearMap.toSpanSingleton ℝ b⁻¹) |
| 85 | · apply ContinuousLinearMap.ext |
| 86 | intro a |
| 87 | simp only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.toSpanSingleton_apply, |
| 88 | smul_eq_mul, ContinuousLinearMap.id_apply] |
| 89 | field_simp [hb] |
| 90 | · apply ContinuousLinearMap.ext |
| 91 | intro a |
| 92 | simp only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.toSpanSingleton_apply, |
| 93 | smul_eq_mul, ContinuousLinearMap.id_apply] |
| 94 | field_simp [hb] |
| 95 | let q := hH.implicitFunction (by simp) hinv |
| 96 | have hq : ContDiffAt ℝ ∞ q p := hH.contDiffAt_implicitFunction (by simp) hinv |
| 97 | have heq : ∀ᶠ z in 𝓝 p, H (z, q z) = 0 := by |
| 98 | simpa only [hvalue] using hH.eventually_apply_implicitFunction (by simp) hinv |
| 99 | have htime : ∀ᶠ z : ℝ × ℝ in 𝓝 p, z.1 ∈ Ioo 0 G.lifetime := |
| 100 | continuous_fst.continuousAt.eventually (isOpen_Ioo.mem_nhds hp) |
| 101 | apply hq.congr_of_eventuallyEq |
| 102 | filter_upwards [heq, htime] with z hz hzt |
| 103 | have hztG : z.1 ∈ Ico 0 G.lifetime := ⟨hzt.1.le, hzt.2⟩ |
| 104 | apply (radialArclength_strictMono (G.flow.metric z.1)).injective |
| 105 | dsimp only [Function.uncurry] |
| 106 | rw [radialArclength_rawInverseRadius P G hrotation hztG] |
| 107 | change radialArclength (G.flow.metric z.1) (q z) - z.2 = 0 at hz |
| 108 | exact (sub_eq_zero.mp hz).symm |
| 109 | |
| 110 | theorem rawInverseRadius_contDiffOn : |
| 111 | ContDiffOn ℝ ∞ (Function.uncurry (rawInverseRadius P G hrotation)) |
| 112 | (Ioo 0 G.lifetime ×ˢ univ) := |
| 113 | fun _ hq => (rawInverseRadius_contDiffAt P G hrotation hq.1).contDiffWithinAt |
| 114 | |
| 115 | end PoincareMT.M35.Uniqueness |