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.Geometry.CanonicalGeometry.CapIsometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Positivity.PointwiseFlatness |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Fields.ConnectionScalar |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Fields.FixedExtension |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Identities.CurvatureAlgebra |
| 6 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Identities.CurvatureSymmetries |
| 7 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Tensors.RicciRegularity |
| 8 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Tensors.RiemannRegularity |
| 9 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Positivity.PointwiseFlatness |
| 10 | import PoincareLib.Geometry.Riemannian.Curvature.LocalIsometryInvariants |
| 11 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.Ancient.Quantitative |
| 12 | import PoincareLib.Geometry.RicciFlow.Blowup.Controlled.Data |
| 13 | |
| 14 | /-! |
| 15 | # The actual classified cap on the selected blow-up limit metric |
| 16 | |
| 17 | The retained ancient metric equality makes the identity a genuine |
| 18 | isometry. Full cap transport keeps the exact classified constant and |
| 19 | core while selecting the actual limit connection. Source: Morgan-Tian |
| 20 | Corollary 9.94, p. 243, and Theorem 12.28, pp. 323-324; |
| 21 | cap-limit-normalization.md. |
| 22 | -/ |
| 23 | |
| 24 | set_option autoImplicit false |
| 25 | |
| 26 | open Set |
| 27 | open scoped Manifold ContDiff Topology ENNReal BigOperators |
| 28 | |
| 29 | universe u |
| 30 | |
| 31 | namespace PoincareMT.LeviCivitaData |
| 32 | |
| 33 | /-- Positivity of the actual operator tested on the two-vector skew |
| 34 | frame gives the actual sectional numerator in every dimension. -/ |
| 35 | theorem sectional_nonneg_of_nonnegative_operator |
| 36 | {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 37 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 38 | {g : RiemannianMetric n M} (D : LeviCivitaData g) (x : M) |
| 39 | (hD : D.NonnegativeCurvatureOperator x) (v w : TangentSpace (𝓡 n) x) : |
| 40 | 0 ≤ D.curvatureTensor x v w v w := by |
| 41 | have hA : IsSkewCoefficient 2 ![![0, 1], ![-1, 0]] := by |
| 42 | intro i j |
| 43 | fin_cases i <;> fin_cases j <;> norm_num |
| 44 | have hh := D.curvatureOperator_nonneg_in_frame x hD ![v, w] _ hA |
| 45 | norm_num [Fin.sum_univ_two] at hh |
| 46 | have hfirst := M04.curvatureTensor_swap_first D x w v v w |
| 47 | have hlast := M04.curvatureTensor_swap_last D x v w w v |
| 48 | have hboth := M04.curvatureTensor_swap_first D x w v w v |
| 49 | linarith |
| 50 | |
| 51 | end PoincareMT.LeviCivitaData |
| 52 | |
| 53 | namespace PoincareMT.M34 |
| 54 | |
| 55 | private local instance {J : Set ℝ} {L : BlowupLimitFlow.{u} J} : |
| 56 | TopologicalSpace L.carrier.carrier := L.carrier.topologicalSpace |
| 57 | private local instance {J : Set ℝ} {L : BlowupLimitFlow.{u} J} : |
| 58 | ChartedSpace (EuclideanSpace ℝ (Fin 3)) L.carrier.carrier := L.carrier.chartedSpace |
| 59 | private local instance {J : Set ℝ} {L : BlowupLimitFlow.{u} J} : |
| 60 | IsManifold (𝓡 3) ∞ L.carrier.carrier := L.carrier.isManifold |
| 61 | private local instance {J : Set ℝ} {L : BlowupLimitFlow.{u} J} : |
| 62 | MeasurableSpace L.carrier.carrier := L.carrier.measurableSpace |
| 63 | private local instance {J : Set ℝ} {L : BlowupLimitFlow.{u} J} : |
| 64 | BorelSpace L.carrier.carrier := L.carrier.borelSpace |
| 65 | private local instance {J : Set ℝ} {L : BlowupLimitFlow.{u} J} : |
| 66 | T2Space L.carrier.carrier := L.carrier.t2Space |
| 67 | private local instance {J : Set ℝ} {L : BlowupLimitFlow.{u} J} : |
| 68 | T3Space L.carrier.carrier := L.carrier.t3Space |
| 69 | private local instance {J : Set ℝ} {L : BlowupLimitFlow.{u} J} : |
| 70 | SecondCountableTopology L.carrier.carrier := L.carrier.secondCountable |
| 71 | private local instance {J : Set ℝ} {L : BlowupLimitFlow.{u} J} : |
| 72 | ConnectedSpace L.carrier.carrier := L.connectedSpace |
| 73 | |
| 74 | /-- Every retained zero slice has the actual completeness, Ricci |
| 75 | nonnegativity and scalar-one normalization needed by cap transport. -/ |
| 76 | theorem blowupLimit_zero_geometry {J : Set ℝ} (L : BlowupLimitFlow.{u} J) : |
| 77 | MetricComplete (L.flow.metric 0) ∧ |
| 78 | (∀ x : L.carrier.carrier, ∀ v : TangentSpace (𝓡 3) x, |
| 79 | 0 ≤ (L.flow.connection 0).ricci x v v) ∧ |
| 80 | (L.flow.connection 0).scalarCurvature L.base = 1 := by |
| 81 | refine ⟨L.complete 0 L.zero_mem, ?_, L.scalar_normalized⟩ |
| 82 | intro x v |
| 83 | exact M04.nonneg_ricci_of_nonnegativeSectionalAt (L.flow.connection 0) x |
| 84 | ((L.flow.connection 0).sectional_nonneg_of_nonnegative_operator x |
| 85 | (L.nonnegative_curvature_operator 0 L.zero_mem x)) v |
| 86 | |
| 87 | /-- An actual classified ancient cap becomes a cap for the literal |
| 88 | limit metric and connection, preserving its constant and core base. |
| 89 | No normalization or geometric persistence is assumed. -/ |
| 90 | theorem exists_normalized_limit_cap_of_ancient |
| 91 | (L : BlowupLimitFlow.{u} (blowupBackwardInterval ⊤)) {kappa delta C : ℝ} |
| 92 | (A : M30AncientKappaIdentification L kappa) |
| 93 | (N : M27CanonicalCap A.certificate.solution 0 L.base delta C) : |
| 94 | ∃ H : CapCertificate (L.flow.metric 0), H.epsilon = delta ∧ H.cap_constant ≤ C ∧ |
| 95 | H.connection = L.flow.connection 0 ∧ L.base ∈ H.core := by |
| 96 | let f := Diffeomorph.refl (𝓡 3) L.carrier.carrier ∞ |
| 97 | have hf : MetricHomothety (A.certificate.solution.flow.metric 0) |
| 98 | (L.flow.metric 0) f 1 := by |
| 99 | intro x v w |
| 100 | change (L.flow.metric 0).inner x (mfderiv (𝓡 3) (𝓡 3) id x v) |
| 101 | (mfderiv (𝓡 3) (𝓡 3) id x w) = _ |
| 102 | rw [mfderiv_id] |
| 103 | simp only [ContinuousLinearMap.id_apply, one_mul, A.certificate.metric_eq 0 le_rfl] |
| 104 | obtain ⟨H, hepsilon, hC, hD, hcore, _⟩ := |
| 105 | N.cap.exists_isometric_image_cap f hf (L.flow.connection 0) |
| 106 | refine ⟨H, hepsilon.trans N.epsilon_eq, hC.trans_le N.constant_le, hD, ?_⟩ |
| 107 | rw [hcore] |
| 108 | exact ⟨L.base, N.contains, rfl⟩ |
| 109 | |
| 110 | end PoincareMT.M34 |