cable 3.2 lambda notation

6
Seth Cable Semantics and Generative Grammar Fall 2009 Ling610 10 5. Lambda Notation (Lambda Calculus) As you may have guessed by this point, most expressions of natural language will have some kind of function as their extension… …so, it would be good to have a compact notation for the representation of functions! (21) Lambda Notation, Part 1 a. Syntax: [ !x : x " D Y . Predicate(x) ] b. Semantics: f: D Y ! D t for every x " D Y , f(x) = T iff Predicate(x) c. Examples: (i) [[ smokes ]] = [ !x : x " D e . x smokes ] (ii) [[ it is not the case that ]] = [ !x : x " D t . x = F ] (22) Lambda Notation: Functions Taking Arguments [ !x : ](argument) a. [ !x : x " D e . x smokes ](Obama) = T b. [ !x : x " D e . x smokes ](Seth) = F c. [ !x : x " D t . x = F ](T) = F OK… but what about functions like “likes”, which yield other functions as values? (23) Lambda Notation, Part 2 a. Syntax: [!x : x " D Y . [ !y : y " D Z . …(x,y)… ] ] b. Semantics: The function which takes as argument an entity x from D Y , and returns the function [ !y : x " D Z . …(x,y)… ] c. Examples: (i) [!x : x " D e . [ !y : y " D e . y likes x ] ] (= [[likes]]) (ii) [!x : x " D e . [ !y : y " D e . [ !z : z " D e . z gave x y ] ] ] ( =? [[gave]] )

Upload: nifflheim

Post on 07-Apr-2015

153 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Cable 3.2 Lambda Notation

Seth Cable Semantics and Generative Grammar

Fall 2009 Ling610

10

5. Lambda Notation (Lambda Calculus)

As you may have guessed by this point, most expressions of natural language will have some

kind of function as their extension…

…so, it would be good to have a compact notation for the representation of functions!

(21) Lambda Notation, Part 1

a. Syntax: [ !x : x " DY . Predicate(x) ]

b. Semantics: f: DY ! Dt

for every x " DY , f(x) = T iff Predicate(x)

c. Examples:

(i) [[ smokes ]] = [ !x : x " De . x smokes ]

(ii) [[ it is not the case that ]] = [ !x : x " Dt . x = F ]

(22) Lambda Notation: Functions Taking Arguments

[ !x : … ](argument)

a. [ !x : x " De . x smokes ](Obama) = T

b. [ !x : x " De . x smokes ](Seth) = F

c. [ !x : x " Dt . x = F ](T) = F

OK… but what about functions like “likes”, which yield other functions as values?

(23) Lambda Notation, Part 2

a. Syntax: [!x : x " DY . [ !y : y " DZ . …(x,y)… ] ]

b. Semantics: The function which takes as argument an entity x from DY,

and returns the function [ !y : x " DZ . …(x,y)… ]

c. Examples:

(i) [!x : x " De . [ !y : y " De . y likes x ] ] (= [[likes]])

(ii) [!x : x " De . [ !y : y " De . [ !z : z " De . z gave x y ] ] ] ( =? [[gave]] )

Page 2: Cable 3.2 Lambda Notation

Seth Cable Semantics and Generative Grammar

Fall 2009 Ling610

11

(24) Important Technical Side-Note

Given our two separate statements in (21) and (23), there seems to be a prima facie

ambiguity in our lambda-notation:

• If there is no other lambda to the right of a lambda-operator, you read the formula

‘[!x : x " DY . Predicate(x) ]’ as: ‘The function that takes x and gives T iff

Predicate(x)’

• If there is another lambda to the right of a lambda operator, you read the formula

‘[!x : x " DY . [ !y : y " DZ . …(x,y)… ] ]’ as: ‘The function that takes x and gives

the function ‘[ !y : y " DZ . …(x,y)… ]’

If one explores the formal foundations of ‘lambda calculus’, you’ll find that this apparent

ambiguity is only apparent, but it’s something to bear in mind when reading formulae…

(25) Sequences of Arguments in Lambda Notation

a. Question:

Suppose that Obama likes Joe, but Joe doesn’t like Obama.

What is the value of the following formula – True or False?

[!x : x " De . [ !y : y " De . y likes x ] ](Obama)(Joe)

b. Issue:

We don’t know yet, since we’ve not set any conventions for reading sequences of

arguments in our lambda notation!

c. The Convention:

For a given function ‘[!x : x " DY … ]’, its argument occurs directly following its

final right bracket.

d. Illustrations:

(i) [!x : x " De . [ !y : y " De . y likes x ] ](Obama)(Joe) =

[ !y : y " De . y likes Obama ](Joe) = F

(ii) [!x : x " De . [ !y : y " De . y likes x ](Obama) ](Joe) =

[ !y : y " De . y likes Joe ](Obama) = T

Page 3: Cable 3.2 Lambda Notation

Seth Cable Semantics and Generative Grammar

Fall 2009 Ling610

12

(26) The Rule of Lambda Conversion (LC)

The following equation already follows from our notation, but the steps in our semantic

proofs will often make appeal to it, and so it helps to dignify it with a name of sorts:

[!x : x " DY . [ !y : y " DZ . …(x,y)… ] ](z) = [ !y : y " DZ . …(z,y)… ]

(27) Sample Derivation of Truth-Conditions Within Our Augmented System

a. ‘ S ’ is T iff (by notation)

NP VP

Obama V NP

likes

Joe

b. [[ S ]] = T iff (by FA)

c. [[ VP ]]([[NP]]) = T iff (by NN x2)

d. [[ VP ]]([[Obama]]) = T iff (by TN)

e. [[ VP ]](Obama) = T iff (by FA)

f. [[likes]]([[NP]])(Obama) = T iff (by NN x2)

g. [[likes]]([[Joe]])(Obama) = T iff (by TN)

h. [[likes]](Joe)(Obama) = T iff (by TN)

i. [!x : x " De . [ !y : y " De . y likes x ] ](Joe)(Obama) = T iff (by LC)

j. [ !y : y " De . y likes Joe ](Obama) = T iff

k. Obama likes Joe

(28) Some Important Abbreviations

Compact as our lambda notation is, we’ll occasionally want to use even shorter formulae

when certain information is already clear from context.

[ !y : y " DX . …. ] = (i) [ !y " DX : …. ]

(ii) [ !yX : …. ]

(iii) when it’s clear from context what the type of the

variable y is…

[ !y : … ]

Page 4: Cable 3.2 Lambda Notation

Seth Cable Semantics and Generative Grammar

Fall 2009 Ling610

13

6. Functions with Functions in their Domain

As we’ve seen, our ‘type theory’ and our lambda notation allow us construct a wide range of

functions to serve as the extensions of natural language expressions.

So far, the functions we’ve constructed have taken either entities or T-values as arguments…

…but we can also construction functions that take other functions as arguments!

(29) A Simple (but Artificial) Example

[ !f : f " D<et> . f(Obama) ] = The function from <et> functions to T-values,

which for any function f, yields the value f(Obama)

(yields T iff f(Obama) = T)

(30) A More Complex, but Realistic Example

The connective “and” in English can conjoin two VPs. What is its semantics in such a

construction?

S

NP VP1

Obama VP2 ConjP

laughs Conj VP3

and dances

(31) First, Let’s Figure Out What the Types Have to Be!

a. [[ S ]] " Dt

b. [[ NP ]] " De

c. [[ VP2 ]] " D<et>

d. [[ VP3 ]] " D<et>

e. [[ VP1 ]] " ??

f. [[ ConjP ]] " ??

g. [[ Conj ]] " ??

Page 5: Cable 3.2 Lambda Notation

Seth Cable Semantics and Generative Grammar

Fall 2009 Ling610

14

(32) The Type of VP1

• The extension of VP1 has to combine with the extension of NP (type e) to yield the

extension of S (type t)

• So, VP1 must be of type <et>

(33) The Type of ConjP

• The extension of ConjP must combine with the extension of VP2 (type <et>) to yield

the extension of VP1 (type <et>)

• So, ConjP must be of type <<et><et>>

(34) The Type of Conj

• The extension of Conj must combine with the extension of VP3 (type <et>) to yield

the extension of ConjP (type <<et><et>>)

• So, Conj must be of type <<et><<et><et>>>

OK… we’ve figured out the type of its extension… but what is its exact lexical entry?

(35) Reasoning Through the Extension of “And”

a. The Targeted Truth-Conditions

(i) “Obama laughs and dances” is T iff Obama laughs and Obama dances.

(ii) “Joe laughs and dances” is T iff Joe laughs and Joe dances.

(iii) “Obama smokes and dances” is T iff Obama smokes and Obama dances

(iv) “Obama dances and smokes” is T iff Obama dances and Obama smokes

b. The Extension of the VP “laughs and dances”

Comparing (i) and (ii), it’s apparent that:

[[ laughs and dances ]] = [ !x : x laughs and x dances ]

c. The Extension of the ConjP “and dances”

Comparing (i) and (iii), it’s apparent that:

[[ and dances ]] = [ !f : f " D<et> . [ !x : f(x) = T and x dances ] ]

d. The Extension of the Conj “and”

Comparing (i) and (iv), it’s apparent that:

[[ and ]] = [ !g : g " D<et> . [ !f : f " D<et> . [ !x : f(x) = T and g(x) = T ] ] ]

Page 6: Cable 3.2 Lambda Notation

Seth Cable Semantics and Generative Grammar

Fall 2009 Ling610

15

(36) Sample Derivation of Truth-Conditions

a. ‘ S ’ is T iff (by notation)

NP VP1

Obama VP2 ConjP

laughs Conj VP3

and dances

b. [[S]] = T iff (by FA)

c. [[VP1]]([[NP]]) = T iff (by NNx2, TN)

d. [[VP1]](Obama) = T iff (by FA)

e. [[ConjP]]([[VP2]])(Obama) = T iff (by NNx2, TN)

f. [[ConjP]]([!x : x laughs])(Obama) = T iff (by FA)

g. [[Conj]]([[VP3]])([!x : x laughs])(Obama) = T iff (by NNx2, TN)

h. [[Conj]]([!y : y dances])([!x : x laughs])(Obama) = T iff (by TN)

i. [ !g<et> : [ !f <et> : [ !z : f(z) = T and g(z) = T ] ] ]

([!y : y dances])([!x : x laughs])(Obama) = T iff (by LC)

j. [ !f <et> : [ !z : f(z) = T and [!y : y dances](z) = T ] ]

([!x : x laughs])(Obama) = T iff (by LC)

k. [ !z : [!x : x laughs](z) = T and [!y : y dances](z) = T ](Obama) = T iff (by LC)

l. [!x : x laughs](Obama) = T and [!y : y dances](Obama) = T iff

m. Obama laughs and [!y : y dances](Obama) = T iff

n. Obama laughs and Obama dances