Using the rocq-coinduction library#285
Conversation
|
Thanks Roger! @Lysxia : This PR by @rogerburtonpatel should superseed both partial starts at substituting paco for Damien Pous's library. It will need significant reviewing, cleaning, and discussion as to whether it should eventually lead to a new main release for the library, or as a parallel branch for now. At a very rough grain, the changes can be abstracted as:
|
|
Thanks @rogerburtonpatel! I opened a PR to change the dependency (e.g. in I wasn't sure whether |
rudynicolop
left a comment
There was a problem hiding this comment.
Should mentions of coq-paco be replaced with rocq-coinduction?
Change paco dep to rocq-coinduction
|
|
||
| (* Bind closure and bind lemmas. *) | ||
|
|
||
| Section RuttBind. |
There was a problem hiding this comment.
I may have spoken too soon 😅. I have some proposed helper lemmas for ITree.bind and rutt reasoning in coinduction proofs here: rogerburtonpatel#2
Admittedly, my proposed changes to Eq/Rutt.v may not be the most efficient.
This relates to the zulip discussion here: https://rocq-prover.zulipchat.com/#narrow/channel/394939-Interaction-Trees/topic/coinduction.20plugin/near/608963250
There was a problem hiding this comment.
What "efficiency" issue do you have in mind? From a quick glance that looks reasonable, Thanks for the contribution!
There was a problem hiding this comment.
I wasn't sure if/how there was a way to move the parameters for rutt_ and rutt_mon without breaking up the RuttF section?
There was a problem hiding this comment.
Ah I see I didn't notice this issue, indeed that forces the swap between the quantification on REv/RAns and R1/R2. That being said I would rather say that this swap is welcome and should be propagated to rutt rather than swap the order between ruttF and rutt as you did.
There was a problem hiding this comment.
If the parameter order for rutt is swapped could this complicate the signature for some of the Proper instances, such as rutt_Proper_R: https://rocq-prover.zulipchat.com/#narrow/channel/394939-Interaction-Trees/topic/coinduction.20plugin/near/609032183
(My apologies, I may be misunderstanding something, just double-checking).
There was a problem hiding this comment.
Ah I'm actually understanding the problem you were pointing at only now, that's indeed a bit annoying. Presumably you could simply split that into two lemmas, one Proper (eq_REv ==> eq_RAns ==> eq ==> eq ==> eq ==> eq ==> eq ==> iff) .. and then one Proper (@eq_rel R1 R2 ==> ....) (@rutt E1 E2 REv RAns R1 R2)?
PR to pull the port of ITrees from paco to enhanced coinduction.
Of note, the ITreePredicatesExamples.v file needs to be rewritten.