Truth table forthe 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
Example:
“It isnot 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
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
9.
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.
10.
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
11.
Application of Demorgan’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.
12.
Exercise:
Associative Law
Arethe statements (p q) r p (q r)?
Are the statements (p q) r p (q r) logically
equivalent?
13.
TAUTOLOGY:
A tautologyis 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
14.
CONTRADICTION:
A contradictionis 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.
15.
EXAMPLE:
The statementform 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
16.
REMARKS:
Most statementsare neither tautologies nor contradictions.
The negation of a tautology is a contradiction and vice versa.
17.
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
EXERCISE:
Use truthtable to show that (p q) (~p (p
~q)) is a tautology.
Use truth table to show that (p ~q) (~p q) is a
contradiction.
20.
INEQUALITIES AND DEMORGAN’SLAWS
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
21.
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)
22.
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
23.
Double NegationLaw: ~ (~p) p
Idempotent Laws: p p p
p p p
De Morgan’s Laws: ~(p q) ~p ~q
~(p q) ~p ~q
24.
Universal BoundLaw: 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