-
Notifications
You must be signed in to change notification settings - Fork 105
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
add corres_cases method #649
Conversation
dd87188
to
855554c
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 am happy with the methods and the improvement they provide. Nice! I also like that they manage to do what they do concisely. If I tried to to it, it could've ended up an over-engineered mess. This approach ends up very neat.
I do have some difficulty following some of the textual descriptions, and wonder if I'm too ignorant to be the target audience, or whether the descriptions could become easier. A few Englishisms snuck in there as well.
c57a697
to
bae8646
Compare
(updated with Raf's review feedback) |
Last typos, otherwise I'm happy with it, the explanations are now ones I can follow. Thank you! |
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.
Very cool work, the examples demonstrating the reduced need for manual instantiation are particularly encouraging.
My only remaining confusion is why wpc
seems to work in crefine. Do we just avoid the cases where the guards don't depend on the bound variable being split? If so that suggests we might want something very similar to this for ccorres
as well.
I was thinking that the problem doesn't occur in So I think you're right and we should probably be doing the same thing for |
I'll leave Doing All of this now gives me ideas that we could include a thing for |
I don't know about one with |
Right, that's another case we should treat. I should probably start collecting these in an issue. |
Add safe datatype case distinction for corres -- wpc turns out to be insufficient even after generalisation of the helper predicate. - corres_cases_left: case distinction on abstract monad - corres_cases_right: case distinction on concrete monad - corres_cases: try first corres_cases_left, then corres_cases_right - corres_cases_both: simultaneous (quadratic) case distinction on both sides, with safe elimination of trivially contradictory cases. Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
This setup didn't actually work. Replaced by corres_cases. Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
Demonstrates use of corres_cases and corres_cases_both. Main intended benefit is less thinking about safety of schematics, fewer mentions of goal parameter names, and fewer manual guard instantiations. Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
Add safe datatype case distinction for corres -- wpc turns out to be insufficient even after generalisation of the helper predicate.
corres_cases_left
: case distinction on abstract monadcorres_cases_right
: case distinction on concrete monadcorres_cases
: case distinction first of abstract/concrete monadcorres_cases_both
: simultaneous (quadratic) case distinction on both sides, with safe elimination of trivially contradictory casesMain intended benefit is less thinking about safety of schematics, fewer mentions of goal parameter names, and fewer manual guard instantiations.
The PR also removes the old defunct wpc setup for corres and changes a few proofs in refine/ARM to demonstrate how the method is intended to be used.