At 19:00 +0100 1998/11/27, Pablo E. Martinez Lopez wrote:
>> This ":=:" is, it seems me, the variation that the Haskell "=" corresponds
>> to, except one then does not indicate the quantity defined, which is
>> causing those ambiguity problems.
>
>I always thought that in Haskell the left hand side is the one being
>defined and the right hand side is the one that provides the value, from
>an operational point of view; from a denotational point of view is just
>an equality.
Well, it seems me that if one writes say
(x + 1) * 2 = f x
as in the example (3) of SPJ, the quantity defined is not "(x + 1) * 2" but
x, or * or something. -- Correct me if I am wrong.
However the quantity defined is in Haskell always on the LHS (left hand
side) even though from the mathematical point of view it need not be: For
example,
f: x = f - 1
defines the function x |-> x + 1.
When resolving such implicit definitions (in the few cases it is possible),
one needs something more sophisticated than the simple pattern matching of
Haskell, like Grobner bases and stuff. But such things are handled by
computer algebra programs.
Hans Aberg
* Email: Hans Aberg <mailto:[EMAIL PROTECTED]>
* Home Page: <http://www.matematik.su.se/~haberg/>
* AMS member listing: <http://www.ams.org/cml/>