Consider the following “world” (knowledge base):
\(cat(Zoot)\) | \(owns(Mary, Zoot)\) | \(walks(Spot)\) |
\(cat(Whiskers)\) | \(owns(Mary, Spot)\) | \(walks(Whiskers)\) |
\(dog(Spot)\) | \(owns(Li, Whiskers)\) | \(walks(Mary, Zoot)\) |
\(brown(Spot)\) | \(walks(Li, Spot)\) | |
\(brown(Zoot)\) |
Give the denotation of each of the following FOL expressions with respect to this world.
owns(Li, Zoot)
owns(Mary, x)
walks/2
dog/1
dog(Zoot) \(\Rightarrow\) walks(Zoot)
\(\forall x.\) cat(x) \(\Rightarrow\) walks(x)
\(\forall x. \forall y.\) walks(x, y) \(\Rightarrow\) walks(y)
\(\exists x. \forall y.\) walks(x, y) \(\Rightarrow\) walks(y)
False
\(\{Zoot, Spot\}\)
\(\{(Mary, Zoot), (Li, Spot)\}\)
\(\{Spot\}\) (note this is a set, not just an entity)
True (because the antecedent is false)
False
False
True
Convert the following FOL expressions into natural language sentences.
\(\forall x. rabbit(x) \Rightarrow furry(x)\)
\(\exists e. help(e) \wedge helper(e, Franz) \wedge helpee(e, Marie)\)
\(\exists e. x. eating(e) \wedge sandwich(x) \wedge eater(e, Liang) \wedge eaten(e, x)\)
\(\exists e. x. y. eating(e) \wedge sandwich(x) \wedge fork(y) \wedge eater(e, Liang) \wedge eaten(e, x) \wedge instrument(e, y)\)
For the next two, try to come up with relatively natural-sounding English sentences that unambiguously express the meaning of each expression. First consider what the difference is between the two!
\(\forall x. student(x) \Rightarrow \exists e. lifting(e) \wedge lifter(e, x) \wedge liftee(e, Marie)\)
\(\exists e. lifting(e) \wedge \forall x. student(x) \Rightarrow lifter(e, x) \wedge liftee(e, Marie)\)
All rabbits are furry
Franz helps Marie
Liang eats a sandwich
Liang eats a sandwich with a fork
Each student lifts Marie. [Notice there is a separate lifting event for each student. So it could also be stated as “All the students (separately) lift Marie”. But simply saying “All the students lift Marie” is ambiguous because that sentence could also have the MR in (f).]
The students all lift Marie together. [Notice that here there is a single lifting event for all students.]
Convert the following natural language sentences into FOL expressions. Use reified event semantics. If a sentence is ambiguous, list all possible interpretations and give paraphrases of the different meanings.
Fiona hates Ewan
Partha eats pizza
Every student likes Juan
Some student likes every class
Ella sees herself
Ella dances every Tuesday
\(\exists e. hating(e) \wedge hater(e, Fiona) \wedge hatee(e, Ewan)\)
There are two meanings, though not due to any form of ambiguity we’ve discussed before. The ambiguity here is caused by the verb. (a) Partha is currently eating a pizza: \(\exists e. eating(e) \wedge eater(e, Partha) \wedge \exists x. pizza(x) \wedge eaten(e, x)\) (or perhaps we might want to think of “pizza” as a mass noun and treat it as an entity, yielding \(\exists e. eating(e) \wedge eater(e, Partha) \wedge eaten(e, pizza)\)). OR (b) Partha habitually or in principle eats pizza: It is much less clear how to translate this sentence into FOL, since our usual event semantics assume the existence of a single event with particular properties. In this case there are potentially many (or no) actual pizza-eating events. (I don’t know how a semanticist would deal with this case, but to me it seems to share some of the same problems as so-called generic statements like “birds can fly” or “cats are furry”, whose semantics are very much a subject of research.)
\(\forall x. student(x) \Rightarrow \exists e. liking(e) \wedge liker(e, x) \wedge likee(e, Juan)\) (Note that placing the \(\exists e\) outside the \(\forall x\) would be a bit weird: it suggests that all students participate in a single collective liking event.
Quantifier scope ambiguity leads to two meanings. (a) There is a single student who likes all classes: \(\exists x. student(x) \wedge \forall y. class(y) \Rightarrow \exists e. liking(e) \wedge liker(e, x) \wedge likee(e, y)\) OR (b) Each class is liked by at least one student: \(\forall x. class(x) \Rightarrow \exists y. student(y) \wedge \exists e. liking(e) \wedge liker(e, y) \wedge likee(e, x)\)
\(\exists e. seeing(e) \wedge seer(e, Ella) \wedge seen(e, Ella)\)
\(\forall x. Tuesday(x) \Rightarrow \exists e. dancing(e) \wedge dancer(e, Ella) \wedge time(e,x)\) (or perhaps replace the final conjunct with something like \(during(e,x)\)).
Suppose we have the following grammar fragment with semantic attachments. Grammar rules are numbered to help you refer to them in discussion.
# | Syntactic Rule | Semantic attachment |
---|---|---|
1. | Det \(\rightarrow\) a |
\(\lambda P. \lambda Q. \exists x. P(x) \wedge Q(x)\) |
2. | Det \(\rightarrow\) the |
\(\lambda P. \lambda Q. \exists! x. P(x) \wedge Q(x)\) |
3. | N\(\rightarrow\)dog |
\(\lambda x. dog(x)\) |
4. | N\(\rightarrow\)park |
\(\lambda x. park(x)\) |
5. | NP\(\rightarrow\)Sam |
\(\lambda P. P(Sam)\) |
6. | NP\(\rightarrow\)Spot |
\(\lambda P. P(Spot)\) |
7. | P\(\rightarrow\)in |
\(\lambda P. \lambda Q \lambda x. P(\lambda y. in(x,y)) \wedge Q(x)\) |
8. | Vi\(\rightarrow\)walks |
\(\lambda x. \exists e. walking(e) \wedge walker(e, x)\) |
9. | Vi\(\rightarrow\)sees |
\(\lambda x. \exists e. seeing(e) \wedge seer(e, x)\) |
10. | Vt\(\rightarrow\)walks |
\(\lambda P \lambda x. P(\lambda y. \exists e. walking(e) \wedge walker(e, x) \wedge walkee(e, y))\) |
11. | Vt\(\rightarrow\)sees |
\(\lambda P \lambda x. P(\lambda y. \exists e. seeing(e) \wedge seer(e, x) \wedge seen(e, y))\) |
12. | Nom \(\rightarrow\) N | N.sem |
13. | Nom \(\rightarrow\) Nom PP | PP.sem(Nom.sem) |
14. | NP \(\rightarrow\) Det Nom | Det.sem(Nom.sem) |
15. | PP \(\rightarrow\) P NP | P.sem(NP.sem) |
16. | VP \(\rightarrow\) Vi | Vi.sem |
17. | VP \(\rightarrow\) Vt NP | Vt.sem(NP.sem) |
18. | VP \(\rightarrow\) VP PP | PP.sem(VP.sem) |
19. | S \(\rightarrow\) NP VP | NP.sem(VP.sem) |
Show how the meanings of Sam sees
and The dog walks
are built up using this grammar. (Note: the \(\exists!\) symbol in the MR for the
means “there exists a unique”—where the uniqueness is normally assumed to be determined by context. In other words, “the dog walks” would be true if there is a dog that walks, and it is the only dog currently salient to the speaker. One could argue whether this is a good enough semantics, but it will do for us here.)
Why are the transitive verb meanings so much more complicated than their intransitive counterparts? That is, why didn’t we define the meaning of walks
to be just \[\lambda y. \lambda x. \exists e. walking(e) \wedge walker(e, x) \wedge walkee(e, y)?\] (Hint: what happens when you combine the Vt with the object NP?)
Consider the following pairs of sentences:
Hint: If you are having trouble deriving the MRs for these sentences using the grammar, can you see what they are supposed to be? If so, you may be still able to answer this question, although computing the MRs will give you practice with complicated lambda reductions.
(Optional challenge question) Compute the meanings of the two different syntactic parses of the sentence “Sam sees a dog in the park”. There is a problem with one of the meanings (that is, it isn’t really correct). Identify the problem and say what the correct meaning should be. You don’t need to fix the grammar to make that meaning come out, but you may want to think about why it’s difficult to do so.
The syntactic trees are:
In the first tree, the meanings attached to each tree node are as follows:
Sam, NP: \(\lambda P. P(Sam)\)
sees, Vi, VP: \(\lambda x. \exists e. seeing(e) \wedge seer(e, x)\)
S: derived as NP.sem(VP.sem), which is \[\begin{aligned} (\lambda P. P(Sam))[\lambda x. \exists e. seeing(e) \wedge seer(e, x)] &= (\lambda x. \exists e. seeing(e) \wedge seer(e, x))[Sam]\\ &= \exists e. seeing(e) \wedge seer(e, Sam)\end{aligned}\]
I’ve added a little more notation to keep things clear: I put round brackets around the lambda expression that’s about to undergo lambda reduction, and square brackets around the expression that’s about to be substituted in place of the lambda variable. This will help especially with more complicated reductions below.
In the second tree, the meanings attached to each tree node are as follows:
the, Det: \(\lambda P. \lambda Q. \exists! x. P(x) \wedge Q(x)\)
dog, N, Nom: \(\lambda x. dog(x)\)
walks, Vi, VP: \(\lambda x. \exists e. walking(e) \wedge walker(e,x)\)
NP (the dog): derived as Det.sem(Nom.sem), which is \[\begin{aligned} (\lambda P. \lambda Q. \exists! x. P(x) \wedge Q(x))[ \lambda x. dog(x)] &= (\lambda P. \lambda Q. \exists! x. P(x) \wedge Q(x))[ \lambda y. dog(y)] \\ &= \lambda Q. \exists! x. (\lambda y. dog(y))[x] \wedge Q(x)\\ &= \lambda Q. \exists! x. dog(x) \wedge Q(x) \end{aligned}\] I did something important in the first line: before I substituted \(\lambda x.dog(x)\) in for \(P\), I re-named the variable \(x\) in the substituted expression and called it \(y\). That’s because there was already an \(x\) in the outer expression. In this case, those \(x\)’s turn out to refer to the same thing, but that isn’t guaranteed to be the case. If I didn’t re-name the variable, I might have ended up making two variables that are supposed to refer to different things actually refer to the same thing. (This is basically a namespace issue, just like what happens when you define a variable inside a function in Python with the same name as one outside the function: implicitly, Python treats them as two different things. Here we have to rename one of them explicitly to avoid clashes.)
S: derived as NP.sem(VP.sem), which is \[\begin{aligned} & (\lambda Q. \exists! x. dog(x) \wedge Q(x))[\lambda x. \exists e. walking(e) \wedge walker(e,x)]\\ &= \exists! x. dog(x) \wedge (\lambda y. \exists e. walking(e) \wedge walker(e, y))[x]\\ &= \exists! x. dog(x) \wedge \exists e. walking(e) \wedge walker(e, x)\end{aligned}\] Again, notice that I re-named the \(x\) in the “walk” part in the second line.
The problem is that the semantic attachment for VP says that the Vt takes the NP as its argument. But all our NPs have meanings like \(\lambda P. (\ldots\)). If we apply the proposed simple (base-form) MR for see
to something like that, we substitute the complex NP MR for \(y\) and end up with an invalid FOL expression. The solution is to type-raise the MRs for transitive verbs, just as we saw type-raising for NPs in lecture. This allows the Vt to take its NP argument and apply that NP to the base meaning of the Vt. For example, the MR for walks Spot
is derived as follows. \[\begin{aligned}
& (\lambda P \lambda x. P(\lambda y. \exists e. walking(e) \wedge walker(e, x) \wedge walkee(e, y))[\lambda P. P(Spot)] \\
&=(\lambda P \lambda x. P(\lambda y. \exists e. walking(e) \wedge walker(e, x) \wedge walkee(e, y))[\lambda Q. Q(Spot)]) \\
&= \lambda x. (\lambda Q. Q(Spot))[\lambda y. \exists e. walking(e) \wedge walker(e, x) \wedge walkee(e, y)] \\
&= \lambda x. (\lambda y. \exists e. walking(e) \wedge walker(e, x) \wedge walkee(e, y))[Spot] \\
&= \lambda x. \exists e. walking(e) \wedge walker(e, x) \wedge walkee(e, Spot) \\
\end{aligned}\]
We just showed how to compute the meaning of the VP in ``Sam walks Spot’’. We can combine it with the subject NP using the NP.sem(VP.sem) attachment as follows: \[\begin{aligned} & (\lambda P. P(Sam))[\lambda x. \exists e. walking(e) \wedge walker(e, x) \wedge walkee(e, Spot)]\\ &= (\lambda x. \exists e. walking(e) \wedge walker(e, x) \wedge walkee(e, Spot))[Sam]\\ &= \exists e. walking(e) \wedge walker(e, Sam) \wedge walkee(e, Spot) \end{aligned}\]
To compute the MR for ``Sam walks’’ we have: \[\begin{aligned} (\lambda P. P(Sam))[\lambda x. \exists e. walking(e) \wedge walker(e, x)]\\ &= (\lambda x. \exists e. walking(e) \wedge walker(e, x))[Sam]\\ &= \exists e. walking(e) \wedge walker(e, Sam) \end{aligned}\]
So, according to the meaning representations, “Sam walks” is entailed by “Sam walks Spot”: in every case where the latter is true, the former will also be true. However, in common usage, this entailment does not hold. For example, I might walk a dog by standing with a leash and letting the dog run around, or by riding a bicycle with the dog on a leash. This is different from the pair “Sam sees Spot”/“Sam sees” because in this case, the second sentence really is entailed by the first one.
The issue with “walk” is that the transitive form actually has a slightly different meaning from the intransitive form. It means something like “make someone/something walk”: the object of “walk” is the walker, not the subject. So we might consider changing the MR to something like the following, where \(y\) (which will be the object of the sentence) is now the walker instead of the walkee.
\[\begin{aligned} \lambda P \lambda x. P(\lambda y. \exists e. walking(e) \wedge walker(e, y) \wedge instigator(e, x)) \end{aligned}\]
First, the analysis where PP attaches inside NP. I use subscripts so I can refer to the nodes when there are multiple ones with the same phrasal category.
The MRs derived at each node are as follows:
park, N\(_1\), Nom\(_1\): \(\lambda x. park(x)\)
the, Det\(_1\): \(\lambda P. \lambda Q. \exists! x. P(x) \wedge Q(x)\)
NP\(_1\), as Det\(_1\).sem(Nom\(_1\).sem): \[\begin{aligned} (\lambda P. \lambda Q. \exists! x. P(x) \wedge Q(x))[\lambda y. park(y)] &= \lambda Q. \exists! x. (\lambda y. park(y))[x] \wedge Q(x)\\ &= \lambda Q. \exists! x. park(x) \wedge Q(x) \end{aligned}\]
in, P: \(\lambda P. \lambda Q \lambda x. P(\lambda y. in(x,y)) \wedge Q(x)\)
PP (in the park), as P.sem(NP\(_1\).sem): \[\begin{aligned} & (\lambda P. \lambda Q \lambda x. P(\lambda y. in(x,y)) \wedge Q(x))[\lambda Q. \exists! x. park(x) \wedge Q(x)]\\ &= (\lambda P. \lambda Q \lambda x. P(\lambda y. in(x,y)) \wedge Q(x))[\lambda R. \exists! z. park(z) \wedge R(z)]\\ &= \lambda Q \lambda x. (\lambda R. \exists! z. park(z) \wedge R(z))[\lambda y. in(x,y)] \wedge Q(x)\\ &= \lambda Q \lambda x. \exists! z. park(z) \wedge (\lambda y. in(x,y))[z] \wedge Q(x)\\ &= \lambda Q \lambda x. \exists! z. park(z) \wedge in(x,z) \wedge Q(x) \end{aligned}\]
dog, N\(_2\), Nom\(_2\): \(\lambda x. dog(x)\)
Nom\(_3\) (dog in the park), as PP.sem(Nom\(_2\).sem):
\[\begin{aligned} & (\lambda Q \lambda x. \exists! z. park(z) \wedge in(x,z) \wedge Q(x))[\lambda y. dog(y)]\\ &= \lambda x. \exists! z. park(z) \wedge in(x,z) \wedge (\lambda y. dog(y))[x]\\ &=\lambda x. \exists! z. park(z) \wedge in(x,z) \wedge dog(x) \end{aligned}\]
a, Det\(_2\): \(\lambda P. \lambda Q. \exists x. P(x) \wedge Q(x)\)
NP\(_2\) (a dog in the park), as Det\(_2\).sem(Nom\(_3\).sem): \[\begin{aligned} & (\lambda P. \lambda Q. \exists x. P(x) \wedge Q(x))[\lambda x. \exists! z. park(z) \wedge in(x,z) \wedge dog(x)] \\ &= (\lambda P. \lambda Q. \exists x. P(x) \wedge Q(x))[\lambda y. \exists! z. park(z) \wedge in(y,z) \wedge dog(y)]\\ &= \lambda Q. \exists x. (\lambda y. \exists! z. park(z) \wedge in(y,z) \wedge dog(y))[x] \wedge Q(x)\\ &= \lambda Q. \exists x. \exists! z. park(z) \wedge in(x,z) \wedge dog(x) \wedge Q(x) \end{aligned}\]
sees, Vt: \(\lambda P \lambda x. P(\lambda y. \exists e. seeing(e) \wedge seer(e, x) \wedge seen(e, y))\)
VP, as Vt.sem(NP\(_2\).sem): \[\begin{aligned} & (\lambda P \lambda x. P(\lambda y. \exists e. seeing(e) \wedge seer(e, x) \wedge seen(e, y))) [\lambda Q. \exists w. \exists! z. park(z) \wedge in(w,z) \wedge dog(w) \wedge Q(w)] \\ &= \ldots\\ &= \lambda x. \exists w. \exists! z. park(z) \wedge in(w,z) \wedge dog(w) \wedge \exists e. seeing(e) \wedge seer(e, x) \wedge seen(e, w) \end{aligned}\]
Sam, NP\(_3\): \(\lambda P. P(Sam)\)
And finally, if we apply NP\(_3\).sem(VP.sem), we can reduce the entire MR to: \[\exists w. \exists! z. park(z) \wedge in(w,z) \wedge dog(w) \wedge \exists e. seeing(e) \wedge seer(e, Sam) \wedge seen(e, w)\]
The derivation is tedious, but it is nice to see that the resulting MR is what we’d expect: the dog is in the park, and Sam sees the dog.
I will not go through the whole derivation for the second tree, where PP attaches to VP:
Suffice to say that it derives the following MR: \[\exists! z. park(z) \wedge in(Sam,z) \wedge \exists w. dog(w) \wedge \exists e. seeing(e) \wedge seer(e, Sam) \wedge seen(e, w)\] This is not too bad for the current sentence: Sam is in the park and sees the dog. However, it’s only accidentally right: technically the seeing event is the thing that should be in the park, not Sam. For “see” it’s hard to separate the two, but consider the syntactically identical sentence “Sam cooks a potato in the oven”. In this case it’s clear that the cooking, not Sam, is the thing “in the oven”.
So the correct meaning should really be: \[\exists! z. park(z) \wedge \exists w. dog(w) \wedge \exists e. seeing(e) \wedge seer(e, Sam) \wedge seen(e, w) \wedge in(e,z)\]