Skip to content

Commit 3723751

Browse files
committed
feat(Analysis/SpecialFunctions): generating function of besselJ
1 parent bb5fde6 commit 3723751

4 files changed

Lines changed: 151 additions & 1 deletion

File tree

Mathlib/Analysis/Normed/Ring/Basic.lean

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,16 @@ theorem norm_prod (s : Finset β) (f : β → α) : ‖∏ b ∈ s, f b‖ = ∏
786786
theorem nnnorm_prod (s : Finset β) (f : β → α) : ‖∏ b ∈ s, f b‖₊ = ∏ b ∈ s, ‖f b‖₊ :=
787787
map_prod nnnormHom.toMonoidHom f s
788788

789+
@[simp]
790+
theorem Multiset.norm_prod_map (s : Multiset β) (f : β → α) :
791+
‖(s.map f).prod‖ = (s.map (‖f ·‖)).prod := by
792+
simpa using normHom.toMonoidHom.map_multiset_prod (s.map f)
793+
794+
@[simp]
795+
theorem Multiset.nnnorm_prod_map (s : Multiset β) (f : β → α) :
796+
‖(s.map f).prod‖₊ = (s.map (‖f ·‖₊)).prod := by
797+
simpa using nnnormHom.toMonoidHom.map_multiset_prod (s.map f)
798+
789799
end SeminormedCommRing
790800

791801
section NormedAddCommGroup

Mathlib/Analysis/SpecialFunctions/Bessel.lean

Lines changed: 110 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ module
88

99
public import Mathlib.Analysis.SpecialFunctions.RegularizedHypergeometric
1010

11+
import Mathlib.Analysis.Calculus.SmoothSeries
12+
import Mathlib.Analysis.Complex.LocallyUniformLimit
13+
import Mathlib.Analysis.Normed.Module.Connected
1114
import Mathlib.Analysis.SpecialFunctions.Complex.Analytic
1215

1316
/-!
@@ -37,7 +40,6 @@ $J_a(0) = 0$ for all complex $a \ne 0$. For $a = 0$, we have $J_0(0) = 1$.
3740
3841
* Bessel function of the second kind
3942
* Differential equations
40-
* Generating functions
4143
* Bessel's integrals
4244
4345
-/
@@ -203,4 +205,111 @@ theorem mul_deriv_besselJ_eq_besselJ_sub_one_int (a : ℤ) (x : ℂ) :
203205
x * deriv (J a) x = x * J (a - 1) x - a * J a x := by
204206
linear_combination two_mul_self_mul_besselJ a x + mul_deriv_besselJ_eq_besselJ_add_one_int a x
205207

208+
theorem norm_besselJ_le_exp {a : ℂ} (ha : 0 ≤ a.re) (x : ℂ) :
209+
‖J a x‖ ≤ ‖Gamma (a + 1)‖⁻¹ * ‖(x / 2) ^ a‖ * Real.exp (‖x / 2‖ ^ 2) := by
210+
unfold besselJ
211+
grw [norm_mul, regularizedHGFun_le_exp_of_one_le_re (by simpa using ha)]
212+
apply le_of_eq
213+
simp
214+
ring
215+
216+
theorem norm_besselJ_le_exp_int (a : ℤ) (x : ℂ) :
217+
‖J a x‖ ≤ (a.natAbs ! : ℝ)⁻¹ * ‖x / 2‖ ^ a.natAbs * Real.exp (‖x / 2‖ ^ 2) := by
218+
wlog! ha : 0 ≤ a
219+
· specialize this (-a) (-x) (by simpa using ha.le)
220+
simpa [besselJ_neg_comm] using this
221+
obtain ⟨a, rfl⟩ := Int.eq_ofNat_of_zero_le ha
222+
grw [norm_besselJ_le_exp (by simp)]
223+
simp [Gamma_nat_eq_factorial]
224+
225+
-- Within a bounded set, `J a x * t ^ a` can be bounded uniformly by exp series terms.
226+
private theorem deriv_besselJ_mul_pow_le (t : ℂ) {s : Set ℂ} (hs : Bornology.IsBounded s) :
227+
∃ u v, ∀ a : ℤ, ∀ x ∈ s,
228+
‖J a x * t ^ a‖ ≤ (a.natAbs ! : ℝ)⁻¹ * (u ^ a.natAbs * ‖t ^ a‖) * v := by
229+
obtain ⟨x, hx⟩ := hs.exists_norm_le
230+
use ‖x / 2‖, Real.exp (‖x / 2‖ ^ 2)
231+
intro a y hy
232+
have hy' : ‖y / 2‖ ≤ ‖x / 2‖ := by
233+
grw [norm_div, hx y hy, le_abs_self x]
234+
simp
235+
grw [norm_mul, norm_besselJ_le_exp_int, hy', hy']
236+
apply le_of_eq
237+
ring
238+
239+
-- The uniform bound on `J a x * t ^ a` is summable
240+
private theorem summable_bound (u v : ℝ) (t : ℂ) :
241+
Summable fun a : ℤ ↦ (a.natAbs ! : ℝ)⁻¹ * (u ^ a.natAbs * ‖t ^ a‖) * v := by
242+
refine summable_int_iff_summable_nat_and_neg.mpr ⟨?_, ?_⟩
243+
· simpa [mul_pow] using
244+
(NormedSpace.exp_series_hasSum_exp' (𝕂 := ℝ) (u * ‖t‖)).summable.mul_right v
245+
· simpa [mul_pow] using
246+
(NormedSpace.exp_series_hasSum_exp' (𝕂 := ℝ) (u * ‖t‖⁻¹)).summable.mul_right v
247+
248+
theorem analyticOnNhd_tsum_besselJ_mul_pow (t : ℂ) :
249+
AnalyticOnNhd ℂ (∑' a : ℤ, J a · * t ^ a) Set.univ := by
250+
refine (analyticOnNhd_iff_differentiableOn isOpen_univ).mpr fun x _ ↦ ?_
251+
obtain ⟨u, v, h⟩ := deriv_besselJ_mul_pow_le t (Metric.isBounded_ball (x := x) (r := 1))
252+
exact differentiableOn_tsum_of_summable_norm (summable_bound u v t)
253+
(fun _ _ _ ↦ AnalyticAt.differentiableWithinAt (by fun_prop)) Metric.isOpen_ball h
254+
|>.differentiableAt (Metric.ball_mem_nhds _ (by simp)) |>.differentiableWithinAt
255+
256+
theorem summable_besselJ_mul_pow (x : ℂ) (t : ℂ) : Summable (fun a : ℤ ↦ J a x * t ^ a) := by
257+
obtain ⟨u, v, h⟩ := deriv_besselJ_mul_pow_le t (Bornology.isBounded_singleton (x := x))
258+
exact (summable_bound u v t).of_norm_bounded fun a ↦ h a x (Set.mem_singleton x)
259+
260+
@[dlmf 10.12.E1]
261+
theorem tsum_besselJ_mul_pow (x : ℂ) {t : ℂ} (ht : t ≠ 0) :
262+
∑' a : ℤ, J a x * t ^ a = exp ((x / 2) * (t - t⁻¹)) := by
263+
-- It sufficies to prove the equality in a ball at x = 0 where LHS is non-zero
264+
have : ∀ᶠ x in nhds 0, ∑' a : ℤ, J a x * t ^ a ≠ 0 := by
265+
apply (analyticOnNhd_tsum_besselJ_mul_pow t).continuous.continuousAt.eventually_ne
266+
simp [besselJ_zero]
267+
obtain ⟨r, hr0, hr⟩ := Metric.eventually_nhds_iff_ball.mp this
268+
revert x
269+
rw [← funext_iff]
270+
refine (analyticOnNhd_tsum_besselJ_mul_pow t).eq_of_eventuallyEq (fun x hx ↦ by fun_prop)
271+
(Metric.eventually_nhds_iff_ball.mpr ⟨r, hr0, ?_⟩) (z₀ := 0)
272+
-- It sufficies to prove that both sides agree on logDeriv, because they agree at x = 0
273+
suffices Set.EqOn (logDeriv fun x ↦ ∑' a : ℤ, J a x * t ^ a)
274+
(logDeriv fun x ↦ cexp (x / 2 * (t - t⁻¹))) (Metric.ball 0 r) by
275+
obtain ⟨k, hk0, hk⟩ := logDeriv_eqOn_iff
276+
((analyticOnNhd_tsum_besselJ_mul_pow t).differentiableOn.mono (by simp))
277+
(by fun_prop) Metric.isOpen_ball Metric.isPreconnected_ball (by simp) hr |>.mp this
278+
have hk1 : k = 1 := by simpa [besselJ_zero] using (hk (show 0 ∈ _ by simpa using hr0)).symm
279+
simpa [hk1, Set.EqOn] using hk
280+
intro x hx
281+
calc
282+
_ = deriv (∑' a : ℤ, J a · * t ^ a) x / ∑' a : ℤ, J a x * t ^ a := by rw [logDeriv_apply]
283+
_ = (∑' a : ℤ, deriv (J a · * t ^ a) x) / ∑' a : ℤ, J a x * t ^ a := by
284+
obtain ⟨u, v, h⟩ := deriv_besselJ_mul_pow_le t (Metric.isBounded_ball (x := 0) (r := r))
285+
rw [hasSum_deriv_of_summable_norm (summable_bound u v t)
286+
(fun _ _ _ ↦ AnalyticAt.differentiableWithinAt (by fun_prop)) Metric.isOpen_ball h hx
287+
|>.tsum_eq]
288+
_ = (∑' a : ℤ, (J (a - 1) x - J (a + 1) x) * t ^ a) / 2 / ∑' a : ℤ, J a x * t ^ a := by
289+
simp [← two_mul_deriv_besselJ_int, ← tsum_div_const, mul_assoc]
290+
_ = (∑' a : ℤ, (J (a - 1) x * t ^ (a - 1) * t - J (a + 1) x * t ^ (a + 1) * t⁻¹)) /
291+
2 / ∑' a : ℤ, J a x * t ^ a := by
292+
simp_rw [sub_mul, ← zpow_neg_one, mul_assoc, ← zpow_add_one₀ ht, ← zpow_add₀ ht]
293+
simp
294+
_ = ((∑' a : ℤ, J (a - 1) x * t ^ (a - 1)) * t - (∑' a : ℤ, J (a + 1) x * t ^ (a + 1)) * t⁻¹) /
295+
2 / ∑' a : ℤ, J a x * t ^ a := by
296+
rw [Summable.tsum_sub ?_ ?_]
297+
· simp_rw [tsum_mul_right]
298+
· simpa using ((Equiv.subRight 1).summable_iff.mpr (summable_besselJ_mul_pow x t)).mul_right t
299+
· simpa using ((Equiv.addRight 1).summable_iff.mpr
300+
(summable_besselJ_mul_pow x t)).mul_right t⁻¹
301+
_ = ((∑' a : ℤ, J a x * t ^ a) * t - (∑' a : ℤ, J a x * t ^ a) * t⁻¹) /
302+
2 / ∑' a : ℤ, J a x * t ^ a := by
303+
congrm (?_ * _ - ?_ * _) / _ / _
304+
· simpa using (Equiv.subRight 1).tsum_eq (fun a : ℤ ↦ J a x * t ^ a)
305+
· simpa using (Equiv.addRight 1).tsum_eq (fun a : ℤ ↦ J a x * t ^ a)
306+
_ = (t - t⁻¹) / 2 := by field [hr x hx]
307+
_ = _ := by
308+
rw [logDeriv_apply, deriv_cexp (by fun_prop)]
309+
simp [field]
310+
311+
theorem hasSum_besselJ_mul_pow (x : ℂ) {t : ℂ} (ht : t ≠ 0) :
312+
HasSum (fun a : ℤ ↦ J a x * t ^ a) (exp ((x / 2) * (t - t⁻¹))) :=
313+
(summable_besselJ_mul_pow x t).hasSum_iff.mpr (tsum_besselJ_mul_pow x ht)
314+
206315
end Complex

Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,19 @@ theorem Gamma_add_one (s : ℂ) (h2 : s ≠ 0) : Gamma (s + 1) = s * Gamma s :=
316316
rw [Gamma_eq_GammaAux s n t1, Gamma_eq_GammaAux (s + 1) n t2, GammaAux_recurrence1 s n t1]
317317
field
318318

319+
theorem norm_Gamma_le_norm_Gamma_add_one {s : ℂ} (hs : 1 ≤ ‖s‖) :
320+
‖Gamma s‖ ≤ ‖Gamma (s + 1)‖ := by
321+
grw [Gamma_add_one _ (by contrapose hs; simp [hs]), norm_mul, ← hs, one_mul]
322+
323+
/-- This bound is not tight and is provided for convenience. -/
324+
theorem norm_Gamma_le_norm_Gamma_add_of_one_le_re {s : ℂ} (hs : 1 ≤ s.re) (n : ℕ) :
325+
‖Gamma s‖ ≤ ‖Gamma (s + n)‖ := by
326+
induction n with
327+
| zero => simp
328+
| succ n ih =>
329+
grw [ih, norm_Gamma_le_norm_Gamma_add_one (le_trans (by simp; grind) (Complex.re_le_norm _))]
330+
simp [add_assoc]
331+
319332
theorem Gamma_eq_integral {s : ℂ} (hs : 0 < s.re) : Gamma s = GammaIntegral s :=
320333
Gamma_eq_GammaAux s 0 (by norm_cast; linarith)
321334

Mathlib/Analysis/SpecialFunctions/RegularizedHypergeometric.lean

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,24 @@ theorem deriv_regularizedHGFun {z : ℂ} (hz : ‖z‖ₑ < (regularizedHGFunSer
456456

457457
end Derivative
458458

459+
theorem regularizedHGFun_le_exp_of_one_le_re (h : ∀ u ∈ b, 1 ≤ u.re) (z : ℂ) :
460+
‖regularizedHGFun 0 b z‖ ≤ ‖(b.map Gamma).prod‖⁻¹ * Real.exp ‖z‖ := by
461+
rw [Real.exp_eq_exp_ℝ]
462+
apply HasSum.norm_le_of_bounded ((regularizedHGFunSeries 0 b).hasSum (by simp : z ∈ _))
463+
((NormedSpace.exp_series_hasSum_exp' (𝕂 := ℝ) ‖z‖).mul_left ‖(b.map Gamma).prod‖⁻¹)
464+
intro n
465+
suffices ‖(Multiset.map (fun x ↦ Gamma (x + ↑n)) b).prod‖⁻¹ ≤ ‖(b.map Gamma).prod‖⁻¹ by
466+
grw [← this]
467+
apply le_of_eq
468+
simp [regularizedHGFunCoeff]
469+
ring
470+
simp_rw [Multiset.norm_prod_map, ← Multiset.prod_map_inv]
471+
apply Multiset.prod_map_le_prod_map₀ _ _ (by simp)
472+
intro u hu
473+
apply inv_le_of_inv_le₀ (by grind [inv_pos, norm_pos_iff, neg_re, natCast_re])
474+
rw [inv_inv]
475+
apply norm_Gamma_le_norm_Gamma_add_of_one_le_re (h u hu)
476+
459477
section ZeroZero
460478

461479
/-- The regularized hypergeometric series with `a = b = 0` is exponential series. -/

0 commit comments

Comments
 (0)