Merge branch 'master' of main.jimpryor.net:/srv/lambda/lambda
authorChris <chris.barker@nyu.edu>
Sun, 22 Feb 2015 21:38:28 +0000 (16:38 -0500)
committerChris <chris.barker@nyu.edu>
Sun, 22 Feb 2015 21:38:28 +0000 (16:38 -0500)
topics/week4_fixed_point_combinators.mdwn

index ed22cff..ca9ab64 100644 (file)
@@ -281,7 +281,7 @@ saying that we are looking for a fixed point for `h`:
 
     h LENGTH <~~> LENGTH
 
-Replacing `h` with its definition, we have
+Replacing `h` with its definition, we have:
 
     (\xs. (empty? xs) 0 (succ (LENGTH (tail xs)))) <~~> LENGTH
 
@@ -289,7 +289,17 @@ If we can find a value for `LENGTH` that satisfies this constraint, we'll
 have a function we can use to compute the length of an arbitrary list.
 All we have to do is find a fixed point for `h`.
 
-The strategy we will present will turn out to be a general way of
+Let's reinforce this. The left-hand side has the form:
+
+    (\body. Φ[...body...]) LENGTH
+
+which beta-reduces to:
+
+    Φ[...LENGTH...]
+
+where that whole formula is convertible with the term LENGTH itself. In other words, the term `Φ[...LENGTH...]` contains (a term that convertible with) itself --- despite being only finitely long. (If it had to contain a term *syntactically identical to* itself, this could not be achieved.)
+
+The key to achieving all this is finding a fixed point for `h`. The strategy we will present will turn out to be a general way of
 finding a fixed point for any lambda term.