deleted monday notes
[lambda.git] / week1.mdwn
index 815cdf3..a181ea6 100644 (file)
@@ -154,47 +154,53 @@ Shorthand
 The grammar we gave for the lambda calculus leads to some verbosity. There are several informal conventions in widespread use, which enable the language to be written more compactly. (If you like, you could instead articulate a formal grammar which incorporates these additional conventions. Instead of showing it to you, we'll leave it as an exercise for those so inclined.)
 
 
-**Dot notation** Dot means "put a left paren here, and put the right
-paren as far the right as possible without creating unbalanced
-parentheses". So:
+**Parentheses** Outermost parentheses around applications can be dropped. Moreover, applications will associate to the left, so `M N P` will be understood as `((M N) P)`. Finally, you can drop parentheses around abstracts, but not when they're part of an application. So you can abbreviate:
 
-       (\x (\y (x y)))
+       (\x (x y))
 
-can be abbreviated as:
+as:
+
+       \x (x y)
 
-       (\x (\y. x y))
+but you should include the parentheses in:
+
+       (\x (x y)) z
 
 and:
 
-       (\x (\y. (z y) z))
+       z (\x (x y))
+
 
-would abbreviate:
+**Dot notation** Dot means "put a left paren here, and put the right
+paren as far the right as possible without creating unbalanced
+parentheses". So:
 
-       (\x (\y ((z y) z)))
+       \x (\y (x y))
 
-This on the other hand:
+can be abbreviated as:
 
-       (\x (\y. z y) z)
+       \x (\y. x y)
 
-would abbreviate:
+and that as:
 
-       (\x (\y (z y)) z)
+       \x. \y. x y
 
-**Parentheses** Outermost parentheses around applications can be dropped. Moreover, applications will associate to the left, so `M N P` will be understood as `((M N) P)`. Finally, you can drop parentheses around abstracts, but not when they're part of an application. So you can abbreviate:
+This:
 
-       (\x. x y)
+       \x. \y. (x y) x
 
-as:
+abbreviates:
 
-       \x. x y
+       \x (\y ((x y) x))
 
-but you should include the parentheses in:
+This on the other hand:
 
-       (\x. x y) z
+       (\x. \y. (x y)) x
 
-and:
+abbreviates:
+
+       ((\x (\y (x y))) x)
 
-       z (\x. x y)
 
 **Merging lambdas** An expression of the form `(\x (\y M))`, or equivalently, `(\x. \y. M)`, can be abbreviated as: