Navier–Stokes: the Lean blow-up proof, cleaned up together
OpenAI's 2026 Lean proofs of blowup for forced Navier–Stokes and Euler, rerun by others, not refereed, no ruling from Clay; cleaned up together: more readable, faster to build

| 1 | import NavierStokes.FiveRowRank |
| 2 | import NavierStokes.UniformAngularReset |
| 3 | import NavierStokes.JetBounds |
| 4 | import Mathlib.Analysis.Calculus.ContDiff.Bounds |
| 5 | |
| 6 | /-! |
| 7 | # Five actual profile moments on a reserved positive patch |
| 8 | |
| 9 | Two axial bumps and three angular bumps are supported in disjoint halves of |
| 10 | the patch. Positive amplitude factoring removes the background parameters |
| 11 | from the normalized quadratic system. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | |
| 17 | open Set Function Filter MeasureTheory |
| 18 | open scoped BigOperators ContDiff Topology |
| 19 | |
| 20 | namespace NavierStokes.FiveProfileMoments |
| 21 | |
| 22 | structure Patch where |
| 23 | left : ℝ |
| 24 | right : ℝ |
| 25 | left_pos : 0 < left |
| 26 | ordered : left < right |
| 27 | |
| 28 | noncomputable def Patch.mid (P : Patch) : ℝ := (P.left + P.right) / 2 |
| 29 | |
| 30 | noncomputable def Patch.leftHalf (P : Patch) : Patch := |
| 31 | ⟨P.left, P.mid, P.left_pos, by dsimp [Patch.mid]; linarith [P.ordered]⟩ |
| 32 | |
| 33 | noncomputable def Patch.rightHalf (P : Patch) : Patch := |
| 34 | ⟨P.mid, P.right, by dsimp [Patch.mid]; linarith [P.left_pos, P.ordered], |
| 35 | by dsimp [Patch.mid]; linarith [P.ordered]⟩ |
| 36 | |
| 37 | section Family |
| 38 | |
| 39 | variable {n : ℕ} |
| 40 | |
| 41 | noncomputable def lower (P : Patch) (j : Fin n) : ℝ := FiveRowRank.cellLower P.left P.right j |
| 42 | noncomputable def upper (P : Patch) (j : Fin n) : ℝ := FiveRowRank.cellUpper P.left P.right j |
| 43 | noncomputable def bump (P : Patch) (j : Fin n) : ℝ → ℝ := |
| 44 | LocalizedMomentRepair.bump (lower P j) (upper P j) |
| 45 | |
| 46 | theorem lower_gt_left (P : Patch) (j : Fin n) : P.left < lower P j := |
| 47 | FiveRowRank.cellLower_gt _ _ P.ordered j |
| 48 | |
| 49 | theorem lower_lt_upper (P : Patch) (j : Fin n) : lower P j < upper P j := |
| 50 | FiveRowRank.cell_lower_lt_upper _ _ P.ordered j |
| 51 | |
| 52 | theorem upper_lt_right (P : Patch) (j : Fin n) : upper P j < P.right := |
| 53 | FiveRowRank.cellUpper_lt _ _ P.ordered j |
| 54 | |
| 55 | theorem intervals_separated (P : Patch) (i j : Fin n) (hij : i < j) : upper P i ≤ lower P j := |
| 56 | FiveRowRank.cell_separated _ _ P.ordered i j hij |
| 57 | |
| 58 | theorem bump_contDiff (P : Patch) (j : Fin n) : ContDiff ℝ ∞ (bump P j) := |
| 59 | LocalizedMomentRepair.bump_contDiff _ _ |
| 60 | |
| 61 | theorem bump_tsupport (P : Patch) (j : Fin n) : |
| 62 | tsupport (bump P j) ⊆ Ioo (lower P j) (upper P j) := |
| 63 | LocalizedMomentRepair.bump_tsupport_subset_open _ _ (lower_lt_upper P j) |
| 64 | |
| 65 | theorem bump_support_patch (P : Patch) (j : Fin n) : support (bump P j) ⊆ Icc P.left P.right := by |
| 66 | intro x hx |
| 67 | have h := bump_tsupport P j (subset_tsupport _ hx) |
| 68 | exact ⟨(lower_gt_left P j).le.trans h.1.le, h.2.le.trans (upper_lt_right P j).le⟩ |
| 69 | |
| 70 | theorem bumps_disjoint (P : Patch) (i j : Fin n) (hij : i ≠ j) (x : ℝ) : |
| 71 | bump P i x * bump P j x = 0 := by |
| 72 | by_cases hi : bump P i x = 0 |
| 73 | · simp [hi] |
| 74 | by_cases hj : bump P j x = 0 |
| 75 | · simp [hj] |
| 76 | have hix := bump_tsupport P i (subset_tsupport _ hi) |
| 77 | have hjx := bump_tsupport P j (subset_tsupport _ hj) |
| 78 | rcases lt_or_gt_of_ne hij with h | h |
| 79 | · linarith [intervals_separated P i j h, hix.2, hjx.1] |
| 80 | · linarith [intervals_separated P j i h, hjx.2, hix.1] |
| 81 | |
| 82 | noncomputable def correction (P : Patch) (c : Fin n → ℝ) (x : ℝ) : ℝ := ∑ j, c j * bump P j x |
| 83 | |
| 84 | theorem correction_contDiff (P : Patch) (c : Fin n → ℝ) : ContDiff ℝ ∞ (correction P c) := |
| 85 | ContDiff.sum (fun j _ => contDiff_const.mul (bump_contDiff P j)) |
| 86 | |
| 87 | theorem correction_support (P : Patch) (c : Fin n → ℝ) : |
| 88 | support (correction P c) ⊆ Icc P.left P.right := by |
| 89 | intro x hx |
| 90 | by_contra hnot |
| 91 | apply hx |
| 92 | apply Finset.sum_eq_zero |
| 93 | intro j _ |
| 94 | have hb : bump P j x = 0 := by |
| 95 | by_contra hn |
| 96 | exact hnot (bump_support_patch P j hn) |
| 97 | simp [hb] |
| 98 | |
| 99 | theorem correction_tsupport (P : Patch) (c : Fin n → ℝ) : |
| 100 | tsupport (correction P c) ⊆ Ioo P.left P.right := by |
| 101 | have hs : support (correction P c) ⊆ LocalizedMomentRepair.repairRegion (lower (n := n) P) (upper P) := by |
| 102 | intro x hx |
| 103 | by_contra hnot |
| 104 | apply hx |
| 105 | apply Finset.sum_eq_zero |
| 106 | intro j _ |
| 107 | have hb : bump P j x = 0 := by |
| 108 | by_contra hn |
| 109 | exact hnot (mem_iUnion.mpr ⟨j, |
| 110 | LocalizedMomentRepair.bump_support_subset _ _ (lower_lt_upper P j) hn⟩) |
| 111 | simp [hb] |
| 112 | have ht := closure_minimal hs (LocalizedMomentRepair.repairRegion_isCompact (lower (n := n) P) (upper P)).isClosed |
| 113 | intro x hx |
| 114 | have hm := LocalizedMomentRepair.repairRegion_subset_open (lower (n := n) P) (upper P) (lower_lt_upper P) (ht hx) |
| 115 | obtain ⟨j, hj⟩ := mem_iUnion.mp hm |
| 116 | exact ⟨(lower_gt_left P j).trans hj.1, hj.2.trans (upper_lt_right P j)⟩ |
| 117 | |
| 118 | theorem weighted_integrable (P : Patch) (s : ℝ) (g : ℝ → ℝ) |
| 119 | (hg : Continuous g) (hs : support g ⊆ Icc P.left P.right) : |
| 120 | Integrable (fun x => x ^ s * g x) := by |
| 121 | have hsupport : support (fun x => x ^ s * g x) ⊆ Icc P.left P.right := by |
| 122 | intro x hx |
| 123 | apply hs |
| 124 | intro hz |
| 125 | exact hx (by simp [hz]) |
| 126 | apply (integrableOn_iff_integrable_of_support_subset hsupport).mp |
| 127 | apply ContinuousOn.integrableOn_Icc |
| 128 | apply ContinuousOn.mul _ hg.continuousOn |
| 129 | apply continuousOn_id.rpow_const |
| 130 | intro x hx |
| 131 | exact Or.inl (ne_of_gt (P.left_pos.trans_le hx.1)) |
| 132 | |
| 133 | theorem correction_square (P : Patch) (c : Fin n → ℝ) (x : ℝ) : |
| 134 | (correction P c x) ^ 2 = ∑ j, (c j) ^ 2 * (bump P j x) ^ 2 := by |
| 135 | change (∑ j, c j * bump P j x) ^ 2 = _ |
| 136 | rw [pow_two, Finset.sum_mul] |
| 137 | apply Finset.sum_congr rfl |
| 138 | intro i _ |
| 139 | rw [Finset.mul_sum, Finset.sum_eq_single i] |
| 140 | · ring |
| 141 | · intro j _ hji |
| 142 | calc |
| 143 | _ = (c i * c j) * (bump P i x * bump P j x) := by ring |
| 144 | _ = 0 := by rw [bumps_disjoint P i j hji.symm x, mul_zero] |
| 145 | · intro hi |
| 146 | exact (hi (Finset.mem_univ i)).elim |
| 147 | |
| 148 | noncomputable def bumpMoment (P : Patch) (s : ℝ) (j : Fin n) : ℝ := ∫ x, x ^ s * bump P j x |
| 149 | noncomputable def squareMoment (P : Patch) (s : ℝ) (j : Fin n) : ℝ := ∫ x, x ^ s * (bump P j x) ^ 2 |
| 150 | |
| 151 | theorem weighted_correction_integrable (P : Patch) (s : ℝ) (c : Fin n → ℝ) : |
| 152 | Integrable (fun x => x ^ s * correction P c x) := |
| 153 | weighted_integrable P s _ (correction_contDiff P c).continuous (correction_support P c) |
| 154 | |
| 155 | theorem weighted_square_integrable (P : Patch) (s : ℝ) (c : Fin n → ℝ) : |
| 156 | Integrable (fun x => x ^ s * (correction P c x) ^ 2) := by |
| 157 | apply weighted_integrable P s _ ((correction_contDiff P c).continuous.pow 2) |
| 158 | intro x hx |
| 159 | apply correction_support P c |
| 160 | intro hz |
| 161 | exact hx (by simp [hz]) |
| 162 | |
| 163 | theorem correction_moment (P : Patch) (s : ℝ) (c : Fin n → ℝ) : |
| 164 | (∫ x, x ^ s * correction P c x) = ∑ j, c j * bumpMoment P s j := by |
| 165 | have hf : (fun x => x ^ s * correction P c x) = |
| 166 | fun x => ∑ j, c j * (x ^ s * bump P j x) := by |
| 167 | funext x |
| 168 | simp only [correction, Finset.mul_sum] |
| 169 | apply Finset.sum_congr rfl |
| 170 | intro j _ |
| 171 | ring |
| 172 | rw [hf, MeasureTheory.integral_finsetSum] |
| 173 | · simp only [integral_const_mul, bumpMoment] |
| 174 | · intro j _ |
| 175 | exact (weighted_integrable P s _ (bump_contDiff P j).continuous (bump_support_patch P j)).const_mul _ |
| 176 | |
| 177 | theorem correction_square_moment (P : Patch) (s : ℝ) (c : Fin n → ℝ) : |
| 178 | (∫ x, x ^ s * (correction P c x) ^ 2) = ∑ j, (c j) ^ 2 * squareMoment P s j := by |
| 179 | have hf : (fun x => x ^ s * (correction P c x) ^ 2) = |
| 180 | fun x => ∑ j, (c j) ^ 2 * (x ^ s * (bump P j x) ^ 2) := by |
| 181 | funext x |
| 182 | rw [correction_square, Finset.mul_sum] |
| 183 | apply Finset.sum_congr rfl |
| 184 | intro j _ |
| 185 | ring |
| 186 | rw [hf, MeasureTheory.integral_finsetSum] |
| 187 | · simp only [integral_const_mul, squareMoment] |
| 188 | · intro j _ |
| 189 | apply Integrable.const_mul |
| 190 | apply weighted_integrable P s _ ((bump_contDiff P j).continuous.pow 2) |
| 191 | intro x hx |
| 192 | apply bump_support_patch P j |
| 193 | intro hz |
| 194 | exact hx (by simp [hz]) |
| 195 | |
| 196 | noncomputable def momentMatrix (P : Patch) (a : Fin n → ℝ) : Matrix (Fin n) (Fin n) ℝ := |
| 197 | LocalizedMomentRepair.matrix a (lower P) (upper P) |
| 198 | |
| 199 | theorem momentMatrix_det_ne_zero (P : Patch) (a : Fin n → ℝ) (ha : Injective a) : |
| 200 | (momentMatrix P a).det ≠ 0 := |
| 201 | LocalizedMomentRepair.matrix_det_ne_zero a _ _ ha |
| 202 | (fun j => P.left_pos.trans (lower_gt_left P j)) (lower_lt_upper P) (intervals_separated P) |
| 203 | |
| 204 | noncomputable def matrixEquiv (P : Patch) (a : Fin n → ℝ) (ha : Injective a) : |
| 205 | (Fin n → ℝ) ≃L[ℝ] (Fin n → ℝ) := |
| 206 | LinearEquiv.toContinuousLinearEquiv |
| 207 | { toFun := (momentMatrix P a).mulVec |
| 208 | invFun := (momentMatrix P a)⁻¹.mulVec |
| 209 | map_add' := Matrix.mulVec_add _ |
| 210 | map_smul' := fun r c => Matrix.mulVec_smul _ r c |
| 211 | left_inv := fun c => by |
| 212 | rw [Matrix.mulVec_mulVec, Matrix.nonsing_inv_mul _ |
| 213 | (isUnit_iff_ne_zero.mpr (momentMatrix_det_ne_zero P a ha)), Matrix.one_mulVec] |
| 214 | right_inv := fun c => by |
| 215 | rw [Matrix.mulVec_mulVec, Matrix.mul_nonsing_inv _ |
| 216 | (isUnit_iff_ne_zero.mpr (momentMatrix_det_ne_zero P a ha)), Matrix.one_mulVec] } |
| 217 | |
| 218 | theorem matrixEquiv_apply (P : Patch) (a : Fin n → ℝ) (ha : Injective a) (c : Fin n → ℝ) (i : Fin n) : |
| 219 | matrixEquiv P a ha c i = ∫ x, x ^ a i * correction P c x := by |
| 220 | rw [correction_moment] |
| 221 | change ∑ j, (momentMatrix P a) i j * c j = _ |
| 222 | apply Finset.sum_congr rfl |
| 223 | intro j _ |
| 224 | change bumpMoment P (a i) j * c j = _ |
| 225 | ring |
| 226 | |
| 227 | theorem correction_iteratedDeriv (P : Patch) (c : Fin n → ℝ) (k : ℕ) (x : ℝ) : |
| 228 | iteratedDeriv k (correction P c) x = ∑ j, c j * iteratedDeriv k (bump P j) x := by |
| 229 | change iteratedDeriv k (fun y => ∑ j, c j * bump P j y) x = _ |
| 230 | rw [LocalizedMomentRepair.iteratedDeriv_finite_sum Finset.univ |
| 231 | (fun j x => c j * bump P j x) (fun j => contDiff_const.mul (bump_contDiff P j)) k x] |
| 232 | apply Finset.sum_congr rfl |
| 233 | intro j _ |
| 234 | exact iteratedDeriv_const_mul (c j) ((bump_contDiff P j).of_le |
| 235 | (by exact_mod_cast (le_top : (k : ℕ∞) ≤ ⊤))).contDiffAt |
| 236 | |
| 237 | theorem correction_derivative_bound (P : Patch) (k : ℕ) : |
| 238 | ∃ C : ℝ, 0 ≤ C ∧ ∀ (c : Fin n → ℝ) (x : ℝ), |iteratedDeriv k (correction P c) x| ≤ C * ‖c‖ := by |
| 239 | have hb : ∀ j : Fin n, ∃ C : ℝ, 0 ≤ C ∧ ∀ x, |iteratedDeriv k (bump P j) x| ≤ C := fun j => |
| 240 | LocalizedMomentRepair.smooth_compact_derivative_bound _ (bump_contDiff P j) |
| 241 | (HasCompactSupport.of_support_subset_isCompact isCompact_Icc (bump_support_patch P j)) k |
| 242 | choose C hC hbound using hb |
| 243 | refine ⟨∑ j, C j, Finset.sum_nonneg (fun j _ => hC j), fun c x => ?_⟩ |
| 244 | rw [correction_iteratedDeriv] |
| 245 | calc |
| 246 | _ ≤ ∑ j, |c j * iteratedDeriv k (bump P j) x| := Finset.abs_sum_le_sum_abs _ _ |
| 247 | _ ≤ ∑ j, ‖c‖ * C j := by |
| 248 | apply Finset.sum_le_sum |
| 249 | intro j _ |
| 250 | rw [abs_mul] |
| 251 | apply mul_le_mul _ (hbound j x) (abs_nonneg _) (norm_nonneg _) |
| 252 | simpa only [Real.norm_eq_abs] using norm_le_pi_norm c j |
| 253 | _ = _ := by rw [← Finset.mul_sum, mul_comm] |
| 254 | |
| 255 | end Family |
| 256 | |
| 257 | abbrev Coeff := (Fin 2 → ℝ) × (Fin 3 → ℝ) |
| 258 | abbrev Debt := Fin 5 → ℝ |
| 259 | |
| 260 | def GoodExponent (b : ℝ) : Prop := b ≠ -1 / 2 ∧ b ≠ 1 / 2 ∧ b ≠ 3 / 2 |
| 261 | |
| 262 | theorem good_initial : GoodExponent (1 / 10 : ℝ) := by norm_num [GoodExponent] |
| 263 | |
| 264 | theorem good_outgoing (lam : ℝ) (hlam : 0 < lam) : GoodExponent (-1 / 2 - lam) := by |
| 265 | unfold GoodExponent |
| 266 | constructor |
| 267 | · linarith |
| 268 | constructor <;> linarith |
| 269 | |
| 270 | noncomputable def axialPowers (b : ℝ) : Fin 2 → ℝ := ![0, b + 1 / 2] |
| 271 | noncomputable def angularPowers (b : ℝ) : Fin 3 → ℝ := ![1 / 2, b, b - 1] |
| 272 | |
| 273 | theorem axialPowers_injective (b : ℝ) (hb : GoodExponent b) : Injective (axialPowers b) := by |
| 274 | intro i j hij |
| 275 | by_contra hne |
| 276 | fin_cases i <;> fin_cases j <;> norm_num [axialPowers] at hij <;> norm_num at hne |
| 277 | all_goals exact hb.1 (by linarith) |
| 278 | |
| 279 | theorem angularPowers_injective (b : ℝ) (hb : GoodExponent b) : Injective (angularPowers b) := by |
| 280 | intro i j hij |
| 281 | by_contra hne |
| 282 | fin_cases i <;> fin_cases j <;> norm_num [angularPowers] at hij <;> norm_num at hne |
| 283 | all_goals first | exact hb.2.1 (by linarith) | exact hb.2.2 (by linarith) |
| 284 | |
| 285 | noncomputable def u (P : Patch) (c : Coeff) : ℝ → ℝ := correction P.leftHalf c.1 |
| 286 | noncomputable def e (P : Patch) (c : Coeff) : ℝ → ℝ := correction P.rightHalf c.2 |
| 287 | |
| 288 | theorem u_mul_e (P : Patch) (c d : Coeff) (x : ℝ) : u P c x * e P d x = 0 := by |
| 289 | by_cases hu : u P c x = 0 |
| 290 | · simp [hu] |
| 291 | by_cases he : e P d x = 0 |
| 292 | · simp [he] |
| 293 | have hu' := correction_tsupport P.leftHalf c.1 (subset_tsupport _ hu) |
| 294 | have he' := correction_tsupport P.rightHalf d.2 (subset_tsupport _ he) |
| 295 | exact False.elim ((not_lt_of_ge he'.1.le) hu'.2) |
| 296 | |
| 297 | noncomputable def linearEquiv (P : Patch) (b : ℝ) (hb : GoodExponent b) : Coeff ≃L[ℝ] Coeff := |
| 298 | (matrixEquiv P.leftHalf (axialPowers b) (axialPowers_injective b hb)).prodCongr |
| 299 | (matrixEquiv P.rightHalf (angularPowers b) (angularPowers_injective b hb)) |
| 300 | |
| 301 | noncomputable def quadraticBilin (P : Patch) : Coeff →ₗ[ℝ] Coeff →ₗ[ℝ] Coeff where |
| 302 | toFun c := |
| 303 | { toFun := fun d => |
| 304 | (0, ![0, |
| 305 | (1 / 2) * ∑ j, squareMoment P.rightHalf 0 j * c.2 j * d.2 j - |
| 306 | ∑ i, squareMoment P.leftHalf 0 i * c.1 i * d.1 i, |
| 307 | (1 / 2) * ∑ j, squareMoment P.rightHalf (-1) j * c.2 j * d.2 j]) |
| 308 | map_add' := fun d f => by |
| 309 | apply Prod.ext |
| 310 | · ext i; simp |
| 311 | · ext i; fin_cases i <;> simp [Pi.add_apply, Fin.sum_univ_two, Fin.sum_univ_three] <;> ring |
| 312 | map_smul' := fun r d => by |
| 313 | apply Prod.ext |
| 314 | · ext i; simp |
| 315 | · ext i; fin_cases i <;> simp [Pi.smul_apply, smul_eq_mul, Fin.sum_univ_two, Fin.sum_univ_three] <;> ring } |
| 316 | map_add' c d := by |
| 317 | apply LinearMap.ext |
| 318 | intro f |
| 319 | apply Prod.ext |
| 320 | · ext i; simp |
| 321 | · ext i; fin_cases i <;> simp [Pi.add_apply, Fin.sum_univ_two, Fin.sum_univ_three] <;> ring |
| 322 | map_smul' r c := by |
| 323 | apply LinearMap.ext |
| 324 | intro f |
| 325 | apply Prod.ext |
| 326 | · ext i; simp |
| 327 | · ext i; fin_cases i <;> simp [Pi.smul_apply, smul_eq_mul, Fin.sum_univ_two, Fin.sum_univ_three] <;> ring |
| 328 | |
| 329 | noncomputable def quadraticCLM (P : Patch) : Coeff →L[ℝ] Coeff →L[ℝ] Coeff := |
| 330 | LinearMap.toContinuousLinearMap |
| 331 | ((LinearMap.toContinuousLinearMap (𝕜 := ℝ) (E := Coeff) (F' := Coeff)).toLinearMap.comp (quadraticBilin P)) |
| 332 | |
| 333 | noncomputable def normalizedMap (P : Patch) (b : ℝ) (c : Coeff) : Coeff := |
| 334 | (![∫ x, u P c x, ∫ x, x ^ (b + 1 / 2) * u P c x], |
| 335 | ![∫ x, x ^ (1 / 2 : ℝ) * e P c x, |
| 336 | (∫ x, x ^ b * e P c x) + (1 / 2) * (∫ x, (e P c x) ^ 2) - ∫ x, (u P c x) ^ 2, |
| 337 | (∫ x, x ^ (b - 1) * e P c x) + (1 / 2) * (∫ x, x ^ (-1 : ℝ) * (e P c x) ^ 2)]) |
| 338 | |
| 339 | theorem linearEquiv_apply (P : Patch) (b : ℝ) (hb : GoodExponent b) (c : Coeff) : |
| 340 | linearEquiv P b hb c = |
| 341 | (![∫ x, u P c x, ∫ x, x ^ (b + 1 / 2) * u P c x], |
| 342 | ![∫ x, x ^ (1 / 2 : ℝ) * e P c x, ∫ x, x ^ b * e P c x, ∫ x, x ^ (b - 1) * e P c x]) := by |
| 343 | apply Prod.ext |
| 344 | · ext i |
| 345 | change matrixEquiv P.leftHalf (axialPowers b) (axialPowers_injective b hb) c.1 i = _ |
| 346 | rw [matrixEquiv_apply] |
| 347 | fin_cases i <;> simp [axialPowers, u] |
| 348 | · ext i |
| 349 | change matrixEquiv P.rightHalf (angularPowers b) (angularPowers_injective b hb) c.2 i = _ |
| 350 | rw [matrixEquiv_apply] |
| 351 | fin_cases i <;> simp [angularPowers, e] |
| 352 | |
| 353 | theorem normalizedMap_identity (P : Patch) (b : ℝ) (hb : GoodExponent b) (c : Coeff) : |
| 354 | linearEquiv P b hb c + quadraticCLM P c c = normalizedMap P b c := by |
| 355 | have hUS := correction_square_moment P.leftHalf 0 c.1 |
| 356 | have hES := correction_square_moment P.rightHalf 0 c.2 |
| 357 | have hEP := correction_square_moment P.rightHalf (-1) c.2 |
| 358 | simp only [Real.rpow_zero, one_mul] at hUS hES |
| 359 | rw [linearEquiv_apply] |
| 360 | apply Prod.ext |
| 361 | · ext i |
| 362 | fin_cases i <;> simp [quadraticCLM, quadraticBilin, normalizedMap] |
| 363 | · ext i |
| 364 | fin_cases i <;> simp [quadraticCLM, quadraticBilin, normalizedMap, |
| 365 | u, e, hUS, hES, hEP, Fin.sum_univ_two, Fin.sum_univ_three] <;> ring |
| 366 | |
| 367 | theorem spatial_jet_bound (P : Patch) (k : ℕ) : |
| 368 | ∃ C : ℝ, 0 < C ∧ ∀ (c : Coeff) (x : ℝ), |
| 369 | |iteratedDeriv k (u P c) x| ≤ C * ‖c‖ ∧ |iteratedDeriv k (e P c) x| ≤ C * ‖c‖ := by |
| 370 | obtain ⟨CU, hCU, hU⟩ := correction_derivative_bound (n := 2) P.leftHalf k |
| 371 | obtain ⟨CE, hCE, hE⟩ := correction_derivative_bound (n := 3) P.rightHalf k |
| 372 | refine ⟨CU + CE + 1, by linarith, fun c x => ⟨?_, ?_⟩⟩ |
| 373 | · exact (hU c.1 x).trans ((mul_le_mul_of_nonneg_left (norm_fst_le c) hCU).trans |
| 374 | (mul_le_mul_of_nonneg_right (by linarith) (norm_nonneg c))) |
| 375 | · exact (hE c.2 x).trans ((mul_le_mul_of_nonneg_left (norm_snd_le c) hCE).trans |
| 376 | (mul_le_mul_of_nonneg_right (by linarith) (norm_nonneg c))) |
| 377 | |
| 378 | theorem finite_spatial_jet_bound (P : Patch) (N : ℕ) : |
| 379 | ∃ C : ℝ, 0 < C ∧ ∀ k ≤ N, ∀ (c : Coeff) (x : ℝ), |
| 380 | |iteratedDeriv k (u P c) x| ≤ C * ‖c‖ ∧ |iteratedDeriv k (e P c) x| ≤ C * ‖c‖ := by |
| 381 | choose C hC hbound using spatial_jet_bound P |
| 382 | let K : ℝ := 1 + ∑ k ∈ Finset.range (N + 1), C k |
| 383 | have hK : 0 < K := by |
| 384 | have hs : 0 ≤ ∑ k ∈ Finset.range (N + 1), C k := Finset.sum_nonneg (fun k _ => (hC k).le) |
| 385 | dsimp [K] |
| 386 | linarith |
| 387 | refine ⟨K, hK, ?_⟩ |
| 388 | intro k hk c x |
| 389 | have hCK : C k ≤ K := by |
| 390 | have h := Finset.single_le_sum (fun j _ => (hC j).le) |
| 391 | (Finset.mem_range.mpr (Nat.lt_succ_of_le hk)) |
| 392 | dsimp [K] |
| 393 | linarith |
| 394 | exact ⟨(hbound k c x).1.trans (mul_le_mul_of_nonneg_right hCK (norm_nonneg c)), |
| 395 | (hbound k c x).2.trans (mul_le_mul_of_nonneg_right hCK (norm_nonneg c))⟩ |
| 396 | |
| 397 | theorem power_lower_bound (P : Patch) (b : ℝ) : |
| 398 | ∃ m : ℝ, 0 < m ∧ ∀ x ∈ Icc P.left P.right, m ≤ x ^ b := by |
| 399 | apply isCompact_Icc.exists_forall_le' |
| 400 | · apply continuousOn_id.rpow_const |
| 401 | intro x hx |
| 402 | exact Or.inl (ne_of_gt (P.left_pos.trans_le hx.1)) |
| 403 | · intro x hx |
| 404 | exact Real.rpow_pos_of_pos (P.left_pos.trans_le hx.1) b |
| 405 | |
| 406 | /-- One fixed nonlinear inverse works for all amplitudes and constant axial |
| 407 | backgrounds, because they have been factored out of the actual moments. -/ |
| 408 | theorem exists_normalized_repair (P : Patch) (b : ℝ) (hb : GoodExponent b) : |
| 409 | ∃ (g : Coeff → Coeff) (ε C : ℝ), 0 < ε ∧ 0 < C ∧ |
| 410 | ContDiffOn ℝ ∞ g (Metric.ball 0 ε) ∧ g 0 = 0 ∧ |
| 411 | ∀ d ∈ Metric.ball (0 : Coeff) ε, |
| 412 | normalizedMap P b (g d) = d ∧ ‖g d‖ ≤ C * ‖d‖ ∧ ‖fderiv ℝ g d‖ ≤ C ∧ |
| 413 | ∀ x : ℝ, 0 < x → 0 < x ^ b + e P (g d) x := by |
| 414 | let B := linearEquiv P b hb |
| 415 | let A := quadraticCLM P |
| 416 | let β : ℝ := ‖B.symm.toContinuousLinearMap‖ + 1 |
| 417 | let K : ℝ := ‖A‖ + 1 |
| 418 | let r : ℝ := 1 / (4 * β * K) |
| 419 | have hβ : 0 < β := by dsimp [β]; positivity |
| 420 | have hK : 0 < K := by dsimp [K]; positivity |
| 421 | have hr : 0 < r := by dsimp [r]; positivity |
| 422 | have hinv : ∀ v, ‖B.symm v‖ ≤ β * ‖v‖ := by |
| 423 | intro v |
| 424 | exact (B.symm.toContinuousLinearMap.le_opNorm v).trans |
| 425 | (mul_le_mul_of_nonneg_right (by dsimp [β]; linarith) (norm_nonneg v)) |
| 426 | have hA : ‖A‖ ≤ K := by dsimp [K]; linarith |
| 427 | have hsmall : 4 * β * K * r ≤ 1 := by dsimp [r]; field_simp ; rfl |
| 428 | obtain ⟨g, hg, hgeq, hglip⟩ := UniformAngularReset.exists_smooth_solver_on_ball |
| 429 | B A β K r hβ hK.le hr hinv hA hsmall |
| 430 | obtain ⟨D, hD, hjet⟩ := spatial_jet_bound P 0 |
| 431 | obtain ⟨m, hm, hmin⟩ := power_lower_bound P.rightHalf b |
| 432 | let C : ℝ := (1 + D) * (2 * β) |
| 433 | let ε : ℝ := min (r / (4 * β)) (m / (2 * C)) |
| 434 | have hC : 0 < C := mul_pos (by linarith) (by positivity) |
| 435 | have hε : 0 < ε := lt_min (div_pos hr (by positivity)) (div_pos hm (by positivity)) |
| 436 | have hsub : Metric.ball (0 : Coeff) ε ⊆ Metric.ball 0 (r / (4 * β)) := |
| 437 | Metric.ball_subset_ball (min_le_left _ _) |
| 438 | have hC₀ : 2 * β ≤ C := by dsimp [C]; nlinarith |
| 439 | have hC₁ : D * (2 * β) ≤ C := by dsimp [C]; nlinarith |
| 440 | have hzero : g 0 = 0 := by |
| 441 | have hz := (hgeq 0 (Metric.mem_ball_self (div_pos hr (by positivity)))).2 |
| 442 | simpa only [norm_zero, mul_zero, norm_le_zero_iff] using hz |
| 443 | refine ⟨g, ε, C, hε, hC, hg.mono hsub, hzero, ?_⟩ |
| 444 | intro d hd |
| 445 | have hnorm : ‖g d‖ ≤ 2 * β * ‖d‖ := (hgeq d (hsub hd)).2 |
| 446 | have hbound : D * ‖g d‖ ≤ C * ‖d‖ := |
| 447 | (mul_le_mul_of_nonneg_left hnorm hD.le).trans |
| 448 | (by simpa only [mul_assoc] using mul_le_mul_of_nonneg_right hC₁ (norm_nonneg d)) |
| 449 | have heq := (hgeq d (hsub hd)).1 |
| 450 | change linearEquiv P b hb (g d) + quadraticCLM P (g d) (g d) = d at heq |
| 451 | rw [normalizedMap_identity] at heq |
| 452 | refine ⟨heq, hnorm.trans (mul_le_mul_of_nonneg_right hC₀ (norm_nonneg d)), ?_, ?_⟩ |
| 453 | · apply le_trans _ hC₀ |
| 454 | apply norm_fderiv_le_of_lip' ℝ (by positivity : 0 ≤ 2 * β) |
| 455 | filter_upwards [Metric.isOpen_ball.mem_nhds (hsub hd)] with f hf |
| 456 | exact hglip f hf d (hsub hd) |
| 457 | · intro x hx |
| 458 | by_cases he : e P (g d) x = 0 |
| 459 | · simpa only [he, add_zero] using Real.rpow_pos_of_pos hx b |
| 460 | have hbase := hmin x (correction_support P.rightHalf (g d).2 he) |
| 461 | have hval : |e P (g d) x| ≤ C * ‖d‖ := (hjet (g d) x).2.trans hbound |
| 462 | have hd' : ‖d‖ < ε := by simpa only [Metric.mem_ball, dist_zero_right] using hd |
| 463 | have hsize : C * ‖d‖ < m / 2 := by |
| 464 | have ht := mul_lt_mul_of_pos_left (hd'.trans_le (min_le_right _ _)) hC |
| 465 | have hcancel : C * (m / (2 * C)) = m / 2 := by field_simp |
| 466 | rwa [hcancel] at ht |
| 467 | have hlow := neg_abs_le (e P (g d) x) |
| 468 | linarith |
| 469 | |
| 470 | noncomputable def physicalU (P : Patch) (A G : ℝ) (c : Coeff) (x : ℝ) : ℝ := G + A * u P c x |
| 471 | noncomputable def physicalE (P : Patch) (b A : ℝ) (c : Coeff) (x : ℝ) : ℝ := A * (x ^ b + e P c x) |
| 472 | |
| 473 | noncomputable def physicalDensity (P : Patch) (b A G : ℝ) (c : Coeff) (x : ℝ) : Debt := |
| 474 | ![physicalU P A G c x - G, |
| 475 | Real.sqrt (2 * x) * (physicalE P b A c x - A * x ^ b), |
| 476 | physicalU P A G c x * Real.sqrt (2 * x) * physicalE P b A c x - G * Real.sqrt (2 * x) * (A * x ^ b), |
| 477 | (physicalU P A G c x ^ 2 - physicalE P b A c x ^ 2 / 2) - (G ^ 2 - (A * x ^ b) ^ 2 / 2), |
| 478 | (physicalE P b A c x ^ 2 - (A * x ^ b) ^ 2) / (2 * x)] |
| 479 | |
| 480 | noncomputable def physicalMoments (P : Patch) (b A G : ℝ) (c : Coeff) : Debt := |
| 481 | fun i => ∫ x, physicalDensity P b A G c x i |
| 482 | |
| 483 | noncomputable def physicalDebt (A G : ℝ) (z : Coeff) : Debt := |
| 484 | ![A * z.1 0, Real.sqrt 2 * A * z.2 0, |
| 485 | Real.sqrt 2 * A ^ 2 * z.1 1 + G * (Real.sqrt 2 * A * z.2 0), |
| 486 | 2 * G * A * z.1 0 - A ^ 2 * z.2 1, A ^ 2 * z.2 2] |
| 487 | |
| 488 | noncomputable def normalizedDebt (A G : ℝ) (d : Debt) : Coeff := |
| 489 | (![d 0 / A, (d 2 - G * d 1) / (Real.sqrt 2 * A ^ 2)], |
| 490 | ![d 1 / (Real.sqrt 2 * A), (2 * G * d 0 - d 3) / A ^ 2, d 4 / A ^ 2]) |
| 491 | |
| 492 | theorem physical_normalized_debt (A G : ℝ) (hA : A ≠ 0) (d : Debt) : |
| 493 | physicalDebt A G (normalizedDebt A G d) = d := by |
| 494 | have hs : Real.sqrt 2 ≠ 0 := (Real.sqrt_pos.2 (by norm_num : (0 : ℝ) < 2)).ne' |
| 495 | ext i |
| 496 | fin_cases i <;> simp [physicalDebt, normalizedDebt] <;> field_simp |
| 497 | all_goals ring |
| 498 | |
| 499 | theorem normalized_physical_debt (A G : ℝ) (hA : A ≠ 0) (c : Coeff) : |
| 500 | normalizedDebt A G (physicalDebt A G c) = c := by |
| 501 | have hs : Real.sqrt 2 ≠ 0 := (Real.sqrt_pos.2 (by norm_num : (0 : ℝ) < 2)).ne' |
| 502 | apply Prod.ext |
| 503 | · ext i |
| 504 | fin_cases i <;> simp [physicalDebt, normalizedDebt] <;> field_simp |
| 505 | · ext i |
| 506 | fin_cases i <;> simp [physicalDebt, normalizedDebt] <;> field_simp |
| 507 | all_goals ring |
| 508 | |
| 509 | noncomputable def physicalEquiv (A G : ℝ) (hA : A ≠ 0) : Coeff ≃L[ℝ] Debt := |
| 510 | LinearEquiv.toContinuousLinearEquiv |
| 511 | { toFun := physicalDebt A G |
| 512 | invFun := normalizedDebt A G |
| 513 | left_inv := normalized_physical_debt A G hA |
| 514 | right_inv := physical_normalized_debt A G hA |
| 515 | map_add' := fun c d => by ext i; fin_cases i <;> simp [physicalDebt] <;> ring |
| 516 | map_smul' := fun r c => by ext i; fin_cases i <;> simp [physicalDebt, smul_eq_mul] <;> ring } |
| 517 | |
| 518 | noncomputable def normalizedDensity (P : Patch) (b : ℝ) (c : Coeff) (x : ℝ) : Coeff := |
| 519 | (![u P c x, x ^ (b + 1 / 2) * u P c x], |
| 520 | ![x ^ (1 / 2 : ℝ) * e P c x, |
| 521 | x ^ b * e P c x + (1 / 2) * e P c x ^ 2 - u P c x ^ 2, |
| 522 | x ^ (b - 1) * e P c x + (1 / 2) * (x ^ (-1 : ℝ) * e P c x ^ 2)]) |
| 523 | |
| 524 | theorem physicalDensity_eq (P : Patch) (b A G : ℝ) (c : Coeff) (x : ℝ) : |
| 525 | physicalDensity P b A G c x = physicalDebt A G (normalizedDensity P b c x) := by |
| 526 | by_cases hx : 0 < x |
| 527 | · have hs : Real.sqrt (2 * x) = Real.sqrt 2 * x ^ (1 / 2 : ℝ) := by |
| 528 | rw [Real.sqrt_mul (by norm_num : (0 : ℝ) ≤ 2), Real.sqrt_eq_rpow x] |
| 529 | have hplus : x ^ (b + 1 / 2) = x ^ b * x ^ (1 / 2 : ℝ) := Real.rpow_add hx _ _ |
| 530 | have hminus : x ^ (b - 1) = x ^ b * x⁻¹ := by |
| 531 | rw [sub_eq_add_neg, Real.rpow_add hx, Real.rpow_neg_one] |
| 532 | have hJ : physicalU P A G c x * Real.sqrt (2 * x) * physicalE P b A c x - |
| 533 | G * Real.sqrt (2 * x) * (A * x ^ b) = |
| 534 | A ^ 2 * (Real.sqrt (2 * x) * x ^ b) * u P c x + G * A * Real.sqrt (2 * x) * e P c x := by |
| 535 | calc |
| 536 | _ = A ^ 2 * (Real.sqrt (2 * x) * x ^ b) * u P c x + G * A * Real.sqrt (2 * x) * e P c x + |
| 537 | (A ^ 2 * Real.sqrt (2 * x)) * (u P c x * e P c x) := by |
| 538 | unfold physicalU physicalE |
| 539 | ring |
| 540 | _ = _ := by rw [u_mul_e]; ring |
| 541 | ext i |
| 542 | fin_cases i |
| 543 | · simp [physicalDensity, physicalDebt, normalizedDensity, physicalU] |
| 544 | · simp [physicalDensity, physicalDebt, normalizedDensity, physicalE, hs] |
| 545 | ring |
| 546 | · simp only [physicalDensity, physicalDebt, normalizedDensity] |
| 547 | change physicalU P A G c x * Real.sqrt (2 * x) * physicalE P b A c x - |
| 548 | G * Real.sqrt (2 * x) * (A * x ^ b) = |
| 549 | Real.sqrt 2 * A ^ 2 * (x ^ (b + 1 / 2) * u P c x) + |
| 550 | G * (Real.sqrt 2 * A * (x ^ (1 / 2 : ℝ) * e P c x)) |
| 551 | rw [hJ, hs, hplus] |
| 552 | ring |
| 553 | · simp [physicalDensity, physicalDebt, normalizedDensity, physicalU, physicalE] |
| 554 | ring |
| 555 | · simp [physicalDensity, physicalDebt, normalizedDensity, physicalE, hminus, Real.rpow_neg_one] |
| 556 | field_simp [hx.ne'] ; ring |
| 557 | · have hu : u P c x = 0 := by |
| 558 | exact Classical.byContradiction (fun hn => |
| 559 | hx (P.leftHalf.left_pos.trans_le (correction_support P.leftHalf c.1 hn).1)) |
| 560 | have he : e P c x = 0 := by |
| 561 | exact Classical.byContradiction (fun hn => |
| 562 | hx (P.rightHalf.left_pos.trans_le (correction_support P.rightHalf c.2 hn).1)) |
| 563 | ext i |
| 564 | fin_cases i <;> simp [physicalDensity, physicalDebt, normalizedDensity, physicalU, physicalE, hu, he] |
| 565 | |
| 566 | theorem integrable_fin_vector {n : ℕ} (f : ℝ → Fin n → ℝ) |
| 567 | (hf : ∀ i, Integrable (fun x => f x i)) : Integrable f := by |
| 568 | classical |
| 569 | have heq : f = fun x => ∑ i, f x i • (Pi.single i (1 : ℝ) : Fin n → ℝ) := by |
| 570 | funext x j |
| 571 | simp [Finset.sum_apply, Pi.smul_apply, Pi.single_apply] |
| 572 | rw [heq] |
| 573 | exact MeasureTheory.integrable_finsetSum _ (fun i _ => (hf i).smul_const (Pi.single i 1)) |
| 574 | |
| 575 | theorem integral_fin_apply {n : ℕ} {f : ℝ → Fin n → ℝ} (hf : Integrable f) (i : Fin n) : |
| 576 | (∫ x, f x) i = ∫ x, f x i := |
| 577 | ((ContinuousLinearMap.proj i : (Fin n → ℝ) →L[ℝ] ℝ).integral_comp_comm hf).symm |
| 578 | |
| 579 | theorem integral_fst_apply {f : ℝ → Coeff} (hf : Integrable f) (i : Fin 2) : |
| 580 | (∫ x, f x).1 i = ∫ x, (f x).1 i := |
| 581 | (((ContinuousLinearMap.proj i : (Fin 2 → ℝ) →L[ℝ] ℝ).comp |
| 582 | (ContinuousLinearMap.fst ℝ (Fin 2 → ℝ) (Fin 3 → ℝ))).integral_comp_comm hf).symm |
| 583 | |
| 584 | theorem integral_snd_apply {f : ℝ → Coeff} (hf : Integrable f) (i : Fin 3) : |
| 585 | (∫ x, f x).2 i = ∫ x, (f x).2 i := |
| 586 | (((ContinuousLinearMap.proj i : (Fin 3 → ℝ) →L[ℝ] ℝ).comp |
| 587 | (ContinuousLinearMap.snd ℝ (Fin 2 → ℝ) (Fin 3 → ℝ))).integral_comp_comm hf).symm |
| 588 | |
| 589 | theorem normalizedDensity_integrable (P : Patch) (b : ℝ) (c : Coeff) : |
| 590 | Integrable (normalizedDensity P b c) := by |
| 591 | have hu := weighted_correction_integrable P.leftHalf 0 c.1 |
| 592 | have huu := weighted_square_integrable P.leftHalf 0 c.1 |
| 593 | have hee := weighted_square_integrable P.rightHalf 0 c.2 |
| 594 | simp only [Real.rpow_zero, one_mul] at hu huu hee |
| 595 | apply Integrable.prodMk |
| 596 | · apply integrable_fin_vector |
| 597 | intro i |
| 598 | fin_cases i |
| 599 | · exact hu |
| 600 | · exact weighted_correction_integrable P.leftHalf (b + 1 / 2) c.1 |
| 601 | · apply integrable_fin_vector |
| 602 | intro i |
| 603 | fin_cases i |
| 604 | · exact weighted_correction_integrable P.rightHalf (1 / 2) c.2 |
| 605 | · exact ((weighted_correction_integrable P.rightHalf b c.2).add (hee.const_mul (1 / 2))).sub huu |
| 606 | · exact (weighted_correction_integrable P.rightHalf (b - 1) c.2).add |
| 607 | ((weighted_square_integrable P.rightHalf (-1) c.2).const_mul (1 / 2)) |
| 608 | |
| 609 | theorem normalizedDensity_integral (P : Patch) (b : ℝ) (c : Coeff) : |
| 610 | (∫ x, normalizedDensity P b c x) = normalizedMap P b c := by |
| 611 | have hi := normalizedDensity_integrable P b c |
| 612 | have huu := weighted_square_integrable P.leftHalf 0 c.1 |
| 613 | have hee := weighted_square_integrable P.rightHalf 0 c.2 |
| 614 | simp only [Real.rpow_zero, one_mul] at huu hee |
| 615 | apply Prod.ext |
| 616 | · ext i |
| 617 | rw [integral_fst_apply hi i] |
| 618 | fin_cases i <;> rfl |
| 619 | · ext i |
| 620 | rw [integral_snd_apply hi i] |
| 621 | fin_cases i |
| 622 | · rfl |
| 623 | · change (∫ x, x ^ b * e P c x + (1 / 2) * e P c x ^ 2 - u P c x ^ 2) = _ |
| 624 | unfold u e |
| 625 | have hs := integral_sub ((weighted_correction_integrable P.rightHalf b c.2).add (hee.const_mul (1 / 2))) huu |
| 626 | simp only [Pi.add_apply] at hs |
| 627 | rw [hs, integral_add (weighted_correction_integrable P.rightHalf b c.2) (hee.const_mul (1 / 2)), integral_const_mul] |
| 628 | rfl |
| 629 | · change (∫ x, x ^ (b - 1) * e P c x + (1 / 2) * (x ^ (-1 : ℝ) * e P c x ^ 2)) = _ |
| 630 | unfold e |
| 631 | rw [integral_add (weighted_correction_integrable P.rightHalf (b - 1) c.2) |
| 632 | ((weighted_square_integrable P.rightHalf (-1) c.2).const_mul (1 / 2)), integral_const_mul] |
| 633 | rfl |
| 634 | |
| 635 | theorem physicalMoments_eq (P : Patch) (b A G : ℝ) (hA : A ≠ 0) (c : Coeff) : |
| 636 | physicalMoments P b A G c = physicalDebt A G (normalizedMap P b c) := by |
| 637 | have hi := normalizedDensity_integrable P b c |
| 638 | have h := (physicalEquiv A G hA).toContinuousLinearMap.integral_comp_comm hi |
| 639 | rw [normalizedDensity_integral] at h |
| 640 | ext i |
| 641 | have hc := congrFun h i |
| 642 | rw [integral_fin_apply ((physicalEquiv A G hA).toContinuousLinearMap.integrable_comp hi) i] at hc |
| 643 | change (∫ x, physicalDensity P b A G c x i) = _ |
| 644 | simp only [physicalDensity_eq] |
| 645 | exact hc |
| 646 | |
| 647 | /-- The full physical derivative in the five raw bump coefficients is an |
| 648 | explicit continuous linear equivalence. Its two actual moment determinants |
| 649 | were proved nonzero above. -/ |
| 650 | noncomputable def actualLinearEquiv (P : Patch) (b A G : ℝ) (hb : GoodExponent b) |
| 651 | (hA : A ≠ 0) : Coeff ≃L[ℝ] Debt := (linearEquiv P b hb).trans (physicalEquiv A G hA) |
| 652 | |
| 653 | theorem physicalDensity_zero_outside (P : Patch) (b A G : ℝ) (c : Coeff) {x : ℝ} |
| 654 | (hx : x ∉ Ioo P.left P.right) : physicalDensity P b A G c x = 0 := by |
| 655 | have hu : u P c x = 0 := by |
| 656 | apply Classical.byContradiction |
| 657 | intro hn |
| 658 | have hs := correction_tsupport P.leftHalf c.1 (subset_tsupport _ hn) |
| 659 | apply hx |
| 660 | exact ⟨hs.1, hs.2.trans (by dsimp [Patch.leftHalf, Patch.mid]; linarith [P.ordered])⟩ |
| 661 | have he : e P c x = 0 := by |
| 662 | apply Classical.byContradiction |
| 663 | intro hn |
| 664 | have hs := correction_tsupport P.rightHalf c.2 (subset_tsupport _ hn) |
| 665 | apply hx |
| 666 | have hl : P.left < P.rightHalf.left := by dsimp [Patch.rightHalf, Patch.mid]; linarith [P.ordered] |
| 667 | exact ⟨hl.trans hs.1, hs.2⟩ |
| 668 | rw [physicalDensity_eq] |
| 669 | ext i |
| 670 | fin_cases i <;> simp [physicalDebt, normalizedDensity, hu, he] |
| 671 | |
| 672 | theorem physicalDensity_integrable (P : Patch) (b A G : ℝ) (hA : A ≠ 0) (c : Coeff) (i : Fin 5) : |
| 673 | Integrable (fun x => physicalDensity P b A G c x i) := by |
| 674 | have hi := (physicalEquiv A G hA).toContinuousLinearMap.integrable_comp |
| 675 | (normalizedDensity_integrable P b c) |
| 676 | have he := (ContinuousLinearMap.proj i : Debt →L[ℝ] ℝ).integrable_comp hi |
| 677 | simp only [physicalDensity_eq] |
| 678 | exact he |
| 679 | |
| 680 | noncomputable def normalizationLinearMap (A G : ℝ) : Debt →ₗ[ℝ] Coeff where |
| 681 | toFun := normalizedDebt A G |
| 682 | map_add' c d := by |
| 683 | apply Prod.ext |
| 684 | · ext i; fin_cases i <;> simp [normalizedDebt] <;> ring |
| 685 | · ext i; fin_cases i <;> simp [normalizedDebt] <;> ring |
| 686 | map_smul' r c := by |
| 687 | apply Prod.ext |
| 688 | · ext i; fin_cases i <;> simp [normalizedDebt, smul_eq_mul] <;> ring |
| 689 | · ext i; fin_cases i <;> simp [normalizedDebt, smul_eq_mul] <;> ring |
| 690 | |
| 691 | theorem normalizedDebt_contDiffOn {S : Set ℝ} {A G : ℝ → ℝ} {d : ℝ → Debt} |
| 692 | (hA : ContDiffOn ℝ ∞ A S) (hG : ContDiffOn ℝ ∞ G S) (hd : ContDiffOn ℝ ∞ d S) |
| 693 | (hAn : ∀ p ∈ S, A p ≠ 0) : |
| 694 | ContDiffOn ℝ ∞ (fun p => normalizedDebt (A p) (G p) (d p)) S := by |
| 695 | have hs : Real.sqrt 2 ≠ 0 := (Real.sqrt_pos.2 (by norm_num : (0 : ℝ) < 2)).ne' |
| 696 | apply ContDiffOn.prodMk |
| 697 | · apply contDiffOn_pi.mpr |
| 698 | intro i |
| 699 | fin_cases i |
| 700 | · exact (contDiffOn_pi.mp hd 0).div hA hAn |
| 701 | · exact ((contDiffOn_pi.mp hd 2).sub (hG.mul (contDiffOn_pi.mp hd 1))).div |
| 702 | (contDiffOn_const.mul (hA.pow 2)) (fun p hp => mul_ne_zero hs (pow_ne_zero 2 (hAn p hp))) |
| 703 | · apply contDiffOn_pi.mpr |
| 704 | intro i |
| 705 | fin_cases i |
| 706 | · exact (contDiffOn_pi.mp hd 1).div (contDiffOn_const.mul hA) (fun p hp => mul_ne_zero hs (hAn p hp)) |
| 707 | · exact (((contDiffOn_const.mul hG).mul (contDiffOn_pi.mp hd 0)).sub (contDiffOn_pi.mp hd 3)).div |
| 708 | (hA.pow 2) (fun p hp => pow_ne_zero 2 (hAn p hp)) |
| 709 | · exact (contDiffOn_pi.mp hd 4).div (hA.pow 2) (fun p hp => pow_ne_zero 2 (hAn p hp)) |
| 710 | |
| 711 | theorem normalizedDebt_contDiff {A G : ℝ → ℝ} {d : ℝ → Debt} |
| 712 | (hA : ContDiff ℝ ∞ A) (hG : ContDiff ℝ ∞ G) (hd : ContDiff ℝ ∞ d) |
| 713 | (hAn : ∀ p, A p ≠ 0) : ContDiff ℝ ∞ (fun p => normalizedDebt (A p) (G p) (d p)) := |
| 714 | contDiffOn_univ.mp (normalizedDebt_contDiffOn hA.contDiffOn hG.contDiffOn hd.contDiffOn (fun p _ => hAn p)) |
| 715 | |
| 716 | theorem normalizedDebt_eq_sum (A G : ℝ) (d : Debt) : |
| 717 | normalizedDebt A G d = ∑ i, d i • normalizedDebt A G (Pi.single i 1) := by |
| 718 | have h : (∑ i, d i • (Pi.single i (1 : ℝ) : Debt)) = d := by |
| 719 | ext j |
| 720 | simp [Finset.sum_apply, Pi.smul_apply, Pi.single_apply] |
| 721 | have he := congrArg (normalizationLinearMap A G) h |
| 722 | rw [map_sum] at he |
| 723 | simp only [map_smul] at he |
| 724 | exact he.symm |
| 725 | |
| 726 | theorem smooth_solver_jet_bound {g : Coeff → Coeff} {r : ℝ} (hr : 0 < r) |
| 727 | (hg : ContDiffOn ℝ ∞ g (Metric.ball 0 r)) (N : ℕ) : |
| 728 | ∃ B : ℝ, 0 < B ∧ ∀ k ≤ N, ∀ z ∈ Metric.closedBall (0 : Coeff) (r / 2), |
| 729 | ‖iteratedFDeriv ℝ k g z‖ ≤ B := by |
| 730 | have hsub : Metric.closedBall (0 : Coeff) (r / 2) ⊆ Metric.ball 0 r := |
| 731 | Metric.closedBall_subset_ball (by linarith) |
| 732 | have hsingle : ∀ k : ℕ, ∃ B : ℝ, 0 ≤ B ∧ |
| 733 | ∀ z ∈ Metric.closedBall (0 : Coeff) (r / 2), ‖iteratedFDeriv ℝ k g z‖ ≤ B := by |
| 734 | intro k |
| 735 | have hc := hg.continuousOn_iteratedFDerivWithin (m := k) |
| 736 | (by exact_mod_cast (le_top : (k : ℕ∞) ≤ ⊤)) Metric.isOpen_ball.uniqueDiffOn |
| 737 | have he : ContinuousOn (iteratedFDeriv ℝ k g) (Metric.closedBall (0 : Coeff) (r / 2)) := by |
| 738 | apply (hc.mono hsub).congr |
| 739 | intro z hz |
| 740 | exact (iteratedFDerivWithin_of_isOpen k Metric.isOpen_ball (hsub hz)).symm |
| 741 | obtain ⟨B, hB⟩ := (isCompact_closedBall (0 : Coeff) (r / 2)).exists_bound_of_continuousOn he |
| 742 | exact ⟨max B 0, le_max_right _ _, fun z hz => (hB z hz).trans (le_max_left _ _)⟩ |
| 743 | choose B hB hbound using hsingle |
| 744 | refine ⟨1 + ∑ k ∈ Finset.range (N + 1), B k, ?_, ?_⟩ |
| 745 | · have hs := Finset.sum_nonneg (s := Finset.range (N + 1)) (fun k _ => hB k) |
| 746 | linarith |
| 747 | · intro k hk z hz |
| 748 | have hs := Finset.single_le_sum (fun j _ => hB j) (Finset.mem_range.mpr (Nat.lt_succ_of_le hk)) |
| 749 | exact (hbound k z hz).trans (by linarith) |
| 750 | |
| 751 | /-- Genuine higher parameter jets of the nonlinear branch are small when |
| 752 | the corresponding normalized-debt jets are small. The stronger input scale |
| 753 | `tau^(N+1)` gives a simple uniform linear output scale for every order `≤N`. |
| 754 | No derivatives of the solution are supplied as hypotheses. -/ |
| 755 | theorem smooth_solver_parameter_jets {g : Coeff → Coeff} {r C : ℝ} |
| 756 | (hr : 0 < r) (hC : 0 < C) (hg : ContDiffOn ℝ ∞ g (Metric.ball 0 r)) |
| 757 | (hvalue : ∀ z ∈ Metric.ball (0 : Coeff) r, ‖g z‖ ≤ C * ‖z‖) (N : ℕ) : |
| 758 | ∃ K : ℝ, 0 < K ∧ ∀ (f : ℝ → Coeff), ContDiff ℝ ∞ f → |
| 759 | ∀ (tau x : ℝ), 0 < tau → tau ≤ min 1 (r / 2) → |
| 760 | (∀ j ≤ N, ‖iteratedFDeriv ℝ j f x‖ ≤ tau ^ (N + 1)) → |
| 761 | ∀ k ≤ N, ‖iteratedFDeriv ℝ k (g ∘ f) x‖ ≤ K * tau := by |
| 762 | obtain ⟨B, hB, hgb⟩ := smooth_solver_jet_bound hr hg N |
| 763 | let K : ℝ := C + (N.factorial : ℝ) * B |
| 764 | have hK : 0 < K := by dsimp [K]; positivity |
| 765 | refine ⟨K, hK, ?_⟩ |
| 766 | intro f hf tau x htau hmax hfj k hk |
| 767 | have ht1 : tau ≤ 1 := hmax.trans (min_le_left _ _) |
| 768 | have htr : tau ≤ r / 2 := hmax.trans (min_le_right _ _) |
| 769 | have hpow : tau ^ (N + 1) ≤ tau := by |
| 770 | simpa only [pow_one] using pow_le_pow_of_le_one htau.le ht1 (show 1 ≤ N + 1 by omega) |
| 771 | have hfx : ‖f x‖ ≤ tau := by |
| 772 | simpa only [norm_iteratedFDeriv_zero] using (hfj 0 (Nat.zero_le N)).trans hpow |
| 773 | have hxclosed : f x ∈ Metric.closedBall (0 : Coeff) (r / 2) := by |
| 774 | simpa only [Metric.mem_closedBall, dist_zero_right] using hfx.trans htr |
| 775 | have hxball : f x ∈ Metric.ball (0 : Coeff) r := by |
| 776 | simpa only [Metric.mem_ball, dist_zero_right] using hfx.trans_lt (lt_of_le_of_lt htr (by linarith)) |
| 777 | by_cases hk0 : k = 0 |
| 778 | · subst k |
| 779 | rw [norm_iteratedFDeriv_zero] |
| 780 | exact ((hvalue _ hxball).trans (mul_le_mul_of_nonneg_left hfx hC.le)).trans |
| 781 | (mul_le_mul_of_nonneg_right (by dsimp [K]; exact le_add_of_nonneg_right (by positivity)) htau.le) |
| 782 | let V : Set ℝ := f ⁻¹' Metric.ball (0 : Coeff) r |
| 783 | have hV : IsOpen V := Metric.isOpen_ball.preimage hf.continuous |
| 784 | have hxV : x ∈ V := hxball |
| 785 | have hchain := norm_iteratedFDerivWithin_comp_le hg hf.contDiffOn |
| 786 | (by exact_mod_cast (le_top : (k : ℕ∞) ≤ ⊤)) Metric.isOpen_ball.uniqueDiffOn hV.uniqueDiffOn |
| 787 | (show MapsTo f V (Metric.ball 0 r) from fun _ hy => hy) hxV (C := B) (D := tau) |
| 788 | (fun j hj => ?_) (fun j hj hjk => ?_) |
| 789 | · rw [iteratedFDerivWithin_of_isOpen k hV hxV] at hchain |
| 790 | have hfac : (k.factorial : ℝ) * B ≤ (N.factorial : ℝ) * B := |
| 791 | mul_le_mul_of_nonneg_right (by exact_mod_cast Nat.factorial_le hk) hB.le |
| 792 | have hp : tau ^ k ≤ tau := by |
| 793 | simpa only [pow_one] using pow_le_pow_of_le_one htau.le ht1 (show 1 ≤ k by omega) |
| 794 | exact (hchain.trans (mul_le_mul hfac hp (pow_nonneg htau.le k) (by positivity))).trans |
| 795 | (mul_le_mul_of_nonneg_right (by dsimp [K]; linarith) htau.le) |
| 796 | · rw [iteratedFDerivWithin_of_isOpen j Metric.isOpen_ball hxball] |
| 797 | exact hgb j (hj.trans hk) _ hxclosed |
| 798 | · rw [iteratedFDerivWithin_of_isOpen j hV hxV] |
| 799 | exact (hfj j (hjk.trans hk)).trans |
| 800 | (pow_le_pow_of_le_one htau.le ht1 (by omega : j ≤ N + 1)) |
| 801 | |
| 802 | noncomputable def jetEval {n : ℕ} (P : Patch) (k : ℕ) (x : ℝ) : (Fin n → ℝ) →L[ℝ] ℝ := |
| 803 | LinearMap.toContinuousLinearMap |
| 804 | { toFun := fun c => ∑ i, c i * iteratedDeriv k (bump P i) x |
| 805 | map_add' := fun c d => by simp [Pi.add_apply, add_mul, Finset.sum_add_distrib] |
| 806 | map_smul' := fun r c => by simp [Pi.smul_apply, smul_eq_mul, Finset.mul_sum, mul_assoc] } |
| 807 | |
| 808 | noncomputable def uJetEval (P : Patch) (k : ℕ) (x : ℝ) : Coeff →L[ℝ] ℝ := |
| 809 | (jetEval P.leftHalf k x).comp (ContinuousLinearMap.fst ℝ _ _) |
| 810 | |
| 811 | noncomputable def eJetEval (P : Patch) (k : ℕ) (x : ℝ) : Coeff →L[ℝ] ℝ := |
| 812 | (jetEval P.rightHalf k x).comp (ContinuousLinearMap.snd ℝ _ _) |
| 813 | |
| 814 | theorem uJetEval_apply (P : Patch) (k : ℕ) (x : ℝ) (c : Coeff) : |
| 815 | uJetEval P k x c = iteratedDeriv k (u P c) x := |
| 816 | (correction_iteratedDeriv P.leftHalf c.1 k x).symm |
| 817 | |
| 818 | theorem eJetEval_apply (P : Patch) (k : ℕ) (x : ℝ) (c : Coeff) : |
| 819 | eJetEval P k x c = iteratedDeriv k (e P c) x := |
| 820 | (correction_iteratedDeriv P.rightHalf c.2 k x).symm |
| 821 | |
| 822 | theorem linear_parameter_jet_bound (L : Coeff →L[ℝ] ℝ) {v : ℝ → Coeff} {eta : ℝ} |
| 823 | (hv : ContDiffAt ℝ ∞ v eta) (m : ℕ) : |
| 824 | ‖iteratedFDeriv ℝ m (L ∘ v) eta‖ ≤ ‖L‖ * ‖iteratedFDeriv ℝ m v eta‖ := by |
| 825 | rw [L.iteratedFDeriv_comp_left hv (by exact_mod_cast (le_top : (m : ℕ∞) ≤ ⊤))] |
| 826 | exact L.norm_compContinuousMultilinearMap_le _ |
| 827 | |
| 828 | /-- Every mixed parameter/radial jet of the actual fixed bump family is |
| 829 | controlled by the corresponding parameter jet of its coefficients. -/ |
| 830 | theorem mixed_jet_bound (P : Patch) (N : ℕ) : |
| 831 | ∃ J : ℝ, 0 < J ∧ ∀ k ≤ N, ∀ (m : ℕ) (v : ℝ → Coeff) (eta : ℝ), |
| 832 | ContDiffAt ℝ ∞ v eta → ∀ x : ℝ, |
| 833 | ‖iteratedFDeriv ℝ m (fun p => iteratedDeriv k (u P (v p)) x) eta‖ ≤ |
| 834 | J * ‖iteratedFDeriv ℝ m v eta‖ ∧ |
| 835 | ‖iteratedFDeriv ℝ m (fun p => iteratedDeriv k (e P (v p)) x) eta‖ ≤ |
| 836 | J * ‖iteratedFDeriv ℝ m v eta‖ := by |
| 837 | obtain ⟨J, hJ, hjets⟩ := finite_spatial_jet_bound P N |
| 838 | refine ⟨J, hJ, ?_⟩ |
| 839 | intro k hk m v eta hv x |
| 840 | have hU : ‖uJetEval P k x‖ ≤ J := by |
| 841 | apply ContinuousLinearMap.opNorm_le_bound _ hJ.le |
| 842 | intro c |
| 843 | simpa only [uJetEval_apply, Real.norm_eq_abs] using (hjets k hk c x).1 |
| 844 | have hE : ‖eJetEval P k x‖ ≤ J := by |
| 845 | apply ContinuousLinearMap.opNorm_le_bound _ hJ.le |
| 846 | intro c |
| 847 | simpa only [eJetEval_apply, Real.norm_eq_abs] using (hjets k hk c x).2 |
| 848 | have heU : (fun p => iteratedDeriv k (u P (v p)) x) = uJetEval P k x ∘ v := |
| 849 | funext (fun p => (uJetEval_apply P k x (v p)).symm) |
| 850 | have heE : (fun p => iteratedDeriv k (e P (v p)) x) = eJetEval P k x ∘ v := |
| 851 | funext (fun p => (eJetEval_apply P k x (v p)).symm) |
| 852 | rw [heU, heE] |
| 853 | exact ⟨(linear_parameter_jet_bound _ hv m).trans (mul_le_mul_of_nonneg_right hU (norm_nonneg _)), |
| 854 | (linear_parameter_jet_bound _ hv m).trans (mul_le_mul_of_nonneg_right hE (norm_nonneg _))⟩ |
| 855 | |
| 856 | theorem u_tsupport_patch (P : Patch) (c : Coeff) : tsupport (u P c) ⊆ Ioo P.left P.right := by |
| 857 | intro x hx |
| 858 | have hs := correction_tsupport P.leftHalf c.1 hx |
| 859 | have hm : P.leftHalf.right < P.right := by dsimp [Patch.leftHalf, Patch.mid]; linarith [P.ordered] |
| 860 | exact ⟨hs.1, hs.2.trans hm⟩ |
| 861 | |
| 862 | theorem e_tsupport_patch (P : Patch) (c : Coeff) : tsupport (e P c) ⊆ Ioo P.left P.right := by |
| 863 | intro x hx |
| 864 | have hs := correction_tsupport P.rightHalf c.2 hx |
| 865 | have hm : P.left < P.rightHalf.left := by dsimp [Patch.rightHalf, Patch.mid]; linarith [P.ordered] |
| 866 | exact ⟨hm.trans hs.1, hs.2⟩ |
| 867 | |
| 868 | theorem u_zero_outside (P : Patch) (c : Coeff) {x : ℝ} (hx : x ∉ Ioo P.left P.right) : u P c x = 0 := |
| 869 | Classical.byContradiction (fun hn => hx (u_tsupport_patch P c (subset_tsupport _ hn))) |
| 870 | |
| 871 | theorem e_zero_outside (P : Patch) (c : Coeff) {x : ℝ} (hx : x ∉ Ioo P.left P.right) : e P c x = 0 := |
| 872 | Classical.byContradiction (fun hn => hx (e_tsupport_patch P c (subset_tsupport _ hn))) |
| 873 | |
| 874 | theorem physical_edits_tsupport (P : Patch) (A : ℝ) (c : Coeff) : |
| 875 | tsupport (fun x => A * u P c x) ⊆ Ioo P.left P.right ∧ |
| 876 | tsupport (fun x => A * e P c x) ⊆ Ioo P.left P.right := by |
| 877 | constructor |
| 878 | · apply Set.Subset.trans _ (u_tsupport_patch P c) |
| 879 | apply closure_mono |
| 880 | intro x hx hu |
| 881 | exact hx (by simp [hu]) |
| 882 | · apply Set.Subset.trans _ (e_tsupport_patch P c) |
| 883 | apply closure_mono |
| 884 | intro x hx he |
| 885 | exact hx (by simp [he]) |
| 886 | |
| 887 | noncomputable def profileChangeDensity (U E dU dE : ℝ → ℝ) (x : ℝ) : Debt := |
| 888 | ![(U x + dU x) - U x, |
| 889 | Real.sqrt (2 * x) * ((E x + dE x) - E x), |
| 890 | (U x + dU x) * Real.sqrt (2 * x) * (E x + dE x) - U x * Real.sqrt (2 * x) * E x, |
| 891 | ((U x + dU x) ^ 2 - (E x + dE x) ^ 2 / 2) - ((U x) ^ 2 - (E x) ^ 2 / 2), |
| 892 | ((E x + dE x) ^ 2 - (E x) ^ 2) / (2 * x)] |
| 893 | |
| 894 | /-- Only agreement with the power background on the reserved patch is needed; |
| 895 | the profiles outside the patch are arbitrary and are preserved exactly. -/ |
| 896 | theorem local_profile_change (P : Patch) (b A G : ℝ) (c : Coeff) (U E : ℝ → ℝ) |
| 897 | (hU : ∀ x ∈ Ioo P.left P.right, U x = G) |
| 898 | (hE : ∀ x ∈ Ioo P.left P.right, E x = A * x ^ b) (x : ℝ) : |
| 899 | profileChangeDensity U E (fun y => A * u P c y) (fun y => A * e P c y) x = |
| 900 | physicalDensity P b A G c x := by |
| 901 | by_cases hx : x ∈ Ioo P.left P.right |
| 902 | · ext i |
| 903 | fin_cases i <;> dsimp only [profileChangeDensity, physicalDensity, physicalU, physicalE] <;> |
| 904 | simp only [hU x hx, hE x hx] <;> ring_nf |
| 905 | · rw [physicalDensity_zero_outside P b A G c hx] |
| 906 | ext i |
| 907 | fin_cases i <;> simp [profileChangeDensity, u_zero_outside P c hx, e_zero_outside P c hx] |
| 908 | |
| 909 | noncomputable def normalizationCLM (A G : ℝ) : Debt →L[ℝ] Coeff := |
| 910 | ∑ i : Fin 5, ContinuousLinearMap.smulRightL ℝ Debt Coeff |
| 911 | (ContinuousLinearMap.proj i) (normalizedDebt A G (Pi.single i 1)) |
| 912 | |
| 913 | theorem normalizationCLM_apply (A G : ℝ) (d : Debt) : normalizationCLM A G d = normalizedDebt A G d := by |
| 914 | rw [normalizedDebt_eq_sum] |
| 915 | rfl |
| 916 | |
| 917 | theorem normalizationCLM_contDiff {A G : ℝ → ℝ} |
| 918 | (hA : ContDiff ℝ ∞ A) (hG : ContDiff ℝ ∞ G) (hAn : ∀ p, A p ≠ 0) : |
| 919 | ContDiff ℝ ∞ (fun p => normalizationCLM (A p) (G p)) := by |
| 920 | apply ContDiff.sum |
| 921 | intro i _ |
| 922 | exact (ContinuousLinearMap.smulRightL ℝ Debt Coeff (ContinuousLinearMap.proj i)).contDiff.comp |
| 923 | (normalizedDebt_contDiff hA hG contDiff_const hAn) |
| 924 | |
| 925 | theorem compact_global_jet_bound {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 926 | (S : Set ℝ) (hS : IsCompact S) {f : ℝ → F} (hf : ContDiff ℝ ∞ f) (N : ℕ) : |
| 927 | ∃ K : ℝ, 0 < K ∧ JetBounds.FiniteJetBound N f S K := by |
| 928 | have hb : ∀ j : ℕ, ∃ B : ℝ, 0 ≤ B ∧ ∀ p ∈ S, ‖iteratedFDeriv ℝ j f p‖ ≤ B := by |
| 929 | intro j |
| 930 | obtain ⟨B, hB⟩ := hS.exists_bound_of_continuousOn |
| 931 | (hf.continuous_iteratedFDeriv (by exact_mod_cast (le_top : (j : ℕ∞) ≤ ⊤))).continuousOn |
| 932 | exact ⟨max B 0, le_max_right _ _, fun p hp => (hB p hp).trans (le_max_left _ _)⟩ |
| 933 | choose B hB hbound using hb |
| 934 | refine ⟨1 + ∑ j ∈ Finset.range (N + 1), B j, ?_, ?_⟩ |
| 935 | · have hs := Finset.sum_nonneg (s := Finset.range (N + 1)) (fun j _ => hB j) |
| 936 | linarith |
| 937 | · intro j hj p hp |
| 938 | have hsum := Finset.single_le_sum (fun j _ => hB j) (Finset.mem_range.mpr (Nat.lt_succ_of_le hj)) |
| 939 | exact (hbound j p hp).trans (by linarith) |
| 940 | |
| 941 | /-- The fixed smooth weights in the normalization preserve smallness of every |
| 942 | finite parameter jet. This bridges physical row estimates to the nonlinear |
| 943 | solver's normalized-debt estimates. -/ |
| 944 | theorem compact_normalizedDebt_jets (S : Set ℝ) (hS : IsCompact S) {A G : ℝ → ℝ} |
| 945 | (hA : ContDiff ℝ ∞ A) (hG : ContDiff ℝ ∞ G) (hAn : ∀ p, A p ≠ 0) (N : ℕ) : |
| 946 | ∃ K : ℝ, 0 < K ∧ ∀ d : ℝ → Debt, ContDiff ℝ ∞ d → ∀ D : ℝ, 0 ≤ D → |
| 947 | JetBounds.FiniteJetBound N d S D → |
| 948 | JetBounds.FiniteJetBound N (fun p => normalizedDebt (A p) (G p) (d p)) S (K * D) := by |
| 949 | have hF := normalizationCLM_contDiff hA hG hAn |
| 950 | obtain ⟨B, hB, hFb⟩ := compact_global_jet_bound S hS hF N |
| 951 | refine ⟨(2 : ℝ) ^ N * B, by positivity, ?_⟩ |
| 952 | intro d hd D hD hdb n hn p hp |
| 953 | have heq : (fun p => normalizedDebt (A p) (G p) (d p)) = |
| 954 | fun p => normalizationCLM (A p) (G p) (d p) := |
| 955 | funext (fun p => (normalizationCLM_apply (A p) (G p) (d p)).symm) |
| 956 | rw [heq] |
| 957 | calc |
| 958 | _ ≤ ∑ i ∈ Finset.range (n + 1), (n.choose i : ℝ) * |
| 959 | ‖iteratedFDeriv ℝ i (fun p => normalizationCLM (A p) (G p)) p‖ * |
| 960 | ‖iteratedFDeriv ℝ (n - i) d p‖ := |
| 961 | norm_iteratedFDeriv_clm_apply hF hd p (by exact_mod_cast (le_top : (n : ℕ∞) ≤ ⊤)) |
| 962 | _ ≤ ∑ i ∈ Finset.range (n + 1), (n.choose i : ℝ) * B * D := by |
| 963 | apply Finset.sum_le_sum |
| 964 | intro i hi |
| 965 | have hin : i ≤ n := Nat.le_of_lt_succ (Finset.mem_range.mp hi) |
| 966 | exact mul_le_mul (mul_le_mul_of_nonneg_left (hFb i (hin.trans hn) p hp) (Nat.cast_nonneg _)) |
| 967 | (hdb (n - i) ((Nat.sub_le _ _).trans hn) p hp) (norm_nonneg _) (by positivity) |
| 968 | _ = (2 : ℝ) ^ n * B * D := by |
| 969 | rw [← Finset.sum_mul, ← Finset.sum_mul] |
| 970 | congr 2 |
| 971 | exact_mod_cast Nat.sum_range_choose n |
| 972 | _ ≤ ((2 : ℝ) ^ N * B) * D := |
| 973 | mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right |
| 974 | (pow_le_pow_right₀ (by norm_num) hn) hB.le) hD |
| 975 | |
| 976 | end NavierStokes.FiveProfileMoments |