Skip to content

Instantly share code, notes, and snippets.

@hughfdjackson
Created September 29, 2014 17:42
Show Gist options
  • Save hughfdjackson/4bb30804e26d3b1a6774 to your computer and use it in GitHub Desktop.
Save hughfdjackson/4bb30804e26d3b1a6774 to your computer and use it in GitHub Desktop.
-- 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
+ 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