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 | /- Adapted from Mapher `PoincareMT/Proofs/M03/Existence/MetricPerturbationNative.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import PoincareLib.Geometry.Riemannian.Connection |
| 6 | import PoincareLib.Geometry.RicciFlow.Basic |
| 7 | import Mathlib.Geometry.Manifold.VectorBundle.ContMDiffSection |
| 8 | |
| 9 | /-! |
| 10 | # Native positive metric decoder |
| 11 | |
| 12 | This is the metric-reconstruction node used by a local DeTurck producer. A |
| 13 | smooth symmetric perturbation which is bounded by a fixed fraction of a |
| 14 | background metric is decoded directly into a genuine |
| 15 | `ContMDiffRiemannianMetric`. No flow or analytic existence result is assumed. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | set_option maxHeartbeats 1600000 |
| 20 | set_option synthInstance.maxHeartbeats 100000 |
| 21 | |
| 22 | open scoped Manifold ContDiff Bundle |
| 23 | |
| 24 | noncomputable section |
| 25 | |
| 26 | universe u |
| 27 | |
| 28 | namespace PoincareMT |
| 29 | |
| 30 | variable {n : ℕ} {M : Type u} |
| 31 | [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 32 | [IsManifold (𝓡 n) ∞ M] |
| 33 | |
| 34 | local notation "E" => EuclideanSpace ℝ (Fin n) |
| 35 | local notation "FiberBilin" => |
| 36 | fun x : M => TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x →L[ℝ] ℝ |
| 37 | |
| 38 | /-- A smooth symmetric tensor whose quadratic part is at most half the |
| 39 | background metric. -/ |
| 40 | structure SmallMetricPerturbation (g₀ : RiemannianMetric n M) where |
| 41 | tensor : ∀ x : M, FiberBilin x |
| 42 | symm : ∀ (x : M) (v w : TangentSpace (𝓡 n) x), |
| 43 | tensor x v w = tensor x w v |
| 44 | small : ∀ (x : M) (v : TangentSpace (𝓡 n) x), |
| 45 | |tensor x v v| ≤ (1 / 2 : ℝ) * g₀.inner x v v |
| 46 | smooth : ContMDiff (𝓡 n) |
| 47 | ((𝓡 n).prod 𝓘(ℝ, E →L[ℝ] E →L[ℝ] ℝ)) ∞ |
| 48 | (fun x : M => Bundle.TotalSpace.mk' |
| 49 | (E →L[ℝ] E →L[ℝ] ℝ) x (tensor x)) |
| 50 | |
| 51 | namespace SmallMetricPerturbation |
| 52 | |
| 53 | variable {g₀ : RiemannianMetric n M} (P : SmallMetricPerturbation g₀) |
| 54 | |
| 55 | theorem lower_bound (x : M) (v : TangentSpace (𝓡 n) x) : |
| 56 | (1 / 2 : ℝ) * g₀.inner x v v ≤ g₀.inner x v v + P.tensor x v v := by |
| 57 | have h := neg_le_of_abs_le (P.small x v) |
| 58 | linarith |
| 59 | |
| 60 | theorem positive (x : M) (v : TangentSpace (𝓡 n) x) (hv : v ≠ 0) : |
| 61 | 0 < g₀.inner x v v + P.tensor x v v := by |
| 62 | exact (mul_pos (by norm_num) (g₀.pos x v hv)).trans_le (P.lower_bound x v) |
| 63 | |
| 64 | /-- Decode the perturbation as a metric. -/ |
| 65 | noncomputable def metric : RiemannianMetric n M where |
| 66 | inner x := g₀.inner x + P.tensor x |
| 67 | symm x v w := by |
| 68 | simp only [add_apply] |
| 69 | rw [g₀.symm] |
| 70 | exact congrArg (fun z => g₀.inner x w v + z) (P.symm x v w) |
| 71 | pos x v hv := P.positive x v hv |
| 72 | isVonNBounded x := by |
| 73 | let c : ℝ := 1 / 2 |
| 74 | let L : TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x := |
| 75 | (Real.sqrt c)⁻¹ • ContinuousLinearMap.id ℝ (TangentSpace (𝓡 n) x) |
| 76 | refine ((g₀.isVonNBounded x).image L).subset ?_ |
| 77 | intro v hv |
| 78 | refine ⟨Real.sqrt c • v, ?_, ?_⟩ |
| 79 | · change g₀.inner x (Real.sqrt c • v) (Real.sqrt c • v) < 1 |
| 80 | simp only [map_smul, smul_apply, smul_eq_mul] |
| 81 | rw [← mul_assoc, Real.mul_self_sqrt (by norm_num : 0 ≤ c)] |
| 82 | exact (P.lower_bound x v).trans_lt hv |
| 83 | · change (Real.sqrt c)⁻¹ • (Real.sqrt c • v) = v |
| 84 | rw [smul_smul, inv_mul_cancel₀ (Real.sqrt_ne_zero'.mpr (by norm_num : 0 < c)), |
| 85 | one_smul] |
| 86 | contMDiff := g₀.contMDiff.add_section P.smooth |
| 87 | |
| 88 | @[simp] theorem metric_inner (x : M) (v w : TangentSpace (𝓡 n) x) : |
| 89 | P.metric.inner x v w = g₀.inner x v w + P.tensor x v w := rfl |
| 90 | |
| 91 | theorem metric_lower_bound (x : M) (v : TangentSpace (𝓡 n) x) : |
| 92 | (1 / 2 : ℝ) * g₀.inner x v v ≤ P.metric.inner x v v := by |
| 93 | exact P.lower_bound x v |
| 94 | |
| 95 | theorem metric_positive (x : M) (v : TangentSpace (𝓡 n) x) (hv : v ≠ 0) : |
| 96 | 0 < P.metric.inner x v v := by |
| 97 | exact P.positive x v hv |
| 98 | |
| 99 | end SmallMetricPerturbation |
| 100 | |
| 101 | /-- The zero perturbation is the actual initial metric seed. -/ |
| 102 | noncomputable def SmallMetricPerturbation.zero (g₀ : RiemannianMetric n M) : |
| 103 | SmallMetricPerturbation g₀ where |
| 104 | tensor := fun _ => 0 |
| 105 | symm := by simp |
| 106 | small := by |
| 107 | intro x v |
| 108 | simp only [zero_apply, abs_zero] |
| 109 | by_cases hv : v = 0 |
| 110 | · simp [hv] |
| 111 | · exact (mul_pos (by norm_num) (g₀.pos x v hv)).le |
| 112 | smooth := by |
| 113 | change ContMDiff (𝓡 n) |
| 114 | ((𝓡 n).prod 𝓘(ℝ, E →L[ℝ] E →L[ℝ] ℝ)) ∞ |
| 115 | (Bundle.zeroSection (E →L[ℝ] E →L[ℝ] ℝ) (fun x : M => FiberBilin x)) |
| 116 | exact Bundle.contMDiff_zeroSection ℝ _ |
| 117 | |
| 118 | @[simp] theorem SmallMetricPerturbation.zero_metric |
| 119 | (g₀ : RiemannianMetric n M) : |
| 120 | (SmallMetricPerturbation.zero g₀).metric = g₀ := by |
| 121 | have hinner : ∀ (x : M) (v w : TangentSpace (𝓡 n) x), |
| 122 | (SmallMetricPerturbation.zero g₀).metric.inner x v w = g₀.inner x v w := by |
| 123 | intro x v w |
| 124 | change g₀.inner x v w + (0 : FiberBilin x) v w = g₀.inner x v w |
| 125 | simp |
| 126 | cases h₁ : (SmallMetricPerturbation.zero g₀).metric |
| 127 | cases h₂ : g₀ |
| 128 | simp only [Bundle.ContMDiffRiemannianMetric.mk.injEq] |
| 129 | funext x |
| 130 | apply ContinuousLinearMap.ext |
| 131 | intro v |
| 132 | apply ContinuousLinearMap.ext |
| 133 | intro w |
| 134 | simpa only [h₁, h₂] using hinner x v w |
| 135 | |
| 136 | /-! The same decoder at every time, with the joint section exposed in the |
| 137 | native spacetime form used by the short-time contract. -/ |
| 138 | |
| 139 | structure SmallMetricPath (g₀ : RiemannianMetric n M) (J : Set ℝ) where |
| 140 | tensor : ℝ → ∀ x : M, FiberBilin x |
| 141 | symm : ∀ (t : ℝ) (x : M) (v w : TangentSpace (𝓡 n) x), |
| 142 | tensor t x v w = tensor t x w v |
| 143 | small : ∀ (t : ℝ) (x : M) (v : TangentSpace (𝓡 n) x), |
| 144 | |tensor t x v v| ≤ (1 / 2 : ℝ) * g₀.inner x v v |
| 145 | slice_smooth : ∀ t : ℝ, |
| 146 | ContMDiff (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, E →L[ℝ] E →L[ℝ] ℝ)) ∞ |
| 147 | (fun x : M => Bundle.TotalSpace.mk' |
| 148 | (E →L[ℝ] E →L[ℝ] ℝ) x (tensor t x)) |
| 149 | joint_smooth : RiemannianMetric.IsSmoothFamilyOn |
| 150 | (fun t => SmallMetricPerturbation.metric |
| 151 | ({ tensor := tensor t |
| 152 | symm := symm t |
| 153 | small := small t |
| 154 | smooth := slice_smooth t } : SmallMetricPerturbation g₀)) J |
| 155 | initial_zero : ∀ (x : M) (v w : TangentSpace (𝓡 n) x), |
| 156 | tensor 0 x v w = 0 |
| 157 | |
| 158 | namespace SmallMetricPath |
| 159 | |
| 160 | variable {g₀ : RiemannianMetric n M} {J : Set ℝ} |
| 161 | (P : SmallMetricPath g₀ J) |
| 162 | |
| 163 | noncomputable def slice (t : ℝ) : SmallMetricPerturbation g₀ where |
| 164 | tensor := P.tensor t |
| 165 | symm := P.symm t |
| 166 | small := P.small t |
| 167 | smooth := P.slice_smooth t |
| 168 | |
| 169 | noncomputable def metric (t : ℝ) : RiemannianMetric n M := (P.slice t).metric |
| 170 | |
| 171 | @[simp] theorem metric_inner (t : ℝ) (x : M) |
| 172 | (v w : TangentSpace (𝓡 n) x) : |
| 173 | (P.metric t).inner x v w = g₀.inner x v w + P.tensor t x v w := rfl |
| 174 | |
| 175 | theorem metric_initial : P.metric 0 = g₀ := by |
| 176 | have hinner : ∀ (x : M) (v w : TangentSpace (𝓡 n) x), |
| 177 | (P.metric 0).inner x v w = g₀.inner x v w := by |
| 178 | intro x v w |
| 179 | rw [P.metric_inner, P.initial_zero] |
| 180 | simp |
| 181 | cases h₁ : P.metric 0 |
| 182 | cases h₂ : g₀ |
| 183 | simp only [Bundle.ContMDiffRiemannianMetric.mk.injEq] |
| 184 | funext x |
| 185 | apply ContinuousLinearMap.ext |
| 186 | intro v |
| 187 | apply ContinuousLinearMap.ext |
| 188 | intro w |
| 189 | simpa only [h₁, h₂] using hinner x v w |
| 190 | |
| 191 | theorem metric_isSmoothFamilyOn : |
| 192 | RiemannianMetric.IsSmoothFamilyOn P.metric J := by |
| 193 | change RiemannianMetric.IsSmoothFamilyOn |
| 194 | (fun t => (P.slice t).metric) J |
| 195 | exact P.joint_smooth |
| 196 | |
| 197 | theorem metric_lower_bound (t : ℝ) (x : M) |
| 198 | (v : TangentSpace (𝓡 n) x) : |
| 199 | (1 / 2 : ℝ) * g₀.inner x v v ≤ (P.metric t).inner x v v := by |
| 200 | exact (P.slice t).metric_lower_bound x v |
| 201 | |
| 202 | end SmallMetricPath |
| 203 | |
| 204 | end PoincareMT |