23
Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Semantic Theory Week 3 – Type Theory

Noortje Venhuizen

Universität des Saarlandes

Summer 2016

1

Page 2: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

First-order logic

First-order logic talks about:

• Individual objects

• Properties of and relations between individual objects

• Generalization across individual objects (quantification)

2

Page 3: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Limitations of first-order logic

FOL is not expressive enough to capture all meanings that can be expressed by basic natural language expressions:

Jumbo is a small elephant. (Predicate modifiers)

Blond is a hair color. (Second-order predicates)

Yesterday, it rained. (Non-logical sentence operators)

Bill and John have the same hair color. (Higher-order quantification)

3

What logical system can we use to capture this diversity?

Page 4: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

4

Q: Does the barber shave himself?

Bertrand Russell

Page 5: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Russell's paradox

5

What if we extend the FOL interpretation of predicates, and interpret higher-order predicates as sets of sets of properties?

For every predicate P, we can define a set {x | P(x)} containing all and only those entities for which P holds.

Then we can define a set S = {X | X ∉ X} representing the set of all sets that are not members of itself.

Q: does S belong to itself?

… we need a more restricted way of talking about properties and relations between properties!

Page 6: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Type Theory

Basic types:

• e – the type of individual terms (“entities”)

• t – the type of formulas (“truth-values”)

6

Complex types:

•  If σ, τ are types, then ⟨σ, τ⟩ is a type (representing a functor expression that takes a σ type expression as argument and returns a type τ expression; sometimes written as: (σ→ τ) ).

Page 7: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Types & Function Application

Types of first-order expressions:

• Individual constants (Luke, Saarbrücken) : e

• One-place predicates (sleep, walk): ⟨e, t⟩

• Two-place predicates (read, admire): ⟨e, ⟨e, t⟩⟩

• Three-place predicates (give, introduce): ⟨e, ⟨e, ⟨e, t⟩⟩⟩

7

Function application: Combining a functor of complex type with an appropriate argument, resulting in an expression of a less complex type: ⟨ɑ, β⟩(ɑ) ↦ β

• sleep’(john’) :: ⟨e, t⟩(e) ⟹ t

• admire’(john’) :: ⟨e,⟨e, t⟩⟩(e) ⟹ ⟨e, t⟩

Page 8: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

More examples of types

Types of higher-order expressions:

• Predicate modifiers (expensive, poor): ⟨⟨e, t⟩, ⟨e, t⟩⟩

• Second-order predicates (hair colour): ⟨⟨e, t⟩, t⟩

• Sentence operators (yesterday, possibly, unfortunately): ⟨t, t⟩

• Degree particles (very, too): ⟨⟨⟨e, t⟩, ⟨e, t⟩⟩, ⟨⟨e, t⟩, ⟨e, t⟩⟩⟩

8

Tip: If σ, τ are basic types, ⟨σ, τ⟩ can be abbreviated as στ. Thus, the type of predicate modifiers and second-order predicates can be more conveniently written as ⟨et, et⟩ and ⟨et, t⟩, respectively.

Page 9: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Type Theory — Vocabulary

Non-logical constants:

• For every type τ a (possibly empty) set of non-logical constants CONτ (pairwise disjoint)

Variables:

• For every type τ an infinite set of variables VARτ (pairwise disjoint)

Logical symbols: ∀, ∃, ¬, ∧, ∨, →, ↔, =

Brackets: (, )

9

Page 10: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Type Theory — Syntax

For every type τ, the set of well-formed expressions WEτ is defined as follows:

(i) CONτ ⊆ WEτ and VARτ ⊆ WEτ;

(ii) If α ∈ WE⟨σ, τ⟩, and β ∈ WEσ, then α(β) ∈ WEτ; (function application)

(iii) If A, B are in WEt, then ¬A, (A ∧ B), (A ∨ B), (A → B), (A ↔ B) are in WEt;

(iv) If A is in WEt and x is a variable of arbitrary type, then ∀xA and ∃xA are in WEt;

(v) If α, β are well-formed expressions of the same type, then α = β ∈ WEt;

(vi) Nothing else is a well-formed formula.

10

Page 11: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

(ii) If α ∈ WE⟨σ,τ⟩, and β ∈ WEσ, then α(β) ∈ WEτ

“John is a talented piano player”

Function application

11

piano_player talented john talented(piano_player)

talented(piano_player)(john)

:: ⟨e, t⟩ :: ⟨⟨e, t⟩, ⟨e, t⟩⟩

:: e :: ⟨e, t⟩

:: t

Page 12: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Higher-order predicates

Higher-order quantification:

• Bill has the same hair colour as John

∃C (hair_colour(C) ∧ C(bill) ∧ C(john))

12

⟨⟨e, t⟩,t⟩ ⟨e, t⟩ e

Higher-order equality:

• For p, q ∈ CONt, “p=q” expresses material equivalence: “p ↔ q”.

• For F, G ∈ CON⟨e, t⟩, “F=G” expresses co-extensionality: “∀x(Fx↔Gx)”

• For any formula φ of type t, φ=(x=x) is a representation of “φ is true”.

Page 13: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Type Theory — Semantics [1]

Let U be a non-empty set of entities.

The domain of possible denotations Dτ for every type τ is given by:

• De = U

• Dt = {0,1}

• D⟨σ,τ⟩ is the set of all functions from Dσ to Dτ

Expressions of type σ denote elements of Dσ

13

Page 14: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Characteristic functions

Many natural language expressions have a type ⟨σ, t⟩

Expressions with type ⟨σ, t⟩ are functions mapping elements of type σ to truth values: {0,1}

Such functions with a range of {0,1} are called characteristic functions, because they uniquely specify a subset of their domain Dσ

14

The characteristic function of set M in a domain U is the function FM: U→{0,1} such that for all a ∈ U, FM(a) = 1 iff a ∈ M.

NB: For first-order predicates, the FOL representation (using sets) and the type-theoretic representation (using characteristic functions) are equivalent.

Page 15: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Interpretation with characteristic functions: example

For M = ⟨U, V⟩, let U consist of the persons John, Bill, Mary, Paul, and Sally. For selected types, we have the following sets of possible denotations:

15

• Dt = {0,1}

• De = U = {j, b, m, p, s}j →1b→0m→1p→0s→1

j →1b→1m→0p→1s→1

j →0b→1m→1p→0s→0

• D<e,t> ={ , , , …}

Alternative set notation: D<e,t> = {{j,m,s},{j,b,p,s},{b,m},…}

Page 16: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Type Theory — Semantics [2]

A model structure for a type theoretic language is a tuple M = ⟨U, V⟩ such that:

• U is a non-empty domain of individuals

• V is an interpretation function, which assigns to every α ∈ CONτ an element of Dτ (where τ is an arbitrary type)

The variable assignment function g assigns to every typed variable v ∈ VARτ an element of Dτ

16

Page 17: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Type Theory — Interpretation

Interpretation with respect to a model structure M = ⟨U, V⟩ and a variable assignment g: • ⟦α⟧M,g = V(α) if α is a constant

⟦α⟧M,g = g(α) if α is a variable • ⟦α(β)⟧M,g = ⟦α⟧M,g(⟦β⟧M,g) • ⟦¬φ⟧M,g = 1 iff ⟦φ⟧M,g = 0

⟦φ ∧ ψ⟧M,g = 1 iff ⟦φ⟧M,g = 1 and ⟦ψ⟧M,g = 1⟦φ ∨ ψ⟧M,g = 1 iff ⟦φ⟧M,g = 1 or ⟦ψ⟧M,g = 1…

• ⟦α = β⟧M,g = 1 iff ⟦α⟧M,g = ⟦β⟧M,g • For any variable v of type σ:

⟦∃vφ⟧M,g = 1 iff there is a d ∈ Dσ such that ⟦φ⟧M,g[v/d] = 1⟦∀vφ⟧M,g = 1 iff for all d ∈ Dσ : ⟦φ⟧M,g[v/d] = 1

17

Page 18: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Interpretation: Example

John is a talented piano player

piano_player :: ⟨e, t⟩ talented:: ⟨⟨e, t⟩, ⟨e, t⟩⟩ john :: e talented(piano_player) :: ⟨e, t⟩ talented(piano_player)(john) :: t

18

⟦talented(piano_player)(john)⟧M,g

= ⟦talented(piano_player)⟧M,g (⟦john⟧M,g)

= ⟦talented⟧M,g(⟦piano_player⟧M,g) (⟦john⟧M,g)

= VM(talented)(VM(piano_player))(VM(john))

Page 19: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Interpretation: Example (cont.)

⟦John is a talented piano player⟧M,g = VM(talented)(VM(piano_player))(VM(john))

VM(john) = j (∈ De)

VM(piano_player) = (∈ D⟨e,t⟩)

VM(talented) = (∈ D⟨⟨e,t⟩⟨e,t⟩⟩)

19

j →1b→0m→1p→0s→1

j →1b→0m→1p→0s→1

j →1b→0m→0p→0s→1

j →0b→0m→1p→1s→1

j →0b→0m→0p→0s→1

⇔ [ ]{j,m,s} → {j,s} {m,p,s}→ {s}

⇔ {j,m,s}

VM(talented)(VM(piano_player))

VM(talented)(VM(piano_player))(VM(john))

Page 20: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Defining the right model

De = UM = {e1, e2, e3, e4, e5}

VM(Anakine) = VM(Darth Vadere) = e2

VM(Yedi⟨e,t⟩) = VM(Dark_Sider⟨e,t⟩) =

20

Luke

Anakin

Leia

Palpatine

Yoda

M:Darth Vader

e1

e2

e3 e4

e5

e1→1e2→1e3→1e4→1e5→0

e1→0e2→1e3→0e4→0e5→1

Powerful X⟨e,t⟩ ⊨ X⟨e,t⟩

e1→1e2→1e3→1e4→1e5→0

e1→0e2→1e3→0e4→0e5→1

e1→0e2→1e3→0e4→0e5→1

e1→0e2→1e3→0e4→1e5→0

VM(Powerful⟨⟨e,t⟩⟨e,t⟩⟩) =

Consider the following Model M:

Page 21: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Adjective classes & Meaning postulates

Some valid inferences in natural language:

• Bill is a poor piano player ⊨ Bill is a piano player

• Bill is a blond piano player ⊨ Bill is blond

• Bill is a former professor ⊨ Bill isn’t a professor

21

These entailments do not hold in type theory. Why?

Meaning postulates: restrictions on models which constrain the possible meaning of certain words

Page 22: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Adjective classes & Meaning postulates (cont.)

Restrictive or Subsective adjectives (“poor”)

• ⟦ poor N ⟧ ⊆ ⟦ N ⟧

• Meaning postulate: ∀G∀x(poor(G)(x) → G(x))

Intersective adjectives (“blond”)

• ⟦ blond N ⟧ = ⟦ blond ⟧ ∩ ⟦ N ⟧

• Meaning postlate: ∀G∀x(blond(G)(x) → (blond*(x) ∧ G(x))

• NB: blond ∈ WE⟨⟨e, t⟩, ⟨e, t⟩⟩ ≠ blond* ∈ WE⟨e, t⟩

Privative adjectives (“former”)

• ⟦ former N ⟧ ∩ ⟦ N ⟧ = ∅

• Meaning postlate: ∀G∀x(former(G)(x) → ¬G(x))

22

Page 23: Semantic Theory Week 3 – Type Theory€¦ · Semantic Theory Week 3 – Type Theory Noortje Venhuizen Universität des Saarlandes Summer 2016 1

Background reading material

• Gamut: Logic, Language, and Meaning Vol II — Chapter 4 (minus 4.3)

23