Download presentation
1
First-Order Logic (and beyond)
Johan Bos
2
Overview of this lecture
Introduction to first-order logic Discourse Representation Theory Using the Lambda-Calculus
3
Logical languages propositional logic modal logic description logic
first-order logic (predicate logic) second-order logic higher-order logic expressive power
4
This lecture In this lecture we will try to map English to First-Order Logic First-order logic extends propositional logic with variables and quantifiers As we will see it is capable for modelling sub-sentential semantics
5
First-order logic First-order logic is a language
So we will look at its ingredients We will define the syntax, or in other words, the “grammar” We will look at the semantics only from an informal point of view
6
Ingredients of first-order logic
Terms (variables or contants) Variables: x, y, z, … Constants: m’, j’, … Predicate Symbols One-place predicate symbols: walk, smoke, … Two-place predicate symbols: see, love, … Connectives: , ,, , Punctuation: brackets ( ) and the comma , The quantifiers Universal quantifier: Existential quantifier:
7
Syntax of first-order logic
If P is a one-place relation symbol, and t a term, then P(t) is a first-order formula If R is a two-place relation symbol, and t1 and t2 are terms, then R(t1,t2) is a first-order formula If is a first-order formula, then so is If and are first-order formulas, then so are (), (), () and () If is a first-order formula, and x a variable, then x and x are first-order formulas Nothing else is a first-order formula
8
Examples of first-order formulas
Mia walks. walk(mia’) A dog barks. x(dog(x) bark(x)) Vincent likes every dog. x(dog(x) like(vincent’,x))
9
Semantics of the quantifiers
x true if and only if there is an x such that is true x true if and only if for all x it is the case that is true
10
Truth and Models Truth in first-order logic is often defined with the help of models A model M is usually taken to consist of two parts (M = <D,F>): (1) a domain of entities (D) (2) an interpretation function (F) for all non-logical symbols The truth-definition with models was introduced by the famous logician Alfred Tarski
11
Example model M = <D,F> D = {d1,d2,d3}
F(mia’) = d1 F(vincent’) = d2 F(person) = {d1,d2} F(dog) = {d3} F(love) = {(d1,d2),(d2,d2),(d2,d1),(d2,d3)} F(hate) = {(d1,d3)}
12
Semantics of the quantifiers
x true in M if and only if we can map x to at least one member of D such that is true in M x true if and only if for all members of D, if we map x it, it is the case that is true in M
13
Free variables The quantifiers bind variables
For instance, x binds all occurrences of x in the formula Variables that are not bound are called free For instance, the following two formulas contain free variables: walk(x) smoke(y) y person(y)
14
Closed formulas Formulas that have no free variables are called closed
Usually we’re only interested in closed formulas --- translating a natural language sentence to first-order logic should produce a closed formula Free variables can be thought of as “pronouns”.
15
What’s wrong with these translations?
A dog barks. (x dog(x) bark(x)) A dog barks. x(dog(x) bark(x)) Every dog barks. x(dog(x) bark(x))
16
Lambdas and Higher-order Logic
Fine, we have seen how we can represent English (or Italian) sentences into logic, but what about noun phrases, verb phrases, nouns, determiners, adjectives, prepositions, and so on?
17
Montague Grammar Richard Montague used higher order logic to translate sub-sentence fragments into logic Basically we add to two new constructs to first-order logic: the lambda operator λ function application ()
18
Examples with lambdas The lambda binds variables and can be seen as a “place-holder” for missing information Examples: Mia mia’ man λz.man(z) love λx. λy. love(y,x) every λp. λq. x(p(x) q(x))
19
Example derivation loves Mia λx. λy. love(y,x) (mia’) = λy. love(y,mia’) Every man λp. λq. x(p(x) q(x))(λz.man(z)) = λq. x(λz.man(z)(x) q(x)) = λq. x(man(x) q(x)) Every man loves Mia λq. x(man(x) q(x)) (λy. love(y,mia’)) = x(man(x) λy. love(y,mia’)(x)) = x(man(x) love(x,mia’))
20
Discourse Representation Theory
Nice so far, but what about translating pronouns that have antecedents across sentences? Mia dances. She is happy. A man smokes. He likes Mia. Hans Kamp introduced DRT (Discourse Representation Theory) to deal with a lot of anaphoric phenomena.
21
Problematic cases for FOL
A woman dances. She is happy. x(woman(x) dance(x)) happy(x) Every farmer who owns a donkey beats it. x((farmer(x) y(donkey(y) own(x,y))) beat(x,y))
22
Problematic cases for FOL
A woman dances. She is happy. x(woman(x) dance(x)) happy(x) x(woman(x) dance(x) happy(x)) Every farmer who owns a donkey beats it. x((farmer(x) y(donkey(y) own(x,y))) beat(x,y)) xy((farmer(x) donkey(y) own(x,y)) beat(x,y))
23
Discourse Representation Theory
DRT is a theory of natural language semantics using DRSs to represent texts (discourse) A DRS encapsulates both content and context Content: the meaning of the text so far Context: information to interpret anaphoric expressions in subsequent sentences
24
DRT examples Discourse Representation Structures (DRS)
Discourse referents (first-order variables) Structure plays role in pronoun resolution A dog barked. x dog(x) bark(x)
25
DRT examples Discourse Representation Structures (DRS)
Discourse referents (first-order variables) Structure plays role in pronoun resolution A dog barked. Every dog barked. x dog(x) bark(x) bark(x) x dog(x)
26
Accessibility (1) Discourse referents are accessible if they are in the same DRS A dog barked. It was happy. x y dog(x) bark(x) happy(y) y = ???
27
Discourse referent x is accessible
Accessibility (1) Discourse referents are accessible if they are in the same DRS A dog barked. It was happy. x y dog(x) bark(x) happy(y) y = x Discourse referent x is accessible
28
Discourse referent x is not accessible
Accessibility (2) Discourse referents are not accessible if they are part of a nested DRS Every dog barked. ?It was happy. y happy(y) y = ?? x dog(x) bark(x) Discourse referent x is not accessible
29
Donkey Sentences DRT solves the donkey sentence problem x y
Every farmer that owns a donkey beats it. x y farmer(x) donkey(y) own(x,y) beat(x,y)
30
Further Reading Gamut, Volume 2 (Montague Grammar)
Kamp & Reyle (Discourse Representation Theory)
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.