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.Generalized.BoundedDistance.MetricAliases |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.GeometryImports |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Spheres.RoundTransfer |
| 4 | import PoincareLib.Geometry.RicciFlow.Local.Metric.MetricInverse |
| 5 | |
| 6 | /-! |
| 7 | # Compact normalized model jets |
| 8 | |
| 9 | The zeroth coefficient is fixed to the Euclidean inner product. Bounds on |
| 10 | the first and second coefficient derivatives then give a compact finite |
| 11 | dimensional envelope. The scalar-six family is a subfamily of that envelope; |
| 12 | the uniform modulus is obtained on the envelope, so the nearby jet is not |
| 13 | required to have scalar curvature six. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | set_option maxSynthPendingDepth 12 |
| 19 | |
| 20 | open Set |
| 21 | open scoped Manifold ContDiff Bundle BigOperators Topology Uniformity |
| 22 | |
| 23 | noncomputable section |
| 24 | |
| 25 | universe u |
| 26 | |
| 27 | namespace PoincareMT.M28.tube |
| 28 | |
| 29 | open PoincareMT.SpacetimeBounds |
| 30 | |
| 31 | abbrev JetE := EuclideanSpace ℝ (Fin 3) |
| 32 | abbrev JetMetric := MetricCoefficient 3 |
| 33 | |
| 34 | -- These aliases must be introduced in dependency order: the continuous-linear |
| 35 | -- map topology on the next jet level uses the preceding level's topology. |
| 36 | local instance jetMetricNorm : NormedAddCommGroup JetMetric := |
| 37 | ContinuousLinearMap.toNormedAddCommGroup |
| 38 | local instance jetMetricSpace : NormedSpace ℝ JetMetric := |
| 39 | ContinuousLinearMap.toNormedSpace |
| 40 | |
| 41 | abbrev JetFirst := JetE →L[ℝ] JetMetric |
| 42 | local instance jetFirstNorm : NormedAddCommGroup JetFirst := |
| 43 | ContinuousLinearMap.toNormedAddCommGroup |
| 44 | local instance jetFirstSpace : NormedSpace ℝ JetFirst := |
| 45 | ContinuousLinearMap.toNormedSpace |
| 46 | |
| 47 | abbrev JetSecond := JetE →L[ℝ] JetFirst |
| 48 | local instance jetSecondNorm : NormedAddCommGroup JetSecond := |
| 49 | ContinuousLinearMap.toNormedAddCommGroup |
| 50 | local instance jetSecondSpace : NormedSpace ℝ JetSecond := |
| 51 | ContinuousLinearMap.toNormedSpace |
| 52 | |
| 53 | local instance jetFirstAdd : AddCommMonoid JetFirst := |
| 54 | jetFirstNorm.toAddCommMonoid |
| 55 | local instance jetSecondAdd : AddCommMonoid JetSecond := |
| 56 | jetSecondNorm.toAddCommMonoid |
| 57 | local instance jetFirstModule : Module ℝ JetFirst := jetFirstSpace.toModule |
| 58 | local instance jetSecondModule : Module ℝ JetSecond := jetSecondSpace.toModule |
| 59 | local instance jetMetricFinite : Module.Finite ℝ JetMetric := |
| 60 | ContinuousLinearMap.instModuleFinite |
| 61 | local instance jetFirstFinite : Module.Finite ℝ JetFirst := |
| 62 | ContinuousLinearMap.instModuleFinite |
| 63 | local instance jetSecondFinite : Module.Finite ℝ JetSecond := |
| 64 | ContinuousLinearMap.instModuleFinite |
| 65 | local instance jetTailFinite : Module.Finite ℝ (JetFirst × JetSecond) := |
| 66 | Module.Finite.prod |
| 67 | local instance jetAllFinite : Module.Finite ℝ (JetMetric × (JetFirst × JetSecond)) := |
| 68 | Module.Finite.prod |
| 69 | local instance jetAllProper : ProperSpace (MetricTwoJet 3) := |
| 70 | FiniteDimensional.proper ℝ _ |
| 71 | |
| 72 | noncomputable def normalizedEuclideanMetric : JetMetric := |
| 73 | (innerSL ℝ).toLinearMap.toContinuousLinearMap |
| 74 | |
| 75 | def roundJetBoundSet (B₁ B₂ : ℝ) : Set (MetricTwoJet 3) := |
| 76 | {J | J.1 = normalizedEuclideanMetric ∧ |
| 77 | ‖J.2.1‖ ≤ B₁ ∧ ‖J.2.2‖ ≤ B₂} |
| 78 | |
| 79 | def roundJetScalarSixSet (B₁ B₂ : ℝ) : Set (MetricTwoJet 3) := |
| 80 | {J | J ∈ roundJetBoundSet B₁ B₂ ∧ jetScalarCurvature J = 6} |
| 81 | |
| 82 | theorem normalizedEuclideanMetric_isInvertible : |
| 83 | normalizedEuclideanMetric.IsInvertible := by |
| 84 | apply PoincareMT.Proofs.M03.isInvertible_bilinear_of_pos |
| 85 | intro v hv |
| 86 | change inner ℝ v v > 0 |
| 87 | exact real_inner_self_pos.mpr hv |
| 88 | |
| 89 | theorem isCompact_roundJetBoundSet (B₁ B₂ : ℝ) : |
| 90 | IsCompact (roundJetBoundSet B₁ B₂) := by |
| 91 | have hprod : IsCompact |
| 92 | (({normalizedEuclideanMetric} : Set JetMetric) ×ˢ |
| 93 | (Metric.closedBall (0 : JetFirst) B₁ ×ˢ |
| 94 | Metric.closedBall (0 : JetSecond) B₂)) := by |
| 95 | exact isCompact_singleton.prod |
| 96 | ((isCompact_closedBall (0 : JetFirst) B₁).prod |
| 97 | (isCompact_closedBall (0 : JetSecond) B₂)) |
| 98 | have heq : roundJetBoundSet B₁ B₂ = |
| 99 | (({normalizedEuclideanMetric} : Set JetMetric) ×ˢ |
| 100 | (Metric.closedBall (0 : JetFirst) B₁ ×ˢ |
| 101 | Metric.closedBall (0 : JetSecond) B₂)) := by |
| 102 | ext J |
| 103 | simp [roundJetBoundSet, Metric.mem_closedBall, dist_zero_right] |
| 104 | rw [heq] |
| 105 | exact hprod |
| 106 | |
| 107 | theorem roundJetScalarSixSet_subset_boundSet (B₁ B₂ : ℝ) : |
| 108 | roundJetScalarSixSet B₁ B₂ ⊆ roundJetBoundSet B₁ B₂ := by |
| 109 | intro J hJ |
| 110 | exact hJ.1 |
| 111 | |
| 112 | theorem exists_roundJet_scalar_uniform_modulus |
| 113 | (B₁ B₂ : ℝ) {delta : ℝ} (hdelta : 0 < delta) : |
| 114 | ∃ eta : ℝ, 0 < eta ∧ |
| 115 | ∀ J ∈ roundJetScalarSixSet B₁ B₂, |
| 116 | ∀ L : MetricTwoJet 3, dist L J < eta → |
| 117 | |jetScalarCurvature L - 6| < delta := by |
| 118 | have hcompact : IsCompact (roundJetBoundSet B₁ B₂) := |
| 119 | isCompact_roundJetBoundSet B₁ B₂ |
| 120 | have hinvertible : ∀ J ∈ roundJetBoundSet B₁ B₂, |
| 121 | J.1.IsInvertible := by |
| 122 | intro J hJ |
| 123 | rw [hJ.1] |
| 124 | exact normalizedEuclideanMetric_isInvertible |
| 125 | obtain ⟨eta, heta, hmod⟩ := |
| 126 | exists_jetScalarCurvature_uniform_modulus |
| 127 | (K := roundJetBoundSet B₁ B₂) hcompact hinvertible hdelta |
| 128 | refine ⟨eta, heta, ?_⟩ |
| 129 | intro J hJ L hLJ |
| 130 | have hbase := hmod J (roundJetScalarSixSet_subset_boundSet B₁ B₂ hJ) |
| 131 | L hLJ |
| 132 | have hsix : jetScalarCurvature J = 6 := hJ.2 |
| 133 | simpa [hsix] using hbase |
| 134 | |
| 135 | end PoincareMT.M28.tube |