gf-book web page index and toc
This commit is contained in:
1 parent
276327f7f2
commit
e7439d65b0
109 files changed
+491
No files matched your search
@@ -0,0 +1,22 @@
|
||||
abstract Nat = {
|
||||
cat
|
||||
Prop ; -- proposition
|
||||
Nat ; -- natural number
|
||||
data
|
||||
Zero : Nat ; -- 0
|
||||
Succ : Nat -> Nat ; -- the successor of x
|
||||
fun
|
||||
Even : Nat -> Prop ; -- x is even
|
||||
And : Prop -> Prop -> Prop ; -- A and B
|
||||
|
||||
fun one : Nat ;
|
||||
def one = Succ Zero ;
|
||||
|
||||
fun twice : Nat -> Nat ;
|
||||
def twice x = plus x x ;
|
||||
|
||||
fun plus : Nat -> Nat -> Nat ;
|
||||
def
|
||||
plus x Zero = x ;
|
||||
plus x (Succ y) = Succ (plus x y) ;
|
||||
}
|
||||
Reference in new issue
Block a user