Truth Tables PDF
Truth Tables PDF
This table is easy to understand. If P is true, its negation ∼ P is false. If P is false, then ∼ P is true.
P ∧ Q should be true when both P and Q are true, and false otherwise:
P Q P ∧Q
T T T
T F F
F T F
F F F
P ∨ Q is true if either P is true or Q is true (or both — remember that we’re using “or” in the inclusive
sense). It’s only false if both P and Q are false.
P Q P ∨Q
T T T
T F T
F T T
F F F
P Q P →Q
T T T
T F F
F T T
F F T
To understand why this table is the way it is, consider the following example:
1
The statement will be true if I keep my promise and false if I don’t.
Suppose it’s true that you get an A and it’s true that I give you a dollar. Since I kept my promise, the
implication is true. This corresponds to the first line in the table.
Suppose it’s true that you get an A but it’s false that I give you a dollar. Since I didn’t keep my promise,
the implication is false. This corresponds to the second line in the table.
What if it’s false that you get an A? Whether or not I give you a dollar, I haven’t broken my promise.
Thus, the implication can’t be false, so (since this is a two-valued logic) it must be true. This explains the
last two lines of the table.
P ↔ Q means that P and Q are equivalent. So the double implication is true if P and Q are both
true or if P and Q are both false; otherwise, the double implication is false.
P Q P ↔Q
T T T
T F F
F T F
F F T
You should remember — or be able to construct — the truth tables for the logical connectives. You’ll
use these tables to construct tables for more complicated sentences. It’s easier to demonstrate what to do
than to describe it in words, so you’ll see the procedure worked out in the examples.
Remark. (a) When you’re constructing a truth table, you have to consider all possible assignments of True
(T) and False (F) to the component statements. For example, suppose the component statements are P , Q,
and R. Each of these statements can be either true or false, so there are 23 = 8 possibilities.
When you’re listing the possibilities, you should assign truth values to the component statements in a
systematic way to avoid duplication or omission. The easiest approach is to use lexicographic ordering.
Thus, for a compound statement with three components P , Q, and R, I would list the possibilities this way:
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
(b) There are different ways of setting up truth tables. You can, for instance, write the truth values “under”
the logical connectives of the compound statement, gradually building up to the column for the “primary”
connective.
I’ll write things out the long way, by constructing columns for each “piece” of the compound statement
and gradually building up to the compound statement. Any style is fine as long as you show enough work
to justify your results.
2
In the fourth column, I list the values for P → Q. Check for yourself that it is only false (“F ”) if P is
true (“T ”) and Q is false (“F ”).
The fifth column gives the values for my compound expression ∼ P ∧ (P → Q). It is an “and” of ∼ P
(the third column) and P → Q (the fourth column). An “and” is true only if both parts of the “and” are
true; otherwise, it is false. So I look at the third and fourth columns; if both are true (“T ”), I put T in the
fifth column, otherwise I put F .
P Q ∼P P →Q ∼ P ∧ (P → Q)
T T F T F
T F F F F
F T T T T
F F T T T
A tautology is a formula which is “always true” — that is, it is true for every assignment of truth
values to its simple components. You can think of a tautology as a rule of logic.
The opposite of a tautology is a contradiction, a formula which is “always false”. In other words, a
contradiction is false for every assignment of truth values to its simple components.
I construct the truth table for (P → Q) ∨ (Q → P ) and show that the formula is always true.
P Q P →Q Q→P (P → Q) ∨ (Q → P )
T T T T T
T F F T T
F T T F T
F F T T T
The last column contains only T’s. Therefore, the formula is a tautology.
P Q R P →Q Q→R (P → Q) ∧ (Q → R)
T T T T T T
T T F T F F
T F T F T F
T F F F T F
F T T T T T
F T F T F F
F F T T T T
F F F T T T
3
You can see that constructing truth tables for statements with lots of connectives or lots of simple
statements is pretty tedious and error-prone. While there might be some applications of this (e.g. to digital
circuits), at some point the best thing would be to write a program to construct truth tables (and this has
surely been done).
The point here is to understand how the truth value of a complex statement depends on the truth
values of its simple statements and its logical connectives. In most work, mathematicians don’t normally
use statements which are very complicated from a logical point of view.
Example. Suppose
“x > y” is true.
Z
“ f (x) dx = g(x) + C” is false.
P = “x > y”.
Z
Q = “ f (x) dx = g(x) + C”.
I want to determine the truth value of (P → Q) → ∼ R. Since I was given specific truth values for P ,
Q, and R, I set up a truth table with a single row using the given values for P , Q, and R:
P Q R P →Q ∼R (P → Q) → ∼ R
T F T F F T
The statement “10 > 42” is false. You can’t tell whether the statement “Ichabod Xerxes eats chocolate
cupcakes” is true or false — but it doesn’t matter. If the “if” part of an “if-then” statement is false, then
the “if-then” statement is true. (Check the truth table for P → Q if you’re not sure about this!) So the
given statement must be true.
Two statements X and Y are logically equivalent if X ↔ Y is a tautology. Another way to say this
is: For each assignment of truth values to the simple statements which make up X and Y , the statements
X and Y have identical truth values.
4
From a practical point of view, you can replace a statement in a proof by any logically equivalent
statement.
To test whether X and Y are logically equivalent, you could set up a truth table to test whether X ↔ Y
is a tautology — that is, whether X ↔ Y “has all T’s in its column”. However, it’s easier to set up a table
containing X and Y and then check whether the columns for X and for Y are the same.
P Q P →Q ∼P ∼P ∨Q
T T T F T
T F F F F
F T T T T
F F T T T
Since the columns for P → Q and ∼ P ∨ Q are identical, the two statements are logically equivalent.
This tautology is called Conditional Disjunction. You can use this equivalence to replace a conditional
by a disjunction.
There are an infinite number of tautologies and logical equivalences; I’ve listed a few below; a more
extensive list is given at the end of this section.
Double negation ∼ (∼ P ) ↔ P
DeMorgan’s Law ∼ (P ∨ Q) ↔ (∼ P ∧ ∼ Q)
DeMorgan’s Law ∼ (P ∧ Q) ↔ (∼ P ∨ ∼ Q)
Contrapositive (P → Q) ↔ (∼ Q → ∼ P )
Modus ponens [P ∧ (P → Q)] → Q
Modus tollens [∼ Q ∧ (P → Q)] → ∼ P
When a tautology has the form of a biconditional, the two statements which make up the biconditional
are logically equivalent. Hence, you can replace one side with the other without changing the logical meaning.
You will often need to negate a mathematical statement. To see how to do this, we’ll begin by showing
how to negate symbolic statements.
Example. Write down the negation of the following statements, simplifying so that only simple statements
are negated.
(a) (P ∨ ∼ Q)
(b) (P ∧ Q) → R
(a) I negate the given statement, then simplify using logical equivalences. I’ve given the names of the logical
equivalences on the right so you can see which ones I used.
∼ (P ∨ ∼ Q) ↔ ∼ P ∧ ∼∼ Q DeMorgan’s law
↔ ∼P ∧Q Double negation
(b)
∼ [(P ∧ Q) → R] ↔ ∼ [∼ (P ∧ Q) ∨ R] Conditional Disjunction
↔ ∼∼ (P ∧ Q)∧ ∼ R DeMorgan’s law
↔ (P ∧ Q)∧ ∼ R Double negation
5
I showed that (A → B) and (∼ A ∨ B) are logically equivalent in an earlier example.
In the following examples, we’ll negate statements written in words. This is more typical of what you’ll
need to do in mathematics. The idea is to convert the word-statement to a symbolic statement, then use
logical equivalences as we did in the last example.
Example. Use DeMorgan’s Law to write the negation of the following statement, simplifying so that only
simple statements are negated:
Let C be the statement “Calvin is home” and let B be the statement “Bonzo is at the moves”. The
given statement is ∼ C ∨ B. I’m supposed to negate the statement, then simplify:
∼ (∼ C ∨ B) ↔ ∼∼ C∧ ∼ B DeMorgan’s Law
↔ C∧ ∼ B Double negation
Example. Use DeMorgan’s Law to write the negation of the following statement, simplifying so that only
simple statements are negated:
Let P be the statement “Phoebe buys a pizza” and let C be the statement “Calvin buys popcorn”.
The given statement is P → C. To simplify the negation, I’ll use the Conditional Disjunction tautology
which says
(P → Q) ↔ (∼ P ∨ Q)
That is, I can replace P → Q with ∼ P ∨ Q (or vice versa).
Here, then, is the negation and simplification:
∼ (P → C) ↔ ∼ (∼ P ∨ C) Conditional Disjunction
↔ ∼∼ P ∧ ∼ C DeMorgan’s Law
↔ P∧ ∼ C Double negation
The result is “Phoebe buys the pizza and Calvin doesn’t buy popcorn”.
Next, we’ll apply our work on truth tables and negating statements to problems involving constructing
the converse, inverse, and contrapositive of an “if-then” statement.
By the contrapositive equivalence, this statement is the same as “If x + y is not rational, then it is not
the case that both x and y are rational”.
This answer is correct as it stands, but we can express it in a slightly better way which removes some of
the explicit negations. Most people find a positive statement easier to comprehend than a negative statement.
By definition, a real number is irrational if it is not rational. So I could replace the “if” part of the
contrapositive with “x + y is irrational”.
The “then” part of the contrapositive is the negation of an “and” statement. You could restate it as
“It’s not the case that both x is rational and y is rational”. (The word “both” ensures that the negation
applies to the whole “and” statement, not just to “x is rational”.)
6
By DeMorgan’s Law, this is equivalent to: “x is not rational or y is not rational”. Alternatively, I could
say: “x is irrational or y is irrational”.
Putting everything together, I could express the contrapositive as: “If x + y is irrational, then either x
is irrational or y is irrational”.
(As usual, I added the word “either” to make it clear that the “then” part is the whole “or” statement.)
Example. Show that the inverse and the converse of a conditional are logically equivalent.
Let P → Q be the conditional. The inverse is ∼ P → ∼ Q. The converse is Q → P .
I could show that the inverse and converse are equivalent by constructing a truth table for (∼ P → ∼
Q) ↔ (Q → P ). I’ll use some known tautologies instead.
Start with ∼ P → ∼ Q:
∼ P →∼ Q ↔ ∼∼ Q →∼∼ P Contrapositive
↔ Q→P Double negation
Remember that I can replace a statement with one that is logically equivalent. For example, in the last
step I replaced ∼∼ Q with Q, because the two statements are equivalent by Double negation.
Construct the converse, the inverse, and the contrapositive. Determine the truth or falsity of the
four statements — the original statement, the converse, the inverse, and the contrapositive — using your
knowledge of algebra.
7
List of Tautologies
c 2018 by Bruce Ikenaga 8