Logic as a framework for NL semantics. Outline. Syntax of FOL [1] Semantic Theory Type Theory

Similar documents
Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Propositional Logic. Part I

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS

Semantics and Pragmatics of NLP

Semantics and Pragmatics of NLP Propositional Logic, Predicates and Functions

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Introductory logic and sets for Computer scientists

Knowledge Representation

CSC 501 Semantics of Programming Languages

Programming Languages Third Edition

LING 130: Quantified Noun Phrases

Software Paradigms (Lesson 6) Logic Programming

Typed Lambda Calculus for Syntacticians

LECTURE 8: SETS. Software Engineering Mike Wooldridge

Chapter 3: Propositional Languages

SOFTWARE ENGINEERING DESIGN I

Typed Lambda Calculus

Software Engineering Lecture Notes

Lecture 4. First order logic is a formal notation for mathematics which involves:

II. Judgements and -polymorphism

Type Systems COMP 311 Rice University Houston, Texas

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

For next Tuesday. Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday

F. Brief review of classical predicate logic (PC)

1.3. Conditional expressions To express case distinctions like

Introduction to Logic Programming

Towards a Logical Reconstruction of Relational Database Theory

Chapter 1.3 Quantifiers, Predicates, and Validity. Reading: 1.3 Next Class: 1.4. Motivation

Logic Programming Paradigm

Proseminar on Semantic Theory Fall 2013 Ling 720 An Algebraic Perspective on the Syntax of First Order Logic (Without Quantification) 1

Note that in this definition, n + m denotes the syntactic expression with three symbols n, +, and m, not to the number that is the sum of n and m.

Computer-supported Modeling and Reasoning. First-Order Logic. 1 More on Isabelle. 1.1 Isabelle System Architecture

CSC Discrete Math I, Spring Sets

Lecture 5 - Axiomatic semantics

More Untyped Lambda Calculus & Simply Typed Lambda Calculus

(Refer Slide Time: 4:00)

Lecture 5. Logic I. Statement Logic

7. Relational Calculus (Part I) 7.1 Introduction

Lexicografie computationala Feb., 2012

15-819M: Data, Code, Decisions

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27

Going beyond propositional logic

Introduction & Review

Automated Reasoning. Natural Deduction in First-Order Logic

Knowledge Representation and Reasoning Logics for Artificial Intelligence

COSC252: Programming Languages: Semantic Specification. Jeremy Bolton, PhD Adjunct Professor

Lectures 20, 21: Axiomatic Semantics

Intermediate Logic. Interpretations

Intermediate Logic. Natural Deduction for FOL

Z Notation. June 21, 2018

CSE 473 Lecture 12 Chapter 8. First-Order Logic. CSE AI faculty

CMSC 330: Organization of Programming Languages. Formal Semantics of a Prog. Lang. Specifying Syntax, Semantics

Introduction to Logic Programming

Th(N, +) is decidable

What is a Logic Program. Introduction to Logic Programming. Introductory Examples. Introductory Examples. Foundations, First-Order Language

THE PREDICATE CALCULUS

Goals: Define the syntax of a simple imperative language Define a semantics using natural deduction 1

Formally-Proven Kosaraju s algorithm

Situation Calculus and YAGI

Review Material: First Order Logic (FOL)

CS590U Access Control: Theory and Practice. Lecture 18 (March 10) SDSI Semantics & The RT Family of Role-based Trust-management Languages

Part I Logic programming paradigm

CSE Discrete Structures

Higher-Order Logic. Specification and Verification with Higher-Order Logic

Semantics via Syntax. f (4) = if define f (x) =2 x + 55.

Module 8. Other representation formalisms. Version 2 CSE IIT, Kharagpur

Lecture 5: Predicate Calculus. ffl Predicate Logic ffl The Language ffl Semantics: Structures

Review of Sets. Review. Philippe B. Laval. Current Semester. Kennesaw State University. Philippe B. Laval (KSU) Sets Current Semester 1 / 16

Chapter 2 & 3: Representations & Reasoning Systems (2.2)

Part II. Hoare Logic and Program Verification. Why specify programs? Specification and Verification. Code Verification. Why verify programs?

Automata Theory for Reasoning about Actions

Axiomatic Specification. Al-Said, Apcar, Jerejian

Pure Lambda Calculus. Lecture 17

Lambda Calculus. Type Systems, Lectures 3. Jevgeni Kabanov Tartu,

logic with quantifiers (informally)

RIF RuleML Rosetta Ring: Round-Tripping the Dlex Subset of Datalog RuleML and RIF-Core

Logic Programming and Resolution Lecture notes for INF3170/4171

DATABASE THEORY. Lecture 11: Introduction to Datalog. TU Dresden, 12th June Markus Krötzsch Knowledge-Based Systems

Lecture 4: January 12, 2015

Introduction to Scheme

Inductive Definitions, continued

Introduction to the Lambda Calculus. Chris Lomont

Syntax-semantics interface and the non-trivial computation of meaning

X-KIF New Knowledge Modeling Language

Consider a description of arithmetic. It includes two equations that define the structural types of digit and operator:

MIDTERM EXAM (Solutions)

Computer Science and Mathematics. Part I: Fundamental Mathematical Concepts Winfried Kurth

Foundations of Databases

Functional Programming. Big Picture. Design of Programming Languages

Contents. Chapter 1 SPECIFYING SYNTAX 1

Decision Procedures in First Order Logic

Propositional Logic Formal Syntax and Semantics. Computability and Logic

ARTIFICIAL INTELLIGENCE (CS 370D)

CMPS 277 Principles of Database Systems. Lecture #3

Organization of Programming Languages CS3200/5200N. Lecture 11

3.4 Deduction and Evaluation: Tools Conditional-Equational Logic

Bliksem 1.10 User Manual

Logical reasoning systems

Chapter 3. Describing Syntax and Semantics

Transcription:

Logic as a framework for NL semantics Semantic Theory Type Theory Manfred Pinkal Stefan Thater Summer 2007 Approximate NL meaning as truth conditions. Logic supports precise, consistent and controlled meaning representation via truth-conditional interpretation. Logic provides deduction systems to model inference processes, controlled through a formal entailment concept. Logic supports uniform modelling of the semantic composition process. 2 Outline A reminder: First-order predicate logic (FOL). The limits of FOL as a formalism for semantic representations. Type theory Syntax of FOL [1] Non-logical expressions: Individual constants: CON = { j*, b*, } n-place relation constants: REL n, for all n! 0 Individual variables: VAR = { x, y, z, } Terms: TERM = VAR " CON Atomic formulas: R(t1,, tn) for R # REL n and t1,, tn # TERM s = t for s, t # TERM 3 4

Syntax of FOL [2] FOL formulas: The smallest set FORM such that all atomic formulas are in FORM if $, % are in FORM, then $, ($ & %), ($ ' %), ($()(%), ($ * %) are in FORM if x is individual variable, and $ is in FORM, then +x$ and,x$ are in FORM Scope If +x$ (,x$) is a subformula of %, then we call $ the scope of this occurrence of +x (,x) in %. We distinguish distinct occurrences of quantifiers as there are formulae like +xa(x) & +xb(x). An example:,x(+y(t(y) * x=y) & F(x)) 5 6 Free and Bound Variables An occurrence of a variable x in a formula $ is said to be free in $ if this occurrence of x does not fall within the scope of a quantifier +x or,x in $. If +x% (or,x%) is a subformula of $ and x is free in %, then this occurrence of x is said to be bound by this occurrence of the quantifier +x (or,x). +x (A(x) & B(x)) +x A(x) & B(x) A sentence is a formula without free variables. Notational Variants We usually omit outermost brackets A & B instead of (A & B) A & B & C instead of (A & (B & C)) Rxy instead of R(x,y) Alternative notation for quantifiers We usually omit brackets if no ambiguities can arise We sometimes omit brackets for atomic formulas:,x. A(x) & B(x) instead of,x(a(x) & B(x)) 7 8

Semantics of FOL [1] Model structure for FOL: M = /UM, VM0 UM is non-empty universe (individual domain) VM is an interpretation function, which assigns individuals (#UM) to individual constants and n-ary relations between individuals (#UM n ) to n- place predicate symbols. Assignment function for variables g: VAR ) UM Semantics of FOL [2] Interpretation of terms with respect to model structure M and variable assignment g: [[1]] M,g = VM(1), if 1 is an individual constant [[1]] M,g = g(1), if 1 is a variable 9 10 Semantics of FOL [3] Interpretation of formulas with respect to model structure M and variable assignment g: -[[ R(t1,..., tn) ]] M,g = 1 - iff /[[ t1 ]] M,g,..., [[ tn ]] M,g 0 # VM(R) [[ s = t ]] M,g = 1 iff [[ s ]] M,g = [[ t ]] 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 = 0 or [[ % ]] M,g = 1 - [[ $ * % ]] M,g = 1 - iff [[ $ ]] M,g = [[ % ]] M,g Semantics of FOL [4] Interpretation of formulas with respect to model structure M and variable assignment g: - [[,x$ ]] M,g = 1 - - iff there is an a # UM such that [[$]] M,g[x/a] = 1 - [[ +x$ ]] M,g = 1 - - iff for all a # UM, [[$]] M,g[x/a] = 1 g[x/a] is the variable assignment which is identical to g except that it assigns a to the variable x: g[x/a](y) = a, if x = y g[x/a](y) = g(y), if x. y 11 12

Semantics of FOL [5] Formula $ is true in the model structure M iff [[$]] M,g (= 1 for every variable assignment g. A model structure M satisfies a set of formulas 2 iff every formula $ # 2 is true in M. We say that M is a model of 2 in this case. $ is valid iff $ is true in all model structures. $ is satisfiable iff there is a model structure that makes $ true; else it is unsatisfiable. $ is contingent iff $ is satisfiable but not valid. Entailment and Deduction [1] A set of formulas 2 entails formula $ (2 3 $) iff $ is true in every model of 2. A (sound and complete) calculus for FOL allows us to prove $ from 2 iff 2 3 $ by manipulating the formulas syntactically. There are many calculi for FOL: resolution, tableaux, natural deduction, 13 14 Entailment and Deduction [2] Calculi can be implemented to obtain: theorem provers: check entailment, validity, and unsatisfiability model builders: check satisfiability, compute models model checkers: determine whether model satisfies a formula Dolphins in FOL Dolphins are mammals, not fish. +x (dolphin (x) ) (mammal (x) & fish (x))) Dolphins live in pods. +x (dolphin (x) ),y(pod (y) & live-in (x, y)) Dolphins give birth to one baby at a time. +x (dolphin (x) ) - +y +z +t ((-give-birth-to (x, y, t) & - - give-birth-to (x, z, t)) ) x = y) 15 16

Students Mary is a student. student (m*) Mary reads a book.,x(book (x) & read (m*, x)) Every student presents a paper +x(student (x) ),y(paper (y) & present (x,y))) Expressiveness of FOL [1] John is a blond criminal criminal (j*) & blond (j*) John is a famous criminal criminal (j*) & famous (j*)? John is an alleged criminal - criminal (j*) & alleged (j*)??? 17 18 Expressiveness of FOL [2] John is walking quickly. walk (j*) & quick (j*)? John is walking very quickly. -??? Expressiveness of FOL [3] Bill is blond. Blond is a hair-color. 19 20

Expressiveness of FOL [4] It rains. It rained yesterday. It rains occasionally. Expressiveness of FOL [5] Mary has all properties of a successful student. 21 22 Type Theory The types of non-logical expressions provided by FOL are not sufficient to describe the semantic function of all natural language expressions. Type theory provides a much richer inventory of types: higher-order relations and functions of different kinds. For NL meaning representation the (minimal) set of basic types is {e, t} e ( entity ) is the type of individual terms t ( truth value ) is the type of formulas Complex types Types If 4,5 are types, then /4, 50 is a type /4, 50 is the type of functions which map arguments of type 4 to values of type 5. 23 24

Type Theory Syntax [1] Type Theory Syntax [2] Vocabulary: Possibly empty, pairwise disjoint sets of nonlogical constants: CON5 for every type 5 Infinite and pairwise disjoint sets of variables: VAR5 for every type 5 The logical operators known from FOL. The sets of well-formed expressions WE5 for every type 5 are given by: CON5 6 WE5 for every type 5 If 1 # WE/4, 50, 7 # WE4, then 1(7) # WE5. If $, % are in WEt (i.e., formulas), then so are $, ($ & %), ($ ' %), ($ ) %), ($ * %) If $ is in WEt, then so are +v$ and,v$, where v is a variable of arbitrary type. If 1, 7 are well-formed expressions of the same type, then 1 = 7 # WEt. 25 26 Bill is walking. Examples - - bill* : e - walk : /e,t0 - - - - walk (bill*) Bill is walking quickly. - - - - walk : /e,t0- quick : //e,t0,/e,t00 - - bill* : e - - quick (drive ) : /e,t0 - - - quick (drive )(bill*) : t Examples Mary works in Saarbrücken - mary* : e- - work : /e,t0- in : /e,/t,t00- sb* : e - - - work (mary*) : t- - - - in (sb*) : /t,t0 - - - - - in (sb*)(work (mary*)) : t 27 28

Second-order predicates Bill is blond. Blond is a hair colour: Bill is represented as a term of type e. blond is represented as a term of type /e,t0. hair colour is represented as a term of type //e,t0,t0. Type Theory Semantics [1] Let U be a non-empty set of entities. The domain of possible denotations D5 for every type 5 is given by: De = U Dt = {0,1} D/4, 50 is the set of functions from D4 to D5 29 30 Type Theory Semantics [2] A model structure for a type theoretic language is a pair M = /UM, VM0, where- UM is non-empty domain of individuals VM is function, which assigns every non-logical constant (#CON5) of type 5 a member of D5. Variable assignment g assigns every variable of type 5 a member of D5. Type Theory Semantics [3] Interpretation with respect to model structure M and variable assignment g: [[ 1 ]] M,g = VM(1), if 1 constant [[ 1 ]] M,g = g(1), if 1 variable [[ 1(7) ]] M,g = [[ 1 ]] M,g ([[ 7 ]] M,g )- [[ 8 ]] M,g = 1 iff [[ 8 ]] M,g = 0 [[ 8 & % ]] M,g = 1 iff [[ 8 ]] M,g = 1 and [[ % ]] M,g = 1, [[ 1=7 ]] M,g = 1 iff [[ 1 ]] M,g = [[ 7 ]] M,g 31 32

Type Theory Semantics [3] Interpretation with respect to model structure M and variable assignment g: [[,v8 ]] M,g = 1 - iff there is an a # D5 such that [[ 8 ]] M,g[v/a] = 1 [[ +v8 ]] M,g = 1 - iff for all a # D5, [[ 8 ]] M,g[v/a] = 1 where v # VAR5 Characteristic Functions A function of type /4, t0 maps each member of D4 to true or false. See this as representing a subset of D4 namely, the set of members of D4 that are mapped to true. Example: blond is a constant of type /e, t0. It can be seen as characterising the set of blond individuals (of type e). 33 34 Currying All functional types are interpreted as one-place functions. How do we deal with functions/relations with multiple arguments? Currying (a.k.a. Schönfinkeln ): simulate term P(a,b) as the term P(a)(b) simulate type /e 9 e, t0 as the type /e, /e,t00 Mary reads a book Predicate logic,x(book (x) & read (m*, x)) Type theory,x(book (x) & read (m*)(x)) 35 36

Type Theory The definition of the syntax and semantics of type theory is a straightforward extension of FOL. Notions like satisfies, valid, satisfiable, entailment carry over almost verbatim from FOL. Type theory is sometimes called higher-order logic: first-order logic allows quantification over individual variables (type e) second-order logic allows quantification over variables of type /4, 50 where 4 and 5 are atomic Meaning Postulates John is walking quickly quick (walk )(john*) Mary works in Saarbrücken. in (sb*)(work (mary*)) 37 38 Summary First-order logic is nice, but its expressiveness is limited, and some NL phenomena cannot be modelled adequately. modification modification of modifiers higher-order properties Type theory is a generalisation of first-order logic that allows us to represent the semantics of all these expressions. 39