2 Proving in Propositional Logic
2 Proving in Propositional Logic
Discrete Structures
(IT 132)
Lecture 2
LEARNING OUTCOMES
At the end of this lecture, you should have:
1. Identified whether a given inference is valid or not
using the inference rules;
2. Showed whether two sentences are equivalent
using the equivalence laws; and,
3. Proved the validity of sentences using any of the
proof techniques taught.
LOGICAL IMPLICATION
➔ To prove the validity of arguments in PL, we must
study the different proof techniques and the laws
that govern them
➔ To construct proofs, we need a means of drawing
conclusions or deriving new premises that
logically imply from old ones
RULES OF INFERENCE
➔ Use these rules to specify which conclusion may be
inferred legitimately from propositions known, assumed,
or previously established
➔ If you have shown that the conclusion logically follows
from the given premises, then we say the argument is
valid
➔ The rules of inference in propositional logic are given in
the succeeding slides in the following format:
<The set of premises (which are assumed to be true).>
<Therefore (∴), conclusion>
RULES OF INFERENCE
➔ Addition (AD)
◆ P → (P v Q) (Tautological/Implication form)
◆ P s (Inference Rule form)
∴PvQ
➔ Simplification (SP)
◆ (P ^ Q) → P or (P ^ Q) → Q
◆ P^Qs or P ^ Q s
∴P ∴Q
You're singing.
Therefore, either you're singing or my ears hurt.
P d
∴ ~P v ~R
Addition (AD)
➔ P: You're singing.
➔ Q: My ears hurt. EXAMPLES
➔ R: I will study.
➔ S: I will pass.
P^Qd
∴P
Simplification (SP)
➔ P: You're singing.
➔ Q: My ears hurt. EXAMPLES: TRY IT!!!
➔ R: I will study.
➔ S: I will pass.
➔You're singing.
My ears hurt.
Therefore, you're singing and my ears hurt.
➔Distributivity (DT)
◆ [P v (Q ^ R)] ≡ [(P v Q) ^ (P v R)]
◆ [P ^ (Q v R)] ≡ [(P ^ Q) v (P ^ R)]
THE EQUIVALENCE RULES
➔Idempotency / Tautology (TA)
◆ (P ^ P) ≡P
◆ (P v P) ≡ P
➔Identity (ID)
◆ (P ^ T) ≡P
◆ (P v F) ≡ P
➔ Inverse (IN)
◆ (P ^ ~P) ≡ F
◆ (P v ~P) ≡ T
THE EQUIVALENCE RULES
➔Dominance (DO)
◆ (P ^ F) ≡F
◆ (P v T) ≡ T
➔Absorption (AB)
◆ [P ^ (P v Q)] ≡P
◆ [P v (P ^ Q)] ≡ P
➔ De Morgan's Laws (DM)
◆ ~(P ^ Q) ≡ (~P v ~Q)
◆ ~(P v Q) ≡ (~P ^ ~Q)
THE EQUIVALENCE RULES
➔Contrapositive Law (CL)
◆ (P ➞ Q) ≡ (~Q ➞ ~P)
➔Material Implication (MI)
◆ (P ➞ Q) ≡ (~P v Q)
➔ Material Equivalence (ME)
◆ (P ⟷ Q) ≡ (P ➞ Q) ^ (Q ➞ P)
◆ (P ↔ Q) ≡ (P ^ Q) v (~P ^ ~Q)
➔ Exportation (EX)
◆ [(P ^ Q) ➞ R] ≡ [P ➞ (Q ➞ R)]
EXAMPLE 1
Using the equivalence laws, show that both sides of
the ⟷ are equivalent.
~[~((P v Q) ^ R) v ~Q] ⟷ (Q ^ R)
EXAMPLE 1
Using the equivalence laws, show that both sides of
the ⟷ are equivalent.
~[~((P v Q) ^ R) v ~Q] ⟷ (Q ^ R)
EXAMPLE 1
Using the equivalence laws, show that both sides of
the ⟷ are equivalent.
~[~((P v Q) ^ R) v ~Q]
Justification:
Given
EXAMPLE 1
Using the equivalence laws, show that both sides of
the ⟷ are equivalent.
~[~((P v Q) ^ R) v ~Q]
Justification:
Given
EXAMPLE 1
Using the equivalence laws, show that both sides of
the ⟷ are equivalent.
Justification:
De Morgan's Law
EXAMPLE 1
Using the equivalence laws, show that both sides of
the ⟷ are equivalent.
[((P v Q) ^ R)] ^ Q
Justification:
Double Negation
EXAMPLE 1
Using the equivalence laws, show that both sides of
the ⟷ are equivalent.
[(P v Q) ^ R] ^ Q
EXAMPLE 1
Using the equivalence laws, show that both sides of
the ⟷ are equivalent.
(P v Q) ^ (R ^ Q)
Justification:
Associativity
EXAMPLE 1
Using the equivalence laws, show that both sides of
the ⟷ are equivalent.
(P v Q) ^ (R ^ Q)
EXAMPLE 1
Using the equivalence laws, show that both sides of
the ⟷ are equivalent.
(P v Q) ^ (Q ^ R)
Justification:
Commutativity
EXAMPLE 1
Using the equivalence laws, show that both sides of
the ⟷ are equivalent.
[(P v Q) ^ Q] ^ R
Justification:
Associativity
EXAMPLE 1
Using the equivalence laws, show that both sides of
the ⟷ are equivalent.
[Q ^ (Q v P)] ^ R
Justification:
Commutativity x 2
EXAMPLE 1
Using the equivalence laws, show that both sides of
the ⟷ are equivalent.
Q^R
Justification:
Absorption
EXAMPLE 1 SUMMARY
~[~((P v Q) ^ R) v ~Q] Given
⟷ ~[~((P v Q) ^ R)] ^ ~(~Q) De Morgan's Law
⟷ [((P v Q) ^ R)] ^ Q Double Negation
⟷ (P v Q) ^ (R ^ Q) Associativity
⟷ (P v Q) ^ (Q ^ R) Commutativity
⟷ [(P v Q) ^ Q] ^ R Associativity
⟷ [Q ^ (Q v P)] ^ R Commutativity
⟷Q^R Absorption. QED.
EXAMPLE 2: SIMPLIFYING SWITCHING NETWORKS
(P v Q v R) ^ (P v S v ~Q) ^ (P v ~S v R)
EXAMPLE 2: SIMPLIFYING SWITCHING NETWORKS
(P v Q v R) ^ (P v S v ~Q) ^ (P v ~S v R)
(P v Q v R) ^ (P v S v ~Q) ^ (P v ~S v R)
⟷ P v [(Q v R) ^ (S v ~Q) ^ (~S v R)]
⟷ P v [(Q v R) ^ (~S v R) ^ (S v ~Q)]
⟷ P v [((Q ^ ~S) v R) ^ (S v ~Q)]
⟷ P v [((Q ^ ~S) v R) ^ (~~S v ~Q)]
⟷ P v [((Q ^ ~S) v R) ^ ~(~S ^ Q)]
⟷ P v [((Q ^ ~S) v R) ^ ~(Q ^ ~S)]
⟷ P v [((Q ^ ~S) ^ ~(Q ^ ~S)) v (R ^ ~(Q ^ ~S))]
⟷ P v [F v (R ^ ~(Q ^ ~S))]
⟷ P v [(R ^ ~(Q ^ ~S))]
⟷ P v (R ^ (~Q v S))
METHODS OF PROOF IN PL
Three of the most common proof tehcniques in logic
to prove that an argument is valid are the following:
P→Q
R→S
P v R /∴ Q v S
CHAIN OF REASONING EXAMPLE
1. P → Q
2. R → S
3. P v R /∴ Q v S
--------------------
4. ~P → R 3 MI
CHAIN OF REASONING EXAMPLE
1. P → Q
2. R → S
3. P v R /∴ Q v S
--------------------
4. ~P → R 3 MI
5. ~P → S 4,2 HS
CHAIN OF REASONING EXAMPLE
1. P → Q
2. R → S
3. P v R /∴ Q v S
--------------------
4. ~P → R 3 MI
5. ~P → S 4,2 HS
6. ~S → P 5 CL
CHAIN OF REASONING EXAMPLE
1. P → Q
2. R → S
3. P v R /∴ Q v S
--------------------
4. ~P → R 3 MI
5. ~P → S 4,2 HS
6. ~S → P 5 CL
7. ~S → Q 6,1 HS
CHAIN OF REASONING EXAMPLE
1. P → Q
2. R → S
3. P v R /∴ Q v S
--------------------
4. ~P → R 3 MI
5. ~P → S 4,2 HS
6. ~S → P 5 CL
7. ~S → Q 6,1 HS
8. S v Q 7 MI
CHAIN OF REASONING EXAMPLE
1. P → Q
2. R → S
3. P v R /∴ Q v S
--------------------
4. ~P → R 3 MI
5. ~P → S 4,2 HS
6. ~S → P 5 CL
7. ~S → Q 6,1 HS
8. S v Q 7 MI
9. Q v S 8 CM. QED.
ANOTHER EXAMPLE
Prove: If the exam is easy, then Juan's
score is high. Either the exam is easy
or Juan did not study. Juan cheats
when he is not able to study. Juan did
not cheat. Therefore, Juan's score is
high.
ANOTHER EXAMPLE
1. E→H
2. E v ~S
3. ~S → C
4. ~C /∴ H
------------
ANOTHER EXAMPLE
1. E→H
2. E v ~S
3. ~S → C
4. ~C /∴ H
-----------
5. ~(~S) 3,4 MT
6. E 2,5 DS
7. H 1,6 MP. QED.
RECALL: RULES OF INFERENCE
1. A ^ B /∴ B
2. A v B
~A /∴ B
3. (A → B) /∴ (A → B) v (C ↔ D)
4. ~A → (B ^ C)
~(B ^ C) /∴ ~~A
2. (AvQ)^(BvQ) ≡ (A^B)vQ
3. ~{~[(A→B)v(A^~C)]} ≡ (A→B)v(A^~C)
4. (W^X)→(Pv~Q) ≡ (W^X)→(~QvP)
5. (W^X)→(~QvP) ≡W→(X→(~QvP))
PROOF BY CONTRADICTION
➔ The proof assumes that the premises P1, P2, …, Pn
are true and that the conclusion Q is false, and then
using these assumptions as premises as well as
other previously derived propositions, derives a
contradiction R ^ ~R
➔ Again, justify your steps using the rules of inference
and/or replacement
➔ Premises ^ ~Conclusion → Justification via rules of
inference and/or replacement → Contradiction →
Conclusion
PROOF BY CONTRADICTION EXAMPLE
1. ~P ↔ Q
2. Q → R
3. ~R /∴ P
PROOF BY CONTRADICTION EXAMPLE
1. ~P ↔ Q
2. Q → R
3. ~R /∴ P
-----------
4. ~P Assumption
PROOF BY CONTRADICTION EXAMPLE
1. ~P ↔ Q
2. Q → R
3. ~R /∴ P
-----------
4. ~P PA
5. (~P → Q) ^ (Q → ~P) 1 ME
PROOF BY CONTRADICTION EXAMPLE
1. ~P ↔ Q
2. Q → R
3. ~R /∴ P
-----------
4. ~P PA
5. (~P → Q) ^ (Q → ~P) 1 ME
6. ~P → Q 5 SP
PROOF BY CONTRADICTION EXAMPLE
1. ~P ↔ Q
2. Q → R
3. ~R /∴ P
-----------
4. ~P PA
5. (~P → Q) ^ (Q → ~P) 1 ME
6. ~P → Q 5 SP
7. ~P → R 6,2 HS
PROOF BY CONTRADICTION EXAMPLE
1. ~P ↔ Q
2. Q → R
3. ~R /∴ P
-----------
4. ~P PA
5. (~P → Q) ^ (Q → ~P) 1 ME
6. ~P → Q 5 SP
7. ~P → R 6,2 HS
8. R 7,4 MP
PROOF BY CONTRADICTION EXAMPLE
1. ~P ↔ Q
2. Q → R
3. ~R /∴ P
-----------
4. ~P PA
5. (~P → Q) ^ (Q → ~P) 1 ME
6. ~P → Q 5 SP
7. ~P → R 6,2 HS
8. R 7,4 MP
9. R ^ ~R 8,3 CJ
PROOF BY CONTRADICTION EXAMPLE
1. ~P ↔ Q
2. Q → R
3. ~R /∴ P
-----------
4. ~P PA
5. (~P → Q) ^ (Q → ~P) 1 ME
6. ~P → Q 5 SP
7. ~P → R 6,2 HS
8. R 7,4 MP
9. R ^ ~R 8,3 CJ
10.P 9 CONTRADICTION. QED
MATHEMATICS EXAMPLE
Theorem: For all real numbers x and y, if x + y >= 2, then
either x >= 1 or y >= 1.
A → (C → B)
~(D ^ ~A)
CvC
------------------
∴D→B
PROOF BY RESOLUTION EXAMPLE
Prove:
A → (C → B) ≡ A → (~C v B) ≡ (~A v ~C v B)
~(D ^ ~A) ≡ ~D v ~(~A) ≡ (~D v A)
CvC ≡ C
-----------------
D→B
(~A v ~C v B)
(~D v A)
C
-----------------
D→B
~(D → B) ≡ ~(~D v B) ≡ D ^ ~B ≡ D
Assumption
~B
DISCRETE
STRUCTURES