Skip to content
Snippets Groups Projects
Commit 947cd733 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Use `pointwise_relation` for `mbind`.

This one works for setoid rewriting under binders.
parent 572581f1
No related branches found
No related tags found
No related merge requests found
......@@ -71,10 +71,10 @@ Section setoids_monad.
by rewrite HX, Hf.
Qed.
Global Instance collection_bind_proper {A B} :
Proper (((=) ==> ()) ==> () ==> ()) (@mbind M _ A B).
Proper (pointwise_relation _ () ==> () ==> ()) (@mbind M _ A B).
Proof.
intros f1 f2 Hf X1 X2 HX x. rewrite !elem_of_bind. f_equiv; intros z.
by rewrite HX, (Hf z z).
by rewrite HX, (Hf z).
Qed.
Global Instance collection_join_proper {A} :
Proper (() ==> ()) (@mjoin M _ A).
......@@ -940,8 +940,8 @@ Section collection_monad.
Proper (pointwise_relation _ (=) ==> () ==> ()) (@fmap M _ A B).
Proof. intros f g ? X Y ?; set_solver by eauto. Qed.
Global Instance collection_bind_mono {A B} :
Proper (((=) ==> ()) ==> () ==> ()) (@mbind M _ A B).
Proof. unfold respectful; intros f g Hfg X Y ?; set_solver. Qed.
Proper (pointwise_relation _ () ==> () ==> ()) (@mbind M _ A B).
Proof. unfold respectful, pointwise_relation; intros f g Hfg X Y ?. set_solver. Qed.
Global Instance collection_join_mono {A} :
Proper (() ==> ()) (@mjoin M _ A).
Proof. intros X Y ?; set_solver. Qed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment