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

add pair_included, auth_frag_core, singleton_core_total

parent edeba745
No related branches found
No related tags found
No related merge requests found
......@@ -286,6 +286,8 @@ Lemma auth_frag_op a b : ◯ (a ⋅ b) = ◯ a ⋅ ◯ b.
Proof. done. Qed.
Lemma auth_frag_mono a b : a b a b.
Proof. intros [c ->]. rewrite auth_frag_op. apply cmra_included_l. Qed.
Lemma auth_frag_core a : core ( a) = (core a).
Proof. done. Qed.
Global Instance auth_frag_sep_homomorphism :
MonoidHomomorphism op op () (@auth_frag A).
......
......@@ -1221,6 +1221,9 @@ Section prod.
Proof. done. Qed.
Lemma pair_valid (a : A) (b : B) : (a, b) a b.
Proof. done. Qed.
Lemma pair_included (a a' : A) (b b' : B) :
(a, b) (a', b') a a' b b'.
Proof. apply prod_included. Qed.
Lemma pair_core `{!CmraTotal A, !CmraTotal B} (a : A) (b : B) :
core (a, b) = (core a, core b).
......
......@@ -292,6 +292,9 @@ Lemma singleton_core' (i : K) (x : A) cx :
Proof.
intros (cx'&?&->)%equiv_Some_inv_r'. by rewrite (singleton_core _ _ cx').
Qed.
Lemma singleton_core_total `{!CmraTotal A} (i : K) (x : A) :
core ({[ i := x ]} : gmap K A) = {[ i := core x ]}.
Proof. apply singleton_core. rewrite cmra_pcore_core //. Qed.
Lemma singleton_op (i : K) (x y : A) :
({[ i := x y ]} : gmap K A) = {[ i := x ]} {[ i := y ]}.
Proof. symmetry. by apply (merge_singleton _ _ _ x y). Qed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment