Created
March 28, 2014 08:44
-
-
Save qnighy/9828159 to your computer and use it in GitHub Desktop.
This file contains 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
CoInductive cnat : Set := | |
| O : cnat | S : cnat -> cnat. | |
CoFixpoint cplus n m := | |
match n with | |
| O => m | |
| S p => S (cplus p m) | |
end. | |
(* mm1 means m - 1 *) | |
CoFixpoint cmultp1 n mm1 := | |
match n with | |
| O => O | |
| S p => S (cplus mm1 (cmultp1 p mm1)) | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment