Truth Tables
What you will get from this section. You will learn what truth tables are, how to construct truth tables for "and", "or", and implication, and how truth tables can be used to check whether two logical statements are equivalent.
Disclaimer
Most of this section is optional nice-to-know material, and provided for completeness of this logic course. However, there is one important point that is a must know. That is: another equivalent way to express
is:
This is because if and were both true, then this immediately contradicts .
The rest of the section is less central for TMUA preparation, so it can be skipped on a first reading.
What is a truth table?
A truth table is a table that lists all possible truth values of some statements.
For example, suppose and are two statements. Each of them can be either true or false. So there are four possible cases:
| T | T |
| T | F |
| F | T |
| F | F |
Here means true, and means false.
These four rows cover every possible combination of truth values for and .
The point of a truth table is to ask: in each row, what is the truth value of a larger statement built from and ?
Truth table for " and "
The statement " and " is true only when both and are true.
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
So " and " is a very strict statement. It fails as soon as one of or is false.
For example, suppose:
and
Then " and " means:
This is true only if James is both tall and clever.
Truth table for " or "
The statement " or " is true when at least one of or is true.
| T | T | T |
| T | F | T |
| F | T | T |
| F | F | F |
So " or " only fails when both and are false.
In mathematics, "or" usually means inclusive or. This means " or " allows the possibility that both and are true.
For example, if a number is divisible by or , it is allowed to be divisible by both and .
Truth table for ""
Now we come to the most important truth table for this course.
The implication
means:
The formal truth table is:
| T | T | T |
| T | F | F |
| F | T | T |
| F | F | T |
The key row is the second row:
| T | F | F |
This is the only way for an implication to fail.
An implication says that whenever is true, must also be true. So the implication is false exactly when is true but is false.
This is exactly the same idea as counterexamples. To disprove
we need a case where is true and is false.
What the implication truth table is really telling us
The implication truth table can feel strange at first.
For " and ", each row feels very direct. If is true and is false, then " and " is definitely false.
For " or ", each row also feels direct. If is true and is false, then " or " is definitely true.
But implication is slightly different. When we are testing a general implication , the rows are best understood like this:
| What this case tells us about | ||
|---|---|---|
| T | T | Could still be true |
| T | F | Definitely false |
| F | T | Could still be true |
| F | F | Could still be true |
The only row that destroys the implication is:
The other three rows do not prove the implication by themselves. They only mean the implication has not been broken by that case.
So when the formal truth table says:
| T | T | T |
we should not think that one example where and are both true proves the whole implication.
Instead, we should think:
Application 1: checking equivalent statements
Truth tables are useful because they can show whether two logical statements are equivalent.
Two statements are equivalent if they always have the same truth value in every row of the truth table.
For example, consider the implication:
and its contrapositive:
Here is the truth table:
| T | T | F | F | T | T |
| T | F | F | T | F | F |
| F | T | T | F | T | T |
| F | F | T | T | T | T |
The final two columns are exactly the same.
Therefore,
is equivalent to
This confirms, using truth tables, that an implication and its contrapositive are equivalent.
Application 2: seeing why the converse is different
Now compare an implication with its converse.
The implication is:
The converse is:
Here is the truth table:
| T | T | T | T |
| T | F | F | T |
| F | T | T | F |
| F | F | T | T |
The final two columns are not the same.
Therefore,
is not equivalent to
This confirms what we saw earlier: an implication and its converse are not automatically both true.
Summary
- A truth table lists all possible truth values of the basic statements involved.
- For two statements and , there are four possible rows.
- " and " is true only when both and are true.
- " or " is true when at least one of or is true.
- The formal truth table for has only one false row: true and false.
- When testing a general implication, the row true and false means "definitely false"; the other rows mean "could still be true".
- Truth tables can be used to check whether two statements are equivalent.
- Truth tables show that is equivalent to its contrapositive .
- Truth tables also show that is not automatically equivalent to its converse .