Commit 833f7c15 authored by Robbert Krebbers's avatar Robbert Krebbers

`to_agree` preserves discrete OFE elements.

parent c136a440
Pipeline #5592 passed with stages
in 9 minutes and 49 seconds
......@@ -166,6 +166,15 @@ Proof.
Global Instance to_agree_proper : Proper (() ==> ()) to_agree := ne_proper _.
Global Instance to_agree_discrete a : Discrete a Discrete (to_agree a).
intros ? y [H H'] n; split.
- intros a' ->%elem_of_list_singleton. destruct (H a) as [b ?]; first by left.
exists b. by rewrite -discrete_iff_0.
- intros b Hb. destruct (H' b) as (b'&->%elem_of_list_singleton&?); auto.
exists a. by rewrite elem_of_list_singleton -discrete_iff_0.
Global Instance to_agree_injN n : Inj (dist n) (dist n) (to_agree).
move=> a b [_] /=. setoid_rewrite elem_of_list_singleton. naive_solver.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment