L2 inner product of finite sequences #
This file defines the weighted L2 inner product of functions f g : ι → R
where ι
is a fintype as
∑ i, conj (f i) * g i
. This convention (conjugation on the left) matches the inner product coming
from RCLike.innerProductSpace
.
TODO #
- Build a non-instance
InnerProductSpace
fromwInner
. cWeight
is a poor name. Can we find better? It doesn't hugely matter for typing, since it's hidden behind the⟪f, g⟫ₙ_[𝕝]
notation, but it does show up in lemma names⟪f, g⟫_[𝕝, cWeight]
is calledwInner_cWeight
. Maybe we should introduce some naming convention, similarly toMeasureTheory.average
?
def
RCLike.wInner
{ι : Type u_1}
{𝕜 : Type u_3}
{E : ι → Type u_4}
[Fintype ι]
[RCLike 𝕜]
[(i : ι) → SeminormedAddCommGroup (E i)]
[(i : ι) → InnerProductSpace 𝕜 (E i)]
(w : ι → ℝ)
(f g : (i : ι) → E i)
:
𝕜
Weighted inner product giving rise to the L2 norm.
Equations
- RCLike.wInner w f g = ∑ i : ι, w i • inner (f i) (g i)
Instances For
@[reducible, inline]
The weight function making wInner
into the compact inner product.
Equations
- RCLike.cWeight = Function.const ι (↑(Fintype.card ι))⁻¹
Instances For
Weighted inner product giving rise to the L2 norm.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Discrete inner product giving rise to the discrete L2 norm.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Compact inner product giving rise to the compact L2 norm.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
RCLike.wInner_cWeight_eq_smul_wInner_one
{ι : Type u_1}
{𝕜 : Type u_3}
{E : ι → Type u_4}
[Fintype ι]
[RCLike 𝕜]
[(i : ι) → SeminormedAddCommGroup (E i)]
[(i : ι) → InnerProductSpace 𝕜 (E i)]
(f g : (i : ι) → E i)
:
@[simp]
theorem
RCLike.conj_wInner_symm
{ι : Type u_1}
{𝕜 : Type u_3}
{E : ι → Type u_4}
[Fintype ι]
[RCLike 𝕜]
[(i : ι) → SeminormedAddCommGroup (E i)]
[(i : ι) → InnerProductSpace 𝕜 (E i)]
(w : ι → ℝ)
(f g : (i : ι) → E i)
:
(starRingEnd 𝕜) (wInner w f g) = wInner w g f
@[simp]
theorem
RCLike.wInner_zero_left
{ι : Type u_1}
{𝕜 : Type u_3}
{E : ι → Type u_4}
[Fintype ι]
[RCLike 𝕜]
[(i : ι) → SeminormedAddCommGroup (E i)]
[(i : ι) → InnerProductSpace 𝕜 (E i)]
(w : ι → ℝ)
(g : (i : ι) → E i)
:
@[simp]
theorem
RCLike.wInner_zero_right
{ι : Type u_1}
{𝕜 : Type u_3}
{E : ι → Type u_4}
[Fintype ι]
[RCLike 𝕜]
[(i : ι) → SeminormedAddCommGroup (E i)]
[(i : ι) → InnerProductSpace 𝕜 (E i)]
(w : ι → ℝ)
(f : (i : ι) → E i)
:
@[simp]
theorem
RCLike.wInner_neg_left
{ι : Type u_1}
{𝕜 : Type u_3}
{E : ι → Type u_4}
[Fintype ι]
[RCLike 𝕜]
[(i : ι) → SeminormedAddCommGroup (E i)]
[(i : ι) → InnerProductSpace 𝕜 (E i)]
(w : ι → ℝ)
(f g : (i : ι) → E i)
:
@[simp]
theorem
RCLike.wInner_neg_right
{ι : Type u_1}
{𝕜 : Type u_3}
{E : ι → Type u_4}
[Fintype ι]
[RCLike 𝕜]
[(i : ι) → SeminormedAddCommGroup (E i)]
[(i : ι) → InnerProductSpace 𝕜 (E i)]
(w : ι → ℝ)
(f g : (i : ι) → E i)
:
@[simp]
theorem
RCLike.wInner_of_isEmpty
{ι : Type u_1}
{𝕜 : Type u_3}
{E : ι → Type u_4}
[Fintype ι]
[RCLike 𝕜]
[(i : ι) → SeminormedAddCommGroup (E i)]
[(i : ι) → InnerProductSpace 𝕜 (E i)]
[IsEmpty ι]
(w : ι → ℝ)
(f g : (i : ι) → E i)
:
theorem
RCLike.wInner_smul_left
{ι : Type u_1}
{𝕜 : Type u_3}
{E : ι → Type u_4}
[Fintype ι]
[RCLike 𝕜]
[(i : ι) → SeminormedAddCommGroup (E i)]
[(i : ι) → InnerProductSpace 𝕜 (E i)]
{𝕝 : Type u_5}
[CommSemiring 𝕝]
[StarRing 𝕝]
[Algebra 𝕝 𝕜]
[StarModule 𝕝 𝕜]
[SMulCommClass ℝ 𝕝 𝕜]
[(i : ι) → Module 𝕝 (E i)]
[∀ (i : ι), IsScalarTower 𝕝 𝕜 (E i)]
(c : 𝕝)
(w : ι → ℝ)
(f g : (i : ι) → E i)
:
theorem
RCLike.wInner_smul_right
{ι : Type u_1}
{𝕜 : Type u_3}
{E : ι → Type u_4}
[Fintype ι]
[RCLike 𝕜]
[(i : ι) → SeminormedAddCommGroup (E i)]
[(i : ι) → InnerProductSpace 𝕜 (E i)]
{𝕝 : Type u_5}
[CommSemiring 𝕝]
[StarRing 𝕝]
[Algebra 𝕝 𝕜]
[StarModule 𝕝 𝕜]
[SMulCommClass ℝ 𝕝 𝕜]
[(i : ι) → Module 𝕝 (E i)]
[∀ (i : ι), IsScalarTower 𝕝 𝕜 (E i)]
(c : 𝕝)
(w : ι → ℝ)
(f g : (i : ι) → E i)
:
theorem
RCLike.wInner_one_eq_sum
{ι : Type u_1}
{𝕜 : Type u_3}
{E : ι → Type u_4}
[Fintype ι]
[RCLike 𝕜]
[(i : ι) → SeminormedAddCommGroup (E i)]
[(i : ι) → InnerProductSpace 𝕜 (E i)]
(f g : (i : ι) → E i)
:
theorem
RCLike.wInner_cWeight_eq_expect
{ι : Type u_1}
{𝕜 : Type u_3}
{E : ι → Type u_4}
[Fintype ι]
[RCLike 𝕜]
[(i : ι) → SeminormedAddCommGroup (E i)]
[(i : ι) → InnerProductSpace 𝕜 (E i)]
(f g : (i : ι) → E i)
:
wInner cWeight f g = Finset.univ.expect fun (i : ι) => inner (f i) (g i)
theorem
RCLike.wInner_const_left
{ι : Type u_1}
{𝕜 : Type u_3}
[Fintype ι]
[RCLike 𝕜]
{w : ι → ℝ}
(a : 𝕜)
(f : ι → 𝕜)
:
wInner w (Function.const ι a) f = (starRingEnd 𝕜) a * ∑ i : ι, w i • f i
theorem
RCLike.wInner_const_right
{ι : Type u_1}
{𝕜 : Type u_3}
[Fintype ι]
[RCLike 𝕜]
{w : ι → ℝ}
(f : ι → 𝕜)
(a : 𝕜)
:
wInner w f (Function.const ι a) = (∑ i : ι, w i • (starRingEnd 𝕜) (f i)) * a
@[simp]
theorem
RCLike.wInner_one_const_left
{ι : Type u_1}
{𝕜 : Type u_3}
[Fintype ι]
[RCLike 𝕜]
(a : 𝕜)
(f : ι → 𝕜)
:
wInner 1 (Function.const ι a) f = (starRingEnd 𝕜) a * ∑ i : ι, f i
@[simp]
theorem
RCLike.wInner_one_const_right
{ι : Type u_1}
{𝕜 : Type u_3}
[Fintype ι]
[RCLike 𝕜]
(f : ι → 𝕜)
(a : 𝕜)
:
wInner 1 f (Function.const ι a) = (∑ i : ι, (starRingEnd 𝕜) (f i)) * a
@[simp]
theorem
RCLike.wInner_cWeight_const_left
{ι : Type u_1}
{𝕜 : Type u_3}
[Fintype ι]
[RCLike 𝕜]
(a : 𝕜)
(f : ι → 𝕜)
:
wInner cWeight (Function.const ι a) f = (starRingEnd 𝕜) a * Finset.univ.expect fun (i : ι) => f i
@[simp]
theorem
RCLike.wInner_cWeight_const_right
{ι : Type u_1}
{𝕜 : Type u_3}
[Fintype ι]
[RCLike 𝕜]
(f : ι → 𝕜)
(a : 𝕜)
:
wInner cWeight f (Function.const ι a) = (Finset.univ.expect fun (i : ι) => (starRingEnd 𝕜) (f i)) * a
theorem
RCLike.wInner_one_eq_inner
{ι : Type u_1}
{𝕜 : Type u_3}
[Fintype ι]
[RCLike 𝕜]
(f g : ι → 𝕜)
:
wInner 1 f g = inner ((WithLp.equiv 2 (ι → 𝕜)).symm f) ((WithLp.equiv 2 (ι → 𝕜)).symm g)
theorem
RCLike.inner_eq_wInner_one
{ι : Type u_1}
{𝕜 : Type u_3}
[Fintype ι]
[RCLike 𝕜]
(f g : PiLp 2 fun (_i : ι) => 𝕜)
:
inner f g = wInner 1 ((WithLp.equiv 2 (ι → 𝕜)) f) ((WithLp.equiv 2 (ι → 𝕜)) g)