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.SmoothTimeClass |
| 2 | import PoincareLib.Geometry.RicciFlow.Extinction.Width.Transport.RegularPieceBuilder |
| 3 | import PoincareLib.Geometry.RicciFlow.Extinction.Width.Path.Data |
| 4 | |
| 5 | set_option autoImplicit false |
| 6 | |
| 7 | open scoped Manifold ContDiff Bundle ENNReal Topology intervalIntegral |
| 8 | |
| 9 | universe u |
| 10 | |
| 11 | namespace PoincareMT |
| 12 | |
| 13 | /-! Compose the M59-to-M66 class-data producer with the ordinary-piece |
| 14 | constructor for a family supplied by an actual M67 slice. -/ |
| 15 | theorem m67_regular_piece_of_slice |
| 16 | {A : GeneralizedSliceCarrier.{u}} |
| 17 | (C : SurgerySelectedComponent A) |
| 18 | (S : M59IdentificationSystem.{u}) |
| 19 | (slice : M67WidthSlice S.quotient C) |
| 20 | {a b T : ℝ} |
| 21 | (hM61 : M61RawWidthCore.{u}) |
| 22 | {hM64 : M64ComparisonTheory.{u}} |
| 23 | (hM65 : M65DeformationTheory hM61 hM64) |
| 24 | (hM58 : RepairedShortLoopTrivialityTheory.{u}) |
| 25 | (hM66 : M66SmoothTimeTheory hM61 hM58 hM65) |
| 26 | (actual_flow : RicciFlow 3 C.carrier.carrier (Set.Icc a b)) |
| 27 | (global_width : Set.Icc (0 : ℝ) T → ℝ) |
| 28 | (events : Set ℝ) |
| 29 | (ha : 0 ≤ a) (hab : a < b) (hb : b ≤ T) |
| 30 | (hJ : Disjoint events (Set.Ioc a b)) |
| 31 | (input : M65RawFlowInput C.carrier.carrier a b) |
| 32 | (hinput : input.flow = actual_flow) |
| 33 | (hfamily : input.family = slice.family) |
| 34 | (hscalar_infimum_attained : ∀ t : Set.Icc a b, ∃ x : C.carrier.carrier, |
| 35 | (input.flow.connection t.1).scalarCurvature x = |
| 36 | flowScalarCurvatureInfimum input.flow t.1) |
| 37 | (hscalar_infimum_continuous : Continuous (fun t : Set.Icc a b => |
| 38 | flowScalarCurvatureInfimum input.flow t.1)) |
| 39 | (hwidth : ∀ s : Set.Icc a b, |
| 40 | global_width ⟨s.1, ⟨ha.trans s.2.1, s.2.2.trans hb⟩⟩ = m66Width input s) : |
| 41 | Nonempty (M67RegularPiece hM61 hM65 actual_flow global_width events |
| 42 | (a := a) (b := b) (T := T)) := by |
| 43 | have hrep : M61Represents S.quotient C.basepoint slice.alpha input.family := by |
| 44 | rw [hfamily] |
| 45 | exact slice.represents |
| 46 | let class_data := m66ClassData_of_m59_representation input hab C.connected |
| 47 | C.basepoint slice.pi_two_trivial |
| 48 | S |
| 49 | slice.alpha hrep slice.loop_pi_three slice.class_nonzero |
| 50 | hscalar_infimum_attained hscalar_infimum_continuous |
| 51 | exact m67_regular_piece_of_m66 hM61 hM65 hM58 hM66 actual_flow global_width |
| 52 | events ha hab hb hJ input hinput class_data hwidth |
| 53 | |
| 54 | end PoincareMT |