MATH 705
Set Theory and Logic
Module 3
A
LGEBRA OF LOGIC
Objectives
After studying this module, you should be able to:
1. use the rules of replacement to show that arguments are logically equivalent; and
2. use the rules of inference to specify conclusions which can be drawn from
assertions known or assumed to be true.
Introduction
This module provides a complete list of the basic rules of replacement. The
learners must observe that the equivalent propositions dealt with in the previous chapter
using truth table are actually tautologies using the rules of replacement. Furthermore, to
have systematic and precise way of proving the validity of arguments, additional rules of
equivalence are needed – the rules of inference.
Rules of Replacement
Any of the following logically equivalent expressions can replace each other
wherever they occur.
1. Idempotence (Idemp.)
P (P P)
P (P P)
2. Commutativity (Comm.)
(P Q) (Q P)
(P Q) (Q P)
Module 2: Algebra of Logic
22
MATH 705
Set Theory and Logic
3. Associativity (Assoc.)
(P Q) R P (Q R)
(P Q) R P (Q R)
4. De Morgan’s Laws (De M)
~(P Q) (~P ~Q)
~(P Q) (~P ~Q)
5. Distributivity (Dist.)
[P (Q R)] [(P Q) (P R)]
[P (Q R)] [(P Q) (P R)]
6. Double Negation (D.N.)
P ~ (~P)
7. Material Implication (M.I.)
(P Q) (~P Q)
8. Material Equivalence (M.E.)
(P Q) [(P Q) (Q P)]
(P Q) [(P Q) (~P ~Q)]
9. Exportation (Exp.)
[(P Q) R] [P (Q R)]
10. Absurdity (Abs.)
[(P Q) (P ~Q)] ~P
11. Transportation (Trans.)
(P Q) (~Q ~P)
12. Absorption (Absorp.)
[P (P Q)] P
13. Identities (Iden.)
~t f
~f t
(P t) t
(P t) P
(P ~P) t
(P f) P
(P f) f
(P ~P) f
Module 2: Algebra of Logic
23
MATH 705
Set Theory and Logic
Example:
State the rule of replacement used in each of the following statement.
a) P Q (P Q) (P Q)
Idempotence
b) M (N P) (M N) P
Associativity
c) ~[~(A B)] A B
Double Negation
d) (K L) (~K ~L) K L
Material Equivalence
e) (R S) [(R S) P] R S
Absorption
f)
Distributivity
(X Y) (X Z) X (Y Z)
g) [(A B) (B C)] ~C (A B) [(B C) ~C] Exportation
Example:
Negate the following expressions and use the Rules of Replacement to give the
equivalent expression of the negation.
a) ~P
; ~(~P) P by double negation
b) P Q
; ~(P Q) ~P ~Q by De Morgan’s Law
c) P Q
; ~(P Q) ~P ~Q by De Morgan’s Law
d) P Q
; ~(P Q) ~(~P Q) by Material Implication
(~~P ~Q) by Double Negation
(P ~Q) by Double Negation
e) P Q
; ~(P Q) ~[(P Q) (Q P)] by Material Equivalence
~(P Q) ~(Q P)by De Morgan’s Law
(P ~Q) (Q ~P) by Material Implication
Wait! … pause for a while, answer first the following question.
SAQ1
Simplify the following statement,
The following statement is not true: “Either he is here and she is there, or it is not
true that either he is not here or she is there.”
Module 2: Algebra of Logic
24
MATH 705
Set Theory and Logic
ASAQ1
Letting H be “He is here” and S be “She is there”, the above statement can be
symbolized into ~[(H S) ~(~H S)]. Thus,
~[(H S) ~(~H S)]
~[(H S) (~~H ~S)]
De Morgan’s Law
~[(H S) (H ~S)]
Double Negation
~[H (S ~S)]
Distributivity
~[(H t)]
Identity
~H
Identity
Therefore, the simplified statement is “He is not here.”
(Problem lifted from the book, Introduction to Set Theory and Logic by Auxencia A.
Limjap)
Rules of Inference
The rules of inference specify conclusions which can be drawn from assertions
known or assumed to be true. These rules are called by special names and are stated in
argument form as follows:
1. Addition (Add.)
P
P Q
2. Simplification (Simp.)
PQ
P
3. Conjunction (Conj.)
P
Q
PQ
Module 2: Algebra of Logic
25
MATH 705
4. Modus Ponens (M.P.)
Set Theory and Logic
PQ
P
Q
5. Modus Tolens (M.T.)
PQ
~Q
~P
6. Disjunctive Syllogism (D.S.)
PQ
~P
Q
7. Hypothetical Syllogism (H.S.)
PQ
QR
P R
8. Constructive Dilemma (C.D.)
(P Q) (R S)
PR
QS
9. Destructive Dilemma (D.D)
(P Q) (R S)
~Q ~S
~P ~R
All of these rules allow us to make conclusions from the given premises. As an
example, the rule of hypothetical syllogism justifies our previous example in Module II.
That is,
If you are a bachelor, then you are unhappy.
If you are unhappy, then you die young.
Therefore, if you are a bachelor, then you die young.
Module 2: Algebra of Logic
26
MATH 705
Set Theory and Logic
This can be symbolized as an argument which takes the form of a hypothetical
syllogism
BU
UD
B D
and can be shown to be tautology.
Let
P1 = (B U),
P2 = (U D),
P3 = (B D),
P4 = (B U) (U D),
and P5 = (B U) (U D) (B D)
B
U
D
P1
P2
P3
P4
P5
T
T
T
T
T
T
T
T
T
T
F
T
F
F
F
T
T
F
T
F
T
T
F
T
T
F
F
F
T
F
F
T
F
T
T
T
T
T
T
T
F
T
F
T
F
T
F
T
F
F
T
T
T
T
T
T
F
F
F
T
T
T
T
T
P5 tells us that the propositional form is a tautology. At this point, we will accept
all other rules of inference without verification. We claim that all these rules are valid
arguments and can be used to prove the validity of an argument.
Example:
Construct a formal proof of validity for the following argument.
(A B) [A (D E)]
(A B) C
D E
Module 2: Algebra of Logic
27
MATH 705
Set Theory and Logic
Proof
1. (A B) [A (D E)]
2. (A B) C
/D E
3. (A B)
2 Simp.
4. A (D E)
1,3 M.P.
5. A
3 Simp.
6. D E
4,5 M.P.
7. D
6 Simp.
8. D E
7 Add
Wait! … pause for a while, answer first the following questions.
SAQ2
For each of the following arguments, state the Rule of Inference by which its conclusion
follows from its premise or premises.
a) A (B ~C)
b) (E ~F) (~G ~H)
(B ~C) D
E ~F
A D
~G ~H
c) (I J) (K L)
d) M ~N
~(I J)
~N O
K L
(M ~N) (~N O)
e) [A (B C)] [(D E) ~F]
~[(D E) ~F]
~[A (B C)]
ASAQ2
a) Hypothetical Syllogism
b) Modus Ponens
c) Disjunctive Syllogism
d) Conjunction
e) Modus Tolens
Module 2: Algebra of Logic
28
MATH 705
Set Theory and Logic
SAQ3
Construct a formal proof of validity for the following argument.
A (B C)
~A [(D E) (F G)]
(B C) [(~A D) (~A F)]
~(B C) ~(G D)
E G
ASAQ3
1. A (B C)
2. ~A [(D E) (F G)]
3. (B C) [(~A D) (~A F)]
4. ~(B C) ~(G D)
/E G
5. ~(B C)
4 Simp.
6. (~A D) (~A F)
3,5 D.S.
7. ~A
1,5 M.T.
8. (D E) (F G)
2,7 M.P.
9. (A D) (A F)
6 M.I.
10. A (D F)
9 Dist.
11. D F
10,7 D.S.
12. D
11 Simp.
13. D F
12 Add
14. E G
8,13 C.D.
Note: The proof that we employ using the definition of valid arguments is what we call
the direct proof.
Module 2: Algebra of Logic
29
MATH 705
Set Theory and Logic
Activity No. 3
1. Supply the reason for each step in deriving the following equivalent expressions:
{A [~(~A B)]} (A B)
{A [~(~A) ~ B]} (A B) ___________________
{A [(A ~B)]} (A B)
___________________
{(A A) ~B} (A B)
___________________
(A ~B) (A B)
___________________
A (~B B)
___________________
At
___________________
A
___________________
2. With the use of the Rules of Replacement, simplify the following expression.
(P ~P) (~P P)
Module 2: Algebra of Logic
30
MATH 705
Set Theory and Logic
3. Write a formal proof of validity for the following arguments.
a) 1. M N
b) 1. ~A [(BC) (DC)]
2. N Q
2. A (B D)
/C
3. (MQ) (NP)
4. (MP) R
c) 1. (A B) (C D)
2. A ~A /C
/R
d) 1. A B
2. C B
3. D (A C)
4. D / B
Module 2: Algebra of Logic
31
MATH 705
e) 1. (P C) M
Set Theory and Logic
f. 1. A (B C)
2. M N
2. D (B C)
3. N (O U) /(P C) U
3. (~A ~D) (~E ~F)
4. (~E ~G) (~F ~H)
5. (I G) (J H)
6. ~(B C) / ~I ~J
Module 2: Algebra of Logic
32
© Copyright 2026 Paperzz