SlideShare ist ein Scribd-Unternehmen logo
1 von 7
Downloaden Sie, um offline zu lesen
Department of Computer Science                           University of Karachi
BSCS - 411 --     Discrete Mathematics                --        Week 3

Inference Rules for Quantifiers
   • ∀x p(x)                Universal Instantiation / Universal Specification
     ________

     ∴p(o)                               (substitute any object o)
  • p(g)                                 (for g a general element of u.d.)
     ________

     ∴∀x p(x)                            Universal Generalization
  • ∃x p(x)                              Existential Instantiation
     ________

     ∴p(c)                               (substitute a new constant c)
  • p(o)                                 (substitute any extant object o)
     ________

     ∴∃x p(x)                            Existential Generalization
Rule of Universal Specification
This is a fairly obvious rule, but one that is important:
If an open statement is true for all possible replacements in the designated
universe, then that open statement is true for each specific individual member
in that universe.
Symbolically speaking, we have:
If ∀x p(x) is true, then we know that p(o) is true, for each o in the universe for
x.
Here is a simple example using this rule. Consider the following premises:
           1) Each actor/actress on the TV show Friends is a millionaire.
           2) Jennifer Aniston is an actress on the TV show Friends.
Therefore, Jennifer Aniston is a millionaire.
Symbolically, consider setting up these three statements:
                p(x): x is an actor/actress on Friends.
                q(x): x is a millionaire.
Now, the given information is ∀x [p(x) q(x)]
If we wish to determine the financial status of Jennifer Aniston, we add into
our premise the statement p(Jennifer Aniston) as being true.

Week 3                                                                      Page 1
Using the Rule of Universal Specification, and Rule of Detachment (Modus
Ponens), we can conclude that q(Jennifer Aniston) is true; that is Jennifer
Aniston is a millionaire.
Let’s go ahead and look at another example in greater detail.
Consider each of these open statements for the next example:
                p(x): x is a show on prime-time TV
                q(x): x is a show on late-night TV
                r(x): x is a soap opera
Now, consider the following argument:
                No soap opera is on prime-time TV or late-night TV
                All My Children is a soap opera.
                Therefore, All My Children is not on prime-time TV.
Here is the proof of the argument:
(Note: Let A stand for “All My Children”)
1) ∀x [p(x) ∨ q(x) ¬r(x)]         Premise
2) r(A)                           Premise
                   ¬
3) p(A) ∨ q(A)       r(A)         Step 1 & Rule of Univ. Spec.
   ¬¬        ¬
4) r(A)        (p(A) ∨ q(A))      Contrapositive
          ¬
5) r(A)     (p(A) ∨ q(A))         Law of Double Negation
           ¬         ¬
6) r(A) ( p(A) ∧ q(A))            Step 5 & De Morgan’s Law
   ¬       ¬
7) p(A) ∧ q(A)            Steps 2 & 6 & Rule of Detachment (Modus Ponens)
     ¬
8) ∴ p(A)                         Step 7 & Rule of Conjunctive Simplification
The Rule of Universal Generalization
If an open statement p(x) is proved to be true when x is replaced by any
arbitrarily chosen element c from our universe, then the universally qualified
statement ∀x p(x) is true. (This rule also extends beyond one variable.)
We can use this to formally show that IF
                            ∀x [p(x)      q(x)] AND
                            ∀x [q(x)      r(x)] THEN
                            ∀x [p(x)      r(x)].
Here is the proof of the argument:
1) ∀x [p(x) q(x)]                      Premise
2) p(c) q(c)                           Step 1 & Rule of Universal Specification
3) ∀x [q(x) r(x)]                      Premise
Week 3                                                                 Page 2
4) q(c) r(c)                           Step 3 & Rule of Universal Specification
5) p(c) r(c)                           Steps 2 & 4 and Law of Syllogism
6) ∴∀x [p(x)      r(x)]          Step 5 and the Rule of Universal Generalization
Now, consider the following assumptions
                      ∀x p(x) AND
                      ∀x [p(x) ∧ q(x) r(x)]
                          And use those to prove:
                          ∴∀x [¬r(x) ¬q(x)].
Here is the proof of the argument:
1) ∀x p(x)                          Premise
2) p(c)                             Step 1 & Rule of Universal Specification
3) ∀x [p(x) ∧ q(x) r(x)]            Premise
4) p(c) ∧ q(c) r(c)                 Step 3 & Rule of Universal Specification
5) T0 ∧ q(c) r(c)                   Substitution from Step 2
6) q(c) r(c)                        Identity Law
7) ¬r(c) ¬q(c)                      Contrapositive
8) ∴∀x [¬r(x) ¬q(x)]                Step 7 & Rule of Universal Generalization
To make this example more concrete, consider the following open statements
for p(x), q(x) and r(x):
                  Let the universe x be of all 4 sided polygons.
                                    p(x): x is a quadrilateral.
                                    q(x): x has four equal angles.
                                    r(x): x is a rectangle.
Using basic geometry definitions, we find that
      ∀x p(x)                  (All 4 sided polygons are quadrilaterals.)
      ∀x [p(x) ∧ q(x)    r(x)] (All 4 sided polygons that are quadrilaterals
                                 and have four equal angles are rectangles.)
Therefore, all 4 sided polygons that are not rectangles do not have four equal
angles, OR
                             ∴∀x [¬r(x)      ¬q(x)]
Examples illustrating proof techniques
We will use these definitions in the following problems:
An integer n is even if and only if there exists another integer r such that n = 2*r.
An integer n is odd if and only if there exists another integer r such that n =
(2*r) + 1.
Week 3                                                                      Page 3
If y | x, which is read as “x is divisible by y”, or “y divides evenly into x”,
then x = yc, for some integer c. Remember in this definition, y must be non-
zero.
In the book there are proofs showing that the sum of two odd numbers is even
and that the product of two odd numbers is odd. We will established here a
proof of slightly more interesting result.
The square of an even number k is divisible by 4.
Since we know k is even, we have k=2*r for some integer r.
Now, we can compute k2:
k2 = (2*r)2 = 4*r2, which is divisible by 4 since r2 is an integer.
Also, the square of an odd number k leaves a remainder of 1 when
divided by 4.
Since we know that k is odd, we have k=2*r+1 for some integer r. Now, we
can compute k2:
k2 = (2*r+1)2 = 4*r2+4*r+1 = 4(r2+r) + 1, which leaves a remainder of 1 when
divided by 4 since 4 divides evenly into 4(r2+r). (Because r2+r must be an
integer...)
In both of these examples, we used the Universal Rule of Generalization
because we proved the result for arbitrary odd and even integers, and that
implies that the general statement is true for all of them.
Prove that if n is an integer then n2+n is an even integer
Proof #1: direct proof by method of exhaustion using cases.
All integers are even or odd. (I have not formally proved this, but you can use
this fact throughout the class..) Thus, we have two different possibilities for n:
n is even: Then there is an integer r such that n=2r, then we have
n2+n = (2r)2 + 2r
     = 4r2 + 2r
     = 2(2r2 + r),
since this value is divisible by 2, it is even.
n is odd: Then there is an integer r such that n=2r+1, then we have
n2+n = (2r+1)2 + (2r+1)
     = 4r2 + 4r + 1 + 2r + 1
     = 4r2 + 6r + 2
     = 2(2r2 + 3r + 1),

Week 3                                                                   Page 4
and this value is also divisible by 2, thus it is even.
One way to analyze how and why this proof is sufficient is to break it down
into a logical argument. Let p(n), q(n), and r(n) be the following open
statements:
                  p(n): n is an even number.
                  q(n): n is an odd number.
                  r(n): n2+n is even.
Since all integers are either even or odd, our goal is to prove
                  (p(n) ∨ q(n)) r(n).
Logically, we can show this is equivalent to:
                  (p(n)    r(n)) ∧ (q(n)     r(n))
The first part of our proof showed that (p(n)     r(n)) is true, while the second
part of our proof showed that (q(n)       r(n)) is true as well. Thus, together,
these parts prove the original claim.
Proof #2: Contradiction
For contradiction’s sake, assume that n2+n is odd. We have the following:
n2+n = n(n+1).
We know that for the product of two integers to be odd, both of them have to
be. (Part of this is shown in the book...)
However, it is impossible for both n and n+1 to be odd. (This is something
you would have to prove also.)
Thus, the way contradiction works is that you assume that the result is false.
Then use algebra and other rules to show that the premise must be false as
well, or that something impossible occurs if the incorrect result is assumed.
The reason is that you came to an incorrect conclusion. You must have arrived
at it by making an incorrect step. The ONLY possible incorrect step that could
have been taken was the assumption made in the beginning. Hence, that is
wrong, which implies the truth of what you are trying to prove.
In this class, you will often be given statements that may or may not be true.
Your job will be to determine which is the case, and give proof of your
answer. Typically, disproving an assertion is easier than proving one. Here are
a couple examples illustrating how to disprove an assertion:
1) For all prime numbers greater than 100, the sum of their digits is greater
than 4.


Week 3                                                                  Page 5
This is not true. We can verify that 101 is prime by showing that 2, 3, 5, and 7
do not divide into it evenly. Furthermore, we can see the sum of the digits in
this number is 2, which is less than or equal to 4. Thus, by finding one prime
number greater than 100 that has digits that sum to 2, we have disproved the
claim.
Thus, to disprove a “for all” statement, all we had to do was find one value for
which the statement did not hold.
Here is another example of method of exhaustion:
All integers in between 10 and 20 are either prime or have 2 or 3 as a factor.
Proof:
10 = 2*5
11 is prime
12 = 3*4
13 is prime
14 = 2*7
15 = 3*5
16 = 2*8
17 is prime
18 = 2*9
19 is prime
20 = 2*10
Here is an example where we prove a statement by proving its contrapositive:
If x + y is odd, then exactly one of x and y is odd.
The contrapositive of this statement is:
If either neither or both of x and y is odd, then x+y is even.
If we prove this statement, we have proven the original.
Thus, we can split the problem up into two cases:
Case 1:
Neither of x and y is odd, thus both are even.
Let x = 2a and y = 2b for some integers a and b.
Then,
x + y = 2a + 2b
      = 2(a+b).
At this point we can conclude that x+y is even since it is divisible by 2. (We
know this because a+b must be an integer.)
Case 2:
Both of x and y are odd.
Week 3                                                                  Page 6
Let x = 2a+1, y=2b+1, for some integers a and b.
Then,
x+y = 2a+1+2b+1
    = 2a+2b+2
    = 2(a+b+1)
As before, we can conclude that x+y is even since it is a multiple of 2.
More Practice of a proof based on contradiction:
Theorem: (For all integers n)
    If 3n+2 is odd, then n is odd.
Proof: Suppose that the conclusion is false, i.e., that n is even. Then n=2k for
some integer k. Then 3n+2 = 3(2k)+2 = 6k+2 = 2(3k+1). Thus 3n+2 is even,
because it equals 2j for integer j = 3k+1. So 3n+2 is not odd. We have shown
that ¬(n is odd) ¬(3n+2 is odd), thus its contra-positive (3n+2 is odd) (n
is odd) is also true.




Week 3                                                                     Page 7

Weitere ähnliche Inhalte

Was ist angesagt?

Unit 1-logic
Unit 1-logicUnit 1-logic
Unit 1-logicraksharao
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfMuhammadUmerIhtisham
 
Predicates and quantifiers presentation topics
Predicates  and quantifiers  presentation topicsPredicates  and quantifiers  presentation topics
Predicates and quantifiers presentation topicsR.h. Himel
 
Quantifiers and its Types
Quantifiers and its TypesQuantifiers and its Types
Quantifiers and its TypesHumayunNaseer4
 
CMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and StrategyCMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and Strategyallyn joy calcaben
 
Harmonic Analysis and Deep Learning
Harmonic Analysis and Deep LearningHarmonic Analysis and Deep Learning
Harmonic Analysis and Deep LearningSungbin Lim
 
Lesson 15: Exponential Growth and Decay (slides)
Lesson 15: Exponential Growth and Decay (slides)Lesson 15: Exponential Growth and Decay (slides)
Lesson 15: Exponential Growth and Decay (slides)Matthew Leingang
 
Poggi analytics - star - 1a
Poggi   analytics - star - 1aPoggi   analytics - star - 1a
Poggi analytics - star - 1aGaston Liberman
 
Unique fixed point theorems for generalized weakly contractive condition in o...
Unique fixed point theorems for generalized weakly contractive condition in o...Unique fixed point theorems for generalized weakly contractive condition in o...
Unique fixed point theorems for generalized weakly contractive condition in o...Alexander Decker
 
Probability cheatsheet
Probability cheatsheetProbability cheatsheet
Probability cheatsheetSuvrat Mishra
 
IVR - Chapter 1 - Introduction
IVR - Chapter 1 - IntroductionIVR - Chapter 1 - Introduction
IVR - Chapter 1 - IntroductionCharles Deledalle
 

Was ist angesagt? (19)

Math
MathMath
Math
 
Unit 1-logic
Unit 1-logicUnit 1-logic
Unit 1-logic
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdf
 
Predicates and quantifiers presentation topics
Predicates  and quantifiers  presentation topicsPredicates  and quantifiers  presentation topics
Predicates and quantifiers presentation topics
 
Quantifiers and its Types
Quantifiers and its TypesQuantifiers and its Types
Quantifiers and its Types
 
CMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and StrategyCMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and Strategy
 
Harmonic Analysis and Deep Learning
Harmonic Analysis and Deep LearningHarmonic Analysis and Deep Learning
Harmonic Analysis and Deep Learning
 
Matrix calculus
Matrix calculusMatrix calculus
Matrix calculus
 
Formal Logic - Lesson 1 - Introduction to Logic
Formal Logic - Lesson 1 - Introduction to LogicFormal Logic - Lesson 1 - Introduction to Logic
Formal Logic - Lesson 1 - Introduction to Logic
 
Course notes2summer2012
Course notes2summer2012Course notes2summer2012
Course notes2summer2012
 
06 Machine Learning - Naive Bayes
06 Machine Learning - Naive Bayes06 Machine Learning - Naive Bayes
06 Machine Learning - Naive Bayes
 
Ch6
Ch6Ch6
Ch6
 
Formal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and QuantifiersFormal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and Quantifiers
 
Lesson 15: Exponential Growth and Decay (slides)
Lesson 15: Exponential Growth and Decay (slides)Lesson 15: Exponential Growth and Decay (slides)
Lesson 15: Exponential Growth and Decay (slides)
 
Ch5
Ch5Ch5
Ch5
 
Poggi analytics - star - 1a
Poggi   analytics - star - 1aPoggi   analytics - star - 1a
Poggi analytics - star - 1a
 
Unique fixed point theorems for generalized weakly contractive condition in o...
Unique fixed point theorems for generalized weakly contractive condition in o...Unique fixed point theorems for generalized weakly contractive condition in o...
Unique fixed point theorems for generalized weakly contractive condition in o...
 
Probability cheatsheet
Probability cheatsheetProbability cheatsheet
Probability cheatsheet
 
IVR - Chapter 1 - Introduction
IVR - Chapter 1 - IntroductionIVR - Chapter 1 - Introduction
IVR - Chapter 1 - Introduction
 

Andere mochten auch

Andere mochten auch (7)

Ipv4
Ipv4Ipv4
Ipv4
 
IPv4 to IPv6
IPv4 to IPv6IPv4 to IPv6
IPv4 to IPv6
 
IPv6
IPv6IPv6
IPv6
 
Requirements analysis
Requirements analysisRequirements analysis
Requirements analysis
 
Cloud computing simple ppt
Cloud computing simple pptCloud computing simple ppt
Cloud computing simple ppt
 
Introduction of Cloud computing
Introduction of Cloud computingIntroduction of Cloud computing
Introduction of Cloud computing
 
cloud computing ppt
cloud computing pptcloud computing ppt
cloud computing ppt
 

Ähnlich wie Lecture 3 qualtifed rules of inference

Algorithmic foundations.docx
Algorithmic foundations.docxAlgorithmic foundations.docx
Algorithmic foundations.docxedwin orege
 
1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.pptTejasAditya2
 
Discreate structure presentation introduction
Discreate structure presentation introductionDiscreate structure presentation introduction
Discreate structure presentation introductionyashirraza123
 
Theoryofcomp science
Theoryofcomp scienceTheoryofcomp science
Theoryofcomp scienceRaghu nath
 
Appendex b
Appendex bAppendex b
Appendex bswavicky
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicManjula V
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdfsmarwaneid
 
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...mathsjournal
 
2 random variables notes 2p3
2 random variables notes 2p32 random variables notes 2p3
2 random variables notes 2p3MuhannadSaleh
 

Ähnlich wie Lecture 3 qualtifed rules of inference (20)

Algorithmic foundations.docx
Algorithmic foundations.docxAlgorithmic foundations.docx
Algorithmic foundations.docx
 
1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt
 
Discreate structure presentation introduction
Discreate structure presentation introductionDiscreate structure presentation introduction
Discreate structure presentation introduction
 
jalalam.ppt
jalalam.pptjalalam.ppt
jalalam.ppt
 
Math Assignment Help
Math Assignment HelpMath Assignment Help
Math Assignment Help
 
02 RULES OF INFERENCES.pptx
02 RULES OF INFERENCES.pptx02 RULES OF INFERENCES.pptx
02 RULES OF INFERENCES.pptx
 
Discrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order LogicDiscrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order Logic
 
PTSP PPT.pdf
PTSP PPT.pdfPTSP PPT.pdf
PTSP PPT.pdf
 
Kumera2.docx
Kumera2.docxKumera2.docx
Kumera2.docx
 
Theoryofcomp science
Theoryofcomp scienceTheoryofcomp science
Theoryofcomp science
 
1. Logic and Proofs.ppt
1. Logic and Proofs.ppt1. Logic and Proofs.ppt
1. Logic and Proofs.ppt
 
Appendex b
Appendex bAppendex b
Appendex b
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
 
mcmc
mcmcmcmc
mcmc
 
Unit II PPT.pptx
Unit II PPT.pptxUnit II PPT.pptx
Unit II PPT.pptx
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdf
 
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...
 
2 random variables notes 2p3
2 random variables notes 2p32 random variables notes 2p3
2 random variables notes 2p3
 
X02PredCalculus.ppt
X02PredCalculus.pptX02PredCalculus.ppt
X02PredCalculus.ppt
 
chapter9.ppt
chapter9.pptchapter9.ppt
chapter9.ppt
 

Mehr von asimnawaz54

Expert systems with applications
Expert systems with applicationsExpert systems with applications
Expert systems with applicationsasimnawaz54
 
Establishing knowledge base
Establishing knowledge baseEstablishing knowledge base
Establishing knowledge baseasimnawaz54
 
Designing the expert system
Designing the expert systemDesigning the expert system
Designing the expert systemasimnawaz54
 
1 s2.0-s0957417410007244-main
1 s2.0-s0957417410007244-main1 s2.0-s0957417410007244-main
1 s2.0-s0957417410007244-mainasimnawaz54
 
Packet switching
Packet switchingPacket switching
Packet switchingasimnawaz54
 
Network layer and circuit switching
Network layer and circuit switchingNetwork layer and circuit switching
Network layer and circuit switchingasimnawaz54
 
Network layer and circuit switching
Network layer and circuit switchingNetwork layer and circuit switching
Network layer and circuit switchingasimnawaz54
 
Internet control message protocol
Internet control message protocolInternet control message protocol
Internet control message protocolasimnawaz54
 
Address resolution protocol
Address resolution protocolAddress resolution protocol
Address resolution protocolasimnawaz54
 
Address resolution protocol and internet control message protocol
Address resolution protocol and internet control message protocolAddress resolution protocol and internet control message protocol
Address resolution protocol and internet control message protocolasimnawaz54
 
Advanced software engineering lab 2
Advanced software engineering lab 2Advanced software engineering lab 2
Advanced software engineering lab 2asimnawaz54
 
Object oriented analysis lab1
Object oriented analysis lab1Object oriented analysis lab1
Object oriented analysis lab1asimnawaz54
 
Ooad sequence diagram lecture
Ooad sequence diagram lectureOoad sequence diagram lecture
Ooad sequence diagram lectureasimnawaz54
 

Mehr von asimnawaz54 (14)

Expert systems with applications
Expert systems with applicationsExpert systems with applications
Expert systems with applications
 
Establishing knowledge base
Establishing knowledge baseEstablishing knowledge base
Establishing knowledge base
 
Designing the expert system
Designing the expert systemDesigning the expert system
Designing the expert system
 
1 s2.0-s0957417410007244-main
1 s2.0-s0957417410007244-main1 s2.0-s0957417410007244-main
1 s2.0-s0957417410007244-main
 
Packet switching
Packet switchingPacket switching
Packet switching
 
Network layer and circuit switching
Network layer and circuit switchingNetwork layer and circuit switching
Network layer and circuit switching
 
Network layer and circuit switching
Network layer and circuit switchingNetwork layer and circuit switching
Network layer and circuit switching
 
Ipv6up
Ipv6upIpv6up
Ipv6up
 
Internet control message protocol
Internet control message protocolInternet control message protocol
Internet control message protocol
 
Address resolution protocol
Address resolution protocolAddress resolution protocol
Address resolution protocol
 
Address resolution protocol and internet control message protocol
Address resolution protocol and internet control message protocolAddress resolution protocol and internet control message protocol
Address resolution protocol and internet control message protocol
 
Advanced software engineering lab 2
Advanced software engineering lab 2Advanced software engineering lab 2
Advanced software engineering lab 2
 
Object oriented analysis lab1
Object oriented analysis lab1Object oriented analysis lab1
Object oriented analysis lab1
 
Ooad sequence diagram lecture
Ooad sequence diagram lectureOoad sequence diagram lecture
Ooad sequence diagram lecture
 

Lecture 3 qualtifed rules of inference

  • 1. Department of Computer Science University of Karachi BSCS - 411 -- Discrete Mathematics -- Week 3 Inference Rules for Quantifiers • ∀x p(x) Universal Instantiation / Universal Specification ________ ∴p(o) (substitute any object o) • p(g) (for g a general element of u.d.) ________ ∴∀x p(x) Universal Generalization • ∃x p(x) Existential Instantiation ________ ∴p(c) (substitute a new constant c) • p(o) (substitute any extant object o) ________ ∴∃x p(x) Existential Generalization Rule of Universal Specification This is a fairly obvious rule, but one that is important: If an open statement is true for all possible replacements in the designated universe, then that open statement is true for each specific individual member in that universe. Symbolically speaking, we have: If ∀x p(x) is true, then we know that p(o) is true, for each o in the universe for x. Here is a simple example using this rule. Consider the following premises: 1) Each actor/actress on the TV show Friends is a millionaire. 2) Jennifer Aniston is an actress on the TV show Friends. Therefore, Jennifer Aniston is a millionaire. Symbolically, consider setting up these three statements: p(x): x is an actor/actress on Friends. q(x): x is a millionaire. Now, the given information is ∀x [p(x) q(x)] If we wish to determine the financial status of Jennifer Aniston, we add into our premise the statement p(Jennifer Aniston) as being true. Week 3 Page 1
  • 2. Using the Rule of Universal Specification, and Rule of Detachment (Modus Ponens), we can conclude that q(Jennifer Aniston) is true; that is Jennifer Aniston is a millionaire. Let’s go ahead and look at another example in greater detail. Consider each of these open statements for the next example: p(x): x is a show on prime-time TV q(x): x is a show on late-night TV r(x): x is a soap opera Now, consider the following argument: No soap opera is on prime-time TV or late-night TV All My Children is a soap opera. Therefore, All My Children is not on prime-time TV. Here is the proof of the argument: (Note: Let A stand for “All My Children”) 1) ∀x [p(x) ∨ q(x) ¬r(x)] Premise 2) r(A) Premise ¬ 3) p(A) ∨ q(A) r(A) Step 1 & Rule of Univ. Spec. ¬¬ ¬ 4) r(A) (p(A) ∨ q(A)) Contrapositive ¬ 5) r(A) (p(A) ∨ q(A)) Law of Double Negation ¬ ¬ 6) r(A) ( p(A) ∧ q(A)) Step 5 & De Morgan’s Law ¬ ¬ 7) p(A) ∧ q(A) Steps 2 & 6 & Rule of Detachment (Modus Ponens) ¬ 8) ∴ p(A) Step 7 & Rule of Conjunctive Simplification The Rule of Universal Generalization If an open statement p(x) is proved to be true when x is replaced by any arbitrarily chosen element c from our universe, then the universally qualified statement ∀x p(x) is true. (This rule also extends beyond one variable.) We can use this to formally show that IF ∀x [p(x) q(x)] AND ∀x [q(x) r(x)] THEN ∀x [p(x) r(x)]. Here is the proof of the argument: 1) ∀x [p(x) q(x)] Premise 2) p(c) q(c) Step 1 & Rule of Universal Specification 3) ∀x [q(x) r(x)] Premise Week 3 Page 2
  • 3. 4) q(c) r(c) Step 3 & Rule of Universal Specification 5) p(c) r(c) Steps 2 & 4 and Law of Syllogism 6) ∴∀x [p(x) r(x)] Step 5 and the Rule of Universal Generalization Now, consider the following assumptions ∀x p(x) AND ∀x [p(x) ∧ q(x) r(x)] And use those to prove: ∴∀x [¬r(x) ¬q(x)]. Here is the proof of the argument: 1) ∀x p(x) Premise 2) p(c) Step 1 & Rule of Universal Specification 3) ∀x [p(x) ∧ q(x) r(x)] Premise 4) p(c) ∧ q(c) r(c) Step 3 & Rule of Universal Specification 5) T0 ∧ q(c) r(c) Substitution from Step 2 6) q(c) r(c) Identity Law 7) ¬r(c) ¬q(c) Contrapositive 8) ∴∀x [¬r(x) ¬q(x)] Step 7 & Rule of Universal Generalization To make this example more concrete, consider the following open statements for p(x), q(x) and r(x): Let the universe x be of all 4 sided polygons. p(x): x is a quadrilateral. q(x): x has four equal angles. r(x): x is a rectangle. Using basic geometry definitions, we find that ∀x p(x) (All 4 sided polygons are quadrilaterals.) ∀x [p(x) ∧ q(x) r(x)] (All 4 sided polygons that are quadrilaterals and have four equal angles are rectangles.) Therefore, all 4 sided polygons that are not rectangles do not have four equal angles, OR ∴∀x [¬r(x) ¬q(x)] Examples illustrating proof techniques We will use these definitions in the following problems: An integer n is even if and only if there exists another integer r such that n = 2*r. An integer n is odd if and only if there exists another integer r such that n = (2*r) + 1. Week 3 Page 3
  • 4. If y | x, which is read as “x is divisible by y”, or “y divides evenly into x”, then x = yc, for some integer c. Remember in this definition, y must be non- zero. In the book there are proofs showing that the sum of two odd numbers is even and that the product of two odd numbers is odd. We will established here a proof of slightly more interesting result. The square of an even number k is divisible by 4. Since we know k is even, we have k=2*r for some integer r. Now, we can compute k2: k2 = (2*r)2 = 4*r2, which is divisible by 4 since r2 is an integer. Also, the square of an odd number k leaves a remainder of 1 when divided by 4. Since we know that k is odd, we have k=2*r+1 for some integer r. Now, we can compute k2: k2 = (2*r+1)2 = 4*r2+4*r+1 = 4(r2+r) + 1, which leaves a remainder of 1 when divided by 4 since 4 divides evenly into 4(r2+r). (Because r2+r must be an integer...) In both of these examples, we used the Universal Rule of Generalization because we proved the result for arbitrary odd and even integers, and that implies that the general statement is true for all of them. Prove that if n is an integer then n2+n is an even integer Proof #1: direct proof by method of exhaustion using cases. All integers are even or odd. (I have not formally proved this, but you can use this fact throughout the class..) Thus, we have two different possibilities for n: n is even: Then there is an integer r such that n=2r, then we have n2+n = (2r)2 + 2r = 4r2 + 2r = 2(2r2 + r), since this value is divisible by 2, it is even. n is odd: Then there is an integer r such that n=2r+1, then we have n2+n = (2r+1)2 + (2r+1) = 4r2 + 4r + 1 + 2r + 1 = 4r2 + 6r + 2 = 2(2r2 + 3r + 1), Week 3 Page 4
  • 5. and this value is also divisible by 2, thus it is even. One way to analyze how and why this proof is sufficient is to break it down into a logical argument. Let p(n), q(n), and r(n) be the following open statements: p(n): n is an even number. q(n): n is an odd number. r(n): n2+n is even. Since all integers are either even or odd, our goal is to prove (p(n) ∨ q(n)) r(n). Logically, we can show this is equivalent to: (p(n) r(n)) ∧ (q(n) r(n)) The first part of our proof showed that (p(n) r(n)) is true, while the second part of our proof showed that (q(n) r(n)) is true as well. Thus, together, these parts prove the original claim. Proof #2: Contradiction For contradiction’s sake, assume that n2+n is odd. We have the following: n2+n = n(n+1). We know that for the product of two integers to be odd, both of them have to be. (Part of this is shown in the book...) However, it is impossible for both n and n+1 to be odd. (This is something you would have to prove also.) Thus, the way contradiction works is that you assume that the result is false. Then use algebra and other rules to show that the premise must be false as well, or that something impossible occurs if the incorrect result is assumed. The reason is that you came to an incorrect conclusion. You must have arrived at it by making an incorrect step. The ONLY possible incorrect step that could have been taken was the assumption made in the beginning. Hence, that is wrong, which implies the truth of what you are trying to prove. In this class, you will often be given statements that may or may not be true. Your job will be to determine which is the case, and give proof of your answer. Typically, disproving an assertion is easier than proving one. Here are a couple examples illustrating how to disprove an assertion: 1) For all prime numbers greater than 100, the sum of their digits is greater than 4. Week 3 Page 5
  • 6. This is not true. We can verify that 101 is prime by showing that 2, 3, 5, and 7 do not divide into it evenly. Furthermore, we can see the sum of the digits in this number is 2, which is less than or equal to 4. Thus, by finding one prime number greater than 100 that has digits that sum to 2, we have disproved the claim. Thus, to disprove a “for all” statement, all we had to do was find one value for which the statement did not hold. Here is another example of method of exhaustion: All integers in between 10 and 20 are either prime or have 2 or 3 as a factor. Proof: 10 = 2*5 11 is prime 12 = 3*4 13 is prime 14 = 2*7 15 = 3*5 16 = 2*8 17 is prime 18 = 2*9 19 is prime 20 = 2*10 Here is an example where we prove a statement by proving its contrapositive: If x + y is odd, then exactly one of x and y is odd. The contrapositive of this statement is: If either neither or both of x and y is odd, then x+y is even. If we prove this statement, we have proven the original. Thus, we can split the problem up into two cases: Case 1: Neither of x and y is odd, thus both are even. Let x = 2a and y = 2b for some integers a and b. Then, x + y = 2a + 2b = 2(a+b). At this point we can conclude that x+y is even since it is divisible by 2. (We know this because a+b must be an integer.) Case 2: Both of x and y are odd. Week 3 Page 6
  • 7. Let x = 2a+1, y=2b+1, for some integers a and b. Then, x+y = 2a+1+2b+1 = 2a+2b+2 = 2(a+b+1) As before, we can conclude that x+y is even since it is a multiple of 2. More Practice of a proof based on contradiction: Theorem: (For all integers n) If 3n+2 is odd, then n is odd. Proof: Suppose that the conclusion is false, i.e., that n is even. Then n=2k for some integer k. Then 3n+2 = 3(2k)+2 = 6k+2 = 2(3k+1). Thus 3n+2 is even, because it equals 2j for integer j = 3k+1. So 3n+2 is not odd. We have shown that ¬(n is odd) ¬(3n+2 is odd), thus its contra-positive (3n+2 is odd) (n is odd) is also true. Week 3 Page 7