[Haskell-cafe] Induction (help!)

PR Stanley prstanley at ntlworld.com
Wed May 7 17:27:55 EDT 2008


Hi
One of you chaps mentioned the Nat data type
data Nat = Zero | Succ Nat

Let's have
add :: Nat -> Nat -> Nat
add Zero n = n
add (Succ m)n = Succ (add m n)

Prove
add m Zero = m

I'm on the verge of giving up on this. :-(
Cheers
Paul



More information about the Haskell-Cafe mailing list