Semantic Theory Lecture 2: Type theory

Similar documents
2. The Language of First-order Logic

Lecture 13 of 41. More Propositional and Predicate Logic

Predicate Logic Review

Logic in general. Inference rules and theorem proving

Computational Logic and Cognitive Science: An Overview

CHAPTER 7 GENERAL PROOF SYSTEMS

Aikaterini Marazopoulou

! " # The Logic of Descriptions. Logics for Data and Knowledge Representation. Terminology. Overview. Three Basic Features. Some History on DLs

Copyright 2012 MECS I.J.Information Technology and Computer Science, 2012, 1, 50-63

From Workflow Design Patterns to Logical Specifications

Summary Last Lecture. Automated Reasoning. Outline of the Lecture. Definition sequent calculus. Theorem (Normalisation and Strong Normalisation)

CS510 Software Engineering

A Generic Process Calculus Approach to Relaxed-Memory Consistency

Predicate logic. Logic in computer science. Logic in Computer Science (lecture) PART II. first order logic

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

The Syntax of Predicate Logic

x < y iff x < y, or x and y are incomparable and x χ(x,y) < y χ(x,y).

Schedule. Logic (master program) Literature & Online Material. gic. Time and Place. Literature. Exercises & Exam. Online Material

Rigorous Software Development CSCI-GA

Artificial Intelligence

Semantics and Verification of Software

Certamen 1 de Representación del Conocimiento

Algorithmic Software Verification

The compositional semantics of same

Using Tableau to Decide Description Logics with Full Role Negation and Identity

The Modal Logic Programming System MProlog

Automated Theorem Proving - summary of lecture 1

ON FUNCTIONAL SYMBOL-FREE LOGIC PROGRAMS

Mathematical Induction. Lecture 10-11

Scalable Automated Symbolic Analysis of Administrative Role-Based Access Control Policies by SMT solving

Neighborhood Data and Database Security

Predicate Logic. For example, consider the following argument:

CODING TRUE ARITHMETIC IN THE MEDVEDEV AND MUCHNIK DEGREES

Foundational Proof Certificates

A Propositional Dynamic Logic for CCS Programs

University of Ostrava. Reasoning in Description Logic with Semantic Tableau Binary Trees

Fixed-Point Logics and Computation

Monitoring Metric First-order Temporal Properties

Static Program Transformations for Efficient Software Model Checking

Predicate Logic. Example: All men are mortal. Socrates is a man. Socrates is mortal.

(LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine.

First-Order Logics and Truth Degrees

High Integrity Software Conference, Albuquerque, New Mexico, October 1997.

Relatives and there-insertion. Alastair Butler

Likewise, we have contradictions: formulas that can only be false, e.g. (p p).

A logical approach to dynamic role-based access control

Handout #1: Mathematical Reasoning

Correspondence analysis for strong three-valued logic

Fun with Henry. Dirk Pattinson Department of Computing Imperial College London

Introduction to formal semantics -

Path Querying on Graph Databases

Introducing Formal Methods. Software Engineering and Formal Methods

Introduction to type systems

ML for the Working Programmer

Predicate logic Proofs Artificial intelligence. Predicate logic. SET07106 Mathematics for Software Engineering

Software Modeling and Verification

Chapter 7: Functional Programming Languages

Computational Methods for Database Repair by Signed Formulae

A Beginner s Guide to Modern Set Theory

KLMLean 2.0: A Theorem Prover for KLM Logics of Nonmonotonic Reasoning

Lecture 8: Resolution theorem-proving

Functional Programming. Functional Programming Languages. Chapter 14. Introduction

Optimizing Description Logic Subsumption

Limits and Continuity

Data Integration. Maurizio Lenzerini. Universitá di Roma La Sapienza

A Logic Approach for LTL System Modification

Lights and Darks of the Star-Free Star

Propositional Logic. A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both.

generality and existence i: quantification and free logic

Syntax and Semantics for Business Rules

IAI : Knowledge Representation

2. Abstract State Machines

Sentence Semantics. General Linguistics Jennifer Spenader, February 2006 (Most slides: Petra Hendriks)

Bindings, mobility of bindings, and the -quantifier

First-Order Stable Model Semantics and First-Order Loop Formulas

How To Program In Scheme (Prolog)

Logical Agents. Explorations in Artificial Intelligence. Knowledge-based Agents. Knowledge-base Agents. Outline. Knowledge bases

Query Processing in Data Integration Systems

Model Checking: An Introduction

Formalization of the CRM: Initial Thoughts

A Note on Context Logic

How To Understand The Theory Of Hyperreals

Which Semantics for Neighbourhood Semantics?

INTRODUCTORY SET THEORY

CSE 459/598: Logic for Computer Scientists (Spring 2012)

Question Answering and the Nature of Intercomplete Databases

Parametric Domain-theoretic models of Linear Abadi & Plotkin Logic

Truth as Modality. Amsterdam Workshop on Truth 13 March 2013 truth be told again. Theodora Achourioti. ILLC University of Amsterdam

Relations: their uses in programming and computational specifications

This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.

Testing LTL Formula Translation into Büchi Automata

Relational Methodology for Data Mining and Knowledge Discovery

Operational Semantics for a Fuzzy Logic Programming System with Defaults and Constructive Answers

Jaakko Hintikka Boston University. and. Ilpo Halonen University of Helsinki INTERPOLATION AS EXPLANATION

Non-deterministic Semantics and the Undecidability of Boolean BI

COMPARATIVES WITHOUT DEGREES: A NEW APPROACH. FRIEDERIKE MOLTMANN IHPST, Paris fmoltmann@univ-paris1.fr

Schema Mappings and Data Exchange

Completing Description Logic Knowledge Bases using Formal Concept Analysis

Semantics of UML class diagrams

The Ultimate Undecidability Result for the Halpern Shoham Logic

Transcription:

Semantic Theory Lecture 2: Type theory M. Pinkal / A. Koller Summer 2006 Logic as a framework for NL semantics 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. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 2 1

Logic as a framework for NL semantics 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. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 3 Outline A reminder: First-order predicate logic (FOL). The limits of FOL as a formalism for semantic representations. Type theory. Modal operators in logic. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 4 2

Dolphins Dolphins are mammals, not fish. d (dolphin(d) mammal(d) fish(d)) Dolphins live in pods. d (dolphin(d) x (pod(p) live-in (d,p)) Dolphins give birth to one baby at a time. d (dolphin(d) x y t (give-birth-to (d,x,t) give-birth-to (d,y,t) x=y) Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 5 Syntax of FOL [1] Non-logical expressions: Individual constants: IC n-place predicate symbols: RC n (n 0) Individual variables: IV Terms: T = IV IC Atomic formulas: R(t 1,...,t n ) for R RC n, if t 1,..., t n T s=t for s, t T Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 6 3

Syntax of FOL [2] FOL formulas: The smallest set For such that: All atomic formulas are in For If A, B are in For, then so are A, (A B), (A B), (A B),(A B) If x is an individual variable and A is in For, then xa and xa are in For. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 7 Dolphins in FOL Dolphins are mammals, not fish. d (dolphin(d) mammal(d) fish(d)) Dolphins live in pods. d (dolphin(d) x (pod(p) live-in (d,p)) Dolphins give birth to one baby at a time. d (dolphin(d) x y t (give-birth-to (d,x,t) give-birth-to (d,y,t) x=y) Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 8 4

Semantics of FOL [1] Model structures for FOL: M = <U, V> U (or U M ) is a non-empty universe (domain of individuals) V (or V M ) is an interpretation function, which assigns individuals ( U M ) to individual constants and n-ary relations between individuals ( U Mn ) to n-place predicate symbols. Assignment function for variables g: IV U M Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 9 Semantics of FOL [2] Interpretation of terms (with respect to a model structure M and a variable assignment g): [[α]] M,g = V M (α), if α is an individual constant [[α]] M,g = g(α), if α is a variable Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 10 5

Semantics of FOL [3] Interpretation of formulas (with respect to model structure M and variable assignment g): [[R(t 1,..., t n )]] M,g = 1 iff [[t 1 ]] M,g,..., [[t n ]] M,g V M (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 [[ xϕ]] M,g = 1 iff there is a U M such that [[ϕ]] M,g[x/a] = 1 [[ xϕ]] M,g = 1 iff for all a U M : [[ϕ]] M,g[x/a] = 1 g[x/a] is the variable assignment which is identical with g except that it assigns the individual a to the variable x. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 11 Semantics of FOL [4] Formula A is true in the model structure M iff [[A]] M,g = 1 for every variable assignment g. This works best if A has no free variables. A model structure M satisfies a set of formulas Γ (or: M is a model of Γ) iff every formula A Γ is true in M. A is valid iff A is true in all model structures. A is satisfiable iff there is a model structure that makes it true. A is unsatisfiable iff there is no model structure that makes it true. A is contingent iff it it is satisfiable but not valid. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 12 6

Entailment and Deduction A set of formulas Γ entails formula A (Γ = A) iff A is true in every model of Γ. A (sound and complete) calculus for FOL allows us to prove A from Γ iff Γ = A by manipulating the formulas syntactically. There are many calculi for FOL: resolution, tableaux, natural deduction,... 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 formula find off-the-shelf implementations on the Internet Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 13 Two levels of interpretation Semantic interpretation of a NL expression in a logical framework is a two-step process: The NL expression is assigned a semantic representation The semantic representation is truth-conditionally interpreted. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 14 7

The expressive power of FOL [1] John is a blond criminal Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 15 The expressive power of FOL [1] John is a blond criminal criminal(j) blond(j) Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 16 8

The expressive power of FOL [1] John is a blond criminal criminal(j) blond(j) John is an honest criminal Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 17 The expressive power of FOL [1] John is a blond criminal criminal(j) blond(j) John is an honest criminal criminal(j) honest(j)? Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 18 9

The expressive power of FOL [1] John is a blond criminal criminal(j) blond(j) John is an honest criminal criminal(j) honest(j)? John is an alleged criminal Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 19 The expressive power of FOL [1] John is a blond criminal criminal(j) blond(j) John is an honest criminal criminal(j) honest(j)? John is an alleged criminal criminal(j) alleged(j)?? Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 20 10

The expressive power of FOL [2] John is driving fast Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 21 The expressive power of FOL [2] John is driving fast drive(j) fast(j) Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 22 11

The expressive power of FOL [2] John is driving fast drive(j) fast(j) John is eating fast Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 23 The expressive power of FOL [2] John is driving fast drive(j) fast(j) John is eating fast eat(j) fast(j)?? Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 24 12

The expressive power of FOL [2] John is driving fast drive(j) fast(j) John is eating fast eat(j) fast(j)?? John is driving very fast. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 25 The expressive power of FOL [2] John is driving fast drive(j) fast(j) John is eating fast eat(j) fast(j)?? John is driving very fast.??? Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 26 13

The expressive power of FOL [3] It rains. It rained yesterday. It rains occasionally. Bill is blond. Blond is a hair colour. ( Bill is a hair colour.) Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 27 Type theory The types of non-logical expressions provided by FOL terms and n-ary first-order relations 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. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 28 14

Types For NL meaning representation the (minimal) set of basic types is {e, t} : e (for entity) is the type of individual terms t (for truth value) is the type of formulas All pairs <σ, τ> made up of (basic or complex) types σ, τ are types. <σ, τ> is the type of functions which map arguments of type σ to values of type τ. In short: The set of types is the smallest set T such that e,t T, and if σ,τ T, then also <σ,τ> T. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 29 Some useful complex types for NL semantics Individual: e Sentence: t One-place predicate constant: <e,t> Two-place relation: <e,<e,t>> Sentence adverbial: <t,t> Attributive adjective: <<e,t>,<e,t>> Degree modifier: <<<e,t>,<e,t>>,<<e,t>,<e,t>>> Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 30 15

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,t>. "hair colour" is represented as a term of type <<e,t>,t>. "Bill is a hair colour" is not even a well-formed statement. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 31 Some useful complex types for NL semantics Individual: e Sentence: t One-place predicate constant: <e,t> Two-place relation: <e,<e,t>> Sentence adverbial: <t,t> Attributive adjective: <<e,t>,<e,t>> Degree modifier: <<<e,t>,<e,t>>,<<e,t>,<e,t>>> Second-oder predicate: <<e,t>,t> Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 32 16

Type-theoretic syntax [1] Vocabulary: Possibly empty, pairwise disjoint sets of non-logical constants: Con τ for every type τ Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 33 Higher-order variables Bill has the same hair colour as John. Santa Claus has all the attributes of a sadist. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 34 17

Type-theoretic syntax [1] Vocabulary: Possibly empty, pairwise disjoint sets of non-logical constants: Con τ for every type τ Infinite and pairwise disjoint sets of variables: Var τ for every type τ The logical operators known from FOL. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 35 Type-theoretic syntax [2] The sets of well-formed expressions WE τ for every type τ are given by: Con τ WE τ for every type τ If α WE <σ, τ>, β WE σ, then α(β) WE τ. If A, B are in WE t, then so are A, (A B), (A B), (A B),(A B) If A is in WE t, then so are va and va, where v is a variable of arbitrary type. If α, β are well-formed expressions of the same type, then α=β WE t. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 36 18

Building well-formed expressions Bill drives fast. drive: <e,t> fast: <<e,t>,<e,t>> Bill: e fast(drive): <e,t> fast(drive)(bill): t Mary works in Saarbrücken mary: e work: <e,t> in: <e,<t,t>> sb: e work(mary): t in(sb): <t,t> in(sb)(work(mary)): t Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 37 More examples Blond is a hair colour. Santa Claus has all the attributes of a sadist. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 38 19

Type-theoretic semantics [1] Let U be a non-empty set of entities. The domain of possible denotations D τ for every type τ is given by: D e = U D t = {0,1} D <σ, τ> is the set of all functions from D σ to D τ Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 39 Type-theoretic semantics [2] A model structure for a type theoretic language: M = <U, V>, where U (or U M ) is a non-empty domain of individuals V (or V M ) is an interpretation function, which assigns to every member of Con τ an element of D τ. Variable assignment g assigns every variable of type τ a member of D τ. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 40 20

Type-theoretic semantics [3] Interpretation (with respect to model structure M and variable assignment g): [[α]] M,g = V M (α), if α constant [[α]] M,g = g(α), if α 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, etc. If v Var τ, [[ vϕ]] M,g = 1 iff there is a D τ such that [[ϕ]] M,g[v/a] = 1 If v Var τ, [[ vϕ]] M,g = 1 iff for all a D τ : [[ϕ]] M,g[v/a] = 1 [[α=β]] M,g = 1 iff [[α]] M,g = [[β]] M,g Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 41 Type theory The definition of the syntax and semantics of type theory is a straightforward extension of FOL. Words 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 <σ, τ> where σ and τ are atomic... Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 42 21

Currying All functional types are interpreted as one-place functions. How do we deal with functions/relations with multiple arguments? Currying ("Schönfinkeln"): simulate term P(a,b) as the term P(a)(b) simulate type <e x e, t> as the type <e, <e,t>>. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 43 Summary First-order logic is nice, but its expressive power has limits that are not acceptable in NL semantics: 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. Semantic Theory 2006 M. Pinkal/A.Koller UdS Computerlinguistik 44 22