0% found this document useful (0 votes)
24 views20 pages

Atif Manzoor, Ph.D. Atif - Manzoor@ciitlahore - Edu.pk

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 20

Atif Manzoor, Ph.D. [email protected].

pk

Slides
\\bdc\share drive\AtifManzoor

\\172.16.17.7\share drive\AtifManzoor

What have we learned?


What is a proposition? What are propositional connectives? What are logical operators?

What have we learned?


Precedence of logical operators Logical equivalence Logical equivalence laws

What have we learned?


AND () and OR(v) are commutative while implication ( )

is not commutative.

AND () and OR(v) are associative while implication () is

not associative.

What have we learned?


Simplifying compound propositions Writing English sentences in logic Writing English corresponding to proposition

What have we learned?


Predicate logic allow to express the meaning of a wide range of sentences in mathematics and natural languages in a way that permit us to reason and explore relationships between objects Predicate does not have a truth value until we bound its variables by either
assigning a value or quantifying it.

Precedence of quantifiers
and has higher precedence then all logical operators
x P(x) v Q(x) is the disjunction of x P(x) and Q(x) In other words it will mean (x P(x)) v (Q(x)) rather than

x (P(x) v Q(x))

Quantification as Loops
Using this procedure xyP(x,y) is true if P(x,y) is true for all values of x,y as we loop through y for each value of x. xyP(x,y) is true if P(x,y) is true for at least one set of values x,y as we loop through y for each value of x. And so on.

Free variables
Variables in a statement are free variables unless we

bound using the quantifiers

We cannot assign a truth value to a propositional

function or predicate until it has a single free variable

Quantifiers can be used to bound a variable in a

predicate

Binding variables
Let P(x,y) be x > y Consider: x P(x,y) This is not a proposition! What is y?

If its 5, then x P(x,y) is false If its x-1, then x P(x,y) is true

Note that y is not bound by a quantifier

11

Binding variables 2
(x P(x)) Q(x)
The x in Q(x) is not bound; thus not a proposition

(x P(x)) (x Q(x))
Both x values are bound; thus it is a proposition

(x P(x) Q(x)) (y R(y))


All variables are bound; thus it is a proposition

(x P(x) Q(y)) (y R(y))


The y in Q(y) is not bound; this not a proposition

12

A note on quantifiers
Recall that P(x) is a propositional function Recall that a proposition is a statement that is either true or false There are two ways to make a propositional function into a proposition:
Supply it with a value For example, P(5) is false, P(0) is true Provide a quantifiaction For example, x P(x) is false and x P(x) is true

Let P(x) be x == 0

P(x) is not a proposition

Let the universe of discourse be the real numbers

Negating quantified expressions


Every student in this class has studied mathematics in high school
x P(x), where P(x) is the statement x had studied mathematics in high school There exists a student in this class who has not studied mathematics in high school x P(x) x P(x) x P(x)

Negating quantified expressions


There is a student in this class who studied mathematics in high school

x Q(x), where Q(x) is the statement x has studies mathematics in high school Every student in this class has not studied mathematics in high school x Q(x)
x Q(x) x Q(x)

De Morgans law for Quantifiers


Negation x P(x) Equivalent Statement x P(x) True When False When P(x) is false for There is an x every x. for which P(x) is true. There is an x for which P(x) is false. P(x) is true for every x.

x P(x)

x P(x)

Negating multiple quantifiers

Recall negation rules for single quantifiers: x P(x) = x P(x) x P(x) = x P(x) Essentially, you change the quantifier(s), and negate what its quantifying

Examples:

(xy P(x,y)) = x y P(x,y) = xy P(x,y) (xyz P(x,y,z)) = xyz P(x,y,z) = xyz P(x,y,z) = xyz P(x,y,z)

Negating multiple quantifiers


Consider (xy P(x,y)) = xy P(x,y)
The left side is saying for all x, there exists a y such that

P is true To disprove it (negate it), you need to show that there exists an x such that for all y, P is false

Consider (xy P(x,y)) = xy P(x,y)


The left side is saying there exists an x such that for all

y, P is true To disprove it (negate it), you need to show that for all x, there exists a y such that P is false

Summary
Precedence of quantifiers Expressions with multiple quantifiers Quantifiers as loop Free and bound variables Negating quantifiers Morgans law for quantifiers Negating expressions with multiple quantifiers

Questions?

You might also like