Zulip Chat Archive
Stream: mathlib4
Topic: Multinomial coefficients
Antoine Chambert-Loir (Feb 27 2026 at 17:23):
Multinomial coefficients are defined in mathlib by docs#Nat.multinomial, that constructs , for some -valued function , and some finite set .
In our work on divided powers, @María Inés de Frutos Fernández and fI need to access multinomial coefficients so that the multinomial number associated with the set of natural numbers is .
We develop that notion in #35830 but reached a name-conflict since docs#Multiset.multinomial already exists, and gives in that case.
Our solution has been to name our coefficients Multiset.plurinomial, trading a Greek root for a Latine one.
However, in their review, @Violeta Hernández suggested that we'd rather name our coefficients Multiset.plurinomial and rename docs#Multiset.multinomial as Multiset.countPerms. — Indeed, it counts the number of lists that give rise to the given multiset.
We're of course ready to do that change but felt natural to have a more general discussion here.
Bolton Bailey (Feb 27 2026 at 20:19):
I also think this would be a great change, I have an old incomplete draft PR doing this #31601 (the main motivation of that PR being a version of docs#Nat.choose with an easy positivity plugin), feel free to steal lemmas from that if needed.
In my PR I named this function Nat.multinomial', which I think tells me that this is the function I expected "multinomial" to name, and so I think this renaming is appropriate.
Last updated: Feb 28 2026 at 14:05 UTC