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.Restriction |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Cylinder.CylinderChart |
| 3 | |
| 4 | /-! |
| 5 | # An actual ordinary slab on the fixed component carrier |
| 6 | |
| 7 | The cylinder compatibility fixes one spatial local diffeomorphism into |
| 8 | the actual slab. Its pullback includes both slab endpoints. |
| 9 | Source: Morgan--Tian, Definition 15.2 and pp. 393-394. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M47Positive |
| 21 | |
| 22 | /-- Pull an actual regular slab to the unchanged open source of a |
| 23 | compatible cylinder, with its literal metric values; MT pp. 393-394. -/ |
| 24 | theorem exists_component_slab_pullback |
| 25 | {F : SurgeryFlowData.{u}} {C : GeneralizedSliceCarrier.{u}} |
| 26 | {origin scale : ℝ} {I : Set ℝ} (U : TopologicalSpace.Opens C.carrier) |
| 27 | (e : SurgeryFlowCylinder F C origin scale I U) |
| 28 | {a b : ℝ} (hab : a < b) (hJ : Icc a b ⊆ F.time_domain) |
| 29 | (hfree : Disjoint F.surgery_times (Ioc a b)) |
| 30 | (r : ℝ) (hr : r ∈ I) (hr' : origin + r / scale ∈ Icc a b) : |
| 31 | ∃ G : RicciFlow 3 U (Icc a b), |
| 32 | ∀ (s : ℝ) (hs : s ∈ I) (_hs' : origin + s / scale ∈ Icc a b) |
| 33 | (x : U) (v w : TangentSpace (𝓡 3) x), |
| 34 | (F.metric (origin + s / scale)).inner (e.forward s hs x.val) |
| 35 | (mfderiv (𝓡 3) (𝓡 3) (fun y : U => e.forward s hs y.val) x v) |
| 36 | (mfderiv (𝓡 3) (𝓡 3) (fun y : U => e.forward s hs y.val) x w) = |
| 37 | (G.metric (origin + s / scale)).inner x v w := by |
| 38 | let S := F.regular_slabs a b hab hJ hfree |
| 39 | let phi : U → (F.slice a).carrier := |
| 40 | (S.identify ⟨origin + r / scale, hr'⟩).symm ∘ e.forward r hr ∘ Subtype.val |
| 41 | have hphi : IsLocalDiffeomorph (𝓡 3) (𝓡 3) ∞ phi := by |
| 42 | intro x |
| 43 | let d := (M44.cylinderSliceChart e U.isOpen r hr).trans |
| 44 | (S.identify ⟨origin + r / scale, hr'⟩).symm.toPartialDiffeomorph |
| 45 | exact (Poincare.isLocalDiffeomorph_opensSubtypeVal (𝓡 3) U x).comp |
| 46 | (𝓡 3) (F.slice a).carrier |
| 47 | (d.isLocalDiffeomorphAt (𝓡 3) (𝓡 3) ∞ ⟨x.property, mem_univ _⟩) |
| 48 | let G := S.flow.pullbackWithConnection phi hphi |
| 49 | (fun t => ((S.flow.metric t).pullbackOfLocalDiffeomorph phi hphi).leviCivitaData) |
| 50 | refine ⟨G, ?_⟩ |
| 51 | intro s hs hs' x v w |
| 52 | have heq : (fun y : U => e.forward s hs y.val) = |
| 53 | (S.identify ⟨origin + s / scale, hs'⟩) ∘ phi := by |
| 54 | funext y |
| 55 | exact (e.slab_compatibility a b hab hJ hfree r hr s hs hr' hs' |
| 56 | y.val y.property).symm |
| 57 | change (F.metric (origin + s / scale)).inner |
| 58 | ((fun y : U => e.forward s hs y.val) x) |
| 59 | (mfderiv (𝓡 3) (𝓡 3) (fun y : U => e.forward s hs y.val) x v) |
| 60 | (mfderiv (𝓡 3) (𝓡 3) (fun y : U => e.forward s hs y.val) x w) = |
| 61 | (S.flow.metric (origin + s / scale)).inner (phi x) |
| 62 | (mfderiv (𝓡 3) (𝓡 3) phi x v) (mfderiv (𝓡 3) (𝓡 3) phi x w) |
| 63 | rw [heq, mfderiv_comp x |
| 64 | ((S.identify ⟨origin + s / scale, hs'⟩).contMDiff.mdifferentiable (by simp) (phi x)) |
| 65 | (hphi.contMDiff.mdifferentiable (by simp) x)] |
| 66 | exact S.metric_pullback ⟨origin + s / scale, hs'⟩ (phi x) _ _ |
| 67 | |
| 68 | end PoincareMT.M47Positive |