The areas / V30. Combinatorics
Mathlib.Combinatorics.Enumerative.Partition.GenFun
8 declarations. Mathlib docs · Source
Generating functions for partitions
This file defines generating functions related to partitions. Given a character function $f(i, c)$
of a part $i$ and the number of occurrences of the part $c$, the related generating function is
$$
G_f(X) = \sum_{n = 0}^{\infty} \left(\sum_{p \in P_{n}} \prod_{i \in p} f(i, #i)\right) X^n
= \prod_{i = 1}^{\infty}\left(1 + \sum_{j = 1}^{\infty} f(i, j) X^{ij}\right)
$$
where $P_n$ is all partitions of $n$, $#i$ is the count of $i$ in the partition $p$.
We give the definition Nat.Partition.genFun using the first equation, and prove the second
equation in Nat.Partition.hasProd_genFun (with shifted indices).
This generating function can be specialized to
- When $f(i, c) = 1$, this is the generating function for partition function $p(n)$ (TODO: prove this).
- When $f(i, 1) = 1$ and $f(i, c) = 0$ for $c > 1$, this is the generating function for
#(Nat.Partition.distincts n). More generally, setting $f(i, c) = 1$ only for $c < m$ gives the generating function for#(Nat.Partition.countRestricted n m). (SeeNat.Partition.hasProd_powerSeriesMk_card_countRestricted). - When $f(i, c) = 1$ for odd $i$ and $f(i, c) = 0$ for even $i$, this is the generating function for
#(Nat.Partition.odds n). More generally, setting $f(i, c) = 1$ only for $i$ satisfying certainp : Propgives the generating function for#(Nat.Partition.restricted n p). (SeeNat.Partition.hasProd_powerSeriesMk_card_restricted)
The definition of Nat.Partition.genFun ignores the value of $f(0, c)$ and $f(i, 0)$. The formula
can be interpreted as assuming $f(i, 0) = 1$ and $f(0, c) = 0$ for $c \ne 0$. In theory we could
respect the actual value of $f(0, c)$ and $f(i, 0)$, but it makes the otherwise finite sum and
product potentially infinite.
def Nat.Partition.genFun E1 #
{R : Type u_1} → [CommSemiring R] → (ℕ → ℕ → R) → PowerSeries R
Generating function associated with character $f(i, c)$ for partition functions, where $i$ is a
part of the partition, and $c$ is the count of that part in the partition. The character function is
multiplied within one n.Partition, and summed among all n.Partition for a fixed n. This way,
each n is assigned a value, which we use as the coefficients of the power series.
See the module docstring of Combinatorics.Enumerative.Partition.GenFun for more details.
theorem Nat.Partition.coeff_genFun E0 #
∀ {R : Type u_1} [inst : CommSemiring R] (f : ℕ → ℕ → R) (n : ℕ),
(PowerSeries.coeff n) (Nat.Partition.genFun f) = ∑ p, (Multiset.toFinsupp p.parts).prod f
theorem Nat.Partition.tendsto_order_genFun_term_atTop_nhds_top E1 #
∀ {R : Type u_1} [inst : CommSemiring R] (f : ℕ → ℕ → R) (i : ℕ),
Filter.Tendsto (fun j ↦ (f (i + 1) (j + 1) • PowerSeries.X ^ ((i + 1) * (j + 1))).order) Filter.atTop (nhds ⊤)
The summands in the formula Nat.Partition.hasProd_genFun tends to infinity in their order.
theorem Nat.Partition.summable_genFun_term E1 #
∀ {R : Type u_1} [inst : CommSemiring R] [inst_1 : TopologicalSpace R] (f : ℕ → ℕ → R) (i : ℕ),
Summable fun j ↦ f (i + 1) (j + 1) • PowerSeries.X ^ ((i + 1) * (j + 1))
The infinite sum in the formula Nat.Partition.hasProd_genFun always converges.
theorem Nat.Partition.summable_genFun_term' E1 #
∀ {R : Type u_1} [inst : CommSemiring R] [inst_1 : TopologicalSpace R] (f : ℕ → ℕ → R) {i : ℕ},
i ≠ 0 → Summable fun j ↦ f i (j + 1) • PowerSeries.X ^ (i * (j + 1))
Alternative form of summable_genFun_term that unshifts the first index.
theorem Nat.Partition.hasProd_genFun E1 #
∀ {R : Type u_1} [inst : CommSemiring R] [inst_1 : TopologicalSpace R] [T2Space R] (f : ℕ → ℕ → R),
HasProd (fun i ↦ 1 + ∑' (j : ℕ), f (i + 1) (j + 1) • PowerSeries.X ^ ((i + 1) * (j + 1))) (Nat.Partition.genFun f)
theorem Nat.Partition.multipliable_genFun E1 #
∀ {R : Type u_1} [inst : CommSemiring R] [inst_1 : TopologicalSpace R] [T2Space R] (f : ℕ → ℕ → R),
Multipliable fun i ↦ 1 + ∑' (j : ℕ), f (i + 1) (j + 1) • PowerSeries.X ^ ((i + 1) * (j + 1))
theorem Nat.Partition.genFun_eq_tprod E1 #
∀ {R : Type u_1} [inst : CommSemiring R] [inst_1 : TopologicalSpace R] [T2Space R] (f : ℕ → ℕ → R),
Nat.Partition.genFun f = ∏' (i : ℕ), (1 + ∑' (j : ℕ), f (i + 1) (j + 1) • PowerSeries.X ^ ((i + 1) * (j + 1)))