1 Here's what we did in seminar on Monday 9/13, (Sometimes these notes will expand on things mentioned only briefly in class, or discuss useful tangents that didn't even make it into class.)
6 We mentioned a number of linguistic and philosophical applications of the tools that we'd be helping you learn in the seminar. (We really do mean "helping you learn," not "teaching you." You'll need to aggressively browse and experiment with the material yourself, or nothing we do in a few two-hour sessions will succeed in inducing mastery of it.)
11 * generalized quantifiers are a special case of operating on continuations
13 * (Chris: fill in other applications...)
15 * expressives -- at the end of the seminar we gave a demonstration of modeling [[damn]] using continuations...see the linked summary for more explanation and elaboration
20 * the natural semantics for positive free logic is thought by some to have objectionable ontological commitments; Jim says that thought turns on not understanding the notion of a "union type", and conflating the folk notion of "naming" with the technical notion of semantic value. We'll discuss this in due course.
22 * those issues may bear on Russell's Gray's Elegy argument in "On Denoting"
24 * and on discussion of the difference between the meaning of "is beautiful" and "beauty," and the difference between the meaning of "that snow is white" and "the proposition that snow is white."
26 * the apparatus of monads, and techniques for statically representing the semantics of an imperatival language quite generally, are explicitly or implicitly invoked in dynamic semantics
28 * the semantics for mutation will enable us to make sense of a difference between numerical and qualitative identity---for purely mathematical objects!
30 * issues in that same neighborhood will help us better understand proposals like Kit Fine's that semantics is essentially coordinated, and that `R a a` and `R a b` can differ in interpretation even when `a` and `b` don't
36 1. Declarative vs imperatival models of computation.
37 2. Variety of ways in which "order can matter."
38 3. Variety of meanings for "dynamic."
39 4. Schoenfinkel, Curry, Church: a brief history
40 5. Functions as "first-class values"
41 6. "Curried" functions
44 1. Encoding pairs (and triples and ...)
54 Declarative versus imperative:
56 In a pure declarative language, the order in which expressions are
57 evaluated (reduced, simplified) does not affect the outcome.
59 (3 + 4) * (5 + 11) = 7 * (5 + 11) = 7 * 16 = 112
60 (3 + 4) * (5 + 11) = (3 + 4) * 16 = 7 * 16 = 112
62 In an imperative language, order makes a difference.
75 Declaratives: assertions of statements.
76 No matter what order you assert true facts, they remain true:
78 The value is the product of x and y.
79 x is the sum of 3 and 4.
80 y is the sum of 5 and 11.
83 Imperatives: performative utterances expressing a deontic or bouletic
84 modality ("Be polite", "shut the door")
85 Resource-sensitive, order sensitive:
91 ----------------------------------------------------
93 Untype (monotyped) lambda calculus
97 Variables: x, x', x'', x''', ...
98 (Cheat: x, y, z, x1, x2, ...)
100 Each variable is a term.
101 For all terms M and N and variable a, the following are also terms:
103 (M N) The application of M to N
104 (\a M) The abstraction of a over M
115 ((\x (x x))(\x (x x)))
117 Reduction/conversion/equality:
119 Lambda terms express recipes for combining terms into new terms.
120 The key operation in the lambda calculus is beta-conversion.
122 ((\a M) N) ~~>_beta M{a := N}
124 The term on the left of the arrow is an application whose first
125 element is a lambda abstraction. (Such an application is called a
126 "redex".) The beta reduction rule says that a redex is
127 beta-equivalent to a term that is constructed by replacing every
128 (free) occurrence of a in M by a copy of N. For example,
130 ((\x x) z) ~~>_beta z
131 ((\x (x x)) z) ~~>_beta (z z)
132 ((\x x) (\y y)) ~~>_beta (\y y)
134 Beta reduction is only allowed to replace *free* occurrences of a variable.
135 An occurrence of a variable a is BOUND in T if T has the form (\a N).
136 If T has the form (M N), and the occurrence of a is in M, then a is
137 bound in T just in case a is bound in M; if the occurrence of a is in
138 N, than a is bound in T just in case a is bound in N. An occurrence
139 of a variable a is FREE in a term T iff it is not bound in T.
142 T = (x (\x (\y (x (y z)))))
144 The first occurrence of x in T is free. The second occurrence of x
145 immediately follows a lambda, and is bound. The third occurrence of x
146 occurs within a form that begins with "\x", so it is bound as well.
147 Both occurrences of y are bound, and the only occurrence of z is free.
149 Lambda terms represent functions.
150 All (recursively computable) functions can be represented by lambda
151 terms (the untyped lambda calculus is Turning complete).
152 For some lambda terms, it is easy to see what function they represent:
154 (\x x) the identity function: given any argument M, this function
155 simply returns M: ((\x x) M) ~~>_beta M.
157 (\x (x x)) duplicates its argument:
158 ((\x (x x)) M) ~~> (M M)
160 (\x (\y x)) throws away its second argument:
161 (((\x (\y x)) M) N) ~~> M
165 It is easy to see that distinct lambda terms can represent the same
166 function. For instance, (\x x) and (\y y) both express the same
167 function, namely, the identity function.
169 -----------------------------------------
170 Dot notation: dot means "put a left paren here, and put the right
171 paren as far the right as possible without creating unbalanced
172 parentheses". So (\x(\y(xy))) = \x\y.xy, and \x\y.(z y) x =
173 (\x(\y((z y) z))), but (\x\y.(z y)) x = ((\x(\y(z y))) x).
175 -----------------------------------------
177 Church figured out how to encode integers and arithmetic operations
178 using lambda terms. Here are the basics:
186 Adding two integers involves applying a special function + such that
187 (+ 1) 2 = 3. Here is a term that works for +:
189 + = \m\n\f\x.m(f((n f) x))
192 (((\m\n\f\x.m(f((n f) x))) ;+
196 ~~>_beta targeting m for beta conversion
198 ((\n\f\x.[\f\x.fx](f((n f) x)))
201 \f\x.[\f\x.fx](f(([\f\x.fx] f) x))
203 \f\x.[\f\x.fx](f(fx))
211 ----------------------------------------------------
213 A concrete example: "damn" side effects
215 1. Sentences have truth conditions.
216 2. If "John read the book" is true, then
218 Someone read the book,
219 John did something to the book,
221 3. If "John read the damn book",
222 all the same entailments follow.
223 To a first approximation, "damn" does not affect at-issue truth
225 4. "Damn" does contribute information about the attitude of the speaker
226 towards some aspect of the situation described by the sentence.
230 -----------------------------------------
231 Old notes, no longer operative:
233 1. Theoretical computer science is beautiful.
235 Google search for "anagram": Did you mean "nag a ram"?
236 Google search for "recursion": Did you mean "recursion"?
238 Y = \f.(\x.f (x x)) (\x.f (x x))
241 1. Understanding the meaning(use) of programming languages
242 helps understanding the meaning(use) of natural langauges
244 1. Richard Montague. 1970. Universal Grammar. _Theoria_ 34:375--98.
245 "There is in my opinion no important theoretical difference
246 between natural languages and the artificial languages of
247 logicians; indeed, I consider it possible to comprehend the
248 syntax and semantics of both kinds of languages within a
249 single natural and mathematically precise theory."
253 Function/argument structure:
258 John is his own worst enemy
260 foreach x in [1..10] print x
261 Print every number from 1 to 10
263 3. Possible differences:
267 ?It was four plus seven that John computed 3 multiplied by
268 (compare: John computed 3 multiplied by four plus seven)
271 Time flies like and arrow, fruit flies like a banana.
274 A cloud near the mountain
275 Unbounded numbers of distinct pronouns:
276 f(x1) + f(x2) + f(x3) + ...
277 He saw her put it in ...
278 [In ASL, dividing up the signing space...]
281 2. Standard methods in linguistics are limited.
283 1. First-order predicate calculus
285 Invented for reasoning about mathematics (Frege's quantification)
287 Alethic, order insensitive: phi & psi == psi & phi
288 But: John left and Mary left too /= Mary left too and John left
290 2. Simply-typed lambda calculus
292 Can't express the Y combinator
295 3. Meaning is computation.
297 1. Semantics is programming
299 2. Good programming is good semantics
303 1. Programming technique
309 2. Application to linguistics
320 presupposition failure
321 build into meaning of innocent predicates?