Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

further question on lambda

6 views
Skip to first unread message

Otto Mok

unread,
Jan 27, 1998, 3:00:00 AM1/27/98
to

In article <Pine.SOL.3.95q.98012...@hypatia.math.uwaterloo.ca>,
Christoph <cmma...@hypatia.math.uwaterloo.ca> wrote:
>
>
>Am I right that the following expressions
> ((fun x fun y y x y) b y b) k))
> ((fun x (fun y y x y) k ) b y b)
>both evaluate to
> k b y b k
>?
>
I think they both evaluate to
k (b y b) k
Right?

Otto out!
--
=======================================================================
Otto Mok mailto:om...@undergrad.math.uwaterloo.ca
4B Computer Science with Electrical Engineering Electives
University of Waterloo http://www.undergrad.math.uwaterloo.ca/~omok/

Gordon V. Cormack

unread,
Jan 27, 1998, 3:00:00 AM1/27/98
to

In article <EnFLB...@undergrad.math.uwaterloo.ca>,


No.

(((fun x fun y y x y) b y b) k)

=beta (((fun y y b y) y b) k)
=beta ((y b y b) k)



((fun x (fun y y x y) k ) b y b)

=beta ((fun y y b y) k y b)
=beta (k b k y b)

maybe you meant

(((fun x fun y y x y) (b y b)) k)

=beta ((fun y' y' (b y b) y') k)
=beta (k (b y b) k)

((fun x (fun y y x y) k ) (b y b))

=beta ((fun y' y' (b y b) y') k )
=beta (k (b y b) k)

--
Gordon V. Cormack CS Dept, University of Waterloo, Canada N2L 3G1
gvco...@uwaterloo.ca http://cormack.uwaterloo.ca/cormack

Caroline Kierstead

unread,
Jan 27, 1998, 3:00:00 AM1/27/98
to

In article <EnG1q...@undergrad.math.uwaterloo.ca>,

Gordon V. Cormack <gvco...@plg.uwaterloo.ca> wrote:
>
>(((fun x fun y y x y) b y b) k)
>
>=beta (((fun y y b y) y b) k)
>=beta ((y b y b) k)
>
Ok, now I'm really confused. I can see that you're
substituting the 'b' for the 'x', but why wouldn't
you substitute "b y b" in instead? Isn't "byb" the
entire expression being applied to (fun y y x y)?
If not, why not? That doesn't seem to match up to
the parenthesization implied in the assignment.
(Or I've completely misunderstood which is also
quite possible.)

Robert Bridson

unread,
Jan 27, 1998, 3:00:00 AM1/27/98
to

In article <EnG6D...@undergrad.math.uwaterloo.ca>,

Caroline Kierstead <ctki...@undergrad.math.uwaterloo.ca> wrote:
>In article <EnG1q...@undergrad.math.uwaterloo.ca>,
>Gordon V. Cormack <gvco...@plg.uwaterloo.ca> wrote:
>>
>>(((fun x fun y y x y) b y b) k)
>>
>>=beta (((fun y y b y) y b) k)
>>=beta ((y b y b) k)
>>
>Ok, now I'm really confused. I can see that you're
>substituting the 'b' for the 'x', but why wouldn't
>you substitute "b y b" in instead? Isn't "byb" the
>entire expression being applied to (fun y y x y)?

Function application is left-to-right (with higher priority than abstraction).
So for example, ((fun x x x) a b c) is fully parenthesized as:
((( (fun x (x x)) a)b)c)
and not as:
((fun x (x x)) (a b c))

Robert

Gordon V. Cormack

unread,
Jan 28, 1998, 3:00:00 AM1/28/98
to

In article <EnGzz...@undergrad.math.uwaterloo.ca>,

Caroline Kierstead <ctki...@undergrad.math.uwaterloo.ca> wrote:
>> ((fun x (x x)) (a b c))
>
>If association is left-to-right, then shouldn't the a b c
>be bracketed as ((a b) c)?

(a b c) and ((a b) c) are equivalent according to the priority rules.

Caroline Kierstead

unread,
Jan 28, 1998, 3:00:00 AM1/28/98
to

In article <EnGL...@undergrad.math.uwaterloo.ca>,

Robert Bridson <rebr...@undergrad.math.uwaterloo.ca> wrote:
>
>Function application is left-to-right (with higher priority than abstraction).
>So for example, ((fun x x x) a b c) is fully parenthesized as:
> ((( (fun x (x x)) a)b)c)
>and not as:
0 new messages