Convolution #
This file defines several versions of the discrete convolution of functions.
Main declarations #
ddconv: Discrete convolution of two functionsdddconv: Discrete difference convolution of two functionsiterConv: Iterated convolution of a function
Notation #
f ∗ᵈ g: Convolutionf ○ᵈ g: Difference convolutionf ∗ᵈ^ n: Iterated convolution
Notes #
Some lemmas could technically be generalised to a non-commutative semiring domain. 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.
TODO #
Multiplicativise? Probably ugly and not very useful.
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.
theorem
indicator_one_ddconv_indicator_one_eq_sum
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[CommSemiring R]
(s t : Finset G)
(a : G)
:
theorem
indicator_one_ddconv
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[CommSemiring R]
(s : Finset G)
(f : G → R)
:
theorem
ddconv_indicator_one
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[CommSemiring R]
(f : G → R)
(s : Finset G)
:
theorem
indicator_one_ddconv_indicator_one_eq_card_vadd_inter_neg
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[CommSemiring R]
(s t : Finset G)
(a : G)
:
theorem
indicator_one_dddconv_Set.indicator_apply
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[CommSemiring R]
[StarRing R]
(s t : Finset G)
(a : G)
:
theorem
indicator_one_dddconv
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[CommSemiring R]
[StarRing R]
(s : Finset G)
(f : G → R)
:
theorem
dddconv_indicator_one
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[CommSemiring R]
[StarRing R]
(f : G → R)
(s : Finset G)
:
@[simp]
theorem
mu_univ_ddconv_mu_univ
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
:
@[simp]
theorem
mu_univ_dddconv_mu_univ
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[StarRing R]
:
theorem
expect_ddconv
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
(f g : G → R)
:
(Finset.univ.expect fun (a : G) => (f ∗ᵈ g) a) = (∑ a : G, f a) * Finset.univ.expect fun (a : G) => g a
theorem
expect_ddconv'
{G : Type u_1}
{R : Type u_2}
[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) * ∑ a : G, g a
theorem
expect_dddconv
{G : Type u_1}
{R : Type u_2}
[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) = (∑ a : G, f a) * Finset.univ.expect fun (a : G) => (starRingEnd R) (g a)
theorem
expect_dddconv'
{G : Type u_1}
{R : Type u_2}
[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) * ∑ a : G, (starRingEnd R) (g a)
@[simp]
theorem
balance_ddconv
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Field R]
[CharZero R]
(f g : G → R)
:
@[simp]
theorem
balance_dddconv
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Field R]
[CharZero R]
[StarRing R]
(f g : G → R)
:
Iterated convolution #
theorem
indicator_one_iterConv_apply
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[CommSemiring R]
(s : Finset G)
(n : ℕ)
(a : G)
:
theorem
indicator_one_iterConv_ddconv
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[CommSemiring R]
(s : Finset G)
(n : ℕ)
(f : G → R)
:
theorem
ddconv_indicator_one_iterConv
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[CommSemiring R]
(f : G → R)
(s : Finset G)
(n : ℕ)
:
theorem
indicator_one_iterConv_dddconv
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[CommSemiring R]
[StarRing R]
(s : Finset G)
(n : ℕ)
(f : G → R)
:
theorem
dddconv_indicator_one_iterConv
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[CommSemiring R]
[StarRing R]
(f : G → R)
(s : Finset G)
(n : ℕ)
:
theorem
mu_iterConv_dddconv
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Semifield R]
[CharZero R]
[StarRing R]
(s : Finset G)
(n : ℕ)
(f : G → R)
:
@[simp]
theorem
balance_iterConv
{G : Type u_1}
{R : Type u_2}
[Fintype G]
[DecidableEq G]
[AddCommGroup G]
[Field R]
[CharZero R]
(f : G → R)
{n : ℕ}
:
n ≠ 0 → Fintype.balance (f ∗ᵈ^ n) = Fintype.balance f ∗ᵈ^ n