expand assignment 2
[lambda.git] / assignment2.mdwn
index 04c3a28..f6bde83 100644 (file)
@@ -1,3 +1,39 @@
+More Lambda Practice
+--------------------
+
+Insert all the implicit `( )`s and <code>&lambda;</code>s into the following abbreviated expressions:
+
+1.     `x x (x x x) x`
+2.     `v w (\x y. v x)`
+3.     `(\x y. x) u v`
+4.     `w (\x y z. x z (y z)) u v`
+
+Mark all occurrences of `x y` in the following terms:
+
+<OL start=5>
+<LI>`(\x y. x y) x y`
+<LI>`(\x y. x y) (x y)`
+<LI> `\x y. x y (x y)`
+</OL>
+
+Reduce to beta-normal forms:
+
+<OL start=8>
+<LI>`(\x. x (\y. y x)) (v w)`
+<LI>`(\x. x (\x. y x)) (v w)`
+<LI>`(\x. x (\y. y x)) (v x)`
+<LI>`(\x. x (\y. y x)) (v y)`
+
+<LI>`(\x y. x y y) u v`
+<LI>`(\x y. y x) (u v) z w`
+<LI>`(\x y. x) (\u u)`
+<LI>`(\x y z. x z (y z)) (\u v. u)`
+</OL>
+
+
+Lists and Numbers
+-----------------
+
 We'll assume the "Version 3" implementation of lists and numbers throughout. So:
 
 <pre><code>zero &equiv; \s z. z