1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.

Slides:



Advertisements
Similar presentations
Discrete Math Methods of proof 1.
Advertisements

Chapter 1: The Foundations: Logic and Proofs 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers.
Predicates and Quantifiers
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
Discrete Mathematics Lecture 2 Alexander Bukharovich New York University.
First Order Logic. Propositional Logic A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not.
Adapted from Discrete Math
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
Section 1.3: Predicates and Quantifiers
Methods of Proof & Proof Strategies
Chapter 1: The Foundations: Logic and Proofs
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
The Foundations: Logic and Proofs
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
CS 173, Lecture B September 1, 2015 Tandy Warnow.
 Predicate: A sentence that contains a finite number of variables and becomes a statement when values are substituted for the variables. ◦ Domain: the.
CS 173, Lecture B August 27, 2015 Tandy Warnow. Proofs You want to prove that some statement A is true. You can try to prove it directly, or you can prove.
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
Copyright © Cengage Learning. All rights reserved. CHAPTER 3 THE LOGIC OF QUANTIFIED STATEMENTS THE LOGIC OF QUANTIFIED STATEMENTS.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Predicates and Quantified Statements
Chapter 2 The Logic of Quantified Statements. Section 2.1 Intro to Predicates & Quantified Statements.
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
1 Introduction to Abstract Mathematics Sets Section 2.1 Basic Notions of Sets Section 2.2 Operations with sets Section 2.3 Indexed Sets Instructor: Hayk.
1 Introduction to Abstract Mathematics Proofs in Predicate Logic , , ~, ,  Instructor: Hayk Melikya Purpose of Section: The theorems.
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
LOGIC AND QUANTIFIERS. INTRODUCTION Many algorithms and proofs use logical expressions such as: “IF p THEN q” or “If p1 AND p2, THEN q1 OR q2” Therefore.
CSS342: Quantifiers1 Professor: Munehiro Fukuda. CSS342: Quantifiers2 Review of Propositions Proposition: a statement that is either true or false, but.
Discrete Mathematics CS 2610 August 22, Agenda Last class Propositional logic Logical equivalences This week Predicate logic & rules of inference.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1 The Foundations: Logic and Proofs Predicates and Quantifiers.
Discrete Structures – CNS 2300
Chapter 2 Symbolic Logic. Section 2-1 Truth, Equivalence and Implication.
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
Predicates and Quantifiers Dr. Yasir Ali. 1.Predicates 2.Quantifiers a.Universal Quantifiers b.Existential Quantifiers 3.Negation of Quantifiers 4.Universal.
Method of proofs.  Consider the statements: “Humans have two eyes”  It implies the “universal quantification”  If a is a Human then a has two eyes.
1 Outline Quantifiers and predicates Translation of English sentences Predicate formulas with single variable Predicate formulas involving multiple variables.
Section 1.5 and 1.6 Predicates and Quantifiers. Vocabulary Predicate Domain Universal Quantifier Existential Quantifier Counterexample Free variable Bound.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
1 Introduction to Abstract Mathematics Chapter 3: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 3.1.
1 Introduction to Abstract Mathematics Proof Methods , , ~, ,  Instructor: Hayk Melikya Purpose of Section:Most theorems in mathematics.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 1 Predicates and Quantifiers 1.4.
Logic Hubert Chan [O1 Abstract Concepts] [O2 Proof Techniques]
3. The Logic of Quantified Statements Summary
Chapter 3 The Logic of Quantified Statements
Logic Hubert Chan [O1 Abstract Concepts] [O2 Proof Techniques]
Chapter 1 The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
CS201: Data Structures and Discrete Mathematics I
Copyright © Cengage Learning. All rights reserved.
CHAPTER 1: LOGICS AND PROOF
First Order Logic Rosen Lecture 3: Sept 11, 12.
Introduction to Predicates and Quantified Statements I
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
Copyright © Cengage Learning. All rights reserved.
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Predicates and Quantifiers
Discrete Mathematics Lecture 4 Logic of Quantified Statements
CS201: Data Structures and Discrete Mathematics I
Presentation transcript:

1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or first- order logic) which the language of mathematics. We will see how predicate logic extends the language of propositional calculus studied in Sections 1.1, 1.2 and 1.3 by the inclusion of universal and existential quantifiers, logical functions and variables.

2 Introduction to Abstract Mathematics Predicates Propositional logic as studied in lectures 1, 2 and 3 involve the truth or falsity of simple sentences, whereas predicate logic is richer and allows one to express concepts about collections of objects (maybe real numbers, natural numbers, or functions). What about the following argument: All man are mortal. Socrates is a man. Therefore, Socrates is mortal or “ for any real number x there exists a real number y that satisfies x < y ” ( we are making a claim about the validity of x < y over a collection of numbers x and y ) or “ x + 4 > 11”

3 Introduction to Abstract Mathematics A sentences that have variables into which we can substitute values to make them propositions we call predicates (open sentences) P(x) := “ x + 2 = 9 ” (substitute x by any real number ) Q(x, y) := “ if x and y are integers then x + 3y is multiple of 5 ” ( substitute x and y by any integer ) R(x, y, z):= “ x + (y + z) = (x + y ) + z ” (substitute x, y, and z by any rational number) A Universe ( also called universe of discourse) is the set of values one can substitute for variables

4 Introduction to Abstract Mathematics Truth Set Let P(x) be an open sentence or predicate with the specified universe (also called universe of discourse) U, then the collection of all objects from U that may be substituted to make an open sentence P(x) a true proposition is called the truth set of predicate P(x). Example: The truth set of the proposition Q(x) := “ x 2 = 16 ” is depends of choice of universe. If universe is specified to be set of natural numbers N then the truth set is {4}. With the universe specified to be set of all integers Z then the truth set is {4, -4}.

5 Introduction to Abstract Mathematics You should remember the symbols used to denote for each set such as increasing collection of set N, Z, Q, R, C since we will be referring to these sets in the remainder of the book.

6 Introduction to Abstract Mathematics More examples Prime(n) := “ n is a prime number” ▪ Student (x) := “ x is a student if mathematics” ▪ A(x) := “ x will get an A in the course” ▪ P(x, y) := “ x divides y ” ▪ S(x, y, z) := “ x 2 + y 2 + z 2 = 1”

7 Introduction to Abstract Mathematics Quantification The phrase “ for all,” i s called the universal quantifier and is denoted by  (upside down capital A ), and “ there exists ” is called the existential quantifier and denoted  (backwards capital E ). Universal quantifier: (  x  U) P(x) means “For all (or any) x in the set U, the expression P(x) ” Existential quantifier: (  x  U) P(x) means “There exists an x in the set U such that the expression P(x) ”

8 Introduction to Abstract Mathematics Examples: Example 1. ▪ (  x  R )(( x -3)) For all real numbers x either x is less than zero or x is greater than to negative three. Example 2. ▪ (  x  R )(  x  R )( x < y) For all (or any) real numbers x there exists a real number y that satisfies x < y.

9 Introduction to Abstract Mathematics Margin Note: v In books when one sees a statement like “If x is an integer then x is a rational number,” one means (  x  Z)( x  Z   x  Q) or (  x  Z)( x  Q) In other words the universal quantifier is understood. v Existential quantifier is always explicitly be present to mean that.

10 Introduction to Abstract Mathematics Universal quantifier If P(x) is an open sentence with the single variable x then (  x  U)P(x) is a proposition and it is true if the truth set of P(x) is the entire universe U and false otherwise. Example: P(x):= “ x + 2 > x” then (  x  R)P(x) is true proposition. Example: Q(x):= “ x + 2 > 11” then (  x  R)Q(x) is false proposition.

11 Introduction to Abstract Mathematics Existential quantifier If P(x) is an open sentence with the single variable x then (  x  U)P(x) is a proposition and it is true if the truth set of P(x) is not empty and it is false if the truth set is empty. Example: Q(x):= “ x + 2 > 11” then (  x  R)Q(x) is true proposition. H(x) := “ x 2 = 5 ” then (  x  Z)H(x) is false proposition.

12 Introduction to Abstract Mathematics Below are English language interpretations of predicate logic sentences. Some sentences include more than one quantifier.

13 Introduction to Abstract Mathematics Interchanging Quantifiers   Does the order of the quantifiers make a difference in the v meaning of the sentence? v The four drawings a), b), c) and d) in Figure 1 illustrate visually the following implication (  x)(  y)P(x, y)  (  x)(  y)P(x, y)  (  y)(  y)P(x, y)  (  x)(  y)P(x, y)

14 Introduction to Abstract Mathematics (  x)(  y)P(x, y)  (  x)(  y)P(x, y)  (  y)(  y)P(x, y)  (  x)(  y)P(x, y)

15 Introduction to Abstract Mathematics If the proposition (  x)(  y)P(x, y) true then for all x and y, the predicate P(x, y) is true. That is, the statement is true if P(x, y) is true everywhere in the first quadrant, which we have shaded. The theorem (  y)(  x)P(x, y) means there exists a y, say y 0, such that for all x the statement P(x, y 0 ) is true. We draw the horizontal line y = y 0 illustrating that the theorem is true if P(x, y) is true everywhere on this line. If we permute the quantifiers the theorem becomes (  x)(  y)P(x, y) which says for all x there exists a y = f (x) such that P(x, y) is true. Note that the constant function in b), being a special case of the arbitrary function f(x) in c) shows the important implication (  x)(  y)P(x, y)  (  y)(  x)P(x, y) The implication does not go the other way as proven by the following counterexample ( P(x, y):= “ x < y ” ) (  x)(  y)(x< y)  (  x)(  y)(x <y) Here the hypothesis is true but the conclusion is false.

16 Introduction to Abstract Mathematics The statement (  y)(  y)P(x, y) is a pure existence theorem and is true if there exists at least one point ( x 0, y 0 ) where P( x, y) is true. This statement is the weakest of the four statement (  x)(  y)P(x, y)  (  y)(  x)P(x, y) The implication does not go the other way as proven by the following counterexample ( P(x, y):= “ x < y ” ) (  x)(  y)(x< y)  (  x)(  y)(x <y) Here the hypothesis is true but the conclusion is false.

17 Introduction to Abstract Mathematics Elements of Predicate Calculus We will extend logical operations , , ~, ,  introduce in propositional calculus for predicates as follows: 1. If X and Y are two predicates then X  Y, X  Y, X  Y, X  Y and ~X are predicates and for any assignment of variables the truth value of resulting predicate is defined according the truth table of respective propositional operation. 2. If P is a predicate and x a variable then (  x)P and (  x)P both are predicate Recall that any propositions itself is a predicate too

18 Introduction to Abstract Mathematics Equivalence of two predicates Two predicated P(x) and Q(x) with the specified universe U are said to be equivalent over the universe U of they have same truth set. We will write P(x)  U Q(x) if P(x) and Q(x) are equivalent of the universe U. Two quantified predicates are said to be equivalent if they are equivalent over the any universe. Example: (  x) (x > 3)  Z (  x) (x > 3.7 ) But it is not true (  x) (x > 3)  R (  x) (x > 3.7 ). Compare their truth set. Example: If P(x) and Q(x) are predicates then (  x) (P(x)  Q(x)) and (  x)(Q(x))  P(x)) are equivalent over any universe (  x) (P(x)  Q(x))  (  x)(Q(x))  P(x) )

19 Introduction to Abstract Mathematics Negating quantified predicates: Theorem: Let P(x) be a predicate with variable x then  (  x) (P(x)  (  x)  P(x) )  (  x) (P(x)  (  x)  P(x) ) Proof. If U is the universe, then  (  x) (P(x) is true in U if (  x)(P(x) is false in U which means that the truth set of it is not the univese or for some a from universe P(a) is not true hance  P(a) is true which tells us that (  x)  P(x) true. This theorem is very useful for finding denials of quantified sentences

20 Introduction to Abstract Mathematics More Examples The following table shows how statements in predicate logicare negated.

21 Introduction to Abstract Mathematics Some Examples: Every day it rains. There exists a day when it doesn’t rain. There exists a number that is positive. Every number is not positive All prime numbers are odd. There exists a prime number that is not odd. At least one day I will go to class. I will never go to class.

22 Introduction to Abstract Mathematics There exists unique  ! For an open sentence P(x), the proposition (  !x )P(x) is read “ there exists unique x such that P(x)” and it is true if the truth set of P(x) has exactly one element from the universe. It is true that (  !x )P(x)  (  x )P(x) What about (  x )P(x)  (  !x )P(x) ?

23 Introduction to Abstract Mathematics Example: Recall from the calculus that the limit of f(x) as x approaches a to is L if for Each ε>0 there is a δ>0 such that if | x -a|< δ and x  a then |f(x) -L|< ε. This definition of limit involves several quantifiers. Let symbolically define the limit and then negate it. (  ε>0) (  δ>0 ) (  x)(0 < | x -a|< δ  |f(x) - L|< ε) Negation (  ε>0) (  δ>0 ) (   x)(0 < | x -a|< δ  |f(x) - L|  ε)