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