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

Extensionality for fmap on option.

parent 1b8a2e50
No related branches found
No related tags found
No related merge requests found
......@@ -148,6 +148,12 @@ Proof. by destruct x. Qed.
Lemma option_fmap_compose {A B} (f : A B) {C} (g : B C) x :
g f <$> x = g <$> f <$> x.
Proof. by destruct x. Qed.
Lemma option_fmap_ext {A B} (f g : A B) x :
( y, f y = g y) f <$> x = g <$> x.
Proof. destruct x; simpl; auto with f_equal. Qed.
Lemma option_fmap_setoid_ext `{Equiv A, Equiv B} (f g : A B) x :
( y, f y g y) f <$> x g <$> x.
Proof. destruct x; constructor; auto. Qed.
Lemma option_fmap_bind {A B C} (f : A B) (g : B option C) x :
(f <$> x) ≫= g = x ≫= g f.
Proof. by destruct x. Qed.
......
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