Skip to content

Commit

Permalink
Merge pull request #120 from OwenConoly/master
Browse files Browse the repository at this point in the history
add option_map2
  • Loading branch information
samuelgruetter authored Aug 7, 2024
2 parents c1caa08 + 85e5db1 commit 0833256
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/coqutil/Datatypes/Option.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Scheme Equality for option.
Arguments option_beq {_} _ _ _.

Definition option_map2 {X Y Z : Type} (f : X -> Y -> Z) x y :=
match x, y with
| Some x, Some y => Some (f x y)
| _, _ => None
end.

Definition option_relation {A B} R (x : option A) (y : option B) :=
match x with
| None => y = None
Expand Down

0 comments on commit 0833256

Please sign in to comment.