Introduction to Lambda Calculus

1984; Volume: 4; Linguagem: Inglês

ISSN

0028-9825

Autores

Henk Barendregt,

Tópico(s)

Computability, Logic, AI Algorithms

Resumo

ion is said to bind the free variable x in M . E.g. we say that λx.yx has x as bound and y as free variable. Substitution [x := N ] is only performed in the free occurrences of x: yx(λx.x)[x := N ] ≡ yN(λx.x). In calculus there is a similar variable binding. In ∫ b a f(x, y)dx the variable x is bound and y is free. It does not make sense to substitute 7 for x: ∫ b a f(7, y)d7; but substitution for y makes sense: ∫ b a f(x, 7)dx. For reasons of hygiene it will always be assumed that the bound variables that occur in a certain expression are different from the free ones. This can be fulfilled by renaming bound variables. E.g. λx.x becomes λy.y. Indeed, these expressions act the same way: (λx.x)a = a = (λy.y)a and in fact they denote the same intended algorithm. Therefore expressions that differ only in the names of bound variables are identified. 8 Introduction to Lambda Calculus Functions of more arguments Functions of several arguments can be obtained by iteration of application. The idea is due to Schonfinkel (1924) but is often called currying , after H.B. Curry who introduced it independently. Intuitively, if f(x, y) depends on two arguments, one can define Fx = λy.f(x, y), F = λx.Fx. Then (Fx)y = Fxy = f(x, y). (∗) This last equation shows that it is convenient to use association to the left for iterated application: FM1 · · ·Mn denotes (··((FM1)M2) · · ·Mn). The equation (∗) then becomes

Referência(s)