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.CanonicalInduction.Generalized.GeneralizedBridgeCylinder |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Generalized.GeneralizedBridgeNeckGeometry |
| 3 | |
| 4 | /-! |
| 5 | # Strong canonical necks in the actual generalized history |
| 6 | |
| 7 | The full backward neck cylinder lies in the selected regular history. |
| 8 | Its exact lifted maps and coordinate pullbacks construct the genuine |
| 9 | generalized strong-neck certificate, with the original epsilon and scale. |
| 10 | Source: Morgan--Tian Definition 9.78 and Proposition 14.12. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M47 |
| 22 | |
| 23 | variable {F : SurgeryFlowData.{u}} {W : M33RegularHistoryWindow F} |
| 24 | (H : M33RegularHistoryData W) {t : ℝ} (ht : t ∈ H.generalized.interval) |
| 25 | |
| 26 | /-- The entire terminal source of a strict-left based cylinder is in |
| 27 | the actual regular image, including at an included surgery time. -/ |
| 28 | theorem regular_history_terminal_carrier |
| 29 | {scale a : ℝ} (ha : a < 0) {U : Set (F.slice t).carrier} |
| 30 | (e : SurgeryFlowCylinder F (F.slice t) t scale (Ioc a 0) U) |
| 31 | (hbase : ∀ h x, x ∈ U → HEq (e.forward 0 h x) x) : |
| 32 | U ⊆ range (H.history.forward t ht) := by |
| 33 | rw [H.regular_range] |
| 34 | intro x hx |
| 35 | have hzero : (0 : ℝ) ∈ Ioc a 0 := ⟨ha, le_rfl⟩ |
| 36 | have he : (⟨t + 0 / scale, e.forward 0 hzero x⟩ : Σ s, (F.slice s).carrier) = |
| 37 | ⟨t, x⟩ := Sigma.ext (by simp) (hbase hzero x hx) |
| 38 | exact (congrArg (fun p : Σ s, (F.slice s).carrier => |
| 39 | p.2 ∈ m33RegularRegion F p.1) he).mp (e.regular_image_Ioc hzero ⟨x, hx, rfl⟩) |
| 40 | |
| 41 | /-- An actual surgery strong neck yields a genuine generalized strong |
| 42 | neck in the selected history, at the identical epsilon and scale. -/ |
| 43 | theorem exists_regular_history_strong_neck {epsilon : ℝ} |
| 44 | (N : SurgeryStrongNeck F t epsilon) : |
| 45 | ∃ N' : GeneralizedStrongNeck H.generalized t epsilon, |
| 46 | N'.center = H.history.inverse t ht N.neck.center ∧ |
| 47 | N'.scale = N.neck.scale ∧ |
| 48 | N'.carrier = H.history.forward t ht ⁻¹' N.neck.carrier := by |
| 49 | rcases N with ⟨N, rfl, hconnection, e, hbase, hcomparison⟩ |
| 50 | have hU := regular_history_terminal_carrier H ht (by norm_num : (-1 : ℝ) < 0) e hbase |
| 51 | let N' := regular_history_static_neck H ht N hconnection hU |
| 52 | obtain ⟨d, hforward, hpullback⟩ := |
| 53 | exists_regular_history_backward_cylinder H ht N.carrier_open e |
| 54 | let d' := regular_history_rebase_cylinder H ht N.carrier d |
| 55 | have hmaps : MapsTo N.coordinate_map (univ ×ˢ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹) |
| 56 | (range (H.history.forward t ht)) := |
| 57 | fun _ hz => hU (N.coordinatePartialDiffeomorph.map_source hz) |
| 58 | have hterminal : ∀ h x, x ∈ N'.carrier → |
| 59 | d'.pointMap 0 h x = (⟨t, x⟩ : H.generalized.point) := by |
| 60 | intro h x hx |
| 61 | apply Sigma.ext (by simp [GeneralizedFlowCylinder.pointMap]) |
| 62 | have hphysical := hforward 0 h (H.history.forward t ht x) hx |
| 63 | have hcancel (s : ℝ) (hst : s = t) (hs : s ∈ H.generalized.interval) |
| 64 | (y : (H.generalized.slice s).carrier) |
| 65 | (heq : HEq (H.history.forward s hs y) (H.history.forward t ht x)) : HEq y x := by |
| 66 | subst s |
| 67 | exact heq_of_eq ((H.history.forward_openEmbedding t ht).injective |
| 68 | (eq_of_heq heq)) |
| 69 | exact hcancel (t + 0 / N.scale⁻¹ ^ 2) (by simp) |
| 70 | (regular_history_backward_cylinder_time H ht e 0 h) |
| 71 | (d.forward 0 h (H.history.forward t ht x)) |
| 72 | ((heq_of_eq hphysical).trans (hbase h _ hx)) |
| 73 | have hfamily : RoundCylinderFamilyClose N.epsilon (Ioc (-1 : ℝ) 0) |
| 74 | (generalizedCylinderPullback d' N'.coordinate_map) := by |
| 75 | apply M35.cylinder_family_congr _ hcomparison |
| 76 | intro s hs z hz v w |
| 77 | have hzV : z ∈ univ ×ˢ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹ := ⟨mem_univ _, hz⟩ |
| 78 | have hzN : N.coordinate_map z ∈ N.carrier := N.coordinatePartialDiffeomorph.map_source hzV |
| 79 | have hright : H.history.forward t ht (N'.coordinate_map z) = N.coordinate_map z := |
| 80 | H.history.right_inverse t ht (hU hzN) |
| 81 | have hcoord : ContMDiffOn ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) ∞ N'.coordinate_map |
| 82 | (univ ×ˢ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹) := N'.coordinate_map_smooth |
| 83 | have hderiv : (mfderiv (𝓡 3) (𝓡 3) (H.history.forward t ht) (N'.coordinate_map z)).comp |
| 84 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) N'.coordinate_map z) = |
| 85 | mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) N.coordinate_map z := by |
| 86 | rw [← mfderiv_comp z |
| 87 | ((H.history.forward_smooth t ht).mdifferentiable (by simp) _) |
| 88 | (((hcoord.mdifferentiableOn (by simp)) z hzV).mdifferentiableAt |
| 89 | ((isOpen_univ.prod isOpen_Ioo).mem_nhds hzV))] |
| 90 | apply Filter.EventuallyEq.mfderiv_eq |
| 91 | filter_upwards [(isOpen_univ.prod isOpen_Ioo).mem_nhds hzV] with q hq |
| 92 | exact H.history.right_inverse t ht (hmaps hq) |
| 93 | simp only [surgeryCylinderPullback, generalizedCylinderPullback, dif_pos hs] |
| 94 | rw [regular_history_rebase_pullback H ht N.carrier d N.carrier_open s hs |
| 95 | (N'.coordinate_map z) (hright.symm ▸ hzN)] |
| 96 | simp only [← ContinuousLinearMap.comp_apply, hderiv] |
| 97 | rw [hright] |
| 98 | exact (hpullback s hs (N.coordinate_map z) hzN _ _).symm |
| 99 | refine ⟨{ |
| 100 | epsilon_pos := N'.epsilon_pos |
| 101 | center := N'.center |
| 102 | scalar_center_pos := N'.scalar_center_pos |
| 103 | scale := N'.scale |
| 104 | scale_pos := N'.scale_pos |
| 105 | scale_scalar := N'.scale_eq_scalar |
| 106 | carrier := N'.carrier |
| 107 | carrier_open := N'.carrier_open |
| 108 | coordinate := N'.coordinate |
| 109 | coordinate_map := N'.coordinate_map |
| 110 | coordinate_map_eq := N'.coordinate_map_eq |
| 111 | coordinate_map_smooth := N'.coordinate_map_smooth |
| 112 | coordinate_inverse := N'.coordinate_inverse |
| 113 | coordinate_inverse_mem := fun x hx => (N'.coordinate_inverse_mem x hx).2 |
| 114 | coordinate_inverse_left := N'.coordinate_inverse_left |
| 115 | coordinate_inverse_right := ?_ |
| 116 | coordinate_inverse_smooth := N'.coordinate_inverse_smooth |
| 117 | central_sphere := N'.central_sphere |
| 118 | central_sphere_eq := N'.central_sphere_eq |
| 119 | center_on_central_sphere := N'.center_on_central_sphere |
| 120 | central_sphere_subset := N'.central_sphere_subset |
| 121 | time_cylinder := d' |
| 122 | cylinder_identity := hterminal |
| 123 | metric_comparison := hfamily |
| 124 | }, rfl, rfl, rfl⟩ |
| 125 | intro x hx |
| 126 | exact N'.coordinatePartialDiffeomorph.right_inv hx |
| 127 | |
| 128 | /-- The neck alternative of actual canonical control lifts at every |
| 129 | included time, including old surgery times. -/ |
| 130 | theorem regular_history_neck_control {epsilon C : ℝ} |
| 131 | (x : (H.generalized.slice t).carrier) (N : SurgeryStrongNeck F t epsilon) |
| 132 | (hcenter : N.neck.center = H.history.forward t ht x) : |
| 133 | Nonempty (GeneralizedCanonicalControl (F := H.generalized) t x epsilon C) := by |
| 134 | obtain ⟨N', hcenter', _, _⟩ := exists_regular_history_strong_neck H ht N |
| 135 | refine ⟨GeneralizedCanonicalControl.neck N' ?_⟩ |
| 136 | rw [hcenter', hcenter, H.history.left_inverse t ht x] |
| 137 | |
| 138 | end PoincareMT.M47 |