Mercurial > hg > Members > atton > agda > systemT
annotate systemT.agda @ 7:f922e687f3a1
Define multiply
author | Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 21 May 2014 16:05:50 +0900 |
parents | 7138e79615b3 |
children |
rev | line source |
---|---|
1
f300bd2101d3
Define Bool, Int, D and R
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 module systemT where |
f300bd2101d3
Define Bool, Int, D and R
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 |
f300bd2101d3
Define Bool, Int, D and R
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3 data Bool : Set where |
f300bd2101d3
Define Bool, Int, D and R
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 T : Bool |
f300bd2101d3
Define Bool, Int, D and R
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 F : Bool |
f300bd2101d3
Define Bool, Int, D and R
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 |
f300bd2101d3
Define Bool, Int, D and R
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 data Int : Set where |
f300bd2101d3
Define Bool, Int, D and R
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 O : Int |
f300bd2101d3
Define Bool, Int, D and R
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9 S : Int -> Int |
f300bd2101d3
Define Bool, Int, D and R
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10 |
f300bd2101d3
Define Bool, Int, D and R
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 R : {U : Set} -> U -> (U -> (Int -> U)) -> Int -> U |
f300bd2101d3
Define Bool, Int, D and R
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 R u v O = u |
f300bd2101d3
Define Bool, Int, D and R
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
13 R u v (S t) = v (R u v t) t |
f300bd2101d3
Define Bool, Int, D and R
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
14 |
f300bd2101d3
Define Bool, Int, D and R
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
15 D : {U : Set} -> U -> U -> Bool -> U |
f300bd2101d3
Define Bool, Int, D and R
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
16 D u v F = v |
3 | 17 D u v T = u |