Commit 7227cf28 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Looking up into a gmap is a homomorphism.

parent b2ba69ee
......@@ -195,6 +195,10 @@ Implicit Types m : gmap K A.
Implicit Types i : K.
Implicit Types x y : A.
Global Instance lookup_cmra_homomorphism :
UCMRAHomomorphism (lookup i : gmap K A option A).
Proof. split. split. apply _. intros m1 m2; by rewrite lookup_op. done. Qed.
Lemma lookup_opM m1 mm2 i : (m1 ? mm2) !! i = m1 !! i (mm2 = (!! i)).
Proof. destruct mm2; by rewrite /= ?lookup_op ?right_id_L. Qed.
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