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.SmoothParameterIntegral |
| 2 | import Mathlib.Analysis.SpecialFunctions.Gamma.Basic |
| 3 | import Mathlib.Analysis.SpecialFunctions.Pow.Deriv |
| 4 | import Mathlib.Analysis.Calculus.FDeriv.Extend |
| 5 | |
| 6 | /-! |
| 7 | # The radial heat continuation profile |
| 8 | |
| 9 | The profile is defined by the actual gamma-normalized improper integral in |
| 10 | Lemma 4.4. Its derivative kernels have gamma-integrable bounds on the whole |
| 11 | closed half-line of nonnegative profile arguments. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | open Filter Set MeasureTheory |
| 17 | open scoped Topology ContDiff |
| 18 | |
| 19 | namespace NavierStokes.RadialHeatProfile |
| 20 | |
| 21 | /-- The unsigned kernel for the `n`-th derivative. -/ |
| 22 | def kernel (a : ℝ) (n : ℕ) (z v : ℝ) : ℝ := |
| 23 | Real.exp (-v) * v ^ (a + (n : ℝ) - 1) * (1 + z * v) ^ (1 - a - (n : ℝ)) |
| 24 | |
| 25 | def moment (a : ℝ) (n : ℕ) (z : ℝ) : ℝ := |
| 26 | ∫ v in Ioi (0 : ℝ), kernel a n z v |
| 27 | |
| 28 | /-- The manuscript's normalized radial heat profile, with `a = 1 + h`. -/ |
| 29 | def profile (a z : ℝ) : ℝ := (Real.Gamma a)⁻¹ * moment a 0 z |
| 30 | |
| 31 | theorem base_one_le {z v : ℝ} (hz : 0 ≤ z) (hv : 0 ≤ v) : 1 ≤ 1 + z * v := |
| 32 | le_add_of_nonneg_right (mul_nonneg hz hv) |
| 33 | |
| 34 | theorem base_pos {z v : ℝ} (hz : 0 ≤ z) (hv : 0 ≤ v) : 0 < 1 + z * v := |
| 35 | lt_of_lt_of_le zero_lt_one (base_one_le hz hv) |
| 36 | |
| 37 | theorem kernel_pos (a : ℝ) (n : ℕ) {z v : ℝ} (hz : 0 ≤ z) (hv : 0 < v) : |
| 38 | 0 < kernel a n z v := |
| 39 | mul_pos (mul_pos (Real.exp_pos _) (Real.rpow_pos_of_pos hv _)) |
| 40 | (Real.rpow_pos_of_pos (base_pos hz hv.le) _) |
| 41 | |
| 42 | theorem kernel_le_gamma {a : ℝ} (ha : 1 < a) (n : ℕ) {z v : ℝ} |
| 43 | (hz : 0 ≤ z) (hv : 0 < v) : |
| 44 | kernel a n z v ≤ Real.exp (-v) * v ^ (a + (n : ℝ) - 1) := by |
| 45 | have hn : 0 ≤ (n : ℝ) := Nat.cast_nonneg n |
| 46 | have hp : (1 + z * v) ^ (1 - a - (n : ℝ)) ≤ 1 := |
| 47 | Real.rpow_le_one_of_one_le_of_nonpos (base_one_le hz hv.le) (by linarith) |
| 48 | exact (mul_le_mul_of_nonneg_left hp |
| 49 | (mul_nonneg (Real.exp_pos _).le (Real.rpow_pos_of_pos hv _).le)).trans_eq (mul_one _) |
| 50 | |
| 51 | theorem kernel_norm_le_gamma {a : ℝ} (ha : 1 < a) (n : ℕ) {z v : ℝ} |
| 52 | (hz : 0 ≤ z) (hv : 0 < v) : |
| 53 | ‖kernel a n z v‖ ≤ Real.exp (-v) * v ^ (a + (n : ℝ) - 1) := by |
| 54 | rw [Real.norm_eq_abs, abs_of_pos (kernel_pos a n hz hv)] |
| 55 | exact kernel_le_gamma ha n hz hv |
| 56 | |
| 57 | theorem kernel_continuousOn_v (a : ℝ) (n : ℕ) {z : ℝ} (hz : 0 ≤ z) : |
| 58 | ContinuousOn (kernel a n z) (Ioi 0) := by |
| 59 | intro v hv |
| 60 | have hp : ContinuousAt (fun v : ℝ => v ^ (a + (n : ℝ) - 1)) v := |
| 61 | continuousAt_id.rpow_const (Or.inl (show 0 < v from hv).ne') |
| 62 | have hb : ContinuousAt (fun v : ℝ => (1 + z * v) ^ (1 - a - (n : ℝ))) v := |
| 63 | (continuousAt_const.add (continuousAt_const.mul continuousAt_id)).rpow_const |
| 64 | (Or.inl (base_pos hz (show 0 < v from hv).le).ne') |
| 65 | have he : ContinuousAt (fun v : ℝ => Real.exp (-v)) v := |
| 66 | (Real.continuous_exp.comp continuous_neg).continuousAt |
| 67 | exact ((he.fun_mul hp).fun_mul hb).continuousWithinAt |
| 68 | |
| 69 | theorem kernel_integrable {a : ℝ} (ha : 1 < a) (n : ℕ) {z : ℝ} (hz : 0 ≤ z) : |
| 70 | IntegrableOn (kernel a n z) (Ioi 0) := by |
| 71 | have hga : 0 < a + (n : ℝ) := by positivity |
| 72 | apply (Real.GammaIntegral_convergent hga).mono' |
| 73 | ((kernel_continuousOn_v a n hz).aestronglyMeasurable measurableSet_Ioi) |
| 74 | filter_upwards [ae_restrict_mem measurableSet_Ioi] with v hv |
| 75 | exact kernel_norm_le_gamma ha n hz hv |
| 76 | |
| 77 | theorem kernel_hasDerivAt_z (a : ℝ) (n : ℕ) {z v : ℝ} (hz : 0 ≤ z) (hv : 0 < v) : |
| 78 | HasDerivAt (fun z => kernel a n z v) |
| 79 | ((1 - a - (n : ℝ)) * kernel a (n + 1) z v) z := by |
| 80 | have hd := (((hasDerivAt_id z).mul_const v).const_add 1).rpow_const |
| 81 | (p := 1 - a - (n : ℝ)) (Or.inl (base_pos hz hv.le).ne') |
| 82 | have hvpow : v ^ (a + ((n + 1 : ℕ) : ℝ) - 1) = |
| 83 | v ^ (a + (n : ℝ) - 1) * v := by |
| 84 | rw [show a + ((n + 1 : ℕ) : ℝ) - 1 = (a + (n : ℝ) - 1) + 1 by push_cast; ring, |
| 85 | Real.rpow_add_one hv.ne'] |
| 86 | convert! hd.const_mul (Real.exp (-v) * v ^ (a + (n : ℝ) - 1)) using 1 |
| 87 | dsimp [kernel] |
| 88 | rw [hvpow] |
| 89 | have he : 1 - a - ((n + 1 : ℕ) : ℝ) = (1 - a - (n : ℝ)) - 1 := by push_cast; ring |
| 90 | rw [he] |
| 91 | ring |
| 92 | |
| 93 | theorem moment_pos {a : ℝ} (ha : 1 < a) (n : ℕ) {z : ℝ} (hz : 0 ≤ z) : |
| 94 | 0 < moment a n z := by |
| 95 | have hs : Function.support (kernel a n z) ∩ Ioi 0 = Ioi 0 := by |
| 96 | rw [inter_eq_right] |
| 97 | intro v hv |
| 98 | exact (kernel_pos a n hz hv).ne' |
| 99 | unfold moment |
| 100 | rw [setIntegral_pos_iff_support_of_nonneg_ae] |
| 101 | · rw [hs, Real.volume_Ioi, ← ENNReal.ofReal_zero] |
| 102 | exact ENNReal.ofReal_lt_top |
| 103 | · filter_upwards [ae_restrict_mem measurableSet_Ioi] with v hv |
| 104 | exact (kernel_pos a n hz hv).le |
| 105 | · exact kernel_integrable ha n hz |
| 106 | |
| 107 | theorem moment_le_gamma {a : ℝ} (ha : 1 < a) (n : ℕ) {z : ℝ} (hz : 0 ≤ z) : |
| 108 | moment a n z ≤ Real.Gamma (a + (n : ℝ)) := by |
| 109 | have hga : 0 < a + (n : ℝ) := by positivity |
| 110 | rw [Real.Gamma_eq_integral hga] |
| 111 | apply integral_mono_ae (kernel_integrable ha n hz) (Real.GammaIntegral_convergent hga) |
| 112 | filter_upwards [ae_restrict_mem measurableSet_Ioi] with v hv |
| 113 | exact kernel_le_gamma ha n hz hv |
| 114 | |
| 115 | theorem moment_zero {a : ℝ} (ha : 1 < a) (n : ℕ) : |
| 116 | moment a n 0 = Real.Gamma (a + (n : ℝ)) := by |
| 117 | have hga : 0 < a + (n : ℝ) := by positivity |
| 118 | simp only [moment, kernel, zero_mul, add_zero, Real.one_rpow, mul_one] |
| 119 | exact (Real.Gamma_eq_integral hga).symm |
| 120 | |
| 121 | theorem profile_pos {a z : ℝ} (ha : 1 < a) (hz : 0 ≤ z) : 0 < profile a z := |
| 122 | mul_pos (inv_pos.mpr (Real.Gamma_pos_of_pos (zero_lt_one.trans ha))) (moment_pos ha 0 hz) |
| 123 | |
| 124 | theorem profile_zero {a : ℝ} (ha : 1 < a) : profile a 0 = 1 := by |
| 125 | rw [profile, moment_zero ha] |
| 126 | simp [(Real.Gamma_pos_of_pos (zero_lt_one.trans ha)).ne'] |
| 127 | |
| 128 | theorem profile_le_one {a z : ℝ} (ha : 1 < a) (hz : 0 ≤ z) : profile a z ≤ 1 := by |
| 129 | have h := mul_le_mul_of_nonneg_left (moment_le_gamma ha 0 hz) |
| 130 | (inv_pos.mpr (Real.Gamma_pos_of_pos (zero_lt_one.trans ha))).le |
| 131 | simpa [profile, (Real.Gamma_pos_of_pos (zero_lt_one.trans ha)).ne'] using h |
| 132 | |
| 133 | /-- Continuity includes the endpoint, by a bound independent of `z ≥ 0`. -/ |
| 134 | theorem moment_continuousOn {a : ℝ} (ha : 1 < a) (n : ℕ) : |
| 135 | ContinuousOn (moment a n) (Ici 0) := by |
| 136 | apply continuousOn_of_dominated |
| 137 | (bound := fun v : ℝ => Real.exp (-v) * v ^ (a + (n : ℝ) - 1)) |
| 138 | · intro z hz |
| 139 | exact (kernel_continuousOn_v a n hz).aestronglyMeasurable measurableSet_Ioi |
| 140 | · intro z hz |
| 141 | filter_upwards [ae_restrict_mem measurableSet_Ioi] with v hv |
| 142 | exact kernel_norm_le_gamma ha n hz hv |
| 143 | · exact Real.GammaIntegral_convergent (by positivity) |
| 144 | · filter_upwards [ae_restrict_mem measurableSet_Ioi] with v hv |
| 145 | intro z hz |
| 146 | exact (kernel_hasDerivAt_z a n hz hv).continuousAt.continuousWithinAt |
| 147 | |
| 148 | theorem moment_hasDerivAt {a z : ℝ} (ha : 1 < a) (n : ℕ) (hz : 0 < z) : |
| 149 | HasDerivAt (moment a n) ((1 - a - (n : ℝ)) * moment a (n + 1) z) z := by |
| 150 | have hball : ∀ y ∈ Metric.ball z (z / 2), 0 ≤ y := by |
| 151 | intro y hy |
| 152 | have hd : |y - z| < z / 2 := by simpa only [Metric.mem_ball, Real.dist_eq] using hy |
| 153 | have hlow := (abs_lt.mp hd).1 |
| 154 | linarith |
| 155 | have hga : 0 < a + ((n + 1 : ℕ) : ℝ) := by positivity |
| 156 | have hi := hasDerivAt_integral_of_dominated_loc_of_deriv_le |
| 157 | (F := fun z v => kernel a n z v) |
| 158 | (F' := fun z v => (1 - a - (n : ℝ)) * kernel a (n + 1) z v) |
| 159 | (bound := fun v : ℝ => ‖1 - a - (n : ℝ)‖ * |
| 160 | (Real.exp (-v) * v ^ (a + ((n + 1 : ℕ) : ℝ) - 1))) |
| 161 | (μ := volume.restrict (Ioi 0)) (Metric.ball_mem_nhds _ (show 0 < z / 2 by linarith)) |
| 162 | (by |
| 163 | filter_upwards [isOpen_Ioi.mem_nhds hz] with y hy |
| 164 | exact (kernel_continuousOn_v a n (show 0 < y from hy).le).aestronglyMeasurable |
| 165 | measurableSet_Ioi) |
| 166 | (kernel_integrable ha n hz.le) |
| 167 | ((kernel_integrable ha (n + 1) hz.le).aestronglyMeasurable.const_mul _) |
| 168 | (by |
| 169 | filter_upwards [ae_restrict_mem measurableSet_Ioi] with v hv |
| 170 | intro y hy |
| 171 | rw [norm_mul] |
| 172 | exact mul_le_mul_of_nonneg_left (kernel_norm_le_gamma ha (n + 1) (hball y hy) hv) |
| 173 | (norm_nonneg _)) |
| 174 | ((Real.GammaIntegral_convergent hga).const_mul _) |
| 175 | (by |
| 176 | filter_upwards [ae_restrict_mem measurableSet_Ioi] with v hv |
| 177 | intro y hy |
| 178 | exact kernel_hasDerivAt_z a n (hball y hy) hv) |
| 179 | unfold moment |
| 180 | simpa only [integral_const_mul] using hi.2 |
| 181 | |
| 182 | /-- The same derivative formula holds from the right at zero. -/ |
| 183 | theorem moment_hasDerivWithinAt {a z : ℝ} (ha : 1 < a) (n : ℕ) (hz : 0 ≤ z) : |
| 184 | HasDerivWithinAt (moment a n) ((1 - a - (n : ℝ)) * moment a (n + 1) z) |
| 185 | (Ici 0) z := by |
| 186 | rcases eq_or_lt_of_le hz with rfl | hzpos |
| 187 | · apply hasDerivWithinAt_Ici_of_tendsto_deriv (s := Ioi 0) |
| 188 | · intro z hz |
| 189 | exact (moment_hasDerivAt ha n hz).differentiableAt.differentiableWithinAt |
| 190 | · exact ((moment_continuousOn ha n) 0 (by simp)).mono Ioi_subset_Ici_self |
| 191 | · exact self_mem_nhdsWithin |
| 192 | · have hc : ContinuousWithinAt |
| 193 | (fun z => (1 - a - (n : ℝ)) * moment a (n + 1) z) (Ioi 0) 0 := |
| 194 | ((continuousOn_const.mul (moment_continuousOn ha (n + 1))) 0 (by simp)).mono |
| 195 | Ioi_subset_Ici_self |
| 196 | apply hc.congr' |
| 197 | filter_upwards [self_mem_nhdsWithin] with y hy |
| 198 | exact (moment_hasDerivAt ha n hy).deriv.symm |
| 199 | · exact (moment_hasDerivAt ha n hzpos).hasDerivWithinAt |
| 200 | |
| 201 | /-- Falling coefficients of the genuine derivative kernels. -/ |
| 202 | noncomputable def derivativeCoeff (a : ℝ) : ℕ → ℝ |
| 203 | | 0 => 1 |
| 204 | | n + 1 => derivativeCoeff a n * (1 - a - (n : ℝ)) |
| 205 | |
| 206 | def profileJet (a : ℝ) (n : ℕ) (z : ℝ) : ℝ := |
| 207 | (Real.Gamma a)⁻¹ * derivativeCoeff a n * moment a n z |
| 208 | |
| 209 | theorem profileJet_hasDerivWithinAt {a z : ℝ} (ha : 1 < a) (n : ℕ) (hz : 0 ≤ z) : |
| 210 | HasDerivWithinAt (profileJet a n) (profileJet a (n + 1) z) (Ici 0) z := by |
| 211 | convert! (moment_hasDerivWithinAt ha n hz).const_mul |
| 212 | ((Real.Gamma a)⁻¹ * derivativeCoeff a n) using 1 |
| 213 | dsimp [profileJet, derivativeCoeff] |
| 214 | ring |
| 215 | |
| 216 | theorem iteratedDerivWithin_profile {a : ℝ} (ha : 1 < a) (n : ℕ) {z : ℝ} (hz : 0 ≤ z) : |
| 217 | iteratedDerivWithin n (profile a) (Ici 0) z = profileJet a n z := by |
| 218 | induction n generalizing z with |
| 219 | | zero => simp [profileJet, derivativeCoeff, profile] |
| 220 | | succ n ih => |
| 221 | rw [iteratedDerivWithin_succ] |
| 222 | exact ((profileJet_hasDerivWithinAt ha n hz).congr_of_mem |
| 223 | (fun y hy => ih hy) hz).derivWithin ((uniqueDiffOn_Ici 0) z hz) |
| 224 | |
| 225 | /-- Genuine `C∞` regularity on the closed half-line, including zero. -/ |
| 226 | theorem profile_contDiffOn {a : ℝ} (ha : 1 < a) : |
| 227 | ContDiffOn ℝ ∞ (profile a) (Ici 0) := by |
| 228 | apply contDiffOn_of_differentiableOn_deriv |
| 229 | intro n _ z hz |
| 230 | exact ((profileJet_hasDerivWithinAt ha n hz).congr_of_mem |
| 231 | (fun y hy => iteratedDerivWithin_profile ha n hy) hz).differentiableWithinAt |
| 232 | |
| 233 | /-- Every fixed derivative has a finite bound uniform on the whole half-line. -/ |
| 234 | theorem profile_derivative_bound {a : ℝ} (ha : 1 < a) (n : ℕ) {z : ℝ} (hz : 0 ≤ z) : |
| 235 | |iteratedDerivWithin n (profile a) (Ici 0) z| ≤ |
| 236 | |(Real.Gamma a)⁻¹ * derivativeCoeff a n| * Real.Gamma (a + (n : ℝ)) := by |
| 237 | rw [iteratedDerivWithin_profile ha n hz, profileJet, abs_mul, |
| 238 | abs_of_pos (moment_pos ha n hz)] |
| 239 | exact mul_le_mul_of_nonneg_left (moment_le_gamma ha n hz) (abs_nonneg _) |
| 240 | |
| 241 | theorem iteratedDeriv_profile {a z : ℝ} (ha : 1 < a) (n : ℕ) (hz : 0 < z) : |
| 242 | iteratedDeriv n (profile a) z = profileJet a n z := by |
| 243 | have hc : ContDiffAt ℝ n (profile a) z := |
| 244 | ((profile_contDiffOn ha).contDiffAt (Ici_mem_nhds hz)).of_le |
| 245 | (WithTop.coe_le_coe.mpr le_top) |
| 246 | have he := iteratedFDerivWithin_eq_iteratedFDeriv (uniqueDiffOn_Ici 0) hc hz.le |
| 247 | simpa only [iteratedDerivWithin, iteratedDeriv, he] using |
| 248 | iteratedDerivWithin_profile ha n hz.le |
| 249 | |
| 250 | /-! ## The vanishing boundary term and the actual ODE -/ |
| 251 | |
| 252 | def boundaryTerm (a z v : ℝ) : ℝ := |
| 253 | Real.exp (-v) * v ^ a * (1 + z * v) ^ (-a) |
| 254 | |
| 255 | theorem rpow_add_two {x : ℝ} (hx : 0 < x) (p : ℝ) : |
| 256 | x ^ (p + 2) = x ^ p * x ^ (2 : ℕ) := by |
| 257 | rw [Real.rpow_add hx, Real.rpow_two] |
| 258 | |
| 259 | theorem boundaryTerm_hasDerivAt (a : ℝ) {z v : ℝ} (hz : 0 ≤ z) (hv : 0 < v) : |
| 260 | HasDerivAt (boundaryTerm a z) |
| 261 | (a * z ^ 2 * kernel a 2 z v - (1 + 2 * a * z) * kernel a 1 z v + |
| 262 | a * kernel a 0 z v) v := by |
| 263 | have he : HasDerivAt (fun v : ℝ => Real.exp (-v)) (-Real.exp (-v)) v := by |
| 264 | simpa only [mul_neg_one] using (hasDerivAt_neg v).exp |
| 265 | have hp := Real.hasDerivAt_rpow_const (p := a) (Or.inl hv.ne') |
| 266 | have hb := (((hasDerivAt_id v).const_mul z).const_add 1).rpow_const |
| 267 | (p := -a) (Or.inl (base_pos hz hv.le).ne') |
| 268 | have hv1 : v ^ a = v ^ (a - 1) * v := by |
| 269 | convert! Real.rpow_add_one hv.ne' (a - 1) using 1 |
| 270 | congr 1 |
| 271 | ring |
| 272 | have hv2 : v ^ (a + 2 - 1) = v ^ (a - 1) * v ^ 2 := by |
| 273 | convert! rpow_add_two hv (a - 1) using 1 |
| 274 | congr 1 |
| 275 | ring |
| 276 | have hb1 : (1 + z * v) ^ (-a) = (1 + z * v) ^ (-a - 1) * (1 + z * v) := by |
| 277 | convert! Real.rpow_add_one (base_pos hz hv.le).ne' (-a - 1) using 1 |
| 278 | congr 1 |
| 279 | ring |
| 280 | have hb2 : (1 + z * v) ^ (1 - a) = (1 + z * v) ^ (-a - 1) * (1 + z * v) ^ 2 := by |
| 281 | convert! rpow_add_two (base_pos hz hv.le) (-a - 1) using 1 |
| 282 | congr 1 |
| 283 | ring |
| 284 | convert! (he.fun_mul hp).fun_mul hb using 1 |
| 285 | dsimp only [kernel, id] |
| 286 | norm_num only [Nat.cast_ofNat, Nat.cast_one, Nat.cast_zero, add_zero, sub_zero] |
| 287 | rw [show a + 1 - 1 = a by ring, show 1 - a - 1 = -a by ring, |
| 288 | show 1 - a - 2 = -a - 1 by ring, hv2, hb2, hv1, hb1] |
| 289 | ring |
| 290 | |
| 291 | theorem boundaryTerm_zero {a : ℝ} (ha : 1 < a) (z : ℝ) : boundaryTerm a z 0 = 0 := by |
| 292 | simp [boundaryTerm, Real.zero_rpow (ne_of_gt (zero_lt_one.trans ha))] |
| 293 | |
| 294 | theorem boundaryTerm_continuous_zero {a : ℝ} (ha : 1 < a) (z : ℝ) : |
| 295 | ContinuousWithinAt (boundaryTerm a z) (Ici 0) 0 := by |
| 296 | have hp : ContinuousAt (fun v : ℝ => v ^ a) 0 := |
| 297 | continuousAt_id.rpow_const (Or.inr (zero_lt_one.trans ha).le) |
| 298 | have hb : ContinuousAt (fun v : ℝ => (1 + z * v) ^ (-a)) 0 := |
| 299 | (continuousAt_const.add (continuousAt_const.mul continuousAt_id)).rpow_const |
| 300 | (Or.inl (by simp)) |
| 301 | have he : ContinuousAt (fun v : ℝ => Real.exp (-v)) 0 := |
| 302 | (Real.continuous_exp.comp continuous_neg).continuousAt |
| 303 | exact ((he.fun_mul hp).fun_mul hb).continuousWithinAt |
| 304 | |
| 305 | theorem boundaryTerm_tendsto_zero {a z : ℝ} (ha : 1 < a) (hz : 0 ≤ z) : |
| 306 | Tendsto (boundaryTerm a z) atTop (𝓝 0) := by |
| 307 | apply squeeze_zero_norm' (a := fun v : ℝ => Real.exp (-v) * v ^ a) |
| 308 | · filter_upwards [Ioi_mem_atTop (0 : ℝ)] with v hv |
| 309 | have hb : 0 < boundaryTerm a z v := |
| 310 | mul_pos (mul_pos (Real.exp_pos _) (Real.rpow_pos_of_pos hv _)) |
| 311 | (Real.rpow_pos_of_pos (base_pos hz hv.le) _) |
| 312 | rw [Real.norm_eq_abs, abs_of_pos hb] |
| 313 | exact (mul_le_mul_of_nonneg_left |
| 314 | (Real.rpow_le_one_of_one_le_of_nonpos (base_one_le hz hv.le) (by linarith : -a ≤ 0)) |
| 315 | (mul_pos (Real.exp_pos _) (Real.rpow_pos_of_pos hv a)).le).trans_eq (mul_one _) |
| 316 | · simpa only [neg_one_mul, mul_neg_one, mul_comm] using |
| 317 | tendsto_rpow_mul_exp_neg_mul_atTop_nhds_zero a 1 zero_lt_one |
| 318 | |
| 319 | /-- The improper integration by parts identity, with both boundary terms proved zero. -/ |
| 320 | theorem moment_ode {a z : ℝ} (ha : 1 < a) (hz : 0 ≤ z) : |
| 321 | a * z ^ 2 * moment a 2 z - (1 + 2 * a * z) * moment a 1 z + |
| 322 | a * moment a 0 z = 0 := by |
| 323 | have h2 := (kernel_integrable ha 2 hz).const_mul (a * z ^ 2) |
| 324 | have h1 := (kernel_integrable ha 1 hz).const_mul (1 + 2 * a * z) |
| 325 | have h0 := (kernel_integrable ha 0 hz).const_mul a |
| 326 | have h := integral_Ioi_of_hasDerivAt_of_tendsto |
| 327 | (boundaryTerm_continuous_zero ha z) (fun v hv => boundaryTerm_hasDerivAt a hz hv) |
| 328 | ((h2.sub h1).add h0) (boundaryTerm_tendsto_zero ha hz) |
| 329 | have hadd := integral_add (h2.sub h1) h0 |
| 330 | have hsub := integral_sub h2 h1 |
| 331 | simp only [Pi.sub_apply] at hadd hsub |
| 332 | rw [boundaryTerm_zero ha, sub_zero, hadd, hsub, |
| 333 | integral_const_mul, integral_const_mul, integral_const_mul] at h |
| 334 | exact h |
| 335 | |
| 336 | theorem profileJet_ode {a z : ℝ} (ha : 1 < a) (hz : 0 ≤ z) : |
| 337 | z ^ 2 * profileJet a 2 z + (1 + 2 * a * z) * profileJet a 1 z + |
| 338 | a * (a - 1) * profile a z = 0 := by |
| 339 | calc |
| 340 | _ = (Real.Gamma a)⁻¹ * (a - 1) * |
| 341 | (a * z ^ 2 * moment a 2 z - (1 + 2 * a * z) * moment a 1 z + |
| 342 | a * moment a 0 z) := by |
| 343 | simp only [profileJet, derivativeCoeff, profile, Nat.cast_one, Nat.cast_zero, sub_zero] |
| 344 | ring |
| 345 | _ = 0 := by rw [moment_ode ha hz, mul_zero] |
| 346 | |
| 347 | /-- The stated ODE holds at the endpoint with derivatives within the half-line. -/ |
| 348 | theorem profile_ode_within {a z : ℝ} (ha : 1 < a) (hz : 0 ≤ z) : |
| 349 | z ^ 2 * iteratedDerivWithin 2 (profile a) (Ici 0) z + |
| 350 | (1 + 2 * a * z) * derivWithin (profile a) (Ici 0) z + |
| 351 | a * (a - 1) * profile a z = 0 := by |
| 352 | rw [← iteratedDerivWithin_one, iteratedDerivWithin_profile ha 1 hz, |
| 353 | iteratedDerivWithin_profile ha 2 hz] |
| 354 | exact profileJet_ode ha hz |
| 355 | |
| 356 | /-- On the open half-line these are the ordinary first and second derivatives. -/ |
| 357 | theorem profile_ode {a z : ℝ} (ha : 1 < a) (hz : 0 < z) : |
| 358 | z ^ 2 * iteratedDeriv 2 (profile a) z + (1 + 2 * a * z) * deriv (profile a) z + |
| 359 | a * (a - 1) * profile a z = 0 := by |
| 360 | rw [← iteratedDeriv_one, iteratedDeriv_profile ha 1 hz, iteratedDeriv_profile ha 2 hz] |
| 361 | exact profileJet_ode ha hz.le |
| 362 | |
| 363 | /-! ## Strict slope control and a quantitative first-order estimate -/ |
| 364 | |
| 365 | theorem kernel_slope_gap_pos (a : ℝ) {z v : ℝ} (hz : 0 ≤ z) (hv : 0 < v) : |
| 366 | 0 < kernel a 0 z v - z * kernel a 1 z v := by |
| 367 | have hv1 : v ^ a = v ^ (a - 1) * v := by |
| 368 | convert! Real.rpow_add_one hv.ne' (a - 1) using 1 |
| 369 | congr 1 |
| 370 | ring |
| 371 | have hb1 : (1 + z * v) ^ (1 - a) = (1 + z * v) ^ (-a) * (1 + z * v) := by |
| 372 | convert! Real.rpow_add_one (base_pos hz hv.le).ne' (-a) using 1 |
| 373 | congr 1 |
| 374 | ring |
| 375 | have he : kernel a 0 z v - z * kernel a 1 z v = |
| 376 | Real.exp (-v) * v ^ (a - 1) * (1 + z * v) ^ (-a) := by |
| 377 | simp only [kernel, Nat.cast_zero, Nat.cast_one, add_zero, sub_zero] |
| 378 | rw [show a + 1 - 1 = a by ring, show 1 - a - 1 = -a by ring, hv1, hb1] |
| 379 | ring |
| 380 | rw [he] |
| 381 | exact mul_pos (mul_pos (Real.exp_pos _) (Real.rpow_pos_of_pos hv _)) |
| 382 | (Real.rpow_pos_of_pos (base_pos hz hv.le) _) |
| 383 | |
| 384 | theorem moment_slope_gap_pos {a z : ℝ} (ha : 1 < a) (hz : 0 ≤ z) : |
| 385 | 0 < moment a 0 z - z * moment a 1 z := by |
| 386 | let f := fun v => kernel a 0 z v - z * kernel a 1 z v |
| 387 | have hi : IntegrableOn f (Ioi 0) := |
| 388 | (kernel_integrable ha 0 hz).sub ((kernel_integrable ha 1 hz).const_mul z) |
| 389 | have hs : Function.support f ∩ Ioi 0 = Ioi 0 := by |
| 390 | rw [inter_eq_right] |
| 391 | intro v hv |
| 392 | exact (kernel_slope_gap_pos a hz hv).ne' |
| 393 | have hp : 0 < ∫ v in Ioi 0, f v := by |
| 394 | rw [setIntegral_pos_iff_support_of_nonneg_ae] |
| 395 | · rw [hs, Real.volume_Ioi, ← ENNReal.ofReal_zero] |
| 396 | exact ENNReal.ofReal_lt_top |
| 397 | · filter_upwards [ae_restrict_mem measurableSet_Ioi] with v hv |
| 398 | exact (kernel_slope_gap_pos a hz hv).le |
| 399 | · exact hi |
| 400 | have he := integral_sub (kernel_integrable ha 0 hz) |
| 401 | ((kernel_integrable ha 1 hz).const_mul z) |
| 402 | simp only [integral_const_mul] at he |
| 403 | simpa only [f, he, moment] using hp |
| 404 | |
| 405 | theorem profile_hasDerivWithinAt {a z : ℝ} (ha : 1 < a) (hz : 0 ≤ z) : |
| 406 | HasDerivWithinAt (profile a) (profileJet a 1 z) (Ici 0) z := by |
| 407 | have he : profileJet a 0 = profile a := by |
| 408 | funext x |
| 409 | simp [profileJet, derivativeCoeff, profile] |
| 410 | simpa only [he, Nat.zero_add] using profileJet_hasDerivWithinAt ha 0 hz |
| 411 | |
| 412 | theorem profile_derivWithin {a z : ℝ} (ha : 1 < a) (hz : 0 ≤ z) : |
| 413 | derivWithin (profile a) (Ici 0) z = |
| 414 | (Real.Gamma a)⁻¹ * (1 - a) * moment a 1 z := by |
| 415 | simpa [profileJet, derivativeCoeff] using |
| 416 | (profile_hasDerivWithinAt ha hz).derivWithin ((uniqueDiffOn_Ici 0) z hz) |
| 417 | |
| 418 | theorem profile_deriv {a z : ℝ} (ha : 1 < a) (hz : 0 < z) : |
| 419 | deriv (profile a) z = (Real.Gamma a)⁻¹ * (1 - a) * moment a 1 z := by |
| 420 | simpa [profileJet, derivativeCoeff] using |
| 421 | ((profile_hasDerivWithinAt ha hz.le).hasDerivAt (Ici_mem_nhds hz)).deriv |
| 422 | |
| 423 | theorem profile_derivWithin_neg {a z : ℝ} (ha : 1 < a) (hz : 0 ≤ z) : |
| 424 | derivWithin (profile a) (Ici 0) z < 0 := by |
| 425 | rw [profile_derivWithin ha hz] |
| 426 | exact mul_neg_of_neg_of_pos |
| 427 | (mul_neg_of_pos_of_neg (inv_pos.mpr (Real.Gamma_pos_of_pos (zero_lt_one.trans ha))) |
| 428 | (sub_neg.mpr ha)) (moment_pos ha 1 hz) |
| 429 | |
| 430 | /-- The logarithmic slope is strictly less than `a - 1 = h`, including the endpoint. -/ |
| 431 | theorem profile_logSlopeWithin_lt {a z : ℝ} (ha : 1 < a) (hz : 0 ≤ z) : |
| 432 | -z * derivWithin (profile a) (Ici 0) z / profile a z < a - 1 := by |
| 433 | apply (div_lt_iff₀ (profile_pos ha hz)).2 |
| 434 | have hp := mul_pos |
| 435 | (mul_pos (inv_pos.mpr (Real.Gamma_pos_of_pos (zero_lt_one.trans ha))) (sub_pos.mpr ha)) |
| 436 | (moment_slope_gap_pos ha hz) |
| 437 | rw [profile_derivWithin ha hz] |
| 438 | dsimp only [profile] |
| 439 | nlinarith |
| 440 | |
| 441 | theorem profile_logSlope_lt {a z : ℝ} (ha : 1 < a) (hz : 0 < z) : |
| 442 | -z * deriv (profile a) z / profile a z < a - 1 := by |
| 443 | rw [← derivWithin_of_mem_nhds (Ici_mem_nhds hz)] |
| 444 | exact profile_logSlopeWithin_lt ha hz.le |
| 445 | |
| 446 | theorem profile_first_derivative_bound {a z : ℝ} (ha : 1 < a) (hz : 0 ≤ z) : |
| 447 | |derivWithin (profile a) (Ici 0) z| ≤ a * (a - 1) := by |
| 448 | have h := profile_derivative_bound ha 1 hz |
| 449 | simp only [iteratedDerivWithin_one, derivativeCoeff, Nat.cast_zero, sub_zero, one_mul, |
| 450 | Nat.cast_one] at h |
| 451 | have hg := Real.Gamma_pos_of_pos (zero_lt_one.trans ha) |
| 452 | have he : |(Real.Gamma a)⁻¹ * (1 - a)| * Real.Gamma (a + 1) = a * (a - 1) := by |
| 453 | rw [Real.Gamma_add_one (zero_lt_one.trans ha).ne', abs_mul, |
| 454 | abs_of_pos (inv_pos.mpr hg), abs_of_neg (sub_neg.mpr ha)] |
| 455 | field_simp ; ring |
| 456 | exact h.trans_eq he |
| 457 | |
| 458 | /-- An explicit version of `H(z) - 1 = O_h(z)`, with `C_h = h(1+h)`. -/ |
| 459 | theorem profile_sub_one_bound {a z : ℝ} (ha : 1 < a) (hz : 0 ≤ z) : |
| 460 | |profile a z - 1| ≤ a * (a - 1) * z := by |
| 461 | have h := norm_image_sub_le_of_norm_deriv_le_segment' |
| 462 | (f := profile a) (f' := fun x => profileJet a 1 x) |
| 463 | (a := 0) (b := z) (C := a * (a - 1)) |
| 464 | (fun x hx => (profile_hasDerivWithinAt ha hx.1).mono Icc_subset_Ici_self) |
| 465 | (by |
| 466 | intro x hx |
| 467 | have hd := (profile_hasDerivWithinAt ha hx.1).derivWithin ((uniqueDiffOn_Ici 0) x hx.1) |
| 468 | change ‖profileJet a 1 x‖ ≤ a * (a - 1) |
| 469 | rw [← hd, Real.norm_eq_abs] |
| 470 | exact profile_first_derivative_bound ha hx.1) |
| 471 | simpa only [Real.norm_eq_abs, profile_zero ha, sub_zero] using h z ⟨hz, le_rfl⟩ |
| 472 | |
| 473 | /-! ## The radial heat equation with the source exponent -/ |
| 474 | |
| 475 | /-- This is `-A`, since `A = 1/2 + h` and `a = 1 + h`. -/ |
| 476 | def spatialExponent (a : ℝ) : ℝ := 1 / 2 - a |
| 477 | |
| 478 | /-- The physical profile in the coordinate `s = r²/2`, at backward time `τ`. -/ |
| 479 | def spatialProfile (a τ s : ℝ) : ℝ := |
| 480 | s ^ spatialExponent a * profile a (2 * τ / s) |
| 481 | |
| 482 | def spatialFirst (a τ s : ℝ) : ℝ := |
| 483 | s ^ (spatialExponent a - 1) * |
| 484 | (spatialExponent a * profile a (2 * τ / s) - |
| 485 | (2 * τ / s) * profileJet a 1 (2 * τ / s)) |
| 486 | |
| 487 | def spatialSecond (a τ s : ℝ) : ℝ := |
| 488 | s ^ (spatialExponent a - 2) * |
| 489 | (spatialExponent a * (spatialExponent a - 1) * profile a (2 * τ / s) - |
| 490 | 2 * (spatialExponent a - 1) * (2 * τ / s) * profileJet a 1 (2 * τ / s) + |
| 491 | (2 * τ / s) ^ 2 * profileJet a 2 (2 * τ / s)) |
| 492 | |
| 493 | theorem profile_hasDerivAt {a z : ℝ} (ha : 1 < a) (hz : 0 < z) : |
| 494 | HasDerivAt (profile a) (profileJet a 1 z) z := |
| 495 | (profile_hasDerivWithinAt ha hz.le).hasDerivAt (Ici_mem_nhds hz) |
| 496 | |
| 497 | theorem profileJet_hasDerivAt {a z : ℝ} (ha : 1 < a) (n : ℕ) (hz : 0 < z) : |
| 498 | HasDerivAt (profileJet a n) (profileJet a (n + 1) z) z := |
| 499 | (profileJet_hasDerivWithinAt ha n hz.le).hasDerivAt (Ici_mem_nhds hz) |
| 500 | |
| 501 | theorem ratio_hasDerivAt {τ s : ℝ} (hs : 0 < s) : |
| 502 | HasDerivAt (fun s => 2 * τ / s) (-(2 * τ) / s ^ 2) s := by |
| 503 | simpa only [id_eq, zero_mul, mul_one, zero_sub] using |
| 504 | (hasDerivAt_const s (2 * τ)).fun_div (hasDerivAt_id s) hs.ne' |
| 505 | |
| 506 | theorem spatialProfile_hasDerivAt_s {a τ s : ℝ} (ha : 1 < a) (hτ : 0 < τ) (hs : 0 < s) : |
| 507 | HasDerivAt (spatialProfile a τ) (spatialFirst a τ s) s := by |
| 508 | have hz : 0 < 2 * τ / s := by positivity |
| 509 | have hd := (Real.hasDerivAt_rpow_const (p := spatialExponent a) (Or.inl hs.ne')).fun_mul |
| 510 | ((profile_hasDerivAt ha hz).comp s (ratio_hasDerivAt hs)) |
| 511 | simp only [Function.comp_def] at hd |
| 512 | convert! hd using 1 |
| 513 | dsimp only [spatialFirst] |
| 514 | rw [Real.rpow_sub_one hs.ne'] |
| 515 | field_simp ; ring |
| 516 | |
| 517 | theorem spatialFirst_hasDerivAt_s {a τ s : ℝ} (ha : 1 < a) (hτ : 0 < τ) (hs : 0 < s) : |
| 518 | HasDerivAt (spatialFirst a τ) (spatialSecond a τ s) s := by |
| 519 | have hz : 0 < 2 * τ / s := by positivity |
| 520 | have hH := (profile_hasDerivAt ha hz).comp s (ratio_hasDerivAt hs) |
| 521 | have hH' := (profileJet_hasDerivAt ha 1 hz).comp s (ratio_hasDerivAt hs) |
| 522 | have hd := (Real.hasDerivAt_rpow_const (p := spatialExponent a - 1) (Or.inl hs.ne')).fun_mul |
| 523 | ((hH.const_mul (spatialExponent a)).fun_sub ((ratio_hasDerivAt (τ := τ) hs).fun_mul hH')) |
| 524 | simp only [Function.comp_def] at hd |
| 525 | convert! hd using 1 |
| 526 | dsimp only [spatialSecond] |
| 527 | rw [show spatialExponent a - 2 = (spatialExponent a - 1) - 1 by ring, |
| 528 | Real.rpow_sub_one hs.ne', Real.rpow_sub_one hs.ne'] |
| 529 | field_simp ; ring |
| 530 | |
| 531 | theorem spatialProfile_hasDerivAt_time {a τ s : ℝ} (ha : 1 < a) (hτ : 0 < τ) (hs : 0 < s) : |
| 532 | HasDerivAt (fun τ => spatialProfile a τ s) |
| 533 | (2 * s ^ (spatialExponent a - 1) * profileJet a 1 (2 * τ / s)) τ := by |
| 534 | have hz : 0 < 2 * τ / s := by positivity |
| 535 | have hd := ((profile_hasDerivAt ha hz).comp τ |
| 536 | (((hasDerivAt_id τ).const_mul 2).div_const s)).const_mul (s ^ spatialExponent a) |
| 537 | simp only [Function.comp_def, id_eq] at hd |
| 538 | convert! hd using 1 |
| 539 | rw [Real.rpow_sub_one hs.ne'] |
| 540 | ring |
| 541 | |
| 542 | /-- The angular radial Laplacian in the variable `s = r²/2`. -/ |
| 543 | theorem spatial_heat_identity {a τ s : ℝ} (ha : 1 < a) (hτ : 0 < τ) (hs : 0 < s) : |
| 544 | -(2 * s ^ (spatialExponent a - 1) * profileJet a 1 (2 * τ / s)) = |
| 545 | 2 * s * spatialSecond a τ s + 2 * spatialFirst a τ s - spatialProfile a τ s / (2 * s) := by |
| 546 | have hz : 0 ≤ 2 * τ / s := by positivity |
| 547 | have hode := profileJet_ode ha hz |
| 548 | have hpow : s ^ (spatialExponent a - 2) = s ^ spatialExponent a / s ^ 2 := by |
| 549 | rw [show spatialExponent a - 2 = (spatialExponent a - 1) - 1 by ring, |
| 550 | Real.rpow_sub_one hs.ne', Real.rpow_sub_one hs.ne'] |
| 551 | ring |
| 552 | dsimp only [spatialSecond, spatialFirst, spatialProfile] |
| 553 | rw [hpow, Real.rpow_sub_one hs.ne'] |
| 554 | have hres : |
| 555 | 2 * s * (s ^ spatialExponent a / s ^ 2 * |
| 556 | (spatialExponent a * (spatialExponent a - 1) * profile a (2 * τ / s) - |
| 557 | 2 * (spatialExponent a - 1) * (2 * τ / s) * profileJet a 1 (2 * τ / s) + |
| 558 | (2 * τ / s) ^ 2 * profileJet a 2 (2 * τ / s))) + |
| 559 | 2 * (s ^ spatialExponent a / s * |
| 560 | (spatialExponent a * profile a (2 * τ / s) - |
| 561 | (2 * τ / s) * profileJet a 1 (2 * τ / s))) - |
| 562 | s ^ spatialExponent a * profile a (2 * τ / s) / (2 * s) = |
| 563 | 2 * s ^ spatialExponent a / s * |
| 564 | ((2 * τ / s) ^ 2 * profileJet a 2 (2 * τ / s) + |
| 565 | (2 * a * (2 * τ / s)) * profileJet a 1 (2 * τ / s) + |
| 566 | a * (a - 1) * profile a (2 * τ / s)) := by |
| 567 | dsimp only [spatialExponent] |
| 568 | field_simp ; ring |
| 569 | rw [hres] |
| 570 | have hsum : (2 * τ / s) ^ 2 * profileJet a 2 (2 * τ / s) + |
| 571 | (2 * a * (2 * τ / s)) * profileJet a 1 (2 * τ / s) + |
| 572 | a * (a - 1) * profile a (2 * τ / s) = -profileJet a 1 (2 * τ / s) := by |
| 573 | linarith |
| 574 | rw [hsum] |
| 575 | ring |
| 576 | |
| 577 | /-- The radial velocity profile in physical radius and backward time. -/ |
| 578 | def radialProfile (a τ r : ℝ) : ℝ := spatialProfile a τ (r ^ 2 / 2) |
| 579 | |
| 580 | def radialFirst (a τ r : ℝ) : ℝ := spatialFirst a τ (r ^ 2 / 2) * r |
| 581 | |
| 582 | def radialSecond (a τ r : ℝ) : ℝ := |
| 583 | spatialSecond a τ (r ^ 2 / 2) * r ^ 2 + spatialFirst a τ (r ^ 2 / 2) |
| 584 | |
| 585 | theorem radiusSquared_hasDerivAt (r : ℝ) : |
| 586 | HasDerivAt (fun r : ℝ => r ^ 2 / 2) r r := by |
| 587 | convert! ((hasDerivAt_id r).pow 2).div_const 2 using 1 |
| 588 | simp |
| 589 | |
| 590 | theorem radialProfile_hasDerivAt_radius {a τ r : ℝ} (ha : 1 < a) (hτ : 0 < τ) (hr : 0 < r) : |
| 591 | HasDerivAt (radialProfile a τ) (radialFirst a τ r) r := by |
| 592 | have hs : 0 < r ^ 2 / 2 := by positivity |
| 593 | exact (spatialProfile_hasDerivAt_s ha hτ hs).comp r (radiusSquared_hasDerivAt r) |
| 594 | |
| 595 | theorem radialFirst_hasDerivAt_radius {a τ r : ℝ} (ha : 1 < a) (hτ : 0 < τ) (hr : 0 < r) : |
| 596 | HasDerivAt (radialFirst a τ) (radialSecond a τ r) r := by |
| 597 | have hs : 0 < r ^ 2 / 2 := by positivity |
| 598 | have hd := ((spatialFirst_hasDerivAt_s ha hτ hs).comp r (radiusSquared_hasDerivAt r)).mul |
| 599 | (hasDerivAt_id r) |
| 600 | convert! hd using 1 |
| 601 | dsimp only [radialSecond, Function.comp_apply, id] |
| 602 | ring |
| 603 | |
| 604 | theorem radialProfile_first_derivative {a τ r : ℝ} (ha : 1 < a) (hτ : 0 < τ) (hr : 0 < r) : |
| 605 | deriv (radialProfile a τ) r = radialFirst a τ r := |
| 606 | (radialProfile_hasDerivAt_radius ha hτ hr).deriv |
| 607 | |
| 608 | theorem radialProfile_second_derivative {a τ r : ℝ} (ha : 1 < a) (hτ : 0 < τ) (hr : 0 < r) : |
| 609 | iteratedDeriv 2 (radialProfile a τ) r = radialSecond a τ r := by |
| 610 | have he : deriv (radialProfile a τ) =ᶠ[𝓝 r] radialFirst a τ := by |
| 611 | filter_upwards [isOpen_Ioi.mem_nhds hr] with y hy |
| 612 | exact radialProfile_first_derivative ha hτ hy |
| 613 | have hd := (radialFirst_hasDerivAt_radius ha hτ hr).congr_of_eventuallyEq he |
| 614 | rw [iteratedDeriv_succ, iteratedDeriv_one] |
| 615 | exact hd.deriv |
| 616 | |
| 617 | theorem radialProfile_hasDerivAt_time {a τ r : ℝ} (ha : 1 < a) (hτ : 0 < τ) (hr : 0 < r) : |
| 618 | HasDerivAt (fun τ => radialProfile a τ r) |
| 619 | (2 * (r ^ 2 / 2) ^ (spatialExponent a - 1) * profileJet a 1 (2 * τ / (r ^ 2 / 2))) τ := |
| 620 | spatialProfile_hasDerivAt_time ha hτ (by positivity) |
| 621 | |
| 622 | /-- The actual angular radial heat equation in radius and backward time. |
| 623 | The second radial derivative and both first derivatives are genuine `deriv`s. -/ |
| 624 | theorem radial_heat_equation {a τ r : ℝ} (ha : 1 < a) (hτ : 0 < τ) (hr : 0 < r) : |
| 625 | -deriv (fun τ => radialProfile a τ r) τ = |
| 626 | iteratedDeriv 2 (radialProfile a τ) r + deriv (radialProfile a τ) r / r - |
| 627 | radialProfile a τ r / r ^ 2 := by |
| 628 | rw [(radialProfile_hasDerivAt_time ha hτ hr).deriv, |
| 629 | radialProfile_first_derivative ha hτ hr, radialProfile_second_derivative ha hτ hr] |
| 630 | rw [spatial_heat_identity ha hτ (show 0 < r ^ 2 / 2 by positivity)] |
| 631 | dsimp only [radialSecond, radialFirst, radialProfile] |
| 632 | field_simp ; ring |
| 633 | |
| 634 | /-- With `τ = 1 - t`, the sign is the forward heat sign in the manuscript. -/ |
| 635 | theorem forward_radial_heat_equation {a t r : ℝ} (ha : 1 < a) (ht : t < 1) (hr : 0 < r) : |
| 636 | deriv (fun t => radialProfile a (1 - t) r) t = |
| 637 | iteratedDeriv 2 (radialProfile a (1 - t)) r + deriv (radialProfile a (1 - t)) r / r - |
| 638 | radialProfile a (1 - t) r / r ^ 2 := by |
| 639 | have hτ : 0 < 1 - t := sub_pos.mpr ht |
| 640 | have hd := ((radialProfile_hasDerivAt_time ha hτ hr).comp t |
| 641 | ((hasDerivAt_id t).const_sub 1)).deriv |
| 642 | have htau := (radialProfile_hasDerivAt_time ha hτ hr).deriv |
| 643 | have hheat := radial_heat_equation ha hτ hr |
| 644 | rw [htau] at hheat |
| 645 | simp only [mul_neg_one] at hd |
| 646 | exact hd.trans hheat |
| 647 | |
| 648 | theorem spatialFirst_neg {a τ s : ℝ} (ha : 1 < a) (hτ : 0 < τ) (hs : 0 < s) : |
| 649 | spatialFirst a τ s < 0 := by |
| 650 | have hz : 0 < 2 * τ / s := by positivity |
| 651 | have hpos := profile_pos ha hz.le |
| 652 | have hlog := (div_lt_iff₀ hpos).mp (profile_logSlope_lt ha hz) |
| 653 | rw [(profile_hasDerivAt ha hz).deriv] at hlog |
| 654 | have hb : spatialExponent a * profile a (2 * τ / s) - |
| 655 | (2 * τ / s) * profileJet a 1 (2 * τ / s) < 0 := by |
| 656 | dsimp only [spatialExponent] |
| 657 | nlinarith |
| 658 | exact mul_neg_of_pos_of_neg (Real.rpow_pos_of_pos hs _) hb |
| 659 | |
| 660 | theorem radialProfile_derivative_neg {a τ r : ℝ} (ha : 1 < a) (hτ : 0 < τ) (hr : 0 < r) : |
| 661 | deriv (radialProfile a τ) r < 0 := by |
| 662 | rw [radialProfile_first_derivative ha hτ hr] |
| 663 | exact mul_neg_of_neg_of_pos (spatialFirst_neg ha hτ (by positivity)) hr |
| 664 | |
| 665 | /-- Joint smoothness in the physical coordinate and backward time, also at `τ = 0`. -/ |
| 666 | theorem spatialProfile_joint_contDiffOn {a : ℝ} (ha : 1 < a) : |
| 667 | ContDiffOn ℝ ∞ (fun p : ℝ × ℝ => spatialProfile a p.2 p.1) |
| 668 | {p | 0 < p.1 ∧ 0 ≤ p.2} := by |
| 669 | have hp : ContDiffOn ℝ ∞ (fun p : ℝ × ℝ => p.1 ^ spatialExponent a) |
| 670 | {p | 0 < p.1 ∧ 0 ≤ p.2} := |
| 671 | contDiffOn_fst.rpow_const_of_ne (fun p hp => hp.1.ne') |
| 672 | have hz : ContDiffOn ℝ ∞ (fun p : ℝ × ℝ => 2 * p.2 / p.1) |
| 673 | {p | 0 < p.1 ∧ 0 ≤ p.2} := |
| 674 | (contDiffOn_const.mul contDiffOn_snd).div contDiffOn_fst (fun p hp => hp.1.ne') |
| 675 | exact hp.mul ((profile_contDiffOn ha).comp hz (by |
| 676 | intro p hp |
| 677 | change 0 ≤ 2 * p.2 / p.1 |
| 678 | exact div_nonneg (mul_nonneg (by norm_num) hp.2) hp.1.le)) |
| 679 | |
| 680 | theorem radialProfile_joint_contDiffOn {a : ℝ} (ha : 1 < a) : |
| 681 | ContDiffOn ℝ ∞ (fun p : ℝ × ℝ => radialProfile a p.2 p.1) |
| 682 | {p | 0 < p.1 ∧ 0 ≤ p.2} := by |
| 683 | apply (spatialProfile_joint_contDiffOn ha).comp |
| 684 | (((contDiff_fst.pow 2).div_const 2).prodMk contDiff_snd).contDiffOn |
| 685 | intro p hp |
| 686 | exact ⟨div_pos (sq_pos_of_pos hp.1) (by norm_num), hp.2⟩ |
| 687 | |
| 688 | /-- This is exactly the displayed integral in Lemma 4.4. -/ |
| 689 | theorem profile_eq_integral (a z : ℝ) : |
| 690 | profile a z = (Real.Gamma a)⁻¹ * |
| 691 | ∫ v in Ioi (0 : ℝ), Real.exp (-v) * v ^ (a - 1) * (1 + z * v) ^ (1 - a) := by |
| 692 | simp only [profile, moment, kernel, Nat.cast_zero, add_zero, sub_zero] |
| 693 | |
| 694 | /-- The physical power is exactly `s^(-A)`, where `A = 1/2 + h`. -/ |
| 695 | theorem radialProfile_source_formula (h τ r : ℝ) : |
| 696 | radialProfile (1 + h) τ r = |
| 697 | (r ^ 2 / 2) ^ (-(1 / 2 + h)) * profile (1 + h) (2 * τ / (r ^ 2 / 2)) := by |
| 698 | simp only [radialProfile, spatialProfile, spatialExponent] |
| 699 | congr 2 |
| 700 | ring |
| 701 | |
| 702 | theorem profile_h_sub_one_bound {h z : ℝ} (hh : 0 < h) (hz : 0 ≤ z) : |
| 703 | |profile (1 + h) z - 1| ≤ h * (1 + h) * z := by |
| 704 | have hb := profile_sub_one_bound (a := 1 + h) (by linarith) hz |
| 705 | convert! hb using 1 |
| 706 | ring |
| 707 | |
| 708 | theorem profile_h_logSlope_lt {h z : ℝ} (hh : 0 < h) (hz : 0 < z) : |
| 709 | -z * deriv (profile (1 + h)) z / profile (1 + h) z < h := by |
| 710 | simpa only [add_sub_cancel_left] using |
| 711 | profile_logSlope_lt (a := 1 + h) (by linarith) hz |
| 712 | |
| 713 | /-- Any fixed normalization constant preserves the actual forward heat equation. -/ |
| 714 | theorem scaled_forward_radial_heat_equation (C : ℝ) {a t r : ℝ} |
| 715 | (ha : 1 < a) (ht : t < 1) (hr : 0 < r) : |
| 716 | deriv (fun t => C * radialProfile a (1 - t) r) t = |
| 717 | iteratedDeriv 2 (fun r => C * radialProfile a (1 - t) r) r + |
| 718 | deriv (fun r => C * radialProfile a (1 - t) r) r / r - |
| 719 | C * radialProfile a (1 - t) r / r ^ 2 := by |
| 720 | have hsecond : iteratedDeriv 2 (fun r => C * radialProfile a (1 - t) r) r = |
| 721 | C * iteratedDeriv 2 (radialProfile a (1 - t)) r := by |
| 722 | simp only [iteratedDeriv_succ, iteratedDeriv_zero, deriv_const_mul_field'] |
| 723 | rw [hsecond, deriv_const_mul_field, deriv_const_mul_field, |
| 724 | forward_radial_heat_equation ha ht hr] |
| 725 | ring |
| 726 | |
| 727 | theorem scaled_radialProfile_derivative_neg {C a τ r : ℝ} |
| 728 | (hC : 0 < C) (ha : 1 < a) (hτ : 0 < τ) (hr : 0 < r) : |
| 729 | deriv (fun r => C * radialProfile a τ r) r < 0 := by |
| 730 | rw [deriv_const_mul_field] |
| 731 | exact mul_neg_of_pos_of_neg hC (radialProfile_derivative_neg ha hτ hr) |
| 732 | |
| 733 | end NavierStokes.RadialHeatProfile |