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 pq is qp.
    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 pq 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 pq 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 pt
    T T T
    F T T
    From the above table, tpt

Basic Laws of Logic

  • Idempotent Laws:
    1. p ∧ p ≡ p
    2. p ∨ p ≡ p
  • Commutative Laws:
    1. p ∧ q ≡ q ∧ p
    2. p ∨ q ≡ q ∨ p
  • Associative Laws:
    1. p ∧ (q ∧ r) ≡ (p ∧ q) ∧ r
    2. p ∨ (q ∨ r) ≡ (p ∨ q) ∨ r
  • Distributive Laws:
    1. p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
    2. p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)
  • De Morgan's Laws:
    1. ~(p ∧ q) ≡ (~p ∨ ~q)
    2. ~(p ∨ q) ≡ (~p ∧ ~q)

Verification of the Laws of Logic

p ∧ p ≡ p (Idempotent Law)

Using the truth table,
p p p ∧ p
T T T
F F F
Columns of both p ∧ p and p have the same truth values. Hence, p ∧ p ≡ p.

p ∨ p ≡ p (Idempotent Law)

Using the truth table,
p p p ∨ p
T T T
F F F
Columns of both p ∨ p and p have the same truth values. Hence, p ∨ p ≡ p.

p ∧ q ≡ q ∧ p (Commutative Law)

Using the truth table,
p q p ∧ q q ∧ p
T T T T
T F F F
F T F F
F F F F
Columns of both p ∧ q and q ∧ p have the same truth values. Hence, p ∧ q ≡ q ∧ p.

p ∨ q ≡ q ∨ p (Commutative Law)

Using the truth table,
p q p ∨ q q ∨ p
T T T T
T F T T
F T T T
F F F F
Columns of both p ∨ q and q ∨ p have the same truth values. Hence, p ∧ q ≡ q ∧ p.

p ∧ (q ∧ r) ≡ (p ∧ q) ∧ r (Associative Law)

Using the truth table,
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)

Using the truth table,
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)

Using the truth table,
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).