1 of 62

Subsentential Meaning

LIN 141: Semantics

Masoud Jasbi

2 of 62

Where were we?

Propositional Logic can capture the (truth-conditional) meaning of sentences.

It did relatively well with the meaning of connectives like “not”, “and”, “or”, and “if”.

But as some of you noted there are some discrepancies.

3 of 62

Formal Logic vs. Ordinary Language Debate

These discrepancies fueled the logic vs. language debates.

On week 10, we come back to this issue.

We see that these discrepancies truly bothered the philosopher Paul Grice.

So he created a new paradigm of studying meaning.

4 of 62

Natural Language

Language

Syntax

Semantics

Abe is happy, Abe likes cheese, Abe or Bob like cheese, Abe likes Bob, Bob and Abe left, ...

TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, TRUE, FALSE, ...

Grammar

Truth

Interpretation

5 of 62

Propositional Logic

Propositional Language

Syntax

Semantics

p, q, r, …

¬p, ¬q,¬r, ... (p⋀q), (p⋀r), (q⋀r), … (p⋁q), (p⋁r), (q⋁r), … (p→q), (p→r), (q→r), … (p⋀q)⋀(q→r)

TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, TRUE, FALSE, ...

Grammar

Truth

Interpretation I()

6 of 62

Predicate Logic

First Order (Predicate) Language

Syntax

Semantics

P(a), Q(b), … P(x), Q(y) …

¬P(a), ¬Q(b),...¬P(x), ¬Q(y) … [P(a)⋀Q(b)], … [P(x)⋁Q(y)], …

∀x[P(x)], ∃y[Q(y)], ...

TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, TRUE, FALSE, ...

Grammar

Entities, Properties, Relations, …, Truth

Interpretation

7 of 62

Predicate Logic

(Informal Intro)

8 of 62

Shortcomings of Propositional Logic

Too coarse-grained as a representational system.

No way of representing sub-sentential elements like words and phrases.

Nominals like “Cleo”, “her”, or “the teacher”.

Verbs or Adjectives like “walk” or “happy”.

Quantifiers like “every” and “some”.

9 of 62

Adding Expressivity

We can represent definite and known entities with individual symbols.

Abe” ⇒ a, “Barbara” ⇒ b, “The Arboretum” ⇒ c, ...

We can represent indefinite entities with variables.

she” ⇒ x, “this” ⇒ y, …

We can represent properties and relations using predicates.

Barbara is happy” ⇒ H(b)

Abe likes the arboretum” ⇒ L(a, c)

10 of 62

Adding Expressivity

We can represent the quantifier “every” using the Universal symbol and a variable.

Everyone is happy” ⇒ x[ H(x) ]

We can represent the quantifier “some” using the Existential symbol and a variable.

Someone is happy” ⇒ ∃x[H(x)]

We can keep our propositional symbols for connectives.

If everyone is happy then someone is happy” ⇒ [∀x[H(x)] → ∃x[H(x)]]

Abe likes the arboretum or not” ⇒ [L(a, c) ⋁ L(a, c)]

11 of 62

Sentences in Propositional and Predicate Logics

Sentences

Propositional Logic

Predicate Logic

Cleo is happy

p

H(c)

Cleo laughs

q

L(c)

Dasha laughs

r

L(d)

She laughs

?

L(x)

Everyone laughs

e

∀x[L(x)]

Someone laughs

s

∃x[L(x)]

12 of 62

Exercise

How can we represent the following sentences in predicate logic?

  1. The UC Davis arboretum is south of the campus.
  2. Cleo knows Dasha.
  3. Dasha knows Cleo.
  4. Cleo and Dasha know each other.
  5. If Abe loves Bob, then Bob loves Abe.
  6. Barbara and Bob don’t love each other.
  7. Someone saw the arboretum.
  8. Everyone showed the arboretum to Cleo.

13 of 62

First Order (Predicate) Logic

14 of 62

A Short History

Predicate Logic is a streamlined version of a “language of thought” developed by by the German philosopher and mathematician Gottlob Frege (1848 – 1925).

Around the same time, Charles Sanders Peirce, an American philosopher and logician developed essentially the same system.

Gottlob Frege

(1848 – 1925)

Charles Sanders Peirce

(1839 – 1914)

15 of 62

Lpred Syntax

16 of 62

Syntax of Predicate Logic

A set of terms: t1, t2, …, tn

constants like a, b, c, … to represent individuals like Abe & Cleo

variables like: x, y, z, … to represent pronouns like s/he and h(er/im)

A set of predicates: P, Q, R, S, … to represent properties like happy, red, ...

Atomic propositions: P(x), Q(a), R(y,z), S(d), …

to represent properties of individuals and their relations like:

Abe is happy, Cleo runs, ...

17 of 62

Syntax of Predicate Logic (BNF)

We formally define the syntax of Lpred as:

c ⩴ a | b | d | …

v ⩴ x | y | z | …

t ⩴ v | c

Pred ⩴ P | Q | R | ...

Atom ⩴ Pred(t1, …, tn)

φ ⩴ Atom | ¬ φ | [φ ⋀ φ] | [φ ⋁ φ] | [φ → φ] | [φ ↔ φ] | ∀v[φ] | ∃v[φ]

18 of 62

Propositional vs. Predicate Logic

Predicate logic is an extension of propositional logic with structured basic propositions and quantification.

Boolean connectives are similar to propositional logic.

An atomic formula consists of a predicate followed by n terms.

A universally quantified formula consists of followed by a variable, and a formula.

An existentially quantified formula consists of followed by a variable, and a formula.

19 of 62

A Context Free Grammar for Lpred

CFG = <𝓢 (starting symbol), 𝓝 (nonterminals), 𝓣 (terminals), ℛ (rules)>

LPred= < φ, {φ, Atom, Pred, t}, {a,b, c, …, x,y,z, …, P, Q, R, ... ¬,⋀, ⋁, →, ↔}, ℛ>

ℛ:

1. φ ⇒ ¬ φ

2. φ ⇒ [φ ⋀ φ]

3. φ ⇒ [φ ⋁ φ]

4. φ ⇒ [φ → φ]

5. φ ⇒ [φ ↔ φ]

6. φ ⇒ ∀v[φ]

7. φ ⇒ ∃v[φ]

8. φ ⇒ Atom

9. Atom ⇒ Pred (t1, …, tn)

10. Pred ⇒ P | Q | R | ...

11. t ⇒ c | v

12. c ⇒ a | b | c | ...

13. v ⇒ x | y | z | ...

20 of 62

ℛ:

1. φ ⇒ ¬ φ

2. φ ⇒ [φ ⋀ φ]

3. φ ⇒ [φ ⋁ φ]

4. φ ⇒ [φ → φ]

5. φ ⇒ [φ ↔ φ]

6. φ ⇒ ∀v [φ]

7. φ ⇒ ∃v [φ]

8. φ ⇒ Atom

9. Atom ⇒ Pred (t1, …, tn)

10. Pred ⇒ P | Q | R | ...

11. t ⇒ c | v

12. c ⇒ a | b | c | ...

13. v ⇒ x | y | z | ...

P(x) ⋀ ∀x[Q(x)R(x,y)]

φ

φ

φ

φ

φ

Atom

Pred

t

P

v

x

Atom

Pred

t

Q

v

x

Atom

R

v

x

∀v

φ

v

y

Pred

t

t

x

21 of 62

Exercise: Grow your own trees

Take some time to produce a few well-formed formulas in Lpred(Predicate Logic)

LPr= < φ, {φ, Atom, Pred, t, c, v}, {a,b, c, …, x,y,z, …, P, Q, R, ... ¬,⋀, ⋁, →, ↔}, ℛ>

ℛ:

1. φ ⇒ ¬ φ

2. φ ⇒ [φ ⋀ φ]

3. φ ⇒ [φ ⋁ φ]

4. φ ⇒ [φ → φ]

5. φ ⇒ [φ ↔ φ]

6. φ ⇒ ∀v[φ]

7. φ ⇒ ∃v[φ]

8. φ ⇒ Atom

9. Atom ⇒ Pred (t1, …, tn)

10. Pred ⇒ P | Q | R | ...

11. t ⇒ c | v

12. c ⇒ a | b | c | ...

13. v ⇒ x | y | z | ...

22 of 62

Exercise

Which of the following are well-formed formulas (aka sentences or strings) of predicate logic? (x, y, … are variables; a, b,c ... constants, P, Q, ... predicates)

  1. a
  2. [x ⋁ y]
  3. P(a)
  4. ∀x[x]
  5. ∃a[P(a) → Q(a)]
  6. ∀x∃y[P(x) → Q(x,y)]
  7. ∀x¬∃y[P(x) → Q(x,y)]
  8. ∀x[¬P(z)⋀Q(a)]

23 of 62

Variable Binding

Variables in predicate logic are either bound or free.

In a formula ∀v[φ] or ∃v[φ], the quantifier binds all occurrences of v in [φ] that are not bound by any other quantifier occurrence inside [φ].

Quantifiers that are not bound, are free!

Example: P(x) ⋀ ∀x[Q(x)→R(x,y)]

The first occurence of x, and y are free.

The second and third occurrences of x are bound by .

24 of 62

Exercise: Bound or Free?

For each variable, say whether it is bound or free. If bound say by what operator.

  1. P(x) ⋀ Q(y)
  2. ∀x[P(y)]
  3. ∃x[R(x,y) ⋁ S(x,y,z)] ⋀ P(x)
  4. ∀x[P(x)→∃x[R(x,x)]]

25 of 62

26 of 62

Predicate Logic (Review)

First Order (Predicate) Language

Syntax

Semantics

P(a), Q(b), … P(x), Q(y) …

¬P(a), ¬Q(b),...¬P(x), ¬Q(y) … [P(a)⋀Q(b)], … [P(x)⋁Q(y)], …

∀x[P(x)], ∃y[Q(y)], ...

TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, TRUE, FALSE, ...

Grammar

Entities, Properties, Relations, …, Truth

Interpretation

27 of 62

Syntax of Predicate Logic

A set of terms: t1, t2, …, tn

Individual constants like a, b, c, … to represent individuals like Abe & Cleo

Variables like: x, y, z, … to represent pronouns like s/he and h(er/im)

A set of predicates: P, Q, R, S, … to represent properties like happy, red, ...

Atomic propositions: P(x), Q(a), R(y,z), S(d), …

Connectives: ¬, ⋀, →, ⋁ , ↔

Quantifiers: ∀v[φ] | ∃v[φ]

28 of 62

Syntax of Predicate Logic (BNF)

We formally define the syntax of Lpred as:

c ⩴ a | b | c | …

v ⩴ x | y | z | …

t ⩴ v | c

Pred ⩴ P | Q | R | ...

Atom ⩴ Pred(t1, …, tn)

φ ⩴ Atom | ¬ φ | [φ ⋀ φ] | [φ ⋁ φ] | [φ → φ] | [φ ↔ φ] | ∀v[φ] | ∃v[φ]

29 of 62

Lpred Semantics

30 of 62

Putting Meanings on Forms

We start with the set of terminal symbols and assign them meaning.

Then we come up with a set of rules to derive the meaning of the infinite set of complex expressions.

In propositional logic terminal symbols were all atomic propositions and mapped to True(1) and False(0).

In predicate logic, our terminals are constants (individual + predicate) or variables.

For these we need to build a model of individuals and their relations.

31 of 62

Model-theoretic Interpretation

Instead of a simple mapping to truth values, we map the symbols of predicate logic according to a model.

Then we define truth according to such a model.

This truth definition for predicate logic is due to the Polish logician Alfred Tarski.

Alfred Tarski

Logician, Mathematician

(1901-1983)

32 of 62

Main Components of Lpred Semantics

We interpret Lpred using a model and an assignment function.

A model has two components:

  1. The domain D: the set of all entities in the model.
  2. The interpretation function I: which maps formulas of Lpred to their meanings.

We formally define a model as M = <D, I>.

The variable assignment function g maps variables to objects in D.

We use the interpretation brackets ⟦⟧M,g with superscripts M, g to show the interpretation of an expression according to model M and assignment function g.

33 of 62

Example Model: The Simpsons

34 of 62

The Simpsons Model

MSimpsons = <DSimpsons, ISimpsons>

DSimpsons = { , , , , , }

35 of 62

Assigning Meaning to Lpred Syntax

We will first start with constants:

Individuals (a, b, c, ...)

Predicates: Unary, Binary, Ternary, …

Then we deal with Atoms: P(a), R(a,b), ...

Then we deal with connectives: ¬, ⋀, →, ⋁ , ↔

Then we assign meaning to variables (x, y, z, ...)

And finally we deal with the meaning of quantifiers: ∀, ∃

36 of 62

Interpretation of Constants

Constants are assigned meaning by the interpretation function I.

The interpretation of an individual or predicate constant c is the value assigned to it by the interpretation function I.

⟦c⟧M,g = I(c)

⟦Pred⟧M,g = I(Pred)

Let’s look at the the interpretation function for our example model.

37 of 62

The Simpsons Language

MSimpsons = <DSimpsons, ISimpsons>

DSimpsons = { , , , , , }

Constants:

Individuals: Homer, Lisa, Bart, Marge, Marvin, Maggie

Unary Predicates: simpsons, therapist, adult, child, walks, crawls, …

Binary Predicates: annoy, hit, …

Ternary Predicates: introduce, ...

38 of 62

Individual Constants

MSimpsons = <DSimpsons, ISimpsons>

DSimpsons = { , , , , , }

ISimpsons (Marge) =

ISimpsons (Homer) =

ISimpsons (Lisa) =

ISimpsons (Bart) =

ISimpsons (Maggie) =

ISimpsons (Marvin) =

39 of 62

Unary Predicates

ISimpsons (adult) = { , , }

ISimpsons (child) = { , , }

ISimpsons (walk) = { , Z , , , }

ISimpsons (crawl) = { }

MSimpsons = <DSimpsons, ISimpsons>

DSimpsons = { , , , , , }

ISimpsons (simpson) = { , , , , }

ISimpsons (therapist) = { }

40 of 62

Binary Predicates

ISimpsons (annoy) ={< , >, < , >, < , >, < , >, < , >}

MSimpsons = <DSimpsons, ISimpsons>

DSimpsons = { , , , , , }

ISimpsons (hit) = {< , >, < , >, < , >, < , >, < , >}

41 of 62

Ternary Predicates

ISimpsons (introduce) ={< , , >, < , , >, < , , >}

MSimpsons = <DSimpsons, ISimpsons>

DSimpsons = { , , , , , }

42 of 62

N-ary Predicates

The meaning of predicates are created using the elements of the domain.

They are either a set of individuals in the domain or a set of relations among them.

In principle we can have predicates that take more than three terms.

But words in language that denote predicates with more than 3 terms are rare.

43 of 62

Cartesian Product

Consider a set of entities like D = {e1, e2, e3, …, en}

We can define the Cartesian product of two sets A and B as:

A × B ={<x, y> | x ∈ A and y ∈ B}

So D × D would be: {<e1,e1>, <e1,e2>, <e1,e3>, … , <e1,en>, … ,<e2,e1>, …, <e2,en>, ... }

More generally:

X1 × … × Xn ={<x1, …, xn> | xi ∈ Xi for every i ∈ {1, … , n}}

Rene Descartes

Philosopher, Mathematician

(1596-1650)

44 of 62

The General Relation between D and I

Let M = <D, I>, and a be an individual constant, P a unary predicate, R a binary predicate, and S a ternary predicate.

D = {e1, e2, e3, …, en}

Then:

I(a) is a member of the domain D: I(a) ∈ D

I(P) is a subset of D: I(P) ⊆ D

I(R) is a subset of D × D: I(R) ⊆ D2

I(S) is a subset of D × D × D: I(S) ⊆ D3

...

45 of 62

Meaning of Atoms

An atom with one term Pred(t) is true if and only if the individual denoted by the term is a member of the set denoted by the unary predicate.

⟦Pred(t)⟧M,g = 1 iff ⟦t⟧M,g ∈ ⟦Pred⟧M,g

An atom with n-terms Pred(t1, …, tn) is true if and only if the ordered tuple denoted by the terms is a member of the set denoted by the predicate.

⟦Pred(t1,...,tn)⟧M,g = 1 iff <⟦t1M,g , …,⟦t1M,g > ∈ ⟦Pred⟧M,g

46 of 62

Example: Marvin a therapist?

⟦therapist(Marvin)⟧M,g = 1 iff

⟦Marvin⟧M,g ∈ ⟦therapist⟧M,g

⟦Marvin⟧M,g = ISimpsons(Marvin) =

⟦therapist⟧M,g = ISimpsons(therapist) = { }

∈ { }

47 of 62

Example: Marvin a Simpson?

⟦simpson(Marvin)⟧M,g = 1 iff

⟦Marvin⟧M,g ∈ ⟦simpson⟧M,g

⟦Marvin⟧M,g = ISimpsons(Marvin) =

⟦simpson⟧M,g = ISimpsons(simpson) = { , , , , }

∉ { , , , , }

48 of 62

Example: Bart hit Homer?

⟦hit(Bart, Homer)⟧M,g = 1 iff

<⟦Bart⟧M,g, ⟦Homer⟧M,g> ∈ ⟦hit⟧M,g

⟦Bart⟧M,g = ISimpsons(Bart) =

⟦Homer⟧M,g = ISimpsons(Homer) =

⟦hit⟧M,g = ISimpsons(hit) =

< , > ∉

{< , >, < , >, < , >, < , >, < , >}

49 of 62

Example: Marge Introduced Lisa to Marvin?

⟦introduce(Marge, Lisa, Marvin)⟧M,g = 1 iff

<⟦Marge⟧M,g, ⟦Lisa⟧M,g, ⟦Marvin⟧M,g> ∈ ⟦introduce⟧M,g

< , , >

⟦introduce⟧M,g = ISimpsons (introduce) =

{< , , >, < , , >, < , , >}

50 of 62

Meaning of Connectives

The meaning of connectives are similar to what we had in propositional logic.

⟦¬𝜙 ⟧M,g = 1 iff ⟦𝜙 ⟧M,g = 0

⟦𝜙 ⋀ 𝜓M,g = 1 iff ⟦𝜙 ⟧M,g = ⟦𝜓M,g = 1

⟦𝜙 ⋁ 𝜓M,g = 0 iff ⟦𝜙 ⟧M,g = ⟦𝜓M,g = 0

⟦𝜙 → 𝜓M,g = 0 iff ⟦𝜙 ⟧M,g =1, ⟦𝜓M,g = 0

51 of 62

Example

⟦annoy(Lisa, Bart) annoy(Bart, Lisa)⟧M,g =

0 iff ⟦annoy(Lisa, Bart)⟧M,g = ⟦annoy(Bart, Lisa)⟧M,g = 0

⟦annoy(Lisa, Bart)⟧M,g =

1 iff <⟦Lisa⟧M,g, ⟦Bart⟧M,g> ∈ ⟦annoy⟧M,g

ISimpsons (annoy) ={< , >, < , >, < , >, < , >, < , >}

52 of 62

Meaning of Variables

The meaning of a variable is assigned using the variable assignment function g.

⟦v⟧M,g = g(v)

g maps variables of our syntax to individuals in the model.

There can be many different variable assignment functions: g1, g2, g3, ...

53 of 62

Example g’s

g1 = g2 = g3 = ….

DSimpsons = { , , , , , }

x →

y →

z →

w →

...

x →

y →

z →

w →

...

x →

y →

z →

w →

...

54 of 62

Example 1

⟦hit(x, y)⟧M,g1 = 1 iff

<⟦x⟧M,g1, ⟦y⟧M,g1> ∈ ⟦hit⟧M,g1

⟦x⟧M,g1 = g1(x) =

⟦y⟧M,g1 = g1(y) =

x →

y →

z →

w →

...

55 of 62

Example 1

⟦hit(x, y)⟧M,g1 = 1 iff

<⟦x⟧M,g1, ⟦y⟧M,g1> ∈ ⟦hit⟧M,g1

⟦x⟧M,g1 = g1(x) =

⟦y⟧M,g1 = g1(y) =

⟦hit⟧M,g = ISimpsons(hit) =

{< , >, < , >, < , >, < , >, < , >}

x →

y →

z →

w →

...

56 of 62

Example 2

⟦hit(x, y)⟧M,g2 = 1 iff

<⟦x⟧M,g2, ⟦y⟧M,g2> ∈ ⟦hit⟧M,g2

⟦x⟧M,g2 = g2(x) =

⟦y⟧M,g2 = g2(y) =

⟦hit⟧M,g = ISimpsons(hit) =

{< , >, < , >, < , >, < , >, < , >}

x →

y →

z →

w →

...

57 of 62

Exercise

g1 = g2 = g3 =

⟦annoy(z,y)⟧M,g1 = ...

ISimpsons (annoy) ={< , >, < , >, < , >, < , >, < , >}

x →

y →

z →

w →

...

x →

y →

z →

w →

...

x →

y →

z →

w →

...

58 of 62

Notation g[x→ d]

Assignment functions are hard to represent because they map many variables to many entities.

But often we are concerned with only one variable and not all the ones in the logical language.

In such cases, we can write g[x→ d] to pick an assignment exactly like g except that x is mapped to d.

59 of 62

Quantifiers

Let’s assign meaning to our quantifiers:

⟦∃v[φ]⟧M,g = 1 iff there is at least one entity d D such that ⟦φ⟧M,g[v→d] = 1

⟦∀v[φ]⟧M,g =1 iff for all d D it holds that ⟦φ⟧M,g[v→d] = 1

60 of 62

Example 1

⟦∀x[simpson(x)⟧M,g =

1 iff for all entity d ∈ D it holds that ⟦simpson(x)⟧M,g[x→ d] = 1

⟦simpson(x)⟧M,g[x→ d] =

1 iff ⟦x⟧M,g[x→ d] ∈ ⟦simpson⟧M,g[x→ d] =

1 iff d ∈

{ , , , , }

DSimpsons = { , , , , , }

61 of 62

Example 2

⟦∃x[simpson(x) ⋀ crawl(x)⟧M,g =

1 iff there is a d ∈ D such that ⟦simpson(x) crawl(x)⟧M,g[x→ d] = 1

⟦simpson(x) crawl(x)⟧M,g[x→ d] = 1 iff

⟦simpson(x)⟧M,g[x→ d] = ⟦crawl(x)⟧M,g[x→ d] = 1

⟦x⟧M,g[x→ d] ∈ ⟦simpson⟧M,g[x→ d]

⟦x⟧M,g[x→ d] ∈ ⟦crawl⟧M,g[x→ d]

DSimpsons = { , , , , , }

ISimpsons (crawl) = { }

ISimpsons (simpson) = { , , , , }

62 of 62

Exercise

⟦∀x[simpson(x) → ∃y[hit(y,x)]]⟧M,g =

1 iff for all d ∈ D ⟦simpson(x) → ∃y[hit(y,x)]⟧M,g[x→ d] = 1

= 0 iff ⟦simpson(x)⟧M,g[x→ d] = 1 but ⟦∃y[hit(y,x)]⟧M,g[x→ d] = 0

⟦x⟧M,g[x→ d] ∈ ⟦simpson⟧M,g[x→ d]

d ∈ I(simpson)

There is an e ∈ D ⟦hit(y,x)⟧M,g[x→ d, y→ e] = 1

<⟦y⟧M,g[x→ d, y→ e], ⟦x⟧M,g[x→ d, y→ e]> ∈ ⟦hit⟧M,g[x→ d, y→ e]

<e, d> ∈ ISimpsons(hit)

ISimpsons (hit) = {< , >, < , >, < , >, < , >, < , >}

ISimpsons (simpson) = { , , , , }