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/DeTurckPrincipalForcingNative.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import PoincareLib.Geometry.RicciFlow.Local.DeTurck.Jets.DeTurckSourceJet |
| 6 | import PoincareLib.Geometry.RicciFlow.Local.DeTurck.Jets.DeTurckJetAffine |
| 7 | import PoincareLib.Geometry.RicciFlow.Local.DeTurck.Construction.DeTurckQuasilinearEstimate |
| 8 | import PoincareLib.Geometry.RicciFlow.Local.DeTurck.Construction.DeTurckMetricProducer |
| 9 | |
| 10 | /-! |
| 11 | The exact top derivative in the principal DeTurck forcing has the original |
| 12 | inverse-difference coefficient. Every remaining term differentiates that |
| 13 | coefficient and uses metric jets of one lower order. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option maxHeartbeats 1600000 |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | noncomputable section |
| 21 | |
| 22 | open scoped Manifold ContDiff Bundle BigOperators |
| 23 | |
| 24 | namespace PoincareMT.DeTurckPrincipalForcingNative |
| 25 | |
| 26 | open DeTurckRationalJetNative DeTurckSourceJetNative DeTurckQuasilinearEstimateNative |
| 27 | open DeTurckJetAffineNative TensorProbeNative |
| 28 | |
| 29 | universe u v |
| 30 | |
| 31 | variable {iota : Type u} {n : ℕ} [Fintype iota] |
| 32 | |
| 33 | def inverseDifferenceExpr (a b : Fin n) : Expr iota n := |
| 34 | .add (.atom (.inverse false a b)) (.neg (.atom (.inverse true a b))) |
| 35 | |
| 36 | def metricDifferenceExpr (word : List iota) (i j : Fin n) : Expr iota n := |
| 37 | .add (.atom (.metric false word i j)) (.neg (.atom (.metric true word i j))) |
| 38 | |
| 39 | def principalTermExpr (e : Fin n → iota) (a b i j : Fin n) : Expr iota n := |
| 40 | .mul (inverseDifferenceExpr a b) (metricDifferenceExpr [e a, e b] i j) |
| 41 | |
| 42 | def principalTermTopExpr (e : Fin n → iota) (a b i j : Fin n) |
| 43 | (word : List iota) : Expr iota n := |
| 44 | .mul (inverseDifferenceExpr a b) (metricDifferenceExpr (word ++ [e a, e b]) i j) |
| 45 | |
| 46 | def principalTermTailExpr (e : Fin n → iota) (a b i j : Fin n) |
| 47 | (word : List iota) : Expr iota n := |
| 48 | Expr.sumList (differentiatedCoefficientSplits word) (fun p => |
| 49 | .mul ((inverseDifferenceExpr a b).orderedDerivative p.1) |
| 50 | (metricDifferenceExpr (p.2 ++ [e a, e b]) i j)) |
| 51 | |
| 52 | @[simp] theorem degree_inverseDifferenceExpr (a b : Fin n) : |
| 53 | (inverseDifferenceExpr (iota := iota) a b).degree = 0 := by |
| 54 | simp [inverseDifferenceExpr, Expr.degree, Atom.weight] |
| 55 | |
| 56 | @[simp] theorem metricOrder_inverseDifferenceExpr (a b : Fin n) (label : Bool) : |
| 57 | (inverseDifferenceExpr (iota := iota) a b).metricOrder label = 0 := by |
| 58 | simp [inverseDifferenceExpr, Expr.metricOrder] |
| 59 | |
| 60 | @[simp] theorem degree_metricDifferenceExpr (word : List iota) (i j : Fin n) : |
| 61 | (metricDifferenceExpr word i j).degree = word.length := by |
| 62 | simp [metricDifferenceExpr, Expr.degree, Atom.weight] |
| 63 | |
| 64 | @[simp] theorem metricOrder_metricDifferenceExpr |
| 65 | (word : List iota) (i j : Fin n) (label : Bool) : |
| 66 | (metricDifferenceExpr word i j).metricOrder label = word.length := by |
| 67 | cases label <;> simp [metricDifferenceExpr, Expr.metricOrder] |
| 68 | |
| 69 | theorem orderedDerivative_metricDifferenceExpr |
| 70 | (headWord suffix : List iota) (i j : Fin n) : |
| 71 | (metricDifferenceExpr suffix i j).orderedDerivative headWord = |
| 72 | metricDifferenceExpr (headWord ++ suffix) i j := by |
| 73 | induction headWord with |
| 74 | | nil => rfl |
| 75 | | cons a headWord ih => |
| 76 | change Expr.derivative a ((metricDifferenceExpr suffix i j).orderedDerivative headWord) = _ |
| 77 | rw [ih] |
| 78 | rfl |
| 79 | |
| 80 | /-- All tail factors have total derivative degree at most that of the original source. -/ |
| 81 | theorem degree_principalTermTailExpr_le (e : Fin n → iota) |
| 82 | (a b i j : Fin n) (word : List iota) : |
| 83 | (principalTermTailExpr e a b i j word).degree ≤ word.length + 2 := by |
| 84 | apply Expr.degree_sumList_le |
| 85 | intro p hp |
| 86 | obtain ⟨hpos, hlen⟩ := differentiatedCoefficientSplits_order word p hp |
| 87 | have hcoeff := Expr.degree_orderedDerivative_le p.1 |
| 88 | (inverseDifferenceExpr (iota := iota) a b) |
| 89 | simp only [degree_inverseDifferenceExpr, zero_add] at hcoeff |
| 90 | change ((inverseDifferenceExpr a b).orderedDerivative p.1).degree + |
| 91 | (metricDifferenceExpr (p.2 ++ [e a, e b]) i j).degree ≤ _ |
| 92 | rw [degree_metricDifferenceExpr] |
| 93 | simp only [List.length_append, List.length_cons, List.length_nil] |
| 94 | omega |
| 95 | |
| 96 | /-- Both background and current high factors in the tail come from the lower trace order. -/ |
| 97 | theorem metricOrder_principalTermTailExpr_le (e : Fin n → iota) |
| 98 | (a b i j : Fin n) (word : List iota) (label : Bool) : |
| 99 | (principalTermTailExpr e a b i j word).metricOrder label ≤ word.length + 1 := by |
| 100 | apply Expr.metricOrder_sumList_le |
| 101 | intro p hp |
| 102 | obtain ⟨hpos, hlen⟩ := differentiatedCoefficientSplits_order word p hp |
| 103 | have hcoeff := Expr.metricOrder_orderedDerivative_le p.1 |
| 104 | (inverseDifferenceExpr (iota := iota) a b) label |
| 105 | simp only [metricOrder_inverseDifferenceExpr, zero_add] at hcoeff |
| 106 | change max (((inverseDifferenceExpr a b).orderedDerivative p.1).metricOrder label) |
| 107 | ((metricDifferenceExpr (p.2 ++ [e a, e b]) i j).metricOrder label) ≤ _ |
| 108 | rw [metricOrder_metricDifferenceExpr] |
| 109 | simp only [List.length_append, List.length_cons, List.length_nil] |
| 110 | omega |
| 111 | |
| 112 | def principalExpr (e : Fin n → iota) (i j : Fin n) : Expr iota n := |
| 113 | Expr.sumFin (fun a => Expr.sumFin (fun b => principalTermExpr e a b i j)) |
| 114 | |
| 115 | def principalTopExpr (e : Fin n → iota) (i j : Fin n) (word : List iota) : Expr iota n := |
| 116 | Expr.sumFin (fun a => Expr.sumFin (fun b => principalTermTopExpr e a b i j word)) |
| 117 | |
| 118 | def principalTailExpr (e : Fin n → iota) (i j : Fin n) (word : List iota) : Expr iota n := |
| 119 | Expr.sumFin (fun a => Expr.sumFin (fun b => principalTermTailExpr e a b i j word)) |
| 120 | |
| 121 | theorem degree_principalTailExpr_le (e : Fin n → iota) (i j : Fin n) (word : List iota) : |
| 122 | (principalTailExpr e i j word).degree ≤ word.length + 2 := |
| 123 | Expr.degree_sumFin_le _ _ (fun a => Expr.degree_sumFin_le _ _ |
| 124 | (fun b => degree_principalTermTailExpr_le e a b i j word)) |
| 125 | |
| 126 | theorem metricOrder_principalTailExpr_le (e : Fin n → iota) |
| 127 | (i j : Fin n) (word : List iota) (label : Bool) : |
| 128 | (principalTailExpr e i j word).metricOrder label ≤ word.length + 1 := |
| 129 | Expr.metricOrder_sumFin_le _ _ _ (fun a => Expr.metricOrder_sumFin_le _ _ _ |
| 130 | (fun b => metricOrder_principalTermTailExpr_le e a b i j word label)) |
| 131 | |
| 132 | theorem principalTail_highAtom_order (e : Fin n → iota) (i j : Fin n) |
| 133 | (word : List iota) (r : ℕ) (hword : word.length ≤ 2 * r) |
| 134 | (a : HighAtom (principalTailExpr e i j word) (r + 1)) : |
| 135 | ∃ (label : Bool) (v : List iota) (k l : Fin n), |
| 136 | a.val.val = Atom.metric label v k l ∧ r + 1 < v.length ∧ v.length ≤ 2 * r + 1 := by |
| 137 | obtain ⟨label, v, k, l, ha, hlow, hhigh⟩ := |
| 138 | highAtom_is_metric (principalTailExpr e i j word) (r + 1) a |
| 139 | refine ⟨label, v, k, l, ha, hlow, ?_⟩ |
| 140 | exact (hhigh.trans (metricOrder_principalTailExpr_le e i j word label)).trans (by omega) |
| 141 | |
| 142 | def residualExpr (e : Fin n → iota) (i j : Fin n) : Expr iota n := |
| 143 | .add (principalExpr e i j) (lowerPerturbationExpr e i j) |
| 144 | |
| 145 | /-- The trace part retains the full lower perturbation, including the background second jet. -/ |
| 146 | def residualTraceExpr (e : Fin n → iota) (i j : Fin n) (word : List iota) : Expr iota n := |
| 147 | .add (principalTailExpr e i j word) ((lowerPerturbationExpr e i j).orderedDerivative word) |
| 148 | |
| 149 | theorem degree_residualTraceExpr_le (e : Fin n → iota) (i j : Fin n) (word : List iota) : |
| 150 | (residualTraceExpr e i j word).degree ≤ word.length + 2 := by |
| 151 | change max (principalTailExpr e i j word).degree |
| 152 | ((lowerPerturbationExpr e i j).orderedDerivative word).degree ≤ _ |
| 153 | exact max_le (degree_principalTailExpr_le e i j word) |
| 154 | ((degree_ordered_lowerPerturbationExpr_le e i j word).trans (by omega)) |
| 155 | |
| 156 | theorem currentOrder_residualTraceExpr_le (e : Fin n → iota) |
| 157 | (i j : Fin n) (word : List iota) : |
| 158 | (residualTraceExpr e i j word).metricOrder false ≤ word.length + 1 := by |
| 159 | change max ((principalTailExpr e i j word).metricOrder false) |
| 160 | (((lowerPerturbationExpr e i j).orderedDerivative word).metricOrder false) ≤ _ |
| 161 | exact max_le (metricOrder_principalTailExpr_le e i j word false) |
| 162 | ((currentOrder_ordered_lowerPerturbationExpr_le e i j word).trans (by omega)) |
| 163 | |
| 164 | private theorem orderedDerivative_add (word : List iota) (p q : Expr iota n) : |
| 165 | (Expr.add p q).orderedDerivative word = |
| 166 | Expr.add (p.orderedDerivative word) (q.orderedDerivative word) := by |
| 167 | induction word with |
| 168 | | nil => rfl |
| 169 | | cons a word ih => |
| 170 | change Expr.derivative a ((Expr.add p q).orderedDerivative word) = _ |
| 171 | rw [ih] |
| 172 | rfl |
| 173 | |
| 174 | private theorem derivative_sumList {α : Type*} (a : iota) |
| 175 | (l : List α) (f : α → Expr iota n) : |
| 176 | (Expr.sumList l f).derivative a = Expr.sumList l (fun x => (f x).derivative a) := by |
| 177 | induction l with |
| 178 | | nil => rfl |
| 179 | | cons x l ih => |
| 180 | change Expr.add ((f x).derivative a) ((Expr.sumList l f).derivative a) = |
| 181 | Expr.add ((f x).derivative a) (Expr.sumList l (fun x => (f x).derivative a)) |
| 182 | rw [ih] |
| 183 | |
| 184 | private theorem orderedDerivative_sumList {α : Type*} (word : List iota) |
| 185 | (l : List α) (f : α → Expr iota n) : |
| 186 | (Expr.sumList l f).orderedDerivative word = |
| 187 | Expr.sumList l (fun x => (f x).orderedDerivative word) := by |
| 188 | induction word with |
| 189 | | nil => rfl |
| 190 | | cons a word ih => |
| 191 | rw [Expr.orderedDerivative, ih, derivative_sumList] |
| 192 | rfl |
| 193 | |
| 194 | private theorem orderedDerivative_sumFin (word : List iota) (f : Fin n → Expr iota n) : |
| 195 | (Expr.sumFin f).orderedDerivative word = |
| 196 | Expr.sumFin (fun a => (f a).orderedDerivative word) := |
| 197 | orderedDerivative_sumList word _ f |
| 198 | |
| 199 | section Native |
| 200 | |
| 201 | variable {M : Type v} [TopologicalSpace M] |
| 202 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 203 | [CompactSpace M] [MeasurableSpace M] [BorelSpace M] |
| 204 | (F : iota → SmoothField (n := n) (M := M)) |
| 205 | (G : Bool → M → Matrix (Fin n) (Fin n) ℝ) |
| 206 | |
| 207 | theorem eval_inverseDifferenceExpr (a b : Fin n) (x : M) : |
| 208 | (inverseDifferenceExpr a b).eval (nativeValues F G x) = |
| 209 | (G false x)⁻¹ a b - (G true x)⁻¹ a b := by |
| 210 | simp only [inverseDifferenceExpr, Expr.eval, nativeValues, sub_eq_add_neg] |
| 211 | |
| 212 | /-- The original top coefficient vanishes exactly at the fixed metric value. -/ |
| 213 | theorem inverseDifferenceExpr_eq_zero (a b : Fin n) (x : M) |
| 214 | (hG : G false x = G true x) : |
| 215 | (inverseDifferenceExpr a b).eval (nativeValues F G x) = 0 := by |
| 216 | rw [eval_inverseDifferenceExpr, hG, sub_self] |
| 217 | |
| 218 | theorem principalTopExpr_eq_zero (e : Fin n → iota) (i j : Fin n) (word : List iota) |
| 219 | (x : M) (hG : G false x = G true x) : |
| 220 | (principalTopExpr e i j word).eval (nativeValues F G x) = 0 := by |
| 221 | simp only [principalTopExpr, Expr.eval_sumFin] |
| 222 | apply Finset.sum_eq_zero |
| 223 | intro a _ |
| 224 | apply Finset.sum_eq_zero |
| 225 | intro b _ |
| 226 | change (inverseDifferenceExpr a b).eval (nativeValues F G x) * _ = 0 |
| 227 | rw [inverseDifferenceExpr_eq_zero F G a b x hG, zero_mul] |
| 228 | |
| 229 | variable (hG : ∀ b, ContMDiff (𝓡 n) 𝓘(ℝ, Fin n → Fin n → ℝ) ∞ |
| 230 | (fun x i j => G b x i j)) (hdet : ∀ b x, (G b x).det ≠ 0) |
| 231 | |
| 232 | include hG hdet |
| 233 | |
| 234 | theorem metricDifferenceExpr_ordered_eval |
| 235 | (headWord suffix : List iota) (i j : Fin n) (x : M) : |
| 236 | (metricDifferenceExpr (headWord ++ suffix) i j).eval (nativeValues F G x) = |
| 237 | directionalWord F headWord (fun y => |
| 238 | (metricDifferenceExpr suffix i j).eval (nativeValues F G y)) x := by |
| 239 | rw [← orderedDerivative_metricDifferenceExpr] |
| 240 | exact Expr.orderedDerivative_native _ F G hG hdet headWord x |
| 241 | |
| 242 | theorem eval_metricDifferenceExpr (word : List iota) (i j : Fin n) (x : M) : |
| 243 | (metricDifferenceExpr word i j).eval (nativeValues F G x) = |
| 244 | directionalWord F word (fun y => G false y i j - G true y i j) x := by |
| 245 | have h := metricDifferenceExpr_ordered_eval F G hG hdet word [] i j x |
| 246 | simpa only [List.append_nil, metricDifferenceExpr, Expr.eval, nativeValues, |
| 247 | directionalWord_nil, sub_eq_add_neg] using h |
| 248 | |
| 249 | /-- The ordered Leibniz expansion isolates the unique undifferentiated coefficient. -/ |
| 250 | theorem ordered_principalTermExpr_split (e : Fin n → iota) (a b i j : Fin n) |
| 251 | (word : List iota) (x : M) : |
| 252 | ((principalTermExpr e a b i j).orderedDerivative word).eval (nativeValues F G x) = |
| 253 | (principalTermTopExpr e a b i j word).eval (nativeValues F G x) + |
| 254 | (principalTermTailExpr e a b i j word).eval (nativeValues F G x) := by |
| 255 | rw [Expr.orderedDerivative_native _ F G hG hdet] |
| 256 | change directionalWord F word (fun y => |
| 257 | (inverseDifferenceExpr a b).eval (nativeValues F G y) * |
| 258 | (metricDifferenceExpr [e a, e b] i j).eval (nativeValues F G y)) x = _ |
| 259 | rw [directionalWord_mul_top_split F word |
| 260 | ((inverseDifferenceExpr a b).native_contMDiff F G hG hdet) |
| 261 | ((metricDifferenceExpr [e a, e b] i j).native_contMDiff F G hG hdet)] |
| 262 | change _ = (inverseDifferenceExpr a b).eval (nativeValues F G x) * |
| 263 | (metricDifferenceExpr (word ++ [e a, e b]) i j).eval (nativeValues F G x) + _ |
| 264 | rw [metricDifferenceExpr_ordered_eval F G hG hdet word [e a, e b] i j x] |
| 265 | congr 1 |
| 266 | rw [principalTermTailExpr, Expr.eval_sumList] |
| 267 | apply congrArg List.sum |
| 268 | apply List.map_congr_left |
| 269 | intro p hp |
| 270 | rw [Expr.eval, Expr.orderedDerivative_native _ F G hG hdet, |
| 271 | metricDifferenceExpr_ordered_eval F G hG hdet p.2 [e a, e b] i j x] |
| 272 | |
| 273 | theorem ordered_principalExpr_split (e : Fin n → iota) (i j : Fin n) |
| 274 | (word : List iota) (x : M) : |
| 275 | ((principalExpr e i j).orderedDerivative word).eval (nativeValues F G x) = |
| 276 | (principalTopExpr e i j word).eval (nativeValues F G x) + |
| 277 | (principalTailExpr e i j word).eval (nativeValues F G x) := by |
| 278 | simp only [principalExpr, orderedDerivative_sumFin, Expr.eval_sumFin, |
| 279 | ordered_principalTermExpr_split F G hG hdet, principalTopExpr, principalTailExpr, |
| 280 | Finset.sum_add_distrib] |
| 281 | |
| 282 | theorem eval_principalTopExpr (e : Fin n → iota) (i j : Fin n) |
| 283 | (word : List iota) (x : M) : |
| 284 | (principalTopExpr e i j word).eval (nativeValues F G x) = |
| 285 | ∑ a, ∑ b, ((G false x)⁻¹ a b - (G true x)⁻¹ a b) * |
| 286 | directionalWord F (word ++ [e a, e b]) |
| 287 | (fun y => G false y i j - G true y i j) x := by |
| 288 | simp only [principalTopExpr, Expr.eval_sumFin] |
| 289 | apply Finset.sum_congr rfl |
| 290 | intro a _ |
| 291 | apply Finset.sum_congr rfl |
| 292 | intro b _ |
| 293 | change (inverseDifferenceExpr a b).eval (nativeValues F G x) * |
| 294 | (metricDifferenceExpr (word ++ [e a, e b]) i j).eval (nativeValues F G x) = _ |
| 295 | rw [eval_inverseDifferenceExpr F G, eval_metricDifferenceExpr F G hG hdet] |
| 296 | |
| 297 | /-- Only the true top part contains a metric derivative above the trace order. -/ |
| 298 | theorem ordered_residualExpr_split (e : Fin n → iota) (i j : Fin n) |
| 299 | (word : List iota) (x : M) : |
| 300 | ((residualExpr e i j).orderedDerivative word).eval (nativeValues F G x) = |
| 301 | (principalTopExpr e i j word).eval (nativeValues F G x) + |
| 302 | (residualTraceExpr e i j word).eval (nativeValues F G x) := by |
| 303 | simp only [residualExpr, orderedDerivative_add, Expr.eval, |
| 304 | ordered_principalExpr_split F G hG hdet, residualTraceExpr] |
| 305 | ring |
| 306 | |
| 307 | end Native |
| 308 | |
| 309 | section Compatible |
| 310 | |
| 311 | open DeTurckNative DeTurckCompatibleJetNative DeTurckJetCoordinatesNative |
| 312 | |
| 313 | variable {M : Type v} [TopologicalSpace M] [T2Space M] |
| 314 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 315 | [CompactSpace M] {a : M} {K : Set M} |
| 316 | (F : iota → SmoothField (n := n) (M := M)) (C : Cutoffs (n := n) a K) |
| 317 | (g0 g : RiemannianMetric n M) |
| 318 | |
| 319 | theorem eval_principalExpr_compatible (i j : Fin n) (x : M) : |
| 320 | (principalExpr Sum.inl i j).eval |
| 321 | (nativeValues (combinedFields F C) (compatibleMatrix C g0 g) x) = |
| 322 | lowerJetContraction ((C.matrix g x)⁻¹ - (C.matrix g0 x)⁻¹) |
| 323 | (C.secondDifference g0 g x) i j := by |
| 324 | simp only [principalExpr, Expr.eval_sumFin, principalTermExpr, inverseDifferenceExpr, |
| 325 | metricDifferenceExpr, Expr.eval, nativeValues, compatibleMatrix] |
| 326 | change (∑ k, ∑ l, ((C.matrix g x)⁻¹ k l + -(C.matrix g0 x)⁻¹ k l) * |
| 327 | ((C.jet g x).second k l i j + -(C.jet g0 x).second k l i j)) = _ |
| 328 | simp only [lowerJetContraction, Cutoffs.secondDifference, Matrix.sub_apply, |
| 329 | Pi.sub_apply, sub_eq_add_neg] |
| 330 | |
| 331 | /-- The rational residual is exactly the actual compatible metric perturbation source. -/ |
| 332 | theorem eval_residualExpr_compatible (i j : Fin n) (x : M) : |
| 333 | (residualExpr Sum.inl i j).eval |
| 334 | (nativeValues (combinedFields F C) (compatibleMatrix C g0 g) x) = |
| 335 | C.residual g0 g x i j := by |
| 336 | rw [residualExpr, Expr.eval, eval_principalExpr_compatible, |
| 337 | eval_lowerPerturbationExpr_compatible] |
| 338 | have hp : backgroundLowerJet (C.jet g0 x) + C.lowerDifference g0 g x = |
| 339 | backgroundLowerJet (C.jet g x) := by |
| 340 | dsimp only [Cutoffs.lowerDifference] |
| 341 | abel |
| 342 | have hq : (C.jet g0 x).second + C.secondDifference g0 g x = (C.jet g x).second := by |
| 343 | dsimp only [Cutoffs.secondDifference] |
| 344 | abel |
| 345 | have hvalue : (C.jet g0 x).value + (C.lowerDifference g0 g x).1 = (C.jet g x).value := |
| 346 | congrArg Prod.fst hp |
| 347 | have hsplit := DeTurckMetricProducerNative.perturbationRemainder_split (C.jet g0 x) |
| 348 | (C.lowerDifference g0 g x) (C.secondDifference g0 g x) |
| 349 | (by rw [hvalue]; exact C.matrix_posDef g x) |
| 350 | (by rw [hq]; exact C.jet_second_symm g x) |
| 351 | (by rw [hq]; exact C.jet_second_swap g x) |
| 352 | rw [hvalue, hp] at hsplit |
| 353 | exact (congrArg (fun A : Matrix (Fin n) (Fin n) ℝ => A i j) hsplit).symm |
| 354 | |
| 355 | theorem eval_residualExpr_source_compatible (i j : Fin n) (x : M) : |
| 356 | (residualExpr Sum.inl i j).eval |
| 357 | (nativeValues (combinedFields F C) (compatibleMatrix C g0 g) x) = |
| 358 | ricciDeTurckSource (C.jet g0 x) (C.jet g x) i j - |
| 359 | lowerJetContraction (C.matrix g0 x)⁻¹ |
| 360 | ((C.jet g x).second - (C.jet g0 x).second) i j := |
| 361 | (eval_residualExpr_compatible F C g0 g i j x).trans (C.residual_eq_source g0 g x i j) |
| 362 | |
| 363 | theorem ordered_residualExpr_compatible (i j : Fin n) (word : List iota) (x : M) : |
| 364 | ((residualExpr Sum.inl i j).orderedDerivative (word.map Sum.inr)).eval |
| 365 | (nativeValues (combinedFields F C) (compatibleMatrix C g0 g) x) = |
| 366 | directionalWord F word (fun y => C.residual g0 g y i j) x := by |
| 367 | rw [Expr.orderedDerivative_native _ (combinedFields F C) (compatibleMatrix C g0 g) |
| 368 | (compatibleMatrix_contMDiff C g0 g) (compatibleMatrix_det_ne_zero C g0 g)] |
| 369 | have heq : (fun y => (residualExpr Sum.inl i j).eval |
| 370 | (nativeValues (combinedFields F C) (compatibleMatrix C g0 g) y)) = |
| 371 | fun y => C.residual g0 g y i j := |
| 372 | funext (eval_residualExpr_compatible F C g0 g i j) |
| 373 | rw [heq, directionalWord_combined_inr] |
| 374 | |
| 375 | /-- The actual residual has the vanishing top coefficient and the continuous-trace remainder. -/ |
| 376 | theorem residual_top_trace_compatible (i j : Fin n) (word : List iota) (x : M) : |
| 377 | directionalWord F word (fun y => C.residual g0 g y i j) x = |
| 378 | (principalTopExpr Sum.inl i j (word.map Sum.inr)).eval |
| 379 | (nativeValues (combinedFields F C) (compatibleMatrix C g0 g) x) + |
| 380 | (residualTraceExpr Sum.inl i j (word.map Sum.inr)).eval |
| 381 | (nativeValues (combinedFields F C) (compatibleMatrix C g0 g) x) := by |
| 382 | letI : MeasurableSpace M := borel M |
| 383 | letI : BorelSpace M := ⟨rfl⟩ |
| 384 | rw [← ordered_residualExpr_compatible F C g0 g i j word x] |
| 385 | exact ordered_residualExpr_split (combinedFields F C) (compatibleMatrix C g0 g) |
| 386 | (compatibleMatrix_contMDiff C g0 g) (compatibleMatrix_det_ne_zero C g0 g) |
| 387 | Sum.inl i j (word.map Sum.inr) x |
| 388 | |
| 389 | end Compatible |
| 390 | |
| 391 | end PoincareMT.DeTurckPrincipalForcingNative |
| 392 | |
| 393 | end |