0% found this document useful (0 votes)
94 views12 pages

1.2 Basic Operations and Truth Tables: T Q R Q P

In this section we will get a first look of how to deal algebraically with propositions. Our approach is informal and does not build Propositional Calculus axiomatically. Our variables are propositions and we have three binary operations and the negation.

Uploaded by

blackosprey
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views12 pages

1.2 Basic Operations and Truth Tables: T Q R Q P

In this section we will get a first look of how to deal algebraically with propositions. Our approach is informal and does not build Propositional Calculus axiomatically. Our variables are propositions and we have three binary operations and the negation.

Uploaded by

blackosprey
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Introduction to Logic. Copyright © 2005, by Arie Bialostocki. All rights reserved.

1.2 Basic Operations and Truth Tables


Basic Truth Tables and Truth Values of Expressions in Propositional Calculus
Identities, Equivalence and Implication of Expressions

Basic Truth Tables and Truth Values of Expressions in Propositional Calculus: In this
section we will get a first look of how to deal algebraically with propositions. This part of
symbolic logic is called Propositional Calculus. Our approach is informal and does not
build Propositional Calculus axiomatically.

In our early childhood we learn how to add three bananas to four bananas, and three
oranges to four oranges. Only later, after seeing many examples, we get the abstract
notion of “ 3 + 4 .” Several years down the road, we are led one step further and are
introduced to the algebraic expression “ a + b ”, being told that we can substitute 3 for a
and 4 for b and get “ 3 + 4 .”

By now, we have reached the stage to be introduced to the algebra of manipulating


propositions, without getting into the problem what the propositions are. This part of
logic is known as Propositional Calculus. Propositional Calculus has much in common
with our traditional algebra. But, certainly there are substantial differences. Let’s examine
both of them from the same perspective.

In our traditional algebra we deal with expressions like:


( a + b) × c + ( − d ) .
The letters are called variables and represent numbers. When each letter in a given
expression has been assigned a numerical value, then the expression results in a number
according to the rules of addition, subtraction and multiplication. The parentheses in the
expression indicate the order of operations.

Propositional Calculus works in a very similar way. Our variables are propositions and
we have three binary operations and the negation. We do not deal with the semantics of
an individual proposition, but rather we are interested in the way propositions are
combined and the truth-value of their combination, once we know the truth value of each
proposition (variable.) For example we can consider the expression
(( p ∧ q) ∨ r ) → ¬(q ∨ t ) .
This expression of propositions is a well-formed formula, since we have combined the
proposition successively in a proper way.

While in our traditional algebra, where a letter (variable) can be assigned any numerical
value, a proposition (variable) can be assigned only one of two values, true or false,
denoted by T and F, respectively. Thus in order to compute the truth value of the
expression, (( p ∧ q) ∨ r ) → ¬(q ∨ t ) , given the truth values of its variables, we need the
basic rules. For example if p takes the value of T and q takes the value of F; what is the
truth value of p ∧ q ? In the Table 1 and Table 2 we depict these basic rules.

36
Introduction to Logic. Copyright © 2005, by Arie Bialostocki. All rights reserved.

p ¬p
T F
F T

Table 1

p q p∧q p∨q p→q


T T T T T
T F F T F
F T F T T
F F F F T

Table 2

Most of the entries in the tables above are very intuitive and model our reasoning. The
two problematic ones are in the implication, whenever the assumption p is false then the
implication p → q is true, regardless of the truth value of q. There are several ways that
we can explain the reason “why” mathematicians decided to define the truth value this
way, but we will not elaborate on it here, but rather in the appendix to this section.

Example 1

Let’s consider the expression (( p ∧ q) ∨ r ) → ¬(q ∨ t ) from above, and suppose that p is
T, q is T, r is F, and t is F. Then an easy computation shows that the expression
(( p ∧ q) ∨ r ) → ¬(q ∨ t ) takes the value F.

As will be seen below, in the sample problems, we are asked sometimes to build a truth
table for a given expression. This means that we have to evaluate the given expression
for all possible values of its variables. If there are two variables, then there are 4
possibilities, and more general, if there are n variables, then there are 2n possibilities.

Example 2

In the following table we will show all the possible truth values for three variables p, q,
and r.
p q r
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F

37
Introduction to Logic. Copyright © 2005, by Arie Bialostocki. All rights reserved.

Identities, Equivalence and Implication of Expressions:

Definition 3

Let P = P( p1 , p2 ,..., pr ) and Q = Q ( p1 , p2 ,..., pr ) be two logical expressions. We say that


P and Q are equivalent and write P = Q , if P and Q have the same truth value for every
possible combination of truth values of p1 , p2 ,..., pr .

Definition 4

Let P = P( p1 , p2 ,..., pr ) and Q = Q ( p1 , p2 ,..., pr ) be two logical expressions. We say that


P implies Q and write P ≺ Q , if the expression P → Q takes the truth value T for every
possible combination of truth values of p1 , p2 ,..., pr .

Example 5

The equivalence of an expression of propositions is analogous to the equality of algebraic


expression. For example both sides of the equality below have the same value for every
combination of a and b.
(a + b) 2 = a 2 + 2ab + b 2
However, the analogue of P implies Q is slightly less intuitive. Note that a ≤ a + b 2 , for
every pair of numbers a and b.

We list below plenty of identities that can be easily verified using Tables 1 and 2.

A1. p ∨ ¬p = T Excluded middle law


A2. p ∧ ¬p = F Contradiction law
A3. p∨ T = T First domination law
A4. p∧ F = F Second domination law
A5. p∨ F = p First identity law
A6. p∧ T = p Second identity law
A7. p∨ p = p First idempotent law
A8. p∧ p = p Second idempotent law
A9. ¬(¬p ) = p Double negation law
A10. p∨q = q∨ p First commutative law
A11. p∧q =q∧ p Second commutative law
A12. ( p ∨ q) ∨ r = p ∨ (q ∨ r ) First associative law
A13. ( p ∧ q ) ∧ r = p ∧ (q ∧ r ) Second associative law
A14. p ∨ (q ∧ r ) = ( p ∨ q) ∧ ( p ∨ r ) First distributive law
A15. p ∧ (q ∨ r ) = ( p ∧ q) ∨ ( p ∧ r ) Second distributive law

38
Introduction to Logic. Copyright © 2005, by Arie Bialostocki. All rights reserved.

Replacing an “and” I.1 p ∧ q = ¬(¬p ∨ ¬q)


I.2 p ∧ q = ¬( p → ¬q)
Replacing a “negated and” I.3 ¬( p ∧ q) = ¬p ∨ ¬q (De Morgan)
I.4 ¬( p ∧ q) = p → ¬q
Replacing an “or” I.5 p ∨ q = ¬(¬p ∧ ¬q)
I.6 p ∨ q = ¬p → q
Replacing a “negated or” I.7 ¬( p ∨ q) = ¬p ∧ ¬q (De Morgan)
I.8 ¬( p ∨ q) = ¬(¬p → q)
Replacing an ”implication” I.9 p → q = ¬( p ∧ ¬q )
I.10 p → q = ¬p ∨ q
Replacing a ”negated implication” I.11 ¬( p → q) = p ∧ ¬q
I.12 ¬( p → q) = ¬(¬p ∨ q)

The contra positive B.1 p → q = ¬q → ¬p


Equivalence B.2 ( p → q ) ∧ ( q → p ) = ( p ∧ q ) ∨ ( ¬p ∧ ¬q )

The identities are divided into three groups.

In the first group there are identities which either follow intuitively from our spoken
language or are very natural.

The second group consists of identities which replace a given operation by another one.
It can be shown that every expression can be brought into a form where only negation
and one of the three: and, or and implication are used.

The third group consist of two classic ones that are very helpful.

SAMPLE PROBLEMS

PROBLEM 1.2.1:

Evaluate the truth-value of the following expressions provided, p = T, q = F , r = F .


Expression: A1 ∨ ¬A2 , where A1 = r ∧ ¬q and A2 = ¬(r ∧ p) .

39
Introduction to Logic. Copyright © 2005, by Arie Bialostocki. All rights reserved.

SOLUTION:

p q r A1 = r ∧ ¬q A2 = ¬(r ∧ p) A1 ∨ ¬A2
T F F F T F

PROBLEM 1.2.2:

Construct a truth table for the expressions ¬A1 ∧ ¬A2 , where A1 = p ∨ ¬q ,


and A2 = p ∨ r .

SOLUTION:

p q r ¬q A1 ¬A1 A2 ¬A2 ¬A1 ∧ ¬A2


T T T F T F T F F
T T F F T F T F F
T F T T T F T F F
T F F T T F T F F
F T T F F T T F F
F T F F F T F T T
F F T T T F T F F
F F F T T F F T F

PROBLEM 1.2.3:

Use a De-Morgan’s Law to write ¬p ∨ (¬s ∨ r ) using only “ ∧ ” and negation. Simplify
all double negations, whenever possible.

SOLUTION:
¬p ∨ (¬s ∨ r ) = ¬p ∨ ¬ ( ¬¬s ∧ ¬r ) = ¬p ∨ ¬ ( s ∧ ¬r ) = ¬ ( ¬¬p ∧ ¬¬ ( s ∧ ¬r ) ) =
= ¬ ( p ∧ ( s ∧ ¬r ) )

PROBLEM 1.2.4:

Use a De-Morgan’s Law to write ¬p ∨ ¬(¬s ∧ r ) using only “ ∨ ” and negation. Simplify
all double negations, whenever possible.
SOLUTION:

¬p ∨ ¬(¬s ∧ r ) = ¬p ∨ ¬¬(¬¬s ∨ ¬r ) = ¬p ∨ ( s ∨ ¬r )

40
Introduction to Logic. Copyright © 2005, by Arie Bialostocki. All rights reserved.

PROBLEM 1.2.5:

Use a truth table to determine for the given pairs of expressions whether P and Q are
equivalent, or P ≺ Q , or Q ≺ P , or none of the above.

(a) P = ( p ∧ q) ∨ (¬p ∧ ¬r ) and Q = p ∨ ¬r


(b) P = ( p ∧ q) ∧ r and Q = ( p → ¬q) → ¬r
(c) P = ( p → q) → r and Q = ¬(¬p ∨ q) ∨ r

SOLUTION:

(a)

p q r P = ( p ∧ q ) ∨ ( ¬ p ∧ ¬r ) Q = p ∨ ¬r
0 T T T T T
1 T T F T T
2 T F T F T
3 T F F F T
4 F T T F F
5 F T F T T
6 F F T F F
7 F F F T T

Since whenever there is a T in column P, there is a T in column Q, it follows that P ≺ Q ,


or in other words P implies Q.

(b)
p q r P = ( p ∧ q) ∧ r Q = ( p → ¬q ) → ¬ r
0 T T T T T
1 T T F F T
2 T F T F F
3 T F F F T
4 F T T F F
5 F T F F T
6 F F T F F
7 F F F F T

Since whenever there is a T in column P, there is a T in column Q, it follows that P ≺ Q ,


or in other words P implies Q.

41
Introduction to Logic. Copyright © 2005, by Arie Bialostocki. All rights reserved.

(c)

p q r P = ( p → q) → r Q = ¬(¬p ∨ q ) ∨ r
0 T T T T T
1 T T F F F
2 T F T T T
3 T F F T T
4 F T T T T
5 F T F F F
6 F F T T T
7 F F F F F

Since the columns of P and Q are identical, it follows that P and Q are equivalent.

PROBLEM 1.2.6:

Write each the following expression using only → and negation.


R = ¬(¬p ∨ q ) ∧ ¬r

SOLUTION:

R = ¬( p → q ) ∧ ¬r = ¬ ( ¬( p → q ) → r )

PRACTICE PROBLEMS

1. Construct a truth table for each of the following expressions.

(a) A1 = ( p ∨ ¬r ) ∧ s

(b) A2 = ( p ∧ ¬q) ∨ ( p ∧ r )

(c) A3 = ¬ ( ¬( p ∧ q ) ∨ ( p ∧ s ) )

(d) A4 = (( p ∧ q) ∧ r ) ∨ ¬s

(e) A5 = ( p ∧ ¬q ) ∨ ¬ ( r ∧ s )

2. Use De-Morgan’s Laws to write each of the expressions in problem 1 using only
∧ and negation.

3. Use De-Morgan’s Laws to write each of the expressions in problem 1 using only

42
Introduction to Logic. Copyright © 2005, by Arie Bialostocki. All rights reserved.

∨ and negation.

4. Use a truth table to determine for the given pairs of expressions whether P ≺ Q or
Q ≺ P , or P is equivalent to Q, or none of the above.
(a) P = (a ∧ b) → (c → ¬b) Q = ( a → ¬b ) → ( c → b )
(b) P = (a ∨ c) → (a → b) Q = (a → ¬c) → (b → ¬c)
(c) P = (a ∨ b) → c Q = (a → c) ∧ (b → c)
(d) P = (a → b) ∧ (c → d ) ∧ (a ∨ c) Q = c∨d
(e) P = (a → b) ∧ (c → d ) ∧ (¬b ∨ ¬d ) Q = ¬a ∨ ¬b

5. (a) Write each of the expressions P and Q in problem 4 using only ∧ and negation.

(b) Write each of the expressions P and Q in problem 4 using only ∨ and negation.

(c) Write each of the expressions P and Q in problem 4 using only → and negation.

43
Introduction to Logic. Copyright © 2005, by Arie Bialostocki. All rights reserved.

APPENDIX

In this appendix we try to explain why p → q is T, whenever p is F. It is a deep question


in the philosophy of mathematics whether mathematics is an invention or a discovery. If
we decide that mathematics is an invention, than we can do whatever we want. However,
we try to make our inventions applicable by modeling our world.
One of the first questions asked by students when they are introduced to negative
numbers is: “Why is a minus times a minus, a plus?” The simplest answer is that we
decided so. However, there are deeper answers. One of them is that if we will decide
otherwise, then we will loose the distributive law a (b + c) = ab + ac . Another good
reason is explained in the next example.

Observation 1

Suppose that a car travels at a speed of 50 miles per hour for 3 hours. The distance that
the car will travel will be 50 × 3 = 150 miles. However, if we add orientation to the
direction of the car, say, if it travels at a speed of 50 miles per hour, we mean that it
travels to the right and if it travels at a speed of -50 miles per hour, we mean that it
travels to the left. Furthermore, suppose that at t = 0 , the car is at x = 0 on the x-axis.
We can give orientation to the time as well. When we say +3, we mean three hours in the
future from t = 0 and if we say -3, we mean three hours before t = 0 . Now, all the four
products ( +50) × ( +3), ( +50) × ( −3), (−50) × (+3), (−50) × (3) make perfect sense.

Next let’s get to the logical implication. The logical implication is distinct from the
spoken language implication since in our spoken language whenever we use the phrase
“If…, then…” we do not have in mind what happens in case that the “If part” is false. In
the next two examples we will give two arguments why it is convenient and appropriate
to decide that the truth value of p → q is T, whenever p is F.

Observation 2

Let’s define an honest person using an If…, then…statement. Person x will be called
honest if x has found a big amount of money and brought it to the police station in order
to help find the legal owner. Here are the responses of three people.
Abe: Yes, I once found a bag with $1,000 and brought it to the police station.
Bob: I once found $3,000, but I never told anyone about it and took it home.
Chad: I am sorry, I never found a penny. I wish I would, but I never did.
Using our definition Abe is honest and Bob is not. But what about Chad? Let’s give the
benefit of the doubt and declare him to be honest.

Observation 3

This example is more formal than philosophical.

44
Introduction to Logic. Copyright © 2005, by Arie Bialostocki. All rights reserved.

The negation of p → q is p ∧ ¬q . In order to convince ourselves that it is indeed so,


suppose that p is the proposition “Mary studies hard” and q is the proposition “Mary gets
an A.” The negation of p → q would be “Mary studies hard, but does not get an A.”
Now we can look at the truth table of p ∧ ¬q , and derive the truth table of p → q by
interchanging the T’s and the F’s.

p q p ∧ ¬q p→q
T T F T
T F T F
F T F T
F F F T

45
Introduction to Logic. Copyright © 2005, by Arie Bialostocki. All rights reserved.

HOMEWORK 1.2

First Name ____________ Last Name ____________ Student ID ____________

1. (a) Construct a truth table for the following expressions. Then determine whether A
and B are equivalent, or A ≺ B , or B ≺ A , or none of the above.

A = ¬( q ∧ ¬r ) ∨ p
B = (¬q ∨ r ) ∨ ¬p

p q r A = ¬(q ∧ ¬r ) ∨ p B = (¬q ∨ r ) ∨ ¬p

0 T T T
1 T T F
2 T F T
3 T F F
4 F T T
5 F T F
6 F F T
7 F F F

(b) Construct a truth table for the following expressions. Then determine whether P
and Q are equivalent, or P ≺ Q , or Q ≺ P , or none of the above.

p q r P = ( ¬p → q ) ∧ r Q = ( p → ¬ q ) ∨ ¬r

0
1
2
3
4
5
6
7

2. Use De-Morgan’s Laws to write the following expression using only ∧ and negation.

(a) (¬p ∧ q ) ∨ ( q ∧ r )
(b) ( p ∨ ¬q ) ∨ ( p ∧ r )

3. Use De-Morgan’s Laws to write the following expression using only ∨ and negation.

46
Introduction to Logic. Copyright © 2005, by Arie Bialostocki. All rights reserved.

(a) ( p ∨ r ) ∧ (¬p ∧ ¬q )
(b) ¬( p ∧ q ) ∧ (¬q ∨ r )
4. Write the following expressions using only ∧ and negation.

(a) R = ¬( p ∧ r ) → (¬r → p )

(b) R = (( p ∧ q ) → ¬r ) → ( p ∧ r )

5. Write the following expressions using only → and negation.

(a) R = ( p ∧ r ) ∨ ¬( p ∨ q )

(b) R = ¬( p ∨ ¬r ) ∧ ( r ∨ p )

6. Write the following expressions using only ∨ and negation.

(a) R = (¬p ∨ r ) → (q → r )

(b) R = ( p ∨ r ) → (¬r → q)

47

You might also like