Skip to content
Snippets Groups Projects
Commit 04d0796d authored by Ralf Jung's avatar Ralf Jung
Browse files

show some dec_agree properties

parent 7b0417ad
No related branches found
No related tags found
No related merge requests found
...@@ -48,4 +48,20 @@ Qed. ...@@ -48,4 +48,20 @@ Qed.
Canonical Structure dec_agreeRA : cmraT := discreteRA dec_agree_ra. Canonical Structure dec_agreeRA : cmraT := discreteRA dec_agree_ra.
End dec_agree. (* Some properties of this CMRA *)
\ No newline at end of file Lemma dec_agree_idemp (x : dec_agree A) : x x x.
Proof.
destruct x as [x|]; simpl; repeat (case_match; simpl); try subst; congruence.
Qed.
Lemma dec_agree_op_inv (x1 x2 : dec_agree A) : (x1 x2) x1 x2.
Proof.
destruct x1 as [x1|], x2 as [x2|]; simpl;repeat (case_match; simpl); by subst.
Qed.
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.
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