Docsity

Nested Quantifiers - Discrete Mathematics - Lecture Slides, Slides of Discrete Mathematics

Partial preview of the text

Download Nested Quantifiers - Discrete Mathematics - Lecture Slides and more Slides Discrete Mathematics in PDF only on Docsity!

Discrete Mathematics

Lecture 4

ch1.

Nested Quantifiers

Order of quantifiers

∃x∀y and ∀x∃y are not equivalent!

∃x∀y P(x,y)

P(x,y) = (x+y == 0) is false

∀x∃y P(x,y)

P(x,y) = (x+y == 0) is true

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 it’s quantifying

Examples:

¬(∀x∃y P(x,y)) = ∃x ¬∃y P(x,y) = ∃x∀y ¬P(x,y) ¬(∀x∃y∀z P(x,y,z)) = ∃x¬∃y∀z P(x,y,z) = ∃x∀¬y∀z P(x,y,z) = ∃x∀y∃z ¬P(x,y,z)

Translating between English and quantifiers

The product of two negative integers is positive ∀x∀y ((x<0) ∧ (y<0) → (xy > 0)) Why conditional instead of and? The average of two positive integers is positive ∀x∀y ((x>0) ∧ (y>0) → ((x+y)/2 > 0)) The difference of two negative integers is not necessarily negative ∃x∃y ((x<0) ∧ (y<0) ∧ (|x-y|≥0)) Why and instead of conditional? The absolute value of the sum of two integers does not exceed the sum of the absolute values of these integers ∀x∀y (|x+y| ≤ |x| + |y|)

Translating between English and quantifiers

∃x∀y (x+y = y)

 There exists an additive identity for all real numbers

∀x∀y (((x≥0) ∧ (y<0)) → (x-y > 0))

 A non-negative number minus a negative number is greater than zero

∃x∃y (((x≤0) ∧ (y≤0)) ∧ (x-y > 0))

 The difference between two non-positive numbers is not necessarily non-positive (i.e. can be positive)

∀x∀y (((x≠0) ∧ (y≠0)) ↔ (xy ≠ 0))

 The product of two non-zero numbers is non-zero if and only if both factors are non-zero

Valid Arguments

Assume you are given the following two

statements:

“you are in this class” “if you are in this class, you will get a grade” Therefore, “You will get a grade”

p → q

p

∴ q

Definitions

An Argument in propositional logic is a

sequence of propositions.

All but the final proposition are called

premises.

The final proposition is called conclusion.

An argument is valid if the truth of all

premises implies that the conclusion is true.

i.e. (p 1 ∧ p 2 ∧ … ∧ p (^) n) → q is a tautology.

Modus Ponens example

Assume you are given the following two statements:  “you are in this class”  “if you are in this class, you will get a grade”

Let p = “you are in this class”

Let q = “you will get a grade”

By Modus Ponens, you can conclude that you will get a grade

Modus Tollens

Assume that we know: ¬q and p → q

Recall that p → q ≡ ¬q → ¬p

Thus, we know ¬q and ¬q → ¬p

We can conclude ¬p

¬ q

p → q

∴ ¬ p

Addition & Simplification

Addition: If you know that p is true, then p ∨ q will ALWAYS be true p ∴ p ∨ q

Simplification: If p ∧ q is true, then p will ALWAYS be true p ∧ q ∴ q

Example Proof

 We have the hypotheses:  “It is not sunny this afternoon and it is colder than yesterday”  “We will go swimming only if it is sunny”  “If we do not go swimming, then we will take a canoe trip”  “If we take a canoe trip, then we will be home by sunset”  Does this imply that “we will be home by sunset”?

((¬ p ∧ q) ∧ (r → p) ∧ (¬ r → s) ∧ (s → t)) → t ???  When p = “ It is sunny this afternoon” q = “it is colder than yesterday” r = “We will go swimming” s = “we will take a canoe trip” t = “we will be home by sunset”

More Rules of Inference

Conjunction: if p and q are true separately, then p∧q is true

Disjunctive syllogism: If p∨q is true, and p is false, then q must be true

Resolution: If p∨q is true, and ¬p∨r is true, then q∨r must be true

Hypothetical syllogism: If p→q is true, and q→r is
true, then p→r must be true

Summary: Rules of Inference

Modus ponens

p p → q ∴ q

Modus tollens

¬ q p → q ∴ ¬ p

Hypothetical syllogism

p → q q → r ∴ p → r

Disjunctive syllogism

p ∨ q ¬ p ∴ q

Addition

p ∴ p ∨ q

Simplification

p ∧ q ∴ p

Conjunction

p q ∴ p ∧ q

Resolution

p ∨ q ¬ p ∨ r ∴ q ∨ r