We have already seen the logical operators and, or, not, implication (if ... then), and bi-implication (if and only if). We have also seen that using these operators, we can construct compound propositions, which can also evaluate to either true or false. It is however quite difficult to see when a complicated compound proposition such as is true. In order to do so, we introduce truth tables. First we look at an example.
Consider the proposition "I have a bicycle and a car.".
This proposition is precisely true when the propositions
"I have a bicycle." and "I have a car." are both true.
In proposition letters, we can write
Truth table
|
|
|
true |
true |
true |
true |
false |
false |
false |
true |
false |
false |
false |
false |
The first two columns correspond to the propositions and . The last column corresponds to compound proposition . In the columns we list the values of these propositions in the various cases.
The cases that may occur are the simultaneous evaluations of and . The values are true and false, and so there are four cases, leading to four rows (not counting the header line). The cases are listed lexicographically with true coming before false.
For instance, the entry in the column corresponding to and in the row with values false for and true for indicates the value of for this case, which is false.
The truth table for a single proposition looks like
The truth table for the proposition looks like
There are exactly two possibilities for the value of (true or false). For each of these possibilities there are two possible values for the compound expression involving only . Therefore, there are exactly essentially different (that is, inequivalent) propositions involving only . Above, we have seen two.
The other two are simply the propositions true (which is always true) and false (which is always false). These could be written in more complicated ways to make them look like having arguments involving ; for instance for true and for false.
Here is the general case.
Let be a compound proposition depending on variables .
The truth table for is the table that has columns, one for each of the dependent variables and a column for showing, for each of the values of the , the value of the .
If so desired for ease of computation or for clarity, auxiliary columns with propositions occurring in can be added directly after the first columns.
The entries of a truth table are the values true or false. This indicates whether the proposition at the top of that column is either true or false when we substitute the values of found in the same row of the leftmost columns of the table.
Example
The truth table for is given by
|
|
|
|
|
true |
true |
true |
true |
true |
true |
false |
true |
false |
true |
false |
true |
true |
false |
true |
false |
false |
false |
false |
false |
The auxiliary columns are those headed by and .
Inspection of the table shows that is false precisely when and are both false.
It is customary to list the rows in a fixed order. Most frequently used is the lexicographical order where true comes before false. In the first row, all entries for are true and in the last row all these entries are false. If , then the second row begins with entries true and the -th entry is false, and so on.
The proposition is true exactly when is false. An example of a negation, in words, is
The proposition is true when exactly both and are true. An example of a conjunction, in words, is
|
|
|
true |
true |
true |
true |
false |
false |
false |
true |
false |
false |
false |
false |
The proposition is true exactly when is true, is true, or both and are true. An example of a disjunction, in words, is
|
|
|
true |
true |
true |
true |
false |
true |
false |
true |
true |
false |
false |
false |
The proposition is true when we can say that implies . This is true when both and are true, and when is false. An example of an implication, in words, is
|
|
|
true |
true |
true |
true |
false |
false |
false |
true |
true |
false |
false |
true |
The proposition is true when and both have the same value. An example of a bi-implication, in words, is
|
|
|
true |
true |
true |
true |
false |
false |
false |
true |
false |
false |
false |
true |
The truth table is a tool for evaluating propositions. It is important to know how to use them. The truth table for determines the assignment of the value true or false to for each of the eight simultaneous evaluations of the variables , , and . Each row of the table (not counting the header of the table) corresponds to a single simultaneous evaluation. Thus the truth table in case of three variables has eight rows.
Let be a natural number and consider the the truth table of the compound proposition . We will disregard the auxiliary columns.
Each of the propositions can take two values, so there are simultaneous evaluations of the variables occurring in . Each row of the truth table (not counting the header of the table) corresponds to a unique evaluation, so we have rows. Each row can be completed with the value of in the last column, giving us two possibilities (true or false) again. This means that there are different truth tables in the case of variables.
Above, we saw that, indeed, for , this number is . If , the number is . For , there are already different tables.
Is the proposition always true?
No, the proposition is not always true.
We use the following truth table to find the answer.
|
|
|
|
true |
true |
true |
true |
true |
false |
false |
true |
false |
true |
false |
false |
false |
false |
false |
false |
We conclude that
is not true for all values of and , and therefore, this proposition is not always true.