Laws of Logic and Theorems on Set Operations
Some definitions before studying the laws of logic
-
Tautology: A compound statement that is always true regardless of its components is known as tautology.
For example: 2 + 2 = 4 or 2 + 3 = 6. -
Contradiction: A compound statement that is always false regardless of its components is known as contradiction.
For example: 2 + 2 = 4 and 2 + 3 = 6. -
Converse: Let p and q be two statements. Then, the converse of p ⇒ q is q ⇒ p.
For example:
Given statement: If a > 0, then a + 2 > 0.
Converse: If a + 2 > 0, then a > 0. -
Inverse: Let p and q be two statements. Then, the inverse of p ⇒ q is ~p ⇒ ~q.
For example:
Given statement: If a > 0, then a + 2 > 0.
Inverse: If a < 0, then a + 2 < 0. -
Contrapositive: Let p and q be two statements. Then, the contrapositive of p ⇒ q is ~q ⇒ ~p.
For example:
Given statement: If a > 0, then a + 2 > 0.
Contrapositive: If a + 2 < 0, then a < 0. -
Logically Equivalent: Two statements S1 and S2 are said to be logically equivalent if both have the same truth values in the columns of the truth table. They are denoted by S1 ≡ S2
For example:
p t p ∨ t T T T F T T
Basic Laws of Logic
-
Idempotent Laws:
- p ∧ p ≡ p
- p ∨ p ≡ p
-
Commutative Laws:
- p ∧ q ≡ q ∧ p
- p ∨ q ≡ q ∨ p
-
Associative Laws:
- p ∧ (q ∧ r) ≡ (p ∧ q) ∧ r
- p ∨ (q ∨ r) ≡ (p ∨ q) ∨ r
-
Distributive Laws:
- p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
- p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)
-
De Morgan's Laws:
- ~(p ∧ q) ≡ (~p ∨ ~q)
- ~(p ∨ q) ≡ (~p ∧ ~q)
Verification of the Laws of Logic
p ∧ p ≡ p (Idempotent Law)
p | p | p ∧ p |
T | T | T |
F | F | F |
p ∨ p ≡ p (Idempotent Law)
p | p | p ∨ p |
T | T | T |
F | F | F |
p ∧ q ≡ q ∧ p (Commutative Law)
p | q | p ∧ q | q ∧ p |
---|---|---|---|
T | T | T | T |
T | F | F | F |
F | T | F | F |
F | F | F | F |
p ∨ q ≡ q ∨ p (Commutative Law)
p | q | p ∨ q | q ∨ p |
---|---|---|---|
T | T | T | T |
T | F | T | T |
F | T | T | T |
F | F | F | F |
p ∧ (q ∧ r) ≡ (p ∧ q) ∧ r (Associative Law)
p | q | r | q ∧ r | p ∧ q | p ∧ (q ∧ r) | (p ∧ q) ∧ r |
---|---|---|---|---|---|---|
T | T | T | T | T | T | T |
T | T | F | F | T | F | F |
T | F | T | F | F | F | F |
T | F | F | F | F | F | F |
F | T | T | T | F | F | F |
F | T | F | F | F | F | F |
F | F | T | F | F | F | F |
F | F | F | F | F | F | F |
Columns of both p ∧ (q ∧ r) and (p ∧ q) ∧ r have the same truth values. Hence, p ∧ (q ∧ r) ≡ (p ∧ q) ∧ r.
Note: Use the 2n formula to find out how many T&Fs are to be filled in the columns. Where n means a number of different statements. In the above question, 2n = 23 = 8.
p ∨ (q ∨ r) ≡ (p ∨ q) ∨ r (Associative Law)
p | q | r | q ∨ r | p ∨ q | p ∨ (q ∨ r) | (p ∨ q) ∨ r |
---|---|---|---|---|---|---|
T | T | T | T | T | T | T |
T | T | F | T | T | T | T |
T | F | T | T | T | T | T |
T | F | F | F | T | T | T |
F | T | T | T | T | T | T |
F | T | F | T | T | T | T |
F | F | T | T | F | T | T |
F | F | F | F | F | F | F |
Columns of both p ∨ (q ∨ r) and (p ∨ q) ∨ r have the same truth values. Hence, p ∨ (q ∨ r) ≡ (p ∨ q) ∨ r.
p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
p | q | r | q ∨ r | p ∧ q | p ∧ r | p ∧ (q ∨ r) | (p ∧ q) ∨ (p ∧ r) |
---|---|---|---|---|---|---|---|
T | T | T | T | T | T | T | T |
T | T | F | T | T | F | T | T |
T | F | T | T | F | T | T | T |
T | F | F | F | F | F | F | F |
F | T | T | T | F | F | F | F |
F | T | F | T | F | F | F | F |
F | F | T | T | F | F | F | F |
F | F | F | F | F | F | F | F |
Columns of both p ∧ (q ∨ r) and (p ∧ q) ∨ (p ∧ r) have the same truth values. Hence, p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r).