First Order Logic Dr. Rogelio Dávila Pérez Professor - Researcher Information Technologies Department 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

Some important properties Lectures of Prof. Doron Peled, Bar Ilan University.
1 First order theories (Chapter 1, Sections 1.4 – 1.5)
First-Order Logic (and beyond)
Resolution.
First Order Logic Resolution
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
Answer Set Programming Overview Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma de Guadalajara
Predicate Calculus Formal Methods in Verification of Computer Systems Jeremy Johnson.
Knowledge Representation Methods
The Language P 8 9 ( 8 x) ( 9 y) ( 8 z) 9 8. Quantificational Logic Quantificational Logic: Quantificational Logic is the logic of sentences involving.
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:
TR1413: Discrete Mathematics For Computer Science Lecture 3: Formal approach to propositional logic.
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.
The Language of Propositional Logic The Syntax and Semantics of PL.
FIRST ORDER LOGIC Levent Tolga EREN.
Predicates and Quantifiers
Logical Equivalence & Predicate Logic
Formal Theories SIE 550 Lecture Matt Dube Doctoral Student - Spatial.
Formal Logic Mathematical Structures for Computer Science Chapter Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
First Order Logic Chapter 7. PL is a Weak Representational Language §Propositional Logic (PL) is not a very expressive language because: §Hard to identify.
1st-order Predicate Logic (FOL)
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.
CS6133 Software Specification and Verification
Lecture 7 – Jan 28, Chapter 2 The Logic of Quantified Statements.
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.
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.
1 Section 8.3 Higher-Order Logic A logic is higher-order if it allows predicate names or function names to be quantified or to be arguments of a predicate.
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.
Metalogic Soundness and Completeness. Two Notions of Logical Consequence Validity: If the premises are true, then the conclusion must be true. Provability:
Formal Semantics for Natural Language Dr. Rogelio Dávila Pérez Depto. De Tecnologías de la Información ITESM, campus Guadalajara
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Uniqueness Quantifier ROI for Quantified Statement.
Lecture 1-3: Quantifiers and Predicates. Variables –A variable is a symbol that stands for an individual in a collection or set. –Example, a variable.
Formal Modeling Concepts
Knowledge Representation and Reasoning
Logic and Critical Thinking
Propositional Logic Resolution
Semantics In propositional logic, we associate atoms with propositions about the world. We specify the semantics of our logic, giving it a “meaning”. Such.
Sets and Logic…. Chapter 2
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
First-order (predicate) Logic
CSNB234 ARTIFICIAL INTELLIGENCE
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.
Logical and Rule-Based Reasoning Part I
Introduction to Computational Linguistics
CS589 Principles of DB Systems Fall 2008 Lecture 4e: Logic (Model-theoretic view of a DB) Lois Delcambre
1st-order Predicate Logic (FOL)
Presentation transcript:

First Order Logic Dr. Rogelio Dávila Pérez Professor - Researcher Information Technologies Department 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 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.

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. Predicate Logic

Two important identities (a)   x.  (x)   x.   (x) (b)   x.  (x)   x.   (x) Predicate Logic

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   (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. Predicate Logic

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

Predicate Logic 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 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 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 = 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