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.PositiveAxisSystem |
| 2 | import NavierStokes.FiveRowRank |
| 3 | import NavierStokes.ProfileHistories |
| 4 | import Mathlib.MeasureTheory.Integral.IntervalIntegral.IntegrationByParts |
| 5 | |
| 6 | /-! |
| 7 | # Actual five-row repair at positive slow order |
| 8 | |
| 9 | Only the order-n entries of the histories are changed. Endpoint extraction |
| 10 | proves that all five actual moment increments are linear, including pressure |
| 11 | with the known previous-order radial residual retained. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | open Set Function MeasureTheory |
| 17 | open scoped BigOperators ContDiff |
| 18 | |
| 19 | namespace NavierStokes.PositiveOrderMoments |
| 20 | |
| 21 | abbrev Profile := ℝ → ℝ |
| 22 | abbrev History := ℕ → Profile |
| 23 | abbrev Debt := Fin 5 → ℝ |
| 24 | |
| 25 | noncomputable def cauchy (n : ℕ) (u v : History) (R : ℝ) : ℝ := |
| 26 | PositiveAxisSystem.convolution n (fun i j => u i R * v j R) |
| 27 | |
| 28 | noncomputable def increment (u : History) (n : ℕ) (du : Profile) : History := |
| 29 | Function.update u n (fun R => u n R + du R) |
| 30 | |
| 31 | theorem increment_lower (u : History) {n j : ℕ} (du : Profile) (hj : j < n) : |
| 32 | increment u n du j = u j := Function.update_of_ne (Nat.ne_of_lt hj) _ _ |
| 33 | |
| 34 | theorem cauchy_increment {n : ℕ} (hn : 0 < n) (u v : History) (du dv : Profile) (R : ℝ) : |
| 35 | cauchy n (increment u n du) (increment v n dv) R = |
| 36 | cauchy n u v R + u 0 R * dv R + du R * v 0 R := by |
| 37 | have hl : PositiveAxisSystem.lowerConvolution n |
| 38 | (fun i j => increment u n du i R * increment v n dv j R) = |
| 39 | PositiveAxisSystem.lowerConvolution n (fun i j => u i R * v j R) := by |
| 40 | apply PositiveAxisSystem.lowerConvolution_congr |
| 41 | intro i hi j hj |
| 42 | rw [increment_lower u du hi, increment_lower v dv hj] |
| 43 | unfold cauchy |
| 44 | rw [PositiveAxisSystem.convolution_split hn, PositiveAxisSystem.convolution_split hn, hl] |
| 45 | rw [increment_lower u du hn, increment_lower v dv hn] |
| 46 | simp only [increment, Function.update_self] |
| 47 | ring |
| 48 | |
| 49 | /-- The actual R-pressure equation: Ω is the fixed order-(n-1) source. -/ |
| 50 | noncomputable def pressureGradient (n : ℕ) (e : History) (omega : Profile) (R : ℝ) : ℝ := |
| 51 | (cauchy n e e R - omega R) / R |
| 52 | |
| 53 | |
| 54 | /-- The angular similarity coefficient in (22), reconstructed from E. -/ |
| 55 | noncomputable def phiHistory (C : ℝ) (e : History) : History := |
| 56 | fun j R => C * e j R / R |
| 57 | |
| 58 | theorem cauchy_phiHistory (n : ℕ) (C : ℝ) (e : History) (R : ℝ) : |
| 59 | cauchy n (phiHistory C e) (phiHistory C e) R = (C / R) ^ 2 * cauchy n e e R := by |
| 60 | unfold cauchy PositiveAxisSystem.convolution phiHistory |
| 61 | rw [Finset.mul_sum] |
| 62 | apply Finset.sum_congr rfl |
| 63 | intro j hj |
| 64 | ring |
| 65 | |
| 66 | /-- Multiplying the actual X-pressure equation by dX/dR=R gives the pressure |
| 67 | row used here. In particular the preceding Ω term is retained exactly. -/ |
| 68 | theorem pressureGradient_eq_X_equation (n : ℕ) (C : ℝ) (e : History) (omega : Profile) |
| 69 | {R : ℝ} (hC : C ≠ 0) (hR : R ≠ 0) : |
| 70 | pressureGradient n e omega R = R * ((C ^ 2)⁻¹ * |
| 71 | cauchy n (phiHistory C e) (phiHistory C e) R - omega R / (2 * (R ^ 2 / 2))) := by |
| 72 | rw [cauchy_phiHistory] |
| 73 | unfold pressureGradient |
| 74 | field_simp |
| 75 | |
| 76 | /-- The five densities in (23), in the order printed there. -/ |
| 77 | noncomputable def rowDensity (n : ℕ) (u e : History) (omega : Profile) (R : ℝ) : Debt := |
| 78 | ![R * u n R, R ^ 2 * e n R, pressureGradient n e omega R, |
| 79 | R ^ 2 * cauchy n u e R, |
| 80 | R * cauchy n u u R - R ^ 2 / 2 * pressureGradient n e omega R] |
| 81 | |
| 82 | noncomputable def positiveIntegral (f : Profile) : ℝ := ∫ R in Ioi (0 : ℝ), f R |
| 83 | |
| 84 | noncomputable def moments (n : ℕ) (u e : History) (omega : Profile) : Debt := |
| 85 | fun i => positiveIntegral (fun R => rowDensity n u e omega R i) |
| 86 | |
| 87 | noncomputable def linearDensity (u₀ e₀ du de : Profile) (R : ℝ) : Debt := |
| 88 | ![R * du R, R ^ 2 * de R, 2 * e₀ R * de R / R, |
| 89 | R ^ 2 * (u₀ R * de R + du R * e₀ R), |
| 90 | 2 * R * u₀ R * du R - R * e₀ R * de R] |
| 91 | |
| 92 | /-- There are no quadratic current-order terms when n>0. -/ |
| 93 | theorem rowDensity_increment {n : ℕ} (hn : 0 < n) (u e : History) (omega du de : Profile) |
| 94 | (R : ℝ) : |
| 95 | rowDensity n (increment u n du) (increment e n de) omega R = |
| 96 | rowDensity n u e omega R + linearDensity (u 0) (e 0) du de R := by |
| 97 | ext i |
| 98 | fin_cases i <;> |
| 99 | simp only [rowDensity, pressureGradient, cauchy_increment hn, Pi.add_apply] <;> |
| 100 | simp [linearDensity, increment, Function.update_self, div_eq_mul_inv] |
| 101 | all_goals try ring1 |
| 102 | by_cases hR : R = 0 |
| 103 | · simp [hR] |
| 104 | · field_simp |
| 105 | ring |
| 106 | |
| 107 | noncomputable def weightedDensity (lam A : ℝ) (du de : Profile) (R : ℝ) : Debt := |
| 108 | ![R * du R, R ^ 2 * de R, (2 * A) * (R ^ (-2 - 2 * lam) * de R), |
| 109 | A * (R ^ (1 - 2 * lam) * du R), (-A) * (R ^ (-2 * lam) * de R)] |
| 110 | |
| 111 | theorem linearDensity_on_patch (lam A a b : ℝ) (ha : 0 < a) |
| 112 | (u₀ e₀ du de : Profile) |
| 113 | (hu : ∀ R ∈ Ioo a b, u₀ R = 0) |
| 114 | (he : ∀ R ∈ Ioo a b, e₀ R = FiveRowRank.background lam A R) |
| 115 | (hdu : support du ⊆ Ioo a b) (hde : support de ⊆ Ioo a b) (R : ℝ) : |
| 116 | linearDensity u₀ e₀ du de R = weightedDensity lam A du de R := by |
| 117 | by_cases hR : R ∈ Ioo a b |
| 118 | · have hp : 0 < R := ha.trans hR.1 |
| 119 | ext i |
| 120 | fin_cases i <;> simp [linearDensity, weightedDensity, hu R hR, he R hR] |
| 121 | · rw [show 2 * FiveRowRank.background lam A R * de R / R = |
| 122 | (2 * FiveRowRank.background lam A R / R) * de R by ring, |
| 123 | FiveRowRank.pressure_weight lam A R hp] |
| 124 | ring |
| 125 | · rw [show R ^ 2 * (du R * FiveRowRank.background lam A R) = |
| 126 | (R ^ 2 * FiveRowRank.background lam A R) * du R by ring, |
| 127 | FiveRowRank.angular_weight lam A R hp] |
| 128 | ring |
| 129 | · have hw := FiveRowRank.axial_weight lam A R hp |
| 130 | have hw' : R * FiveRowRank.background lam A R = A * R ^ (-2 * lam) := by linarith |
| 131 | rw [hw'] |
| 132 | ring_nf |
| 133 | · have hd : du R = 0 := by |
| 134 | by_contra h |
| 135 | exact hR (hdu h) |
| 136 | have he' : de R = 0 := by |
| 137 | by_contra h |
| 138 | exact hR (hde h) |
| 139 | simp [linearDensity, weightedDensity, hd, he'] |
| 140 | |
| 141 | /-- Axial target moments: physical mass and angular transport. -/ |
| 142 | noncomputable def axialDebt (A : ℝ) (d : Debt) : Fin 2 → ℝ := ![d 0, d 3 / A] |
| 143 | |
| 144 | /-- Angular target moments: angular mass, pressure, and axial transport. -/ |
| 145 | noncomputable def angularDebt (A : ℝ) (d : Debt) : Fin 3 → ℝ := |
| 146 | ![d 1, d 2 / (2 * A), -(d 4) / A] |
| 147 | |
| 148 | noncomputable def repairU (lam A a b : ℝ) (d : Debt) : Profile := |
| 149 | LocalizedMomentRepair.repair (FiveRowRank.axialPowers lam) |
| 150 | (FiveRowRank.cellLower a b) (FiveRowRank.cellUpper a b) (axialDebt A d) |
| 151 | |
| 152 | noncomputable def repairE (lam A a b : ℝ) (d : Debt) : Profile := |
| 153 | LocalizedMomentRepair.repair (FiveRowRank.angularPowers lam) |
| 154 | (FiveRowRank.cellLower a b) (FiveRowRank.cellUpper a b) (angularDebt A d) |
| 155 | |
| 156 | theorem repairU_contDiff (lam A a b : ℝ) (d : Debt) : ContDiff ℝ ∞ (repairU lam A a b d) := |
| 157 | LocalizedMomentRepair.repair_contDiff _ _ _ _ |
| 158 | |
| 159 | theorem repairE_contDiff (lam A a b : ℝ) (d : Debt) : ContDiff ℝ ∞ (repairE lam A a b d) := |
| 160 | LocalizedMomentRepair.repair_contDiff _ _ _ _ |
| 161 | |
| 162 | theorem repairU_tsupport (lam A a b : ℝ) (d : Debt) (hab : a < b) : |
| 163 | tsupport (repairU lam A a b d) ⊆ Ioo a b := |
| 164 | (LocalizedMomentRepair.repair_tsupport_subset_open _ _ _ _ |
| 165 | (FiveRowRank.cell_lower_lt_upper a b hab)).trans (FiveRowRank.cell_union_subset a b hab) |
| 166 | |
| 167 | theorem repairE_tsupport (lam A a b : ℝ) (d : Debt) (hab : a < b) : |
| 168 | tsupport (repairE lam A a b d) ⊆ Ioo a b := |
| 169 | (LocalizedMomentRepair.repair_tsupport_subset_open _ _ _ _ |
| 170 | (FiveRowRank.cell_lower_lt_upper a b hab)).trans (FiveRowRank.cell_union_subset a b hab) |
| 171 | |
| 172 | theorem repairU_moment (lam A a b : ℝ) (d : Debt) (hlam : 0 < lam) (ha : 0 < a) |
| 173 | (hab : a < b) (i : Fin 2) : |
| 174 | (∫ R, R ^ FiveRowRank.axialPowers lam i * repairU lam A a b d R) = axialDebt A d i := |
| 175 | LocalizedMomentRepair.repair_exact _ _ _ _ (FiveRowRank.axialPowers_injective lam hlam) |
| 176 | (FiveRowRank.cell_positive a b ha hab) (FiveRowRank.cell_lower_lt_upper a b hab) |
| 177 | (FiveRowRank.cell_separated a b hab) i |
| 178 | |
| 179 | theorem repairE_moment (lam A a b : ℝ) (d : Debt) (hlam : 0 < lam) (ha : 0 < a) |
| 180 | (hab : a < b) (i : Fin 3) : |
| 181 | (∫ R, R ^ FiveRowRank.angularPowers lam i * repairE lam A a b d R) = angularDebt A d i := |
| 182 | LocalizedMomentRepair.repair_exact _ _ _ _ (FiveRowRank.angularPowers_injective lam hlam) |
| 183 | (FiveRowRank.cell_positive a b ha hab) (FiveRowRank.cell_lower_lt_upper a b hab) |
| 184 | (FiveRowRank.cell_separated a b hab) i |
| 185 | |
| 186 | theorem positiveIntegral_eq_integral {f : Profile} (hf : ∀ R ≤ 0, f R = 0) : |
| 187 | positiveIntegral f = ∫ R, f R := by |
| 188 | apply setIntegral_eq_integral_of_forall_compl_eq_zero |
| 189 | intro R hR |
| 190 | exact hf R (le_of_not_gt hR) |
| 191 | |
| 192 | theorem weighted_moments_exact (lam A a b : ℝ) (d : Debt) (hlam : 0 < lam) |
| 193 | (hA : A ≠ 0) (ha : 0 < a) (hab : a < b) (i : Fin 5) : |
| 194 | positiveIntegral (fun R => weightedDensity lam A (repairU lam A a b d) (repairE lam A a b d) R i) = d i := by |
| 195 | have hdu := subset_closure.trans (repairU_tsupport lam A a b d hab) |
| 196 | have hde := subset_closure.trans (repairE_tsupport lam A a b d hab) |
| 197 | rw [positiveIntegral_eq_integral (by |
| 198 | intro R hR |
| 199 | have hu : repairU lam A a b d R = 0 := by |
| 200 | by_contra h |
| 201 | exact (not_lt_of_ge hR) (ha.trans (hdu h).1) |
| 202 | have he : repairE lam A a b d R = 0 := by |
| 203 | by_contra h |
| 204 | exact (not_lt_of_ge hR) (ha.trans (hde h).1) |
| 205 | fin_cases i <;> simp [weightedDensity, hu, he])] |
| 206 | have hu := repairU_moment lam A a b d hlam ha hab |
| 207 | have he := repairE_moment lam A a b d hlam ha hab |
| 208 | fin_cases i |
| 209 | · simpa [weightedDensity, FiveRowRank.axialPowers, axialDebt] using hu 0 |
| 210 | · simpa [weightedDensity, FiveRowRank.angularPowers, angularDebt] using he 0 |
| 211 | · change (∫ R, (2 * A) * (R ^ (-2 - 2 * lam) * repairE lam A a b d R)) = d 2 |
| 212 | rw [integral_const_mul] |
| 213 | have hm := he 1 |
| 214 | simp [FiveRowRank.angularPowers, angularDebt] at hm |
| 215 | rw [hm] |
| 216 | field_simp |
| 217 | · change (∫ R, A * (R ^ (1 - 2 * lam) * repairU lam A a b d R)) = d 3 |
| 218 | rw [integral_const_mul] |
| 219 | have hm := hu 1 |
| 220 | simp [FiveRowRank.axialPowers, axialDebt] at hm |
| 221 | rw [hm] |
| 222 | field_simp |
| 223 | · change (∫ R, (-A) * (R ^ (-2 * lam) * repairE lam A a b d R)) = d 4 |
| 224 | rw [integral_const_mul] |
| 225 | have hm : (∫ R, R ^ (-2 * lam) * repairE lam A a b d R) = -(d 4) / A := he 2 |
| 226 | rw [hm] |
| 227 | field_simp |
| 228 | |
| 229 | |
| 230 | theorem repairU_power_integrable (lam A a b p : ℝ) (d : Debt) (ha : 0 < a) (hab : a < b) : |
| 231 | Integrable (fun R => R ^ p * repairU lam A a b d R) := |
| 232 | FiveRowRank.integrable_power_mul_of_patch p a b _ ha (repairU_contDiff lam A a b d).continuous |
| 233 | (subset_closure.trans (repairU_tsupport lam A a b d hab)) |
| 234 | |
| 235 | theorem repairE_power_integrable (lam A a b p : ℝ) (d : Debt) (ha : 0 < a) (hab : a < b) : |
| 236 | Integrable (fun R => R ^ p * repairE lam A a b d R) := |
| 237 | FiveRowRank.integrable_power_mul_of_patch p a b _ ha (repairE_contDiff lam A a b d).continuous |
| 238 | (subset_closure.trans (repairE_tsupport lam A a b d hab)) |
| 239 | |
| 240 | theorem weightedDensity_integrable (lam A a b : ℝ) (d : Debt) (ha : 0 < a) (hab : a < b) |
| 241 | (i : Fin 5) : |
| 242 | Integrable (fun R => weightedDensity lam A (repairU lam A a b d) (repairE lam A a b d) R i) := by |
| 243 | fin_cases i |
| 244 | · simpa [weightedDensity] using repairU_power_integrable lam A a b 1 d ha hab |
| 245 | · simpa [weightedDensity] using repairE_power_integrable lam A a b 2 d ha hab |
| 246 | · exact (repairE_power_integrable lam A a b (-2 - 2 * lam) d ha hab).const_mul (2 * A) |
| 247 | · exact (repairU_power_integrable lam A a b (1 - 2 * lam) d ha hab).const_mul A |
| 248 | · exact (repairE_power_integrable lam A a b (-2 * lam) d ha hab).const_mul (-A) |
| 249 | |
| 250 | /-- Exact affine change of all five actual positive-radius integrals. -/ |
| 251 | theorem moments_repair (lam A a b : ℝ) (d : Debt) {n : ℕ} (hn : 0 < n) |
| 252 | (u e : History) (omega : Profile) (hlam : 0 < lam) (hA : A ≠ 0) |
| 253 | (ha : 0 < a) (hab : a < b) |
| 254 | (hu : ∀ R ∈ Ioo a b, u 0 R = 0) |
| 255 | (he : ∀ R ∈ Ioo a b, e 0 R = FiveRowRank.background lam A R) |
| 256 | (hint : ∀ i, IntegrableOn (fun R => rowDensity n u e omega R i) (Ioi 0)) : |
| 257 | moments n (increment u n (repairU lam A a b d)) |
| 258 | (increment e n (repairE lam A a b d)) omega = moments n u e omega + d := by |
| 259 | have hdu := subset_closure.trans (repairU_tsupport lam A a b d hab) |
| 260 | have hde := subset_closure.trans (repairE_tsupport lam A a b d hab) |
| 261 | ext i |
| 262 | have hf : (fun R => rowDensity n (increment u n (repairU lam A a b d)) |
| 263 | (increment e n (repairE lam A a b d)) omega R i) = |
| 264 | (fun R => rowDensity n u e omega R i + |
| 265 | weightedDensity lam A (repairU lam A a b d) (repairE lam A a b d) R i) := by |
| 266 | funext R |
| 267 | rw [rowDensity_increment hn, linearDensity_on_patch lam A a b ha _ _ _ _ hu he hdu hde] |
| 268 | rfl |
| 269 | change positiveIntegral _ = positiveIntegral _ + d i |
| 270 | unfold positiveIntegral |
| 271 | rw [hf, integral_add (hint i) (weightedDensity_integrable lam A a b d ha hab i).integrableOn] |
| 272 | change _ + positiveIntegral _ = _ + d i |
| 273 | rw [weighted_moments_exact lam A a b d hlam hA ha hab i] |
| 274 | |
| 275 | /-- Arbitrary moment debts are removed, with no size restriction. -/ |
| 276 | theorem moments_repair_target (lam A a b : ℝ) (target : Debt) {n : ℕ} (hn : 0 < n) |
| 277 | (u e : History) (omega : Profile) (hlam : 0 < lam) (hA : A ≠ 0) |
| 278 | (ha : 0 < a) (hab : a < b) |
| 279 | (hu : ∀ R ∈ Ioo a b, u 0 R = 0) |
| 280 | (he : ∀ R ∈ Ioo a b, e 0 R = FiveRowRank.background lam A R) |
| 281 | (hint : ∀ i, IntegrableOn (fun R => rowDensity n u e omega R i) (Ioi 0)) : |
| 282 | moments n (increment u n (repairU lam A a b (target - moments n u e omega))) |
| 283 | (increment e n (repairE lam A a b (target - moments n u e omega))) omega = target := by |
| 284 | rw [moments_repair lam A a b _ hn u e omega hlam hA ha hab hu he hint] |
| 285 | abel |
| 286 | |
| 287 | theorem exists_smooth_exact_repair (lam A a b : ℝ) (target : Debt) {n : ℕ} (hn : 0 < n) |
| 288 | (u e : History) (omega : Profile) (hlam : 0 < lam) (hA : A ≠ 0) |
| 289 | (ha : 0 < a) (hab : a < b) |
| 290 | (hu : ∀ R ∈ Ioo a b, u 0 R = 0) |
| 291 | (he : ∀ R ∈ Ioo a b, e 0 R = FiveRowRank.background lam A R) |
| 292 | (hint : ∀ i, IntegrableOn (fun R => rowDensity n u e omega R i) (Ioi 0)) : |
| 293 | ∃ du de : Profile, ContDiff ℝ ∞ du ∧ ContDiff ℝ ∞ de ∧ |
| 294 | HasCompactSupport du ∧ HasCompactSupport de ∧ |
| 295 | tsupport du ⊆ Ioo a b ∧ tsupport de ⊆ Ioo a b ∧ |
| 296 | moments n (increment u n du) (increment e n de) omega = target := by |
| 297 | let d := target - moments n u e omega |
| 298 | refine ⟨repairU lam A a b d, repairE lam A a b d, |
| 299 | repairU_contDiff lam A a b d, repairE_contDiff lam A a b d, ?_, ?_, |
| 300 | repairU_tsupport lam A a b d hab, repairE_tsupport lam A a b d hab, |
| 301 | moments_repair_target lam A a b target hn u e omega hlam hA ha hab hu he hint⟩ |
| 302 | · exact HasCompactSupport.of_support_subset_isCompact isCompact_Icc |
| 303 | ((subset_closure.trans (repairU_tsupport lam A a b d hab)).trans Ioo_subset_Icc_self) |
| 304 | · exact HasCompactSupport.of_support_subset_isCompact isCompact_Icc |
| 305 | ((subset_closure.trans (repairE_tsupport lam A a b d hab)).trans Ioo_subset_Icc_self) |
| 306 | |
| 307 | |
| 308 | theorem repairU_zero_before (lam A a b : ℝ) (d : Debt) (hab : a < b) {R : ℝ} (hR : R ≤ a) : |
| 309 | repairU lam A a b d R = 0 := by |
| 310 | by_contra h |
| 311 | have hm := repairU_tsupport lam A a b d hab (subset_closure h) |
| 312 | exact (not_lt_of_ge hR) hm.1 |
| 313 | |
| 314 | theorem repairE_zero_before (lam A a b : ℝ) (d : Debt) (hab : a < b) {R : ℝ} (hR : R ≤ a) : |
| 315 | repairE lam A a b d R = 0 := by |
| 316 | by_contra h |
| 317 | have hm := repairE_tsupport lam A a b d hab (subset_closure h) |
| 318 | exact (not_lt_of_ge hR) hm.1 |
| 319 | |
| 320 | theorem repairU_zero_outside (lam A a b : ℝ) (d : Debt) (hab : a < b) {R : ℝ} |
| 321 | (hR : R ∉ Ioo a b) : repairU lam A a b d R = 0 := by |
| 322 | by_contra h |
| 323 | exact hR (repairU_tsupport lam A a b d hab (subset_closure h)) |
| 324 | |
| 325 | theorem repairE_zero_outside (lam A a b : ℝ) (d : Debt) (hab : a < b) {R : ℝ} |
| 326 | (hR : R ∉ Ioo a b) : repairE lam A a b d R = 0 := by |
| 327 | by_contra h |
| 328 | exact hR (repairE_tsupport lam A a b d hab (subset_closure h)) |
| 329 | |
| 330 | theorem rowDensity_repair_eq_outside (lam A a b : ℝ) (d : Debt) {n : ℕ} (hn : 0 < n) |
| 331 | (u e : History) (omega : Profile) (hab : a < b) {R : ℝ} (hR : R ∉ Ioo a b) : |
| 332 | rowDensity n (increment u n (repairU lam A a b d)) |
| 333 | (increment e n (repairE lam A a b d)) omega R = rowDensity n u e omega R := by |
| 334 | rw [rowDensity_increment hn] |
| 335 | ext i |
| 336 | fin_cases i <;> simp [linearDensity, repairU_zero_outside lam A a b d hab hR, |
| 337 | repairE_zero_outside lam A a b d hab hR] |
| 338 | |
| 339 | theorem rowDensity_repair_exterior (lam A a b : ℝ) (d : Debt) {n : ℕ} (hn : 0 < n) |
| 340 | (u e : History) (omega : Profile) (hab : a < b) {B R : ℝ} |
| 341 | (hs : ∀ t, B ≤ t → rowDensity n u e omega t = 0) (hR : max B b ≤ R) : |
| 342 | rowDensity n (increment u n (repairU lam A a b d)) |
| 343 | (increment e n (repairE lam A a b d)) omega R = 0 := by |
| 344 | rw [rowDensity_repair_eq_outside lam A a b d hn u e omega hab |
| 345 | (fun ht => (not_lt_of_ge ((le_max_right B b).trans hR)) ht.2)] |
| 346 | exact hs R ((le_max_left B b).trans hR) |
| 347 | |
| 348 | theorem increment_eq_of_zero (u : History) (n j : ℕ) (du : Profile) (R : ℝ) |
| 349 | (hd : du R = 0) : increment u n du j R = u j R := by |
| 350 | by_cases hj : j = n |
| 351 | · subst j |
| 352 | simp [increment, hd] |
| 353 | · simp [increment, hj] |
| 354 | |
| 355 | theorem pressureGradient_increment_of_zero {n : ℕ} (hn : 0 < n) (e : History) |
| 356 | (omega de : Profile) (R : ℝ) (hd : de R = 0) : |
| 357 | pressureGradient n (increment e n de) omega R = pressureGradient n e omega R := by |
| 358 | simp only [pressureGradient, cauchy_increment hn, hd, mul_zero, zero_mul, add_zero] |
| 359 | |
| 360 | /-- Recomputing pressure does not disturb the already solved inner region: |
| 361 | the complete new pressure source agrees with the old one up to the patch. -/ |
| 362 | theorem pressure_primitive_repair_before_patch (lam A a b : ℝ) (d : Debt) |
| 363 | {n : ℕ} (hn : 0 < n) (e : History) (omega : Profile) (hab : a < b) |
| 364 | {R : ℝ} (hR0 : 0 ≤ R) (hRa : R ≤ a) : |
| 365 | (∫ t in (0 : ℝ)..R, pressureGradient n (increment e n (repairE lam A a b d)) omega t) = |
| 366 | ∫ t in (0 : ℝ)..R, pressureGradient n e omega t := by |
| 367 | apply intervalIntegral.integral_congr |
| 368 | intro t ht |
| 369 | rw [uIcc_of_le hR0] at ht |
| 370 | exact pressureGradient_increment_of_zero hn e omega _ t |
| 371 | (repairE_zero_before lam A a b d hab (ht.2.trans hRa)) |
| 372 | |
| 373 | /-- The physical mass primitive is likewise preserved before the patch. -/ |
| 374 | theorem mass_primitive_repair_before_patch (lam A a b : ℝ) (d : Debt) |
| 375 | (n : ℕ) (u : History) (hab : a < b) {R : ℝ} (hR0 : 0 ≤ R) (hRa : R ≤ a) : |
| 376 | (∫ t in (0 : ℝ)..R, t * increment u n (repairU lam A a b d) n t) = |
| 377 | ∫ t in (0 : ℝ)..R, t * u n t := by |
| 378 | apply intervalIntegral.integral_congr |
| 379 | intro t ht |
| 380 | rw [uIcc_of_le hR0] at ht |
| 381 | change t * increment u n (repairU lam A a b d) n t = t * u n t |
| 382 | rw [increment_eq_of_zero u n n _ t |
| 383 | (repairU_zero_before lam A a b d hab (ht.2.trans hRa))] |
| 384 | |
| 385 | section SmoothParameters |
| 386 | |
| 387 | variable {P : Type*} [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 388 | |
| 389 | theorem axialDebt_contDiffOn {S : Set P} {A : P → ℝ} {d : P → Debt} |
| 390 | (hA : ContDiffOn ℝ ∞ A S) (hd : ContDiffOn ℝ ∞ d S) (hAn : ∀ p ∈ S, A p ≠ 0) : |
| 391 | ContDiffOn ℝ ∞ (fun p => axialDebt (A p) (d p)) S := by |
| 392 | apply contDiffOn_pi.mpr |
| 393 | intro i |
| 394 | fin_cases i |
| 395 | · exact contDiffOn_pi.mp hd 0 |
| 396 | · exact (contDiffOn_pi.mp hd 3).div hA hAn |
| 397 | |
| 398 | theorem angularDebt_contDiffOn {S : Set P} {A : P → ℝ} {d : P → Debt} |
| 399 | (hA : ContDiffOn ℝ ∞ A S) (hd : ContDiffOn ℝ ∞ d S) (hAn : ∀ p ∈ S, A p ≠ 0) : |
| 400 | ContDiffOn ℝ ∞ (fun p => angularDebt (A p) (d p)) S := by |
| 401 | apply contDiffOn_pi.mpr |
| 402 | intro i |
| 403 | fin_cases i |
| 404 | · exact contDiffOn_pi.mp hd 1 |
| 405 | · exact (contDiffOn_pi.mp hd 2).div (contDiffOn_const.mul hA) |
| 406 | (fun p hp => mul_ne_zero (by norm_num) (hAn p hp)) |
| 407 | · exact (contDiffOn_pi.mp hd 4).neg.div hA hAn |
| 408 | |
| 409 | theorem repairU_joint_contDiffOn (lam a b : ℝ) {S : Set P} {A : P → ℝ} {d : P → Debt} |
| 410 | (hA : ContDiffOn ℝ ∞ A S) (hd : ContDiffOn ℝ ∞ d S) (hAn : ∀ p ∈ S, A p ≠ 0) : |
| 411 | ContDiffOn ℝ ∞ (fun z : P × ℝ => repairU lam (A z.1) a b (d z.1) z.2) (S ×ˢ univ) := |
| 412 | FiveRowRank.repair_joint_contDiffOn (E := P) (n := 2) |
| 413 | (FiveRowRank.axialPowers lam) (FiveRowRank.cellLower a b) (FiveRowRank.cellUpper a b) |
| 414 | (S := S) (d := fun p => axialDebt (A p) (d p)) (axialDebt_contDiffOn hA hd hAn) |
| 415 | |
| 416 | theorem repairE_joint_contDiffOn (lam a b : ℝ) {S : Set P} {A : P → ℝ} {d : P → Debt} |
| 417 | (hA : ContDiffOn ℝ ∞ A S) (hd : ContDiffOn ℝ ∞ d S) (hAn : ∀ p ∈ S, A p ≠ 0) : |
| 418 | ContDiffOn ℝ ∞ (fun z : P × ℝ => repairE lam (A z.1) a b (d z.1) z.2) (S ×ˢ univ) := |
| 419 | FiveRowRank.repair_joint_contDiffOn (E := P) (n := 3) |
| 420 | (FiveRowRank.angularPowers lam) (FiveRowRank.cellLower a b) (FiveRowRank.cellUpper a b) |
| 421 | (S := S) (d := fun p => angularDebt (A p) (d p)) (angularDebt_contDiffOn hA hd hAn) |
| 422 | |
| 423 | end SmoothParameters |
| 424 | |
| 425 | |
| 426 | section PhysicalHistories |
| 427 | |
| 428 | abbrev JointProfile := ℝ × ℝ → ℝ |
| 429 | abbrev JointHistory := ℕ → JointProfile |
| 430 | |
| 431 | noncomputable def slice (f : JointHistory) (eta : ℝ) : History := fun j R => f j (R, eta) |
| 432 | |
| 433 | noncomputable def jointIncrement (u : JointHistory) (n : ℕ) (du : JointProfile) : JointHistory := |
| 434 | Function.update u n (fun w => u n w + du w) |
| 435 | |
| 436 | theorem slice_jointIncrement (u : JointHistory) (n : ℕ) (du : JointProfile) (eta : ℝ) : |
| 437 | slice (jointIncrement u n du) eta = increment (slice u eta) n (fun R => du (R, eta)) := by |
| 438 | funext j R |
| 439 | by_cases hj : j = n |
| 440 | · subst j |
| 441 | simp [slice, jointIncrement, increment] |
| 442 | · simp [slice, jointIncrement, increment, hj] |
| 443 | |
| 444 | theorem jointIncrement_lower (u : JointHistory) {n j : ℕ} (du : JointProfile) (hj : j < n) : |
| 445 | jointIncrement u n du j = u j := Function.update_of_ne (Nat.ne_of_lt hj) _ _ |
| 446 | |
| 447 | theorem jointIncrement_contDiffOn {S : Set (ℝ × ℝ)} {n : ℕ} {u : JointHistory} |
| 448 | {du : JointProfile} (hu : ∀ j, j ≤ n → ContDiffOn ℝ ∞ (u j) S) |
| 449 | (hdu : ContDiffOn ℝ ∞ du S) (j : ℕ) (hj : j ≤ n) : |
| 450 | ContDiffOn ℝ ∞ (jointIncrement u n du j) S := by |
| 451 | by_cases h : j = n |
| 452 | · subst j |
| 453 | simpa only [jointIncrement, Function.update_self] using (hu n le_rfl).add hdu |
| 454 | · simpa only [jointIncrement, Function.update_of_ne h] using hu j hj |
| 455 | |
| 456 | noncomputable def globalDomain : ProfileHistories.RadialDomain where |
| 457 | carrier := univ |
| 458 | isOpen := isOpen_univ |
| 459 | scale_mem := by intro p hp t ht; trivial |
| 460 | |
| 461 | theorem primitive_contDiff {F : JointProfile} (hF : ContDiff ℝ ∞ F) : |
| 462 | ContDiff ℝ ∞ (ProfileHistories.primitive F) := |
| 463 | contDiffOn_univ.mp (ProfileHistories.primitive_smooth globalDomain hF.contDiffOn) |
| 464 | |
| 465 | theorem primitive_hasDerivAt {F : JointProfile} (hF : ContDiff ℝ ∞ F) (w : ℝ × ℝ) : |
| 466 | HasDerivAt (fun R => ProfileHistories.primitive F (R, w.2)) (F w) w.1 := |
| 467 | ProfileHistories.primitive_hasDerivAt globalDomain hF.contDiffOn (mem_univ w) |
| 468 | |
| 469 | /-- Compact positive-radius sources identify the actual primitive with the |
| 470 | positive-radius total integral, without imposing values at negative radii. -/ |
| 471 | theorem positiveIntegral_eq_primitive {f : Profile} {B R : ℝ} (hB : 0 ≤ B) (hR : B ≤ R) |
| 472 | (hf : ∀ t, B ≤ t → f t = 0) : positiveIntegral f = ∫ t in (0 : ℝ)..R, f t := by |
| 473 | rw [intervalIntegral.integral_of_le (hB.trans hR)] |
| 474 | apply MeasureTheory.setIntegral_eq_of_subset_of_forall_sdiff_eq_zero measurableSet_Ioi |
| 475 | · intro t ht |
| 476 | exact ht.1 |
| 477 | · intro t ht |
| 478 | have htR : R < t := by |
| 479 | by_contra h |
| 480 | exact ht.2 ⟨ht.1, le_of_not_gt h⟩ |
| 481 | exact hf t (hR.trans htR.le) |
| 482 | |
| 483 | noncomputable def jointPressureGradient (n : ℕ) (e : JointHistory) (omega : JointProfile) |
| 484 | (w : ℝ × ℝ) : ℝ := pressureGradient n (slice e w.2) (fun R => omega (R, w.2)) w.1 |
| 485 | |
| 486 | /-- Pressure is recomputed from its actual radial gradient, with zero axis datum. -/ |
| 487 | noncomputable def pressureHistory (n : ℕ) (e : JointHistory) (omega : JointProfile) : JointProfile := |
| 488 | ProfileHistories.primitive (jointPressureGradient n e omega) |
| 489 | |
| 490 | theorem pressureHistory_axis (n : ℕ) (e : JointHistory) (omega : JointProfile) (eta : ℝ) : |
| 491 | pressureHistory n e omega (0, eta) = 0 := ProfileHistories.primitive_at_axis _ _ |
| 492 | |
| 493 | theorem pressureHistory_contDiff {n : ℕ} {e : JointHistory} {omega : JointProfile} |
| 494 | (hq : ContDiff ℝ ∞ (jointPressureGradient n e omega)) : |
| 495 | ContDiff ℝ ∞ (pressureHistory n e omega) := primitive_contDiff hq |
| 496 | |
| 497 | theorem pressureHistory_hasDerivAt {n : ℕ} {e : JointHistory} {omega : JointProfile} |
| 498 | (hq : ContDiff ℝ ∞ (jointPressureGradient n e omega)) (w : ℝ × ℝ) : |
| 499 | HasDerivAt (fun R => pressureHistory n e omega (R, w.2)) |
| 500 | (pressureGradient n (slice e w.2) (fun R => omega (R, w.2)) w.1) w.1 := |
| 501 | primitive_hasDerivAt hq w |
| 502 | |
| 503 | theorem pressureHistory_exterior {n : ℕ} {e : JointHistory} {omega : JointProfile} {B : ℝ} |
| 504 | (hB : 0 ≤ B) (hs : ∀ eta R, B ≤ R → jointPressureGradient n e omega (R, eta) = 0) |
| 505 | (hm : ∀ eta, positiveIntegral (fun R => jointPressureGradient n e omega (R, eta)) = 0) |
| 506 | {R eta : ℝ} (hR : B ≤ R) : pressureHistory n e omega (R, eta) = 0 := by |
| 507 | rw [pressureHistory, ProfileHistories.primitive, |
| 508 | ← positiveIntegral_eq_primitive hB hR (hs eta), hm eta] |
| 509 | |
| 510 | /-- The third repaired row is the actual pressure-exterior condition. -/ |
| 511 | theorem pressureHistory_exterior_of_moments {n : ℕ} {u e : JointHistory} {omega : JointProfile} |
| 512 | {B : ℝ} (hB : 0 ≤ B) |
| 513 | (hs : ∀ eta R, B ≤ R → jointPressureGradient n e omega (R, eta) = 0) |
| 514 | (hm : ∀ eta, moments n (slice u eta) (slice e eta) (fun R => omega (R, eta)) = 0) |
| 515 | {R eta : ℝ} (hR : B ≤ R) : pressureHistory n e omega (R, eta) = 0 := by |
| 516 | apply pressureHistory_exterior hB hs _ hR |
| 517 | intro eta |
| 518 | exact congrFun (hm eta) 2 |
| 519 | |
| 520 | noncomputable def weightedAxial (u : JointProfile) (w : ℝ × ℝ) : ℝ := w.1 * u w |
| 521 | |
| 522 | noncomputable def massHistory (u : JointProfile) : JointProfile := |
| 523 | ProfileHistories.primitive (weightedAxial u) |
| 524 | |
| 525 | noncomputable def parameterMassHistory (u : JointProfile) : JointProfile := |
| 526 | ProfileHistories.primitive (ProfileHistories.parameterPartial (weightedAxial u)) |
| 527 | |
| 528 | /-- The R-coordinate version of (21), with both histories given by actual integrals. -/ |
| 529 | noncomputable def fluxHistory (h lam : ℝ) (u : JointProfile) (w : ℝ × ℝ) : ℝ := |
| 530 | (w.2 * w.1 ^ 2 * u w - 2 * w.2 * (PositiveAxisSystem.dScale h + lam) * massHistory u w - |
| 531 | PositiveAxisSystem.edge w.2 * parameterMassHistory u w) / PositiveAxisSystem.ell h w.2 |
| 532 | |
| 533 | noncomputable def radialZ (h power : ℝ) (u : JointProfile) (w : ℝ × ℝ) : ℝ := |
| 534 | (2 * w.2 * power * u w + PositiveAxisSystem.edge w.2 * ProfileHistories.parameterPartial u w - |
| 535 | w.2 * w.1 * ProfileHistories.radialPartial u w) / PositiveAxisSystem.ell h w.2 |
| 536 | |
| 537 | theorem weightedAxial_contDiff {u : JointProfile} (hu : ContDiff ℝ ∞ u) : |
| 538 | ContDiff ℝ ∞ (weightedAxial u) := contDiff_fst.mul hu |
| 539 | |
| 540 | theorem parameterPartial_contDiff {F : JointProfile} (hF : ContDiff ℝ ∞ F) : |
| 541 | ContDiff ℝ ∞ (ProfileHistories.parameterPartial F) := |
| 542 | contDiffOn_univ.mp (ProfileHistories.parameterPartial_smooth globalDomain hF.contDiffOn) |
| 543 | |
| 544 | theorem weightedAxial_parameterPartial {u : JointProfile} (hu : ContDiff ℝ ∞ u) (w : ℝ × ℝ) : |
| 545 | ProfileHistories.parameterPartial (weightedAxial u) w = |
| 546 | w.1 * ProfileHistories.parameterPartial u w := by |
| 547 | have hd := (ProfileHistories.parameterPartial_hasDerivAt globalDomain hu.contDiffOn (mem_univ w)).const_mul w.1 |
| 548 | have he := ProfileHistories.parameterPartial_hasDerivAt globalDomain |
| 549 | (weightedAxial_contDiff hu).contDiffOn (mem_univ w) |
| 550 | exact he.unique hd |
| 551 | |
| 552 | theorem massHistory_parameterPartial {u : JointProfile} (hu : ContDiff ℝ ∞ u) (w : ℝ × ℝ) : |
| 553 | ProfileHistories.parameterPartial (massHistory u) w = parameterMassHistory u w := |
| 554 | ProfileHistories.parameterPartial_primitive globalDomain (weightedAxial_contDiff hu).contDiffOn (mem_univ w) |
| 555 | |
| 556 | /-- Genuine radial differentiation of the integral formula gives incompressibility. -/ |
| 557 | theorem fluxHistory_hasDerivAt (h lam : ℝ) {u : JointProfile} (hu : ContDiff ℝ ∞ u) |
| 558 | (w : ℝ × ℝ) : |
| 559 | HasDerivAt (fun R => fluxHistory h lam u (R, w.2)) |
| 560 | (-w.1 * radialZ h (-PositiveAxisSystem.a h + lam) u w) w.1 := by |
| 561 | have hdu := ProfileHistories.radialPartial_hasDerivAt globalDomain hu.contDiffOn (mem_univ w) |
| 562 | have hdm := primitive_hasDerivAt (weightedAxial_contDiff hu) w |
| 563 | have hdn := primitive_hasDerivAt (parameterPartial_contDiff (weightedAxial_contDiff hu)) w |
| 564 | have hd := (((((hasDerivAt_id w.1).fun_pow 2).fun_mul hdu).const_mul w.2).sub |
| 565 | (hdm.const_mul (2 * w.2 * (PositiveAxisSystem.dScale h + lam)))).sub |
| 566 | (hdn.const_mul (PositiveAxisSystem.edge w.2)) |
| 567 | have he := hd.div_const (PositiveAxisSystem.ell h w.2) |
| 568 | rw [weightedAxial_parameterPartial hu w] at he |
| 569 | convert! he using 1 |
| 570 | · funext R |
| 571 | simp [fluxHistory, massHistory, parameterMassHistory, id_eq] |
| 572 | ring |
| 573 | · simp only [weightedAxial, radialZ, PositiveAxisSystem.a, PositiveAxisSystem.dScale, |
| 574 | id_eq, div_eq_mul_inv] |
| 575 | ring |
| 576 | |
| 577 | /-- The first repaired row is exactly the mass condition making the recomputed |
| 578 | radial flux vanish outside the source. Parameter differentiation is justified |
| 579 | by the actual smooth history theorem. -/ |
| 580 | theorem fluxHistory_exterior (h lam : ℝ) {u : JointProfile} (hu : ContDiff ℝ ∞ u) {B : ℝ} |
| 581 | (hB : 0 ≤ B) (hs : ∀ eta R, B ≤ R → u (R, eta) = 0) |
| 582 | (hm : ∀ eta, positiveIntegral (fun R => R * u (R, eta)) = 0) |
| 583 | {R eta : ℝ} (hR : B ≤ R) : fluxHistory h lam u (R, eta) = 0 := by |
| 584 | have hmass : ∀ z, massHistory u (R, z) = 0 := by |
| 585 | intro z |
| 586 | rw [massHistory, ProfileHistories.primitive, |
| 587 | ← positiveIntegral_eq_primitive hB hR (fun t ht => by |
| 588 | change t * u (t, z) = 0 |
| 589 | rw [hs z t ht, mul_zero])] |
| 590 | exact hm z |
| 591 | have hp : parameterMassHistory u (R, eta) = 0 := by |
| 592 | rw [← massHistory_parameterPartial hu] |
| 593 | have hd := ProfileHistories.parameterPartial_hasDerivAt globalDomain |
| 594 | (primitive_contDiff (weightedAxial_contDiff hu)).contDiffOn (mem_univ (R, eta)) |
| 595 | have he : (fun z => massHistory u (R, z)) = fun _ => (0 : ℝ) := funext hmass |
| 596 | change HasDerivAt (fun z => massHistory u (R, z)) _ eta at hd |
| 597 | rw [he] at hd |
| 598 | exact hd.unique (hasDerivAt_const eta 0) |
| 599 | simp [fluxHistory, hs eta R hR, hmass eta, hp] |
| 600 | |
| 601 | |
| 602 | /-- The first row of the actual five-moment system gives the required mass |
| 603 | condition for the recomputed divergence flux. -/ |
| 604 | theorem fluxHistory_exterior_of_moments (h lam : ℝ) {n : ℕ} {u e : JointHistory} |
| 605 | {omega : JointProfile} (hu : ContDiff ℝ ∞ (u n)) {B : ℝ} |
| 606 | (hB : 0 ≤ B) (hs : ∀ eta R, B ≤ R → u n (R, eta) = 0) |
| 607 | (hm : ∀ eta, moments n (slice u eta) (slice e eta) (fun R => omega (R, eta)) = 0) |
| 608 | {R eta : ℝ} (hR : B ≤ R) : fluxHistory h lam (u n) (R, eta) = 0 := by |
| 609 | apply fluxHistory_exterior h lam hu hB hs _ hR |
| 610 | intro eta |
| 611 | exact congrFun (hm eta) 0 |
| 612 | |
| 613 | /-- The pressure integration-by-parts identity underlying the fifth row is |
| 614 | proved for the actual pressure primitive, including its exterior boundary. -/ |
| 615 | theorem pressure_weighted_identity {q : JointProfile} (hq : ContDiff ℝ ∞ q) {B : ℝ} |
| 616 | (hB : 0 ≤ B) (hs : ∀ eta R, B ≤ R → q (R, eta) = 0) |
| 617 | (hm : ∀ eta, positiveIntegral (fun R => q (R, eta)) = 0) (eta : ℝ) : |
| 618 | positiveIntegral (fun R => R * ProfileHistories.primitive q (R, eta)) = |
| 619 | -(1 / 2 : ℝ) * positiveIntegral (fun R => R ^ 2 * q (R, eta)) := by |
| 620 | have hPzero : ∀ R, B ≤ R → ProfileHistories.primitive q (R, eta) = 0 := by |
| 621 | intro R hR |
| 622 | rw [ProfileHistories.primitive, ← positiveIntegral_eq_primitive hB hR (hs eta), hm eta] |
| 623 | have hPc : Continuous (fun R => ProfileHistories.primitive q (R, eta)) := |
| 624 | (primitive_contDiff hq).continuous.comp (continuous_id.prodMk continuous_const) |
| 625 | have hqc : Continuous (fun R => q (R, eta)) := |
| 626 | hq.continuous.comp (continuous_id.prodMk continuous_const) |
| 627 | have hpow : ∀ R : ℝ, HasDerivAt (fun t => t ^ 2 / 2) R R := by |
| 628 | intro R |
| 629 | convert! ((hasDerivAt_id R).pow 2).div_const 2 using 1 |
| 630 | simp |
| 631 | have hi := intervalIntegral.integral_mul_deriv_eq_deriv_mul_of_hasDerivAt |
| 632 | (a := (0 : ℝ)) (b := B) |
| 633 | (u := fun R : ℝ => R ^ 2 / 2) (u' := fun R => R) |
| 634 | (v := fun R => ProfileHistories.primitive q (R, eta)) (v' := fun R => q (R, eta)) |
| 635 | ((continuous_id.pow 2).div_const 2).continuousOn hPc.continuousOn |
| 636 | (fun R _ => hpow R) (fun R _ => primitive_hasDerivAt hq (R, eta)) |
| 637 | (continuous_id.intervalIntegrable 0 B) (hqc.intervalIntegrable 0 B) |
| 638 | have he : (fun R => R ^ 2 / 2 * q (R, eta)) = |
| 639 | (fun R => (1 / 2 : ℝ) * (R ^ 2 * q (R, eta))) := by funext R; ring |
| 640 | rw [he, intervalIntegral.integral_const_mul] at hi |
| 641 | rw [hPzero B le_rfl] at hi |
| 642 | rw [positiveIntegral_eq_primitive hB le_rfl (fun R hR => by rw [hPzero R hR, mul_zero]), |
| 643 | positiveIntegral_eq_primitive hB le_rfl (fun R hR => by rw [hs eta R hR, mul_zero])] |
| 644 | simp only [mul_zero, zero_pow (by norm_num : 2 ≠ 0), zero_div, zero_sub] at hi |
| 645 | linarith |
| 646 | |
| 647 | /-- Open parameter domains retain all radial histories while keeping the |
| 648 | original parameter domain; no extension across its endpoints is needed. -/ |
| 649 | noncomputable def parameterDomain (S : Set ℝ) (hS : IsOpen S) : ProfileHistories.RadialDomain where |
| 650 | carrier := univ ×ˢ S |
| 651 | isOpen := isOpen_univ.prod hS |
| 652 | scale_mem := by intro p hp t ht; exact ⟨mem_univ _, hp.2⟩ |
| 653 | |
| 654 | /-- The pressure reconstruction needs smoothness only on the working |
| 655 | parameter domain. -/ |
| 656 | theorem pressureHistory_contDiffOn {S : Set ℝ} (hS : IsOpen S) |
| 657 | {n : ℕ} {e : JointHistory} {omega : JointProfile} |
| 658 | (hq : ContDiffOn ℝ ∞ (jointPressureGradient n e omega) (univ ×ˢ S)) : |
| 659 | ContDiffOn ℝ ∞ (pressureHistory n e omega) (univ ×ˢ S) := |
| 660 | ProfileHistories.primitive_smooth (parameterDomain S hS) hq |
| 661 | |
| 662 | theorem pressureHistory_hasDerivAt_on {S : Set ℝ} (hS : IsOpen S) |
| 663 | {n : ℕ} {e : JointHistory} {omega : JointProfile} |
| 664 | (hq : ContDiffOn ℝ ∞ (jointPressureGradient n e omega) (univ ×ˢ S)) |
| 665 | {R eta : ℝ} (heta : eta ∈ S) : |
| 666 | HasDerivAt (fun r => pressureHistory n e omega (r, eta)) |
| 667 | (jointPressureGradient n e omega (R, eta)) R := |
| 668 | ProfileHistories.primitive_hasDerivAt (parameterDomain S hS) |
| 669 | (F := jointPressureGradient n e omega) hq (p := (R, eta)) ⟨mem_univ _, heta⟩ |
| 670 | |
| 671 | theorem pressureHistory_exterior_on {S : Set ℝ} {n : ℕ} |
| 672 | {u e : JointHistory} {omega : JointProfile} {B : ℝ} (hB : 0 ≤ B) |
| 673 | (hs : ∀ eta ∈ S, ∀ R, B ≤ R → jointPressureGradient n e omega (R, eta) = 0) |
| 674 | (hm : ∀ eta ∈ S, moments n (slice u eta) (slice e eta) (fun R => omega (R, eta)) = 0) |
| 675 | {R eta : ℝ} (hR : B ≤ R) (heta : eta ∈ S) : pressureHistory n e omega (R, eta) = 0 := by |
| 676 | rw [pressureHistory, ProfileHistories.primitive, |
| 677 | ← positiveIntegral_eq_primitive hB hR (hs eta heta)] |
| 678 | exact congrFun (hm eta heta) 2 |
| 679 | |
| 680 | theorem weightedAxial_parameterPartial_on {S : Set ℝ} (hS : IsOpen S) |
| 681 | {u : JointProfile} (hu : ContDiffOn ℝ ∞ u (univ ×ˢ S)) |
| 682 | {w : ℝ × ℝ} (hw : w.2 ∈ S) : |
| 683 | ProfileHistories.parameterPartial (weightedAxial u) w = |
| 684 | w.1 * ProfileHistories.parameterPartial u w := by |
| 685 | have hd := (ProfileHistories.parameterPartial_hasDerivAt (parameterDomain S hS) |
| 686 | hu (p := w) ⟨mem_univ _, hw⟩).const_mul w.1 |
| 687 | have he := ProfileHistories.parameterPartial_hasDerivAt (parameterDomain S hS) |
| 688 | (contDiffOn_fst.mul hu) (p := w) ⟨mem_univ _, hw⟩ |
| 689 | exact he.unique hd |
| 690 | |
| 691 | theorem massHistory_parameterPartial_on {S : Set ℝ} (hS : IsOpen S) |
| 692 | {u : JointProfile} (hu : ContDiffOn ℝ ∞ u (univ ×ˢ S)) |
| 693 | {w : ℝ × ℝ} (hw : w.2 ∈ S) : |
| 694 | ProfileHistories.parameterPartial (massHistory u) w = parameterMassHistory u w := |
| 695 | ProfileHistories.parameterPartial_primitive (parameterDomain S hS) |
| 696 | (contDiffOn_fst.mul hu) ⟨mem_univ _, hw⟩ |
| 697 | |
| 698 | theorem fluxHistory_contDiffOn (h lam : ℝ) {S : Set ℝ} (hS : IsOpen S) |
| 699 | {u : JointProfile} (hu : ContDiffOn ℝ ∞ u (univ ×ˢ S)) |
| 700 | (hell : ∀ eta ∈ S, PositiveAxisSystem.ell h eta ≠ 0) : |
| 701 | ContDiffOn ℝ ∞ (fluxHistory h lam u) (univ ×ˢ S) := by |
| 702 | have hm : ContDiffOn ℝ ∞ (massHistory u) (univ ×ˢ S) := |
| 703 | ProfileHistories.primitive_smooth (parameterDomain S hS) (contDiffOn_fst.mul hu) |
| 704 | have hn : ContDiffOn ℝ ∞ (parameterMassHistory u) (univ ×ˢ S) := |
| 705 | ProfileHistories.primitive_smooth (parameterDomain S hS) |
| 706 | (ProfileHistories.parameterPartial_smooth (parameterDomain S hS) (contDiffOn_fst.mul hu)) |
| 707 | have he : ContDiffOn ℝ ∞ (fun w : ℝ × ℝ => PositiveAxisSystem.edge w.2) (univ ×ˢ S) := by |
| 708 | exact contDiffOn_const.sub (contDiffOn_snd.pow 2) |
| 709 | have hl : ContDiffOn ℝ ∞ (fun w : ℝ × ℝ => PositiveAxisSystem.ell h w.2) (univ ×ˢ S) := by |
| 710 | exact contDiffOn_const.sub (contDiffOn_const.mul (contDiffOn_snd.pow 2)) |
| 711 | exact ((((contDiffOn_snd.mul (contDiffOn_fst.pow 2)).mul hu).sub |
| 712 | (((contDiffOn_const.mul contDiffOn_snd).mul contDiffOn_const).mul hm)).sub |
| 713 | (he.mul hn)).div hl (fun w hw => hell w.2 hw.2) |
| 714 | |
| 715 | /-- The actual radial divergence equation holds on an open parameter domain, |
| 716 | without any smooth extension past that domain. -/ |
| 717 | theorem fluxHistory_hasDerivAt_on (h lam : ℝ) {S : Set ℝ} (hS : IsOpen S) |
| 718 | {u : JointProfile} (hu : ContDiffOn ℝ ∞ u (univ ×ˢ S)) |
| 719 | {w : ℝ × ℝ} (hw : w.2 ∈ S) : |
| 720 | HasDerivAt (fun R => fluxHistory h lam u (R, w.2)) |
| 721 | (-w.1 * radialZ h (-PositiveAxisSystem.a h + lam) u w) w.1 := by |
| 722 | have huw : ContDiffOn ℝ ∞ (weightedAxial u) (univ ×ˢ S) := contDiffOn_fst.mul hu |
| 723 | have hdu := ProfileHistories.radialPartial_hasDerivAt (parameterDomain S hS) hu (p := w) ⟨mem_univ _, hw⟩ |
| 724 | have hdm := ProfileHistories.primitive_hasDerivAt (parameterDomain S hS) |
| 725 | huw (p := w) ⟨mem_univ _, hw⟩ |
| 726 | have hdn := ProfileHistories.primitive_hasDerivAt (parameterDomain S hS) |
| 727 | (ProfileHistories.parameterPartial_smooth (parameterDomain S hS) huw) |
| 728 | (p := w) ⟨mem_univ _, hw⟩ |
| 729 | have hd := (((((hasDerivAt_id w.1).fun_pow 2).fun_mul hdu).const_mul w.2).sub |
| 730 | (hdm.const_mul (2 * w.2 * (PositiveAxisSystem.dScale h + lam)))).sub |
| 731 | (hdn.const_mul (PositiveAxisSystem.edge w.2)) |
| 732 | have he := hd.div_const (PositiveAxisSystem.ell h w.2) |
| 733 | rw [weightedAxial_parameterPartial_on hS hu hw] at he |
| 734 | convert! he using 1 |
| 735 | · funext R |
| 736 | simp [fluxHistory, massHistory, parameterMassHistory, id_eq] |
| 737 | ring |
| 738 | · simp only [weightedAxial, radialZ, PositiveAxisSystem.a, PositiveAxisSystem.dScale, |
| 739 | id_eq, div_eq_mul_inv] |
| 740 | ring |
| 741 | |
| 742 | theorem fluxHistory_exterior_on (h lam : ℝ) {S : Set ℝ} (hS : IsOpen S) |
| 743 | {u : JointProfile} (hu : ContDiffOn ℝ ∞ u (univ ×ˢ S)) {B : ℝ} |
| 744 | (hB : 0 ≤ B) (hs : ∀ eta ∈ S, ∀ R, B ≤ R → u (R, eta) = 0) |
| 745 | (hm : ∀ eta ∈ S, positiveIntegral (fun R => R * u (R, eta)) = 0) |
| 746 | {R eta : ℝ} (hR : B ≤ R) (heta : eta ∈ S) : fluxHistory h lam u (R, eta) = 0 := by |
| 747 | have hmass : ∀ z ∈ S, massHistory u (R, z) = 0 := by |
| 748 | intro z hz |
| 749 | rw [massHistory, ProfileHistories.primitive, |
| 750 | ← positiveIntegral_eq_primitive hB hR (fun t ht => by |
| 751 | change t * u (t, z) = 0 |
| 752 | rw [hs z hz t ht, mul_zero])] |
| 753 | exact hm z hz |
| 754 | have hp : parameterMassHistory u (R, eta) = 0 := by |
| 755 | rw [← massHistory_parameterPartial_on hS hu heta] |
| 756 | have hd := ProfileHistories.parameterPartial_hasDerivAt (parameterDomain S hS) |
| 757 | (ProfileHistories.primitive_smooth (parameterDomain S hS) (contDiffOn_fst.mul hu)) |
| 758 | (show (R, eta) ∈ univ ×ˢ S from ⟨mem_univ _, heta⟩) |
| 759 | have he : (fun z => massHistory u (R, z)) =ᶠ[nhds eta] fun _ => (0 : ℝ) := by |
| 760 | filter_upwards [hS.mem_nhds heta] with z hz using hmass z hz |
| 761 | exact hd.unique ((hasDerivAt_const eta 0).congr_of_eventuallyEq he) |
| 762 | simp [fluxHistory, hs eta heta R hR, hmass eta heta, hp] |
| 763 | |
| 764 | /-- Smoothness of the actual total moment follows from common compact radial |
| 765 | support and the proved smooth history theorem. -/ |
| 766 | theorem positiveIntegral_contDiffOn {S : Set ℝ} (hS : IsOpen S) {F : JointProfile} |
| 767 | (hF : ContDiffOn ℝ ∞ F (univ ×ˢ S)) {B : ℝ} (hB : 0 ≤ B) |
| 768 | (hs : ∀ eta ∈ S, ∀ R, B ≤ R → F (R, eta) = 0) : |
| 769 | ContDiffOn ℝ ∞ (fun eta => positiveIntegral (fun R => F (R, eta))) S := by |
| 770 | have hp := ProfileHistories.primitive_smooth (parameterDomain S hS) hF |
| 771 | have hc : ContDiffOn ℝ ∞ (fun eta => ProfileHistories.primitive F (B, eta)) S := |
| 772 | hp.comp (contDiffOn_const.prodMk contDiffOn_id) (fun eta heta => ⟨mem_univ _, heta⟩) |
| 773 | apply hc.congr |
| 774 | intro eta heta |
| 775 | exact positiveIntegral_eq_primitive hB le_rfl (hs eta heta) |
| 776 | |
| 777 | noncomputable def jointRowDensity (n : ℕ) (u e : JointHistory) (omega : JointProfile) |
| 778 | (w : ℝ × ℝ) : Debt := rowDensity n (slice u w.2) (slice e w.2) (fun R => omega (R, w.2)) w.1 |
| 779 | |
| 780 | theorem cauchy_eq_zero_of_left (n : ℕ) (u v : History) (R : ℝ) |
| 781 | (hu : ∀ j, j ≤ n → u j R = 0) : cauchy n u v R = 0 := by |
| 782 | unfold cauchy PositiveAxisSystem.convolution |
| 783 | apply Finset.sum_eq_zero |
| 784 | intro j hj |
| 785 | change u j R * v (n - j) R = 0 |
| 786 | rw [hu j (Nat.le_of_lt_succ (Finset.mem_range.mp hj)), zero_mul] |
| 787 | |
| 788 | theorem cauchy_self_eq_zero_of_positive {n : ℕ} (hn : 0 < n) (e : History) (R : ℝ) |
| 789 | (he : ∀ j, 0 < j → j ≤ n → e j R = 0) : cauchy n e e R = 0 := by |
| 790 | unfold cauchy PositiveAxisSystem.convolution |
| 791 | apply Finset.sum_eq_zero |
| 792 | intro j hj |
| 793 | change e j R * e (n - j) R = 0 |
| 794 | by_cases hj0 : j = 0 |
| 795 | · subst j |
| 796 | simp only [Nat.sub_zero, he n hn le_rfl, mul_zero] |
| 797 | · rw [he j (Nat.pos_of_ne_zero hj0) (Nat.le_of_lt_succ (Finset.mem_range.mp hj)), zero_mul] |
| 798 | |
| 799 | theorem jointCauchy_contDiffOn {S : Set (ℝ × ℝ)} {n : ℕ} {u v : JointHistory} |
| 800 | (hu : ∀ j, j ≤ n → ContDiffOn ℝ ∞ (u j) S) |
| 801 | (hv : ∀ j, j ≤ n → ContDiffOn ℝ ∞ (v j) S) : |
| 802 | ContDiffOn ℝ ∞ (fun w => cauchy n (slice u w.2) (slice v w.2) w.1) S := by |
| 803 | change ContDiffOn ℝ ∞ (fun w => ∑ j ∈ Finset.range (n + 1), u j w * v (n - j) w) S |
| 804 | apply ContDiffOn.sum |
| 805 | intro j hj |
| 806 | exact (hu j (Nat.le_of_lt_succ (Finset.mem_range.mp hj))).mul (hv (n - j) (Nat.sub_le _ _)) |
| 807 | |
| 808 | theorem jointRowDensity_contDiffOn {S : Set (ℝ × ℝ)} {n : ℕ} |
| 809 | {u e : JointHistory} {omega : JointProfile} |
| 810 | (hu : ∀ j, j ≤ n → ContDiffOn ℝ ∞ (u j) S) |
| 811 | (he : ∀ j, j ≤ n → ContDiffOn ℝ ∞ (e j) S) |
| 812 | (hq : ContDiffOn ℝ ∞ (jointPressureGradient n e omega) S) (i : Fin 5) : |
| 813 | ContDiffOn ℝ ∞ (fun w => jointRowDensity n u e omega w i) S := by |
| 814 | fin_cases i |
| 815 | · exact contDiffOn_fst.mul (hu n le_rfl) |
| 816 | · exact (contDiffOn_fst.pow 2).mul (he n le_rfl) |
| 817 | · exact hq |
| 818 | · exact (contDiffOn_fst.pow 2).mul (jointCauchy_contDiffOn hu he) |
| 819 | · exact (contDiffOn_fst.mul (jointCauchy_contDiffOn hu hu)).sub |
| 820 | (((contDiffOn_fst.pow 2).div_const 2).mul hq) |
| 821 | |
| 822 | /-- The order-zero angular tail need not be compact: every summand of the |
| 823 | positive-order self-convolution contains a strictly positive index. -/ |
| 824 | theorem jointRowDensity_exterior {n : ℕ} (hn : 0 < n) (u e : JointHistory) (omega : JointProfile) |
| 825 | (w : ℝ × ℝ) (hu : ∀ j, j ≤ n → u j w = 0) |
| 826 | (he : ∀ j, 0 < j → j ≤ n → e j w = 0) (hw : omega w = 0) : |
| 827 | jointRowDensity n u e omega w = 0 := by |
| 828 | have h1 := cauchy_eq_zero_of_left n (slice u w.2) (slice e w.2) w.1 hu |
| 829 | have h2 := cauchy_eq_zero_of_left n (slice u w.2) (slice u w.2) w.1 hu |
| 830 | have h3 := cauchy_self_eq_zero_of_positive hn (slice e w.2) w.1 he |
| 831 | ext i |
| 832 | fin_cases i <;> simp [jointRowDensity, rowDensity, pressureGradient, h1, h2, h3, |
| 833 | slice, hu n le_rfl, he n hn le_rfl, hw] |
| 834 | |
| 835 | /-- This statement derives smoothness of the five genuine integral debts; |
| 836 | the density hypotheses can be checked componentwise from the known fields. -/ |
| 837 | theorem moments_contDiffOn {S : Set ℝ} (hS : IsOpen S) {n : ℕ} |
| 838 | {u e : JointHistory} {omega : JointProfile} |
| 839 | (hd : ∀ i, ContDiffOn ℝ ∞ (fun w => jointRowDensity n u e omega w i) (univ ×ˢ S)) |
| 840 | {B : ℝ} (hB : 0 ≤ B) |
| 841 | (hs : ∀ eta ∈ S, ∀ R, B ≤ R → jointRowDensity n u e omega (R, eta) = 0) : |
| 842 | ContDiffOn ℝ ∞ (fun eta => moments n (slice u eta) (slice e eta) (fun R => omega (R, eta))) S := by |
| 843 | apply contDiffOn_pi.mpr |
| 844 | intro i |
| 845 | exact positiveIntegral_contDiffOn hS (hd i) hB |
| 846 | (fun eta heta R hR => congrFun (hs eta heta R hR) i) |
| 847 | |
| 848 | theorem moments_contDiffOn_of_histories {S : Set ℝ} (hS : IsOpen S) {n : ℕ} (hn : 0 < n) |
| 849 | {u e : JointHistory} {omega : JointProfile} |
| 850 | (hu : ∀ j, j ≤ n → ContDiffOn ℝ ∞ (u j) (univ ×ˢ S)) |
| 851 | (he : ∀ j, j ≤ n → ContDiffOn ℝ ∞ (e j) (univ ×ˢ S)) |
| 852 | (hq : ContDiffOn ℝ ∞ (jointPressureGradient n e omega) (univ ×ˢ S)) |
| 853 | {B : ℝ} (hB : 0 ≤ B) |
| 854 | (hU : ∀ eta ∈ S, ∀ R, B ≤ R → ∀ j, j ≤ n → u j (R, eta) = 0) |
| 855 | (hE : ∀ eta ∈ S, ∀ R, B ≤ R → ∀ j, 0 < j → j ≤ n → e j (R, eta) = 0) |
| 856 | (hOmega : ∀ eta ∈ S, ∀ R, B ≤ R → omega (R, eta) = 0) : |
| 857 | ContDiffOn ℝ ∞ (fun eta => moments n (slice u eta) (slice e eta) (fun R => omega (R, eta))) S := by |
| 858 | apply moments_contDiffOn hS (jointRowDensity_contDiffOn hu he hq) hB |
| 859 | intro eta heta R hR |
| 860 | exact jointRowDensity_exterior hn u e omega (R, eta) |
| 861 | (hU eta heta R hR) (hE eta heta R hR) (hOmega eta heta R hR) |
| 862 | |
| 863 | /-- In particular, the exact zero-moment corrections vary smoothly with η |
| 864 | when their debts are the actual profile integrals, not prescribed surrogates. -/ |
| 865 | theorem exact_corrections_joint_contDiffOn (lam a b : ℝ) {S : Set ℝ} (hS : IsOpen S) |
| 866 | {n : ℕ} {u e : JointHistory} {omega : JointProfile} {A : ℝ → ℝ} |
| 867 | (hA : ContDiffOn ℝ ∞ A S) (hAn : ∀ eta ∈ S, A eta ≠ 0) |
| 868 | (hd : ∀ i, ContDiffOn ℝ ∞ (fun w => jointRowDensity n u e omega w i) (univ ×ˢ S)) |
| 869 | {B : ℝ} (hB : 0 ≤ B) |
| 870 | (hs : ∀ eta ∈ S, ∀ R, B ≤ R → jointRowDensity n u e omega (R, eta) = 0) : |
| 871 | ContDiffOn ℝ ∞ (fun z : ℝ × ℝ => |
| 872 | (repairU lam (A z.1) a b (-moments n (slice u z.1) (slice e z.1) (fun R => omega (R, z.1))) z.2, |
| 873 | repairE lam (A z.1) a b (-moments n (slice u z.1) (slice e z.1) (fun R => omega (R, z.1))) z.2)) |
| 874 | (S ×ˢ univ) := |
| 875 | by |
| 876 | have hm := moments_contDiffOn (S := S) (n := n) (u := u) (e := e) |
| 877 | (omega := omega) hS hd hB hs |
| 878 | exact (repairU_joint_contDiffOn (P := ℝ) lam a b (S := S) (A := A) |
| 879 | (d := fun eta => -moments n (slice u eta) (slice e eta) (fun R => omega (R, eta))) |
| 880 | hA hm.neg hAn).prodMk |
| 881 | (repairE_joint_contDiffOn (P := ℝ) lam a b (S := S) (A := A) |
| 882 | (d := fun eta => -moments n (slice u eta) (slice e eta) (fun R => omega (R, eta))) |
| 883 | hA hm.neg hAn) |
| 884 | |
| 885 | |
| 886 | theorem positive_integrableOn_of_compact {f : Profile} {B : ℝ} |
| 887 | (hf : ContinuousOn f (Icc 0 B)) (hs : ∀ R, B ≤ R → f R = 0) : |
| 888 | IntegrableOn f (Ioi 0) := by |
| 889 | have hi : IntegrableOn f (Ioc 0 B) := hf.integrableOn_Icc.mono_set Ioc_subset_Icc_self |
| 890 | apply hi.of_ae_sdiff_eq_zero measurableSet_Ioi.nullMeasurableSet |
| 891 | apply Filter.Eventually.of_forall |
| 892 | intro R hR |
| 893 | have hBR : B < R := by |
| 894 | by_contra h |
| 895 | exact hR.2 ⟨hR.1, le_of_not_gt h⟩ |
| 896 | exact hs R hBR.le |
| 897 | |
| 898 | /-- The integrability requirements of the repair theorem follow from the |
| 899 | same common compact support and smoothness used for the parameter jets. -/ |
| 900 | theorem jointRowDensity_integrableOn {S : Set ℝ} {n : ℕ} |
| 901 | {u e : JointHistory} {omega : JointProfile} |
| 902 | (hd : ∀ i, ContinuousOn (fun w => jointRowDensity n u e omega w i) (univ ×ˢ S)) |
| 903 | {B : ℝ} (hs : ∀ eta ∈ S, ∀ R, B ≤ R → jointRowDensity n u e omega (R, eta) = 0) |
| 904 | {eta : ℝ} (heta : eta ∈ S) (i : Fin 5) : |
| 905 | IntegrableOn (fun R => rowDensity n (slice u eta) (slice e eta) |
| 906 | (fun r => omega (r, eta)) R i) (Ioi 0) := by |
| 907 | apply positive_integrableOn_of_compact (B := B) |
| 908 | · exact (hd i).comp (continuous_id.prodMk continuous_const).continuousOn |
| 909 | (fun R hR => ⟨mem_univ _, heta⟩) |
| 910 | · intro R hR |
| 911 | exact congrFun (hs eta heta R hR) i |
| 912 | |
| 913 | /-- A single explicit smooth family repairs all five rows on the parameter |
| 914 | domain. Its debts are the actual finite-profile integrals; only order n is |
| 915 | changed, and the known Ω term remains untouched. -/ |
| 916 | theorem exists_parameterized_exact_repair (lam a b : ℝ) (hlam : 0 < lam) |
| 917 | (ha : 0 < a) (hab : a < b) {S : Set ℝ} (hS : IsOpen S) |
| 918 | {n : ℕ} (hn : 0 < n) (u e : JointHistory) (omega : JointProfile) (A : ℝ → ℝ) |
| 919 | (hA : ContDiffOn ℝ ∞ A S) (hAn : ∀ eta ∈ S, A eta ≠ 0) |
| 920 | (hU₀ : ∀ eta ∈ S, ∀ R ∈ Ioo a b, u 0 (R, eta) = 0) |
| 921 | (hE₀ : ∀ eta ∈ S, ∀ R ∈ Ioo a b, e 0 (R, eta) = FiveRowRank.background lam (A eta) R) |
| 922 | (hd : ∀ i, ContDiffOn ℝ ∞ (fun w => jointRowDensity n u e omega w i) (univ ×ˢ S)) |
| 923 | {B : ℝ} (hB : 0 ≤ B) |
| 924 | (hs : ∀ eta ∈ S, ∀ R, B ≤ R → jointRowDensity n u e omega (R, eta) = 0) : |
| 925 | ∃ du de : JointProfile, |
| 926 | ContDiffOn ℝ ∞ du (univ ×ˢ S) ∧ ContDiffOn ℝ ∞ de (univ ×ˢ S) ∧ |
| 927 | (∀ eta, tsupport (fun R => du (R, eta)) ⊆ Ioo a b) ∧ |
| 928 | (∀ eta, tsupport (fun R => de (R, eta)) ⊆ Ioo a b) ∧ |
| 929 | ∀ eta ∈ S, moments n (increment (slice u eta) n (fun R => du (R, eta))) |
| 930 | (increment (slice e eta) n (fun R => de (R, eta))) (fun R => omega (R, eta)) = 0 := by |
| 931 | let debt : ℝ → Debt := fun eta => -moments n (slice u eta) (slice e eta) (fun R => omega (R, eta)) |
| 932 | let du : JointProfile := fun w => repairU lam (A w.2) a b (debt w.2) w.1 |
| 933 | let de : JointProfile := fun w => repairE lam (A w.2) a b (debt w.2) w.1 |
| 934 | have hdebt : ContDiffOn ℝ ∞ debt S := |
| 935 | (moments_contDiffOn (S := S) (n := n) (u := u) (e := e) (omega := omega) hS hd hB hs).neg |
| 936 | have hswap : ContDiffOn ℝ ∞ (fun w : ℝ × ℝ => (w.2, w.1)) (univ ×ˢ S) := |
| 937 | contDiffOn_snd.prodMk contDiffOn_fst |
| 938 | have hswap_mem : MapsTo (fun w : ℝ × ℝ => (w.2, w.1)) (univ ×ˢ S) (S ×ˢ univ) := |
| 939 | fun w hw => ⟨hw.2, mem_univ _⟩ |
| 940 | have hdu : ContDiffOn ℝ ∞ du (univ ×ˢ S) := |
| 941 | (repairU_joint_contDiffOn (P := ℝ) lam a b (S := S) (A := A) (d := debt) hA hdebt hAn).comp |
| 942 | (f := fun w : ℝ × ℝ => (w.2, w.1)) hswap hswap_mem |
| 943 | have hde : ContDiffOn ℝ ∞ de (univ ×ˢ S) := |
| 944 | (repairE_joint_contDiffOn (P := ℝ) lam a b (S := S) (A := A) (d := debt) hA hdebt hAn).comp |
| 945 | (f := fun w : ℝ × ℝ => (w.2, w.1)) hswap hswap_mem |
| 946 | refine ⟨du, de, hdu, hde, ?_, ?_, ?_⟩ |
| 947 | · intro eta |
| 948 | exact repairU_tsupport lam (A eta) a b (debt eta) hab |
| 949 | · intro eta |
| 950 | exact repairE_tsupport lam (A eta) a b (debt eta) hab |
| 951 | · intro eta heta |
| 952 | have hi := jointRowDensity_integrableOn (S := S) (n := n) (u := u) (e := e) |
| 953 | (omega := omega) (B := B) (fun i => (hd i).continuousOn) hs heta |
| 954 | simpa only [du, de, debt, zero_sub] using moments_repair_target lam (A eta) a b 0 hn |
| 955 | (slice u eta) (slice e eta) (fun R => omega (R, eta)) hlam (hAn eta heta) ha hab |
| 956 | (hU₀ eta heta) (hE₀ eta heta) hi |
| 957 | |
| 958 | end PhysicalHistories |
| 959 | |
| 960 | end NavierStokes.PositiveOrderMoments |