1 Finset
1.1 Piecewise
Let \(s, t\) be finite sets of indices in \(\iota \), and let \(f \colon \iota \to M\). Then
We split the product over the disjoint union \(s = (s \setminus t) \cup (s \cap t)\).
The first equality holds because for any \(x \in s \setminus t\), the term is \(f(x)\), while for any \(x \in s \cap t\), the term is \(1\). The product of ones is one.
Let \(s, t\) be finite sets of indices in \(\iota \), and let \(f \colon \iota \to A\) be a function to an additive commutative monoid. Then
We split the sum over the disjoint union \(s = (s \setminus t) \cup (s \cap t)\).
The first equality holds because for any \(x \in s \setminus t\), the term is \(f(x)\), while for any \(x \in s \cap t\), the term is \(0\). The sum of zeros is zero.
1.2 Off-diagonal
Let \(s\) be a finite set of indices in \(\iota \), and let \(F \colon \iota \times \iota \to M\) where \(M\) is a commutative monoid. Assume that the diagonal values are all \(1\), i.e.
Then the product of \(F\) over the Cartesian product \(s\times s\) equals the product over the off-diagonal part:
We use the decomposition of the square into diagonal and off-diagonal parts:
and these two subsets are disjoint. Hence the product over \(s\times s\) splits as
On the diagonal, we have \(F(a,a)=1\) for all \(a\in s\), so
Therefore,
which is exactly the desired equality.
Let \(s\) be a finite set of indices in \(\iota \), and let \(F \colon \iota \times \iota \to A\) where \(A\) is an additive commutative monoid. Assume that the diagonal values are all \(0\), i.e.
Then the sum of \(F\) over the Cartesian product \(s\times s\) equals the sum over the off-diagonal part:
We use the decomposition of the square into diagonal and off-diagonal parts:
and these two subsets are disjoint. Hence the sum over \(s\times s\) splits as
On the diagonal, we have \(F(a,a)=0\) for all \(a\in s\), so
Therefore,
which is exactly the desired equality.