-
Notifications
You must be signed in to change notification settings - Fork 134
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
Combinatorics of Finite Sets #620
Conversation
I might be too optimistic. There is no way to generalize most of these results to higher types but with one exception, namely the closed-ness under Σ-types. And it is exactly what Rijke needs to construct the number of finite groups. |
Nice! Ping @EgbertRijke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thanks for the contribution.
A general remark is that we should reorganize FinSet a bit so that we have a Base file and the Cubical.Data.FinSet
file just re-exports things.
Also, I think isFinSet
should be called isFinite
Really necessary to reorganize the files. However, I think we should keep the name |
Reorganize the files and switch to the library definition of injective/surjective functions. Looks much better now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a few comments which I already posted, once they are fixed I'll be happy to merge
Ok, I buy this argument! Especially if we move the proof that |
I have moved |
Btw there are so many different aspects of finite sets (e.g. |
Indeed, that would be very welcome in a future PR! |
Wait, I think I should add some facts about cardinality so that others can do combinatorics immediately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should merge this now and any additions come in another PR. It will be much easier for me to review the new stuff that way.
So should I merge?
@mortberg It's Ok to merge now. I still need some time to add new stuff. |
Great, thanks for the contribution! |
This PR contains :
Closure properties of
FinSet
under several type constructors (e.g., Σ-types, Π-types , type of equivalences);A proof of (axiom of) finite choice;
Adding some requisite definitions to the library.
In theory, one can calculate the cardinality of any combinations of these constructors applied to finite sets and many combinatorial problems can be described in this way. For example, the number of elements in
Fin 3 ≃ Fin 3
can be correctly evaluated as6
. Unfortunately, it seems unfeasible even to compute that forFin 4
.I guess most of the results can be extended to finite groupoids or even finite categories. So the recent works of Egbert Rijke in OEIS-A000001 can be reproduced in cubical agda.