# mathlib3documentation

data.finset.finsupp

# Finitely supported product of finsets #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

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 the t i over all i ∈ s.
• finsupp.pi: f.pi is the finset of finsupps whose i-th value lies in f i. This is the special case of finset.finsupp where we take the product of the f i over the support of f.

## 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.

@[protected]
noncomputable def finset.finsupp {ι : Type u_1} {α : Type u_2} [has_zero α] (s : finset ι) (t : ι ) :
finset →₀ α)

Finitely supported product of finsets.

Equations
theorem finset.mem_finsupp_iff {ι : Type u_1} {α : Type u_2} [has_zero α] {s : finset ι} {f : ι →₀ α} {t : ι } :
f s.finsupp t f.support s (i : ι), i s f i t i
@[simp]
theorem finset.mem_finsupp_iff_of_support_subset {ι : Type u_1} {α : Type u_2} [has_zero α] {s : finset ι} {f : ι →₀ α} {t : ι →₀ } (ht : t.support s) :
f s.finsupp t (i : ι), f i t i

When t is supported on s, f ∈ s.finsupp t precisely means that f is pointwise in t.

@[simp]
theorem finset.card_finsupp {ι : Type u_1} {α : Type u_2} [has_zero α] (s : finset ι) (t : ι ) :
(s.finsupp t).card = s.prod (λ (i : ι), (t i).card)
noncomputable def finsupp.pi {ι : Type u_1} {α : Type u_2} [has_zero α] (f : ι →₀ ) :
finset →₀ α)

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
@[simp]
theorem finsupp.mem_pi {ι : Type u_1} {α : Type u_2} [has_zero α] {f : ι →₀ } {g : ι →₀ α} :
g f.pi (i : ι), g i f i
@[simp]
theorem finsupp.card_pi {ι : Type u_1} {α : Type u_2} [has_zero α] (f : ι →₀ ) :
f.pi.card = f.prod (λ (i : ι), ((f i).card))