Created
September 29, 2014 17:42
-
-
Save hughfdjackson/4bb30804e26d3b1a6774 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
-- proving that these are equivalent | |
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 | |
-- want to use the proof here | |
total concat : Vect n a -> Vect m a -> 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 15 col 8: | |
When elaborating right hand side of snoc.concat: | |
Can't unify | |
Vect (S (m + n)) a | |
with | |
Vect (plus m (S n)) a | |
Specifically: | |
Can't unify | |
S (m + n) | |
with | |
plus m (S n) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment