Predicate Logic: Syntax.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Predicates and Quantifiers
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
Knowledge Representation Methods
Computability and Complexity 8-1 Computability and Complexity Andrei Bulatov Logic Reminder.
First-Order Logic. Limitations of propositional logic Suppose you want to say “All humans are mortal” –In propositional logic, you would need ~6.7 billion.
The Predicate Calculus
The Predicate Calculus
PHIL 120: Jan 8 Basic notions of logic
The Predicate Calculus
Predicate Calculus.
1 Knowledge Representation and Reasoning. 2 Knowledge Representation & Reasoning How knowledge about the world can be represented How knowledge about.
FIRST ORDER LOGIC Levent Tolga EREN.
Predicates and Quantifiers
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
The Foundations: Logic and Proofs
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
First Order Logic Chapter 7. PL is a Weak Representational Language §Propositional Logic (PL) is not a very expressive language because: §Hard to identify.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
PART TWO PREDICATE LOGIC. Chapter Seven Predicate Logic Symbolization.
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
1.  Provides the ability to access individual assertions. e.g. in Predicate calculus we may say: P denotes “It rained on Tuesday” but in predicate calculus.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 8.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
Word Problem Consider the following problem: To register, you will need either a yellow card or a note from the Dean. To obtain a note from the Dean you.
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
Discrete Mathematics CS 2610 August 22, Agenda Last class Propositional logic Logical equivalences This week Predicate logic & rules of inference.
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
Propositional Logic Predicate Logic
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
Artificial Intelligence CIS 342 The College of Saint Rose David Goldschmidt, Ph.D.
PREDICATE CALCULS In Propositional Calculus, each atomic symbol denotes a proposition. But there is no way to access the components of an individual assertion.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
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.
2004/9/15fuzzy set theory chap02.ppt1 Classical Logic the forms of correct reasoning - formal logic.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Chapter 3 Propositional calculus Predicate calculus Artificial Intelligence Dr.Hassan Al-Tarawneh.
6/11/2016 Linear Resolution and Introduction to First Order Logic Michael Leuschel Softwaretechnik und Programmiersprachen Lecture 5.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 1 Predicates and Quantifiers 1.4.
Knowledge Representation and Reasoning 2
By P. S. Suryateja Asst. Professor, CSE Vishnu Institute of Technology
The Predicate Calculus
3. The Logic of Quantified Statements Summary
Logic II CSE 140 etc..
CSE15 Discrete Mathematics 01/23/17
Chapter 3 The Logic of Quantified Statements
Proposition & Predicates
CMSC Discrete Structures
Artificial Intelligence
The Foundations: Logic and Proofs
CS201: Data Structures and Discrete Mathematics I
CS 1502 Formal Methods in Computer Science
Resolution And yet Another Example:
Carlos Varela Rensselaer Polytechnic Institute November 10, 2017
1st-order Predicate Logic (FOL)
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Discrete Mathematics Lecture 3: Predicate and Quantifier
Discrete Mathematics CMP-200 Propositional Equivalences, Predicates & Quantifiers, Negating Quantified Statements Abdul Hameed
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Predicates and Quantifiers
Propositional Calculus
CS201: Data Structures and Discrete Mathematics I
Logical and Rule-Based Reasoning Part I
Predicate Logic.
Introduction to Computational Linguistics
The Foundations: Logic and Proofs
1st-order Predicate Logic (FOL)
Presentation transcript:

Predicate Logic: Syntax

Motivations Propositional logic can only express whole sentences. It doesn’t allow you to access the components within a sentence, e.g., subject, object, adjectives, etc. Predicate logic has that capability.

Objectives Syllogism Predicates Universal quantifiers Existential quantifiers Define legal predicate sentences recursively

Many names Predicate logic Predicate calculus First-order logic First-order predicate calculus Logic of quantifiers

All humans are mortal Syllogism in Aristotle's Prior Analytics, Major premise: All humans are mortal. Minor premise: Socrates is human. Conclusion: Socrates is mortal. Propositional Logic P: All humans are mortal. Q: Socrates is human. R: Socrates is mortal. But R cannot be deduced from P and Q. First Order Logic SWI-Prolog mortal(X) :- man(X). man(socrates). ?- mortal(socrates). Yes The for-all symbol is need to qualify the variable x to indicate that the IF-conditional is true not just for some x. Prolog uses the variable X and the ONLY-IF-conditional to show that the clause is true for all X.

Subject and predicate Access the subject of a sentence: Tony likes BBQ ribs. Lynda likes BBQ ribs. We need a special function called a predicate, e.g, like_ribs() like_ribs(tony) like_ribs(lynda) The predicate like_ribs/1 predicates (depends) on one argument which is the subject of a sentence.

Examples Given a world of discourse, or a domain D = {tony, lynda, samuel, daniel, ezekiel, jonathan, joy} D contains 7 constant symbols or atoms. We can say that the whole family in the House of Chan like BBQ ribs: X like_ribs (X), X in D. X is a variable, not a constant. Compare with the proposition “Everyone in the House of Chan likes BBQ ribs.” Some computers have mouse connected on the USB port.  Y computer (Y)  USB_conn (Y, mouse_of(Y))

Predicate logic Subject / Predicate John / went to the store. The sky / is blue. Propositional logic uses propositions Predicate logic uses predicates predicates must be applied to a subject in order to be true or false In general, a logical predicate can be applied to the objects, adjectives, or any other component of a sentence. P(X) means this predicate represented by P applied to the entity (item) represented by X

Family relationships mother(eve,abel). mother(eve,cain). father(adam,abel). father(adam,cain). XY father(X,Y)  mother(X,Y)  parent(X,Y). XYZ parent(X,Y)  parent(X,Z)  sibling(Y,Z). sibling(cain,abel)?

Connection between the quantifiers Change of variable X to Y. X q(X)  Y q(Y) X p(X)  Y p(Y) It is false that for all X, such that p(X) is true. E.g.: Not every student has a textbook. Or: There is at least one student who does not have the textbook.  X p(X)  X p(X) Not even one student has the textbook.  X p(X)  X p(X)

Types of symbols 1. Truth symbols true and false These are reserved symbols. 2. Constant symbols are symbols having the first character lowercase. E.g., today, fisher 3. Variable symbols are symbols beginning with an uppercase character or underscore. E.g., X, Y, Z, Building, _building 4. Function symbols are symbols having the first character lowercase. Arity: /number of arguments E.g., mother_of/1; maximum/2

Mutually recursive definitions A function expression consists of a function symbol of arity n, followed by n terms, t1 ,t2 ,…, tn, enclosed in parentheses and separated by commas. mother_of(sam) maximum(5,38) maximum(maximum(7, 18), add_one(18)) Non-example: maximum(7, 18)  add_one(18) A FOL term is either a constant, variable, or function expression. sam Sam house_of(X) color_of(house_of(neighbor(joe)))

Atomic sentences Predicate symbols are symbols beginning with a lowercase letter. Predicates are special functions with true/false as the range. Arity: number of arguments An atomic sentence is a predicate constant of arity n, followed by n terms, t1 ,t2 ,…, tn, enclosed in parentheses and separated by commas. The truth values, true and false, are also atomic sentences. Atomic sentences do not contain logical connectives symbols.

3 examples of atomic sentences greater_than(2, 3) mother_of(joe, susan) mother_of(sister_of(joe), susan) term, constant Predicate symbol

Predicate logic sentences Every atomic sentence is a sentence. If s is a sentence, then so is its negation, s. If s1 and s2 are sentences, then so is their Conjunction, s1  s2 . Disjunction, s1  s2 . Implication, s1  s2 . Equivalence, s1  s2 .

Predicate logic sentences (cont’d) If X is a variable and s is a sentence, then so are X s. X s. Remember that logical sentences evaluate to true or false, therefore only such objects are atomic sentences. Functions are not atomic sentences.

Checking a sentence in predicate logic 1. 2. Misprinted on p. 55 of text book 3. 4. 5.

Summary Unlike natural languages such as English, the semantics of predicate logic sentences are precise and unambiguous. Predicate logic is more expressive than propositional logic. It extends propositional logic by allowing functions, universal, and existential quantifiers in its sentences.