-
Notifications
You must be signed in to change notification settings - Fork 422
[Merged by Bors] - feat(Finset): extra toLeft
/toRight
API
#23020
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
Conversation
PR summary 97680769fdImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
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.
@fpvandoorn, what's your preferred way for me to fix the simps
error in Logic.Equiv.Set
?
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.
The finset/fintype changes look great to me
By making sure that |
#23041 might also help |
Or, going even further, we can disallow When I wrote Please open issues (or make fixes to |
Indeed that's the case.
I see that you have opened #23041 for that, so I will refrain from doing so. |
It's not quite the same, but I added it to that issue. Do you think this would be good?
|
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.
Interestingly the new function seems to avoid stackoverflows where the previous one did not:
def foo : Finset (ℕ ⊕ ℕ) := (Finset.Icc 0 100000).map .inl
set_option trace.profiler true in
#eval foo.toLeft.card
succeeds only with this PR.
As a bonus, this lets us reduce imports. Also add the API that I independently came up with in #20433 (comment).
32cbe00
to
4d63c0c
Compare
toLeft
/toRight
using map
toLeft
/toRight
API
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.
This is now very nice, thank you!
bors merge
Add the API that I independently came up with in #20433 (comment).
Pull request successfully merged into master. Build succeeded: |
toLeft
/toRight
APItoLeft
/toRight
API
Add the API that I independently came up with in #20433 (comment).