Skip to content
Snippets Groups Projects
Commit 7227cf28 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Looking up into a gmap is a homomorphism.

parent b2ba69ee
No related branches found
No related tags found
No related merge requests found
...@@ -195,6 +195,10 @@ Implicit Types m : gmap K A. ...@@ -195,6 +195,10 @@ Implicit Types m : gmap K A.
Implicit Types i : K. Implicit Types i : K.
Implicit Types x y : A. 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)). Lemma lookup_opM m1 mm2 i : (m1 ? mm2) !! i = m1 !! i (mm2 ≫= (!! i)).
Proof. destruct mm2; by rewrite /= ?lookup_op ?right_id_L. Qed. Proof. destruct mm2; by rewrite /= ?lookup_op ?right_id_L. Qed.
......
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