1 CM1 - Logic-2
1 CM1 - Logic-2
Logic
1
2 FUNDAMENTALS OF MATHEMATICAL LOGIC
p:1+1=3
Example 1.1
Which of the following are propositions? Give the truth value of the propo-
sitions.
(a) 2 + 3 = 7.
(b) Julius Caesar was president of the United States.
(c) What time is it?
(d) Be quiet !
Solution.
(a) A proposition with truth value (F).
(b) A proposition with truth value (F).
(c) Not a proposition since no truth value can be assigned to this statement.
(d) Not a proposition
Example 1.2
Which of the following are propositions? Give the truth value of the propo-
sitions.
(a) The difference of two primes.
(b) 2 + 2 = 4.
(c) Washington D.C. is the capital of New York.
(d) How are you?
Solution.
(a) Not a proposition.
(b) A proposition with truth value (T).
(c) A proposition with truth value (F).
1 PROPOSITIONS AND RELATED CONCEPTS 3
Example 1.3
Let
p: 5<9
q : 9 < 7.
Solution.
The conjunction of the propositions p and q is the proposition
This proposition is false since the proposition 9 < 7 has a truth value F.
The disjunction of the propositions p and q is the proposition
p q : 5 < 9 or 9 < 7
Example 1.4
Consider the following propositions
p: It is Friday
q: It is raining.
Solution.
The conjunction of the propositions p and q is the proposition
p q : It is Friday or It is raining
A truth table displays the relationships between the truth values of propo-
sitions. Next, we display the truth tables of p q and p q.
p q pq p q pq
T T T T T T
T F F T F T
F T F F T T
F F F F F F
p q pq
T T F
T F T
F T T
F F F
Example 1.5
(a) Construct a truth table for (p q) r.
(b) Construct a truth table for p p.
Solution.
(a) The truth table is
1 PROPOSITIONS AND RELATED CONCEPTS 5
p q r pq (p q) r
T T T F T
T T F F F
T F T T F
T F F T T
F T T T F
F T F T T
F F T F T
F F F F F
(b) The truth table is
p pp
T F
F F
The final operation on a proposition p that we discuss is the negation of p.
The negation of p, denoted p, is the proposition not p. The truth table of
p is displayed below
p p
T F
F T
Example 1.6
Consider the following propositions:
p: Today is Thursday.
q: 2 + 1 = 3.
r: There is no pollution in New Jersey.
Construct the truth table of [ (p q)] r.
Solution.
p q r pq (p q) [ (p q)] r
T T T T F T
T T F T F F
T F T F T T
T F F F T T
F T T F T T
F T F F T T
F F T F T T
F F F F T T
6 FUNDAMENTALS OF MATHEMATICAL LOGIC
Example 1.7
Find the negation of the proposition p : 5 < x 0.
Solution.
The negation of p is the proposition p : x > 0 or x 5
Example 1.8
(a) Construct the truth table of the proposition (p q) ( p q). Deter-
mine if this proposition is a tautology.
(b) Show that p p is a tautology.
Solution.
(a) The truth table is
p q p q p q pq (p q) ( p q)
T T F F F T T
T F F T T F T
F T T F T F T
F F T T T F T
Thus, the given proposition is a tautology.
(b) The truth table is
p p p p
T F T
F T T
Again, this proposition is a tautology
Two propositions are equivalent if they have exactly the same truth values
under all circumstances. We write p q.
Example 1.9
(a) Show that (p q) p q.
(b) Show that (p q) p q.
(c) Show that ( p) p.
Parts (a) and (b) are known as DeMorgans laws.
1 PROPOSITIONS AND RELATED CONCEPTS 7
Solution.
(a) The truth table is
p q p q pq (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
Note that the columns of (p q) and p q have the same truth values.
(b) The truth table is
p q p q pq (p q) p q
T T F F T F F
T F F T F T T
F T T F F T T
F F T T F T T
Note that the columns of (p q) and p q have the same truth values.
(c) The truth table is
p p ( p)
T F T
F T F
Example 1.10
(a) Show that p q q p and p q q p.
(b) Show that (p q) r p (q r) and (p q) r p (q r).
(c) Show that (p q) r (p r) (q r) and (p q) r (p r) (q r).
Solution.
(a) The truth table is
p q pq qp
T T T T
T F F F
F T F F
F F F F
8 FUNDAMENTALS OF MATHEMATICAL LOGIC
p q pq qp
T T T T
T F T T
F T T T
F F F F
p q r pq qr (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 T F T T
F T T T T T T
F T F T T T T
F F T F T T T
F F F F F F F
p q r pq qr (p q) r p (q r)
T T T T T T T
T T F T F F F
T F T F F F F
T F F F F F F
F T T F T F F
F T F F F F F
F F T F F F F
F F F F F F F
p q r pq pr qr (p q) r (p r) (q r)
T T T T T T T T
T T F T T T T T
T F T F T T T T
T F F F T F F F
F T T F T T T T
F T F F F T F F
F F T F T T T T
F F F F F F F F
1 PROPOSITIONS AND RELATED CONCEPTS 9
p q r pq pr qr (p q) r (p r) (q r)
T T T T T T T T
T T F T F F F F
T F T T T F T T
T F F T F F F F
F T T T F T T T
F T F T F F F F
F F T F F F F F
F F F F F F F F
Example 1.11
Show that (p q) 6 p q
Solution.
We will use truth tables to prove the claim.
p q p q pq (p q) p q
T T F F T F F
T F F T F T 6 = F
F T T F F T 6 = F
F F T T F T T
A compound proposition that has the value F for all possible values of the
propositions in it is called a contradiction.
Example 1.12
Show that the proposition p p is a contradiction.
Solution.
p p p p
T F F
F T F