Propositional Logics
Propositional Logics
197
198 3. Symbolic Logic and Proofs
Investigate!
You stumble upon two trolls playing Stratego®. They tell you:
Troll 1: If we are cousins, then we are both knaves.
Troll 2: We are cousins or we are both knaves.
Could both trolls be knights? Recall that all trolls are either
always-truth-telling knights or always-lying knaves.
Truth Tables
Here’s a question about playing Monopoly:
If you get more doubles than any other player then you will
lose, or if you lose then you must have bought the most prop-
erties.
True or false? We will answer this question, and won’t need to know
anything about Monopoly. Instead we will look at the logical form of the
statement.
We need to decide when the statement (P → Q) ∨ (Q → R) is true.
Using the definitions of the connectives in Section 0.2, we see that for this
to be true, either P → Q must be true or Q → R must be true (or both).
Those are true if either P is false or Q is true (in the first case) and Q is false
or R is true (in the second case). So—yeah, it gets kind of messy. Luckily,
we can make a chart to keep track of all the possibilities. Enter truth
tables. The idea is this: on each row, we list a possible combination of T’s
and F’s (for true and false) for each of the sentential variables, and then
mark down whether the statement in question is true or false in that case.
We do this for every possible combination of T’s and F’s. Then we can
clearly see in which cases the statement is true or false. For complicated
statements, we will first fill in values for each part of the statement, as a
way of breaking up our task into smaller, more manageable pieces.
Since the truth value of a statement is completely determined by the
truth values of its parts and how they are connected, all you really need
to know is the truth tables for each of the logical connectives. Here they
are:
P Q P∧Q P Q P∨Q P Q P→Q P Q P↔Q
T T T T T T T T T T T T
T F F T F T T F F T F F
F T F F T T F T T F T F
F F F F F F F F T F F T
The truth table for negation looks like this:
P ¬P
T F
F T
None of these truth tables should come as a surprise; they are all just
restating the definitions of the connectives. Let’s try another one.
200 3. Symbolic Logic and Proofs
Example 3.1.1
Example 3.1.2
Analyze the statement, “if you get more doubles than any other
player you will lose, or that if you lose you must have bought the
most properties,” using truth tables.
Solution. Represent the statement in symbols as (P → Q) ∨ (Q →
R), where P is the statement “you get more doubles than any other
player,” Q is the statement “you will lose,” and R is the statement
“you must have bought the most properties.” Now make a truth
table.
The truth table needs to contain 8 rows in order to account for
every possible combination of truth and falsity among the three
statements. Here is the full truth table:
P Q R P→Q Q→R (P → Q) ∨ (Q → R)
T T T T T T
T T F T F T
T F T F T T
T F F F T T
F T T T T T
F T F T F T
F F T T T T
F F F T T T
3.1. Propositional Logic 201
Logical Equivalence
You might have noticed in Example 3.1.1 that the final column in the
truth table for ¬P ∨ Q is identical to the final column in the truth table for
P → Q:
P Q P→Q ¬P ∨ Q
T T T T
T F F F
F T T T
F F T T
This says that no matter what P and Q are, the statements ¬P ∨ Q and
P → Q either both true or both false. We therefore say these statements
are logically equivalent.
Logical Equivalence.
Two (molecular) statements P and Q are logically equivalent pro-
vided P is true precisely when Q is true. That is, P and Q have
the same truth value under any assignment of truth values to their
atomic parts.
To verify that two statements are logically equivalent, you can
make a truth table for each and check whether the columns for the
two statements are identical.
202 3. Symbolic Logic and Proofs
Example 3.1.3
Are the statements, “it will not rain or snow” and “it will not rain
and it will not snow” logically equivalent?
Solution. We want to know whether ¬(P∨Q) is logically equivalent
to ¬P ∧ ¬Q. Make a truth table which includes both statements:
P Q ¬(P ∨ Q) ¬P ∧ ¬Q
T T F F
T F F F
F T F F
F F T T
Since in every row the truth values for the two statements are
equal, the two statements are logically equivalent.
P → Q is logically equivalent to ¬P ∨ Q.
Example: “If a number is a multiple of 4, then it is even” is
equivalent to, “a number is not a multiple of 4 or (else) it is even.”
3.1. Propositional Logic 203
With this and De Morgan’s laws, you can take any statement and
simplify it to the point where negations are only being applied to atomic
propositions. Well, actually not, because you could get multiple negations
stacked up. But this can be easily dealt with:
Double Negation.
Example 3.1.4
¬(¬P ∨ Q).
¬¬P ∧ ¬Q.
Notice that the above example illustrates that the negation of an im-
plication is NOT an implication: it is a conjunction! We saw this before,
in Section 0.2, but it is so important and useful, it warants a second blue
box here:
Negation of an Implication.
The negation of an implication is a conjuction:
That is, the only way for an implication to be false is for the hypoth-
esis to be true AND the conclusion to be false.
To verify that two statements are logically equivalent, you can use
truth tables or a sequence of logically equivalent replacements. The truth
204 3. Symbolic Logic and Proofs
table method, although cumbersome, has the advantage that it can verify
that two statements are NOT logically equivalent.
Example 3.1.5
Deductions
Investigate!
Holmes owns two suits: one black and one tweed. He always
wears either a tweed suit or sandals. Whenever he wears his
tweed suit and a purple shirt, he chooses to not wear a tie. He
never wears the tweed suit unless he is also wearing either a
purple shirt or sandals. Whenever he wears sandals, he also
wears a purple shirt. Yesterday, Holmes wore a bow tie. What
else did he wear?
If Edith eats her vegetables, then she can have a cookie. Edith
ate her vegetables. Therefore Edith gets a cookie.
How do we know this is valid? Let’s look at the form of the statements.
Let P denote “Edith eats her vegetables” and Q denote “Edith can have a
cookie.” The logical form of the argument is then:
P→Q
P
∴ Q
This is an example of a deduction rule, an argument form which is
always valid. This one is a particularly famous rule called modus ponens.
Are you convinced that it is a valid deduction rule? If not, consider the
following truth table:
P Q P→Q
T T T
T F F
F T T
F F T
This is just the truth table for P → Q, but what matters here is that
all the lines in the deduction rule have their own column in the truth
table. Remember that an argument is valid provided the conclusion must
be true given that the premises are true. The premises in this case are
P → Q and P. Which rows of the truth table correspond to both of these
being true? P is true in the first two rows, and of those, only the first row
has P → Q true as well. And lo-and-behold, in this one case, Q is also
true. So if P → Q and P are both true, we see that Q must be true as well.
Here are a few more examples.
Example 3.1.6
Show that
P→Q
¬P → Q
∴ Q
is a valid deduction rule.
Solution. We make a truth table which contains all the lines of the
argument form:
206 3. Symbolic Logic and Proofs
P Q P→Q ¬P ¬P → Q
T T T F T
T F F F T
F T T T T
F F T T F
(we include a column for ¬P just as a step to help getting the
column for ¬P → Q).
Now look at all the rows for which both P → Q and ¬P → Q
are true. This happens only in rows 1 and 3. Hey! In those rows Q
is true as well, so the argument form is valid (it is a valid deduction
rule).
Example 3.1.7
Decide whether
P→R
Q→R
R
∴ P∨Q
is a valid deduction rule.
Solution. Let’s make a truth table containing all four statements.
P Q R P→R Q→R P∨Q
T T T T T T
T T F F F T
T F T T T T
T F F F T T
F T T T T T
F T F T F T
F F T T T F
F F F T T F
Look at the second to last row. Here all three premises of the
argument are true, but the conclusion is false. Thus this is not a
valid deduction rule.
While we have the truth table in front of us, look at rows 1,
3, and 5. These are the only rows in which all of the statements
statements P → R, Q → R, and P ∨ Q are true. It also happens
that R is true in these rows as well. Thus we have discovered a new
deduction rule we know is valid:
3.1. Propositional Logic 207
P→R
Q→R
P∨Q
∴ R
Beyond Propositions
As we saw in Section 0.2, not every statement can be analyzed using
logical connectives alone. For example, we might want to work with the
statement:
In this case, we are using P(x) to denote “x is prime” and O(x) to denote
“x is odd.” These are not propositions, since their truth value depends
on the input x. Better to think of P and O as denoting properties of their
input. The technical term for these is predicates and when we study them
in logic, we need to use predicate logic.
It is important to stress that predicate logic extends propositional logic
(much in the way quantum mechanics extends classical mechanics). You
will notice that our statement above still used the (propositional) logi-
cal connectives. Everything that we learned about logical equivalence
and deductions still applies. However, predicate logic allows us to ana-
lyze statements at a higher resolution, digging down into the individual
propositions P, Q, etc.
A full treatment of predicate logic is beyond the scope of this text.
One reason is that there is no systematic procedure for deciding whether
two statements in predicate logic are logically equivalent (i.e., there is no
analogue to truth tables here). Rather, we end with a two examples of
logical equivalence and deduction, to pique your interest.
Example 3.1.8
¬∃x∀y(x ≤ y)
208 3. Symbolic Logic and Proofs
(literally, “it is not true that there is a number x such that for all
numbers y, x is less than or equal to y”).
However, we know how negation interacts with quantifiers: we
can pass a negation over a quantifier by switching the quantifier
type (between universal and existential). So the statement above
should be logically equivalent to
Example 3.1.9
Can you switch the order of quantifiers? For example, consider the
two statements:
∃y∀xP(x, y) → ∀x∃yP(x, y)
3.1. Propositional Logic 209
Exercises
1. Consider the statement about a party, “If it’s your birthday or there
will be cake, then there will be cake.”
(a) Translate the above statement into symbols. Clearly state which
statement is P and which is Q.
(b) Make a truth table for the statement.
(c) Assuming the statement is true, what (if anything) can you
conclude if there will be cake?
(d) Assuming the statement is true, what (if anything) can you
conclude if there will not be cake?
(e) Suppose you found out that the statement was a lie. What can
you conclude?
2. Make a truth table for the statement (P ∨ Q) → (P ∧ Q).
3. Make a truth table for the statement ¬P ∧ (Q → P). What can you
conclude about P and Q if you know the statement is true?
4. Make a truth table for the statement ¬P → (Q ∧ R).
5. Geoff Poshingten is out at a fancy pizza joint, and decides to order a
calzone. When the waiter asks what he would like in it, he replies, “I
want either pepperoni or sausage. Also, if I have sausage, then I must
also include quail. Oh, and if I have pepperoni or quail then I must
also have ricotta cheese.”
(a) Translate Geoff’s order into logical symbols.
(b) The waiter knows that Geoff is either a liar or a truth-teller (so
either everything he says is false, or everything is true). Which
is it?
(c) What, if anything, can the waiter conclude about the ingredients
in Geoff’s desired calzone?
6. Determine whether the following two statements are logically equiv-
alent: ¬(P → Q) and P ∧ ¬Q. Explain how you know you are correct.