CS311 -- Discrete Structures ----Spring 2002

Note: Lecture notes will not exactly follow the lecture. They may include more material.

Note on notation: Because of the limitations of html (and my knowledge of it), I will use the following notation in these notes:

"V" for or
"&" for and
" ¬" for not
"->" for implies

Lecture and Other Notes Monday 1/28/02 (Class 4)

Proving statements involving quantifiers
We know how to prove simple claims involving propositions: we use the rules of inference, making logically correct statements until we reach the claim we wish to prove. In the examples we have done so far, the statement we have wished to prove was usually a proposition itself. We have not discussed how to prove something like "p->q" or "p<->q". We will discuss this later and it is covered in the Proof Techniques handout. It is not discussed in the book.
Now we also have to know how to deal with quantifiers. First consider there-exists:
Example 1: Universe: People in this room
F(x) = "x is sitting in the front row"
For-all x [F(x)] False
There exists a x, that F(x) True (Brian was sitting in the front row)
F(Brian Alstan) True
F(Dustin Pair) False (Dustin was not sitting in the front row).
Claim: there-exists x [F(x)]
To prove this you must show F(x) is true for at least one x.
Proof: F(Brian Alston). Therefore the claim is true. QED.
In words:
Claim: Someone is sitting in the front row.
Proof: Brian is sitting in the front row. Therefore someone is sitting in the front row. QED.
Point: To prove a "there-exists x P(x)" you need only show one element (c) of the universe for which it is true (P(c) is true).
Claim: There is an integer x such that 2x = x + 2. Proof: If x = 2, then 2x = 4, x + 2 = 4. Therefore the claim is true. QED.
Proving a "for-all" is harder. You have to show it is true for all elements of the universe. If the universe is infinite we will need a technique for proving something about an infinite number of cases without having to consider each one separately.
Example 2: Universe = All people
Given:
All people in this class are smart.
Dusty is in the class.
Therefore (claim): Dusty is smart.
Let C(x) = "x is in this class" and S(x) = "x is smart".
Proof: Given: For-all x [C(x) -> S(x)] and C(Dusty)
To show: S(Dusty).
I hope it is makes sense that if C(x)->S(x) is true for all x, then C(Dusty)->S(Dusty) is also true. Then since we know C(Dusty) we can use Modus Ponens to conclude S(Dusty). Note:We cannot use the rules of inference on predicates like; C(x)->S(x). We defined the rules of inference only for propositions (statements that were true or false). Even though it might seem to "make sense" to try to apply the rules of inference to predicates, it is not mathematically defined so we cannot do that. Thus in order to use the rules of inference we somehow have to turn our predicates into propositions. We will see how to do this. The first method we will see is called "universal specification".

Principle of "Universal Specification"
Given: for-all x [P(x)]
We can conclude: P(c) for any c in the Universe.
Now we can prove S(Dusty).
Proof:
1. for-all x [C(x) -> S(x)]Given
2. C(Dusty) -> S(Dusty) Universal Specification
3. C(Dusty) Given
4. S(Dusty) 2 + 3 + M.P.

Example 3: Prove: 16 is divisible by 2 using the facts given below (for practice).
Given Facts:
For all numbers, if it is divisible by 4 then it is divisible by 2.
16 is divisible by 4
Claim: 16 is divisible by 2 Let P(x) = "x is divisible by 4"
and Q(x) = "x is divisible by 2"
Given: for-all x [ P(x) -> Q(x)] and P(16)
Claim: Q(16)
Proof:
1. for all x, P(x) -> Q(x)     Given
2. P(16) -> Q(16) Universal Specification
3. P(16) Given
4. Q(16) 2 + 3 + M.P.

In order to prove claims with "for-all"s we will use another method for dealing with "for-all" called "Universal Generalization."
Definition: In order to prove for-all x[P(x)], if you prove P(c) for an arbitrary element c in the Universe, then you can conclude P(x) for all x. This is called "Universal Generalization".
Example 4:
Given:
For all integers x, if x is divisible by 8 then x is divisible by 4.
For all integers x, if x is divisible by 4 then x is divisible by 2.
Show: For all integers x, if x is divisible by 8 then x is divisible by 2.
Let: P(x) = "x is divisible by 8"
Q(x) = "x is divisible by 4"
R(x) = "x is divisible by 2"
Proof:
1. For-all x [P(x) -> Q(x)]Given
2. P(c) -> Q(c) 1 and Universal Generalization( where c represent an arbitrary element in the universe)
3. For-all x [Q(x) -> R(x)] Given
4. Q(c) -> R(c) 3 and Universal Specification
5. P(c) -> R(c) 2 and 4 and Law of Syllogism
6. for-all x [P(x)->R(x)] 5 and Universal Generalization.
Notice how we used Universal Generalization in the example above. This is the first example where we have proved a for-all statement. In order to prove it, we let "c" represent an chosen, but arbitrary element of the universe. Since the two "for-all" statments given apply to all the elements in the universe, they apply to c. When we applied "for-all x[P(x)->Q(x)]" to "c" we called the step "Universal Generalization" because this was where we chose to let c represent an arbitray element of the universe. In step 4 we again substituted "c" in for "x" in a for-all statement. Since c was already chosen we could call this Universal specification. Then we could use the Law of the Syllogism (since we now have propositions instead of predicates) to reach step 5. From Step 5 we can conclude the claim holds for all elements in the universe (we can generalize) because we chose c arbitrarily and every step we applied could equally apply to any other element of the universe. This generalizing is also called "Universal Generalization."
Example 5:
Given: An integer x is even iff there is a k such that k is an integer & x = 2k
Prove: For all integers x, 2x is even
Let E(x) = "x is even"
Let D(x) = "there is a k such that k is an integer & x = 2k"
Given: for-all x [E(x) <-> D(x)]
To show: for-all x [E(2x)]
Proof (in words): Let c be any integer. Consider 2c. Since c is an integer, by the definition of even, 2c is even. This shows that 2x is even for any integer x, as claimed.
Note when we choose c to be any integer we are setting up a proof of a for-all statement using Universal Generalization. When we get the result we want for c we can generalize to any integer.
Proof (in logical notation):
1. for-all x [E(x) <-> D(x)] Given
2. Let c be any integer Universal Generalization
3. for-all x[(E(x)->D(x)) & (D(x)->E(x))] 1. and (a<->b) <=> (a->b) & (b->a)
4. for-all x[D(x)->E(x)] 3. and conjunctive simplification
5. D(2c) -> E(2c) 4 and Universal Specification
6. D(2c) since 2c = 2 * c, obvious
7. E(2c) 5 and 6 and Modus Ponens
8. for-all x[E(2x)] Universal Generalization

Proof Techniques (summary):
Types of claims How to prove
If-then Vacuous, Trivial, Indirect, Direct
if and only if prove p -> q & q -> p
direct statement rules of inference
proof by contradiction
4 ways to prove an "if p then q" statement (see Proof Techniques Handout):