Semantics and Pragmatics of NLP

Similar documents
Propositional and Predicate Logic - IV

Description Logics. Deduction in Propositional Logic. franconi. Enrico Franconi

Learning Goals of CS245 Logic and Computation

Introduction to Logic in Computer Science: Autumn 2006

Deductive Systems. Lecture - 3

6. Logical Inference

Natural Deduction for Propositional Logic

Logic: Propositional Logic (Part I)

Semantics and Pragmatics of NLP The Semantics of Discourse: Overview

First Order Logic: Syntax and Semantics

26. Januar Introduction to Computational Semantics

AI Programming CS S-09 Knowledge Representation

KE/Tableaux. What is it for?

Overview. I Review of natural deduction. I Soundness and completeness. I Semantics of propositional formulas. I Soundness proof. I Completeness proof.

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30)

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

Classical Propositional Logic

Relational Reasoning in Natural Language

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

12. Dezember

Formal Logic Lecture 11

Symbolic Logic 3. For an inference to be deductively valid it is impossible for the conclusion to be false if the premises are true.

Propositional Reasoning

Foundations of Artificial Intelligence

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna

PL: Truth Trees. Handout Truth Trees: The Setup

Propositional Logic: Models and Proofs

Mathematical Logic Propositional Logic - Tableaux*

Logical Structures in Natural Language: Propositional Logic II (Truth Tables and Reasoning

First-Degree Entailment

Overview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

Chapter 11: Automated Proof Systems (1)

Propositional Calculus - Soundness & Completeness of H

Logic: Propositional Logic Truth Tables

CHAPTER 6 - THINKING ABOUT AND PRACTICING PROPOSITIONAL LOGIC

Inference in Propositional Logic

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Introduction to Logic in Computer Science: Autumn 2006

Logic. (Propositional Logic)

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

Logic: Propositional Logic Tableaux

First-Order Logic (FOL)

15414/614 Optional Lecture 1: Propositional Logic

Propositional Logic: Review

cis32-ai lecture # 18 mon-3-apr-2006

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory

Propositional and Predicate Logic - V

Logical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14

Marie Duží

Propositional Logic: Part II - Syntax & Proofs 0-0

The predicate calculus is complete

(ÀB Ä (A Â C)) (A Ä ÀC) Á B. This is our sample argument. Formal Proofs

Truth-Functional Logic

Proseminar on Semantic Theory Fall 2013 Ling 720 Proving the Soundness and Completeness of Propositional Logic: Some Highlights 1

Logic: First Order Logic

Section 1.2: Propositional Logic

CSE507. Course Introduction. Computer-Aided Reasoning for Software. Emina Torlak

Deduction by Daniel Bonevac. Chapter 3 Truth Trees

Temporal Logic - Soundness and Completeness of L

TR : Tableaux for the Logic of Proofs

Artificial Intelligence Knowledge Representation I

Propositional Resolution Introduction

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic

Logical Structures in Natural Language: First order Logic (FoL)

Logic I - Session 22. Meta-theory for predicate logic

Automated Reasoning. Introduction to Logic in Computer Science: Autumn Different Forms of Reasoning. Tableaux for Propositional Logic

Logic. Readings: Coppock and Champollion textbook draft, Ch

Propositional and First-Order Logic

Introduction to Logic in Computer Science: Autumn 2007

Syntax of FOL. Introduction to Logic in Computer Science: Autumn Tableaux for First-order Logic. Syntax of FOL (2)

Introduction to Intuitionistic Logic

Notes on Inference and Deduction

Mathematics for linguists

Advanced Topics in LP and FP

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Logic for Computer Science - Week 4 Natural Deduction

THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16)

Propositional logic. Programming and Modal Logic

Lecture 9. Model theory. Consistency, independence, completeness, categoricity of axiom systems. Expanded with algebraic view.

Chapter 4: Classical Propositional Semantics

Overview, cont. Overview, cont. Logistics. Optional Reference #1. Optional Reference #2. Workload and Grading

CSC242: Intro to AI. Lecture 11. Tuesday, February 26, 13

Lecture 13: Soundness, Completeness and Compactness

22c:145 Artificial Intelligence

Natural Logic Welcome to the Course!

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring

CS156: The Calculus of Computation

Chapter 11: Automated Proof Systems

CS 730/730W/830: Intro AI

Propositional Logic: Semantics and an Example

Intermediate Logic. Natural Deduction for TFL

EXERCISE 10 SOLUTIONS

Part 1: Propositional Logic

Type Systems. Lecture 9: Classical Logic. Neel Krishnaswami University of Cambridge

Transcription:

Semantics and Pragmatics of NLP Alex Ewan School of Informatics University of Edinburgh 28 January 2008

1 2 3

Taking Stock We have: Introduced syntax and semantics for FOL plus lambdas. Represented FOL formulae and their models in NLTK. Shown how to build LFs in a feature-based grammar. We ve tackled constructing logical form What about interpreting it?

Approach How can we automate the process of drawing inferences from LFs? Start with quantifier-free fragment of FOL, i.e., propositional logic. method.

Logic FOL inference is undecidable and practical techniques are complex. Only scratch the surface So, we ll examine inferences involving,,,. This is propositional logic. Instead of writing: (((boxer vincent) (happy mia)) (( (boxer vincent)) (happy marsellus))) we write: (p q) ( p r) Internal structure of atomic FOL formulae isn t important in propositional logic.

Which Inference Tool? Theorem Provers: Input: formula Output: formula is valid or formula is not valid. Model Builders: Input: formula Output: a (usually finite) model that satisfies the formula, or no model if formula is inconsistent. E.g., Prover9 + Mace4

The Method Syntactic, but based on clear semantic intuitions. Instructions on what you can write down next, given what you ve written down so far. Instructions preserve truth and they tend to break down complex formulae into simpler ones. Finding a tableaux proof does not depend on human insight. systems can in fact be regarded as model building tools.

The Basic Idea Proof by Refutation: 1 To test whether φ is valid (written = φ); Assume it s false; and attempt to generate a contradiction, by using the instructions on what you can write next. If you can t find a contradiction, then you ve constructed a model for φ. So φ is consistent. So φ is not valid, since it s negation is true in at least one model. 2 Method: break down φ into simpler statements, and look for combination of: p is true p is false for some atomic sentence p.

From Validity to Entailment To test entailment: φ 1,..., φ n = ψ Use tableau method to test whether there is some M such that M = (φ 1... φ n ) ψ). I.e, whether = (φ 1... φ n ) ψ. This is OK because propositional logic has a Deduction Theorem: φ = ψ iff = φ ψ This doesn t hold of all logics.

Example: p p F (p p) This is our first tableau! F means we want to falsify p p Line numbers useful for book-keeping. 1. F (p p)

Continuing with this Example Our second tableaux! 1. F (p p) 2. Fp 1,F 3. F p 1, F Uses the tableaux expansion rule called F (falsify a disjunction) to break down the disjunction in line 1. into pieces. shows you have applied the appropriate rule to this line. Never need to apply a rule to the same line twice, which is nice.

And Carrying On 1. F (p p) 2. Fp 1,F 3. F p 1, F, 4. Tp 3,F. F : falsify a negation. We re finished! The tableau is rule saturated. You can t apply any more rules. Tableau is also closed. Conflict in lines 2. and 4. So we have proved that p p is valid!

Another Example 1. F (q r) ( q r) F tells us how to falsify an implication: 1. F (q r) ( q r) 2. T (q r) 1, F 3. F( q r) 2, F Line 3. calls for F (falsify a disjunction) Can do it now! Don t have to do line 2. first...

Example Continued 1. F (q r) ( q r) 2. T (q r) 1, F 3. F( q r) 2, F, 4. F q 3, F, 5. F r 3, F, 6. Tq 4, F 7. Tr 5, F Now deal with line 2

Example Continued 1. F (q r) ( q r) 2. T (q r) 1, F, 3. F( q r) 2, F, 4. F q 3, F, 5. F r 3, F, 6. Tq 4, F 7. Tr 5, F 8. F (q r) 2, T But there are two ways of falsifying q r: q is false or r is false.

Example Continued 1. F (q r) ( q r) 2. T (q r) 1, F, 3. F( q r) 2, F, 4. F q 3, F, 5. F r 3, F, 6. Tq 4, F 7. Tr 5, F 8. F (q r) 2, T 9. Fq 8, F Fr 8, F Finished! (q r) ( q r) is valid! Tableau is rule saturated. Tableau is closed.

Tableau as a Model Builder 1. F (p q) (r s) 2. T (p q) 1, F, 3. F (r s) 1, F, 4. Tp 2, T 5. Tq 2, T 6. Fr 3, F 7. Fs 3, F Tableau is rule saturated but not closed. So (p q) (r s) is not valid. In fact, tableau tells us how to make it false! p is true; q is true; r is false; s is false.

The Instructions T : T (φ ψ) T φ T ψ T : T φ F φ F : F (φ ψ) Fφ F ψ F : F (φ ψ) T φ Fψ F : F : F (φ ψ) F φ Fψ F φ T φ T : T (φ ψ) T φ T ψ T : T (φ ψ) Fφ T ψ Keep applying rules until tableau is rule saturated.

are Trees A (propositional) tableau is a tree; each node is a signed (propositional) formula. A branch of a tableau is a branch of the tree. expansion: 1 Find a node that: 1 isn t a signed atomic formula (not Fp or Tp) 2 hasn t had an expansion rule applied to it 2 Expand it according to the rules! 3 Keep going until tree is rule saturated.

Closed and Open A branch of a tableau is closed if it contains T φ and F φ. A tableau is closed if all its branches are closed. It is open if at least one of its branches is open (i.e., not closed). Provability: A formula φ is provable (written φ) iff it is possible to expand the initial tableau F φ to a closed tableau.

Testing Entailment (or Uninformativity) Does φ 1,..., φ n = ψ? Start with: T φ 1. T φ n F ψ If this expands to a closed tableau, then the argument is valid. Or to put it another way: ψ is uninformative with respect to φ 1,..., φ n

Soundness and Completeness The tableaux system is sound: If φ then = φ That is, you can t prove something that s not valid. The tableaux system is complete: If = φ then φ That is, every valid formula has a proof.

Conclusion You can prove validities and entailments in propositional logic using the tableaux method. It s sound and complete (and decidable). It s very easy to implement, because: Creating tableaux doesn t require human insight It doesn t matter what choices you make at what time eventually you ll get an answer. But propositional logic isn t powerful enough for NL semantics. E.g., doesn t handle quantification So more powerful methods required for FOL theorem proving. Reading: B&B Chapter 4.