We now turn to our logic model. Its structure is exactly similar to that of the parity model, although some of the technical terms are different; we list the correspondence in the following table.
parity model | logic model |
---|---|
universe | universe |
variable | statement variable |
parity value | truth value |
parity switcher | negation |
parity table | truth table |
operation | connective |
expression | compound statement |
equivalence of expressions | (logical) equivalence of statements |
We shall now explain the features of the logic model one at a time.
Universe. We shall take as the universe for this model the set of all allowable statements. Here, a statement is called allowable if it is definitely either true or false. For example, ‘‘’’ and ‘‘every person in this room is female’’ are allowable statements. On the other hand, we are not concerned with
questions (such as ‘‘is Lancaster better than
York?’’);
commands (such as ‘‘switch off that mobile
’phone!’’);
expressions of emotion (such as ‘‘I feel
happy’’);
matters of opinion (such as ‘‘Hitchcock is the greatest film director’’).
Note that for a statement to be allowable, we do not need to know whether it is true or false; for example, the statement ‘‘the seventeenth oldest student in this room is male’’ is certainly either true or false, but no-one knows which. For convenience, we shall simply write statement for allowable statement from now on.
Statement variables. We shall use letters (usually lower case) as the basic variables to represent statements from our universe. For example, we might write for the statement ‘‘’’, or for the statement ‘‘every person in this room is female’’.
Truth values. There are two truth values (for ‘‘true’’) and (for ‘‘false’’) which any statement variable can take, depending on which element of the universe it represents. For example, if represents the statement ‘‘’’, then its truth value is , and if represents the statement ‘‘every person in this room is female’’, then its truth value is
The negation. Given a statement variable , we write (read ‘‘not ’’) for the negation of . For example, if represents the statement ‘‘I cycled to university today’’, then represents the statement ‘‘I did not cycle to university today’’. (We do not enter into a discussion of whether I walked, ran, drove a car or took the bus.)
Truth tables. These are used to list the truth values of a given statement according to the truth values taken by the basic statement variables which it contains. For example, the truth table of is as follows.
F | |
T |
Logically equivalent statements. We say that two statements are logically equivalent (or simply equivalent) if they have the same truth table. For example, any statement is logically equivalent to its double negation because the first and third column of the following truth table are the same.
F | T | |
T | F |
Note that this agrees with the use of double negations in everyday language. For instance, the statement ‘‘I did not miss yesterday’s lecture’’ means (essentially) the same as ‘‘I attended yesterday’s lecture’’. To transform the former statement into the latter, observe that in this context ‘‘miss’’ means (essentially) the same as ‘‘not attend’’, and therefore we may rewrite the former statement as
‘‘I did not not attend yesterday’s lecture’’.
We now get the latter statement by cancelling the double negation.
Connectives and compound statements. Out of the basic statement variables (and their negations ), we construct more complicated statements, or compound statements, by using connectives. In doing so we assume that the truth value of any compound statement is determined entirely by the truth values of the basic statement variables out of which it is constructed. We shall use five connectives, as given in the following table wherein the first and third columns are the most important.
symbol | name | meaning | alternative symbols |
---|---|---|---|
conjunction | and | ||
or | disjunction | or | |
implication | implies, if … then | ||
reverse implication | is implied by, only if | ||
bi-implication | if and only if | , iff |
The alternative symbols here are listed as they are widely used, but they are not recommended as they can cause confusion. Some of the connectives obey rules similar to those satisfied by algebraic operations.
We shall now consider each in turn and give the corresponding truth table.
If represents the statement ‘‘grass is green’’, while represents ‘‘pigs can fly’’, then ‘‘’’ represents the statement ‘‘grass is green and pigs can fly’’. For such a compound statement to be true, we need both statements out of which it is built to be true. In other words the truth value of ‘‘’’ is if the truth values of both and are , and is otherwise. This is summarized in the following truth table.
T | ||
F | ||
F | ||
F |
If, as before, represents the statement ‘‘grass is green’’, while represents ‘‘pigs can fly’’, then ‘‘ or ’’ represents the statement ‘‘grass is green or pigs can fly’’.
Here we run into a linguistic problem, since in English there are two possible meanings of the word ‘‘or’’. If someone says ‘‘I will see you today or tomorrow’’, they might mean that seeing you both today and tomorrow is possible. On the other hand, if someone says ‘‘We can stay at home tonight or go to the cinema’’, they cannot mean that both are possible. For our model to be unambiguous, we must be clear what we mean by ‘‘ or ’’; we choose the inclusive sense (‘‘one or other or both’’) rather than the exclusive sense (‘‘one or other, but not both’’), because the inclusive sense is the one more commonly used in mathematics. Thus the truth table is as follows.
or | ||
---|---|---|
T | ||
T | ||
T | ||
F |
Again, suppose that represents the statement ‘‘grass is green’’, while represents ‘‘pigs can fly’’. Then ‘‘’’ represents the statement ‘‘if grass is green, then pigs can fly’’ (or in other words ‘‘grass being green implies that pigs can fly’’). (In colloquial English, ‘‘then’’ is often omitted, whereas in mathematics, ‘‘if’’ is normally followed by ‘‘then’’.)
Here we face a more serious problem than above: in colloquial English, such constructions tend only to be used when there is some causal link between the two simple statements, as in ‘‘if you study hard, then you will pass this course’’; the first statement (‘‘you study hard’’) causes or produces the second (‘‘you will pass this course’’). In our model, however, we need to be able to form ‘‘’’ regardless of whether the statements represented by and are linked in this way.
To get round this problem, we ignore the question of causality, and decide the truth or falsity of ‘‘’’ entirely on the basis of the truth or falsity of and . This can be decided by considering when ‘‘’’ is false; this occurs only if is true, but is nevertheless false. (If you don’t study hard, then the above statement cannot be said to be false whether you pass the course or not.) Thus the truth table is as follows.
T | ||
F | ||
T | ||
T |
This has some slightly strange consequences; for example, the statement ‘‘if grass is pink, then ’’ is true. Starting from a silly statement, we can deduce silly or sensible things. Consider also the two statements:
both are true because the condition (‘‘’’) is false.
However, in all cases where there is a genuine causal link between the two halves of the compound statement, the truth value assigned by the model is what we would expect. What we have defined is sometimes called material implication; it extends genuine, causal implication to cover all cases of the form . Untrue statements imply true statements and false statements, but a true statement cannot imply a false statement.
Finally, note that we use ‘‘implies’’ differently from ‘‘hence’’; ‘‘hence’’ means ‘‘and so’’ or ‘‘consequently’’, and acts as a conjunction between two true statements. To exemplify how this differs from our use of ‘‘implies’’, compare the two statements:
‘‘I have drunk a bottle of vodka implies that I shall fall over’’;
‘‘I have drunk a bottle of vodka, hence I shall fall over’’.
Here is true, whereas is false. Indeed, we can express as the conditional statement ‘‘if I had drunk a bottle of vodka, then I would fall over’’, which is true; the condition, however, is not satisfied — I have not drunk a bottle of vodka (and this is why is false).
This is now
easy; ‘‘’’ means the same as ‘‘’’.
Thus the truth table for ‘‘’’ is as follows.
T | ||
T | ||
F | ||
T |
We call the compound statement ‘‘’’ the converse of ‘‘’’.
Important note: these two compound statements are not equivalent. To see this, consider for instance the following two basic statements:
‘‘I have drunk a bottle of vodka’’;
‘‘I fall over’’.
As observed above, the statement ‘‘’’ is true. (If I had drunk a bottle of vodka, then I would fall over.) However, the converse statement ‘‘’’ is false; for instance, I might fall over because I stumbled over the computer cable, so could well be true without being true.
Finally we define ‘‘’’ (read ‘‘ if and only if ’’) to mean ‘‘’’. From the above, we see that the truth table is as follows.
T | ||
F | ||
F | ||
T |
As in the parity model, we may go on to construct truth tables for more complicated compound statements by using the tables already given and building up new ones column by column. As before, if only two basic statement variables are involved, then the truth table needs rows, whereas if there are three basic statement variables, then the truth table must have rows to allow for all possible combinations of the truth values.
In general, we can introduce basic statement variables and build up compound statements from them. The corresponding truth tables need to allow all possible combinations of and for these statement variables, and therefore:
if a compound statement involves basic statement variables,
then there should be rows in the corresponding truth table.
We shall now give an example of how to construct the truth table for a compound statement built from basic statement variables and connectives.
The truth table of the compound statement ‘‘ or ’’ is:
or | ||||||
F | F | T | T | |||
F | F | F | F | |||
T | T | F | T | |||
T | T | F | T | |||
F | F | T | T | |||
F | F | F | F | |||
T | F | F | F | |||
T | F | F | F |
Once we know how to construct truth tables, we can use them to verify that certain compound statements are logically equivalent, as we shall do in the following examples. Some of these logical equivalences will be useful later in the course.
Show that the two compound statements ‘‘’’ and ‘‘’’ are logically equivalent.
The conclusion of Example 2.3.2 is in
accordance with everyday
language. For instance, consider the two basic statements
‘‘I walked to work’’;
‘‘I cycled to work’’.
Then ‘‘’’ represents the statement
‘‘I did not walk or cycle to work’’,
while ‘‘’’ represents
‘‘I did not walk to work and I did not cycle to work’’.
These two sentences clearly have the same meaning.
Solution. We construct the truth tables.
or | ||||||
---|---|---|---|---|---|---|
T | F | F | F | F | ||
T | F | F | T | F | ||
T | F | T | F | F | ||
F | T | T | T | T |
As the fourth and seventh columns are the same, we conclude that the statements ‘‘’’ and ‘‘’’ are logically equivalent.
Example 2.3.2 shows that the connective ‘‘or’’ can be expressed in terms of the connective ‘‘’’ and the negation. Indeed, negating both statements in that example, we see that ‘‘ or ’’ is logically equivalent to ‘‘’’.
At the end of a calculation involving truth tables, always state the conclusion (as we did above).
In analogy with Example 2.3.2, the two compound statements ‘‘’’ and ‘‘ or ’’ can be shown to be logically equivalent. Indeed, replacing and with their negations in the conclusion of Remark 2.3.4(i) above, we see that ‘‘ or ’’ is logically equivalent to ‘‘’’, and cancelling the double negations, we conclude that this is logically equivalent to ‘‘’’. (Alternatively, this can be proved directly using truth tables; see Exercise 1.13 for details.)
This result implies in particular that the connective ‘‘’’ can be expressed in terms of the connective ‘‘or’’ and the negation. More precisely, if we negate both compound statements above, then we see that ‘‘’’ is logically equivalent to ‘‘’’.
Let and be statement variables. The contrapositive of the statement ‘‘’’ is ‘‘’’.
Show that the compound statement ‘‘’’ is logically equivalent to its contrapositive ‘‘’’.
Solution. We construct the truth tables.
T | F | F | T | ||
---|---|---|---|---|---|
F | T | F | F | ||
T | F | T | T | ||
T | T | T | T |
As the third and sixth columns are the same, we conclude that the statements ‘‘’’ and ‘‘’’ are logically equivalent. This result is called the law of contraposition and will be important in our study of proof techniques in the next chapter.
Show that the two compound statements ‘‘’’ and ‘‘’’ are logically equivalent.
Solution. We construct the truth tables.
T | F | F | F | ||
F | T | T | T | ||
T | F | F | F | ||
T | F | T | F |
As the fourth and sixth columns are the same, we conclude that the statements ‘‘’’ and ‘‘’’ are logically equivalent. Again, this result will be useful when we shall study proofs in the next chapter.