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.Extinction.Width.Transport.SliceBuilder |
| 2 | import PoincareLib.Geometry.RicciFlow.Extinction.Width.Transport.ComponentRestriction |
| 3 | import PoincareLib.Geometry.RicciFlow.Extinction.Width.Path.InitialClass |
| 4 | |
| 5 | set_option autoImplicit false |
| 6 | |
| 7 | open scoped Manifold ContDiff Bundle Topology |
| 8 | |
| 9 | universe u |
| 10 | |
| 11 | namespace PoincareMT |
| 12 | |
| 13 | /-- The initial width slice retains the supplied metric and based class. -/ |
| 14 | noncomputable def m67InitialWidthSlice |
| 15 | (S : M59IdentificationSystem.{u}) |
| 16 | {A : GeneralizedSliceCarrier.{u}} (C : SurgerySelectedComponent A) |
| 17 | (g : RiemannianMetric 3 A.carrier) |
| 18 | (initial : M67InitialClassData S C g) : M67WidthSlice S.quotient C := |
| 19 | m67WidthSliceOfClass S C g initial.metric initial.metric.leviCivitaData |
| 20 | initial.metric_pullback initial.pi_two_trivial initial.alpha initial.nonzero |
| 21 | |
| 22 | /-- A class on a later slice is equipped with the actual induced metric. -/ |
| 23 | noncomputable def m67ActualWidthSlice |
| 24 | (S : M59IdentificationSystem.{u}) |
| 25 | {A : GeneralizedSliceCarrier.{u}} (C : SurgerySelectedComponent A) |
| 26 | (g : RiemannianMetric 3 A.carrier) |
| 27 | (hpi : Subsingleton (HomotopyGroup.Pi 2 C.carrier.carrier C.basepoint)) |
| 28 | (alpha : HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := C.carrier.carrier)) |
| 29 | (constantC1Loop C.basepoint)) |
| 30 | (hnonzero : (S.core C.compact C.connected C.basepoint hpi).pi_two_pi_three |
| 31 | alpha ≠ 1) : M67WidthSlice S.quotient C := |
| 32 | let gC := g.pullbackOfLocalDiffeomorph C.inclusion |
| 33 | (selectedComponentInclusionLocalDiffeomorph C) |
| 34 | m67WidthSliceOfClass S C g gC gC.leviCivitaData (fun _ _ _ => rfl) |
| 35 | hpi alpha hnonzero |
| 36 | |
| 37 | theorem M67WidthSlice.scalarCurvature_eq_ambient |
| 38 | {q : M59SphereQuotient} |
| 39 | {A : GeneralizedSliceCarrier.{u}} {C : SurgerySelectedComponent A} |
| 40 | (slice : M67WidthSlice q C) (D : LeviCivitaData slice.ambient_metric) |
| 41 | (x : C.carrier.carrier) : |
| 42 | slice.connection.scalarCurvature x = D.scalarCurvature (C.inclusion x) := by |
| 43 | exact slice.connection.scalarCurvature_eq_of_local_isometry D |
| 44 | isOpen_univ C.inclusion_smooth.contMDiffOn |
| 45 | (fun y _ v w => (slice.metric_pullback y v w).symm) (Set.mem_univ x) |
| 46 | |
| 47 | theorem M67WidthSlice.scalar_infimum_lower_bound |
| 48 | {q : M59SphereQuotient} |
| 49 | {A : GeneralizedSliceCarrier.{u}} {C : SurgerySelectedComponent A} |
| 50 | (slice : M67WidthSlice q C) (D : LeviCivitaData slice.ambient_metric) |
| 51 | {r : ℝ} (hr : ∀ x : A.carrier, r ≤ D.scalarCurvature x) : |
| 52 | r ≤ sInf (Set.range slice.connection.scalarCurvature) := by |
| 53 | have hne : (Set.range slice.connection.scalarCurvature).Nonempty := |
| 54 | ⟨_, C.basepoint, rfl⟩ |
| 55 | apply le_csInf hne |
| 56 | rintro _ ⟨x, rfl⟩ |
| 57 | rw [slice.scalarCurvature_eq_ambient D x] |
| 58 | exact hr _ |
| 59 | |
| 60 | end PoincareMT |