-
Notifications
You must be signed in to change notification settings - Fork 197
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
Alternate definitions of rapply #2241
Conversation
92924c4
to
64ee37a
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.
The first commit is pretty good. But I think we should introduce tapply
defined exactly like the old rapply
, so that the code changes can be just a single letter change without extra parentheses and underscores. (However, there are a few cases where the changed code in the first commit is better than it was before. E.g. if rapply
can be changed to exact
without any other changes to the term, then that's better.)
BTW, if we go ahead with this, we need to adjust |
64ee37a
to
9c3e874
Compare
As suggested, I have added primes to a half dozen instances of these tactics to check that the new primed versions work correctly where the original primed versions work correctly. |
2504a8a
to
9f6430f
Compare
abbdf9b
to
e379772
Compare
e379772
to
39dc723
Compare
This is looking very clean. Besides optionally seeing if Jason's suggestions work for us, my only other thought is that we might rename |
39dc723
to
a779b65
Compare
I have force pushed the branch.
I noticed that |
23724de
to
3f4dd0a
Compare
Both versions seem fine to me. Do you have a preference? If we go with Jason's first definition, I think things can be rewritten so that some tactics build on others. For example, I think With Jason's first definition, the meaning of the |
I don't know. |
Going with Jason's third definition (using @Alizter What do you think about renaming |
Seems good to me. |
3f4dd0a
to
1cb4677
Compare
I have reorganized and rewritten the comments in |
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.
LGTM modulo one change in STYLE.md
@Alizter What else are you thinking of changing in this PR? |
@jdchristensen There were a few lines where |
FYI I will attempt to rebase this now. |
My rebase has scrubbed your ownership of the commits @patrick-nicodemus. I will rebase again and add you as the main author. |
62456e2
to
c22c7e3
Compare
I'm not sure what I am doing wrong. @jdchristensen do you remember how to give ownership of a commit? |
I thought that by default an interactive rebase would preserve the commit author. I'm not sure how to fix it, but it must be a common thing to need to adjust so I imagine there's a way. |
My tool (magit) provides a keystroke to set the commit author during a rebase, so I can try to fix these if you want. |
@jdchristensen That would be great, thanks! |
Actually, it looks like the ownership information is correct. Just that the GitHub interface is only showing my picture. Weird. |
@jdchristensen If you do rebase, you might need to do so on top of #2248. |
I agree that the |
I will rebase this again. |
Co-authored-by: Patrick Nicodemus <[email protected]> Co-authored-by: Ali Caglayan <[email protected]>
Co-authored-by: Patrick Nicodemus <[email protected]> Co-authored-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
That's all rebased, and all comments addressed. Merging now. |
Thanks @patrick-nicodemus, great work as always. |
This PR introduces two commits which define slightly different and weaker versions of the
rapply
tactic.The first commit is intended to behave the same way as the original
rapply
wherever it succeeds, but it only succeeds ifnrapply
succeeds.The second commit has a simpler definition but behaves slightly differently. In particular it has different shelving/unshelving behavior for subgoals, so most changes in the second commit are goal renumberings. It is also apparently slightly weaker due to the fact that
typeclasses eauto
is called on each typeclass goal individually, not all goals together.The "unify" tactic in Ltac apparently fails if it does not instantiate all existential variables, so it is not applicable here.