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.Existence.Lifetime.CanonicalGeometry.CapPersistenceCylinderPullback |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Lifetime.CanonicalGeometry.StrongNeckLocality |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.CanonicalGeometry.CapNeckNormalizationModel |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.Geometry |
| 5 | |
| 6 | /-! |
| 7 | # Smooth actual captured cylinder tensors without an auxiliary model |
| 8 | |
| 9 | The literal inverse sphere chart is smooth, and its actual derivative |
| 10 | computes the frozen coefficients. This proves the full open-domain |
| 11 | smoothness required by cap neck normalization. |
| 12 | Source: Morgan--Tian Proposition 9.79(3), p. 234, and Theorem 12.28, |
| 13 | pp. 323-324; cap-persistence-implementation.md, section 3. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Topology |
| 21 | |
| 22 | namespace PoincareMT.M34 |
| 23 | |
| 24 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 25 | normedSpaceTangentSpaceVectorSpace |
| 26 | |
| 27 | local notation "E₂" => EuclideanSpace ℝ (Fin 2) |
| 28 | local notation "Ic" => ModelWithCorners.prod (𝓡 2) 𝓘(ℝ, ℝ) |
| 29 | |
| 30 | /-- Smooth actual coordinates give the full frozen cylinder-coefficient |
| 31 | smoothness predicate, using the actual chosen sphere-chart derivative. -/ |
| 32 | theorem capPersistence_roundCylinderTensorSmoothOn_pullback |
| 33 | {M : Type*} [TopologicalSpace M] |
| 34 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 35 | (g : RiemannianMetric 3 M) {epsilon : ℝ} {f : RoundCylinderSpace → M} |
| 36 | (hf : ContMDiffOn Ic (𝓡 3) ∞ f (univ ×ˢ Ioo (-epsilon⁻¹) epsilon⁻¹)) : |
| 37 | RoundCylinderTensorSmoothOn epsilon (roundCylinderPullback g f) := by |
| 38 | let : Fact (Module.finrank ℝ (EuclideanSpace ℝ (Fin 3)) = 2 + 1) := ⟨by simp⟩ |
| 39 | intro q a b x hx |
| 40 | let ψ : RoundCylinderCoordinates → RoundCylinderSpace := fun y => |
| 41 | ((chartAt E₂ q).symm y.1, y.2) |
| 42 | have hψ : ContMDiff 𝓘(ℝ, RoundCylinderCoordinates) Ic ∞ ψ := |
| 43 | ((contMDiff_sphere_chart_symm (n := 2) (m := ∞) q).comp |
| 44 | (ContinuousLinearMap.fst ℝ E₂ ℝ).contMDiff).prodMk |
| 45 | (ContinuousLinearMap.snd ℝ E₂ ℝ).contMDiff |
| 46 | let U : Set RoundCylinderSpace := univ ×ˢ Ioo (-epsilon⁻¹) epsilon⁻¹ |
| 47 | have hU : IsOpen U := isOpen_univ.prod isOpen_Ioo |
| 48 | have hfx : ContMDiffAt Ic (𝓡 3) ∞ f (ψ x) := |
| 49 | hf.contMDiffAt (hU.mem_nhds ⟨mem_univ _, hx.2⟩) |
| 50 | let φ := f ∘ ψ |
| 51 | have hφ : ContMDiffAt 𝓘(ℝ, RoundCylinderCoordinates) (𝓡 3) ∞ φ x := |
| 52 | hfx.comp x (hψ x) |
| 53 | have hscalar : ContDiffAt ℝ ∞ (fun y => |
| 54 | g.inner (φ y) (mfderiv 𝓘(ℝ, RoundCylinderCoordinates) (𝓡 3) φ y |
| 55 | (roundCylinderCoordinateBasis a)) |
| 56 | (mfderiv 𝓘(ℝ, RoundCylinderCoordinates) (𝓡 3) φ y |
| 57 | (roundCylinderCoordinateBasis b))) x := |
| 58 | by |
| 59 | have hg := (g.contMDiff (φ x)).comp x hφ |
| 60 | have h := hg.clm_bundle_apply₂ (F₃ := ℝ) (E₃ := Bundle.Trivial M ℝ) |
| 61 | (RiemannianMetric.contMDiffAt_mfderiv_const_vector hφ (roundCylinderCoordinateBasis a)) |
| 62 | (RiemannianMetric.contMDiffAt_mfderiv_const_vector hφ (roundCylinderCoordinateBasis b)) |
| 63 | apply contMDiffAt_iff_contDiffAt.mp |
| 64 | simpa using (Bundle.contMDiffAt_totalSpace.mp h).2 |
| 65 | have heq : (fun y => roundCylinderTensorCoefficient (roundCylinderPullback g f) |
| 66 | (chartAt E₂ q) y a b) =ᶠ[𝓝 x] (fun y => |
| 67 | g.inner (φ y) (mfderiv 𝓘(ℝ, RoundCylinderCoordinates) (𝓡 3) φ y |
| 68 | (roundCylinderCoordinateBasis a)) |
| 69 | (mfderiv 𝓘(ℝ, RoundCylinderCoordinates) (𝓡 3) φ y |
| 70 | (roundCylinderCoordinateBasis b))) := by |
| 71 | have hnear := hψ.continuous.continuousAt.preimage_mem_nhds |
| 72 | (hU.mem_nhds (show ψ x ∈ U from ⟨mem_univ _, hx.2⟩)) |
| 73 | filter_upwards [hnear] with y hy |
| 74 | have hfy := (hf.contMDiffAt (hU.mem_nhds hy)).mdifferentiableAt (by simp) |
| 75 | have hcs := ((contMDiff_sphere_chart_symm (n := 2) (m := ∞) q) y.1).mdifferentiableAt |
| 76 | (by simp) |
| 77 | let A := ContinuousLinearMap.fst ℝ E₂ ℝ |
| 78 | let B := ContinuousLinearMap.snd ℝ E₂ ℝ |
| 79 | have ha := hcs.comp y A.mdifferentiableAt |
| 80 | have hb := B.mdifferentiableAt (x := y) |
| 81 | have hpair : mfderiv 𝓘(ℝ, RoundCylinderCoordinates) Ic ψ y = |
| 82 | ((mfderiv (𝓡 2) (𝓡 2) (chartAt E₂ q).symm y.1).comp A).prod B := by |
| 83 | calc |
| 84 | _ = (mfderiv 𝓘(ℝ, RoundCylinderCoordinates) (𝓡 2) |
| 85 | ((chartAt E₂ q).symm ∘ A) y).prod |
| 86 | (mfderiv 𝓘(ℝ, RoundCylinderCoordinates) 𝓘(ℝ, ℝ) B y) := |
| 87 | mfderiv_prodMk ha hb |
| 88 | _ = _ := congrArg₂ (fun L K => L.prod K) |
| 89 | ((mfderiv_comp y hcs A.mdifferentiableAt).trans |
| 90 | (congrArg (fun L => (mfderiv (𝓡 2) (𝓡 2) |
| 91 | (chartAt E₂ q).symm y.1).comp L) A.mfderiv_eq)) B.mfderiv_eq |
| 92 | have hd : ∀ v : RoundCylinderCoordinates, |
| 93 | mfderiv 𝓘(ℝ, RoundCylinderCoordinates) (𝓡 3) φ y v = |
| 94 | mfderiv Ic (𝓡 3) f (ψ y) |
| 95 | (mfderiv (𝓡 2) (𝓡 2) (chartAt E₂ q).symm y.1 v.1, v.2) := by |
| 96 | intro v |
| 97 | have hh : mfderiv 𝓘(ℝ, RoundCylinderCoordinates) (𝓡 3) φ y = |
| 98 | (mfderiv Ic (𝓡 3) f (ψ y)).comp |
| 99 | (mfderiv 𝓘(ℝ, RoundCylinderCoordinates) Ic ψ y) := |
| 100 | mfderiv_comp y hfy (ha.prodMk hb) |
| 101 | exact congrArg (fun L => L v) (hh.trans |
| 102 | (congrArg (fun L => (mfderiv Ic (𝓡 3) f (ψ y)).comp L) hpair)) |
| 103 | rw [hd, hd] |
| 104 | rfl |
| 105 | exact (hscalar.congr_of_eventuallyEq heq).contDiffWithinAt |
| 106 | |
| 107 | /-- Captured actual generalized pullbacks satisfy full frozen |
| 108 | coefficient smoothness at every included time, including zero. -/ |
| 109 | theorem capPersistence_generalizedCylinderPullback_smooth |
| 110 | {G : GeneralizedRicciFlowData} {C : GeneralizedSliceCarrier} |
| 111 | {origin scale : ℝ} {K : Set ℝ} {U : Set C.carrier} |
| 112 | (e : GeneralizedFlowCylinder G C origin scale K U) (hU : IsOpen U) |
| 113 | {epsilon : ℝ} {f : RoundCylinderSpace → C.carrier} |
| 114 | (hf : ContMDiffOn Ic (𝓡 3) ∞ f (univ ×ˢ Ioo (-epsilon⁻¹) epsilon⁻¹)) |
| 115 | (hcap : MapsTo f (univ ×ˢ Ioo (-epsilon⁻¹) epsilon⁻¹) U) |
| 116 | {s : ℝ} (hs : s ∈ K) : |
| 117 | RoundCylinderTensorSmoothOn epsilon (generalizedCylinderPullback e f s) := by |
| 118 | have hcomp := (e.forward_smooth s hs).comp hf hcap |
| 119 | have hb := (capPersistence_roundCylinderTensorSmoothOn_pullback |
| 120 | (G.metric (origin + s / scale)) hcomp).const_mul (beta := scale) |
| 121 | apply hb.congr_cylinder |
| 122 | intro z hz v w |
| 123 | have hφ := (hf.contMDiffAt |
| 124 | ((isOpen_univ.prod isOpen_Ioo).mem_nhds ⟨mem_univ _, hz⟩)).mdifferentiableAt (by simp) |
| 125 | have he := ((e.forward_smooth s hs).contMDiffAt |
| 126 | (hU.mem_nhds (hcap ⟨mem_univ _, hz⟩))).mdifferentiableAt (by simp) |
| 127 | simp only [generalizedCylinderPullback, dif_pos hs, roundCylinderPullback] |
| 128 | rw [mfderiv_comp z he hφ] |
| 129 | rfl |
| 130 | |
| 131 | end PoincareMT.M34 |