Bell numbers for multisets #
For n : ℕ, the nth Bell number is the number of partitions of a set of cardinality n.
Here, we define a refinement of these numbers, that count, for any m : Multiset ℕ,
the number of partitions of a set of cardinality m.sum whose parts have cardinalities
given by m.
The definition presents it as a natural number.
- Multiset.bell: number of partitions of a set whose parts have cardinalities a given multiset
- Nat.uniformBell m n: short name for- Multiset.bell (replicate m n)
- Multiset.bell_mul_eqshows that- m.bell * (m.map (fun j ↦ j !)).prod * Π j ∈ (m.toFinset.erase 0), (m.count j)! = m.sum !
- Nat.uniformBell_mul_eqshows that- uniformBell m n * n ! ^ m * m ! = (m * n)!
- Nat.uniformBell_succ_leftcomputes- Nat.uniformBell (m + 1) nfrom- Nat.uniformBell m n
- Nat.bell n: the- nth standard Bell number, which counts the number of partitions of a set of cardinality- n
- Nat.bell_succ nshows that- Nat.bell (n + 1) = ∑ k ∈ Finset.range (n + 1), Nat.choose n k * Nat.bell (n - k)
TODO #
Prove that it actually counts the number of partitions as indicated.
(When m contains 0, the result requires to admit repetitions of the empty set as a part.)
Number of partitions of a set of cardinality m.sum
whose parts have cardinalities given by m
Equations
- m.bell = (Nat.multinomial m.toFinset fun (k : ℕ) => k * Multiset.count k m) * ∏ k ∈ m.toFinset.erase 0, ∏ j ∈ Finset.range (Multiset.count k m), (j * k + k - 1).choose (k - 1)
Instances For
Number of possibilities of dividing a set with m * n elements into m groups
of n-element subsets.
Equations
- m.uniformBell n = (Multiset.replicate m n).bell
Instances For
The nth standard Bell number,
which counts the number of partitions of a set of cardinality n.
TODO #
Prove that Nat.bell n is equal to the sum of Multiset.bell m
over all multisets m : Multiset ℕ such that m.sum = n.