Last active
December 1, 2019 10:25
-
-
Save Pitometsu/7282344908f425ff345af7e437c114e2 to your computer and use it in GitHub Desktop.
Even: Coq to OCaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type _ num = | |
| Zero : zero num | |
| Succ : ('a num) -> 'a plus num | |
and _ plus = Plus : 'a num -> 'a plus | |
and zero = [ ] | |
;; | |
type _ even = | |
| Even_0 : zero num even | |
| Even_S : 'a num odd -> 'a plus num even | |
and _ odd = | |
| Odd_S : 'a num even -> 'a plus num odd | |
;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Inductive even : N -> Prop := | |
| even_0 : even 0 | |
| even_S n : odd n -> even (n + 1) | |
with odd : N -> Prop := | |
| odd_S n : even n -> odd (n + 1). |
Author
Pitometsu
commented
Dec 1, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment