0

I have to prove this equation:

foldr f a (xs ++ ys) = foldr f (foldr f a xs) ys

I tried with induction but I couldn't manage to prove it.

mlhack
  • 73
  • 1
  • 4
  • 1
    I'm pretty sure that the RHS needs `xs,ys` to be swapped. See the answer to the duplicate question above. – chi Aug 31 '16 at 08:21
  • 1
    You can expand [`foldr`](http://hackage.haskell.org/package/base-4.9.0.0/docs/Prelude.html#v:foldr) expressions in both sides to prove it directly. – Lee Duhem Aug 31 '16 at 08:37

0 Answers0