

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!


1.0 Initial Release.
1.1 Updated the title, corrected a few typos, added a clarifiaction to problem 3.
1.2 Added “in f” to problem 2.
Your answers to the following questions are to be hand-written neatly or printed on one or more sheets of paper, each with your name in the upper right corner. The homework is to be turned in to my administrative assistant, Andrea Whitesell in 2106 Siebel Center by 9:00am of Wednesday 18 October 2006. Alternately, you may hand it to Prof. Elsa Gunter in person before the deadline.
The purpose of this HW is to test your understanding of
Another purpose of HW2 is to provide you with experience answering non-programming written questions of the kind you may experience on the midterm and final. Caution: It is strongly advised that you know how to do these problems before the midterm.
4 Problems
{p(B, C) = p(l(n), l(p(B, A))), f (A, D) = f (A, p(l(n), C))}
{ } ` (let f = let rec f = fun a -> fun b -> if a = 0 then b else f (a - 1) (b + 1) in fun x -> f x x in f) : int -> int
(λx.λz.x(λu.λy.y)(xzz))((λu.λv.u(uv))(λw.λz.wz))(λx.λy.yx)
reduce this term as much as possible using each of
Label each step of reduction with the rule justifying it. You do not need to label uses of congruence.
type ’a list = Nil | Cons of (’a (^) * (’a list))
When translating to a lambda term, Cons should be treated as curried.