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.StandardCap.Existence.Lifetime.CanonicalGeometry.StrongNeckComparison |
| 2 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.Ancient.Geometry |
| 3 | |
| 4 | /-! |
| 5 | # Actual centered restrictions of neck coordinates |
| 6 | |
| 7 | Shortening a neck retains its coordinate map, center, central sphere, |
| 8 | connection and scalar scale. The carrier and its coordinate homeomorphism |
| 9 | are restricted to the smaller open cylinder. This is the first geometric |
| 10 | step in Morgan-Tian Theorem 12.28, pp. 323-324, as detailed in the task-local |
| 11 | strong-neck persistence derivation. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.EpsilonNeck |
| 22 | |
| 23 | variable {M : Type u} [TopologicalSpace M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 25 | {g : RiemannianMetric 3 M} (N : EpsilonNeck g) |
| 26 | |
| 27 | /-- The supplied inverse is a literal left inverse of the total neck |
| 28 | coordinate on its actual open cylinder (Theorem 12.28). -/ |
| 29 | theorem coordinate_inverse_coordinate_map_of_axial_mem {z : RoundCylinderSpace} |
| 30 | (hz : z.2 ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹) : |
| 31 | N.coordinate_inverse (N.coordinate_map z) = z := by |
| 32 | let z' : NeckDomain N.epsilon := (z.1, ⟨z.2, hz⟩) |
| 33 | have h := N.coordinate_inverse_left z' |
| 34 | rw [N.coordinate_map_eq] at h |
| 35 | exact h |
| 36 | |
| 37 | /-- The literal image of a valid coordinate lies in the old carrier |
| 38 | (Theorem 12.28). -/ |
| 39 | theorem coordinate_map_mem_of_axial_mem {z : RoundCylinderSpace} |
| 40 | (hz : z.2 ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹) : N.coordinate_map z ∈ N.carrier := by |
| 41 | let z' : NeckDomain N.epsilon := (z.1, ⟨z.2, hz⟩) |
| 42 | rw [← N.coordinate_map_eq z'] |
| 43 | exact (N.coordinate z').property |
| 44 | |
| 45 | /-- The smaller carrier keeps precisely those points whose actual axial |
| 46 | coordinate lies in the shorter interval (Theorem 12.28). -/ |
| 47 | def restrictedCarrier (epsilon : ℝ) : Set M := |
| 48 | N.carrier ∩ N.coordinate_inverse ⁻¹' (univ ×ˢ Ioo (-epsilon⁻¹) epsilon⁻¹) |
| 49 | |
| 50 | /-- The smaller carrier is open using the old inverse's smoothness on |
| 51 | the actual carrier, without any global inverse regularity assumption. -/ |
| 52 | theorem restrictedCarrier_isOpen (epsilon : ℝ) : IsOpen (N.restrictedCarrier epsilon) := |
| 53 | N.coordinate_inverse_smooth.continuousOn.isOpen_inter_preimage N.carrier_open |
| 54 | (isOpen_univ.prod isOpen_Ioo) |
| 55 | |
| 56 | namespace StandardCapImport |
| 57 | |
| 58 | /-- The old total coordinate parametrizes the smaller actual carrier. -/ |
| 59 | noncomputable def restrictedCoordinate {epsilon : ℝ} (h : N.epsilon ≤ epsilon) : |
| 60 | NeckDomain epsilon ≃ₜ N.restrictedCarrier epsilon := by |
| 61 | have hinv : epsilon⁻¹ ≤ N.epsilon⁻¹ := inv_anti₀ N.epsilon_pos h |
| 62 | let inc : NeckDomain epsilon → NeckDomain N.epsilon := fun z => |
| 63 | (z.1, ⟨z.2, lt_of_le_of_lt (neg_le_neg hinv) z.2.property.1, |
| 64 | z.2.property.2.trans_le hinv⟩) |
| 65 | have hinc : Continuous inc := |
| 66 | continuous_fst.prodMk ((continuous_subtype_val.comp continuous_snd).subtype_mk _) |
| 67 | have hmap (z : NeckDomain epsilon) : |
| 68 | (N.coordinate (inc z) : M) ∈ N.restrictedCarrier epsilon := by |
| 69 | refine ⟨(N.coordinate (inc z)).property, mem_univ _, ?_⟩ |
| 70 | rw [N.coordinate_inverse_left] |
| 71 | exact z.2.property |
| 72 | have hinvcont : Continuous (fun x : N.restrictedCarrier epsilon => |
| 73 | N.coordinate_inverse (x : M)) := |
| 74 | N.coordinate_inverse_smooth.continuousOn.comp_continuous continuous_subtype_val |
| 75 | (fun x => x.property.1) |
| 76 | refine { |
| 77 | toFun := fun z => ⟨N.coordinate (inc z), hmap z⟩ |
| 78 | invFun := fun x => ((N.coordinate_inverse x).1, |
| 79 | ⟨(N.coordinate_inverse x).2, x.property.2.2⟩) |
| 80 | left_inv := ?_ |
| 81 | right_inv := ?_ |
| 82 | continuous_toFun := |
| 83 | (continuous_subtype_val.comp (N.coordinate.continuous.comp hinc)).subtype_mk _ |
| 84 | continuous_invFun := hinvcont.fst.prodMk (hinvcont.snd.subtype_mk _) |
| 85 | } |
| 86 | · intro z |
| 87 | have hz := N.coordinate_inverse_left (inc z) |
| 88 | apply Prod.ext |
| 89 | · exact congrArg (fun y : RoundCylinderSpace => y.1) hz |
| 90 | · apply Subtype.ext |
| 91 | exact congrArg (fun y : RoundCylinderSpace => y.2) hz |
| 92 | · intro x |
| 93 | apply Subtype.ext |
| 94 | exact congrArg (fun y : N.carrier => (y : M)) |
| 95 | (N.coordinate_inverse_right x x.property.1) |
| 96 | |
| 97 | end StandardCapImport |
| 98 | |
| 99 | local notation "N.restrictedCoordinate" => StandardCapImport.restrictedCoordinate N |
| 100 | |
| 101 | /-- Restrict an actual epsilon-neck to a centered shorter cylinder, |
| 102 | retaining its original scalar normalization and central sphere. -/ |
| 103 | noncomputable def restrict {epsilon : ℝ} (h : N.epsilon ≤ epsilon) |
| 104 | (hepsilon : epsilon < 1 / 2) : EpsilonNeck g where |
| 105 | epsilon := epsilon |
| 106 | epsilon_pos := N.epsilon_pos.trans_le h |
| 107 | epsilon_lt_half := hepsilon |
| 108 | scale := N.scale |
| 109 | scale_pos := N.scale_pos |
| 110 | center := N.center |
| 111 | connection := N.connection |
| 112 | scalar_center_pos := N.scalar_center_pos |
| 113 | scale_eq_scalar := N.scale_eq_scalar |
| 114 | carrier := N.restrictedCarrier epsilon |
| 115 | carrier_open := N.restrictedCarrier_isOpen epsilon |
| 116 | coordinate := N.restrictedCoordinate h |
| 117 | coordinate_map := N.coordinate_map |
| 118 | coordinate_map_eq := fun z => N.coordinate_map_eq _ |
| 119 | coordinate_map_smooth := N.coordinate_map_smooth.mono (by |
| 120 | have hinv := inv_anti₀ N.epsilon_pos h |
| 121 | intro z hz |
| 122 | exact ⟨hz.1, lt_of_le_of_lt (neg_le_neg hinv) hz.2.1, hz.2.2.trans_le hinv⟩) |
| 123 | coordinate_inverse := N.coordinate_inverse |
| 124 | coordinate_inverse_mem := fun _ hx => hx.2 |
| 125 | coordinate_inverse_left := fun z => N.coordinate_inverse_left _ |
| 126 | coordinate_inverse_right := fun x hx => (N.restrictedCoordinate h).apply_symm_apply ⟨x, hx⟩ |
| 127 | coordinate_inverse_smooth := N.coordinate_inverse_smooth.mono inter_subset_left |
| 128 | central_sphere := N.central_sphere |
| 129 | central_sphere_eq := N.central_sphere_eq |
| 130 | center_on_central_sphere := N.center_on_central_sphere |
| 131 | central_sphere_subset := by |
| 132 | intro x hx |
| 133 | refine ⟨N.central_sphere_subset hx, mem_univ _, ?_⟩ |
| 134 | obtain ⟨z, hz, rfl⟩ := N.central_sphere_eq ▸ hx |
| 135 | have hz0 : z.2 = 0 := hz.2 |
| 136 | have hpos := inv_pos.mpr (N.epsilon_pos.trans_le h) |
| 137 | rw [N.coordinate_inverse_coordinate_map_of_axial_mem (by |
| 138 | rw [hz0] |
| 139 | exact ⟨neg_neg_of_pos (inv_pos.mpr N.epsilon_pos), inv_pos.mpr N.epsilon_pos⟩), hz0] |
| 140 | exact ⟨neg_neg_of_pos hpos, hpos⟩ |
| 141 | metric_comparison := ⟨N.metric_comparison.close.mono_epsilon N.epsilon_pos h (by norm_num)⟩ |
| 142 | |
| 143 | end PoincareMT.EpsilonNeck |
| 144 | |
| 145 | namespace PoincareMT.StrongEvolvingNeck |
| 146 | |
| 147 | variable {M : Type u} [TopologicalSpace M] |
| 148 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 149 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 150 | [SecondCountableTopology M] [ConnectedSpace M] |
| 151 | {K : AncientKappaSolution 3 M} {t delta : ℝ} |
| 152 | |
| 153 | /-- A centered restriction retains the entire normalized backward neck |
| 154 | slab and its one common strict comparison bound (Theorem 12.28). -/ |
| 155 | noncomputable def restrict (N : StrongEvolvingNeck K t delta) |
| 156 | {epsilon : ℝ} (h : delta ≤ epsilon) (hepsilon : epsilon < 1 / 2) : |
| 157 | StrongEvolvingNeck K t epsilon where |
| 158 | time_mem := N.time_mem |
| 159 | center := N.center |
| 160 | duration := N.duration |
| 161 | duration_pos := N.duration_pos |
| 162 | normalized_duration := N.normalized_duration |
| 163 | terminal_neck := N.terminal_neck.restrict (N.terminal_epsilon.trans_le h) hepsilon |
| 164 | terminal_center := N.terminal_center |
| 165 | terminal_epsilon := rfl |
| 166 | terminal_connection := N.terminal_connection |
| 167 | metric_comparison := N.metric_comparison.mono_epsilon |
| 168 | (N.terminal_epsilon ▸ N.terminal_neck.epsilon_pos) h (fun _ hu => by linarith [hu.2]) |
| 169 | |
| 170 | end PoincareMT.StrongEvolvingNeck |