Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stars and bars #10802

Closed
YaelDillies opened this issue Dec 15, 2021 · 2 comments
Closed

Stars and bars #10802

YaelDillies opened this issue Dec 15, 2021 · 2 comments

Comments

@YaelDillies
Copy link
Collaborator

YaelDillies commented Dec 15, 2021

The stars and bars theorem should be doable with some finset fidgeting and double counting.

sym α n being the type of n elements of α without order, aka the n-th symmetric square on α. its cardinality is precisely what we want to count in stars and bars. Hence a neat way to state stars and bars would be

import data.sym.card

lemma stars_and_bars {α : Type*} [decidable_eq α] [fintype α] (n : ℕ) :
  fintype.card (sym α n) = (fintype.card α + n - 1).choose (fintype.card α) := sorry

The case n = 2 is already done in data.sym.card.

Zulip

@librarianmage
Copy link

Am I mistaken or has this already been proved by the above linked PRs?

@YaelDillies
Copy link
Collaborator Author

Indeed! It should have been closed along with the merge of #11162.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants