Mercurial > hg > Papers > 2015 > atton-thesis
annotate src/product.agda @ 41:8fc2ac1f901f
Add delta definition in agda
author | Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 13 Feb 2015 11:48:40 +0900 |
parents | de3397af1f8d |
children |
rev | line source |
---|---|
25
a0d91fbf4876
Add description prove method in agda
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 module product where |
a0d91fbf4876
Add description prove method in agda
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 |
26 | 3 data _×_ (A B : Set) : Set where |
4 <_,_> : A -> B -> A × B | |
25
a0d91fbf4876
Add description prove method in agda
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 |
26 | 6 constructProduct : {A B : Set} -> A -> B -> A × B |
25
a0d91fbf4876
Add description prove method in agda
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 constructProduct a b = < a , b > |
a0d91fbf4876
Add description prove method in agda
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 |
26 | 9 patternMatchProduct : {A B : Set} -> A × B -> B |
25
a0d91fbf4876
Add description prove method in agda
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10 patternMatchProduct (< a , b >) = b |