-
Notifications
You must be signed in to change notification settings - Fork 297
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] - feat(src/tactic/rcases): rsuffices(I) = suffices + obtain (+ resetI) #15735
Conversation
Can you add some tests/examples? Also why are all these tactics tagged as induction? |
How hard would it be to add a Since this tactic is to PS: I have wanted this tactic to exist literally dozens of times, so thanks for adding it! |
Working on the tests Alex, and I'm not sure but I'll just leave them for consistency with |
I also like the name These are tagged "induction" because they're destructing terms of inductive types. All the tactic tagging is a little ad hoc and open to suggestions. |
|
||
-- This test demonstrates why `focus1` is required in the definition of `rsuffices`; otherwise | ||
-- the `∃ ...` goal would get put _after_ the `true` goal. | ||
example : nonempty ℕ ∧ true := |
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 added some tests; this one I'm not sure what order I prefer for this specific one. This is easily decided by using/not using focus1
, which feels right regardless.
This PR/issue depends on: |
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, thanks!
bors d+
src/tactic/rcases.lean
Outdated
-- TODO: this (I think) resets the instance cache also on the goal you need to make the instance. | ||
-- This is not necessary; do we need this? |
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 it's fine, resetI
is already used in cases where something subtler would suffice. So I'll leave it up to you whether you want to keep this comment for future improvement.
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 actually saw a case where this would be wanted, and I think that's definitely a good enough reason to keep it around. I'll remove the comments!
✌️ ericrbg can now approve this pull request. To approve and merge a pull request, simply reply with |
bors r+ |
…15735) Co-authored-by: Eric Rodriguez <ericrboidi@gmail.com>
Pull request successfully merged into master. Build succeeded: |
rcases x with y
renames #15773