Propositional Logic, II → F P

advertisement
Proof by Contradiction
Mathematics for Computer Science
MIT 6.042J/18.062J
¬P → (Q ∧ ¬Q)
P
Propositional Logic, II
Proof by Contradiction
Proof by Cases
Sept. 12, 2005
Copyright © Albert R. Meyer, 2005.
Alternatively,
lec 2M.1
Proof by Contradiction
Theorem: 2 is irrational.
Proof (by contradiction):
• Suppose 2 was rational.
• Choose m, n integers without common
prime factors (always possible) such that
m
2=
n
• Show that m & n are both even,
a contradiction!
Copyright © Albert R. Meyer, 2005.
Theorem: 2 is irrational.
Proof (by contradiction):
2=
2n = m
2
so can assume
lec 2M.3
Sept. 12, 2005
m = 2l
m 2 = 4l 2
2n 2 = 4l 2
2
n 2 = 2l 2
so m is even.
so n is even.
Copyright © Albert R. Meyer, 2005.
lec 2M.4
Team Problem
Proof assumes that
If m2 is even, then m is even.
Why!
Copyright © Albert R. Meyer, 2005.
m
n
2n = m
Quickie
Sept. 12, 2005
lec 2M.2
Copyright © Albert R. Meyer, 2005.
Sept. 12, 2005
Proof by Contradiction
Sept. 12, 2005
P→F
P
Problem 1
lec 2M.5
Sept. 12, 2005
Copyright © Albert R. Meyer, 2005.
lec 2M.6
1
Proof by Deductions
Proof by Truth Tables
DeMorgan’s Law
¬ ( P ∨ Q)
P
Q
T
T
F
F
T
F
T
F
P ∧Q
is equivalent to
¬ ( P ∨ Q)
F
F
F
T
A student is trying to prove that propositions P, Q,
and R are all true. She proceeds as follows.
First, she proves three facts:
• P implies Q
• Q implies R
• R implies P.
Then she concludes,
``Thus P, Q, and R are obviously all true.''
P
Q
P ∧Q
F
F
F
F
T
F
T
F
F
T
T
T
T
T
T
F
lec 2M.7
Copyright © Albert R. Meyer, 2005.
Sept. 12, 2005
Sept. 12, 2005
lec 2M.8
Copyright © Albert R. Meyer, 2005.
Sound Rule?
Proposed Deduction Rule
From:
P implies Q, Q implies R, R implies P
Conclude: P, Q, and R are true.
Conclusion true whenever all antecedents true.
P→Q
Q→R R→P
P∧Q∧R
( P → Q), (Q → R ), ( R → P )
P∧Q∧ R
Antecedents
Sept. 12, 2005
lec 2M.9
Copyright © Albert R. Meyer, 2005.
Sept. 12, 2005
Sound Rule?
P→Q
Q→R R→P
lec 2M.10
Copyright © Albert R. Meyer, 2005.
Sound Rule?
Conclusion true whenever all antecedents true.
P QR
Conclusion
P∧Q∧R
Conclusion true whenever all antecedents true.
P QR
T T T
r→ p
p∧q∧r
T
T
T
p→q q→r
T T T
T
T T F
T T F
T
F
T F T
F
T
T
T
F
T F T
T F F
T F F
F
T
T
F
F T T
F T T
T
T
F
F
F T F
F T F
T
F
T
F
F F T
F F T
T
T
F
F
F F F
F F F
T
T
T
Antecedents
Sept. 12, 2005
Copyright © Albert R. Meyer, 2005.
Conclusion
Antecedents
lec 2M.11
Sept. 12, 2005
Copyright © Albert R. Meyer, 2005.
sound?
F
F
Conclusion
lec 2M.12
2
Sound Rule?
Sound Rule?
Conclusion true whenever all antecedents true.
Conclusion true whenever all antecedents true.
r→ p
p∧q∧r
T T T
T
T
T
T
r→ p
p∧q∧r
sound?
T T T
T
T
T
T
T T F
T
F
F
T F T
F
T
T
T
OK
OK
T T F
T
F
F
OK
F
OK
T F T
F
T
T
T
F
T F F
F
T
OK
T
F
OK
T F F
F
T
T
F
F T T
T
OK
T
F
F
OK
F T T
T
T
F
F
F T F
OK
T
F
T
F
OK
F T F
T
F
T
F
OK
F F T
T
T
F
F
OK
F F T
T
T
F
F
OK
F F F
T
T
T
F
F F F
T
T
T
F
P QR
Sept. 12, 2005
p→q q→r
sound?
lec 2M.13
Copyright © Albert R. Meyer, 2005.
P QR
Sept. 12, 2005
p→q q→r
lec 2M.14
Copyright © Albert R. Meyer, 2005.
Sound Rule?
Sound Rule?
Conclusion true whenever all antecedents true.
Conclusion true whenever all antecedents true.
r→ p
p∧q∧r
sound?
P QR
r→ p
p∧q∧r
sound?
T T T
T
T
T
T
OK
T T T
T
T
T
T
OK
T T F
T
F
F
OK
T T F
T
F
OK
F
T
F
OK
T F T
F
T
T
T
F
T F T
T
T
F
OK
T F F
F
T
T
F
OK
T F F
F
T
T
F
OK
F T T
T
T
F
F
OK
F T T
T
T
F
F
OK
F T F
T
F
T
F
OK
F T F
T
F
T
F
OK
F F T
T
T
F
F
OK
F F T
T
T
F
F
OK
F F F
T
T
T
F
F F F
T
T
T
F
NOT OK!
P QR
Sept. 12, 2005
p→q q→r
Copyright © Albert R. Meyer, 2005.
lec 2M.15
Sept. 12, 2005
Reasoning by Cases
Copyright © Albert R. Meyer, 2005.
Copyright © Albert R. Meyer, 2005. .
lec 2M.16
Quicker by Cases
P → Q, Q → R , R → P
P∧Q∧ R
Quicker proof of
unsoundness than
from truth tables
Sept. 12, 2005
p→q q→r
Case 1: P is true. Now, if antecedents are true,
then Q must be true (because P implies Q).
Then R must be true (because Q implies R).
So the conclusion P ∧ Q ∧ R is true.
This case is OK.
lec 2M.17
Sept. 12, 2005
Copyright © Albert R. Meyer, 2005.
lec 2M.18
3
Quicker by Cases
Goldbach Conjecture
P → Q, Q → R , R → P
P∧Q∧ R
Every even integer greater than 2 is the
sum of two primes.
Case 2: P is false. To make antecedents true,
R must be false (because R implies P), so
Q must be false (because Q implies R).
This assignment does make the antecedents true,
but the conclusion P ∧ Q ∧ R is (very) False.
Evidence:
This case is not OK.
Sept. 12, 2005
lec 2M.19
Copyright © Albert R. Meyer, 2005.
Sept. 12, 2005
Goldbach Conjecture
4 = 2+2
6 = 3+3
8 = 5+3
#
20 = ? 13 + 7
Copyright © Albert R. Meyer, 2005.
lec 2M.20
Goldbach Conjecture
True for all even numbers with
up to 13 digits!
(Rosen, p.182)
The answer is on my desk!
(Proof by Cases)
It remains an OPEN problem:
no counterexample, no proof.
UNTIL NOW!…
Sept. 12, 2005
Copyright © Albert R. Meyer, 2005.
lec 2M.21
Sept. 12, 2005
Copyright © Albert R. Meyer, 2005.
lec 2M.22
Team Problem
Problems 2 & 3
Sept. 12, 2005
Copyright © Albert R. Meyer, 2005.
lec 2M.23
4
Download