CS 541 * quiz on the typed lambda calculus ---------------------------------- 1. Give fully parenthesized forms for the following lambda-terms. (Note that the backslash (\) is meant to represent lambda: (a) \x: o -> o -> o . x y z (b) x y \x : o -> o. x y (c) x y (z w) 2. What are the free variables of the following terms? (a) \f:o -> o.(f y) (b) (f (\f:(o->o).f y)) \z:o.z 3. What is the result of the following substitutions? (a) [w/x]((\y:o.x) w) (b) [z/y](\f:o->o.f y) (c) [z/f](\f:o->o.f y) 4. Prove the following type judgements. (a) y:o, z:o |- y:o (b) |- (\x:o.x) : o -> o (c) |- (\f:o->o . \y:o . f(f(y)) : (o->o)->o->o --------------------------------------