First-Order Logic (and beyond)

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Problems of syntax-semantics interface ESSLLI 02 Trento.
Artificial Intelligence 4. Knowledge Representation
1 First order theories (Chapter 1, Sections 1.4 – 1.5)
Computational Semantics Aljoscha Burchardt, Alexander Koller, Stephan Walter, Universität des Saarlandes,
The Logic of Quantified Statements
Working with Discourse Representation Theory Patrick Blackburn & Johan Bos Lecture 3 DRT and Inference.
Semantics (Representing Meaning)
Semantics and Inference Part I Johan Bos. Overview of this lecture Inferences on the sentence level –Entailment –Paraphrase –Contradiction Using logic.
0 Montague Grammar EECS Fall 2004 Amy Kao. 1 Montague Grammar Maps syntactic structure with semantic structure Uses formal language to describe.
CAS LX 502 8a. Formal semantics Truth and meaning The basis of formal semantics: knowing the meaning of a sentence is knowing under what conditions.
Used in place of a noun pronoun.
Today’s Topics Limits to the Usefulness of Venn’s Diagrams Predicates (Properties and Relations) Variables (free, bound, individual, constants)
Knowledge Representation Methods
Artificial Intelligence Modal Logic
Exam #3 is Friday. It will consist of proofs, plus symbolizations in predicate logic.
Discourse Representation Theory: An overview Part I: The linguistic problem.
ANAPHORA IN NATURAL LANGUAGE Aránzazu San Ginés Ruiz IHPST/U.Granada.
Semantic Composition with -DRT Christof Rumpf Heinrich-Heine-Universität Düsseldorf
Inga Schepers, Konrad Diwold, Sebastian Bitzer Seminar Introduction to Semantics University of Osnabrueck Definites and Indefinites An introduction.
The Language of Propositional Logic The Syntax and Semantics of PL.
FIRST ORDER LOGIC Levent Tolga EREN.
Predicates and Quantifiers
February 2009Introduction to Semantics1 Logic, Representation and Inference Introduction to Semantics What is semantics for? Role of FOL Montague Approach.
Debbie Mueller Mathematical Logic Spring English sentences take the form Q A B Q is a determiner expression  the, every, some, more than, at least,
Artificial Intelligence 4. Knowledge Representation Course V231 Department of Computing Imperial College, London © Simon Colton.
October 2004CSA4050 Advanced Techniques in NLP 1 CSA4050: Advanced Topics in NLP Semantics 6 Semantics of Questions and Assertions involving Quantification.
First Order Logic Chapter 7. PL is a Weak Representational Language §Propositional Logic (PL) is not a very expressive language because: §Hard to identify.
November 2003CSA4050: Semantics I1 CSA4050: Advanced Topics in NLP Semantics I What is semantics for? Role of FOL Montague Approach.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
An Intelligent Analyzer and Understander of English Yorick Wilks 1975, ACM.
Lexicografie computationala Feb., 2012 Anca Dinu University of Bucharest.
PART TWO PREDICATE LOGIC. Chapter Seven Predicate Logic Symbolization.
Introduction to Quantification Chapter 9 Language, Proof and Logic.
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.
Semantic Construction lecture 2. Semantic Construction Is there a systematic way of constructing semantic representation from a sentence of English? This.
Albert Gatt LIN3021 Formal Semantics Lecture 4. In this lecture Compositionality in Natural Langauge revisited: The role of types The typed lambda calculus.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 8.
Key Concepts Representation Inference Semantics Discourse Pragmatics Computation.
First Order Logic Dr. Rogelio Dávila Pérez Professor - Researcher Information Technologies Department ITESM, Campus Guadalajara.
1 CA 208 Logic PQ PQPQPQPQPQPQPQPQ
CS6133 Software Specification and Verification
November 2006Semantics I1 Natural Language Processing Semantics I What is semantics for? Role of FOL Montague Approach.
CAS LX a. Discourse Representation Theory 10.9.
No new reading for Wednesday. Keep working on chapter 5, section 3. Exam #3 is next Monday.
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
GoBack definitions Level 1 Parts of Speech GoBack is a memorization game; the teacher asks students definitions, and when someone misses one, you go back.
Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of.
Artificial Intelligence First-Order Predicate Logic - First-Order Predicate Logic (FOL or FOPL), also called First-Order Predicate Calculus.
Working with Discourse Representation Theory Patrick Blackburn & Johan Bos Lecture 2 Building Discourse Representation Structures.
Albert Gatt LIN3021 Formal Semantics Lecture 3. Aims This lecture is divided into two parts: 1. We make our first attempts at formalising the notion of.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
1 First Order Logic CS 171/271 (Chapter 8) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Lecture 3 Ling 442. exercises 1.What is the difference between implicature and entailment? 2.What is the difference between presuppositions and entailments?
Artificial Intelligence 4. Knowledge Representation
Introduction to Logic for Artificial Intelligence Lecture 2
Semantics (Representing Meaning)
Chapter 1 The Foundations: Logic and Proofs
CSE322 LEFT & RIGHT LINEAR REGULAR GRAMMAR
Predicates and Quantifiers
Curry A Tasty dish? Haskell Curry!.
Natural Language Processing
Formal Languages Context free languages provide a convenient notation for recursive description of languages. The original goal of formalizing the structure.
Predicate Logic: Syntax.
Parts of Speech II.
Introduction to Computational Linguistics
Presentation transcript:

First-Order Logic (and beyond) Johan Bos

Overview of this lecture Introduction to first-order logic Discourse Representation Theory Using the Lambda-Calculus

Logical languages propositional logic modal logic description logic first-order logic (predicate logic) second-order logic higher-order logic expressive power

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

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

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: 

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

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))

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

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

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)}

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

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)

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”.

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))

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?

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 ()

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))

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’))

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.

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))

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)) xy((farmer(x)  donkey(y)  own(x,y))  beat(x,y))

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

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)

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)

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 = ???

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

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

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)

Further Reading Gamut, Volume 2 (Montague Grammar) Kamp & Reyle (Discourse Representation Theory)