Documentation

CslibFrontier.Foundations.MeasureTheory.Integral.CauchySchwarz

Cauchy–Schwarz for real integrals and integrability of moments #

The Cauchy–Schwarz inequality (∫ f g)² ≤ (∫ f²) (∫ g²) for real functions whose squares and product are integrable (MeasureTheory.sq_integral_mul_le). Unlike Mathlib's Hölder inequality integral_mul_le_Lp_mul_Lq_of_nonneg, it needs no sign condition and is stated with natural squares rather than real powers and roots. The proof is the discriminant argument: t ↦ ∫ (t f - g)² is a nonnegative quadratic polynomial.

For a real random variable in Lⁿ, the moments E[zʲ] and absolute moments E[|z|ʲ] of order j ≤ n are integrable under a finite measure (MeasureTheory.integrable_pow_of_memLp, MeasureTheory.integrable_abs_pow_of_memLp). The third absolute moment is bounded above by (E|z|³)² ≤ E[z²] E[z⁴] (MeasureTheory.sq_integral_abs_pow_three_le) and below by Lyapunov's inequality (√E[z²])³ ≤ E|z|³ (MeasureTheory.sqrt_integral_sq_pow_three_le). By Cauchy–Schwarz, the expectations of a K-Lipschitz function of two random variables in L² differ by at most K times their L² distance (LipschitzWith.abs_integral_comp_sub_le_sqrt).

Main results #

theorem MeasureTheory.sq_integral_mul_le {Ω : Type u_1} [MeasurableSpace Ω] {P : Measure Ω} {f g : Ω → ℝ} (hf : Integrable (fun (x : Ω) => f x ^ 2) P) (hg : Integrable (fun (x : Ω) => g x ^ 2) P) (hfg : Integrable (fun (x : Ω) => f x * g x) P) :
(∫ (x : Ω), f x * g x ∂P) ^ 2 ≤ (∫ (x : Ω), f x ^ 2 ∂P) * ∫ (x : Ω), g x ^ 2 ∂P

Cauchy–Schwarz for real integrals: (∫ f g)² ≤ (∫ f²) (∫ g²).

theorem MeasureTheory.integrable_pow_of_memLp {μ : Measure ℝ} [IsFiniteMeasure μ] {n : ℕ} (h : MemLp id (↑n) μ) {j : ℕ} (hj : j ≤ n) :
Integrable (fun (s : ℝ) => s ^ j) μ

Moments of order at most n of a real random variable in Lⁿ are integrable.

theorem MeasureTheory.integrable_abs_pow_of_memLp {μ : Measure ℝ} [IsFiniteMeasure μ] {n : ℕ} (h : MemLp id (↑n) μ) {j : ℕ} (hj : j ≤ n) :
Integrable (fun (s : ℝ) => |s| ^ j) μ

Absolute moments of order at most n of a real random variable in Lⁿ are integrable.

theorem MeasureTheory.sq_integral_abs_pow_three_le {μ : Measure ℝ} [IsFiniteMeasure μ] (h : MemLp id 4 μ) :
(∫ (s : ℝ), |s| ^ 3 ∂μ) ^ 2 ≤ (∫ (s : ℝ), s ^ 2 ∂μ) * ∫ (s : ℝ), s ^ 4 ∂μ

The third absolute moment of a real random variable in L⁴ satisfies (E|z|³)² ≤ E[z²] E[z⁴], by Cauchy–Schwarz applied to |z| · z².

theorem MeasureTheory.sqrt_integral_sq_pow_three_le {μ : Measure ℝ} [IsProbabilityMeasure μ] (h : MemLp id 3 μ) :
√(∫ (s : ℝ), s ^ 2 ∂μ) ^ 3 ≤ ∫ (s : ℝ), |s| ^ 3 ∂μ

Lyapunov's inequality for the second and third moments: a real random variable in L³ has (√E[z²])³ ≤ E|z|³. The proof integrates (|z| - σ)² (2 |z| + σ) ≥ 0 for σ = √E[z²].

theorem LipschitzWith.abs_integral_comp_sub_le_sqrt {Ω : Type u_1} [MeasurableSpace Ω] {P : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure P] {ψ : ℝ → ℝ} {K : NNReal} (hψ : LipschitzWith K ψ) {X Y : Ω → ℝ} (hX : MeasureTheory.MemLp X 2 P) (hY : MeasureTheory.MemLp Y 2 P) :
|∫ (ω : Ω), ψ (X ω) ∂P - ∫ (ω : Ω), ψ (Y ω) ∂P| ≤ ↑K * √(∫ (ω : Ω), (X ω - Y ω) ^ 2 ∂P)

For K-Lipschitz ψ and X, Y in L² on a probability space, |E[ψ(X)] - E[ψ(Y)]| ≤ K √E[(X - Y)²], by Cauchy–Schwarz.