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
      theorem Multiset.bell_mul_eq (m : Multiset ) :
      m.bell * (map (fun (j : ) => j.factorial) m).prod * jm.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 * jm.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 = pFinset.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) :
          @[irreducible]
          def Nat.bell :

          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.

          Equations
            Instances For
              theorem Nat.bell_succ (n : ) :
              (n + 1).bell = i : Fin n.succ, n.choose i * (n - i).bell
              theorem Nat.bell_succ' (n : ) :
              (n + 1).bell = ijFinset.antidiagonal n, n.choose ij.1 * ij.2.bell