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

Add `fmap_Some_1` and `fmap_Some_2`.

parent 6117c3e4
No related branches found
No related tags found
No related merge requests found
......@@ -183,6 +183,11 @@ Proof. unfold is_Some; destruct mx; naive_solver. Qed.
Lemma fmap_Some {A B} (f : A B) mx y :
f <$> mx = Some y x, mx = Some x y = f x.
Proof. destruct mx; naive_solver. Qed.
Lemma fmap_Some_1 {A B} (f : A B) mx y :
f <$> mx = Some y x, mx = Some x y = f x.
Proof. apply fmap_Some. Qed.
Lemma fmap_Some_2 {A B} (f : A B) mx x : mx = Some x f <$> mx = Some (f x).
Proof. intros. apply fmap_Some; eauto. Qed.
Lemma fmap_Some_equiv {A B} `{Equiv B} `{!Equivalence (() : relation B)}
(f : A B) mx y :
f <$> mx Some y x, mx = Some x y f x.
......
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