edits
authorChris <chris.barker@nyu.edu>
Sun, 22 Feb 2015 14:46:45 +0000 (09:46 -0500)
committerChris <chris.barker@nyu.edu>
Sun, 22 Feb 2015 14:46:45 +0000 (09:46 -0500)
topics/_week5_simply_typed_lambda.mdwn

index cee3f91..a2cb3f5 100644 (file)
@@ -174,23 +174,25 @@ To see this, consider the first three Church numerals (starting with zero):
     \s z . s (s z)
 
 Given the internal structure of the term we are using to represent
     \s z . s (s z)
 
 Given the internal structure of the term we are using to represent
-zero, its type must have the form &rho; --> &sigma; --> $sigma; for
+zero, its type must have the form &rho; --> &sigma; --> &sigma; for
 some &rho; and &sigma;.  This type is consistent with term for one,
 but the structure of the definition of one is more restrictive:
 some &rho; and &sigma;.  This type is consistent with term for one,
 but the structure of the definition of one is more restrictive:
-because the first argument `s` must apply to the second argument `z`,
-the type of the first argument must describe a function from
-expressions of type &sigma; to some other type.  So we can refine &rho;
-by replacing it with the more specific type &sigma; --> &tau;.  At
-this point, the overall type is (&sigma; --> &tau;) --> &sigma; -->
+because the first argument (`s`) must apply to the second argument
+(`z`), the type of the first argument must describe a function from
+expressions of type &sigma; to some result type.  So we can refine
+&rho; by replacing it with the more specific type &sigma; --> &tau;.
+At this point, the overall type is (&sigma; --> &tau;) --> &sigma; -->
 &sigma;.  Note that this refined type remains compatible with the
 &sigma;.  Note that this refined type remains compatible with the
-definition of zero.  Finally, by examinine the definition of two, we
+definition of zero.  Finally, by examinining the definition of two, we
 see that expressions of type &tau; must be suitable to serve as
 see that expressions of type &tau; must be suitable to serve as
-arguments to functions of type &sigma; --> &tau;.  The most general
+arguments to functions of type &sigma; --> &tau;, since the result of
+applying `s` to `z` serves as the argument of `s`.  The most general
 way for that to be true is if &tau; &equiv; &sigma;.  So at this
 way for that to be true is if &tau; &equiv; &sigma;.  So at this
-point, we have the overall type of (&sigma; --> &sigma;) --> &sigma; -->
-&sigma;.
-
+point, we have the overall type of (&sigma; --> &sigma;) --> &sigma;
+--> &sigma;.
 
 
+<!-- Make sure there is talk about unification and computation of the
+principle type-->
 
 ## Predecessor and lists are not representable in simply typed lambda-calculus ##
 
 
 ## Predecessor and lists are not representable in simply typed lambda-calculus ##