Finitely supported product of finsets #
This file defines the finitely supported product of finsets as a Finset (ι →₀ α)
.
Main declarations #
Finset.finsupp
: Finitely supported product of finsets.s.finset t
is the product of thet i
over alli ∈ s
.Finsupp.pi
:f.pi
is the finset ofFinsupp
s whosei
-th value lies inf i
. This is the special case ofFinset.finsupp
where we take the product of thef i
over the support off
.
Implementation notes #
We make heavy use of the fact that 0 : Finset α
is {0}
. This scalar actions convention turns out
to be precisely what we want here too.
Finitely supported product of finsets.
Equations
- Finset.finsupp s t = Finset.map { toFun := Finsupp.indicator s, inj' := (_ : Function.Injective fun f => Finsupp.indicator s f) } (Finset.pi s t)
Instances For
@[simp]
theorem
Finset.card_finsupp
{ι : Type u_1}
{α : Type u_2}
[Zero α]
(s : Finset ι)
(t : ι → Finset α)
:
Finset.card (Finset.finsupp s t) = Finset.prod s fun i => Finset.card (t i)
Given a finitely supported function f : ι →₀ Finset α
, one can define the finset
f.pi
of all finitely supported functions whose value at i
is in f i
for all i
.
Equations
- Finsupp.pi f = Finset.finsupp f.support ↑f
Instances For
@[simp]
theorem
Finsupp.card_pi
{ι : Type u_1}
{α : Type u_2}
[Zero α]
(f : ι →₀ Finset α)
:
Finset.card (Finsupp.pi f) = Finsupp.prod f fun i => ↑(Finset.card (↑f i))