Skip to content
Snippets Groups Projects
Verified Commit 462c06f7 authored by Tej Chajed's avatar Tej Chajed
Browse files

Add map_fmap_union for FinMap

parent c6e5d0be
No related branches found
No related tags found
1 merge request!194Add map_fmap_union for FinMap
...@@ -1935,6 +1935,14 @@ Proof. ...@@ -1935,6 +1935,14 @@ Proof.
rewrite lookup_union_Some, !map_filter_lookup_Some by apply map_disjoint_filter. rewrite lookup_union_Some, !map_filter_lookup_Some by apply map_disjoint_filter.
destruct (decide (P (i,x))); naive_solver. destruct (decide (P (i,x))); naive_solver.
Qed. Qed.
Lemma map_fmap_union {A B} (f : A B) (m1 m2 : M A) :
f <$> (m1 m2) = (f <$> m1) (f <$> m2).
Proof.
apply map_eq; intros i. apply option_eq; intros x.
rewrite lookup_fmap, !lookup_union, !lookup_fmap.
destruct (m1 !! i), (m2 !! i); auto.
Qed.
(** ** Properties of the [union_list] operation *) (** ** Properties of the [union_list] operation *)
Lemma map_disjoint_union_list_l {A} (ms : list (M A)) (m : M A) : Lemma map_disjoint_union_list_l {A} (ms : list (M A)) (m : M A) :
......
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