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 | import PoincareLib.Geometry.RicciFlow.Surgery.Continuation.Construction.Splice.Nonempty |
| 3 | import PoincareLib.Geometry.RicciFlow.Diffeomorph |
| 4 | import PoincareLib.Geometry.RicciFlow.Harnack.Regularity |
| 5 | |
| 6 | /-! |
| 7 | # Rebasing the last ordinary flow near the terminal time |
| 8 | |
| 9 | The predecessor flow is pulled back by its actual fixed slice |
| 10 | identification and restricted in physical time. The metric, scalar and |
| 11 | worldline equalities retain the original source geometry. |
| 12 | Source: Morgan--Tian, Definition 15.8, p. 362. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set |
| 20 | open scoped Manifold ContDiff Bundle Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.RepairedPreterminalSlab |
| 25 | |
| 26 | variable {F : SurgeryFlowData.{u}} {T : ℝ} (S : RepairedPreterminalSlab F T) |
| 27 | |
| 28 | def rebaseFlow (r : Ico S.start T) : |
| 29 | RicciFlow 3 (F.slice r.1).carrier (Ico r.1 T) := by |
| 30 | let H := S.flow.pullbackDiffeomorph (S.identify r).symm |
| 31 | apply Poincare.Geometry.RicciFlow.Harnack.restrictFlow H |
| 32 | (Ico_subset_Ico_left r.2.1) ordConnected_Ico |
| 33 | obtain ⟨s, hrs, hsT⟩ := exists_between r.2.2 |
| 34 | exact ⟨r.1, ⟨le_rfl, r.2.2⟩, s, ⟨hrs.le, hsT⟩, hrs.ne⟩ |
| 35 | |
| 36 | def rebaseIdentify (r : Ico S.start T) (t : Ico r.1 T) : |
| 37 | Diffeomorph (𝓡 3) (𝓡 3) (F.slice r.1).carrier (F.slice t.1).carrier ∞ := |
| 38 | (S.identify r).symm.trans (S.identify ⟨t.1, r.2.1.trans t.2.1, t.2.2⟩) |
| 39 | |
| 40 | @[simp] theorem rebaseIdentify_initial (r : Ico S.start T) (x : (F.slice r.1).carrier) : |
| 41 | S.rebaseIdentify r ⟨r.1, le_rfl, r.2.2⟩ x = x := |
| 42 | (S.identify r).apply_symm_apply x |
| 43 | |
| 44 | theorem rebaseIdentify_source (r : Ico S.start T) (t : Ico r.1 T) |
| 45 | (x : (F.slice S.start).carrier) : |
| 46 | S.rebaseIdentify r t (S.identify r x) = |
| 47 | S.identify ⟨t.1, r.2.1.trans t.2.1, t.2.2⟩ x := by |
| 48 | change S.identify _ ((S.identify r).symm (S.identify r x)) = _ |
| 49 | rw [Diffeomorph.symm_apply_apply] |
| 50 | |
| 51 | theorem rebase_nonempty (r : Ico S.start T) : Nonempty (F.slice r.1).carrier := by |
| 52 | obtain ⟨x⟩ := S.start_nonempty |
| 53 | exact ⟨S.identify r x⟩ |
| 54 | |
| 55 | theorem rebase_transport (r : Ico S.start T) (a b : ℝ) (hab : a < b) |
| 56 | (hJ : Icc a b ⊆ F.time_domain) (hfree : Disjoint F.surgery_times (Ioc a b)) |
| 57 | (s t : ℝ) (hs : s ∈ Icc a b) (ht : t ∈ Icc a b) |
| 58 | (hs' : s ∈ Ico r.1 T) (ht' : t ∈ Ico r.1 T) (x : (F.slice r.1).carrier) : |
| 59 | (F.regular_slabs a b hab hJ hfree).transport ⟨s, hs⟩ ⟨t, ht⟩ |
| 60 | (S.rebaseIdentify r ⟨s, hs'⟩ x) = S.rebaseIdentify r ⟨t, ht'⟩ x := |
| 61 | S.transport_compatibility a b hab hJ hfree s t hs ht |
| 62 | ⟨r.2.1.trans hs'.1, hs'.2⟩ ⟨r.2.1.trans ht'.1, ht'.2⟩ ((S.identify r).symm x) |
| 63 | |
| 64 | theorem rebaseFlow_inner (r : Ico S.start T) (t : ℝ) |
| 65 | (x : (F.slice r.1).carrier) (v w : TangentSpace (𝓡 3) x) : |
| 66 | ((S.rebaseFlow r).metric t).inner x v w = |
| 67 | (S.flow.metric t).inner ((S.identify r).symm x) |
| 68 | (mfderiv (𝓡 3) (𝓡 3) (S.identify r).symm x v) |
| 69 | (mfderiv (𝓡 3) (𝓡 3) (S.identify r).symm x w) := rfl |
| 70 | |
| 71 | theorem rebaseFlow_scalar (r : Ico S.start T) (t : ℝ) (x : (F.slice r.1).carrier) : |
| 72 | ((S.rebaseFlow r).connection t).scalarCurvature x = |
| 73 | (S.flow.connection t).scalarCurvature ((S.identify r).symm x) := |
| 74 | S.flow.pullbackDiffeomorph_scalarCurvature (S.identify r).symm t x |
| 75 | |
| 76 | theorem rebase_metric (r : Ico S.start T) (t : Ico r.1 T) |
| 77 | (x : (F.slice r.1).carrier) (v w : TangentSpace (𝓡 3) x) : |
| 78 | (F.metric t.1).inner (S.rebaseIdentify r t x) |
| 79 | (mfderiv (𝓡 3) (𝓡 3) (S.rebaseIdentify r t) x v) |
| 80 | (mfderiv (𝓡 3) (𝓡 3) (S.rebaseIdentify r t) x w) = |
| 81 | ((S.rebaseFlow r).metric t.1).inner x v w := by |
| 82 | rw [S.rebaseFlow_inner] |
| 83 | simp only [rebaseIdentify, Diffeomorph.coe_trans] |
| 84 | rw [mfderiv_comp x |
| 85 | ((S.identify _).contMDiff.mdifferentiable (by simp) _) |
| 86 | ((S.identify r).symm.contMDiff.mdifferentiable (by simp) _)] |
| 87 | exact S.metric_pullback ⟨t.1, r.2.1.trans t.2.1, t.2.2⟩ ((S.identify r).symm x) |
| 88 | (mfderiv (𝓡 3) (𝓡 3) (S.identify r).symm x v) |
| 89 | (mfderiv (𝓡 3) (𝓡 3) (S.identify r).symm x w) |
| 90 | |
| 91 | theorem rebaseFlow_source_metric (r : Ico S.start T) (t : ℝ) |
| 92 | (x : (F.slice S.start).carrier) (v w : TangentSpace (𝓡 3) x) : |
| 93 | ((S.rebaseFlow r).metric t).inner (S.identify r x) |
| 94 | (mfderiv (𝓡 3) (𝓡 3) (S.identify r) x v) |
| 95 | (mfderiv (𝓡 3) (𝓡 3) (S.identify r) x w) = |
| 96 | (S.flow.metric t).inner x v w := by |
| 97 | let e := S.identify r |
| 98 | have hcomp : e.symm ∘ e = id := funext e.symm_apply_apply |
| 99 | have hd := mfderiv_comp x (e.symm.contMDiff.mdifferentiable (by simp) (e x)) |
| 100 | (e.contMDiff.mdifferentiable (by simp) x) |
| 101 | rw [hcomp, mfderiv_id] at hd |
| 102 | have hv (a : TangentSpace (𝓡 3) x) : |
| 103 | mfderiv (𝓡 3) (𝓡 3) e.symm (e x) (mfderiv (𝓡 3) (𝓡 3) e x a) = a := |
| 104 | (congrArg (fun D => D a) hd).symm |
| 105 | rw [S.rebaseFlow_inner] |
| 106 | change (S.flow.metric t).inner (e.symm (e x)) |
| 107 | (mfderiv (𝓡 3) (𝓡 3) e.symm (e x) (mfderiv (𝓡 3) (𝓡 3) e x v)) |
| 108 | (mfderiv (𝓡 3) (𝓡 3) e.symm (e x) (mfderiv (𝓡 3) (𝓡 3) e x w)) = _ |
| 109 | rw [hv, hv, e.symm_apply_apply] |
| 110 | |
| 111 | end PoincareMT.RepairedPreterminalSlab |
| 112 | |
| 113 | namespace PoincareMT.RepairedContinuationInput |
| 114 | |
| 115 | variable {F : SurgeryFlowData.{u}} {T : ℝ} (I : RepairedContinuationInput F T) |
| 116 | |
| 117 | def vanishingReference : ℝ := |
| 118 | (max I.last_slab.start (T - F.parameters.h T ^ 2) + T) / 2 |
| 119 | |
| 120 | theorem vanishingReference_bounds : |
| 121 | I.last_slab.start < I.vanishingReference ∧ I.vanishingReference < T ∧ |
| 122 | T - F.parameters.h T ^ 2 < I.vanishingReference := by |
| 123 | have hh : 0 < F.parameters.h T ^ 2 := |
| 124 | sq_pos_of_pos (F.parameters.h_pos T I.terminal_pos.le) |
| 125 | have hmax : max I.last_slab.start (T - F.parameters.h T ^ 2) < T := |
| 126 | max_lt I.last_slab.start_lt (by linarith) |
| 127 | dsimp [vanishingReference] |
| 128 | constructor |
| 129 | · linarith [le_max_left I.last_slab.start (T - F.parameters.h T ^ 2)] |
| 130 | constructor |
| 131 | · linarith |
| 132 | · linarith [le_max_right I.last_slab.start (T - F.parameters.h T ^ 2)] |
| 133 | |
| 134 | def vanishingReferenceTime : Ico I.last_slab.start T := |
| 135 | ⟨I.vanishingReference, I.vanishingReference_bounds.1.le, I.vanishingReference_bounds.2.1⟩ |
| 136 | |
| 137 | end PoincareMT.RepairedContinuationInput |