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.Continuation.Branch |
| 2 | |
| 3 | /-! |
| 4 | # Exact scalar transport from the final original slab |
| 5 | |
| 6 | The bridge and final-slab transport laws identify the same fixed worldline |
| 7 | at every reference time. This gives an equality of the actual scalar fields. |
| 8 | Source: Morgan--Tian, Assumptions 11.18 and Theorem 11.19, p. 279. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open Set |
| 14 | open scoped Manifold ContDiff Bundle Topology |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.RepairedContinuationLimitBridge |
| 19 | |
| 20 | variable {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 22 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 23 | {G : GeneralizedRicciFlowData.{u}} {T : ℝ} {H : SingularTimeAssumptions G T M} |
| 24 | {L : RepairedSingularRegularLimitData H} {N : RepairedHornSelectionData H} |
| 25 | {F : SurgeryFlowData.{u}} {I : RepairedContinuationInput F T} |
| 26 | (B : RepairedContinuationLimitBridge H L N I) |
| 27 | |
| 28 | theorem core_map_eq_reference_at (t : Ico H.reference.tMinus T) |
| 29 | (x : (F.slice I.last_slab.start).carrier) : |
| 30 | B.core_map x = B.reference_identify t |
| 31 | (I.last_slab.identify |
| 32 | ⟨t.1, B.reference_start_lt.le.trans t.2.1, t.2.2⟩ x) := by |
| 33 | obtain ⟨t, ht⟩ := t |
| 34 | rw [B.core_map_eq_reference] |
| 35 | obtain heq | hlt := ht.1.eq_or_lt |
| 36 | · subst t |
| 37 | rfl |
| 38 | have hJ : Icc H.reference.tMinus t ⊆ F.time_domain := fun s hs => |
| 39 | I.last_slab.time_subset ⟨B.reference_start_lt.le.trans hs.1, hs.2.trans_lt ht.2⟩ |
| 40 | have hfree : Disjoint F.surgery_times (Ioc H.reference.tMinus t) := by |
| 41 | apply I.last_slab.surgery_free.mono_right |
| 42 | intro s hs |
| 43 | exact ⟨B.reference_start_lt.trans hs.1, hs.2.trans_lt ht.2⟩ |
| 44 | have hc := B.reference_transport_compatibility H.reference.tMinus t hlt hJ hfree |
| 45 | H.reference.tMinus t ⟨le_rfl, hlt.le⟩ ⟨hlt.le, le_rfl⟩ |
| 46 | ⟨le_rfl, H.reference.tMinus_lt⟩ ht |
| 47 | (I.last_slab.identify |
| 48 | ⟨H.reference.tMinus, B.reference_start_lt.le, H.reference.tMinus_lt⟩ x) |
| 49 | have hc' := I.last_slab.transport_compatibility H.reference.tMinus t hlt hJ hfree |
| 50 | H.reference.tMinus t ⟨le_rfl, hlt.le⟩ ⟨hlt.le, le_rfl⟩ |
| 51 | ⟨B.reference_start_lt.le, H.reference.tMinus_lt⟩ |
| 52 | ⟨B.reference_start_lt.le.trans ht.1, ht.2⟩ x |
| 53 | rw [hc'] at hc |
| 54 | exact hc.symm |
| 55 | |
| 56 | theorem reference_scalar_core_map (t : ℝ) (ht : t ∈ Ico H.reference.tMinus T) |
| 57 | (x : (F.slice I.last_slab.start).carrier) : |
| 58 | H.reference.scalar t (B.core_map x) = |
| 59 | (I.last_slab.flow.connection t).scalarCurvature x := by |
| 60 | rw [B.core_map_eq_reference_at ⟨t, ht⟩] |
| 61 | exact B.reference_scalar_pullback ⟨t, ht⟩ x |
| 62 | |
| 63 | end PoincareMT.RepairedContinuationLimitBridge |