


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!



Homework 2 Due: November 5, 2008 in discussion section Lambda Calculus Problems
(b) ( λx. x z) λy. w λw. w y z x Answer: (c) λx. x y λx. y x Answer: If you have any doubt about how to parse these terms, please come to office hours, since misunderstanding this will likely cause you to make mistakes on the rest of the homework.
(b) Show the result of applying beta reduction to the expression (S (K S) K) x y z until no more beta reductions can be applied. Answer: (S (K S) K) x y z = ( λx. λy. λz. (x z (y z)) ) (KS) K) x y z > ( λ y. λz. ((KS) z (y z)) ) K) x y z > ( λz. ((KS) z (K z)) ) x y z > ( λz. (S (K z)) ) x y z > (S (K x)) y z = ( λ x. λy. λz. (x z (y z)) (K x) ) y z > ( λ y. λz. ( (K x) z (y z)) ) y z > ( λ y. λz. (x (y z)) ) y z > ( λ z. (x (y z)) )z > (x (y z)) > x y z