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.Analysis.CanonicalGeometry.CapPersistenceAxialCompression |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Lifetime.CanonicalGeometry.CapPersistenceAxialMap |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Lifetime.CanonicalGeometry.CapPersistenceModelTransport |
| 4 | |
| 5 | /-! |
| 6 | # The actual smooth model of a same-core recut |
| 7 | |
| 8 | The extended smooth axial compression is a partial diffeomorphism from |
| 9 | the old cap onto the recut. Composing its actual inverse and forward |
| 10 | maps with the retained model equivalence gives every model field. |
| 11 | Source: Morgan--Tian Proposition 9.79(3), p. 234; |
| 12 | cap-persistence-implementation.md, section 2. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | namespace PoincareMT.CapCertificate |
| 21 | |
| 22 | variable {M : Type*} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 24 | [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 25 | {g : RiemannianMetric 3 M} (N : CapCertificate g) |
| 26 | |
| 27 | /-- The genuine same-core recut is smoothly equivalent to the original |
| 28 | cap through the literal axial conjugation and its inverse. The only |
| 29 | input map is a smooth real order isomorphism fixed near the inner end |
| 30 | (Proposition 9.79(3), p. 234). -/ |
| 31 | noncomputable def recutDiffeomorph {c b : ℝ} |
| 32 | (hc : -N.epsilon⁻¹ < c) (hcb : c < b) (hb : b < N.epsilon⁻¹) |
| 33 | (e : ℝ ≃o ℝ) (he : ContDiff ℝ ∞ (e : ℝ → ℝ)) |
| 34 | (he' : ContDiff ℝ ∞ (e.symm : ℝ → ℝ)) |
| 35 | (houter : e N.epsilon⁻¹ = b) (hfix : ∀ s ≤ c, e s = s) : |
| 36 | PartialDiffeomorph (𝓡 3) (𝓡 3) M M ∞ := by |
| 37 | have hinner : e (-N.epsilon⁻¹) = -N.epsilon⁻¹ := hfix _ hc.le |
| 38 | have hinner' : e.symm (-N.epsilon⁻¹) = -N.epsilon⁻¹ := by |
| 39 | apply e.injective |
| 40 | rw [e.apply_symm_apply, hinner] |
| 41 | have houter' : e.symm b = N.epsilon⁻¹ := by |
| 42 | rw [← houter, e.symm_apply_apply] |
| 43 | have hfix' : ∀ s ≤ c, e.symm s = s := by |
| 44 | intro s hs |
| 45 | apply e.injective |
| 46 | rw [e.apply_symm_apply, hfix s hs] |
| 47 | have hold {x : M} (hx : x ∈ N.end_neck.carrier) : |
| 48 | e (N.end_neck.coordinate_inverse x).2 ∈ Ioo (-N.epsilon⁻¹) b := by |
| 49 | have ht : (N.end_neck.coordinate_inverse x).2 ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹ := by |
| 50 | simpa only [N.end_neck_epsilon] using (N.end_neck.coordinate_inverse_mem x hx).2 |
| 51 | exact ⟨hinner ▸ e.strictMono ht.1, houter ▸ e.strictMono ht.2⟩ |
| 52 | have hnew {x : M} (hx : x ∈ N.recutCarrier b) (heX : x ∈ N.end_neck.carrier) : |
| 53 | e.symm (N.end_neck.coordinate_inverse x).2 ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹ := by |
| 54 | have hxR : x ∈ N.end_neck.region (-N.epsilon⁻¹) b := by |
| 55 | rcases hx with hx | hx |
| 56 | · rw [N.closed_core_eq_complement_end] at hx |
| 57 | exact False.elim (hx.2 heX) |
| 58 | · exact hx |
| 59 | exact ⟨hinner' ▸ e.symm.strictMono hxR.2.1, houter' ▸ e.symm.strictMono hxR.2.2⟩ |
| 60 | have hvalid {x : M} (hx : x ∈ N.end_neck.carrier) : |
| 61 | e (N.end_neck.coordinate_inverse x).2 ∈ |
| 62 | Ioo (-N.end_neck.epsilon⁻¹) N.end_neck.epsilon⁻¹ := by |
| 63 | rw [N.end_neck_epsilon] |
| 64 | exact ⟨(hold hx).1, (hold hx).2.trans hb⟩ |
| 65 | have hvalid' {x : M} (hx : x ∈ N.recutCarrier b) (heX : x ∈ N.end_neck.carrier) : |
| 66 | e.symm (N.end_neck.coordinate_inverse x).2 ∈ |
| 67 | Ioo (-N.end_neck.epsilon⁻¹) N.end_neck.epsilon⁻¹ := by |
| 68 | rw [N.end_neck_epsilon] |
| 69 | exact hnew hx heX |
| 70 | refine { |
| 71 | toFun := N.axialMap e |
| 72 | invFun := N.axialMap e.symm |
| 73 | source := N.carrier |
| 74 | target := N.recutCarrier b |
| 75 | open_source := N.carrier_open |
| 76 | open_target := N.recutCarrier_isOpen (hc.trans hcb) hb |
| 77 | map_source' := ?_ |
| 78 | map_target' := ?_ |
| 79 | left_inv' := ?_ |
| 80 | right_inv' := ?_ |
| 81 | contMDiffOn_toFun := N.axialMap_contMDiffOn hc (hcb.trans hb) (Subset.refl _) |
| 82 | he hfix (fun _ _ hx => ⟨(hold hx).1, (hold hx).2.trans hb⟩) |
| 83 | contMDiffOn_invFun := N.axialMap_contMDiffOn hc (hcb.trans hb) |
| 84 | (N.recutCarrier_subset_carrier b) he' hfix' (fun _ hx heX => hnew hx heX) |
| 85 | } |
| 86 | · intro x hx |
| 87 | by_cases heX : x ∈ N.end_neck.carrier |
| 88 | · simp only [axialMap, if_pos heX] |
| 89 | refine Or.inr ⟨N.end_neck.coordinate_map_mem_of_axial_mem (hvalid heX), ?_⟩ |
| 90 | rw [N.end_neck.coordinate_inverse_coordinate_map_of_axial_mem (hvalid heX)] |
| 91 | exact hold heX |
| 92 | · simp only [axialMap, if_neg heX] |
| 93 | exact Or.inl (N.closed_core_eq_complement_end ▸ ⟨hx, heX⟩) |
| 94 | · intro x hx |
| 95 | by_cases heX : x ∈ N.end_neck.carrier |
| 96 | · simp only [axialMap, if_pos heX] |
| 97 | exact N.end_neck_subset (N.end_neck.coordinate_map_mem_of_axial_mem (hvalid' hx heX)) |
| 98 | · simpa only [axialMap, if_neg heX] using N.recutCarrier_subset_carrier b hx |
| 99 | · intro x _hx |
| 100 | by_cases heX : x ∈ N.end_neck.carrier |
| 101 | · have him : N.end_neck.coordinate_map ((N.end_neck.coordinate_inverse x).1, |
| 102 | e (N.end_neck.coordinate_inverse x).2) ∈ N.end_neck.carrier := |
| 103 | N.end_neck.coordinate_map_mem_of_axial_mem (hvalid heX) |
| 104 | have heq : N.axialMap e x = N.end_neck.coordinate_map |
| 105 | ((N.end_neck.coordinate_inverse x).1, e (N.end_neck.coordinate_inverse x).2) := by |
| 106 | simp only [axialMap, if_pos heX] |
| 107 | rw [heq, axialMap, if_pos him, |
| 108 | N.end_neck.coordinate_inverse_coordinate_map_of_axial_mem (hvalid heX)] |
| 109 | simpa only [OrderIso.symm_apply_apply] using |
| 110 | N.end_neck.coordinate_map_coordinate_inverse heX |
| 111 | · have hfixed (f : ℝ → ℝ) : N.axialMap f x = x := by |
| 112 | simp only [axialMap, if_neg heX] |
| 113 | exact (congrArg (N.axialMap e.symm) (hfixed e)).trans (hfixed e.symm) |
| 114 | · intro x hx |
| 115 | by_cases heX : x ∈ N.end_neck.carrier |
| 116 | · have him : N.end_neck.coordinate_map ((N.end_neck.coordinate_inverse x).1, |
| 117 | e.symm (N.end_neck.coordinate_inverse x).2) ∈ N.end_neck.carrier := |
| 118 | N.end_neck.coordinate_map_mem_of_axial_mem (hvalid' hx heX) |
| 119 | have heq : N.axialMap e.symm x = N.end_neck.coordinate_map |
| 120 | ((N.end_neck.coordinate_inverse x).1, e.symm (N.end_neck.coordinate_inverse x).2) := by |
| 121 | simp only [axialMap, if_pos heX] |
| 122 | rw [heq, axialMap, if_pos him, |
| 123 | N.end_neck.coordinate_inverse_coordinate_map_of_axial_mem (hvalid' hx heX)] |
| 124 | simpa only [OrderIso.apply_symm_apply] using |
| 125 | N.end_neck.coordinate_map_coordinate_inverse heX |
| 126 | · have hfixed (f : ℝ → ℝ) : N.axialMap f x = x := by |
| 127 | simp only [axialMap, if_neg heX] |
| 128 | exact (congrArg (N.axialMap e) (hfixed e.symm)).trans (hfixed e) |
| 129 | |
| 130 | /-- Every nondegenerate inner recut retains an actual smooth standard |
| 131 | cap model. The construction uses a proved smooth compression, not an |
| 132 | assumed extension or the old model tag alone (Proposition 9.79(3)). -/ |
| 133 | theorem nonempty_recutModelEquivalence {b : ℝ} |
| 134 | (hb : -N.epsilon⁻¹ < b) (hb' : b < N.epsilon⁻¹) : |
| 135 | Nonempty (CapModelEquivalence N.model_kind N.puncture (N.recutCarrier b)) := by |
| 136 | let c := (-N.epsilon⁻¹ + b) / 2 |
| 137 | have hc : -N.epsilon⁻¹ < c := by dsimp [c]; linarith |
| 138 | have hcb : c < b := by dsimp [c]; linarith |
| 139 | obtain ⟨e, he, he', houter, hfix, _hderiv⟩ := |
| 140 | Real.exists_smooth_orderIso_compression hcb hb' |
| 141 | let d := N.recutDiffeomorph hc hcb hb' e he he' houter hfix |
| 142 | exact ⟨CapModelEquivalence.transport d N.model_equivalence⟩ |
| 143 | |
| 144 | end PoincareMT.CapCertificate |