
I am afraid I am still confused.
foo [] = ... foo (x:xs) = ... There is an implied: foo _|_ = _|_ The right side cannot be anything but _|_. If it could, then that would imply we could solve the halting problem:
in a proof, how I could say the right side must be _|_ without defining foo _|_ = _|_ ? and in the case of
bad () = _|_ bad _|_ = ()
mean not every function with a _|_ input will issue a _|_ output, so we have to say what result will be issued by a _|_ input in the definitions of the functions if we want to prove the equvalence between them?
However, in the case of map f _|_ , I do believe the result will be _|_ since it can not be anything else, but how I could prove this? any clue?
ps, the definition of map does not mention anything about _|_ .
Thanks
Raeck
From: Luke Palmer
Sent: Wednesday, December 31, 2008 10:43 PM
To: Max.cs ; raeck@msn.com
Subject: Re: [Haskell-cafe] bottom case in proof by induction
On Wed, Dec 31, 2008 at 3:28 PM, Max.cs
From a mathematical perspective, that's why you can't pattern match on _|_.
From an operational perspective, it's just that _|_ means "never terminates", and we can't determine that, because we would try to run it "until it doesn't terminate", which is meaningless...
Luke