Top Banner
Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya [email protected] 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.
23

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

Jan 17, 2016

Download

Documents

Jessie Powers
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

1Introduction to Abstract Mathematics

Predicate Logic

Instructor: Hayk Melikya [email protected]

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.

Page 2: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

2Introduction to Abstract Mathematics

PredicatesPropositional 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”

Page 3: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

3Introduction 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

Page 4: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

4Introduction 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) := “ x2 = 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}.

Page 5: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

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

Page 6: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

6Introduction 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) := “ x2 + y2 + z2 = 1”

Page 7: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

7Introduction to Abstract Mathematics

Quantification

The phrase “for all,” is 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: ( xU) P(x) means “There exists an x in the set U such that the expression P(x) ”

Page 8: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

8Introduction to Abstract Mathematics

Examples:

Example 1.  ▪ ( x R )(( x < 0) ( 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. 

Page 9: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

9Introduction to Abstract Mathematics

Margin Note:

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.

Existential quantifier is always explicitly be present to mean that.

 

Page 10: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

10Introduction 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 (xR)P(x) is true proposition.

Example:

Q(x):= “ x + 2 > 11” then (xR)Q(x) is false proposition.

Page 11: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

11Introduction 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 (xR)Q(x) is true proposition.

H(x) := “ x2 = 5 ” then (xZ)H(x) is false proposition.

Page 12: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

12Introduction to Abstract Mathematics

Below are English language interpretations of predicate logic sentences. Some sentences include more than one quantifier.

Page 13: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

13Introduction to Abstract Mathematics

Interchanging Quantifiers Does the order of the quantifiers make a difference in the meaning of the sentence? 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)

Page 14: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

14Introduction to Abstract Mathematics

( x)( y)P(x, y) ( x)( y)P(x, y) ( y)( y)P(x, y) ( x)( y)P(x, y)

Page 15: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

15Introduction to Abstract Mathematics

If the proposition ( x)( y)P(x, y) true then for all x and y , the predicateP(x, y) is true. That is, the statement is true if P(x, y) is true everywhere inthe first quadrant, which we have shaded.

The theorem (y)(x)P(x, y) means there exists a y, say y0, such that for all x the statement P(x, y0) is true. We draw the horizontal line y = y0 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.

Page 16: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

16Introduction 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 ( x0 , y0 ) 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.

Page 17: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

17Introduction 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 ~Xare predicates and for any assignment of variables the truth value

ofresulting predicate is defined according the truth table of respectivepropositional 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

Page 18: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

18Introduction to Abstract Mathematics

Equivalence of two predicatesTwo predicated P(x) and Q(x) with the specified universe U are said to beequivalent 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 equivalentover 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) )

Page 19: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

19Introduction 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

Page 20: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

20Introduction to Abstract Mathematics

More ExamplesThe following table shows how statements in predicate logicarenegated.

Page 21: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

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

Page 22: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

22Introduction 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) ?

Page 23: 1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya melikyan@nccu.edu Purpose of Section: To introduce predicate logic (or.

23Introduction 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| ε)