Formalization Blueprint for “An Introduction to Algebraic Combinatorics” by Darij Grinberg

1.13 Product rules (generalized distributive laws)

Proposition 1.375

Let \(L\) be a commutative ring. For every \(n\in \mathbb {N}\), let \(\left[ n\right] \) denote the set \(\left\{ 1,2,\ldots ,n\right\} \).

Let \(n\in \mathbb {N}\). For every \(i\in \left[ n\right] \), let \(p_{i,1},p_{i,2},\ldots ,p_{i,m_{i}}\) be finitely many elements of \(L\). Then,

\begin{equation} \prod _{i=1}^{n}\ \ \sum _{k=1}^{m_{i}}p_{i,k}=\sum _{\left( k_{1},k_{2},\ldots ,k_{n}\right) \in \left[ m_{1}\right] \times \left[ m_{2}\right] \times \cdots \times \left[ m_{n}\right] }\ \ \prod _{i=1}^{n}p_{i,k_{i}}. \label{eq.lem.fps.prodrule-fin-fin.eq}\end{equation}
58

theorem prod_sum_eq_sum_prod_finset {L : Type u_2} [CommSemiring L] {n : } {m : Fin n} (p : (i : Fin n) → Fin (m i)L) :
i : Fin n, k : Fin (m i), p i k = f : (i : Fin n) → Fin (m i), i : Fin n, p i (f i)
Proof

The idea is to reduce it to the case \(n=2\) by induction, then to use the discrete Fubini rule.

Proposition 1.376

For every \(n\in \mathbb {N}\), let \(\left[ n\right] \) denote the set \(\left\{ 1,2,\ldots ,n\right\} \).

Let \(n\in \mathbb {N}\). For every \(i\in \left[ n\right] \), let \(\left( p_{i,k}\right) _{k\in S_{i}}\) be a summable family of elements of \(K\left[ \left[ x\right] \right] \). Then,

\begin{equation} \prod _{i=1}^{n}\ \ \sum _{k\in S_{i}}p_{i,k}=\sum _{\left( k_{1},k_{2},\ldots ,k_{n}\right) \in S_{1}\times S_{2}\times \cdots \times S_{n}}\ \ \prod _{i=1}^{n}p_{i,k_{i}}. \label{eq.lem.fps.prodrule-fin-inf.eq}\end{equation}
59

In particular, the family \(\left( \prod _{i=1}^{n}p_{i,k_{i}}\right) _{\left( k_{1},k_{2},\ldots ,k_{n}\right) \in S_{1}\times S_{2}\times \cdots \times S_{n}}\) is summable.

theorem prod_tsum_eq_tsum_prod_finset {K : Type u_1} [CommRing K] [TopologicalSpace K] [IsTopologicalRing K] [T2Space K] [DiscreteTopology K] {n : } {S : Fin nType u_2} (p : (i : Fin n) → S iPowerSeries K) (hp : ∀ (i : Fin n), Summable (p i)) :
i : Fin n, ∑' (k : S i), p i k = ∑' (f : (i : Fin n) → S i), i : Fin n, p i (f i)
Proof

Same method as for Proposition 1.375, but now using the discrete Fubini rule for infinite sums. The proof is by induction on \(n\):

  • Base case (\(n=0\)): Both sides equal \(1\).

  • Inductive step: Split the product into the first \(n\) factors and the last factor, apply the induction hypothesis on the first \(n\), then apply the Cauchy product formula for infinite sums.

Summability of the product family is established by showing that for each coefficient \(d\), only finitely many functions \(f\) give a nonzero contribution (using finite support of each summable family in the discrete topology).

Helpers for the finite product rule

Lemma 1.377

Let \(n\in \mathbb {N}\). Let \(\left(p_{i,k}\right)\) be a family indexed by \(\{ 1,2,\ldots ,n\} \times S_i\), and let \(f\) be a choice function selecting \(f(i) \in S_i\) for each \(i\). If for some \(j\in \{ 1,2,\ldots ,n\} \), the FPS \(p_{j,f(j)}\) satisfies \([x^m](p_{j,f(j)}) = 0\) for all \(m\le d\), then \([x^d]\left(\prod _{i} p_{i,f(i)}\right) = 0\).

theorem coeff_finProd_eq_zero_of_factor_high_order {K : Type u_1} [CommRing K] {n : } {S : Fin nType u_2} (p : (i : Fin n) → S iPowerSeries K) (f : (i : Fin n) → S i) (i : Fin n) (d : ) (h : md, (PowerSeries.coeff m) (p i (f i)) = 0) :
(PowerSeries.coeff d) (∏ j : Fin n, p j (f j)) = 0
Proof

The product \(\prod _i p_{i,f(i)}\) is divisible by \(p_{j,f(j)}\), which has order \({\gt} d\). Since the order of a product is at least the sum of the orders of the factors, the product also has order \({\gt} d\).

Lemma 1.378

(Summability of product families.) Assume \(K\) has the discrete topology. Let \(n\in \mathbb {N}\), and for each \(i\in \{ 1,2,\ldots ,n\} \), let \(\left(p_{i,k}\right)_{k\in S_i}\) be a summable family in \(K[[x]]\). Then the family \(\left(\prod _i p_{i,f(i)}\right)_{f\in \prod _i S_i}\) is summable.

theorem summable_finProd_discrete {K : Type u_1} [CommRing K] [TopologicalSpace K] [DiscreteTopology K] {n : } {S : Fin nType u_2} (p : (i : Fin n) → S iPowerSeries K) (hp : ∀ (i : Fin n), Summable (p i)) :
Summable fun (f : (i : Fin n) → S i) => i : Fin n, p i (f i)
Proof

For each coefficient \(d\), define \(T_i = \bigcup _{m\le d} \mathrm{supp}([x^m]\circ p_i)\). Each \(T_i\) is finite (by discrete summability). If \(f(i)\notin T_i\) for some \(i\), then \([x^d](\prod _j p_{j,f(j)}) = 0\) by Lemma 1.377. The set \(\{ f \mid \forall i,\, f(i)\in T_i\} \) is finite (product of finite sets), so the support at coefficient \(d\) is finite.

Lemma 1.379

(Product of two summable families.) Assume \(K\) has the discrete topology. If \((f_\alpha )_{\alpha \in A}\) and \((g_\beta )_{\beta \in B}\) are summable families in \(K[[x]]\), then the family \((f_\alpha \cdot g_\beta )_{(\alpha ,\beta )\in A\times B}\) is summable.

theorem summable_prod_of_summable_discrete {K : Type u_1} [CommRing K] [TopologicalSpace K] [DiscreteTopology K] {α : Type u_2} {β : Type u_3} (f : αPowerSeries K) (g : βPowerSeries K) (hf : Summable f) (hg : Summable g) :
Summable fun (p : α × β) => f p.1 * g p.2
Proof

For each coefficient \(d\), the support of \((\alpha ,\beta )\mapsto [x^d](f_\alpha g_\beta )\) is contained in the finite product of coefficient supports, using the Cauchy product formula and the finiteness of supports.

Definition 1.380
#

(a) A sequence \(\left( k_{1},k_{2},k_{3},\ldots \right) \) is said to be essentially finite if all but finitely many \(i\in \left\{ 1,2,3,\ldots \right\} \) satisfy \(k_{i}=0\).

(b) A family \(\left( k_{i}\right) _{i\in I}\) is said to be essentially finite if all but finitely many \(i\in I\) satisfy \(k_{i}=0\).

def EssentiallyFinite {I : Type u_2} {M : Type u_3} [Zero M] (f : IM) :
Proposition 1.381

Let \(S_{1},S_{2},S_{3},\ldots \) be infinitely many sets that all contain the number \(0\). Set

\[ \overline{S}=\left\{ \left( i,k\right) \ \mid \ i\in \left\{ 1,2,3,\ldots \right\} \text{ and }k\in S_{i}\text{ and }k\neq 0\right\} . \]

For any \(i\in \left\{ 1,2,3,\ldots \right\} \) and any \(k\in S_{i}\), let \(p_{i,k}\) be an element of \(K\left[ \left[ x\right] \right] \). Assume that

\begin{equation} p_{i,0}=1\ \ \ \ \ \ \ \ \ \ \text{for any }i\in \left\{ 1,2,3,\ldots \right\} . \label{eq.prop.fps.prodrule-inf-infN.pi0=1}\end{equation}
60

Assume further that the family \(\left( p_{i,k}\right) _{\left( i,k\right) \in \overline{S}}\) is summable. Then, the product \(\prod _{i=1}^{\infty }\ \ \sum _{k\in S_{i}}p_{i,k}\) is well-defined (i.e., the family \(\left( p_{i,k}\right) _{k\in S_{i}}\) is summable for each \(i\in \left\{ 1,2,3,\ldots \right\} \), and the family \(\left( \sum _{k\in S_{i}}p_{i,k}\right) _{i\in \left\{ 1,2,3,\ldots \right\} }\) is multipliable), and we have

\begin{equation} \prod _{i=1}^{\infty }\ \ \sum _{k\in S_{i}}p_{i,k}=\sum _{\substack{[\left , (, , k, _, {, 1, }, ,, k, _, {, 2, }, ,, k, _, {, 3, }, ,, \ldots , \right , ), , \in , S, _, {, 1, }, \times , S, _, {, 2, }, \times , S, _, {, 3, }, \times , \cdots , \\ , \text , {, i, s, , e, s, s, e, n, t, i, a, l, l, y, , f, i, n, i, t, e, }]}}\ \ \prod _{i=1}^{\infty }p_{i,k_{i}}. \label{eq.prop.fps.prodrule-inf-infN.eq}\end{equation}
61

In particular, the family \(\left( \prod _{i=1}^{\infty }p_{i,k_{i}}\right) _{\left( k_{1},k_{2},k_{3},\ldots \right) \in S_{1}\times S_{2}\times S_{3}\times \cdots \text{ is essentially finite}}\) is summable.

theorem tprod_tsum_eq_tsum_prod_essentiallyFinite_nat {K : Type u_1} [CommRing K] [TopologicalSpace K] [IsTopologicalRing K] [T2Space K] [DiscreteTopology K] {S : ℕ+Type u_2} [(i : ℕ+) → Zero (S i)] [(i : ℕ+) → DecidableEq (S i)] (p : (i : ℕ+) → S iPowerSeries K) (hp_zero : ∀ (i : ℕ+), p i 0 = 1) (hp_summable : Summable fun (ik : SBar S) => p ik.fst ik.snd) :
∏' (i : ℕ+), ∑' (k : S i), p i k = ∑' (f : { f : (i : ℕ+) → S i // ∀ᶠ (i : ℕ+) in Filter.cofinite, f i = 0 }), ∏' (i : ℕ+), p i (f i)
Proof

This is the particular case of Proposition 1.382 for \(I=\left\{ 1,2,3,\ldots \right\} \).

Proposition 1.382

Let \(I\) be a set. For any \(i\in I\), let \(S_{i}\) be a set that contains the number \(0\). Set

\[ \overline{S}=\left\{ \left( i,k\right) \ \mid \ i\in I\text{ and }k\in S_{i}\text{ and }k\neq 0\right\} . \]

For any \(i\in I\) and any \(k\in S_{i}\), let \(p_{i,k}\) be an element of \(K\left[ \left[ x\right] \right] \). Assume that

\begin{equation} p_{i,0}=1\ \ \ \ \ \ \ \ \ \ \text{for any }i\in I. \label{eq.prop.fps.prodrule-inf-inf.pi0=1}\end{equation}
62

Assume further that the family \(\left( p_{i,k}\right) _{\left( i,k\right) \in \overline{S}}\) is summable. Then, the product \(\prod _{i\in I}\ \ \sum _{k\in S_{i}}p_{i,k}\) is well-defined (i.e., the family \(\left( p_{i,k}\right) _{k\in S_{i}}\) is summable for each \(i\in I\), and the family \(\left( \sum _{k\in S_{i}}p_{i,k}\right) _{i\in I}\) is multipliable), and we have

\begin{equation} \prod _{i\in I}\ \ \sum _{k\in S_{i}}p_{i,k}=\sum _{\substack{[\left , (, , k, _, {, i, }, \right , ), , _, {, i, \in , I, }, \in , \prod , _, {, i, \in , I, }, S, _, {, i, }, \\ , \text , {, i, s, , e, s, s, e, n, t, i, a, l, l, y, , f, i, n, i, t, e, }]}}\ \ \prod _{i\in I}p_{i,k_{i}}. \label{eq.prop.fps.prodrule-inf-inf.eq}\end{equation}
63

In particular, the family \(\left( \prod _{i\in I}p_{i,k_{i}}\right) _{\left( k_{i}\right) _{i\in I}\in \prod _{i\in I}S_{i}\text{ is essentially finite}}\) is summable.

theorem tprod_tsum_eq_tsum_prod_essentiallyFinite {K : Type u_1} [CommRing K] [TopologicalSpace K] [IsTopologicalRing K] [T2Space K] [DiscreteTopology K] {I : Type u_2} {S : IType u_3} [(i : I) → Zero (S i)] [(i : I) → DecidableEq (S i)] (p : (i : I) → S iPowerSeries K) (hp_zero : ∀ (i : I), p i 0 = 1) (hp_summable : Summable fun (ik : (i : I) × { k : S i // k 0 }) => p ik.fst ik.snd) :
∏' (i : I), ∑' (k : S i), p i k = ∑' (f : { f : (i : I) → S i // ∀ᶠ (i : I) in Filter.cofinite, f i = 0 }), ∏' (i : I), p i (f i)
Proof

The proof is a long-winded reduction to the finite case. It proceeds by showing both sides have the same \(n\)-th coefficient for each \(n\).

Setup. For each \(m\in \mathbb {N}\), define \(T'_n = \{ (i,k)\in \overline{S} \mid \exists m\le n,\, [x^m](p_{i,k})\ne 0\} \). This set is finite by coefficient-wise summability. Let \(I_n = \{ i \in I \mid \exists k: (i,k)\in T'_n\} \). Then \(I_n\) is finite.

RHS reduction (Claim 8). For the RHS, only essentially finite functions \(f\) with “graph” contained in \(T'_n\) can contribute to the \(n\)-th coefficient. If some \((j, f(j))\notin T'_n\) with \(f(j)\ne 0\), then \([x^m](p_{j,f(j)}) = 0\) for all \(m\le n\), so \([x^n](\prod _i p_{i,f(i)}) = 0\) (by the finite product coefficient lemma). The set of such functions is finite (since their graphs inject into the finite powerset of \(T'_n\)).

LHS reduction (Claim 10). For the LHS, write \(\sum _k p_{i,k} = 1 + \sum _{k\ne 0} p_{i,k}\). For \(i\notin I_n\), the sum \(\sum _{k\ne 0} p_{i,k}\) has all coefficients up to \(n\) equal to \(0\). By the irrelevance lemma (Lemma 1.384), the factors for \(i\notin I_n\) do not affect the \(n\)-th coefficient. Thus \([x^n](\prod _i \sum _k p_{i,k}) = [x^n](\prod _{i\in I_n} \sum _k p_{i,k})\).

Finite product rule (Claim 11). Since \(I_n\) is finite, we can apply Proposition 1.383: \(\prod _{i\in I_n} \sum _k p_{i,k} = \sum _{(k_i)_{i\in I_n}\in \prod _{i\in I_n} S_i} \prod _{i\in I_n} p_{i,k_i}\).

Combining Claims 8, 10, and 11 shows both sides have equal \(n\)-th coefficients.

Proposition 1.383

Let \(N\) be a finite set. For any \(i\in N\), let \(\left( p_{i,k}\right) _{k\in S_{i}}\) be a summable family of elements of \(K\left[ \left[ x\right] \right] \). Then,

\begin{equation} \prod _{i\in N}\ \ \sum _{k\in S_{i}}p_{i,k}=\sum _{\left( k_{i}\right) _{i\in N}\in \prod _{i\in N}S_{i}}\ \ \prod _{i\in N}p_{i,k_{i}}. \label{eq.lem.fps.prodrule-fin-infJ.eq}\end{equation}
64

In particular, the family \(\left( \prod _{i\in N}p_{i,k_{i}}\right) _{\left( k_{i}\right) _{i\in N}\in \prod _{i\in N}S_{i}}\) is summable.

theorem prod_tsum_eq_tsum_prod_finset'_discrete {K : Type u_1} [CommRing K] [TopologicalSpace K] [IsTopologicalRing K] [T2Space K] [DiscreteTopology K] {N : Type u_2} [Fintype N] [DecidableEq N] {S : NType u_3} (p : (i : N) → S iPowerSeries K) (hp : ∀ (i : N), Summable (p i)) :
i : N, ∑' (k : S i), p i k = ∑' (f : (i : N) → S i), i : N, p i (f i)
Proof

This is just Proposition 1.376, with the indexing set \(\left\{ 1,2,\ldots ,n\right\} \) replaced by \(N\). It can be proved by reindexing the products (using a bijection between \(N\) and \(\{ 1,2,\ldots ,|N|\} \)) or directly by induction on \(\left\vert N\right\vert \).

Lemma 1.384

Let \(a\in K\left[ \left[ x\right] \right] \) be an FPS. Let \(\left( f_{i}\right) _{i\in J}\in K\left[ \left[ x\right] \right] ^{J}\) be a summable family of FPSs. Let \(n\in \mathbb {N}\). Assume that each \(i\in J\) satisfies

\begin{equation} \left[ x^{m}\right] \left( f_{i}\right) =0\ \ \ \ \ \ \ \ \ \ \text{for each }m\in \left\{ 0,1,\ldots ,n\right\} . \label{eq.lem.fps.prod.irlv.inf.ass}\end{equation}
65

Then,

\[ \left[ x^{m}\right] \left( a\prod _{i\in J}\left( 1+f_{i}\right) \right) =\left[ x^{m}\right] a\ \ \ \ \ \ \ \ \ \ \text{for each }m\in \left\{ 0,1,\ldots ,n\right\} . \]
theorem coeff_mul_tprod_one_add_eq_coeff {K : Type u_1} [CommRing K] [TopologicalSpace K] [T2Space K] {J : Type u_2} (a : PowerSeries K) (f : JPowerSeries K) (_hf_summable : Summable f) (n : ) (hf_order : ∀ (i : J), mn, (PowerSeries.coeff m) (f i) = 0) (m : ) :
m n(PowerSeries.coeff m) (a * ∏' (i : J), (1 + f i)) = (PowerSeries.coeff m) a
Proof

The idea is to argue that the first \(n+1\) coefficients of \(a\prod _{i\in J}\left( 1+f_{i}\right) \) agree with those of \(a\).

First, one shows that for any finite subset \(s\) of \(J\), if each \(f_i\) has \([x^m](f_i) = 0\) for all \(m\le n\), then \([x^m](\prod _{i\in s}(1+f_i)) = [x^m](1)\) for all \(m\le n\). This uses the expansion \(\prod _{i\in s}(1+f_i) = \sum _{t\subseteq s}\prod _{i\in t}f_i\); for \(t\ne \emptyset \), each \(\prod _{i\in t}f_i\) has order \({\gt}n\), so its \(m\)-th coefficient is zero.

Then, for the infinite product, the result follows by taking limits: \(\prod _{i\in J}(1+f_i)\) is the limit of the partial products \(\prod _{i\in s}(1+f_i)\), and since \([x^m]\) is continuous, each partial product gives \([x^m](\prod _{i\in s}(1+f_i)) = [x^m](1)\).

Finally, the coefficient of \(a\cdot \prod _{i\in J}(1+f_i)\) uses the Cauchy product formula, which only involves coefficients of \(\prod _{i\in J}(1+f_i)\) up to degree \(m\le n\), all of which equal the corresponding coefficients of \(1\). Hence \([x^m](a\cdot \prod _{i\in J}(1+f_i)) = [x^m](a\cdot 1) = [x^m](a)\).

If the family \((1+f_i)_{i\in J}\) is not multipliable, the infinite product defaults to \(1\) by convention, and the result holds trivially.

1.13.1 Helper lemmas for the infinite product rule

These lemmas implement the key technical steps in the proof of Proposition 1.382. They require \(K\) to have the discrete topology.

Lemma 1.385

(Finiteness of \(T'_n\).) Under the assumptions of Proposition 1.382 (with discrete \(K\)), define \(T'_n = \{ (i,k)\in \overline{S} \mid \exists m\le n,\, [x^m](p_{i,k})\ne 0\} \). Then \(T'_n\) is a finite set.

theorem T'n_finite_of_discrete {K : Type u_1} [CommRing K] [TopologicalSpace K] [DiscreteTopology K] {I : Type u_2} {S : IType u_3} [(i : I) → Zero (S i)] [(i : I) → DecidableEq (S i)] (p : (i : I) → S iPowerSeries K) (hp_summable : Summable fun (ik : (i : I) × { k : S i // k 0 }) => p ik.fst ik.snd) (n : ) :
{ik : (i : I) × { k : S i // k 0 } | mn, (PowerSeries.coeff m) (p ik.fst ik.snd) 0}.Finite
Proof

We have \(T'_n = \bigcup _{m\le n} \mathrm{supp}\! \left((i,k)\mapsto [x^m](p_{i,k})\right)\). Each support set is finite by coefficient-wise summability (summable families over a discrete topological space have finite support). A finite union of finite sets is finite.

Lemma 1.386

If \(j\in S\) and \([x^m](f_j) = 0\) for all \(m\le n\), then \([x^m]\! \left(\prod _{i\in S} f_i\right) = 0\) for all \(m\le n\).

theorem coeff_prod_eq_zero_of_factor_coeff_zero {K : Type u_1} [CommRing K] {I : Type u_2} [DecidableEq I] (s : Finset I) (f : IPowerSeries K) (j : I) (hj : j s) (n : ) (hf : mn, (PowerSeries.coeff m) (f j) = 0) (m : ) :
m n(PowerSeries.coeff m) (∏ is, f i) = 0
Proof

Write \(\prod _{i\in S} f_i = f_j \cdot \prod _{i\in S\setminus \{ j\} } f_i\). For each \(m\le n\), use the Cauchy product formula: each term involves \([x^a](f_j)\) with \(a\le m\le n\), which is \(0\) by hypothesis.

Lemma 1.387

Let \(T\) be a finite set of pairs \((i,k)\) with \(k\ne 0\). Then the set of essentially finite functions \(f : I\to \prod _i S_i\) whose “graph” \(\{ (i,f(i)) : f(i)\ne 0\} \) is contained in \(T\) is finite.

theorem finite_funcs_with_graph_in_finite_set {I : Type u_2} {S : IType u_3} [(i : I) → Zero (S i)] [(i : I) → DecidableEq (S i)] (T : Set ((i : I) × { k : S i // k 0 })) (hT : T.Finite) :
{f : { f : (i : I) → S i // ∀ᶠ (i : I) in Filter.cofinite, f i = 0 } | ∀ (i : I) (hi : f i 0), i, f i, hi T}.Finite
Proof

Each such function is determined by its graph, which is a subset of \(T\). The map sending \(f\) to its graph is injective (since the graph determines \(f\) on nonzero values, and the rest are \(0\)). Since the powerset of \(T\) is finite, the image is finite, so the set of such functions is finite.

Lemma 1.388

(Finite irrelevance for extra high-order factors.) Let \(s\subseteq t\) be finite sets of indices, and let \(g : I\to K[[x]]\). Assume that for each \(i\in t\setminus s\), we have \([x^m](g_i) = 0\) for all \(m\le n\). Then \([x^n]\! \left(\prod _{i\in t}(1+g_i)\right) = [x^n]\! \left(\prod _{i\in s}(1+g_i)\right)\).

theorem coeff_prod_eq_of_extra_high_order' {K : Type u_1} [CommRing K] {I : Type u_2} [DecidableEq I] (g : IPowerSeries K) (s t : Finset I) (hst : s t) (n : ) (h_high_order : it \ s, mn, (PowerSeries.coeff m) (g i) = 0) :
(PowerSeries.coeff n) (∏ it, (1 + g i)) = (PowerSeries.coeff n) (∏ is, (1 + g i))
Proof

Write \(\prod _{i\in t}(1+g_i) = \prod _{i\in s}(1+g_i) \cdot \prod _{i\in t\setminus s}(1+g_i)\). For the second factor, each \(g_i\) (\(i\in t\setminus s\)) has order \({\gt}n\), so by expanding \(\prod _{i\in t\setminus s}(1+g_i)\) via the powerset formula, all terms except the empty product have order \({\gt}n\). Hence \([x^m]\! \left(\prod _{i\in t\setminus s}(1+g_i)\right) = [x^m](1)\) for all \(m\le n\), and the Cauchy product formula gives the result.

Lemma 1.389

(Infinite irrelevance: reduction to finite product.) Assume \(K\) has the discrete topology. Let \((g_i)_{i\in I}\) be a family such that \((1+g_i)_{i\in I}\) is multipliable, and let \(I_n\subseteq I\) be a finite set such that \([x^m](g_i) = 0\) for all \(i\notin I_n\) and all \(m\le n\). Then

\[ [x^n]\! \left(\prod _{i\in I}(1+g_i)\right) = [x^n]\! \left(\prod _{i\in I_n}(1+g_i)\right). \]
theorem coeff_tprod_one_add_eq_coeff_prod_of_high_order' {K : Type u_1} [CommRing K] [TopologicalSpace K] [DiscreteTopology K] {I : Type u_2} (g : IPowerSeries K) (I_n : Set I) (hI_n : I_n.Finite) (hmult : Multipliable fun (x : I) => 1 + g x) (n : ) (h_high_order : iI_n, mn, (PowerSeries.coeff m) (g i) = 0) :
(PowerSeries.coeff n) (∏' (i : I), (1 + g i)) = (PowerSeries.coeff n) (∏ ihI_n.toFinset, (1 + g i))
Proof

The infinite product \(\prod _{i\in I}(1+g_i)\) is the limit of partial products \(\prod _{i\in s}(1+g_i)\) over finite sets \(s\). By Lemma 1.388, for any \(s\supseteq I_n\), the \(n\)-th coefficient of \(\prod _{i\in s}(1+g_i)\) equals that of \(\prod _{i\in I_n}(1+g_i)\). By continuity of \([x^n]\) and the eventual constancy, the limit also has this \(n\)-th coefficient.

1.13.2 Helper lemmas from the Lean formalization

Lemma 1.390

(Summability of fibers.) Let \(I\) be a set. For any \(i\in I\), let \(S_i\) be a set containing \(0\). For any \(i\in I\) and \(k\in S_i\), let \(p_{i,k}\in K[[x]]\). Assume that the family \((p_{i,k})_{(i,k)\in \overline{S}}\) is summable (where \(\overline{S} = \{ (i,k) : k\ne 0\} \)). Then, for each \(i\in I\), the family \((p_{i,k})_{k\in S_i}\) is summable.

theorem summable_fiber_discrete {K : Type u_1} [CommRing K] [TopologicalSpace K] [DiscreteTopology K] {I : Type u_2} {S : IType u_3} [(i : I) → Zero (S i)] [(i : I) → DecidableEq (S i)] (p : (i : I) → S iPowerSeries K) (hp_summable : Summable fun (ik : (i : I) × { k : S i // k 0 }) => p ik.fst ik.snd) (i : I) :
Summable (p i)
Proof

The subfamily \((p_{i,k})_{k\in S_i, k\ne 0}\) is summable because it injects into the summable family \((p_{i,k})_{(i,k)\in \overline{S}}\) via \((i,\cdot )\). Adding the single term \(p_{i,0}\) preserves summability. Formally, we reduce to coefficient-wise summability and split each coefficient sum at \(k=0\).

Lemma 1.391

(Multipliability of the sum family.) Under the same assumptions as Lemma 1.390, and assuming \(p_{i,0}=1\) for all \(i\in I\), the family \(\left(\sum _{k\in S_i} p_{i,k}\right)_{i\in I}\) is multipliable.

theorem multipliable_tsum_fiber_discrete {K : Type u_1} [CommRing K] [TopologicalSpace K] [IsTopologicalRing K] [T2Space K] [DiscreteTopology K] {I : Type u_2} {S : IType u_3} [(i : I) → Zero (S i)] [(i : I) → DecidableEq (S i)] (p : (i : I) → S iPowerSeries K) (hp_zero : ∀ (i : I), p i 0 = 1) (hp_summable : Summable fun (ik : (i : I) × { k : S i // k 0 }) => p ik.fst ik.snd) :
Multipliable fun (i : I) => ∑' (k : S i), p i k
Proof

Write \(\sum _k p_{i,k} = 1 + \sum _{k\ne 0} p_{i,k}\). We need to show \((1 + g_i)_{i\in I}\) is multipliable, where \(g_i = \sum _{k\ne 0} p_{i,k}\). By the multipliability criterion (Theorem 1.350), it suffices to show that \(\sum _{s \in \mathcal{F}(I)} \prod _{i\in s} g_i\) is summable, where \(\mathcal{F}(I)\) denotes the set of all finite subsets of \(I\). This is proved coefficient-wise: for each \(n\), the support of \(s\mapsto [x^n](\prod _{i\in s}g_i)\) is contained in the set of finite subsets \(s\) with \(s\subseteq I_n\) (the finite set of indices contributing to coefficients up to \(n\)), which is finite.

Lemma 1.392

(Summability of the RHS.) Under the assumptions of Proposition 1.382 (with discrete \(K\)), the family \(\left(\prod _{i\in I} p_{i,k_i}\right)_{(k_i)\text{ ess.\ fin.}}\) is summable.

theorem summable_prod_essentiallyFinite_discrete {K : Type u_1} [CommRing K] [TopologicalSpace K] [DiscreteTopology K] {I : Type u_2} {S : IType u_3} [(i : I) → Zero (S i)] [(i : I) → DecidableEq (S i)] (p : (i : I) → S iPowerSeries K) (hp_zero : ∀ (i : I), p i 0 = 1) (hp_summable : Summable fun (ik : (i : I) × { k : S i // k 0 }) => p ik.fst ik.snd) :
Summable fun (f : { f : (i : I) → S i // ∀ᶠ (i : I) in Filter.cofinite, f i = 0 }) => ∏' (i : I), p i (f i)
Proof

For each coefficient \(n\), define \(T'_n = \{ (i,k)\in \overline{S} \mid \exists m\le n,\, [x^m](p_{i,k})\ne 0\} \). This is finite by Lemma 1.385. The support of \(f\mapsto [x^n](\prod _{i\in I} p_{i,f(i)})\) is contained in the set of essentially finite functions whose “graph” \(\{ (i,f(i)) : f(i)\ne 0\} \) is a subset of \(T'_n\) (if \((j,f(j))\notin T'_n\) for some \(j\) with \(f(j)\ne 0\), then \([x^n](\prod _{i\in I} p_{i,f(i)}) = 0\) by Lemma 1.386). This set of functions is finite by Lemma 1.387.

1.13.3 Binary product rule

Proposition 1.393

Assume \(K\) has the discrete topology. Let \(\left(a_i\right)_{i\in \mathbb {N}}\) be a summable family in \(K[[x]]\). Then

\[ \prod _{i\in \mathbb {N}}\left(1+a_i\right) = \sum _{S\subseteq \mathbb {N},\; S\text{ finite}} \prod _{i\in S} a_i. \]

In particular, the right-hand side is summable.

theorem binary_product_rule {K : Type u_1} [CommRing K] [TopologicalSpace K] (a : PowerSeries K) (ha : Summable a) [DiscreteTopology K] :
∏' (i : ), (1 + a i) = ∑' (s : Finset ), is, a i
Proof

The identity \(\prod _{i\in \mathbb {N}}(1+f_i) = \sum _{s\subseteq \mathbb {N},\, s\text{ finite}} \prod _{i\in s} f_i\) holds provided the right-hand side is summable. For the summability: for each coefficient \(d\), define \(T = \bigcup _{m\le d}\mathrm{supp}([x^m]\circ a)\), which is finite by discrete summability. Any finset \(s\) not contained in \(T\) contributes \(0\) to coefficient \(d\) (since some factor \(a_i\) with \(i\notin T\) has all low coefficients zero). The set of finsets contained in \(T\) is finite.

Proposition 1.394

Alternative formulation: under the same assumptions,

\[ \prod _{i\in \mathbb {N}}\left(1+a_i\right) = \sum _{\substack{[J, \subseteq , \mathbb , {, N, }, ,, \; , , J, \text , {, , f, i, n, i, t, e, }]}} \prod _{i\in J}^{\mathrm{fin}} a_i, \]

where the RHS sums over all finite subsets \(J\) of \(\mathbb {N}\) and uses the finitary product \(\prod ^{\mathrm{fin}}\).

theorem binary_product_rule' {K : Type u_1} [CommRing K] [TopologicalSpace K] (a : PowerSeries K) (ha : Summable a) [DiscreteTopology K] :
∏' (i : ), (1 + a i) = ∑' (J : { J : Set // J.Finite }), ∏ᶠ (i : ) (_ : i J), a i
Proof

This follows from Proposition 1.393 by observing that both formulations sum over the same collection of finite subsets of \(\mathbb {N}\).

1.13.4 Another example

Proposition 1.395 Euler

We have

\[ \prod _{i{\gt}0}\left( 1-x^{2i-1}\right) ^{-1}=\prod _{k{\gt}0}\left( 1+x^{k}\right) . \]
Proof

For each \(k{\gt}0\), we have \(1+x^{k}=\frac{1-x^{2k}}{1-x^{k}}\) (since \(1-x^{2k}=\left( 1-x^{k}\right) \left( 1+x^{k}\right) \)). Thus,

\begin{align*} \prod _{k{\gt}0}\left( 1+x^{k}\right) & =\prod _{k{\gt}0}\frac{1-x^{2k}}{1-x^{k}} =\frac{\prod _{k{\gt}0}\left( 1-x^{2k}\right) }{\prod _{k{\gt}0}\left( 1-x^{k}\right) }\\ & =\frac{1}{\left( 1-x^{1}\right) \left( 1-x^{3}\right) \left( 1-x^{5}\right) \left( 1-x^{7}\right) \cdots }\\ & =\prod _{i{\gt}0}\left( 1-x^{2i-1}\right)^{-1}, \end{align*}

where the even factors cancel. The cancellation is justified by the fact that the family \(\left( 1-x^{k}\right) _{k{\gt}0}\) factors as a product over even and odd indices, by the partition of positive integers into evens and odds (by Proposition 1.365).

Lean proof strategy. The Lean proof proceeds differently: both sides are shown to equal the same partition-theoretic generating function. The RHS equals \(\sum _n d_n \cdot x^n\) (generating function for partitions into distinct parts, i.e., parts of multiplicity \({\lt}2\)). The LHS equals \(\sum _n o_n \cdot x^n\) (generating function for partitions into odd parts). These are equal by Glaisher’s theorem.

Theorem 1.396 Euler

Let \(n\in \mathbb {N}\). Then, \(d_{n}=o_{n}\), where

  • \(d_{n}\) is the number of ways to write \(n\) as a sum of distinct positive integers, without regard to the order;

  • \(o_{n}\) is the number of ways to write \(n\) as a sum of (not necessarily distinct) odd positive integers, without regard to the order.

Proof

Proposition 1.395 shows that the generating functions for \(d_n\) and \(o_n\) are equal, hence \(d_n = o_n\) for all \(n\).

Proposition 1.397

Alternative formulation of Euler’s identity: indexing the left-hand side over odd positive integers rather than all positive integers,

\[ \prod _{\substack{[i, \in , \mathbb , {, N, }, ^, {, +, }, \\ , i, \text , {, , o, d, d, }]}} \left(1-x^i\right)^{-1} = \prod _{k{\gt}0}\left(1+x^k\right). \]
Proof

This follows from Proposition 1.395 by reindexing the product using the bijection \(i\mapsto 2i-1\) between \(\mathbb {N}^{+}\) and the odd positive integers.

1.13.5 Infinite products and substitution

Lemma 1.398

For any \(a\in K\), the rescaling map \(\mathrm{rescale}(a) : K[[x]]\to K[[x]]\) defined by \(f(x)\mapsto f(ax)\) is continuous (with respect to the coefficient-wise topology on \(K[[x]]\)).

Proof

The \(n\)-th coefficient of \(\mathrm{rescale}(a)(f)\) is \(a^n\cdot [x^n]f\). This is continuous because \([x^n]\) is continuous (it is a projection) and scalar multiplication by \(a^n\) is continuous.

Proposition 1.399

If \(\left( f_{i}\right) _{i\in I}\in K\left[ \left[ x\right] \right] ^{I}\) is a multipliable family of FPSs, and if \(g\in K\left[ \left[ x\right] \right] \) is an FPS satisfying \(\left[ x^{0}\right] g=0\), then the family \(\left( f_{i}\circ g\right) _{i\in I}\in K\left[ \left[ x\right] \right] ^{I}\) is multipliable as well and we have \(\left( \prod _{i\in I}f_{i}\right) \circ g=\prod _{i\in I}\left( f_{i}\circ g\right) \).

theorem tprod_rescale_substitution {K : Type u_1} [CommRing K] [TopologicalSpace K] [IsTopologicalRing K] [T2Space K] {I : Type u_2} (f : IPowerSeries K) (a : K) (hf : Multipliable f) :
(PowerSeries.rescale a) (∏' (i : I), f i) = ∏' (i : I), (PowerSeries.rescale a) (f i)
Proof

The Lean formalization proves the special case of rescaling \(g = ax\) (i.e., substituting \(ax\) for \(x\)). The proof uses Lemma 1.398 (the rescale map is continuous) together with the fact that it is a ring homomorphism, so it commutes with infinite products.

1.13.6 Exponentials, logarithms and infinite products

Proposition 1.400

Assume that \(K\) is a commutative \(\mathbb {Q}\)-algebra. Let \(\left( f_{i}\right) _{i\in I}\in K\left[ \left[ x\right] \right] ^{I}\) be a summable family of FPSs in \(K\left[ \left[ x\right] \right] _{0}\). Then, \(\left( \operatorname {Exp}f_{i}\right) _{i\in I}\) is a multipliable family of FPS in \(K\left[ \left[ x\right] \right] _{1}\), and we have \(\sum _{i\in I}f_{i}\in K\left[ \left[ x\right] \right] _{0}\) and

\[ \operatorname {Exp}\left( \sum _{i\in I}f_{i}\right) =\prod _{i\in I}\left( \operatorname {Exp}f_{i}\right) . \]
theorem PowerSeries.Exp_sum {K : Type u_2} [CommRing K] [Algebra K] {I : Type u_3} (g : IPowerSeries₀) (hg : SummableFPS₀ g) (hg_mul : MultipliableFPS₁ fun (i : I) => Exp (g i) := ) :
Exp (summableFPS₀Sum g hg) = multipliableFPS₁Prod (fun (i : I) => Exp (g i)) hg_mul
theorem PowerSeries.Exp_multipliable_of_summable {K : Type u_2} [CommRing K] [Algebra K] {I : Type u_3} (g : IPowerSeries₀) (hg : SummableFPS₀ g) :
MultipliableFPS₁ fun (i : I) => Exp (g i)
Proof

The \(\operatorname {Exp}\) map converts infinite sums in \(K[[x]]_0\) to infinite products in \(K[[x]]_1\). This is because \(\operatorname {Exp}\) is a continuous ring homomorphism from \(K[[x]]_0\) (with addition) to \(K[[x]]_1\) (with multiplication), and therefore commutes with infinite sums and products.

Proposition 1.401

Assume that \(K\) is a commutative \(\mathbb {Q}\)-algebra. Let \(\left( f_{i}\right) _{i\in I}\in K\left[ \left[ x\right] \right] ^{I}\) be a multipliable family of FPSs in \(K\left[ \left[ x\right] \right] _{1}\). Then, \(\left( \operatorname {Log}f_{i}\right) _{i\in I}\) is a summable family of FPS in \(K\left[ \left[ x\right] \right] _{0}\), and we have \(\prod \limits _{i\in I}f_{i}\in K\left[ \left[ x\right] \right] _{1}\) and

\[ \operatorname {Log}\left( \prod \limits _{i\in I}f_{i}\right) =\sum _{i\in I}\left( \operatorname {Log}f_{i}\right) . \]
theorem PowerSeries.Log_tprod {K : Type u_2} [CommRing K] [Algebra K] {I : Type u_3} (f : IPowerSeries₁) (hf : MultipliableFPS₁ f) (hf_sum : SummableFPS₀ fun (i : I) => Log (f i) := ) :
Log (multipliableFPS₁Prod f hf) = summableFPS₀Sum (fun (i : I) => Log (f i)) hf_sum
theorem PowerSeries.Log_summable_of_multipliable {K : Type u_2} [CommRing K] [Algebra K] {I : Type u_3} (f : IPowerSeries₁) (hf : MultipliableFPS₁ f) :
SummableFPS₀ fun (i : I) => Log (f i)
Proof

The \(\operatorname {Log}\) map converts infinite products in \(K[[x]]_1\) to infinite sums in \(K[[x]]_0\). This follows from the fact that \(\operatorname {Log}\) is a continuous ring homomorphism from \(K[[x]]_1\) (with multiplication) to \(K[[x]]_0\) (with addition), and therefore commutes with infinite products and sums.