Skip to content
Snippets Groups Projects
Commit d11b32df authored by Jacques-Henri Jourdan's avatar Jacques-Henri Jourdan
Browse files

New lemma aboud maps : fmap_delete

parent c60a65d1
No related branches found
No related tags found
No related merge requests found
...@@ -527,6 +527,12 @@ Proof. ...@@ -527,6 +527,12 @@ Proof.
- by rewrite lookup_fmap, !lookup_insert. - by rewrite lookup_fmap, !lookup_insert.
- by rewrite lookup_fmap, !lookup_insert_ne, lookup_fmap by done. - by rewrite lookup_fmap, !lookup_insert_ne, lookup_fmap by done.
Qed. Qed.
Lemma fmap_delete {A B} (f: A B) m i: f <$> delete i m = delete i (f <$> m).
Proof.
apply map_eq; intros i'; destruct (decide (i' = i)) as [->|].
- by rewrite lookup_fmap, !lookup_delete.
- by rewrite lookup_fmap, !lookup_delete_ne, lookup_fmap by done.
Qed.
Lemma omap_insert {A B} (f : A option B) m i x y : Lemma omap_insert {A B} (f : A option B) m i x y :
f x = Some y omap f (<[i:=x]>m) = <[i:=y]>(omap f m). f x = Some y omap f (<[i:=x]>m) = <[i:=y]>(omap f m).
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