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.Basic

36 declarations. Mathlib docs · Source

The Gamma function

This file defines the Γ function (of a real or complex variable s). We define this by Euler's integral Γ(s) = ∫ x in Ioi 0, exp (-x) * x ^ (s - 1) in the range where this integral converges (i.e., for 0 < s in the real case, and 0 < re s in the complex case).

We show that this integral satisfies Γ(1) = 1 and Γ(s + 1) = s * Γ(s); hence we can define Γ(s) for all s as the unique function satisfying this recurrence and agreeing with Euler's integral in the convergence range. (If s = -n for n ∈ ℕ, then the function is undefined, and we set it to be 0 by convention.)

Gamma function: main statements (complex case)

  • Complex.Gamma: the Γ function (of a complex variable).
  • Complex.Gamma_eq_integral: for 0 < re s, Γ(s) agrees with Euler's integral.
  • Complex.Gamma_add_one: for all s : ℂ with s ≠ 0, we have Γ (s + 1) = s Γ(s).
  • Complex.Gamma_nat_eq_factorial: for all n : ℕ we have Γ (n + 1) = n!.

Gamma function: main statements (real case)

  • Real.Gamma: the Γ function (of a real variable).
  • Real counterparts of all the properties of the complex Gamma function listed above: Real.Gamma_eq_integral, Real.Gamma_add_one, Real.Gamma_nat_eq_factorial.

Tags

Gamma

Now we establish the recurrence relation Γ(s + 1) = s * Γ(s) using integration by parts.

Now we define Γ(s) on the whole complex plane, by recursion.

theorem Real.Gamma_integrand_isLittleO E1 #

∀ (s : ℝ), (fun x ↦ Real.exp (-x) * x ^ s) =o[Filter.atTop] fun x ↦ Real.exp (-(1 / 2) * x)

Asymptotic bound for the Γ function integrand.

theorem Real.GammaIntegral_convergent E1 #

∀ {s : ℝ}, 0 < s → MeasureTheory.IntegrableOn (fun x ↦ Real.exp (-x) * x ^ (s - 1)) (Set.Ioi 0) MeasureTheory.volume

The Euler integral for the Γ function converges for positive real s.

theorem Complex.GammaIntegral_convergent E1 #

∀ {s : ℂ},
  0 < s.re → MeasureTheory.IntegrableOn (fun x ↦ ↑(Real.exp (-x)) * ↑x ^ (s - 1)) (Set.Ioi 0) MeasureTheory.volume

The integral defining the Γ function converges for complex s with 0 < re s.

This is proved by reduction to the real case.

def Complex.GammaIntegral E1 #

ℂ → ℂ

Euler's integral for the Γ function (of a complex variable s), defined as ∫ x in Ioi 0, exp (-x) * x ^ (s - 1).

See Complex.GammaIntegral_convergent for a proof of the convergence of the integral for 0 < re s.

theorem Complex.GammaIntegral_conj E1 #

∀ (s : ℂ), ((starRingEnd ℂ) s).GammaIntegral = (starRingEnd ℂ) s.GammaIntegral

theorem Complex.GammaIntegral_ofReal E1 #

∀ (s : ℝ), (↑s).GammaIntegral = ↑(∫ (x : ℝ) in Set.Ioi 0, Real.exp (-x) * x ^ (s - 1))

theorem Complex.GammaIntegral_one E0 #

Complex.GammaIntegral 1 = 1

def Complex.partialGamma E1 #

ℂ → ℝ → ℂ

The indefinite version of the Γ function, Γ(s, X) = ∫ x ∈ 0..X, exp(-x) x ^ (s - 1).

theorem Complex.tendsto_partialGamma E1 #

∀ {s : ℂ}, 0 < s.re → Filter.Tendsto (fun X ↦ s.partialGamma X) Filter.atTop (nhds s.GammaIntegral)

theorem Complex.partialGamma_add_one E1 #

∀ {s : ℂ}, 0 < s.re → ∀ {X : ℝ}, 0 ≤ X → (s + 1).partialGamma X = s * s.partialGamma X - ↑(Real.exp (-X)) * ↑X ^ s

The recurrence relation for the indefinite version of the Γ function.

theorem Complex.GammaIntegral_add_one E1 #

∀ {s : ℂ}, 0 < s.re → (s + 1).GammaIntegral = s * s.GammaIntegral

The recurrence relation for the Γ integral.

def Complex.Gamma E1 #

ℂ → ℂ

The Γ function (of a complex variable s).

theorem Complex.Gamma_add_one E1 #

∀ (s : ℂ), s ≠ 0 → Complex.Gamma (s + 1) = s * Complex.Gamma s

The recurrence relation for the Γ function.

theorem Complex.Gamma_eq_integral E1 #

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

theorem Complex.Gamma_one E0 #

Complex.Gamma 1 = 1

theorem Complex.Gamma_nat_eq_factorial E1 #

∀ (n : ℕ), Complex.Gamma (↑n + 1) = ↑n.factorial

theorem Complex.Gamma_ofNat_eq_factorial E0 #

∀ (n : ℕ) [inst : (n + 1).AtLeastTwo], Complex.Gamma (OfNat.ofNat (n + 1)) = ↑n.factorial

theorem Complex.Gamma_zero E0 #

Complex.Gamma 0 = 0

At 0 the Gamma function is undefined; by convention we assign it the value 0.

theorem Complex.Gamma_neg_nat_eq_zero E1 #

∀ (n : ℕ), Complex.Gamma (-↑n) = 0

At -n for n ∈ ℕ, the Gamma function is undefined; by convention we assign it the value 0.

theorem Complex.Gamma_conj E1 #

∀ (s : ℂ), Complex.Gamma ((starRingEnd ℂ) s) = (starRingEnd ℂ) (Complex.Gamma s)

theorem Complex.integral_cpow_mul_exp_neg_mul_Ioi E1 #

∀ {a : ℂ} {r : ℝ},
  0 < a.re → 0 < r → ∫ (t : ℝ) in Set.Ioi 0, ↑t ^ (a - 1) * Complex.exp (-(↑r * ↑t)) = (1 / ↑r) ^ a * Complex.Gamma a

Expresses the integral over Ioi 0 of t ^ (a - 1) * exp (-(r * t)) in terms of the Gamma function, for complex a.

def Real.Gamma E1 #

ℝ → ℝ

The Γ function (of a real variable s).

theorem Real.Gamma_eq_integral E1 #

∀ {s : ℝ}, 0 < s → Real.Gamma s = ∫ (x : ℝ) in Set.Ioi 0, Real.exp (-x) * x ^ (s - 1)

theorem Real.Gamma_add_one E1 #

∀ {s : ℝ}, s ≠ 0 → Real.Gamma (s + 1) = s * Real.Gamma s

theorem Real.Gamma_one E0 #

Real.Gamma 1 = 1

theorem Complex.Gamma_ofReal E1 #

∀ (s : ℝ), Complex.Gamma ↑s = ↑(Real.Gamma s)

theorem Real.Gamma_nat_eq_factorial E1 #

∀ (n : ℕ), Real.Gamma (↑n + 1) = ↑n.factorial

theorem Real.Gamma_ofNat_eq_factorial E0 #

∀ (n : ℕ) [inst : (n + 1).AtLeastTwo], Real.Gamma (OfNat.ofNat (n + 1)) = ↑n.factorial

theorem Real.Gamma_zero E0 #

Real.Gamma 0 = 0

At 0 the Gamma function is undefined; by convention we assign it the value 0.

theorem Real.Gamma_neg_nat_eq_zero E1 #

∀ (n : ℕ), Real.Gamma (-↑n) = 0

At -n for n ∈ ℕ, the Gamma function is undefined; by convention we assign it the value 0.

theorem Real.Gamma_pos_of_pos E1 #

∀ {s : ℝ}, 0 < s → 0 < Real.Gamma s

theorem Real.Gamma_nonneg_of_nonneg E1 #

∀ {s : ℝ}, 0 ≤ s → 0 ≤ Real.Gamma s

theorem Real.integral_rpow_mul_exp_neg_mul_Ioi E1 #

∀ {a r : ℝ}, 0 < a → 0 < r → ∫ (t : ℝ) in Set.Ioi 0, t ^ (a - 1) * Real.exp (-(r * t)) = (1 / r) ^ a * Real.Gamma a

Expresses the integral over Ioi 0 of t ^ (a - 1) * exp (-(r * t)), for positive real r, in terms of the Gamma function.

def Mathlib.Meta.Positivity.evalGamma E1 #

Mathlib.Meta.Positivity.PositivityExt

The positivity extension which identifies expressions of the form Gamma a.

theorem Real.Gamma_ne_zero E1 #

∀ {s : ℝ}, (∀ (m : ℕ), s ≠ -↑m) → Real.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 Real.Gamma_eq_zero_iff E0 #

∀ (s : ℝ), Real.Gamma s = 0 ↔ ∃ m, s = -↑m