Multinomial #
This file defines the multinomial coefficients and several small lemmas for manipulating them.
Nat.multinomial: the multinomial coefficient, Given a functionf : α → ℕands : Finset α, this is the number of strings consisting of symbols froms, wherec ∈ sappears with multiplicityf c.It is defined as
(∑ i ∈ s, f i)! / ∏ i ∈ s, (f i)!.Multiset.countPerms: multinomial coefficient associated with theMultiset.countfunction of a multiset. This is the number of lists that induce the given multiset.Finset.sum_pow: The expansion of(s.sum x) ^ nusing multinomial coefficients
The multinomial coefficient. Gives the number of strings consisting of symbols
from s, where c ∈ s appears with multiplicity f c.
Defined as (∑ i ∈ s, f i)! / ∏ i ∈ s, (f i)!.
Equations
- Nat.multinomial s f = (∑ i ∈ s, f i).factorial / ∏ i ∈ s, (f i).factorial
Instances For
Connection to binomial coefficients #
When Nat.multinomial is applied to a Finset of two elements {a, b}, the
result a binomial coefficient. We use binomial in the names of lemmas that
involves Nat.multinomial {a, b}.
Simple cases #
Alternative definitions #
The number of permutations of a given multiset.
Equations
Instances For
Alias of Multiset.countPerms.
The number of permutations of a given multiset.
Equations
Instances For
Alias of Multiset.countPerms_filter_ne.
Alias of Multiset.countPerms_zero.
Multinomial theorem #
The multinomial theorem.
The multinomial theorem.
Alias of Sym.countPerms_coe_fill_of_notMem.