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.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.AncientLimits.LimitAlternatives |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.CertificateConnection |
| 4 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Tensor.TensorEvaluationBound |
| 5 | |
| 6 | /-! |
| 7 | # A fine retained neck on the actual ancient limit |
| 8 | |
| 9 | Morgan-Tian Theorem 12.32, pp. 326-327. Both surviving limit |
| 10 | alternatives contain a genuine neck. The limit's global scalar ceiling |
| 11 | is chosen before its fineness, which later separates its image center |
| 12 | from the bounded-tip basepoint. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Bundle Topology |
| 20 | |
| 21 | namespace PoincareMT.M35.OrdinaryRealization |
| 22 | |
| 23 | private theorem equal_metric_neck |
| 24 | {M : Type*} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 26 | {g h : RiemannianMetric 3 M} (N : EpsilonNeck g) |
| 27 | (heq : g = h) (D : LeviCivitaData h) : |
| 28 | ∃ N' : EpsilonNeck h, N'.epsilon = N.epsilon ∧ |
| 29 | N'.connection = D ∧ N'.carrier = N.carrier := by |
| 30 | subst h |
| 31 | exact ⟨N.withConnection D, rfl, rfl, rfl⟩ |
| 32 | |
| 33 | /-- A genuine arbitrarily fine neck is present in either of the |
| 34 | actual cap-or-neck alternatives, and its closure is retained in one |
| 35 | of the given convergence cylinders. -/ |
| 36 | theorem exists_limit_fine_neck (P : M35StandardCapPredecessors) : |
| 37 | ∃ delta : ℝ, 0 < delta ∧ ∀ epsilon : ℝ, 0 < epsilon → epsilon ≤ delta → |
| 38 | ∀ {g₀ : StandardInitialMetric} (E : RepairedStandardCapExistenceData g₀) |
| 39 | (t : ℕ → ℝ) (x : ℕ → StandardCapSpace) |
| 40 | (ht : ∀ k, t k ∈ Ico 0 E.flow.base.lifetime) |
| 41 | (hR : Tendsto (fun k => (E.flow.connection (t k)).scalarCurvature (x k)) atTop atTop) |
| 42 | (L : GeneralizedBlowupConvergence (blowupSequence P E t x ht hR) |
| 43 | (blowupBackwardInterval ⊤)) {kappa : ℝ} |
| 44 | (_A : BlowupAncientKappaIdentification L.limit kappa), |
| 45 | letI : TopologicalSpace L.limit.carrier.carrier := L.limit.carrier.topologicalSpace |
| 46 | letI : MeasurableSpace L.limit.carrier.carrier := L.limit.carrier.measurableSpace |
| 47 | letI : BorelSpace L.limit.carrier.carrier := L.limit.carrier.borelSpace |
| 48 | letI : ChartedSpace (EuclideanSpace ℝ (Fin 3)) L.limit.carrier.carrier := |
| 49 | L.limit.carrier.chartedSpace |
| 50 | letI : IsManifold (𝓡 3) ∞ L.limit.carrier.carrier := L.limit.carrier.isManifold |
| 51 | letI : T2Space L.limit.carrier.carrier := L.limit.carrier.t2Space |
| 52 | letI : T3Space L.limit.carrier.carrier := L.limit.carrier.t3Space |
| 53 | letI : SecondCountableTopology L.limit.carrier.carrier := L.limit.carrier.secondCountable |
| 54 | letI : ConnectedSpace L.limit.carrier.carrier := L.limit.connectedSpace |
| 55 | ∃ N : EpsilonNeck (L.limit.flow.metric 0), N.epsilon = epsilon ∧ |
| 56 | N.connection = L.limit.flow.connection 0 ∧ IsCompact (closure N.carrier) ∧ |
| 57 | ∃ j : ℕ, closure N.carrier ⊆ L.exhaustion.space j := by |
| 58 | obtain ⟨delta, hdelta, hmodels⟩ := exists_limit_cap_or_neck_constants P |
| 59 | refine ⟨delta, hdelta, ?_⟩ |
| 60 | intro epsilon he hsmall g₀ E t x ht hR L kappa A |
| 61 | let : TopologicalSpace L.limit.carrier.carrier := L.limit.carrier.topologicalSpace |
| 62 | let : MeasurableSpace L.limit.carrier.carrier := L.limit.carrier.measurableSpace |
| 63 | have : BorelSpace L.limit.carrier.carrier := L.limit.carrier.borelSpace |
| 64 | let : ChartedSpace (EuclideanSpace ℝ (Fin 3)) L.limit.carrier.carrier := |
| 65 | L.limit.carrier.chartedSpace |
| 66 | have : IsManifold (𝓡 3) ∞ L.limit.carrier.carrier := L.limit.carrier.isManifold |
| 67 | have : T2Space L.limit.carrier.carrier := L.limit.carrier.t2Space |
| 68 | have : T3Space L.limit.carrier.carrier := L.limit.carrier.t3Space |
| 69 | have : SecondCountableTopology L.limit.carrier.carrier := L.limit.carrier.secondCountable |
| 70 | have : ConnectedSpace L.limit.carrier.carrier := L.limit.connectedSpace |
| 71 | obtain ⟨C, _hC, hcanonical⟩ := hmodels epsilon he hsmall |
| 72 | obtain ⟨N, hNe, hNc, j, hNj⟩ : |
| 73 | ∃ N : EpsilonNeck (A.solution.flow.metric 0), N.epsilon = epsilon ∧ |
| 74 | IsCompact (closure N.carrier) ∧ ∃ j : ℕ, |
| 75 | closure N.carrier ⊆ L.exhaustion.space j := by |
| 76 | rcases hcanonical g₀ E t x ht hR L kappa A 0 le_rfl L.limit.base with |
| 77 | ⟨N, _hcenter, j, hstage⟩ | ⟨N, j, hstage⟩ |
| 78 | · exact ⟨N.terminal_neck, N.terminal_epsilon, |
| 79 | N.terminal_neck.isCompact_closure (A.solution.complete 0 le_rfl), j, hstage⟩ |
| 80 | · exact ⟨N.cap.end_neck, N.cap.end_neck_epsilon.trans N.epsilon_eq, |
| 81 | N.cap.end_neck.isCompact_closure (A.solution.complete 0 le_rfl), j, |
| 82 | (closure_mono N.cap.end_neck_subset).trans hstage⟩ |
| 83 | obtain ⟨N', he', hD, hU⟩ := equal_metric_neck N (A.metric_eq 0 le_rfl) |
| 84 | (L.limit.flow.connection 0) |
| 85 | refine ⟨N', he'.trans hNe, hD, ?_, j, ?_⟩ |
| 86 | · rwa [hU] |
| 87 | · rwa [hU] |
| 88 | |
| 89 | private theorem scalar_of_equal_metrics |
| 90 | {M : Type*} [TopologicalSpace M] |
| 91 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 92 | {g h : RiemannianMetric 3 M} (heq : g = h) |
| 93 | (D : LeviCivitaData g) (D' : LeviCivitaData h) (y : M) : |
| 94 | D.scalarCurvature y = D'.scalarCurvature y := by |
| 95 | subst h |
| 96 | exact D.scalarCurvature_eq D' y |
| 97 | |
| 98 | /-- The actual limit scalar ceiling is independent of the fine |
| 99 | neck subsequently selected from its cap-or-neck alternatives. -/ |
| 100 | theorem blowupSequence_limit_scalar_ceiling (P : M35StandardCapPredecessors) |
| 101 | {g₀ : StandardInitialMetric} (E : RepairedStandardCapExistenceData g₀) |
| 102 | (t : ℕ → ℝ) (x : ℕ → StandardCapSpace) |
| 103 | (ht : ∀ k, t k ∈ Ico 0 E.flow.base.lifetime) |
| 104 | (hR : Tendsto (fun k => (E.flow.connection (t k)).scalarCurvature (x k)) atTop atTop) |
| 105 | (L : GeneralizedBlowupConvergence (blowupSequence P E t x ht hR) |
| 106 | (blowupBackwardInterval ⊤)) {kappa : ℝ} |
| 107 | (A : BlowupAncientKappaIdentification L.limit kappa) : |
| 108 | letI : TopologicalSpace L.limit.carrier.carrier := L.limit.carrier.topologicalSpace |
| 109 | letI : MeasurableSpace L.limit.carrier.carrier := L.limit.carrier.measurableSpace |
| 110 | letI : BorelSpace L.limit.carrier.carrier := L.limit.carrier.borelSpace |
| 111 | letI : ChartedSpace (EuclideanSpace ℝ (Fin 3)) L.limit.carrier.carrier := |
| 112 | L.limit.carrier.chartedSpace |
| 113 | letI : IsManifold (𝓡 3) ∞ L.limit.carrier.carrier := L.limit.carrier.isManifold |
| 114 | letI : T2Space L.limit.carrier.carrier := L.limit.carrier.t2Space |
| 115 | letI : T3Space L.limit.carrier.carrier := L.limit.carrier.t3Space |
| 116 | letI : SecondCountableTopology L.limit.carrier.carrier := L.limit.carrier.secondCountable |
| 117 | letI : ConnectedSpace L.limit.carrier.carrier := L.limit.connectedSpace |
| 118 | ∃ B : ℝ, 0 < B ∧ ∀ y : L.limit.carrier.carrier, |
| 119 | (L.limit.flow.connection 0).scalarCurvature y ≤ B := by |
| 120 | let : TopologicalSpace L.limit.carrier.carrier := L.limit.carrier.topologicalSpace |
| 121 | let : MeasurableSpace L.limit.carrier.carrier := L.limit.carrier.measurableSpace |
| 122 | have : BorelSpace L.limit.carrier.carrier := L.limit.carrier.borelSpace |
| 123 | let : ChartedSpace (EuclideanSpace ℝ (Fin 3)) L.limit.carrier.carrier := |
| 124 | L.limit.carrier.chartedSpace |
| 125 | have : IsManifold (𝓡 3) ∞ L.limit.carrier.carrier := L.limit.carrier.isManifold |
| 126 | have : T2Space L.limit.carrier.carrier := L.limit.carrier.t2Space |
| 127 | have : T3Space L.limit.carrier.carrier := L.limit.carrier.t3Space |
| 128 | have : SecondCountableTopology L.limit.carrier.carrier := L.limit.carrier.secondCountable |
| 129 | have : ConnectedSpace L.limit.carrier.carrier := L.limit.connectedSpace |
| 130 | obtain ⟨K, hK, hbound⟩ := A.solution.bounded_curvature 0 le_rfl |
| 131 | refine ⟨9 * K + 1, by positivity, ?_⟩ |
| 132 | intro y |
| 133 | rw [← scalar_of_equal_metrics (A.metric_eq 0 le_rfl) |
| 134 | (A.solution.flow.connection 0) (L.limit.flow.connection 0) y] |
| 135 | have hs := Proofs.M09.scalar_abs_le_curvatureTensorNorm P.curvature |
| 136 | (A.solution.flow.metric 0) (A.solution.flow.connection 0) y |
| 137 | have hn := (le_abs_self _).trans (hbound y) |
| 138 | have ha := le_abs_self ((A.solution.flow.connection 0).scalarCurvature y) |
| 139 | norm_num only [Nat.cast_ofNat, OfNat.ofNat, sq] at hs |
| 140 | linarith only [hs, hn, ha] |
| 141 | |
| 142 | end PoincareMT.M35.OrdinaryRealization |