Formal Semantics for Natural Language Dr. Rogelio Dávila Pérez Depto. De Tecnologías de la Información ITESM, campus Guadalajara

Slides:



Advertisements
Similar presentations
Predicate Logic Colin Campbell. A Formal Language Predicate Logic provides a way to formalize natural language so that ambiguity is removed. Mathematical.
Advertisements

1 First order theories (Chapter 1, Sections 1.4 – 1.5)
B ϋ CHIS MONADIC SECOND ORDER LOGIC Verification Seminar V.Sowjanya Lakshmi ( Subhasree M.
CS 285- Discrete Mathematics
Resolution.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
First Order Logic Resolution
Answer Set Programming Overview Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma de Guadalajara
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
Predicate Calculus Formal Methods in Verification of Computer Systems Jeremy Johnson.
Artificial Intelligence First-Order Predicate Logic -
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Knowledge Representation using First-Order Logic (Part II) Reading: Chapter 8, First lecture slides read: Second lecture slides read:
CMSC 250 Discrete Structures Exam #1 Review. 21 June 2007Exam #1 Review2 Symbols & Definitions for Compound Statements pq p  qp  qp  qp  qp  q 11.
Predicate Calculus.
Formal Logic Mathematical Structures for Computer Science Chapter 1 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
FIRST ORDER LOGIC Levent Tolga EREN.
First Order Logic. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about first order.
Predicates and Quantifiers
INTRODUCTION TO LOGIC FALL 2009 Quiz Game. ConceptsTrue/FalseTranslations Informal Proofs Formal Proofs
Logical Equivalence & Predicate Logic
Discrete Mathematics and Its Applications
Formal Logic Mathematical Structures for Computer Science Chapter Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
1 Chapter 7 Propositional and Predicate Logic. 2 Chapter 7 Contents (1) l What is Logic? l Logical Operators l Translating between English and Logic l.
1st-order Predicate Logic (FOL)
Section 1.5. Section Summary Nested Quantifiers Order of Quantifiers Translating from Nested Quantifiers into English Translating Mathematical Statements.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 8.
First Order Logic Dr. Rogelio Dávila Pérez Professor - Researcher Information Technologies Department ITESM, Campus Guadalajara.
Lecture 4: Predicates and Quantifiers; Sets.
CS6133 Software Specification and Verification
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
For Friday Read chapter 8 Homework: –Chapter 7, exercises 2 and 10 Program 1, Milestone 2 due.
LDK R Logics for Data and Knowledge Representation First Order Logics (FOL) Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
Predicates and Quantifiers Dr. Yasir Ali. 1.Predicates 2.Quantifiers a.Universal Quantifiers b.Existential Quantifiers 3.Negation of Quantifiers 4.Universal.
ece 627 intelligent web: ontology and beyond
Artificial Intelligence First-Order Predicate Logic - First-Order Predicate Logic (FOL or FOPL), also called First-Order Predicate Calculus.
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.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
1 Section 6.2 Propositional Calculus Propositional calculus is the language of propositions (statements that are true or false). We represent propositions.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
1 Chapter 2.1 Chapter 2.2 Chapter 2.3 Chapter 2.4 All images are copyrighted to their respective copyright holders and reproduced here for academic purposes.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
Metalogic Soundness and Completeness. Two Notions of Logical Consequence Validity: If the premises are true, then the conclusion must be true. Provability:
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Propositional Logic. Assignment Write any five rules each from two games which you like by using propositional logic notations.
Chapter 1, Part III: Proofs With Question/Answer Animations Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without.
Uniqueness Quantifier ROI for Quantified Statement.
Chapter 1 Logic and proofs
Predicate Calculus CS 270 Math Foundations of Computer Science Jeremy Johnson Presentation uses material from Huth and Ryan, Logic in Computer Science:
Introduction to Logic for Artificial Intelligence Lecture 2
Logic and Critical Thinking
Propositional Logic Resolution
CS201: Data Structures and Discrete Mathematics I
1st-order Predicate Logic (FOL)
Week #2 – 4/6 September 2002 Prof. Marie desJardins
MA/CSSE 474 More Math Review Theory of Computation
CSNB234 ARTIFICIAL INTELLIGENCE
Predicates and Quantifiers
Chapter 1: Propositional and First-Order Logic
CS201: Data Structures and Discrete Mathematics I
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Introduction to Computational Linguistics
1st-order Predicate Logic (FOL)
Presentation transcript:

Formal Semantics for Natural Language Dr. Rogelio Dávila Pérez Depto. De Tecnologías de la Información ITESM, campus Guadalajara

Predicate Logic I. Syntax 1. Vocabulary (a)Logical constants:  (b)Logical connectors: , , , , = (c)Logical quantifiers: ,  (d)Punctuation symbols: ‘(’, ‘)’, ‘,’ (e)Predicate symbols: R n, P m, Q s, … (f)Functional symbols: f n, g m, r s, … (g)Constant symbols: a, b, c, … (h)Individual variables: x, y, z

Predicate Logic 2. Terms (i)A constant symbol is a term. (ii)An individual variable is a term. (iii)If f n is an n-ary function symbol and, t 1, …, t n are terms then f n (t 1, …, t n ) is a term.

Predicate Logic 3. Well-formed formulas (wffs) (a) is called contradiction an is a wff. (b)If R n is an n-ary predicate symbol, and t 1, …, t n are terms then R n (t 1, …, t n ) is a wff. (c) If  and  are wffs, then , ,  and  are also wffs. (d)If  is a formula and x is a variable, then x.(x) and  x.(x) are also wffs. (e)Nothing else is a wff.

II. Rules of Inference (a) All inference rules from the propositional logic hold in predicate logic. (b) Universal quantifier rules  -Intro  -Elim (Universal Instantiation)  -Intro  -Elim (Universal Instantiation) Rules of Inference  (a) …  (a)  x.(  (x)   (x))  x.  (x)  (a) Just in the case  (a) and  (a) are not premises, and there are no occurrences of ‘a’ in the premises.

(a) Existential quantifier rules  -Intro  -Elim  -Intro  -Elim Rules of Inference  (a)  y.  (y)  (a) …   y.  (y)  Just in case ‘a’ does not occur in ‘  ’.

Def. A first order theory consist of an alphabet, a first order language, a set of axioms and a set of inference rules. Def. A first order language given by an alphabet consists of the set of all well form formulas constructed from the symbols of the alphabet. Def. The scope of x (resp. x), in x.  (resp. x.  ) is . Def. A bound occurrence of a variable in a formula is an occurrence immediately following a quantifier or an occurrence within the scope of a quantifier, which has the same variable immediately after the quantifier. Any other occurrence of a variable is free. Def. A closed formula is a formula with no free occurrences of any variable. Important concepts

Def. If  is a formula, then (  ) denotes de universal closure of , which is the closed formula obtained by adding a universal quantifier for every variable having a free occurrence in . Def. Similarly,  (  ) denotes the existential closure of , which is obtained by adding an existential quantifier for every variable having a free occurrence in . Important concepts

Logical Identities (a)       v  (b) Contraposition Law:          (c) Distributive Laws: (i)  v (  )  ( v )  ( v ) (ii)   ( v )  (  ) v (  ) (e) DeMorgan’s Laws: (i)  ( v )       (ii)  (  )    v   (ii)  (  )    v   (f)  x. (x)  x.  (x) (g)  x. (x)  x.  (x)

 Translate English into Predicate Logic 1 (a) Monica likes some of her students. (b) Monica likes all her students. (c) All men are created equal. (d) Roses are red; violets are blue. (e) Some freshmen are intelligent. (f) All freshmen are intelligent. (g) No freshmen are intelligent. (h) One of the coats in the closet belongs to Sarah. (i) Some Juniors date only Seniors. (j) Not all birds can fly. Notes 1 All sentences were taken from Dra. Monica Noguera’s notes on CS4320. Some exercises

 Translate English into Predicate Logic 1 (a) Every elephant has a trunk. (b) Adams is not married to anyone. (c) No freshmen are not serious. (d) Someone profited from the great depression. (e) All fish except sharks are kind to children. (f) Anyone with two or more spouses is a bigamist. (g) John married Mary and she got pregnant. (h) If all sophomores like Greek, then some freshmen do. (i) Everyone loves somebody and no one loves everybody, or somebody loves everybody and someone loves nobody. or somebody loves everybody and someone loves nobody.Notes 1 All sentences were taken from Dra. Monica Noguera’s notes on CS4320.

Definition. An interpretation of a term consists in a non empty domain E, and an assignment function F: (i) To each constant symbol, it is assigned an individual from the domain. (ii) To each n-ary function symbol, it is assigned a mapping from E n  E. (iii) To each n-ary predicate symbol, it is assigned a subset from E n. Predicate Logic Semantics

Definition. An interpretation of a wff  consists of an mapping I: wffs  {0,1} as follows: (i) I(P i (t 1, t 2,…,t n )) = 1 iff  F( P i ), 0 otherwise. (ii) I (   ) = min(I(  ),I(  )) (iii) I (   ) = max(I(),I()) (iv) I (  ) = 0 if I()=1 and I()=0, 1 otherwise (v) I ( ) = 1-I() (vi) I ( x.(x)) = 1 if for all a  E, I((a))=1 (vii) I(x.(x)) = 1 if there is an F(a)  E such that I((a))=1. Predicate Logic Semantics

Definition. An interpretation of a set of well-formed formulas , is called a MODEL of , if and only if, every wff in  is true under that interpretation. Definition. A wff  is called a logical consequence of a set of wffs , if and only if,  is true in al models of  ( |= ). Definition. A wff  is satisfiable if it has a model, otherwise it is unsatisfiable.

Predicate Logic Semantics Example Lets define a simple language: Basic expressions: (i) Constant symbols: m, j, d and n. (ii) Predicate symbols: M 1, B 1, K 2, L 2. Sentences: M(d), B(j), K(j,n) and L(n,m) Evaluate the truth of the previous sentences according to the interpretations shown bellow.

Predicate Logic Semantics a). M 1 = a). M 1 = A 1 = {x | x is a country in America} F 1 (m) =peru, F 1 (j)=chile, F 1 (d)= honduras, F 1 (n)= argentina F 1 (M)={colombia, belice, argentina, canada, nicaragua} F 1 (B)={x  A 1 | x borders the pacific ocean} F 1 (K)={ |  A 1 xA 1, x borders y} F 1 (L)={ |  A 1 xA 1, x is bigger than y} b). M 2 = b). M 2 = A 2 = {x | x is an integer} F 2 (m) =0, F 1 (j)=2, F 1 (d)= 9, F 1 (n)= -1 F 2 (M)={x  A 2 | x is odd} F 2 (B)={x  A| x is a perfect square} F 2 (K)={ |  A 2 xA 2, and x > y} F 2 (L)={ |  A 2 x A 2, x = y 2 }

Examples of arguments (a) The mother will die unless the doctor kills the child. If the doctor kills the child, the doctor will be taking life. If the mother dies, the doctor will be taking life. Therefore, the doctor will be taking life. (b) If the soil is suitable for carrots, then it is deep, sandy and free of stones. The soil is not suitable for linseed if it is sandy or a heavy clay. Therefore the soil is not suitable for both carrots and linseed. (c) Bank-notes all carry a metal strip. Anything with a metal strip can be detected by X-rays. Therefore, bank-notes can be detected by X-rays. (d) All the birds are either chiff-chaffs or willow warblers. The birds are singing near the ground. Chiff-chaffs don’t sing near the ground. Therefore the birds are all willow-warblers. Predicate Logic Examples

Examples of arguments (a) The mother will die unless the doctor kills the child. If the doctor kills the child, the doctor will be taking life. If the mother dies, the doctor will be taking life. Therefore, the doctor will be taking life. (b) If the soil is suitable for carrots, then it is deep, sandy and free of stones. The soil is not suitable for linseed if it is sandy or a heavy clay. Therefore the soil is not suitable for both carrots and linseed. (c) Bank-notes all carry a metal strip. Anything with a metal strip can be detected by X-rays. Therefore, bank-notes can be detected by X-rays. (d) All the birds are either chiff-chaffs or willow warblers. The birds are singing near the ground. Chiff-chaffs don’t sing near the ground. Therefore the birds are all willow-warblers. Formal Semantics for Natural Language