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(tactic/trunc_cases): a tactic for case analysis on trunc hypotheses #2368
Conversation
semorrison
commented
Apr 9, 2020
I'm about to make this much more useful. WIP for a moment. |
Let's try again. Here's a more powerful version. |
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.
Okay, I think I see what's going on here a bit better. I find the logic of the script hard to parse though -- dos inside of ifs inside of dos inside of ifs inside of binds. Can this be easily refactored so that the three cases are separate methods, and trunc_cases
just does the case analysis and calls the right one?
Co-Authored-By: Rob Lewis <Rob.y.lewis@gmail.com>
Good suggestion, I'll do this tomorrow. |
Thanks, I think that's cleaner! bors r+ |
…ses (#2368) ``` /-- Perform case analysis on a `trunc` expression, preferentially using the recursor `trunc.rec_on_subsingleton` when the goal is a subsingleton, and using `trunc.rec` otherwise. Additionally, if the new hypothesis is a type class, reset the instance cache. -/ ```
Build succeeded |
Pull request successfully merged into master. |
…ses (leanprover-community#2368) ``` /-- Perform case analysis on a `trunc` expression, preferentially using the recursor `trunc.rec_on_subsingleton` when the goal is a subsingleton, and using `trunc.rec` otherwise. Additionally, if the new hypothesis is a type class, reset the instance cache. -/ ```
…ses (leanprover-community#2368) ``` /-- Perform case analysis on a `trunc` expression, preferentially using the recursor `trunc.rec_on_subsingleton` when the goal is a subsingleton, and using `trunc.rec` otherwise. Additionally, if the new hypothesis is a type class, reset the instance cache. -/ ```
…ses (leanprover-community#2368) ``` /-- Perform case analysis on a `trunc` expression, preferentially using the recursor `trunc.rec_on_subsingleton` when the goal is a subsingleton, and using `trunc.rec` otherwise. Additionally, if the new hypothesis is a type class, reset the instance cache. -/ ```