On 30 Dec 2010, at 03:05, Mark Spezzano wrote:
... regarding formal definitions of FREE and BOUND variables he
gives Defn 5.2 as
It is the occurrence of a variable that is free or bound. An
occurrence of a variable is bound if it is in the scope of something
that binds it; otherwise it
Hi,
the definition in the book is a syntactic one, you are not allowed to
beta-reduce when applying the definition.
In particular
E = E1 E2 = (\x.xy)(\z.z)
The definition speaks about the term
(\x.xy)(\z.z) and not about (\z.z)y
and the definition does not speak about occurences of
On Thu, Dec 30, 2010 at 02:20:34PM +1030, Mark Spezzano wrote:
5.3 BOUND:
=
If E1 = \x.xy then x is bound
If E2 = \z.z then is not even mentioned
So E = E1 E2 = (\x.xy)(\z.z) = (\z.z)y -- Error: x is not bound but
should be by the rule of 5.3
Your final = here is beta equality.
Hi,
Presently I am going through AJT Davie's text An Introduction to Functional
Programming Systems Using Haskell.
On page 84, regarding formal definitions of FREE and BOUND variables he gives
Defn 5.2 as
The variable X is free in the expression E in the following cases
a) omitted
b) If E
Was there a typo in your email? Because those two definitions appear
identical. I could be missing something - I haven't read that book.
Antoine
On Wed, Dec 29, 2010 at 9:05 PM, Mark Spezzano
mark.spezz...@chariot.net.au wrote:
Hi,
Presently I am going through AJT Davie's text An Introduction
Duh, Sorry. Yes, there was a typo
the second one should read
If E is a combination E1 E2 then X is bound in E if and only if X is bound in
E1 or is bound in E2.
Apologies for that oversight!
Mark
On 30/12/2010, at 1:21 PM, Antoine Latter wrote:
Was there a typo in your email? Because
On Wed, Dec 29, 2010 at 9:22 PM, Mark Spezzano mark.spezz...@chariot.net.au
wrote:
Duh, Sorry. Yes, there was a typo
the second one should read
If E is a combination E1 E2 then X is bound in E if and only if X is bound
in E1 or is bound in E2.
Seems odd. I recommend you always work from
Hi all,
Thanks for your comments
Maybe I should clarify...
For example,
5.2 FREE:
If E1 = \y.xy then x is free
If E2 = \z.z then x is not even mentioned
So E = E1 E2 = x (\z.z) and x is free as expected
So E = E2 E1 = \y.xy and x is free as expected
5.3 BOUND:
=
If E1 =
Mark,
Whether a variable is bound or free depends on the scope under consideration. In
(\x. x) (\y. x)
the variable x is bound in \x. x, but free in \y. x; hence, it's free in (\x.
x) (\y. x) as a whole. However, in
\x. (\x. x) (\y. x)
it's bound...
HTH,
Stefan