Commit 051644fb authored by Robbert Krebbers's avatar Robbert Krebbers

Extensionality of omap.

parent e23aa096
......@@ -558,6 +558,12 @@ Proof.
intros Hi; apply map_eq; intros i; rewrite !lookup_fmap.
by destruct (m !! i) eqn:?; simpl; erewrite ?Hi by eauto.
Qed.
Lemma omap_ext {A B} (f1 f2 : A option B) m :
( i x, m !! i = Some x f1 x = f2 x) omap f1 m = omap f2 m.
Proof.
intros Hi; apply map_eq; intros i; rewrite !lookup_omap.
by destruct (m !! i) eqn:?; simpl; erewrite ?Hi by eauto.
Qed.
(** ** Properties of conversion to lists *)
Lemma map_to_list_unique {A} (m : M A) i x y :
......
Markdown is supported
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