Documentation

Mathlib.Combinatorics.Enumerative.Bell

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.

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
Instances For
    @[simp]
    theorem Multiset.bell_mul_eq (m : Multiset ℕ) :
    m.bell * (map (fun (j : ℕ) => j.factorial) m).prod * ∏ j ∈ m.toFinset.erase 0, (count j m).factorial = m.sum.factorial
    theorem Multiset.bell_eq (m : Multiset ℕ) :
    m.bell = m.sum.factorial / ((map (fun (j : ℕ) => j.factorial) m).prod * ∏ j ∈ m.toFinset.erase 0, (count j m).factorial)
    def Nat.uniformBell (m n : ℕ) :

    Number of possibilities of dividing a set with m * n elements into m groups of n-element subsets.

    Equations
    Instances For
      theorem Nat.uniformBell_eq (m n : ℕ) :
      m.uniformBell n = ∏ p ∈ Finset.range m, (p * n + n - 1).choose (n - 1)
      theorem Nat.uniformBell_succ_left (m n : ℕ) :
      (m + 1).uniformBell n = (m * n + n - 1).choose (n - 1) * m.uniformBell n
      theorem Nat.uniformBell_mul_eq (m : ℕ) {n : ℕ} (hn : n ≠ 0) :
      theorem Nat.uniformBell_eq_div (m : ℕ) {n : ℕ} (hn : n ≠ 0) :