Documentation

Mathlib.Analysis.SpecialFunctions.Gaussian

Gaussian integral #

We prove various versions of the formula for the Gaussian integral:

We also prove, more generally, that the Fourier transform of the Gaussian is another Gaussian:

We also give versions of these formulas in finite-dimensional inner product spaces, see integral_cexp_neg_mul_sq_norm_add and fourierIntegral_gaussian_innerProductSpace.

As an application, in Real.tsum_exp_neg_mul_int_sq and Complex.tsum_exp_neg_mul_int_sq, we use Poisson summation to prove the identity ∑' (n : ℤ), exp (-π * a * n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ℤ), exp (-π / a * n ^ 2) for positive real a, or complex a with positive real part. (See also NumberTheory.ModularForms.JacobiTheta.)

theorem exp_neg_mul_rpow_isLittleO_exp_neg {p : } {b : } (hb : 0 < b) (hp : 1 < p) :
(fun (x : ) => Real.exp (-b * x ^ p)) =o[Filter.atTop] fun (x : ) => Real.exp (-x)
theorem exp_neg_mul_sq_isLittleO_exp_neg {b : } (hb : 0 < b) :
(fun (x : ) => Real.exp (-b * x ^ 2)) =o[Filter.atTop] fun (x : ) => Real.exp (-x)
theorem rpow_mul_exp_neg_mul_rpow_isLittleO_exp_neg (s : ) {b : } {p : } (hp : 1 < p) (hb : 0 < b) :
(fun (x : ) => x ^ s * Real.exp (-b * x ^ p)) =o[Filter.atTop] fun (x : ) => Real.exp (-(1 / 2) * x)
theorem rpow_mul_exp_neg_mul_sq_isLittleO_exp_neg {b : } (hb : 0 < b) (s : ) :
(fun (x : ) => x ^ s * Real.exp (-b * x ^ 2)) =o[Filter.atTop] fun (x : ) => Real.exp (-(1 / 2) * x)
theorem integrableOn_rpow_mul_exp_neg_rpow {p : } {s : } (hs : -1 < s) (hp : 1 p) :
MeasureTheory.IntegrableOn (fun (x : ) => x ^ s * Real.exp (-x ^ p)) (Set.Ioi 0) MeasureTheory.volume
theorem integrableOn_rpow_mul_exp_neg_mul_rpow {p : } {s : } {b : } (hs : -1 < s) (hp : 1 p) (hb : 0 < b) :
MeasureTheory.IntegrableOn (fun (x : ) => x ^ s * Real.exp (-b * x ^ p)) (Set.Ioi 0) MeasureTheory.volume
theorem integrableOn_rpow_mul_exp_neg_mul_sq {b : } (hb : 0 < b) {s : } (hs : -1 < s) :
MeasureTheory.IntegrableOn (fun (x : ) => x ^ s * Real.exp (-b * x ^ 2)) (Set.Ioi 0) MeasureTheory.volume
theorem integrable_rpow_mul_exp_neg_mul_sq {b : } (hb : 0 < b) {s : } (hs : -1 < s) :
MeasureTheory.Integrable (fun (x : ) => x ^ s * Real.exp (-b * x ^ 2)) MeasureTheory.volume
theorem integrable_exp_neg_mul_sq {b : } (hb : 0 < b) :
MeasureTheory.Integrable (fun (x : ) => Real.exp (-b * x ^ 2)) MeasureTheory.volume
theorem integrableOn_Ioi_exp_neg_mul_sq_iff {b : } :
MeasureTheory.IntegrableOn (fun (x : ) => Real.exp (-b * x ^ 2)) (Set.Ioi 0) MeasureTheory.volume 0 < b
theorem integrable_exp_neg_mul_sq_iff {b : } :
MeasureTheory.Integrable (fun (x : ) => Real.exp (-b * x ^ 2)) MeasureTheory.volume 0 < b
theorem integrable_mul_exp_neg_mul_sq {b : } (hb : 0 < b) :
MeasureTheory.Integrable (fun (x : ) => x * Real.exp (-b * x ^ 2)) MeasureTheory.volume
theorem norm_cexp_neg_mul_sq (b : ) (x : ) :
Complex.exp (-b * x ^ 2) = Real.exp (-b.re * x ^ 2)
theorem integrable_cexp_neg_mul_sq {b : } (hb : 0 < b.re) :
MeasureTheory.Integrable (fun (x : ) => Complex.exp (-b * x ^ 2)) MeasureTheory.volume
theorem integrable_mul_cexp_neg_mul_sq {b : } (hb : 0 < b.re) :
MeasureTheory.Integrable (fun (x : ) => x * Complex.exp (-b * x ^ 2)) MeasureTheory.volume
theorem integral_mul_cexp_neg_mul_sq {b : } (hb : 0 < b.re) :
∫ (r : ) in Set.Ioi 0, r * Complex.exp (-b * r ^ 2) = (2 * b)⁻¹
theorem integral_gaussian_sq_complex {b : } (hb : 0 < b.re) :
(∫ (x : ), Complex.exp (-b * x ^ 2)) ^ 2 = Real.pi / b

The square of the Gaussian integral ∫ x:ℝ, exp (-b * x^2) is equal to π / b.

theorem integral_gaussian (b : ) :
∫ (x : ), Real.exp (-b * x ^ 2) = Real.sqrt (Real.pi / b)
theorem continuousAt_gaussian_integral (b : ) (hb : 0 < b.re) :
ContinuousAt (fun (c : ) => ∫ (x : ), Complex.exp (-c * x ^ 2)) b
theorem integral_gaussian_complex {b : } (hb : 0 < b.re) :
∫ (x : ), Complex.exp (-b * x ^ 2) = (Real.pi / b) ^ (1 / 2)
theorem integral_gaussian_complex_Ioi {b : } (hb : 0 < b.re) :
∫ (x : ) in Set.Ioi 0, Complex.exp (-b * x ^ 2) = (Real.pi / b) ^ (1 / 2) / 2
theorem integral_gaussian_Ioi (b : ) :
∫ (x : ) in Set.Ioi 0, Real.exp (-b * x ^ 2) = Real.sqrt (Real.pi / b) / 2

The special-value formula Γ(1/2) = √π, which is equivalent to the Gaussian integral.

theorem Complex.Gamma_one_half_eq :
Complex.Gamma (1 / 2) = Real.pi ^ (1 / 2)

The special-value formula Γ(1/2) = √π, which is equivalent to the Gaussian integral.

Fourier integral of Gaussian functions #

The integral of the Gaussian function over the vertical edges of a rectangle with vertices at (±T, 0) and (±T, c).

Equations
Instances For
    theorem GaussianFourier.norm_cexp_neg_mul_sq_add_mul_I (b : ) (c : ) (T : ) :
    Complex.exp (-b * (T + c * Complex.I) ^ 2) = Real.exp (-(b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2))

    Explicit formula for the norm of the Gaussian function along the vertical edges.

    theorem GaussianFourier.norm_cexp_neg_mul_sq_add_mul_I' {b : } (hb : b.re 0) (c : ) (T : ) :
    Complex.exp (-b * (T + c * Complex.I) ^ 2) = Real.exp (-(b.re * (T - b.im * c / b.re) ^ 2 - c ^ 2 * (b.im ^ 2 / b.re + b.re)))
    theorem GaussianFourier.verticalIntegral_norm_le {b : } (hb : 0 < b.re) (c : ) {T : } (hT : 0 T) :
    GaussianFourier.verticalIntegral b c T 2 * |c| * Real.exp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))
    theorem GaussianFourier.integrable_cexp_neg_mul_sq_add_real_mul_I {b : } (hb : 0 < b.re) (c : ) :
    MeasureTheory.Integrable (fun (x : ) => Complex.exp (-b * (x + c * Complex.I) ^ 2)) MeasureTheory.volume
    theorem GaussianFourier.integral_cexp_neg_mul_sq_add_real_mul_I {b : } (hb : 0 < b.re) (c : ) :
    ∫ (x : ), Complex.exp (-b * (x + c * Complex.I) ^ 2) = (Real.pi / b) ^ (1 / 2)
    theorem integral_cexp_quadratic {b : } (hb : b.re < 0) (c : ) (d : ) :
    ∫ (x : ), Complex.exp (b * x ^ 2 + c * x + d) = (Real.pi / -b) ^ (1 / 2) * Complex.exp (d - c ^ 2 / (4 * b))
    theorem integrable_cexp_quadratic' {b : } (hb : b.re < 0) (c : ) (d : ) :
    MeasureTheory.Integrable (fun (x : ) => Complex.exp (b * x ^ 2 + c * x + d)) MeasureTheory.volume
    theorem integrable_cexp_quadratic {b : } (hb : 0 < b.re) (c : ) (d : ) :
    MeasureTheory.Integrable (fun (x : ) => Complex.exp (-b * x ^ 2 + c * x + d)) MeasureTheory.volume
    theorem fourierIntegral_gaussian {b : } (hb : 0 < b.re) (t : ) :
    ∫ (x : ), Complex.exp (Complex.I * t * x) * Complex.exp (-b * x ^ 2) = (Real.pi / b) ^ (1 / 2) * Complex.exp (-t ^ 2 / (4 * b))
    @[deprecated fourierIntegral_gaussian]
    theorem fourier_transform_gaussian {b : } (hb : 0 < b.re) (t : ) :
    ∫ (x : ), Complex.exp (Complex.I * t * x) * Complex.exp (-b * x ^ 2) = (Real.pi / b) ^ (1 / 2) * Complex.exp (-t ^ 2 / (4 * b))

    Alias of fourierIntegral_gaussian.

    theorem fourierIntegral_gaussian_pi' {b : } (hb : 0 < b.re) (c : ) :
    (Real.fourierIntegral fun (x : ) => Complex.exp (-Real.pi * b * x ^ 2 + 2 * Real.pi * c * x)) = fun (t : ) => 1 / b ^ (1 / 2) * Complex.exp (-Real.pi / b * (t + Complex.I * c) ^ 2)
    @[deprecated fourierIntegral_gaussian_pi']
    theorem fourier_transform_gaussian_pi' {b : } (hb : 0 < b.re) (c : ) :
    (Real.fourierIntegral fun (x : ) => Complex.exp (-Real.pi * b * x ^ 2 + 2 * Real.pi * c * x)) = fun (t : ) => 1 / b ^ (1 / 2) * Complex.exp (-Real.pi / b * (t + Complex.I * c) ^ 2)

    Alias of fourierIntegral_gaussian_pi'.

    theorem fourierIntegral_gaussian_pi {b : } (hb : 0 < b.re) :
    (Real.fourierIntegral fun (x : ) => Complex.exp (-Real.pi * b * x ^ 2)) = fun (t : ) => 1 / b ^ (1 / 2) * Complex.exp (-Real.pi / b * t ^ 2)
    @[deprecated fourierIntegral_gaussian_pi]
    theorem GaussianFourier.root_.fourier_transform_gaussian_pi {b : } (hb : 0 < b.re) :
    (Real.fourierIntegral fun (x : ) => Complex.exp (-Real.pi * b * x ^ 2)) = fun (t : ) => 1 / b ^ (1 / 2) * Complex.exp (-Real.pi / b * t ^ 2)

    Alias of fourierIntegral_gaussian_pi.

    theorem GaussianFourier.integrable_cexp_neg_sum_mul_add {ι : Type u_2} [Fintype ι] {b : ι} (hb : ∀ (i : ι), 0 < (b i).re) (c : ι) :
    MeasureTheory.Integrable (fun (v : ι) => Complex.exp ((-Finset.sum Finset.univ fun (i : ι) => b i * (v i) ^ 2) + Finset.sum Finset.univ fun (i : ι) => c i * (v i))) MeasureTheory.volume
    theorem GaussianFourier.integrable_cexp_neg_mul_sum_add {b : } {ι : Type u_2} [Fintype ι] (hb : 0 < b.re) (c : ι) :
    MeasureTheory.Integrable (fun (v : ι) => Complex.exp ((-b * Finset.sum Finset.univ fun (i : ι) => (v i) ^ 2) + Finset.sum Finset.univ fun (i : ι) => c i * (v i))) MeasureTheory.volume
    theorem GaussianFourier.integrable_cexp_neg_mul_sq_norm_add_of_euclideanSpace {b : } {ι : Type u_2} [Fintype ι] (hb : 0 < b.re) (c : ) (w : EuclideanSpace ι) :
    MeasureTheory.Integrable (fun (v : EuclideanSpace ι) => Complex.exp (-b * v ^ 2 + c * w, v⟫_)) MeasureTheory.volume
    theorem GaussianFourier.integrable_cexp_neg_mul_sq_norm_add {b : } {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [FiniteDimensional V] [MeasurableSpace V] [BorelSpace V] (hb : 0 < b.re) (c : ) (w : V) :
    MeasureTheory.Integrable (fun (v : V) => Complex.exp (-b * v ^ 2 + c * w, v⟫_)) MeasureTheory.volume

    In a real inner product space, the complex exponential of minus the square of the norm plus a scalar product is integrable. Useful when discussing the Fourier transform of a Gaussian.

    theorem GaussianFourier.integral_cexp_neg_sum_mul_add {ι : Type u_2} [Fintype ι] {b : ι} (hb : ∀ (i : ι), 0 < (b i).re) (c : ι) :
    ∫ (v : ι), Complex.exp ((-Finset.sum Finset.univ fun (i : ι) => b i * (v i) ^ 2) + Finset.sum Finset.univ fun (i : ι) => c i * (v i)) = Finset.prod Finset.univ fun (i : ι) => (Real.pi / b i) ^ (1 / 2) * Complex.exp (c i ^ 2 / (4 * b i))
    theorem GaussianFourier.integral_cexp_neg_mul_sum_add {b : } {ι : Type u_2} [Fintype ι] (hb : 0 < b.re) (c : ι) :
    ∫ (v : ι), Complex.exp ((-b * Finset.sum Finset.univ fun (i : ι) => (v i) ^ 2) + Finset.sum Finset.univ fun (i : ι) => c i * (v i)) = (Real.pi / b) ^ ((Fintype.card ι) / 2) * Complex.exp ((Finset.sum Finset.univ fun (i : ι) => c i ^ 2) / (4 * b))
    theorem GaussianFourier.integral_cexp_neg_mul_sq_norm_add_of_euclideanSpace {b : } {ι : Type u_2} [Fintype ι] (hb : 0 < b.re) (c : ) (w : EuclideanSpace ι) :
    ∫ (v : EuclideanSpace ι), Complex.exp (-b * v ^ 2 + c * w, v⟫_) = (Real.pi / b) ^ ((Fintype.card ι) / 2) * Complex.exp (c ^ 2 * w ^ 2 / (4 * b))
    theorem GaussianFourier.integral_cexp_neg_mul_sq_norm_add {b : } {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [FiniteDimensional V] [MeasurableSpace V] [BorelSpace V] (hb : 0 < b.re) (c : ) (w : V) :
    ∫ (v : V), Complex.exp (-b * v ^ 2 + c * w, v⟫_) = (Real.pi / b) ^ ((FiniteDimensional.finrank V) / 2) * Complex.exp (c ^ 2 * w ^ 2 / (4 * b))
    theorem fourierIntegral_gaussian_innerProductSpace' {b : } {V : Type u_1} [NormedAddCommGroup V] [InnerProductSpace V] [FiniteDimensional V] [MeasurableSpace V] [BorelSpace V] (hb : 0 < b.re) (x : V) (w : V) :
    Real.fourierIntegral (fun (v : V) => Complex.exp (-b * v ^ 2 + 2 * Real.pi * Complex.I * x, v⟫_)) w = (Real.pi / b) ^ ((FiniteDimensional.finrank V) / 2) * Complex.exp (-Real.pi ^ 2 * x - w ^ 2 / b)

    Poisson summation applied to the Gaussian #

    First we show that Gaussian-type functions have rapid decay along cocompact ℝ.

    theorem rexp_neg_quadratic_isLittleO_rpow_atTop {a : } (ha : a < 0) (b : ) (s : ) :
    (fun (x : ) => Real.exp (a * x ^ 2 + b * x)) =o[Filter.atTop] fun (x : ) => x ^ s
    theorem cexp_neg_quadratic_isLittleO_rpow_atTop {a : } (ha : a.re < 0) (b : ) (s : ) :
    (fun (x : ) => Complex.exp (a * x ^ 2 + b * x)) =o[Filter.atTop] fun (x : ) => x ^ s
    theorem cexp_neg_quadratic_isLittleO_abs_rpow_cocompact {a : } (ha : a.re < 0) (b : ) (s : ) :
    (fun (x : ) => Complex.exp (a * x ^ 2 + b * x)) =o[Filter.cocompact ] fun (x : ) => |x| ^ s
    theorem tendsto_rpow_abs_mul_exp_neg_mul_sq_cocompact {a : } (ha : 0 < a) (s : ) :
    Filter.Tendsto (fun (x : ) => |x| ^ s * Real.exp (-a * x ^ 2)) (Filter.cocompact ) (nhds 0)
    theorem isLittleO_exp_neg_mul_sq_cocompact {a : } (ha : 0 < a.re) (s : ) :
    (fun (x : ) => Complex.exp (-a * x ^ 2)) =o[Filter.cocompact ] fun (x : ) => |x| ^ s
    theorem Complex.tsum_exp_neg_quadratic {a : } (ha : 0 < a.re) (b : ) :
    ∑' (n : ), Complex.exp (-Real.pi * a * n ^ 2 + 2 * Real.pi * b * n) = 1 / a ^ (1 / 2) * ∑' (n : ), Complex.exp (-Real.pi / a * (n + Complex.I * b) ^ 2)

    Jacobi's theta-function transformation formula for the sum of exp -Q(x), where Q is a negative definite quadratic form.

    theorem Complex.tsum_exp_neg_mul_int_sq {a : } (ha : 0 < a.re) :
    ∑' (n : ), Complex.exp (-Real.pi * a * n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ), Complex.exp (-Real.pi / a * n ^ 2)
    theorem Real.tsum_exp_neg_mul_int_sq {a : } (ha : 0 < a) :
    ∑' (n : ), Real.exp (-Real.pi * a * n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ), Real.exp (-Real.pi / a * n ^ 2)