

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


CS 3723 : λ - calculs reference sheet , 1 / 31 / 2008 (Modified: 2 / 21 / 08 )
Notation
Three kinds of λ -terms:
1. variables: x, y, z,... 2. application (function call): MN 3. abstraction (function definition): λ x.M
Free Variables: FV x = {x} FV ( λ x.M) = (FV M) − {x} FV (MN) = (FV M) ∪ (FV N)
Theory
1. α -equivalence, α -renaming λ x.M = α λ y.[y/x ]M
2. β -reduction ( λ x.M)N → β [N^ /x]M 3. β -equivalence ( λ x.M)N = β [N^ /x ]M [N^ /x ]M = β ( λ x.M)N
4. η -eqivalence (not very important) M = η λ x.Mx
[N^ /x]M represents the substution of N for all of the free occurences of x in M. These rules may be applied to individual subterms of a larger term.
Terminology/Concepts
Church-Rosser Theorem (confluence) M = β N ⇒ ∃Z[M → β... → β Z ∧ N → β... → β Z]
normal form result of reducing a λ -term until it cannot be reduced anymore
currying simulating multiple arguments with a higher-order function that takes one argument and returns a function that takes the next argument
Important Functions
1. Identity I ≡ λ x.x
2. Functions Important to Computability
(a) fixed point combinator, Y (builds recursive functions)
Y ≡ λ f .( λ x. f (xx))( λ x. f (xx))
∀F.YF = F(YF)
(b) alternative call-by-value fixed point combinator, Z (usable in Scheme)
Z ≡ λ f .( λ x. f ( λ y.(xx)y))( λ x. f ( λ y.(xx)y)) = η Y
∀F.ZF = F( λ y.(ZF)y) = η F(ZF) (c) Omega, never terminates (undefined)
Ω ≡ ( λ x.xx)( λ x.xx)
3. Church Booleans T ≡ λ x. λ y.x F ≡ λ x. λ y.y if ≡ λ p. λ c. λ a.(pca) and ≡ λ x. λ y.(xy)x or ≡ λ x. λ y.(xx)y
4. Church Numerals 0 ≡ λ f. λ x.x 1 ≡ λ f. λ x. f x 2 ≡ λ f. λ x. f ( f x) 3 ≡ λ f. λ x. f ( f ( f x)) n ≡ λ f. λ x. f n(x) S +^ ≡ λ n. λ f. λ x. f ((n f )x) P −^ ≡ λ n. λ f. λ x.n( λ g. λ h.h(g f ))( λ u.x)( λ u.u)
Sources: Mitchell, Comcepts in Programming Langauges; Hankin, An Introduction to Lambda Calculi for Computer Scientists; Wikipedia, Church encoding; Wikipedia, Fixed point combinator