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.Induction.EpochExtension.Extension.ExtensionMetric |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Canonical.StaticNeck |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Canonical.StaticCap |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Canonical.StaticComponents |
| 5 | |
| 6 | /-! |
| 7 | # Old canonical neighborhoods under the actual flow extension |
| 8 | |
| 9 | Morgan--Tian Definitions 9.72, 9.75 and 9.78, pp. 230--232, and |
| 10 | Definition 15.8, p. 362. The same neck cylinder, cap, component or round |
| 11 | model is transported by the displayed slice isometry. No new-time |
| 12 | canonical estimate is asserted. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.SurgeryFlowExtension |
| 24 | |
| 25 | variable {F : SurgeryFlowData.{u}} (E : SurgeryFlowExtension F) |
| 26 | |
| 27 | noncomputable def strongNeck (m13 : GeneralizedParabolicRescalingTheory.{u} 3) |
| 28 | (t : ℝ) (ht : t ∈ F.time_domain) {epsilon : ℝ} |
| 29 | (N : SurgeryStrongNeck F t epsilon) : SurgeryStrongNeck E.extended t epsilon := by |
| 30 | let e := (E.identify t ht).symm |
| 31 | let K := N.neck.m48_pullback (E.metric_homothety_symm t ht) |
| 32 | (E.metric_calculus_symm m13 t ht) (E.extended.connection t) |
| 33 | let d := E.pushCylinder N.cylinder |
| 34 | let c := d.rebaseSource e |
| 35 | have hcoord (z : RoundCylinderSpace) |
| 36 | (hz : z.2 ∈ Ioo (-N.neck.epsilon⁻¹) N.neck.epsilon⁻¹) : |
| 37 | N.neck.coordinate_map z ∈ N.neck.carrier := by |
| 38 | have h := N.neck.coordinate_map_eq (z.1, ⟨z.2, hz⟩) |
| 39 | exact h ▸ (N.neck.coordinate (z.1, ⟨z.2, hz⟩)).property |
| 40 | have hterminal : ∀ h x, x ∈ K.carrier → HEq (c.forward 0 h x) x := by |
| 41 | intro h x hx |
| 42 | have hz := E.identify_heq (N.cylinder.time_subset ⟨0, h, rfl⟩) ht |
| 43 | (by simp) (N.terminal_identity h (e x) hx) |
| 44 | change HEq (c.forward 0 h x) ((E.identify t ht) (e x)) at hz |
| 45 | simpa only [e, Diffeomorph.apply_symm_apply] using hz |
| 46 | have hcomparison : RoundCylinderFamilyClose epsilon (Ioc (-1 : ℝ) 0) |
| 47 | (surgeryCylinderPullback c K.coordinate_map) := by |
| 48 | apply RoundCylinderFamilyClose.congr |
| 49 | (B' := surgeryCylinderPullback N.cylinder N.neck.coordinate_map) ?_ |
| 50 | N.metric_comparison |
| 51 | intro s hs z hz v w |
| 52 | have hz : z.2 ∈ Ioo (-N.neck.epsilon⁻¹) N.neck.epsilon⁻¹ := by |
| 53 | simpa only [N.epsilon_eq] using hz |
| 54 | have hmem : e (K.coordinate_map z) ∈ N.neck.carrier := by |
| 55 | change e (e.symm (N.neck.coordinate_map z)) ∈ N.neck.carrier |
| 56 | rw [e.apply_symm_apply] |
| 57 | exact hcoord z hz |
| 58 | have hdiff := (K.coordinate_map_smooth.contMDiffAt |
| 59 | ((isOpen_univ.prod isOpen_Ioo).mem_nhds ⟨mem_univ _, hz⟩)).mdifferentiableAt |
| 60 | (by simp) |
| 61 | have hcomp : e ∘ K.coordinate_map = N.neck.coordinate_map := by |
| 62 | funext z |
| 63 | exact e.apply_symm_apply _ |
| 64 | have hd : (mfderiv (𝓡 3) (𝓡 3) e (K.coordinate_map z)).comp |
| 65 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) K.coordinate_map z) = |
| 66 | mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) N.neck.coordinate_map z := by |
| 67 | rw [← mfderiv_comp z (e.contMDiff.mdifferentiable (by simp) _) hdiff, hcomp] |
| 68 | have hv (v : RoundCylinderTangent z) : |
| 69 | mfderiv (𝓡 3) (𝓡 3) e (K.coordinate_map z) |
| 70 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) K.coordinate_map z v) = |
| 71 | mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) N.neck.coordinate_map z v := |
| 72 | congrArg (fun A => A v) hd |
| 73 | simp only [surgeryCylinderPullback, dif_pos hs] |
| 74 | rw [d.rebaseSource_pullbackInner e N.neck.carrier_open s hs |
| 75 | (K.coordinate_map z) hmem, hv v, hv w] |
| 76 | change d.pullbackInner s hs (e (e.symm (N.neck.coordinate_map z))) _ _ = _ |
| 77 | rw [e.apply_symm_apply] |
| 78 | exact E.pushCylinder_pullbackInner N.cylinder N.neck.carrier_open s hs |
| 79 | (N.neck.coordinate_map z) (hcoord z hz) _ _ |
| 80 | exact ⟨K, N.epsilon_eq, rfl, c, hterminal, hcomparison⟩ |
| 81 | |
| 82 | theorem strongNeck_center (m13 : GeneralizedParabolicRescalingTheory.{u} 3) |
| 83 | (t : ℝ) (ht : t ∈ F.time_domain) {epsilon : ℝ} |
| 84 | (N : SurgeryStrongNeck F t epsilon) : |
| 85 | (E.strongNeck m13 t ht N).neck.center = E.identify t ht N.neck.center := rfl |
| 86 | |
| 87 | theorem canonical_control (m13 : GeneralizedParabolicRescalingTheory.{u} 3) |
| 88 | (t : ℝ) (ht : t ∈ F.time_domain) (x : (F.slice t).carrier) (epsilon C : ℝ) |
| 89 | (h : SurgeryCanonicalControl F t x epsilon C) : |
| 90 | SurgeryCanonicalControl E.extended t (E.identify t ht x) epsilon C := by |
| 91 | let e := (E.identify t ht).symm |
| 92 | have he : MetricHomothety (E.extended.metric t) (F.metric t) e 1 := |
| 93 | E.metric_homothety_symm t ht |
| 94 | have H : MetricHomothetyCalculus (E.extended.metric t) (F.metric t) e 1 := |
| 95 | E.metric_calculus_symm m13 t ht |
| 96 | cases h with |
| 97 | | neck N hcenter => |
| 98 | exact .neck (E.strongNeck m13 t ht N) |
| 99 | ((E.strongNeck_center m13 t ht N).trans (congrArg (E.identify t ht) hcenter)) |
| 100 | | cap N hepsilon hconstant _ hcore => |
| 101 | refine .cap (N.m48_pullback he H (E.extended.connection t)) hepsilon hconstant rfl ?_ |
| 102 | change (E.identify t ht).symm (E.identify t ht x) ∈ N.core |
| 103 | simpa only [Diffeomorph.symm_apply_apply] using hcore |
| 104 | | component N hmem => |
| 105 | refine .component (N.m48_pullback he H (E.extended.connection t)) ?_ |
| 106 | change (E.identify t ht).symm (E.identify t ht x) ∈ N.carrier |
| 107 | simpa only [Diffeomorph.symm_apply_apply] using hmem |
| 108 | | round N hmem => |
| 109 | refine .round (N.m48_pullback he) ?_ |
| 110 | change (E.identify t ht).symm (E.identify t ht x) ∈ N.carrier |
| 111 | simpa only [Diffeomorph.symm_apply_apply] using hmem |
| 112 | |
| 113 | end PoincareMT.SurgeryFlowExtension |