The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V19. Complex and harmonic analysis

Mathlib.Analysis.SpecialFunctions.Gamma.Beta

32 declarations. Mathlib docs · Source

The Beta function, and further properties of the Gamma function

In this file we define the Beta integral, relate Beta and Gamma functions, and prove some refined properties of the Gamma function using these relations.

Results on the Beta function

  • Complex.betaIntegral: the Beta function Β(u, v), where u, v are complex with positive real part.
  • Complex.Gamma_mul_Gamma_eq_betaIntegral: the formula Gamma u * Gamma v = Gamma (u + v) * betaIntegral u v.

Results on the Gamma function

  • Complex.Gamma_ne_zero: for all s : ℂ with s ∉ {-n : n ∈ ℕ} we have Γ s ≠ 0.
  • Complex.GammaSeq_tendsto_Gamma: for all s, the limit as n → ∞ of the sequence n ↦ n ^ s * n! / (s * (s + 1) * ... * (s + n)) is Γ(s).
  • Complex.Gamma_mul_Gamma_one_sub: Euler's reflection formula Gamma s * Gamma (1 - s) = π / sin π s.
  • Complex.differentiable_one_div_Gamma: the function 1 / Γ(s) is differentiable everywhere.
  • Complex.Gamma_mul_Gamma_add_half: Legendre's duplication formula Gamma s * Gamma (s + 1 / 2) = Gamma (2 * s) * 2 ^ (1 - 2 * s) * √π.
  • Real.Gamma_ne_zero, Real.GammaSeq_tendsto_Gamma, Real.Gamma_mul_Gamma_one_sub, Real.Gamma_mul_Gamma_add_half: real versions of the above.

The Beta function

The Euler limit formula

The reflection formula

The reciprocal Gamma function

We show that the reciprocal Gamma function 1 / Γ(s) is entire. These lemmas show that (in this case at least) mathlib's conventions for division by zero do actually give a mathematically useful answer! (These results are useful in the theory of zeta and L-functions.)

The doubling formula for Gamma

We prove the doubling formula for arbitrary real or complex arguments, by analytic continuation from the positive real case. (Knowing that Γ⁻¹ is analytic everywhere makes this much simpler, since we do not have to do any special-case handling for the poles of Γ.)

def Complex.betaIntegral E1 #

ℂ → ℂ → ℂ

The Beta function Β (u, v), defined as ∫ x:ℝ in 0..1, x ^ (u - 1) * (1 - x) ^ (v - 1).

theorem Complex.betaIntegral_convergent_left E2 #

∀ {u : ℂ},
  0 < u.re → ∀ (v : ℂ), IntervalIntegrable (fun x ↦ ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)) MeasureTheory.volume 0 (1 / 2)

Auxiliary lemma for betaIntegral_convergent, showing convergence at the left endpoint.

theorem Complex.betaIntegral_convergent E1 #

∀ {u v : ℂ},
  0 < u.re → 0 < v.re → IntervalIntegrable (fun x ↦ ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)) MeasureTheory.volume 0 1

The Beta integral is convergent for all u, v of positive real part.

theorem Complex.betaIntegral_symm E1 #

∀ (u v : ℂ), v.betaIntegral u = u.betaIntegral v

theorem Complex.betaIntegral_eval_one_right E1 #

∀ {u : ℂ}, 0 < u.re → u.betaIntegral 1 = 1 / u

theorem Complex.betaIntegral_scaled E1 #

∀ (s t : ℂ) {a : ℝ}, 0 < a → ∫ (x : ℝ) in 0..a, ↑x ^ (s - 1) * (↑a - ↑x) ^ (t - 1) = ↑a ^ (s + t - 1) * s.betaIntegral t

theorem Complex.Gamma_mul_Gamma_eq_betaIntegral E1 #

∀ {s t : ℂ}, 0 < s.re → 0 < t.re → Complex.Gamma s * Complex.Gamma t = Complex.Gamma (s + t) * s.betaIntegral t

Relation between Beta integral and Gamma function.

theorem Complex.betaIntegral_recurrence E2 #

∀ {u v : ℂ}, 0 < u.re → 0 < v.re → u * u.betaIntegral (v + 1) = v * (u + 1).betaIntegral v

Recurrence formula for the Beta function.

theorem Complex.betaIntegral_eval_nat_add_one_right E2 #

∀ {u : ℂ}, 0 < u.re → ∀ (n : ℕ), u.betaIntegral (↑n + 1) = ↑n.factorial / ∏ j ∈ Finset.range (n + 1), (u + ↑j)

Explicit formula for the Beta function when second argument is a positive integer.

def Complex.GammaSeq E1 #

ℂ → ℕ → ℂ

The sequence with n-th term n ^ s * n! / (s * (s + 1) * ... * (s + n)), for complex s. We will show that this tends to Γ(s) as n → ∞.

theorem Complex.GammaSeq_eq_betaIntegral_of_re_pos E1 #

∀ {s : ℂ}, 0 < s.re → ∀ (n : ℕ), s.GammaSeq n = ↑n ^ s * s.betaIntegral (↑n + 1)

theorem Complex.GammaSeq_add_one_left E1 #

∀ (s : ℂ) {n : ℕ}, n ≠ 0 → (s + 1).GammaSeq n / s = ↑n / (↑n + 1 + s) * s.GammaSeq n

theorem Complex.GammaSeq_eq_approx_Gamma_integral E1 #

∀ {s : ℂ}, 0 < s.re → ∀ {n : ℕ}, n ≠ 0 → s.GammaSeq n = ∫ (x : ℝ) in 0..↑n, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)

theorem Complex.approx_Gamma_integral_tendsto_Gamma_integral E1 #

∀ {s : ℂ},
  0 < s.re →
    Filter.Tendsto (fun n ↦ ∫ (x : ℝ) in 0..↑n, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)) Filter.atTop
      (nhds (Complex.Gamma s))

The main technical lemma for GammaSeq_tendsto_Gamma, expressing the integral defining the Gamma function for 0 < re s as the limit of a sequence of integrals over finite intervals.

theorem Complex.GammaSeq_tendsto_Gamma E1 #

∀ (s : ℂ), Filter.Tendsto s.GammaSeq Filter.atTop (nhds (Complex.Gamma s))

Euler's limit formula for the complex Gamma function.

theorem Complex.GammaSeq_mul E1 #

∀ (z : ℂ) {n : ℕ},
  n ≠ 0 →
    z.GammaSeq n * (1 - z).GammaSeq n = ↑n / (↑n + 1 - z) * (1 / (z * ∏ j ∈ Finset.range n, (1 - z ^ 2 / (↑j + 1) ^ 2)))

theorem Complex.Gamma_mul_Gamma_one_sub E1 #

∀ (z : ℂ), Complex.Gamma z * Complex.Gamma (1 - z) = ↑Real.pi / Complex.sin (↑Real.pi * z)

Euler's reflection formula for the complex Gamma function.

theorem Complex.Gamma_ne_zero E1 #

∀ {s : ℂ}, (∀ (m : ℕ), s ≠ -↑m) → Complex.Gamma s ≠ 0

The Gamma function does not vanish on ℂ (except at non-positive integers, where the function is mathematically undefined and we set it to 0 by convention).

theorem Complex.Gamma_eq_zero_iff E0 #

∀ (s : ℂ), Complex.Gamma s = 0 ↔ ∃ m, s = -↑m

theorem Complex.norm_Gamma_le_norm_Gamma_add_one_iff E0 #

∀ (s : ℂ), ‖Complex.Gamma s‖ ≤ ‖Complex.Gamma (s + 1)‖ ↔ s = 0 ∨ 1 ≤ ‖s‖

theorem Complex.norm_Gamma_le_norm_Gamma_add_one E1 #

∀ {s : ℂ}, 1 ≤ ‖s‖ → ‖Complex.Gamma s‖ ≤ ‖Complex.Gamma (s + 1)‖

theorem Complex.norm_Gamma_le_norm_Gamma_add_of_one_le_re E1 #

∀ {s : ℂ}, 1 ≤ s.re → ∀ (n : ℕ), ‖Complex.Gamma s‖ ≤ ‖Complex.Gamma (s + ↑n)‖

This bound is not tight and is provided for convenience.

theorem Complex.Gamma_ne_zero_of_re_pos E1 #

∀ {s : ℂ}, 0 < s.re → Complex.Gamma s ≠ 0

A weaker, but easier-to-apply, version of Complex.Gamma_ne_zero.

theorem Complex.Gamma_add_nat_div_Gamma_eq E0 #

∀ {n : ℕ} (z : ℂ),
  (∀ (k : ℕ), z ≠ -↑k) → Complex.Gamma (z + ↑n) / Complex.Gamma z = Polynomial.eval z (ascPochhammer ℂ n)

The ascending Pochhammer symbol is given by the ratio of Γ functions.

def Real.GammaSeq E1 #

ℝ → ℕ → ℝ

The sequence with n-th term n ^ s * n! / (s * (s + 1) * ... * (s + n)), for real s. We will show that this tends to Γ(s) as n → ∞.

theorem Real.GammaSeq_tendsto_Gamma E1 #

∀ (s : ℝ), Filter.Tendsto s.GammaSeq Filter.atTop (nhds (Real.Gamma s))

Euler's limit formula for the real Gamma function.

theorem Real.Gamma_mul_Gamma_one_sub E1 #

∀ (s : ℝ), Real.Gamma s * Real.Gamma (1 - s) = Real.pi / Real.sin (Real.pi * s)

Euler's reflection formula for the real Gamma function.

theorem Complex.one_div_Gamma_eq_self_mul_one_div_Gamma_add_one E1 #

∀ (s : ℂ), (Complex.Gamma s)⁻¹ = s * (Complex.Gamma (s + 1))⁻¹

A reformulation of the Gamma recurrence relation which is true for s = 0 as well.

theorem Complex.differentiable_one_div_Gamma E1 #

Differentiable ℂ fun s ↦ (Complex.Gamma s)⁻¹

The reciprocal of the Gamma function is differentiable everywhere (including the points where Gamma itself is not).

theorem Complex.betaIntegral_eq_Gamma_mul_div E1 #

∀ (u v : ℂ), 0 < u.re → 0 < v.re → u.betaIntegral v = Complex.Gamma u * Complex.Gamma v / Complex.Gamma (u + v)

theorem Complex.Gamma_mul_Gamma_add_half E1 #

∀ (s : ℂ), Complex.Gamma s * Complex.Gamma (s + 1 / 2) = Complex.Gamma (2 * s) * 2 ^ (1 - 2 * s) * ↑√Real.pi

theorem Real.Gamma_mul_Gamma_add_half E1 #

∀ (s : ℝ), Real.Gamma s * Real.Gamma (s + 1 / 2) = Real.Gamma (2 * s) * 2 ^ (1 - 2 * s) * √Real.pi