Documentation

CslibFrontier.Foundations.Analysis.LpNorm

L^p norms on finite types #

The L^p norm of a real function f on a finite type α, for the uniform distribution, is ‖f‖_p = (𝔼_x |f x| ^ p) ^ (1 / p) (Cslib.lpNorm) O'Donnell, Section 1.3. Its p-th power is the p-th absolute moment (Cslib.lpNorm_rpow), ‖f‖_2 is the square root of the second moment (Cslib.lpNorm_two), and ‖f‖_1 is the mean absolute value (Cslib.lpNorm_one). The norm of the indicator of a set is its measure to the power 1 / p (Cslib.lpNorm_indicator_one), and the L^{1/2} norm of f ^ 2 is the square of the mean absolute value of f (Cslib.lpNorm_half_sq). See CslibFrontier.Foundations.Analysis.LpNormMeasure for its agreement with Mathlib's MeasureTheory.lpNorm.

The norm is invariant under equivalences (Cslib.lpNorm_equiv), on a product α × β it is the iterated norm (Cslib.lpNorm_prod), and on a subsingleton type it is the absolute value (Cslib.lpNorm_subsingleton). It is absolutely homogeneous (Cslib.lpNorm_const_mul), and it increases with p (Cslib.lpNorm_le_lpNorm_of_exponent_le) O'Donnell, Exercise 1.13.

Main definitions #

Main results #

References #

noncomputable def Cslib.lpNorm {α : Type u_1} [Fintype α] (p : ℝ) (f : α → ℝ) :

The L^p norm ‖f‖_p = (𝔼_x |f x| ^ p) ^ (1 / p) of a real function on a finite type, for the uniform distribution.

theorem Cslib.expect_abs_rpow_nonneg {α : Type u_1} [Fintype α] (p : ℝ) (f : α → ℝ) :
0 ≤ Finset.univ.expect fun (x : α) => |f x| ^ p

The p-th absolute moment is nonnegative.

theorem Cslib.lpNorm_nonneg {α : Type u_1} [Fintype α] (p : ℝ) (f : α → ℝ) :
0 ≤ lpNorm p f

The L^p norm is nonnegative.

theorem Cslib.lpNorm_rpow {α : Type u_1} [Fintype α] {p : ℝ} (hp : p ≠ 0) (f : α → ℝ) :
lpNorm p f ^ p = Finset.univ.expect fun (x : α) => |f x| ^ p

The p-th power of ‖f‖_p is the p-th absolute moment.

theorem Cslib.lpNorm_of_nonneg {α : Type u_1} [Fintype α] (p : ℝ) {f : α → ℝ} (hf : ∀ (x : α), 0 ≤ f x) :
lpNorm p f = (Finset.univ.expect fun (x : α) => f x ^ p) ^ p⁻¹

For a nonnegative function, ‖f‖_p = (𝔼_x f x ^ p) ^ (1 / p) without absolute values; for a positive function and p < 0 this is O'Donnell's negative-exponent "norm" O'Donnell, Exercise 10.6, whose display on printed p. 314 of the arXiv edition prints the outer exponent as -1 / p; 1 / p is the intended reading, under which a positive constant is its own norm. For p < 0 and a function with zeros the two differ: 0 ^ p is 0 here, so the indicator of half of a two-point type has lpNorm (-1) equal to 2, while the book's norm, extended by limits, is 0.

theorem Cslib.lpNorm_pos {α : Type u_1} [Fintype α] [Nonempty α] (p : ℝ) {f : α → ℝ} (hf : ∀ (x : α), 0 < f x) :
0 < lpNorm p f

The L^p norm of a positive function on a nonempty type is positive, for every p.

theorem Cslib.lpNorm_two {α : Type u_1} [Fintype α] (f : α → ℝ) :
lpNorm 2 f = √(Finset.univ.expect fun (x : α) => f x ^ 2)

‖f‖_2 is the root mean square of f.

theorem Cslib.lpNorm_two_sq {α : Type u_1} [Fintype α] (f : α → ℝ) :
lpNorm 2 f ^ 2 = Finset.univ.expect fun (x : α) => f x ^ 2

The square of ‖f‖_2 is the second moment of f.

theorem Cslib.lpNorm_one {α : Type u_1} [Fintype α] (f : α → ℝ) :
lpNorm 1 f = Finset.univ.expect fun (x : α) => |f x|

‖f‖_1 is the mean absolute value of f.

theorem Cslib.lpNorm_indicator_one {α : Type u_1} [Fintype α] {p : ℝ} (hp : p ≠ 0) (A : Set α) :
lpNorm p (A.indicator 1) = (Finset.univ.expect fun (x : α) => A.indicator 1 x) ^ p⁻¹

For p ≠ 0, the L^p norm of the indicator of a set is its measure to the power 1 / p.

theorem Cslib.lpNorm_half_sq {α : Type u_1} [Fintype α] (f : α → ℝ) :
(lpNorm (1 / 2) fun (x : α) => f x ^ 2) = (Finset.univ.expect fun (x : α) => |f x|) ^ 2

The L^{1/2} norm of f ^ 2 is the square of the mean absolute value of f.

Equivalences, products, and subsingletons #

theorem Cslib.lpNorm_equiv {α : Type u_1} {β : Type u_2} [Fintype α] [Fintype β] (e : α ≃ β) (p : ℝ) (f : β → ℝ) :
lpNorm p (f ∘ ⇑e) = lpNorm p f

An equivalence of finite domains preserves the L^p norm.

theorem Cslib.lpNorm_prod {α : Type u_1} {β : Type u_2} [Fintype α] [Fintype β] (p : ℝ) (f : α × β → ℝ) :
lpNorm p f = lpNorm p fun (a : α) => lpNorm p fun (b : β) => f (a, b)

The L^p norm on a product is the iterated norm: the norm over α of the norms over β.

theorem Cslib.lpNorm_subsingleton {α : Type u_1} [Fintype α] [Subsingleton α] {p : ℝ} (hp : p ≠ 0) (f : α → ℝ) (x : α) :
lpNorm p f = |f x|

On a type with at most one element, the L^p norm at a point is the absolute value.

theorem Cslib.lpNorm_const_mul {α : Type u_1} [Fintype α] {p : ℝ} (hp : p ≠ 0) (c : ℝ) (f : α → ℝ) :
(lpNorm p fun (x : α) => c * f x) = |c| * lpNorm p f

L^p norms are absolutely homogeneous: ‖c f‖_p = |c| ‖f‖_p for p ≠ 0.

Monotonicity in the exponent #

theorem Cslib.lpNorm_le_lpNorm_of_exponent_le {α : Type u_1} [Fintype α] {p q : ℝ} (hp : 0 < p) (hpq : p ≤ q) (f : α → ℝ) :
lpNorm p f ≤ lpNorm q f

L^p norms increase with p O'Donnell, Exercise 1.13: for the uniform distribution on a finite type, ‖f‖_p ≤ ‖f‖_q whenever 0 < p ≤ q, by the power mean inequality. This is the finite uniform case of Mathlib's MeasureTheory.eLpNorm_le_eLpNorm_of_exponent_le for probability measures.