-
Notifications
You must be signed in to change notification settings - Fork 251
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
[Merged by Bors] - chore: golf using filter_upwards
#11208
Conversation
dba659e
to
a8bf161
Compare
a8bf161
to
1821b5f
Compare
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 PR is definitely an improvement but I saw a couple of points where it can be improved further using the filter_upwards [foo] with bar
syntax. There might be more, so have a look for cases where Eventually.mp
(or Eventually.and
etc) is used just before a filter_upwards
.
Thanks for the hint: I pushed a few more golfs, including looking for occurrences of Eventually.{mp,and}. |
5f08c5b
to
5e724fb
Compare
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've checked through all of these now. Most of them look great. I have, however, flagged up a few instances where I think you've been a bit trigger-happy. In particular, if eventually_of_forall
or ae_of_all
is one ingredient in a long compound proof term (as argument to refine
or exact
), using the filter_upwards
tactic requires breaking this into two tactic calls, and in many cases the result is longer than the original (as well as being, I suspect, fractionally slower to compile).
Thank you, all fixed. (Sorry for going overboard - I rather wanted you to tell me "this is not better" than the other way. Now I know.) |
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 looks good now. There are surely further golfs that are possible; but this PR certainly is a substantial improvement on the existing code, and given that it touches rather a lot of files, it will rot quickly if we try to make it perfect.
maintainer merge
🚀 Pull request has been placed on the maintainer queue by loefflerd. |
This looks good, thanks! bors merge |
This is presumably not exhaustive, but covers about a hundred instances. Style opinions (e.g., why a particular change is great/not a good idea) are very welcome; I'm still forming my own.
Pull request successfully merged into master. Build succeeded: |
filter_upwards
filter_upwards
Sometimes, that line can be golfed into the next line. Inspired by a [comment](#11208 (comment)) of @loefflerd; any decisions are my own.
This is presumably not exhaustive, but covers about a hundred instances. Style opinions (e.g., why a particular change is great/not a good idea) are very welcome; I'm still forming my own.
Sometimes, that line can be golfed into the next line. Inspired by a [comment](#11208 (comment)) of @loefflerd; any decisions are my own.
This is presumably not exhaustive, but covers about a hundred instances. Style opinions (e.g., why a particular change is great/not a good idea) are very welcome; I'm still forming my own.
Sometimes, that line can be golfed into the next line. Inspired by a [comment](#11208 (comment)) of @loefflerd; any decisions are my own.
This is presumably not exhaustive, but covers about a hundred instances. Style opinions (e.g., why a particular change is great/not a good idea) are very welcome; I'm still forming my own.
Sometimes, that line can be golfed into the next line. Inspired by a [comment](#11208 (comment)) of @loefflerd; any decisions are my own.
This is presumably not exhaustive, but covers about a hundred instances. Style opinions (e.g., why a particular change is great/not a good idea) are very welcome; I'm still forming my own.
Sometimes, that line can be golfed into the next line. Inspired by a [comment](#11208 (comment)) of @loefflerd; any decisions are my own.
This is presumably not exhaustive, but covers about a hundred instances. Style opinions (e.g., why a particular change is great/not a good idea) are very welcome; I'm still forming my own.
Sometimes, that line can be golfed into the next line. Inspired by a [comment](#11208 (comment)) of @loefflerd; any decisions are my own.
This is presumably not exhaustive, but covers about a hundred instances. Style opinions (e.g., why a particular change is great/not a good idea) are very welcome; I'm still forming my own.
Sometimes, that line can be golfed into the next line. Inspired by a [comment](#11208 (comment)) of @loefflerd; any decisions are my own.
This is presumably not exhaustive, but covers about a hundred instances.
Style opinions (e.g., why a particular change is great/not a good idea) are very welcome; I'm still forming my own.