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

Prove map_to_list {[i:=x]} = [(i,x)].

parent 712e8666
No related branches found
No related tags found
No related merge requests found
...@@ -687,6 +687,12 @@ Proof. ...@@ -687,6 +687,12 @@ Proof.
rewrite elem_of_map_to_list in Hlookup. congruence. rewrite elem_of_map_to_list in Hlookup. congruence.
- by rewrite !map_of_to_list. - by rewrite !map_of_to_list.
Qed. Qed.
Lemma map_to_list_singleton {A} i (x : A) : map_to_list {[i:=x]} = [(i,x)].
Proof.
apply Permutation_singleton. unfold singletonM, map_singleton.
by rewrite map_to_list_insert, map_to_list_empty by auto using lookup_empty.
Qed.
Lemma map_to_list_contains {A} (m1 m2 : M A) : Lemma map_to_list_contains {A} (m1 m2 : M A) :
m1 m2 map_to_list m1 `contains` map_to_list m2. m1 m2 map_to_list m1 `contains` map_to_list m2.
Proof. Proof.
......
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