Convolution in the compact normalisation #
This file defines several versions of the discrete convolution of functions with the compact normalisation.
Main declarations #
cconv: Discrete convolution of two functions in the compact normalisationcdconv: Discrete difference convolution of two functions in the compact normalisationiterCconv: Iterated convolution of a function in the compact normalisation
Notation #
f ∗ₙ g: Convolutionf ○ₙ g: Difference convolutionf ∗^ₙ n: Iterated convolution
Notes #
Some lemmas could technically be generalised to a division ring. Doesn't seem very useful given that
the codomain in applications is either ℝ, ℝ≥0 or ℂ.
Similarly we could drop the commutativity assumption on the domain, but this is unneeded at this point in time.
Convolution of functions #
In this section, we define the convolution f ∗ₙ g and difference convolution f ○ₙ g of functions
f g : G → R, and show how they interact.
Trivial character #
def
trivNChar
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
:
G → R
The trivial character.
Instances For
@[simp]
theorem
trivNChar_apply
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
(a : G)
:
@[simp]
theorem
conj_trivNChar
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[StarRing R]
:
@[simp]
theorem
conjneg_trivNChar
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[StarRing R]
:
@[simp]
theorem
isSelfAdjoint_trivNChar
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[StarRing R]
:
Convolution #
Equations
- «term_∗ₙ_» = Lean.ParserDescr.trailingNode `«term_∗ₙ_» 71 71 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ∗ₙ ") (Lean.ParserDescr.cat `term 72))
Instances For
theorem
cconv_apply_eq_smul_conv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f g : G → R)
(a : G)
:
theorem
cconv_eq_smul_conv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f g : G → R)
:
@[simp]
theorem
cconv_zero
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f : G → R)
:
@[simp]
theorem
zero_cconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f : G → R)
:
theorem
smul_cconv
{G : Type u_1}
{H : Type u_2}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[DistribSMul H R]
[IsScalarTower H R R]
[SMulCommClass H R R]
(c : H)
(f g : G → R)
:
theorem
cconv_smul
{G : Type u_1}
{H : Type u_2}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[DistribSMul H R]
[SMulCommClass H R R]
(c : H)
(f g : G → R)
:
theorem
smul_cconv_assoc
{G : Type u_1}
{H : Type u_2}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[DistribSMul H R]
[IsScalarTower H R R]
[SMulCommClass H R R]
(c : H)
(f g : G → R)
:
Alias of smul_cconv.
theorem
smul_cconv_left_comm
{G : Type u_1}
{H : Type u_2}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[DistribSMul H R]
[SMulCommClass H R R]
(c : H)
(f g : G → R)
:
Alias of cconv_smul.
@[simp]
theorem
translate_cconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(a : G)
(f g : G → R)
:
@[simp]
theorem
cconv_translate
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(a : G)
(f g : G → R)
:
theorem
cconv_comm
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f g : G → R)
:
theorem
mul_smul_cconv_comm
{G : Type u_1}
{H : Type u_2}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[Monoid H]
[DistribMulAction H R]
[IsScalarTower H R R]
[SMulCommClass H R R]
(c d : H)
(f g : G → R)
:
theorem
cconv_assoc
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f g h : G → R)
:
theorem
cconv_right_comm
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f g h : G → R)
:
theorem
cconv_left_comm
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f g h : G → R)
:
theorem
cconv_eq_expect_sub
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f g : G → R)
(a : G)
:
theorem
cconv_eq_expect_add
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f g : G → R)
(a : G)
:
theorem
cconv_eq_expect_sub'
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f g : G → R)
(a : G)
:
theorem
cconv_eq_expect_add'
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f g : G → R)
(a : G)
:
theorem
cconv_apply_add
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f g : G → R)
(a b : G)
:
theorem
expect_cconv_mul
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f g h : G → R)
:
(Finset.univ.expect fun (a : G) => (f ∗ₙ g) a * h a) = Finset.univ.expect fun (a : G) => Finset.univ.expect fun (b : G) => f a * g b * h (a + b)
theorem
expect_cconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f g : G → R)
:
(Finset.univ.expect fun (a : G) => (f ∗ₙ g) a) = (Finset.univ.expect fun (a : G) => f a) * Finset.univ.expect fun (a : G) => g a
@[simp]
theorem
cconv_const
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f : G → R)
(b : R)
:
@[simp]
theorem
const_cconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(b : R)
(f : G → R)
:
@[simp]
theorem
cconv_trivNChar
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f : G → R)
:
@[simp]
theorem
trivNChar_cconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f : G → R)
:
theorem
support_cconv_subset
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f g : G → R)
:
Equations
- «term_○ₙ_» = Lean.ParserDescr.trailingNode `«term_○ₙ_» 71 71 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ○ₙ ") (Lean.ParserDescr.cat `term 72))
Instances For
theorem
cdconv_apply
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f g : G → R)
(a : G)
:
theorem
cdconv_apply_eq_smul_dconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f g : G → R)
(a : G)
:
theorem
cdconv_eq_smul_dconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f g : G → R)
:
@[simp]
theorem
cconv_conjneg
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f g : G → R)
:
@[simp]
theorem
cdconv_conjneg
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f g : G → R)
:
@[simp]
theorem
translate_cdconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(a : G)
(f g : G → R)
:
@[simp]
theorem
conj_cconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f g : G → R)
:
@[simp]
theorem
conj_cdconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f g : G → R)
:
theorem
IsSelfAdjoint.cconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
{f g : G → R}
[StarRing R]
(hf : IsSelfAdjoint f)
(hg : IsSelfAdjoint g)
:
IsSelfAdjoint (f ∗ₙ g)
theorem
IsSelfAdjoint.cdconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
{f g : G → R}
[StarRing R]
(hf : IsSelfAdjoint f)
(hg : IsSelfAdjoint g)
:
IsSelfAdjoint (f ○ₙ g)
@[simp]
theorem
conjneg_cdconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f g : G → R)
:
@[simp]
theorem
cdconv_zero
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f : G → R)
:
@[simp]
theorem
zero_cdconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f : G → R)
:
theorem
smul_cdconv
{G : Type u_1}
{H : Type u_2}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
[DistribSMul H R]
[IsScalarTower H R R]
[SMulCommClass H R R]
(c : H)
(f g : G → R)
:
theorem
cdconv_smul
{G : Type u_1}
{H : Type u_2}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
[Star H]
[DistribSMul H R]
[SMulCommClass H R R]
[StarModule H R]
(c : H)
(f g : G → R)
:
theorem
smul_cdconv_assoc
{G : Type u_1}
{H : Type u_2}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
[DistribSMul H R]
[IsScalarTower H R R]
[SMulCommClass H R R]
(c : H)
(f g : G → R)
:
Alias of smul_cdconv.
theorem
smul_cdconv_left_comm
{G : Type u_1}
{H : Type u_2}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
[Star H]
[DistribSMul H R]
[SMulCommClass H R R]
[StarModule H R]
(c : H)
(f g : G → R)
:
Alias of cdconv_smul.
theorem
cdconv_eq_expect_add
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f g : G → R)
(a : G)
:
theorem
cdconv_eq_expect_sub
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f g : G → R)
(a : G)
:
theorem
cdconv_apply_neg
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f g : G → R)
(a : G)
:
theorem
cdconv_apply_sub
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f g : G → R)
(a b : G)
:
theorem
expect_cdconv_mul
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f g h : G → R)
:
(Finset.univ.expect fun (a : G) => (f ○ₙ g) a * h a) = Finset.univ.expect fun (a : G) => Finset.univ.expect fun (b : G) => f a * (starRingEnd R) (g b) * h (a - b)
theorem
expect_cdconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f g : G → R)
:
(Finset.univ.expect fun (a : G) => (f ○ₙ g) a) = (Finset.univ.expect fun (a : G) => f a) * Finset.univ.expect fun (a : G) => (starRingEnd R) (g a)
@[simp]
theorem
cdconv_const
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f : G → R)
(b : R)
:
f ○ₙ Function.const G b = Function.const G ((Finset.univ.expect fun (x : G) => f x) * (starRingEnd R) b)
@[simp]
theorem
const_cdconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(b : R)
(f : G → R)
:
Function.const G b ○ₙ f = Function.const G (b * Finset.univ.expect fun (x : G) => (starRingEnd R) (f x))
@[simp]
theorem
cdconv_trivNChar
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f : G → R)
:
@[simp]
theorem
trivNChar_cdconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f : G → R)
:
theorem
support_cdconv_subset
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f g : G → R)
:
@[simp]
theorem
cdconv_neg
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Field R]
[CharZero R]
[StarRing R]
(f g : G → R)
:
@[simp]
theorem
neg_cdconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Field R]
[CharZero R]
[StarRing R]
(f g : G → R)
:
@[simp]
theorem
indicate_univ_cconv_indicate_univ
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
:
@[simp]
theorem
indicate_univ_cdconv_mu_univ
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
:
@[simp]
theorem
balance_cconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Field R]
[CharZero R]
(f g : G → R)
:
@[simp]
theorem
balance_cdconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Field R]
[CharZero R]
[StarRing R]
(f g : G → R)
:
@[simp]
theorem
Complex.coe_cconv
{G : Type u_1}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
(f g : G → ℝ)
(a : G)
:
@[simp]
theorem
Complex.coe_cdconv
{G : Type u_1}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
(f g : G → ℝ)
(a : G)
:
@[simp]
theorem
NNReal.coe_cconv
{G : Type u_1}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
(f g : G → NNReal)
(a : G)
:
@[simp]
theorem
NNReal.coe_cdconv
{G : Type u_1}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
(f g : G → NNReal)
(a : G)
:
Iterated convolution #
Equations
- «term_∗^ₙ_» = Lean.ParserDescr.trailingNode `«term_∗^ₙ_» 78 78 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ∗^ₙ ") (Lean.ParserDescr.cat `term 79))
Instances For
@[simp]
theorem
iterCconv_zero
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f : G → R)
:
@[simp]
theorem
iterCconv_one
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f : G → R)
:
theorem
iterCconv_succ
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f : G → R)
(n : ℕ)
:
theorem
iterCconv_succ'
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f : G → R)
(n : ℕ)
:
theorem
iterCconv_mul
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f : G → R)
(m n : ℕ)
:
theorem
iterCconv_mul'
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f : G → R)
(m n : ℕ)
:
@[simp]
theorem
zero_iterCconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
{n : ℕ}
:
@[simp]
theorem
smul_iterCconv
{G : Type u_1}
{H : Type u_2}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[Monoid H]
[DistribMulAction H R]
[IsScalarTower H R R]
[SMulCommClass H R R]
(c : H)
(f : G → R)
(n : ℕ)
:
theorem
expect_iterCconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f : G → R)
(n : ℕ)
:
@[simp]
theorem
iterCconv_trivNChar
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(n : ℕ)
:
theorem
support_iterCconv_subset
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f : G → R)
(n : ℕ)
:
@[simp]
theorem
conj_iterCconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(f : G → R)
(n : ℕ)
:
@[simp]
theorem
balance_iterCconv
{G : Type u_1}
{R : Type u_3}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Field R]
[CharZero R]
(f : G → R)
{n : ℕ}
:
n ≠ 0 → Fintype.balance (f ∗^ₙ n) = Fintype.balance f ∗^ₙ n
@[simp]
theorem
NNReal.coe_iterCconv
{G : Type u_1}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
(f : G → NNReal)
(n : ℕ)
(a : G)
: