3. Truth table for the statement form ~ p q
p q ~p ~ p q
T T F F
T F F F
F T T T
F F T F
4. Truth table for ~ p (q ~ r)
p q r ~ r q ~ r ~ p ~ p (q ~ r)
T T T F T F F
T T F T T F F
T F T F F F F
T F F T T F F
F T T F T T T
F T F T T T T
F F T F F T F
F F F T T T T
5. Truth table for (p q) ~ (p q)
p q p q p q ~ (pq) (p q) ~ (p q)
T T T T F F
T F T F T T
F T T F T T
F F F F T F
7. Example:
“It is not true that I am not happy”
Prove it double negation property for the above
statement ~ (~p) p
Solution:
Let p = “I am happy”
Then ~p = “I am not happy”
and ~(~ p) = “It is not true that I am not happy”
Since ~ (~p) p
Hence the given statement is equivalent to:
“I am happy”
8. ~ (p q) and ~p ~q are not logically
equivalent
9. ~ (p q) and ~p ~q are not logically
equivalent
p q ~p ~q p q ~(pq) ~p ~q
T T F F T F F
T F F T F T F
F T T F F T F
F F T T F T T
10. DE MORGAN’S LAWS:
The negation of an and statement is logically
equivalent to the or statement in which each
component is negated.
Symbolically: ~(p q) ~p ~q.
The negation of an or statement is logically
equivalent to the and statement in which each
component is negated.
Symbolically: ~(p q) ~p ~q.
12. Truth Table for ~(p q) ~p ~q
p q ~p ~q p q ~(p q) ~p ~q
T T F F T F F
T F F T T F F
F T T F T F F
F F T T F T T
13. Application of De morgan’s Law using
statements:
Give negations for each of the following
statements:
The fan is slow or it is very hot.
Akram is unfit and Saleem is injured.
Solution: ?
14. Application of De morgan’s Law using
statements:
Give negations for each of the following
statements:
The fan is slow or it is very hot.
Akram is unfit and Saleem is injured.
Solution:
The fan is not slow and it is not very hot.
Akram is not unfit or Saleem is not injured.
15. Exercise:
Associative Law
Are the statements (p q) r p (q r) logically
equivalent?
Are the statements (p q) r p (q r) logically
equivalent?
16. TAUTOLOGY:
A tautology is a statement form that is always true
regardless of the truth values of the statement
variables.
A tautology is represented by the symbol “T”..
EXAMPLE:
The statement form p ~ p is tautology
p ~p t
p ~ p p ~ p
T F T
F T T
17. CONTRADICTION:
A contradiction is a statement form that is always
false regardless of the truth values of the statement
variables.
A contradiction is represented by the symbol “c”.
Note:
So if we have to prove that a given statement form is
CONTRADICTION we will make the truth table for
the statement form and if in the column of the given
statement form all the entries are F ,then we say that
statement form is contradiction.
18. EXAMPLE:
The statement form p ~ p is a contradiction.
Since in the last column in the truth table we have F
in all the entries so is a contradiction
p ~p c
p ~ p p ~ p
T F F
F T F
19. REMARKS:
Most statements are neither tautologies nor
contradictions.
The negation of a tautology is a contradiction and vice
versa.
20. LOGICAL EQUIVALENCE INVOLVING
TAUTOLOGY
Show that p t p
Since in the above table the entries in the first and
last columns are identical so we have the
corresponding statement forms are Logically
Equivalent that is
p t p
p t p t
T T T
F T F
22. EXERCISE:
Use truth table to show that (p q) (~p (p ~q))
is a tautology.
Use truth table to show that (p ~q) (~p q) is a
contradiction.
23. INEQUALITIES AND DEMORGAN’S LAWS
Use De-Morgan’s Laws to write the negation of
-1 < x 4
-1 < x 4 means x > –1 and x 4
By DeMorgan’s Law, the negation is:
Which is equivalent to: x –1 or x > 4
24. LAWS OF LOGIC
Given any statement variables p, q and r, a tautology
t and a contradiction c, the following logical
equivalences hold:
Commutative Laws: p q q p
p q q p
Associative Laws: (p q) r p (q r)
(p q) r p (q r)
25. Distributive Law: p (q r) (p q) (p r)
p (q r) (p q) (p r)
Identity Laws: p t p
p c p
Negation Laws: p ~ p t
p ~ p c
26. Double Negation Law: ~ (~p) p
Idempotent Laws: p p p
p p p
De Morgan’s Laws: ~(p q) ~p ~q
~(p q) ~p ~q
27. Universal Bound Law: p t t
p c c
Absorptions Laws: p (p q) p
p (p q) p
Negation of t and c: ~ t c
~ c t