Skip to content

Instantly share code, notes, and snippets.

@mzp
Last active August 29, 2015 14:04
Show Gist options
  • Save mzp/c02f89d52b861402f74e to your computer and use it in GitHub Desktop.
Save mzp/c02f89d52b861402f74e to your computer and use it in GitHub Desktop.
(* compile with Coq 8.4pl2 *)
Fixpoint evenb (n:nat) : bool :=
match n with
| O => true
| S O => false
| S (S n') => evenb n'
end.
Definition negb (b:bool) : bool :=
match b with
| true => false
| false => true
end.
Definition oddb (n:nat) : bool := negb (evenb n).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment