Mercurial > hg > Members > atton > agda-proofs
annotate sandbox/InferenceTypeComposition.agda @ 29:b8e606ab3a0b
Trying define n-push...
author | atton <atton@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 23 Dec 2016 16:14:36 +0000 |
parents | 723532aa0592 |
children |
rev | line source |
---|---|
23
723532aa0592
Test Implicit inference equivalence of function composition
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 module InferenceTypeComposition where |
723532aa0592
Test Implicit inference equivalence of function composition
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 |
723532aa0592
Test Implicit inference equivalence of function composition
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3 open import Relation.Binary.PropositionalEquality |
723532aa0592
Test Implicit inference equivalence of function composition
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 |
723532aa0592
Test Implicit inference equivalence of function composition
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 infixl 30 _+++_ |
723532aa0592
Test Implicit inference equivalence of function composition
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 -- _+++_ : {A B C : Set} {equiv : B ≡ B} -> (A -> B) -> (B -> C) -> (A -> C) |
723532aa0592
Test Implicit inference equivalence of function composition
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 _+++_ : {A B C : Set} -> (A -> B) -> (B -> C) -> (A -> C) |
723532aa0592
Test Implicit inference equivalence of function composition
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 _+++_ f g = \x -> g (f x) |
723532aa0592
Test Implicit inference equivalence of function composition
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9 |
723532aa0592
Test Implicit inference equivalence of function composition
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10 comp-sample : {A B C D : Set} -> (A -> B) -> (B -> C) -> (C -> D) -> (A -> D) |
723532aa0592
Test Implicit inference equivalence of function composition
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 comp-sample f g h = f +++ g +++ h |