Documentation

Lightlike.Oscillatory.GaussianTests

Trust checks for the Gaussian model integral #

For the branch, integral_gauss_eq_invSqrtDet:

theorem Lightlike.Oscillatory.qform_one {n : ℕ} (x : Fin n → ℝ) :
qform 1 x = ∑ i : Fin n, ↑(x i) ^ 2

The quadratic form of the identity matrix is ∑ᵢ xᵢ².

theorem Lightlike.Oscillatory.re_qform_one_pos {n : ℕ} (x : Fin n → ℝ) (hx : x ≠ 0) :
0 < (qform 1 x).re

The identity matrix satisfies the positivity hypothesis.

theorem Lightlike.Oscillatory.gauss_one_sq {n : ℕ} :
(∫ (x : Fin n → ℝ), Complex.exp (-qform 1 x / 2)) ^ 2 = (2 * ↑Real.pi) ^ n

Known value: the standard Gaussian on ℝⁿ, (∫ e^{-|x|²/2} dx)² = (2π)ⁿ.

theorem Lightlike.Oscillatory.qform_diagonal {n : ℕ} (b : Fin n → ℂ) (x : Fin n → ℝ) :
qform (Matrix.diagonal b) x = ∑ i : Fin n, b i * ↑(x i) ^ 2

The quadratic form of a diagonal matrix is ∑ᵢ bᵢ xᵢ².

theorem Lightlike.Oscillatory.re_qform_diagonal_pos {n : ℕ} (b : Fin n → ℂ) (hb : ∀ (i : Fin n), 0 < (b i).re) (x : Fin n → ℝ) (hx : x ≠ 0) :

A diagonal matrix with entries in the right half-plane satisfies the positivity hypothesis.

theorem Lightlike.Oscillatory.integral_gauss_diagonal_prod {n : ℕ} (b : Fin n → ℂ) (hb : ∀ (i : Fin n), 0 < (b i).re) :
∫ (x : Fin n → ℝ), Complex.exp (-qform (Matrix.diagonal b) x / 2) = ∏ i : Fin n, (↑Real.pi / (b i / 2)) ^ (1 / 2)

The diagonal Gaussian from Mathlib's product formula integral_cexp_neg_sum_mul_add: G(diag b) = ∏ᵢ (π / (bᵢ / 2))^{1/2} for Re bᵢ > 0.

theorem Lightlike.Oscillatory.gauss_diagonal_mathlib {n : ℕ} (b : Fin n → ℂ) (hb : ∀ (i : Fin n), 0 < (b i).re) :
(∫ (x : Fin n → ℝ), Complex.exp (-qform (Matrix.diagonal b) x / 2)) ^ 2 * (Matrix.diagonal b).det = (2 * ↑Real.pi) ^ n

Independent cross-check for diagonal matrices: G(diag b)² · det (diag b) = (2π)ⁿ for Re bᵢ > 0, proved from Mathlib's product formula integral_cexp_neg_sum_mul_add and not from integral_gauss_sq_mul_det.

theorem Lightlike.Oscillatory.gauss_two_complex :
(∫ (x : Fin 2 → ℝ), Complex.exp (-qform !![1, Complex.I; Complex.I, 2] x / 2)) ^ 2 = (2 * ↑Real.pi) ^ 2 / 3

The complex example A = [[1, i], [i, 2]] (det A = 3) satisfies the hypotheses of integral_gauss_sq_mul_det, which gives G(A)² = (2π)² / 3.

The non-symmetric matrix [[1, 1], [-1, 1]] has the quadratic form of the identity.

theorem Lightlike.Oscillatory.gauss_sq_mul_det_nonsymm :
(∫ (x : Fin 2 → ℝ), Complex.exp (-qform !![1, 1; -1, 1] x / 2)) ^ 2 * !![1, 1; -1, 1].det = 2 * (2 * ↑Real.pi) ^ 2

Wrong input: for the non-symmetric B = [[1, 1], [-1, 1]], G(B)² det B = 2 (2π)², twice the value (2π)² of integral_gauss_sq_mul_det.

theorem Lightlike.Oscillatory.integral_gauss_sq_mul_det_needs_symm :
¬∀ (A : Matrix (Fin 2) (Fin 2) ℂ), (∀ (x : Fin 2 → ℝ), x ≠ 0 → 0 < (qform A x).re) → (∫ (x : Fin 2 → ℝ), Complex.exp (-qform A x / 2)) ^ 2 * A.det = (2 * ↑Real.pi) ^ 2

The symmetry hypothesis of integral_gauss_sq_mul_det cannot be dropped: without it the identity fails for [[1, 1], [-1, 1]], which satisfies the positivity hypothesis.

Wrong constant: in one dimension G(1)² = 2π ≠ π, so (2π)ⁿ cannot be replaced by πⁿ.

The branch: trust checks for integral_gauss_eq_invSqrtDet #

invSqrtDet 1 = 1: every eigenvalue of the identity is 1.

theorem Lightlike.Oscillatory.integral_gauss_one {n : ℕ} :
∫ (x : Fin n → ℝ), Complex.exp (-qform 1 x / 2) = ↑((2 * Real.pi) ^ (↑n / 2))

Known value: the standard Gaussian on ℝⁿ, ∫ e^{-|x|²/2} dx = (2π)^{n/2}.

theorem Lightlike.Oscillatory.cpow_pi_div_half (b : ℂ) (hb : 0 < b.re) :
(↑Real.pi / (b / 2)) ^ (1 / 2) = ↑((2 * Real.pi) ^ (1 / 2)) * b ^ (-(1 / 2))

(π / (b / 2))^{1/2} = (2π)^{1/2} b^{-1/2} for Re b > 0, with principal roots.

theorem Lightlike.Oscillatory.gauss_diagonal_branch_mathlib {n : ℕ} (b : Fin n → ℂ) (hb : ∀ (i : Fin n), 0 < (b i).re) :
∫ (x : Fin n → ℝ), Complex.exp (-qform (Matrix.diagonal b) x / 2) = ↑((2 * Real.pi) ^ (↑n / 2)) * invSqrtDet (Matrix.diagonal b)

Independent cross-check of integral_gauss_eq_invSqrtDet for diagonal matrices, branch included: G(diag b) = (2π)^{n/2} invSqrtDet (diag b) for Re bᵢ > 0, proved from Mathlib's product formula and not from the path argument.

The principal root x^{1/2} has nonnegative real part.

Wrong branch. For A = (1 + 2i) · I₃, the principal root of det A gives the negative of invSqrtDet A: (det A)^{-1/2} = -invSqrtDet A. With integral_gauss_eq_invSqrtDet, the "formula" (2π)^{3/2} (det A)^{-1/2} therefore equals -G(A). The eigenvalue arguments sum to 3 arctan 2 > π.

theorem Lightlike.Oscillatory.integral_gauss_principal_det_fails :
¬∀ (A : Matrix (Fin 3) (Fin 3) ℂ), A.IsSymm → (∀ (x : Fin 3 → ℝ), x ≠ 0 → 0 < (qform A x).re) → ∫ (x : Fin 3 → ℝ), Complex.exp (-qform A x / 2) = ↑((2 * Real.pi) ^ (3 / 2)) * A.det ^ (-(1 / 2))

Wrong branch, integral form. The principal root of the determinant does not give the Gaussian integral: G(A) = (2π)^{3/2} (det A)^{-1/2} fails for A = (1 + 2i) · I₃, which is symmetric with positive definite real part. There (2π)^{3/2} (det A)^{-1/2} = -G(A) ≠ G(A).

Wrong constant: (2π)^{n/2} in integral_gauss_eq_invSqrtDet cannot be replaced by π^{n/2}; already for n = 1 and A = 1 this would give 2π = π.