-
Notifications
You must be signed in to change notification settings - Fork 108
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
Monads: resync trace monad with nondet #782
Conversation
lib/Monads/trace/Trace_More_RG.thy
Outdated
lemma gets_inv_rg[simp]: | ||
"\<lbrace>P\<rbrace>,\<lbrace>R\<rbrace> gets f \<lbrace>G\<rbrace>,\<lbrace>\<lambda>_. P\<rbrace>" | ||
by (simp add: gets_def, wp) |
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.
Do we want to replicate the simp
/iff
etc attributes in the trace monad? Might be our chance for getting a cleaner setup on the trace side.
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.
Good point, although in that case I'd be tempted to remove these inv rules again. In these cases the standard wp
rules should be fine, if not better.
lib/Monads/trace/Trace_RG.thy
Outdated
lemma return_inv_rg[iff]: | ||
"\<lbrace>Q\<rbrace>,\<lbrace>R\<rbrace> return x \<lbrace>G\<rbrace>,\<lbrace>\<lambda>_. Q\<rbrace>" |
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.
If we decide to not do the attributes, this is another one
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.
Looks good, modulo the simp/iff attribute question. I think I'd prefer to try without, but am open to arguments.
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.
Looks good. Not quite following what Gerwin's saying about the attributes, but it sounds like a good idea.
Roughly, my interpretation of it is that these lemmas being |
1bc2a87
to
3bf5137
Compare
Changes since the reviews are that I've removed the inv lemmas pointed out by @lsf37, which I think are unnecessary, and pulled in new lemmas to |
👍 Happy with that. |
Signed-off-by: Corey Lewis <[email protected]>
3bf5137
to
4b0305e
Compare
Some local changes I had that I forgot to add to #765. Now that I'm not removing these lemmas from the Nondet Monad, the Trace Monad should have them as well.