Commit 04d0796d authored by Ralf Jung's avatar Ralf Jung
Browse files

show some dec_agree properties

parent 7b0417ad
......@@ -48,4 +48,20 @@ Qed.
Canonical Structure dec_agreeRA : cmraT := discreteRA dec_agree_ra.
End dec_agree.
\ No newline at end of file
(* Some properties of this CMRA *)
Lemma dec_agree_idemp (x : dec_agree A) : x x x.
destruct x as [x|]; simpl; repeat (case_match; simpl); try subst; congruence.
Lemma dec_agree_op_inv (x1 x2 : dec_agree A) : (x1 x2) x1 x2.
destruct x1 as [x1|], x2 as [x2|]; simpl;repeat (case_match; simpl); by subst.
Lemma dec_agree_equivI {M} a b : (DecAgree a DecAgree b)%I (a = b : uPred M)%I.
Proof. split. by case. by destruct 1. Qed.
Lemma dec_agree_validI {M} (x y : dec_agreeRA) : (x y) (x = y : uPred M).
Proof. intros r n _ ?. by apply: dec_agree_op_inv. Qed.
End dec_agree.
Supports Markdown
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