Propositional Logic

Chapter 5
Propositional Logic
A proposition is a statement of some alleged fact which must be either true
or false, and cannot be both. It is important to note the status of this
statement: this is not some emergent property of things that exist called
“propositions”. Rather it is implicit in the definition of the mathematical
(or philosophcal) objects that we term propositions. When we choose to
view something as a proposition, it is precisely because we are prepared
to sign up to these conditions, just as when we choose to call something a
“set” we accept that order and repetition can have no role to play. Thus,
if we choose to call “it is raining”a proposition, we are accepting that there
will be no quibbling along the lines of “well, it’s sort of raining, but not
quite, although I wouldn’t say it isn’t raining”. Similarly, we can’t play
games like “of course, it must be raining somewhere, but not here”. If we
want to allow for more complex situations like these, the route is easy: don’t
use propositions!
Here are some examples of pretty good candidates to be called propositions:
1. Paris is the capital of France.
2. Jennifer is a popular English boy’s name.
3. 2 + 3 = 8
4. Hatfield is north of London.
Propositions 1 and 4 above have the value “true”; propositions 2 and 3
have the value “false”.
Exercise 5.1 Which of the following are good candidates to be called propositions? (A non-trivial exercise!)
1. Come back to my place, baby!
79
2. I have stopped smoking.
3. (> 3 2)
4. (= x 3)
5. Not all statements are propositions.
6. There is a number less than seven and greater than nine.
7. 3 × 4 = 8.
8. Formal notations give me a headache.
9. Is this really mathematics?
We can express the properties of propositions as three laws. Here are the
first two:
Law 5.1 (Excluded Middle) A proposition is true or false, there can be
no middle ground.
Law 5.2 (Contradiction) A proposition cannot be both true and false.
These laws are not optional! They define what it means for something to
be a proposition. It is inconceivable for the laws to be broken.
Our first two laws tell us that we can see any proposition as having just
one of two possible values. Because the logic was developed originally to
talk about human reasoning . . . i.e. natural language propositions . . . it was
natural to call these values “true” and “false”. However, we could just as
well view the two values as “1” and “0” (or “0” and “1”), or as “on” and
“off”, or “yes” and “no”, or “hot” and “cold”, or “full” and “empty”. The
only criteria for the two values are that there are only two of them, and that
each can be viewed in some sense as the “opposite” of the other.
5.1
A Language for Representing Propositions
Here’s the definition of the formal language we are going to use to represent
propositions.
The alphabet is
{P, Q, R, . . . , P1 , Q1 , . . . , ∧, ∨, =⇒, ⇐⇒, ¬, (, )}
The letters are going to be use to denote proposition: we include enough
symbols from P, Q, R, . . ., subscripted if necessary, to ensure that we never
run out. We call propositions denoted by a single letter “simple”. The
rest of our language is used to construct more complex forms out of simple
propositions: these more complex forms are called “compund” propositions.
80
You might like to think of the analogy with arithmetic: “5” is a simple
number, “4+3” is another number, 7, but it is expressed in a compound
form, in terms of two simple numbers “4” and “3”. We will call the wffs in
our language sentences, as that is the common term in logic. We need to
consider both the syntax and semantics of these compound forms: we will
start with the syntax.
The syntax1 is given by the grammar rule
sentence = P | Q | R | . . . | P1 | Q1 . . .
| ¬sentence
| ( sentence ∨ sentence )
| ( sentence ∧ sentence )
| ( sentence =⇒ sentence )
| ( sentence ⇐⇒ sentence )
We can illustrate the grammatical structure of compound propositions
with parse trees (we will return to these later in the course). Here are the
parse trees for the two expressions (P ∧ Q) and (¬P ∨ (Q ∧ R)).
sentence
(
sentence
P
^
sentence
sentence
Q
)
sentence v
(
(
sentence
sentence ) ( sentence
¬ sentence
Q
)
^
sentence
)
R
P
Figure 5.1: Parse Trees
We shall allow ourselves to drop the outermost pair of brackets which
the grammar rule generates round any sentence which is a string of more
than two symbols. So, we shall write P ∧ Q, rather than (P ∧ Q). Of course,
1
The grammar is given using a slightly different meta-language to that seen earlier in
the course. By this stage, however, you should be able to understand simple variants like
this without too much difficulty.
81
if we later want to connect P ∧ Q to R using the symbol ∨, we will have to
put the brackets back, . . . (P ∧ Q) ∨ R. And, if we want to parse it strictly,
we shall have to put the outer brackets back as well . . . ((P ∧ Q) ∨ R). This
is another example of where we usually drop formality in favour of common
sense - the outermopst brackets do not add anything, they are only a byproduct of the grammar, necessary only for the construction of compound
forms.
Exercise 5.2 Allowing ourselves to drop the outermost pair of brackets,
which of the following are sentences according to our grammar? For those
that are, draw the parse trees (putting the outermost brackets back in).
1. P ∧ Q
2. ∧P
3. P =⇒ Q
4. ¬P
5. ¬P ∧ Q
6. ¬(P ∧ Q)
7. P ∧ Q ∨ R
8. (P ∧ Q) =⇒ R
9. P ∧ (Q =⇒ R)
10. P ∧ ∨Q
11. P ∧ ¬Q
5.2
A Semantic for this Language
All we have so far is an alphabet of symbols, and a grammar, which allows
us to recognise the sentences of the language. Thus we have the syntax for
our language. But we currently have no semantics (except for the opening
paragraphs, which sugggests we are interested in propositions).
We are going to give this language a semantics which allows us to interpret as simple propositions sentences of length 1, and interpret as compound
propositions sentences of length greater than 1.
82
5.3
Naming Simple Propositions
Clearly, the statements “Smythe has enormous ears” and “Smythe’s ears
are enormous” could easily represent the same proposition (if we take for
granted the existence of Smythe’s ear). Similarly, 7 > 6 and 6 < 7 normally
represent the same proposition. There is no reason why we can’t name all the
representations of a proposition, just as we can name all the representations
of a particular set. We use our interpretation of sentences like P and Q in
our formal language to denote simple propositions. We will use the symbol
=
to give names to things, ie. to define the meaning of symbols2 .
For example, we may write. . . P =
“Smythe’s ears are enormous”. Alternatively, we may want to say something about any proposition; for example: Let P be a proposition. In this case P doesn’t represent any particular
proposition, so we know absolutely nothing about it, except that, because
it represents a proposition it is either true or false.
5.4
Compound Propositions Using ∧ and ∨
Consider this proposition . . .
It is hot and we are eating rice pudding.
We can view this as a simple proposition, P , so that
P=
“It is hot and we are eating rice pudding”
but, we might reasonably decide that it is made up of two simpler propositions . . .
Q=
“It is hot”
and
R=
“We are eating rice pudding”
Now we have a compound proposition which we could write “Q and R”.
You will probably agree that the compound proposition will only be true if
both the simple propositions are true. The connective ∧ from our formal
language may be interpreted as this “and”, so we write Q ∧ R.
Now consider this proposition . . .
He’s very stupid or very brave.
Again, we may choose to view this as a compound of two simpler propositions:
He is very stupid.
He is very brave.
2
As usual, we will frequently slip into the bad mathematician’s habit of abusing concepts of equality, and write P = . . . when it is pretty obvious what we mean. Be careful,
however, for there are times in logics when the different forms of equality are very important.
83
. . . but this time they are connected by the word “or”. This is a bit trickier.
Does the compound proposition mean “He is very stupid or very brave but
not both”, or does it mean “He is very stupid or very brave or perhaps
both”? We can’t be sure from the natural language statement. (You will
probably recognise that here we are grappling with the difference between
“exclusive or” and “inclusive or”.)
For the moment, suppose the compound proposition means “He is very
stupid or very brave or both”. You will then agree that the compound
proposition must be true when either one or both of the simple propositions
are true.
The connective ∨ from our formal language may be sensibly read as what
we mean by “inclusive or”. We will interpret the compound proposition
P ∨ Q as true if and only if one, or both, of P and Q individually interprets
to true.
You may find it helpful to realise that the two symbols ∧ and ∨ are the
same way up as the symbols for set intersection and union repectively: this
is no accident! A ∩ B is the set of things in both A and B, A ∪ B is the set
of things in A or B.
Even though the translation of ∧ and ∨ as “and” and “or” seems reasonable, we need to be very careful when we come to represent natural language
propositions by sentences in our formal language.
One way of using up left-over mashed potato and cabbage is to fry it up
together with a beaten egg or some milk: the result is known as “bubble
and squeak”, possibly because of its affect on the digestion! It would clearly
not be sensible to view the proposition
I love bubble and squeak
as a compound P ∧ Q, where
P=
“I love bubble”
Q=
“I love squeak”
and
Here’s another possible way of getting into trouble!
The winner gets a thousand pounds in cash or a holiday in the Bahamas.
Here, the representation . . .
“The winner gets a thousand pounds” ∨
“The winner gets a holiday in the Bahamas”
. . . is, unfortunately for the winner, almost certainly incorrect! (Why?)
Exercise 5.3 Try to express the following English sentences in propositional logic: there are no unique right answers, so you might be able to
think of more than one possible way of doing it. In general, it’s a good
idea to frame propositions positively; so, for example, in number 10 the
proposition would be C = ‘I am a crook’ and the answer, therefore, ¬C.
84
1. Arsenal are good, but Leeds are very good.
2. He likes Jane and Sarah.
3. It is raining cats and dogs.
4. It is not hot or windy.
5. You can have either fame or happiness.
6. He speaks English and French or German.
7. You can have eggs or bacon and beans or sausages.
8. Either that man’s a fraud or he’s your brother.
9. If 14 year olds had the vote, I’d be president. (Evel Knieval)
10. I am not a crook (Richard Nixon)
11. The club will raise ticket prices and/or get more TV revenue. (Miami
Dolphins)
12. I can either run the country or control Alice - not both. (Theodore
Roosevelt)
5.5
Truth Tables
Although, so far, we have looked at only two connectives, ∧ and ∨, before
we go on we will show how the semantics of compound propositions can be
concisely represented in a tabular form, commonly known as a “truth table”.
Here is a truth table that allows us to interpret P ∧ Q for each possible
combination of interpretations of P and Q individually.
P
T
T
F
F
Q P ∧Q
T
T
F
F
T
F
F
F
This is called the truth table for P ∧Q. At the risk of explaining the obvious,
we read the table row by row. In each row, the first two columns give us
one of the possible combinations of interpretations for P and Q individually,
and the third column gives us the corresponding interpretation of P ∧ Q.
Here is the truth table for P ∨ Q:
P
T
T
F
F
Q P ∧Q
T
T
F
T
T
T
F
F
85
5.6
Truth Functionality
If we were to ask, “Why is it that we are able to construct truth tables?”
you might say, “What do you mean? Obviously, it’s because we can work
out the truth value of a compound proposition from our understanding of
the connectives and the truth values of the simple propositions that make
it up.” You’d be quite correct! However, this does mean that we must not
view as compound of two propositions any statement whose value cannot be
thus deduced. Let’s look at an example:
John is cold because he’s wet.
It is very tempting to split it into two simple propositions.
John is cold.
John is wet.
and then produce a connective in our propositional logic which can be “read
as” because. Suppose for a few moments that we had such a connective:
let’s use the symbol to represent this “because connective”, and have a
go at drawing a truth table. Here’s the beginnings of it, showing all possible
combinations of truth values for the two simple propositions
John is cold John is wet John is cold John is wet
T
T
?
T
F
?
F
T
?
F
F
?
Now, how are we to fill in the last column? That is, how are we to arrive
at the truth or falsity of P Q simply by examining the individual truth or
falsity of P and Q? We simply can’t!
For the top row of truth values in the table, if we examine John, and
prove to ourselves he is indeed cold, and he really is wet, we still can’t say he
is cold because he’s wet. He may be cold because he fell in a lake of freezing
water, so that his wetness did cause his coldness. On the other hand he
may be cold from the wind, and may now be sitting wetly in a bath of hot
water trying to warm up! You may be able to fill in the “?” column for the
other three rows to your satisfaction . . . for example, for row 2 you might
say “If he isn’t wet then the compound proposition that he’s cold because
he’s wet must be false”. Nevertheless, our inability to fill in the top row is
quite sufficient for us to reject the idea of allowing a “because” connective
into our logic.
Note that calling something a compound proposition where we can’t
deduce the truth or falsity of the compound from the truth or falsity of
the simple propositions that make them up are banned by the third law of
propositional logic:
86
Law 5.3 (Truth Functionality) The truth value of a compound proposition
is uniquely determined by the truth values of its constituent parts.
Once again, this is not some emergent property that we need to “understand”,
but a condition we must accept before we can use the formal system.
It is the “causal” relationship between Jack’s coldness and his wetness
that gives rise to the problem: we say that “because” is not a truth f unctional
connective. Note that this law doesn’t say we can’t work with “John is cold
because he is wet” as a single simple proposition.
5.7
Compound Propositions Using ¬
There is another way to construct compound propositions, but this time
from just one simple proposition, using the symbol ¬ which has the following
truth table:
P
T
F
¬P
F
T
It is easy to see why ¬ is often called “negation” and read as “not”. If a
proposition P is true, then ¬P is false, ¬¬P is true, and so on. If P is false,
then ¬P is true, and so on.
You may find it a little difficult to see ¬P as a “compound” proposition
at all. This is a reasonable point, but since it isn’t just a simple proposition,
P , we shall view it as a compound: we gave ourselves only these two choices.
5.8
Compound Propositions Using =⇒
Consider the simple propositions:
Your name is Frank.
and
Your name has 5 letters in it.
Now, what’s your name? Suppose you are called Frank, then both the
propositions above are true when applied to you. Suppose you are called
Leroy? Well, in that case, the first is false but the second is true. Suppose
you are called John, then both are false. Are there any circumstances under
which the first is true and the second false? No!
Now consider the compound proposition:
If your name is Frank then your name has 5 letters in it.
87
Whatever your name, Frank, John or Leroy, I hope you would agree that
this proposition is true. The only way we could demonstrate it to be false
would be to find someone called Frank whose name didn’t have five letters
in it!
So, an “If P then Q” statement is false only when the “P” is true and
the “Q” is false. For our example about names and lengths of names, we
can construct the annotated truth table shown in figure 5.2. Of course, the
second line of truth values is impossible to arrive at for this example (unless
you are quite stunningly bad at counting!)
Your name is Frank
Your name has 5 letters in it
If your name is Frank
then your name has 5 letters in it
T
(You are called Frank)
T
(There are 5 letters in Frank)
T
(The compound is true)
T
(You are called Frank)
F
(Suppose there were
6 letters in Frank!?)
F
(The compound would be false!!)
F
(You’re Leroy, not Frank)
T
(There are 5 letters in Leroy
but who cares!! )
T
(If you were Frank
the compound would be true)
F
(You’re John, not Frank)
F
(There 4 letters in John
but who cares!!)
T
(If you were Frank
the compound would be true)
Figure 5.2: Annotated Truth Table
Here’s another example: consider the simple propositions:
The animal has wings
and
The animal’s name has 5 letters in it
A slightly eccentric naturalist has four pets, two parrots called Frank and
Georgina, and two gorillas called Peter and Geraldine. The naturalist makes
the following statement about his pet collection.
If the animal has wings then the animal’s name has 5 letters in it.
Can you find an animal and name pair that makes this proposition false?
Yes, but only by choosing the parrot called Georgina! We might consider
the proposition
If a gorilla has wings then its name has 5 letters in it.
88
to be rather a silly thing to state: but we can’t falsify it! Any statement
that starts off with an “impossible if” evaluates to true.
You may feel we are taking some liberties with “what we normally mean
by ‘If . . . then’, but are we really? For example, we normally consider statements like “If you can learn French from scratch by tomorrow then I’m a
Dutchman” to be “true” precisely on the grounds that the “If part” is false,
so any consequence can be truly deduced.
Here’s another example: when you state the proposition
If Floppo the Third wins the 2.30 at Epsom then I’ll eat my hat.
you do so in confidence that Floppo is going to flop it and lose, so that
you will have spoken truly without needing to eat your hat! Maybe you go
ahead and eat your hat anyway when Floppo loses (just because you have a
secret passion for hat-eating), but that won’t have any effect on the “truth”
or otherwise of your proposition, will it? On the hand if Floppo wins, you
will need to consume the headgear in order to make your proposition true!
As long as we get to grips with the hidden subtleties of “If . . . then”
statements (many of which we ignore most of the time in our day-to-day
use of English) we can interpret the compound P =⇒ Q as “If P then Q”.
An alternative reading is “P implies Q”, so the arrow, =⇒ is often called
“implication”.
The truth table for P =⇒ Q is:
P
T
T
F
F
Q P =⇒ Q
T
T
F
F
T
T
F
T
Compare the arguments given in the examples that open this section of
the notes with the truth table. Note carefully that the only circumstance
under which P =⇒ Q evaluates to false is when P has the value true and Q
has the value false.
This is the connective that usually presents problems for students, and
the reason is easy to understand: people confuse logical implication (as
defined entirely by the truth tables above) with causal implication. The
sentence
If I hit this nail with a hammer then it will go into the wood.
could be presented as P =⇒ Q, but to most people the english actually
means
The nail is going into the wood because I hit it with the hammer.
89
but we have already seen the difficulties of capturing causality, and agreed
that we can’t do it whilst preserving truth functionality, one of the laws
we sign up to with propositional logic. Thus if we capture the something
as P =⇒ Q, we are choosing to abstract away from causality, and can’t
subsequently bring it back in. It is the desire to think causally whilst using
propositional logic that generally makes students flounder: if, instead, you
accept the law of truth functionality, most of the problems go away.
5.9
Compound Propositions Using the Connective
⇐⇒
There is a significant difference between the following two propositions:
If the animal has wings then the animal’s name has 5 letters in it.
from our earlier example about the eccentric naturalist, and
If you are in the southern hemisphere then you are south of the equator.
As we have seen, for the first, if the animal doesn’t have wings it may or may not
have five letters in its name . But, if you are not in the southern hemisphere
then you are definitely not south of the equator either, so although
You are in the southern hemisphere =⇒ You are south of the equator
is certainly true, we can in fact say something stronger. The connective ⇐⇒
allows us to say If P then Q, and if not P then not Q either. That is the
interpretation we give P ⇐⇒ Q. P ⇐⇒ Q evaluates to true only when P
and Q are both true or when P and Q are both false.
Here’s the truth table for ⇐⇒, to complete our collection!
P
T
T
F
F
5.10
Q P ⇐⇒ Q
T
T
F
F
T
F
F
T
Generalising Truth Tables
It is fairly obvious that our truth tables can be generalised by replacing
the simple propositions P and Q by compound propositions. The table
is really only about what truth values you get when you combine pairs of
other truth values, so it will “work” perfectly well if P and Q are compound
propositions.
We shall be a bit fussy, and use curly letters like A, B, etc., to name
compound propositions. It would, strictly, be cheating to use P, Q, etc.,
90
because we have already decided to use them for simple propositions. These
curly letters are, of course, not part of our alphabet: we are using them,
along with T and F , as part of our meta-language for giving semantics to
our sentences.
Here’s the general truth table for ∧, ∨, =⇒ and ⇐⇒. (You can copy the
one for ¬ onto this page if you want to complete the picture):
A
T
T
F
F
B A ∧ B A ∨ B A =⇒ B A ⇐⇒ B
T
T
T
T
T
F
F
T
F
F
T
F
T
T
F
F
F
F
T
T
We are now in a position to find all possible interpretations of any sentence
of propositional logic, however complicated, by applying the “rules” in the
general truth table above to the “sub-sentences” it is composed of:
Example 5.1 Suppose we want to examine the potential interpretations of
¬((P ∨ Q) =⇒ Q), for all combinations of the truth values of P and Q. First
we need to reveal the structure of the sentence:
3
1
¬( (P ∨ Q)
=⇒ Q)
2
We can now draw a truth table, just as we did for each of the connectives.
The table needs to contain a row for each combination of interpretations
of the relevant simple propositional symbols, P, Q, R . . . contained in the
sentence that we want to consider, and a column for every sub-expression
used in building up the complex expression. Here is the truth table. Make
sure you can see why we have these columns, and not, for example, a column
headed ¬(P ∨ Q)
P
T
T
F
F
Q (P ∨ Q) ((P ∨ Q) =⇒ Q) ¬((P ∨ Q) =⇒ Q)
T
T
T
F
F
T
F
T
T
T
T
F
F
F
T
F
Exercise 5.4 Draw a truth table to show all possible interpretations of the
expression
¬(P ∨ Q) =⇒ Q. Compare it with the expression and table in Example 5.1.
Example 5.2 Here is a truth table to show all possible interpretations of
((P ∧ Q) ∨ ¬R) ⇐⇒ P
91
P
T
T
T
T
F
F
F
F
Q
T
T
F
F
T
T
F
F
R (P ∧ Q) ¬R ((P ∧ Q) ∨ ¬R) ((P ∧ Q) ∨ ¬R) ⇐⇒ P
T
T
F
T
T
F
T
T
T
T
T
F
F
F
F
F
F
T
T
T
T
F
F
F
T
F
F
T
T
F
T
F
F
F
T
F
F
T
T
F
Exercise 5.5 How many rows will there be in a truth table showing all
possible interpretations of a sentence containing n simple propositions?
Exercise 5.6 Draw up truth tables to show all possible interpretations of
each of the following:
1. P ∧ (P ∨ Q)
2. (P ∨ Q) ∧ (P =⇒ Q)
3. ¬P ∧ (P ∨ (Q =⇒ P ))
4. (P ∧ (Q ∨ P )) ⇐⇒ P
5. (P =⇒ Q) =⇒ (¬P ∨ Q)
5.11
The Semantic Turnstile
We are about to make an important transtion, from working within our
formal system to making Statements about Sentences in our Logic.
So far we have seen how to express propositions in a formal language,
but what can we do with them? The motivation for studying logic was to
allow us to formalise the reasoning process. For example, we wanted to be
able to reflect arguments such as
If the cabbage is tough then granny is using her false teeth.
Granny is using her false teeth. Therefore the cabage is tough.
and see if the deduction is valid. Note carefully that our language so far
allows us to express propositions, not properties of sets of propositions. In
order to allow such meta-level discussion we will need to introduce some
meta-langauge: ensure that you understand this point. Before we consider
the question of valid deduction in English, let us explore the mechanisms we
will need in the formalism.
Here are some examples.
92
Example 5.3 The following are correct statements about the semantics of
sentences of propositional logic. (Make sure you are convinced they are
indeed correct!)
1. Whenever both the sentences P and Q evaluate to true, so does the
sentence P ∧ Q.
2. Whenever both the sentences P and P =⇒ Q evaluate to true, so does
the sentence Q.
3. The sentence P ∨ ¬P always evaluates to true (regardless of the truth
of P ).
It’s clearly going to be useful to be able to make such statements, for the
same kind of reasons as it is useful to be able to say “3 + 4 has the same
value as 7”, or “x + y has the same value as y + x”.
We introduce two meta-symbols in order to do so, |=, known as the
semantic turnstile, and an ordinary-looking comma (,). We could wrap this
up as another formal language, but we will work informally here, as the
grammar is pretty simple.
Here are natural language statements of our last example, again: each
is followed by its expression in our new meta-language:
1. Whenever both the sentences P and Q evaluate to true, so does the
sentence P ∧ Q.
P, Q |= P ∧ Q
2. Whenever both the sentences P and P =⇒ Q evaluate to true, so does
the sentence Q.
P, P =⇒ Q |= Q
3. The sentence P ∨ ¬P always evaluates to true (regardless of the truth
of P ).
|= P ∨ ¬P
You can see that the way to “read” a meta-language statement of the form
S |= A, where S is some (possibly empty) collection of sentences is as follows:
“Whenever the collection of sentences on the left of the turnstile
are all true, so is the sentence on the right”.
This is often stated alternatively like this
“The sentence on the right of the turnstile is a logical consequence of
the collection of sentences on the left of the turnstile”
93
In the special case where there are no sentences on the left, we can simply
say “The sentence on the right always has the value true”.
We can, of course, use truth tables to demonstrate the correctness of
such statements.
Example 5.4 Here is a truth table which shows that P , P =⇒ Q |= Q
P
T
T
F
F
Q P =⇒ Q
T
T
F
F
T
T
F
T
Thus P, P =⇒ Q |= Q since whenever the two sentences, P and P =⇒ Q, on
the left hand side are interpreted as true (namely in row one) the sentence,
Q, on the right is true. Note that for this task we don’t care about rows in
the truth table where the propositions on the left of the turnstile are not all
true.
Sometimes we have compound sentences that are true regardless of the
truth values of the simple propositions being used. In this case, we use the
same notation, but we don’t indicate any simple propositions on the left
of the turnstile, to indicate that the truth of the compound form does not
depend on anything.
Example 5.5 Here is a truth table that shows |= P ∨ ¬P .
P
T
F
¬P
F
T
P ∨ ¬P
T
T
As the final column only contains true on every row, we can claim that
|= P ∨ ¬P .
Exercise 5.7 Draw truth tables to show the following
1. P ∧ Q |= P ∨ Q
2. ¬P, P ∨ Q |= Q
3. |= (P =⇒ Q) ⇐⇒ (¬P ∨ Q)
4. (Q ∨ P ) =⇒ R |= Q =⇒ R
5. |= P =⇒ (P ∨ Q)
If you’re on your toes, you may have noticed some apparent similarity between, for example, the meta-language statement P |= P ∨ Q and the sentence of propositional logic, P =⇒ (P ∨ Q).
94
Exercise 5.8 Draw up a truth table for P =⇒ (P ∨Q). You should discover
it is true for all combinations of values of P and Q. That is, that we can
also correctly state |= P =⇒ (P ∨ Q)
The last exercise provides a particular example of a general point. If S
is some collection of propositions, and A is some proposition, then, if we
know that S |= A, the proposition formed by “anding together” all of the
sentences in the collection S, and following them by the =⇒ connective with
A on the right of the =⇒ will be true for all values of the simple propositions
involved. What a mouthful! Let’s try it out.
Exercise 5.9 (In this exercise you may prefer to add extra columns onto
the truth tables from Exercise 5.7, rather than starting from scratch.)
1. In Exercise 5.7.1 you showed
P ∧ Q |= P ∨ Q
Now draw up a truth table to show that (P ∧ Q) =⇒ (P ∨ Q) is always
true, whatever combination of values is chosen for P and Q. (You
may feel this is so obvious that you don’t need to draw the table:
fine!) Having convinced yourself of this, you are then entitled to write
down |= (P ∧ Q) =⇒ (P ∨ Q).
2. In Exercise 5.7.2 you showed
¬P, P ∨ Q |= Q
Now draw up a truth table to show that (¬P ∧ (P ∨ Q)) =⇒ Q is
always true, whatever combination of values is chosen for P and Q.
Having convinced yourself of this, you are then entitled to write down
|= (¬P ∧ (P ∨ Q)) =⇒ Q.
3. In Exercise 5.7.5 you showed
(Q ∨ P ) =⇒ R |= Q =⇒ R
Now draw up a truth table to show that ((Q ∨ P ) =⇒ R) =⇒ (Q =⇒
R) is always true, whatever combination of values is chosen for P and
Q. Having convinced yourself of this, you are then entitled to write
down |= ((Q ∨ P ) =⇒ R) =⇒ (Q =⇒ R).
So, there is a connection between |= and =⇒, but note that when we write
down a proposition like P =⇒ (P ∨ R) or P =⇒ Q we do so on the understanding it may evaluate to true or false for some values of P , Q, R.
When we write down |= P =⇒ (P ∨ R) we do so in the knowledge that
it is always true. Of course |= P =⇒ Q is not a correct statement of the
meta-language, because when P is true and Q is false P =⇒ Q is false.
95
Exercise 5.10 Draw up a truth table to show that both the following are
correct:
P =⇒ Q |= ¬P ∨ Q
and
¬P ∨ Q |= P =⇒ Q
Having done that, you can of course write down:
|= (P =⇒ Q) =⇒ (¬P ∨ Q)
and
|= (¬P ∨ Q) =⇒ (P =⇒ Q)
that is, “the implication is always true in both directions”. Now, by inspecting your truth table, and having a think, convince yourself that if two
sentences “turnstile both ways” then they always have the the same truth
value for each particular combination of values of the simple propositions
that make them up.
Now add a column to your truth table to show that |= (P =⇒ Q) ⇐⇒
(¬P ∨ Q) is a correct meta-language statement.
5.12
Classifying Sentences
As we have just seen, some sentences always interpret to true regardless of
the interpretation of the simple propositions they contain. For example, any
sentence of the form (A ∨ ¬A) will always be true as it is effectively just a
statement of the law of the excluded middle. A sentence which takes the
value true for every interpretation of its constituent parts is said to be valid
or is called a tautology. Of course, another way of saying “A is a tautology”
is to write |= A.
Some sentences will always interpret to false, such as any of the form
(A ∧ ¬A): if this were not the case then A could not be a proposition as it
would break the law of contradiction. A sentence which always interprets
to false, regardless of the truth values of its constituent parts, is called an
inconsistency , or is said to be inconsistent.
A sentence which takes the values true and false depending on the interpretations of its constituent parts, is called a contingency. If you draw up a
truth table for ¬((P ∨ Q) =⇒ Q) you will see this sentence is a contingency;
it is contingent on, or depends on, the values of P and Q.
Sentences which take the value true under at least one possible interpretation are said to be consistent. Thus tautologies and contingencies are
consistent, but inconsistencies are (obviously!) not.
Exercise 5.11 Classify the sentences of Exercise 5.6 under the headings
tautology, contingency, and inconsistency.
5.13
Valid Deduction in Natural Language
We now have sufficient background to tackle the formalisation of some arguments in English. Let us start with our familiar problem
96
If the cabbage is tough then granny is using her false teeth.
Granny is using her false teeth. Therefore the cabage is tough.
We will formalise this as follows.
P =T
he cabbage is tough
Q=Granny
is using her f alse teeth.
Thus our first premise is P =⇒ Q the second becomes Q and we want to
ask whether if we accept that the premises are true the truth of the
conclusion, P , always follows. But this is precisely what we were asking
when we looked at the semantic turnstile, thus the validity of the argument
can be formalised by checking whether
P =⇒ Q , Q |= P
and, as a simple truth table will show, the answer is no. Thus this is not a
valid form of argument.
Exercise 5.12 Formalise the following statements and check their validity
by using the semantic turnstile.
1. If Susan is eating porridge then Wendy is watching TV. Susan is eating
porridge. Therefore Wendy is watching TV.
2. If Christopher is playing pooh-sticks then Ivan is tall. Ivan is not tall.
Therefore Christopher is not playing Pooh-sticks.
3. If Albert is standing up then Sally is hungry. Albert is not standing
up. Therefore Sally is not hungry.
4. If Ernest is singing then Mary is 18. Mary is 18. Therefore Ernest is
singing.
5. It is always the case that either it is raining or if the moon is made of
green cheese it is not raining.
5.14
Equivalence
|= (P =⇒ Q) ⇐⇒ (¬P ∨ Q) in Exercise 5.10 tells us that the sentences
(propositions) (P =⇒ Q) and (¬P ∨ Q) always have the same truth value.
If two sentences always have the same truth value then they are said to
be equivalent, just as if two arithmetic expressions have the same numeric
value they too are said to be equivalent. Note that equivalence is a semantic
concept: the two “sides” of the equivalence have the same truth value, or
“meaning”.
97
We could, of course, show equivalence using a double turnstile symbol,
thus:
P =⇒ Q=| |= ¬P ∨ Q
However, we shall use the symbol ≡ in this context3 , thus:
P =⇒ Q ≡ ¬P ∨ Q
This piece of notation is by no means universal, and many writers on logic
do not introduce the idea of equivalence at all. This is because, as you
can deduce from Exercise 5.10 A ≡ B is the case precisely when A ⇐⇒ B
is a tautology, so we can always express P =⇒ Q ≡ ¬P ∨ Q by writing
|= (P =⇒ Q) ⇐⇒ (¬P ∨ Q) instead . . . no real need for the ≡ symbol,
therefore: we just think it makes things look a little simpler!
There are a number of useful properties of our propositional logic that
can be expressed as equivalences, and some of these are given below.
Idempotent Properties
A ∧ A ≡ A and A ∨ A ≡ A
Commutative Properties
A ∧ B ≡ B ∧ A and A ∨ B ≡ B ∨ A
Associative Properties
(A ∧ B) ∧ C ≡ A ∧ (B ∧ C) and (A ∨ B) ∨ C ≡ A ∨ (B ∨ C)
Distributive Properties
A ∨ (B ∧ C) ≡ (A ∨ B) ∧ (A ∨ C) and A ∧ (B ∨ C) ≡ (A ∧ B) ∨ (A ∧ C)
De Morgan’s Rules
¬(A ∨ B) ≡ ¬A ∧ ¬B and ¬(A ∧ B) ≡ ¬A ∨ ¬B
Double Negation Property
¬¬A ≡ A
You may like to prove some of these equivalences using truth tables.
Equivalences are very useful because we can clearly substitute equivalent
expressions in a sentence of propositional logic without changing its truth
value (our law of truth functionality ensures this). So, if we have a compound proposition W which contains the compound A within it, and if A
is equivalent to B we can replace any or all the A’s in W by B.
3
Yet another sort of equality!
98
Example 5.6 Given that
P =⇒ Q ≡ ¬P ∨ Q
then we may replace any expression of the form P =⇒ Q by the equivalent expression ¬P ∨ Q. For example, we may rewrite (P =⇒ Q) ∨ R as
(¬P ∨ Q) ∨ R.
We can also generalise equivalences. Any equivalence expressed in terms
of simple proposition symbols can have its simple proposition symbols replaced consistently by other simple or compound propositions, as long as
the substitution will not cause any confusion (for example, by introducing
a letter already being used somewhere else). This rule actually means that
we were being a bit fussy insisting on using A, B . . . we could have just used
P, Q, R . . . and generalised all the results.
Example 5.7 Given that
P ∧P ≡P
then we can generalise this to give
(¬P ∨ Q) ∧ (¬P ∨ Q) ≡ (¬P ∨ Q)
These rules give us an alternative way of reasoning about equivalences, or
about properties of propositions like tautology and inconsistency. Instead
of using truth tables, which can be very large if there are more than two or
three simple proposition symbols, we can use our laws of equivalences and
manipulate one expression to show it is equivalent to another, or show it
is a tautology, and so on. Of course, to be convincing we need to explain
carefully our justification for each step in the manipulation. In essence, we
have created an algebra of propositions, just as we had analgebra of sets,
relations and functions earlier.
Example 5.8 We shall show that
A ∧ B ≡ (A ∧ B) ∧ (A ∨ B).
It is usually easier to try to simplify the more complicated looking side,
rather than complicate the simpler one! So we shall manipulate the right
hand side.
(A ∧ B) ∧ (A ∨ B)
≡ ((A ∧ B) ∧ A) ∨ ((A ∧ B) ∧ B)
∧ over ∨.)
(Using the Distributive Property for
≡ (A ∧ (A ∧ B)) ∨ ((A ∧ B) ∧ B)
of ∧ )
(Using the Commutative Property
≡ ((A ∧ A) ∧ B) ∨ (A ∧ (B ∧ B))
∧, twice!)
(Using the Associative Property of
99
≡ (A ∧ B) ∨ (A ∧ B)
≡ (A ∧ B)
(. . . Idempotency of ∧, twice.)
(. . . Idempotency of ∨.)
≡ original left hand side.
QED (that is: “done it!”)
Example 5.9 A different use of the same kind of reasoning . . .
Given that P ∧ ¬P is an inconsistency (i.e. never true) let us show that
the truth value of (A ∨ B) ∧ (¬A ∨ B) depends only on the truth value of B
We haven’t many clues here, except that maybe we should try to isolate
an inconsistency of the form P ∧ ¬P within (A ∨ B) ∧ (¬A ∨ B)
(A ∨ B) ∧ (¬A ∨ B)
≡ (B ∨ A) ∧ (B ∨ ¬A)
≡ B ∨ (A ∧ ¬A)
(Commutative Property of ∨)
(Distributive Propery of ∨)
but A ∧ ¬A is an inconsistency (given) so it is always false. We know
from the truth table for ∨ that if B is or’d with false the result will be
true if and only if B is true. It follows that
(A ∨ B) ∧ (¬A ∨ B) ≡ B QED
If you are not convinced, construct a truth table.
Exercise 5.13 Without using truth tables . . .
1. Show that ¬(A ∨ ¬B) ≡ ¬A ∧ B
2. By applying Associative and Commutative Properties of ∧,
show that (A ∧ B) ∧ (C ∧ D) ≡ (B ∧ C) ∧ (A ∧ D)
3. Given that P =⇒ Q ≡ Q ∨ ¬P , and that P ∨ ¬P is a tautology, show
that B =⇒ (A =⇒ B) is a tautology.
4. Given that P ∧ ¬P is an inconsistency,
show that ¬(¬A ∨ B) ∧ ¬(¬B ∨ A) is an inconsistency.
5.15
Introducing T and F into our Formal Language.
The argument used in the final step of Example 5.9 was a bit of a fudge,
and probably took informality a bit too far, and you will have been dragged
into the same kind of problems at times in Exercise 5.13.
It is convenient to have a special symbol to denote propositions which
we know are true. This might arise when we have a particular interpretation
in mind or when we are dealing with a compound proposition that we can
100
see is a tautology, and hence must always be true. Similar arguments lead
to a need for a symbol to denote propositions that we know are false.
Well, we can have them if we want them: formal languages are man-made
after all. We shall introduce the symbol T to denote a proposition that is
always true and F to denote one that is always false. Don’t get confused
by the fact that we have been using these two symbols already in our truth
tables. In the truth tables they were used to give meaning (semantics) as
shorthands for “true” and “false”; now we are using them within our formal
notation. We also allowed their use in our language for any old proposition:
it would be daft, however, to name some proposition T or F , unless we
knew it was always true or false. Strictly, we should go back and upgrade
our alphabet and rewrite our language syntax, but we won’t bother, as we
are not interested in retaining complete formality at this stage.
Once we have T and F to play with we can derive several more useful
equivalences, for example, here is the truth table showing P ∧ T ≡ P .
T
T
T
P
T
F
P ∧T
T
F
From the truth table, we can see that P ∧ T ≡ P . This is useful, because
wherever we have (P ∧ T ) within a sentence, we may replace it by P .
Exercise 5.14 Not all of of the following are actually correct. Decide which
are correct. If you feel you need to, draw up truth tables to check your
decisions.
1. P ∧ ¬P ≡ F
2. P ⇐⇒ F ≡ F
3. P =⇒ T ≡ P
4. T =⇒ P ≡ P
5. ¬(T ∨ P ) ≡ F
6. T ∧ (¬P ∨ F ) ≡ P
7. |= P ∨ T
8. |= T =⇒ P
9. |= T ∧ P
10. |= T ⇐⇒ T
11. |= F =⇒ P
101
We shall now add the following to the list of equivalences on page 98,
and subsequently we, and you, may quote any of these results without proof:
Other Equivalences
(i) ¬T ≡ F
(iv) A ∧ F ≡ F
(vii) A ∨ ¬A ≡ T
(x) P =⇒ T ≡ T
(ii) ¬F ≡ T
(v) A ∨ T ≡ T
(viii) A ∧ ¬A ≡ F
(xi) F =⇒ P ≡ T
(iii) A ∧ T ≡ A
(vi) A ∨ F ≡ A
(ix) A =⇒ B ≡ ¬A ∨ B
(xii) (P =⇒ Q) ∧ (Q =⇒ P ) ≡ P ⇐⇒ Q
The two results P =⇒ T ≡ T and F =⇒ P ≡ T are particularly interesting, because they expose common problems that people have in reasoning
in these cases. Sentences of the following forms
If the Moon is made of green cheese then . . . .
and
If . . . then the Moon goes round the Earth
are both true, regardless of what fills in the . . . : problems arise,however,
if we forget the law of truth functionality, and mistakenly interpret our
sentences with causality.
102