Logic Strand Lecture 3
Logic Strand Lecture 3
Logic Strand Lecture 3
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
1.5.2. Contradiction<br />
Definition: Contradiction.<br />
Any statement that is false regardless of the truth values of<br />
the constituent parts is called a contradiction or<br />
contradictory statement.<br />
Examples:<br />
Complete the truth table for the statement<br />
~ ( P ∧ Q)<br />
⇔<br />
( Q ∧ P)<br />
P Q ~ (P ∧ Q) ⇔ (Q ∧ P)<br />
T T F T F T<br />
T F T F F F<br />
F T T F F F<br />
F F T F F F<br />
Step: 2 1 4* 3<br />
WUCT121 <strong>Logic</strong> 43
Exercises:<br />
• Complete the truth table for the statement<br />
~ ( P ∨ Q)<br />
∧ P to show it is a contradiction.<br />
P Q ~(P ∨ Q) ∧ P<br />
Step:<br />
• Complete the truth table for the statement<br />
( P ∧ Q)<br />
∧ ~ Q to show it is a contradiction.<br />
P Q (P ∧ Q) ∧ ~Q)<br />
Step:<br />
WUCT121 <strong>Logic</strong> 44
1.5.2.1 Quick Method for Showing a<br />
Contradiction<br />
The quick method for determining if a compound statement<br />
is a tautology can be used similarly for showing a<br />
contradiction.<br />
The quick method relies on the fact that if a truth value of<br />
“T” can occur under the main connective (for some<br />
combination of truth values for the components), then the<br />
statement is not a contradiction. If this truth value is not<br />
possible, then we have a contradiction.<br />
Therefore, to determine whether a statement is a<br />
contradiction, we place a “T” under the main connective<br />
and work backwards.<br />
WUCT121 <strong>Logic</strong> 45
Example:<br />
• Use the “quick” method for the statement<br />
~ ( P ∨ Q)<br />
∧ P to determine if it is a contradiction.<br />
~ (P ∨ Q) ∧ P<br />
Step: 2 1 3*<br />
1.Place “T” under main<br />
connective<br />
T<br />
2. For “T” to occur<br />
under the main<br />
connective, ~ must be<br />
“T” and P must be “T”<br />
T<br />
T<br />
3. For “T” to occur<br />
under ~,<br />
“F”.<br />
P ∨ Q must be<br />
F<br />
4. For “F” to occur<br />
under P ∨ Q, P must be<br />
“F” and Q must be “F”<br />
F<br />
F<br />
P cannot be both “T” and “F”, thus ~ ( P ∨ Q)<br />
∧ P can only<br />
ever be false and is a contradiction.<br />
WUCT121 <strong>Logic</strong> 46
Exercise:<br />
• Use the “quick” method for the statement<br />
( P ∧ Q)<br />
∧ ~ Q to determine if it is a contradiction.<br />
Step:<br />
1.<br />
(P ∧ Q) ∧ ~Q<br />
2<br />
3<br />
WUCT121 <strong>Logic</strong> 47
1.5.3. Contingent<br />
Definition: Contingent.<br />
Any statement that is neither a tautology nor a<br />
contradiction is called a contingent or intermediate<br />
statement.<br />
Examples:<br />
Complete the truth table for the statement Q ∨ ( Q ⇒ P)<br />
P Q Q ∨ (Q ⇒ P)<br />
T T T T<br />
T F T T<br />
F T F F<br />
F F T T<br />
Step: 2* 1<br />
WUCT121 <strong>Logic</strong> 48
Exercises:<br />
• Complete the truth table for the statement<br />
( p r) ⇒ ( p ∧ q)<br />
∨ to show it is contingent.<br />
p q r (p ∨ r) ⇒ (p ∧ q)<br />
Step:<br />
• Complete the truth table for the statement<br />
(( p ∧ ~ q)<br />
∨ r) ⇔ ( r ⇒ q)<br />
~ to show it is contingent.<br />
p q r ~( (p ∧ ~ q) ∨ r) ⇔ (r ⇒ q)<br />
Step:<br />
WUCT121 <strong>Logic</strong> 49
1.6. <strong>Logic</strong>al Equivalence<br />
Definition: <strong>Logic</strong>al Equivalence.<br />
Two statements are logically equivalent if, and only if, they<br />
have identical truth values for each possible substitution of<br />
statements for their statements variables.<br />
The logical equivalence of two statements P and Q is<br />
denoted<br />
P ≡ Q.<br />
If two statements P and Q are logically equivalent then<br />
P ⇔ Q is a tautology<br />
1.6.1. Determining <strong>Logic</strong>al Equivalence.<br />
To determine if two statements P and Q are logically<br />
equivalent, construct a full truth table for each statement. If<br />
their truth values at the main connective are identical, the<br />
statements are equivalent.<br />
Alternatively show<br />
conclude<br />
P ≡ Q.<br />
P ⇔ Q is a tautology and hence<br />
WUCT121 <strong>Logic</strong> 50
Examples:<br />
• Determine if the following statements are logically<br />
equivalent. P : p ⇒ q,<br />
Q :~ p ∨ q<br />
p q p ⇒ q ~p ∨ q<br />
T T T F T<br />
T F F F F<br />
F T T T T<br />
F F T T T<br />
Step: 1* 1 2*<br />
Since the main connectives * are identical, the statements P<br />
and Q are equivalent. Thus P<br />
≡ Q i.e. p ⇒ q ≡~<br />
p ∨ q<br />
• Determine if the following statements are logically<br />
equivalent. P :~ ( p ∧ q),<br />
Q :~ p∧<br />
~ q<br />
p q ~( p ∧ q) ~p ∧ ~q<br />
T T F T F F F<br />
T F T F F F T<br />
F T T F T F F<br />
F F T F T T T<br />
Step: 2* 1 1 2* 1<br />
Since the main connectives * are not identical, the<br />
statements P and Q are not equivalent.<br />
WUCT121 <strong>Logic</strong> 51
Exercises:<br />
• Determine if the following statements are logically<br />
equivalent. P :~ ( p ∨ q),<br />
Q :~ p∧<br />
~ q<br />
p q ~( p ∨ q) ~p ∧ ~q<br />
Step:<br />
• Determine if ~ ( p ∧ q)<br />
⇔~<br />
p∨<br />
~ q is a tautology, and<br />
hence if ~ ( p ∧ q)<br />
≡~<br />
p∨<br />
~ q .<br />
p q ~( p ∧ q) ⇔ ~p ∨ ~q<br />
Step:<br />
WUCT121 <strong>Logic</strong> 52
1.6.2. Substitution<br />
There are two different types of substitution into<br />
statements.<br />
Rule of Substitution: If in a tautology all occurrences of a<br />
variable are replaced by a statement, the result is still a<br />
tautology.<br />
Examples:<br />
• We know P ∨ ~ P is a tautology.<br />
Thus, by the rule of substitution, so too are:<br />
∗<br />
Q ∨ ~ Q, by letting Q = P.<br />
∗ (( p ∧ q)<br />
⇒ r)<br />
∨ ~ (( p ∧ q)<br />
⇒ r)<br />
, by letting<br />
( p ∧ q)<br />
⇒ r = P .<br />
Note: We have simply replaced every occurrence of P in<br />
the tautology<br />
P ∨ ~<br />
P , by some other statement.<br />
WUCT121 <strong>Logic</strong> 53
Rule of Substitution of Equivalence: If in a tautology we<br />
replace any part of a statement by a statement equivalent to<br />
that part, the result is still a tautology.<br />
Example:<br />
• Determine if P ⇒ (~ Q ∨ P)<br />
is a tautology.<br />
We know: P ⇒ ( Q ⇒ P)<br />
is a tautology and<br />
( P ⇒ Q)<br />
≡~<br />
P ∨ Q<br />
By the rule of substitution<br />
( Q ⇒ P)<br />
≡~<br />
Q ∨ P<br />
Thus, by the rule of substitution of equivalence,<br />
P ⇒ ( Q ⇒ P)<br />
≡ P ⇒ (~ Q ∨ P)<br />
, and hence<br />
P ⇒ (~ Q ∨ P) is also a tautology.<br />
Exercise:<br />
• ~ T ∨ (~ S ∨ T ) a tautology? Yes.<br />
We know ( P ⇒ Q)<br />
≡~<br />
P ∨ Q. So, ( S ⇒ T ) ≡~<br />
S ∨ T and<br />
T ⇒ (~ S ∨ T ) ≡~<br />
T ∨ (~ S ∨ T ) (by RoS).<br />
Hence, ~ T ∨ (~ S ∨ T ) ≡ T ⇒ ( S ⇒ T ) (by SoE).<br />
P ⇒ ( Q ⇒ P) is a known tautology, thus (by (SoE)<br />
T ⇒ ( S ⇒ T ) is a tautology, and since<br />
~ T ∨ (~ S ∨ T ) ≡ T ⇒ ( S ⇒ T ), ~ T ∨ (~ S ∨ T ) is a<br />
tautology.<br />
WUCT121 <strong>Logic</strong> 54
1.6.3. Laws<br />
The following logical equivalences hold:<br />
1. Commutative Laws:<br />
• ( P ∨ Q)<br />
≡ ( Q ∨<br />
• ( P ∧ Q)<br />
≡ ( Q ∧ P)<br />
• ( P<br />
P)<br />
⇔ Q)<br />
≡ ( Q ⇔<br />
P)<br />
2. Associative Laws:<br />
• ((<br />
P ∨ Q)<br />
∨ R) ≡ ( P ∨ ( Q ∨ R)<br />
)<br />
• ((<br />
P ∧ Q)<br />
∧ R) ≡ ( P ∧ ( Q ∧ R)<br />
)<br />
• ((<br />
P ⇔ Q)<br />
⇔ R) ≡ ( P ⇔ ( Q ⇔ R)<br />
)<br />
3. Distributive Laws:<br />
• ( P ∨ ( Q ∧ R)<br />
) ≡ ((<br />
P ∨ Q)<br />
∧ ( P ∨ R)<br />
)<br />
• ( P ∧ ( Q ∨ R)<br />
) ≡ ((<br />
P ∧ Q)<br />
∨ ( P ∧ R)<br />
)<br />
4. Double Negation (Involution) Law:<br />
• ~~<br />
P ≡<br />
P<br />
5. De Morgan’s Laws:<br />
• ~ ( P ∨ Q)<br />
≡<br />
(~<br />
• ~ ( P ∧ Q)<br />
≡ (~<br />
P∧<br />
P∨<br />
~<br />
~<br />
Q)<br />
Q)<br />
WUCT121 <strong>Logic</strong> 55
6. Implication Laws:<br />
• ( P ⇒ Q)<br />
≡<br />
• ( P<br />
⇔ Q)<br />
≡<br />
7. Identity Laws:<br />
• ( P ∨<br />
F ) ≡<br />
• ( P ∧ T ) ≡<br />
P<br />
( ~ P ∨ Q)<br />
(Implication)<br />
((<br />
P ⇒ Q)<br />
∧ ( Q ⇒ P)<br />
) (Biconditional)<br />
P<br />
8. Negation (Complement) Laws:<br />
• ( P∨<br />
• ( P∧<br />
~ P)<br />
≡ T<br />
~ P)<br />
≡<br />
F<br />
9. Dominance Laws:<br />
• ( P ∨ T )<br />
≡ T<br />
• ( P ∧ F ) ≡<br />
F<br />
10. Idempotent Laws:<br />
• ( P ∨<br />
P)<br />
≡<br />
• ( P ∧ P)<br />
≡<br />
P<br />
P<br />
11. Absorption Laws:<br />
• P ∧ ( P ∨ Q)<br />
≡ P<br />
• P ∨ ( P ∧ Q)<br />
≡ P<br />
12. Property of Implication:<br />
• ( P ⇒ ( Q ∧ R)<br />
) ≡ ((<br />
P ⇒ Q)<br />
∧ ( P ⇒ R)<br />
)<br />
• ((<br />
P ∨ Q)<br />
⇒ R) ≡ ((<br />
P ⇒ R)<br />
∧ ( Q ⇒ R)<br />
)<br />
WUCT121 <strong>Logic</strong> 56
Example:<br />
Prove the first of De Morgan’s Laws using truth tables.<br />
P Q ~( P ∨ Q) ~P ∧ ~Q<br />
T T F T F F F<br />
T F F T F F T<br />
F T F T T F F<br />
F F T F T T T<br />
Step: 2* 1 1 2* 1<br />
Since the main connectives are identical, the statements are<br />
equivalent, and first of De Morgan’s Laws is true.<br />
Exercise:<br />
Prove the second of De Morgan’s Laws using truth tables.<br />
P Q ~( P ∧ Q) ~P ∨ ~Q<br />
Step:<br />
Since the main connectives are identical, the statements are<br />
equivalent, and second of De Morgan’s Laws is true.<br />
WUCT121 <strong>Logic</strong> 57
Example:<br />
Using logically equivalent statements, without the direct<br />
use of truth tables, show: ~ ( ~ p ∧ q) ∧ ( p ∨ q) ≡ p<br />
~<br />
( ~ p ∧ q) ∧ ( p ∨ q) ≡ ( ~ ( ~ p)<br />
∨ ~ q) ∧ ( p ∨ q) ( De Morgan)<br />
≡ ( p ∨ ~ q) ∧ ( p ∨ q) ( Double Negation)<br />
≡ p ∨ ( ~ q ∧ q) ( Distributivity)<br />
≡ p ∨ ( q ∧ ~ q) ( Commutativity)<br />
≡ p ∨ F<br />
( Negation)<br />
≡ p<br />
( Identity)<br />
Exercises:<br />
Using logically equivalent statements, without the direct<br />
use of truth tables, show:<br />
• ~ ( p ⇔ q) ≡ ( p ∧ ~ q) ∨ ( q ∧ ~ p)<br />
WUCT121 <strong>Logic</strong> 58
• ( p ⇒ q) ≡ ( ~ q ⇒~<br />
p)<br />
• p ⇒ ( q ∧ r)<br />
≡ ( p ⇒ q)<br />
∧ ( p ⇒ r)<br />
, without using the<br />
property of implication<br />
WUCT121 <strong>Logic</strong> 59