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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Persistence.NeckGeometry.CapturedCylinderJets |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Analysis.FiniteHessian.PullbackTails |
| 4 | |
| 5 | /-! |
| 6 | # Actual captured metric errors on source tails |
| 7 | |
| 8 | The source and limit coefficient identities hold on the same open germ. |
| 9 | Their difference is the bilinear pullback of the atlas error. Uniform |
| 10 | finite atlas errors and actual captured-map bounds therefore give small |
| 11 | jets of the literal pulled-back metric difference on one common tail. |
| 12 | Source: Morgan--Tian Proposition 10.7, p. 253; M28 derivation 106. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Topology |
| 20 | |
| 21 | universe u v |
| 22 | |
| 23 | namespace PoincareMT.Proofs.M28.NeckTransfer |
| 24 | |
| 25 | open PoincareMT.M28.tube FiniteHessian |
| 26 | |
| 27 | variable {M : Type u} [TopologicalSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 29 | |
| 30 | /-- The literal metric error equals the pullback of the atlas error on |
| 31 | an open neighborhood before differentiation. Source: Proposition 10.7, |
| 32 | p. 253; M28 derivation 106. -/ |
| 33 | theorem capturedCylinderCoordinates_error_germ |
| 34 | {X : Type v} [TopologicalSpace X] |
| 35 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) X] [IsManifold (𝓡 3) ∞ X] |
| 36 | {h : RiemannianMetric 3 X} (g : RiemannianMetric 3 M) (gX : RiemannianMetric 3 X) |
| 37 | (e : PartialDiffeomorph (𝓡 3) (𝓡 3) M X ∞) (N : EpsilonNeck h) |
| 38 | (hcapture : N.carrier ⊆ e.target) (q : UnitTwoSphere) {s : ℝ} (p : M) |
| 39 | (hs : s ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹) |
| 40 | (hp : e.symm (N.coordinate_map (q, s)) ∈ (extChartAt (𝓡 3) p).source) : |
| 41 | (fun x => g.pullbackCoefficients (capturedCylinderMap e N q s) x - |
| 42 | gX.pullbackCoefficients (cylinderNeckChart N q s) x) =ᶠ[𝓝 0] |
| 43 | (fun x => (g.pullbackCoefficients (extChartAt (𝓡 3) p).symm |
| 44 | (capturedCylinderCoordinates e N q s p x) - |
| 45 | gX.pullbackCoefficients (e ∘ (extChartAt (𝓡 3) p).symm) |
| 46 | (capturedCylinderCoordinates e N q s p x)).bilinearComp |
| 47 | (fderiv ℝ (capturedCylinderCoordinates e N q s p) x) |
| 48 | (fderiv ℝ (capturedCylinderCoordinates e N q s p) x)) := by |
| 49 | filter_upwards [(isOpen_capturedCylinderChartDomain e N hcapture q s p).mem_nhds |
| 50 | (zero_mem_capturedCylinderChartDomain e N q hs p hp)] with x hx |
| 51 | rw [capturedCylinderCoordinates_limit_coefficients g e N hcapture q s p hx, |
| 52 | capturedCylinderCoordinates_source_coefficients gX e N hcapture q s p hx] |
| 53 | ext v w |
| 54 | rfl |
| 55 | |
| 56 | /-- Uniform finite atlas convergence controls the actual captured metric |
| 57 | error, using only finite derivatives of the guarded coordinate maps. |
| 58 | No limiting neck comparison is an input. Source: Proposition 10.7, |
| 59 | p. 253; M28 derivation 106. -/ |
| 60 | theorem exists_capturedCylinder_metric_error_tail |
| 61 | {ι : Type*} {X : ι → Type v} [∀ i, TopologicalSpace (X i)] |
| 62 | [∀ i, ChartedSpace (EuclideanSpace ℝ (Fin 3)) (X i)] |
| 63 | [∀ i, IsManifold (𝓡 3) ∞ (X i)] |
| 64 | {h : ∀ i, RiemannianMetric 3 (X i)} (g : RiemannianMetric 3 M) |
| 65 | (gX : ∀ i, RiemannianMetric 3 (X i)) |
| 66 | (e : ∀ i, PartialDiffeomorph (𝓡 3) (𝓡 3) M (X i) ∞) |
| 67 | (N : ∀ i, EpsilonNeck (h i)) (hcapture : ∀ i, (N i).carrier ⊆ (e i).target) |
| 68 | (q : ι → UnitTwoSphere) (s : ι → ℝ) (p : ι → M) |
| 69 | (hs : ∀ i, s i ∈ Ioo (-(N i).epsilon⁻¹) (N i).epsilon⁻¹) |
| 70 | (hp : ∀ i, (e i).symm ((N i).coordinate_map (q i, s i)) ∈ |
| 71 | (extChartAt (𝓡 3) (p i)).source) (m : ℕ) (stage : ι → ℕ) |
| 72 | (hmap : HasUniformJetBoundsAt m |
| 73 | (fun i => fderiv ℝ (capturedCylinderCoordinates (e i) (N i) (q i) (s i) (p i))) |
| 74 | (fun _ => 0)) |
| 75 | (herror : ∀ delta : ℝ, 0 < delta → ∃ K : ℕ, ∀ i, K ≤ stage i → |
| 76 | ∀ r ≤ m, ‖iteratedFDeriv ℝ r |
| 77 | ((gX i).pullbackCoefficients ((e i) ∘ (extChartAt (𝓡 3) (p i)).symm)) |
| 78 | (capturedCylinderCoordinates (e i) (N i) (q i) (s i) (p i) 0) - |
| 79 | iteratedFDeriv ℝ r (g.pullbackCoefficients (extChartAt (𝓡 3) (p i)).symm) |
| 80 | (capturedCylinderCoordinates (e i) (N i) (q i) (s i) (p i) 0)‖ ≤ delta) : |
| 81 | ∀ rho : ℝ, 0 < rho → ∃ K : ℕ, ∀ i, K ≤ stage i → ∀ r ≤ m, |
| 82 | ‖iteratedFDeriv ℝ r (fun x => |
| 83 | g.pullbackCoefficients (capturedCylinderMap (e i) (N i) (q i) (s i)) x - |
| 84 | (gX i).pullbackCoefficients (cylinderNeckChart (N i) (q i) (s i)) x) 0‖ ≤ rho := by |
| 85 | let psi := fun i => capturedCylinderCoordinates (e i) (N i) (q i) (s i) (p i) |
| 86 | let B := fun i => (gX i).pullbackCoefficients ((e i) ∘ (extChartAt (𝓡 3) (p i)).symm) |
| 87 | let L := fun i => g.pullbackCoefficients (extChartAt (𝓡 3) (p i)).symm |
| 88 | have hzero (i : ι) := |
| 89 | zero_mem_capturedCylinderChartDomain (e i) (N i) (q i) (hs i) (p i) (hp i) |
| 90 | have hpsi (i : ι) : ContDiffAt ℝ ∞ (psi i) 0 := |
| 91 | (contDiffOn_capturedCylinderCoordinates (e i) (N i) (hcapture i) |
| 92 | (q i) (s i) (p i)).contDiffAt |
| 93 | ((isOpen_capturedCylinderChartDomain (e i) (N i) (hcapture i) |
| 94 | (q i) (s i) (p i)).mem_nhds (hzero i)) |
| 95 | have hB (i : ι) : ContDiffAt ℝ ∞ (B i) (psi i 0) := |
| 96 | (capturedCylinderCoordinates_atlas_regular (gX i) (e i) (N i) (hcapture i) |
| 97 | (q i) (s i) (p i) (hzero i)).1 |
| 98 | have hL (i : ι) : ContDiffAt ℝ ∞ (L i) (psi i 0) := |
| 99 | g.contDiffAt_pullbackCoefficients ((contMDiffOn_extChartAt_symm (p i)).contMDiffAt |
| 100 | ((isOpen_extChartAt_target (p i)).mem_nhds |
| 101 | ((extChartAt (𝓡 3) (p i)).map_source (hzero i).2))) |
| 102 | have hE : ∀ delta : ℝ, 0 < delta → ∃ K : ℕ, ∀ i, K ≤ stage i → |
| 103 | ∀ r ≤ m, ‖iteratedFDeriv ℝ r (fun y => L i y - B i y) (psi i 0)‖ ≤ delta := by |
| 104 | intro delta hdelta |
| 105 | obtain ⟨K, hK⟩ := herror delta hdelta |
| 106 | refine ⟨K, fun i hi r hr => ?_⟩ |
| 107 | change ‖iteratedFDeriv ℝ r (L i - B i) (psi i 0)‖ ≤ delta |
| 108 | rw [iteratedFDeriv_sub_apply |
| 109 | ((hL i).of_le (by exact_mod_cast le_top)) |
| 110 | ((hB i).of_le (by exact_mod_cast le_top)), norm_sub_rev] |
| 111 | exact hK i hi r hr |
| 112 | have htail := exists_bilinear_pullback_error_tail m stage hmap hpsi |
| 113 | (fun i => (hL i).sub (hB i)) hE |
| 114 | intro rho hrho |
| 115 | obtain ⟨K, hK⟩ := htail rho hrho |
| 116 | refine ⟨K, fun i hi r hr => ?_⟩ |
| 117 | rw [((capturedCylinderCoordinates_error_germ g (gX i) (e i) (N i) (hcapture i) |
| 118 | (q i) (p i) (hs i) (hp i)).iteratedFDeriv ℝ r).eq_of_nhds] |
| 119 | exact hK i hi r hr |
| 120 | |
| 121 | end PoincareMT.Proofs.M28.NeckTransfer |