Created
September 29, 2014 17:08
-
-
Save hughfdjackson/8d34cb793b17c23614c3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
sPlusAssoc : (m, n: Nat) -> S (m + n) = plus m (S n) | |
sPlusAssoc Z n = refl | |
sPlusAssoc (S m) n = rewrite sPlusAssoc m n in refl | |
total concat : Vect n a | |
-> Vect m a | |
-> replace {P = \k => Vect k a} (sPlusAssoc m n) (Vect (m + n) a) | |
concat (x :: xs) ys = x :: (concat xs ys) | |
concat nil ys = ys |
This file contains hidden or 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
- + Errors (1) | |
`-- tutorial.idr line 16 col 24: | |
When elaborating type of snoc.concat: | |
When elaborating an application of function replace: | |
Can't unify | |
Type | |
with | |
(\k => Vect k a) (S (plus m n)) | |
Specifically: | |
Can't unify | |
Type | |
with | |
(\k => Vect k a) (S (plus m n)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment