02 Handout Propositional Logic
02 Handout Propositional Logic
Michael Franke
(ii) a set of sentential connectives {¬, ∧, ∨, →, ↔}.2 2 You will also find terminology like
logical connectives or logical operators.
The sentential connectives have names and are intended to correspond (ap- There may be additional connectives used
by some logicians or textbooks, and you
proximately) to natural language paraphrases: might find slightly different symbols for the
same notions in some places
name paraphrase symbol
negation “not” ¬
conjunction “and” ∧
disjunction “or” ∨
implication “if . . . , then . . . ” →
equivalence “if and only of” ↔
propositional logic 2
1.2 Formulas
The language L of PropLog is the set of all formulas which are recursively
defined as follows:3 3 We will make consistent use of Greek
letters ϕ, ψ, χ, . . . as variables for formulas.
(i) Every proposition letter is a formula.
(p) ¬pq
p¬ → ¬q p∨q↔r
(p ∧ ¬q)
p ∧ ¬q
¬ q
((p ∨ q) → r) (p ∨ (q → r))
Figure 1: Examples of syntactic
trees
(p ∨ q) → r p ∨ (q → r)
p ∨ q q → r
(a) Tree for ((p ∨ q) → r) (b) Tree for (p ∨ (q → r))
1.4 Terminology
a. q12 d. p → (p ∧ p)
b. p, q ∧ r e. (p →)(p ∧ p)
Exercise 2. Draw the syntactic tree for each of the following formulas.
a. p ↔ q c. p → ¬(q ∧ r)
b. ¬p ∧ p d. (¬p ∨ ¬q) ∧ (r → p)
propositional logic 4
One way of defining the semantics of the sentential connectives is by truth ta-
bles. Truth tables are also handy for systematically calculating the conditions
under which complex formulas are true.
Take the complex formula ¬ϕ.6 For all we know, ϕ could be either true 6 We use ϕ here as a variable which could
or false. There are just these two possibilities.7 To give a truth-conditional represent any formula, no matter if it is a
proposition letter or extremely long and
meaning to the operator ¬ we need to define whether ¬ϕ is true or false for complex.
each case: when ϕ is true, and when ϕ is false. The truth table that defines the 7 That PropLog only considers two truth
values is also referred to as the principle of
meaning of negation is given in Table 1(a).8 PropLog treats negation like a
bivalence. There are other logics, so-called
switch: take a formula ϕ as input, look at its truth value, and swap it for the many-valued logics, which allow for more
other (since there are only two truth values). than two truth values, e.g., to represent
degrees of truth or uncertainty.
Other sentential connectives than negation take two formulas as input, 8 We here write 1 for the truth value
so to speak, and may therefore be conceived of as functions that take a pair “true” and 0 for “false.” It is also common to
of truth values as input to return a single truth value. The semantics of the use letters T and F, or yet other symbols in
truth tables.
binary connectives is given in Table 1(b):
Truth tables are useful for systematically working out the conditions under
which complex formulas are true. Consider the complex formula (ϕ ∧ ψ) →
propositional logic 5
¬χ. We do not know whether the subformula ϕ, ψ and χ are atomic or com-
plex. But we want to know under which truth-value assignments to ϕ, ψ and
χ the formula (ϕ ∧ ψ) → ¬χ is true or false. In order to find out, we can
construct a truth table that starts by enumerating all logical possibilities of
truth-value assignments for the formulas ϕ, ψ and χ (the first three columns
in the table below). We then work towards the “goal formula” (ϕ ∧ ψ) → ¬χ
by following the recursive definition of formulas of PropLog. At each step
we apply the definition of the semantics of the relevant sentential connective
until we arrive at the “goal formula”. Following this method, we construct the
truth table in Table 2, which shows that the formula (ϕ ∧ ψ) → ¬χ is always
true, except when all three subformulas, ϕ, ψ and χ are all true at the same
time.
ϕ ψ χ ϕ∧ψ ¬χ (ϕ ∧ ψ) → ¬χ
Table 2: Truth table for formula
1 1 1 1 0 0 (ϕ ∧ ψ) → ¬χ
1 1 0 1 1 1
1 0 1 0 0 1
1 0 0 0 1 1
0 1 1 0 0 1
0 1 0 0 1 1
0 0 1 0 0 1
0 0 0 0 1 1
To show that any formula of the form ϕ ∨ ¬ϕ is a tautology, we can con- imagine that you know nothing at all about
some foreign universe. You don’t know at
struct the relevant truth table, shown in Table 3(a), and check whether the all which proposition letters are true or not.
column for the “goal formula” contains only ones, no zeros. Similarly, the Given a tautology you can nevertheless be
sure that it is true, no matter what the world
truth table in Table 3(b) reveals that any formula of the logical form ϕ ∧ ¬ϕ is is like. Of a contradiction you are sure that
a contradiction. it is false. And for a contingency you know
that you don’t know whether it is true or
false, before you learn facts about the world.
propositional logic 6
ϕ ¬ϕ ϕ ∨ ¬ϕ ϕ ¬ϕ ϕ ∧ ¬ϕ
Table 3: Truth tables for a tautol-
1 0 1 1 0 0 ogy and a contradiction
0 1 1 0 1 0
(a) Truth table for ϕ ∨ ¬ϕ (b) Truth table for ϕ ∧ ¬ϕ
Two formulas ϕ and ψ are logically equivalent if they have exactly the same
truth value no matter how we assign meanings to all subformulas of ϕ and
ψ, as long as we assign any subformula that occurs in both ϕ and ψ the same
truth value. We can use truth table to test when or demonstrate that two for-
mulas are logically equivalent. To do this, we just have to make a combined
truth table in which we have one column for ϕ and another for ψ. ϕ and ψ are
logically equivalent exactly when the truth values in the columns that corre-
spond to them are identical in each row. The truth table in Table 4 shows that
ϕ ∧ ¬ψ and ¬(ϕ → ψ) are in fact logically equivalent.
ϕ ψ ¬ψ ϕ ∧ ¬ψ ϕ→ψ ¬(ϕ → ψ)
Table 4: Truth table showing
1 1 0 0 1 0 the equivalence of ϕ ∧ ¬ψ and
1 0 1 1 0 1 ¬(ϕ → ψ)
0 1 0 0 1 0
0 0 1 0 1 0
If two formulas ϕ and ψ are not logically equivalent, we can also show
this with a truth table. In that case, there must be at least one row in which
their truth values differ. In practice it may help to mark one such row as the
refuting counterexample against the assumption of logical equivalence. This
is shown in Table 5.
a. ϕ → ¬ϕ c. (ϕ ∧ ¬ϕ) → ψ
b. ϕ ↔ (ϕ ∧ ψ) d. (ϕ ∧ ¬ψ) ↔ (ϕ → ψ)
Exercise 4. For each of the following pairs of formulas, try to intuit whether
they are logically equivalent of not. Write down your guess. Then use truth
tables to determine whether your guess is correct. Highlight the relevant
columns in your truth table. Mark a row as a counterexample if they are not.
a. ϕ, ¬¬ϕ c. ¬ϕ ∨ ψ, ϕ → ψ
b. ϕ ↔ φ, ϕ ∧ ψ d. ϕ ∨ (χ → ¬ϕ), ψ ∨ (χ → ¬ψ)
propositional logic 8
Our current goal is to learn to excavate the logical structure of natural ance of a sentence like The weather is so
nice today! when clearly meant ironically.
language sentences. Therefore, we have to learn to “strip off the pragmatic
layer,” so to speak. Indeed, the logical operators of PropLog bear a close
correspondence to natural language expressions and, or, if and if and only
if. But the correspondence is not a perfect match. This is partly due to the
difference between semantic meaning and pragmatic enrichment.11 Let us 11 There are also arguments suggesting
look at a few interesting cases. that the logical operators of PropLog are
not good enough for analyzing the semantic
meaning of their corresponding natural
3.1 Conjunction & order-sensitivity language expressions. Most importantly,
this concerns the semantic meaning of
Logical conjunction is order-insensitive: ϕ ∧ ψ and ψ ∧ ϕ are logically conditional sentences, i.e., natural language
sentences with if . . . , then . . . .
equivalent. But natural language conjunctions are not necessarily. Saying that
you might take that to mean that she doesn’t own both. But did I literally say
that? — The logical meaning of that sentence is more plausibly just analyzed
as inclusive disjunction. This is because it is not contradictory to say:
does suggest to a certain degree that Kiki only comes when Bubu does. But
that is not the logical core meaning of this sentence. It is rather a pragmatic
enrichment on top of the logical meaning of the sentence. To see this, com-
pare the difference in weirdness between saying
If Bubu comes, Kiki comes, and maybe Kiki comes no matter what.
Kiki comes only if Bubu comes, and maybe Kiki comes not matter what.
With this translation key, we can then determine the logical structure of the
sentence above as:
(p → q) → q
(v) Call me ‘sweetie’ once more and, no kidding, I’ll step on your toe.
Key: p: I’m not kidding. q: I’ll step on your toe.
Key: r: You call me ‘sweetie’ once more.
Logical form: p ∧ (r → q)
(vi) I will only play salsa, if you give me earplugs.12 12 There is a likely inclination to analyze
Key: p: I will play salsa. q: You give me earplugs. this as p ↔ q, but it is not clear whether
this is part of the semantic/logical content
Logical form: p → q here. Suppose you know that the sentence is
true. Now you learn that earplugs have been
handed over. Does that logically entail that
Exercise 5. For each of the following sentences give the translation key and salsa was played? No, because the sentence
only says that earplugs are a necessary but
the (propositional) logical form.
not necessarily sufficient condition for salsa.
(ii) If John is hungry and Bill runs, then Mary doesn’t likes John.
A valuation function can also be thought of as a possible world.13 A possible 13 This terminology is widely used in
world is a way in which things could be. A possible world conforms to the formal semantics and philosophy.
Alternatively, we could say that the meaning of a formula is the set of possi-
ble worlds in which it is true.14 14 Compare the famous passage from
Wittgenstein’s Tractatus Logica Philosoph-
icus: “Einen Satz verstehen, heißt, wissen
4.3 Tautologies, contradictions, contingencies & equivalence (revisited) was der Fall ist, wenn er wahr ist. (Man
kann ihn also verstehen, ohne zu wissen, ob
Using valuation functions and/or possible worlds, we can also give a proper er wahr ist.)” [TLP 4.024]
definition of notions we used previously in the context of truth tables. We
propositional logic 12
say that ϕ is a tautology iff V(ϕ) = 1 for all valuation functions V. We say
that ϕ is a contradiction iff V(ϕ) = 0 for all valuation functions V. We say
that ϕ is a contingency iff there is at least one valuation function V1 such that
V1 (ϕ) = 1 and there is at least one valuation function V2 such that V2 (ϕ) = 0.
We say that ϕ and ψ are logically equivalent, iff for all valuation functions
V(ϕ) = V(ψ).
Formulas ϕ and ψ are logically independent iff all of the following are e.g., as given by information theory extend
the notion of logical information to an abso-
non-empty: ϕ ∩ ψ , ¬ϕ ∩ ψ , ϕ ∩ ¬ψ , ¬ϕ ∩ ¬ψ . Intuitively,
lute measure of information which yields a
logical independence means that for every possible truth-value assignment to total order.
both ϕ and ψ is possible: there exists at least one valuation function (possible
world) for each combination of truth values for ϕ and ψ. In other words, the
truth value of ϕ does not determine the truth value of ψ and vice versa. Just
learning the truth value of one formula does not reveal the truth value of the
other.
The important concept of logical validity can be thought of, at least for
PropLog, as an extension of the notion of logical entailment to more than
two formulas. Concretely, we define logical validity of so-called argument
schemas. If ϕ1 , ϕ2 , . . . , ϕn and ψ are forumlas of propositional logic, then
ϕ1 , ϕ2 , . . . , ϕn /ψ is an argument schema. Formulas ϕ1 , ϕ2 , . . . , ϕn are the
premisses, formula ψ is the conclusion.
The argument schema ϕ1 , ϕ2 , . . . , ϕn /ψ is valid iff for all valuation func-
tions V such that V(ϕ1 ) = V(ϕ2 ) = · · · = V(ϕn ) = 1 it also holds that
V(ψ) = 1. If valid, we write ϕ1 , ϕ2 , . . . , ϕn |= ψ.
We can use truth tables again to check whether any given argument
schema is valid or not. Consider the argument schema: ϕ ∨ ψ, ¬ψ / ϕ. A
natural language analogue would be the following. We know or assume the
propositional logic 13
following premisses:
We would like to find out whether the conclusion logically follows from the
premisses. Table 7 tells us that it does: in all rows (=valuation functions or
possible worlds) in which all the premisses are true, which are marked with
an asterisk (*) in Table 7, the conclusion (in the last column) is also true.
ϕ ψ ϕ∨ψ ¬ψ / ϕ
Table 7: Truth table for checking
1 1 1 0 1 the validity of argument schema
1 0 1 1 * 1 ϕ ∨ ψ, ¬ψ / ϕ
0 1 1 0 0
0 0 0 1 0
Table 8 shows a more extensive example of the truth-table method for the
argument schema ¬ϕ → (ψ ∧ ¬χ), ¬ψ → ¬χ / ϕ, which is not valid. The table
also introduces names for each row, in terms of (types of) possible worlds, so
that we can conveniently say that a possible world like w6 in which ϕ and χ
are false and ψ is true is a counterexample to validity: both premises are true,
but the conclusion is false.
ϕ ψ χ ¬ϕ ¬χ ψ ∧ ¬χ ¬ϕ → (ψ ∧ ¬χ) ¬ψ ¬ψ → ¬χ / ϕ
w1 1 1 1 0 0 0 1 0 1 * 1
w2 1 1 0 0 1 1 1 0 1 * 1
w3 1 0 1 0 0 0 1 1 0 1
w4 1 0 0 0 1 0 1 1 1 * 1
w5 0 1 1 1 0 0 0 0 1 0
w6 0 1 0 1 1 1 1 0 1 * 0 ←
w7 0 0 1 1 0 0 0 1 0 0
w8 0 0 0 1 1 0 0 1 1 0
Table 8: Example of the truth-table
method applied to an argument
4.6 Theorems of propositional logic schema that is not valid
Based on the definitions we have seen so far, we can prove illuminating facts
about PropLog.16 . Here are some examples. 16 Proving properties of a logical system is
a special subfield called metalogic
Proposition 1. If ϕ is a tautology, then ¬ϕ is a contradiction.
Proposition 2. ϕ → ψ is a tautology iff ϕ logically entails ψ.17 17 Notice that this may seem trivial, but
there are really two notions that are related
Proof. First assume that ϕ → ψ is a tautology. We need to show that it by this proposition. One is the definition
of the sentential connective →, the other
follows that ϕ logically entails ψ. Towards contradiction, let us assume that is a high-level notion of logical entailment
ϕ does not logically entail ψ. This can only be the case if there is at least one defined on top of the semantics for all
formulas.
valuation function V for which V(ϕ) = 1 and V(ψ) = 0. For this valuation
function, by definition of the meaning of →, it holds that V(ϕ → ψ) = 0. So,
we contradict our assumption that ϕ → ψ is a tautology.
Next, we assume that ϕ logically entails ψ. We need to show that ϕ → ψ
is a tautology. If ϕ logically entails ψ, this means that there is no valuation
function V for which V(ϕ) = 1 and V(ψ) = 0. But, from the definition of the
semantics of →, we know that the only possibility for ϕ → ψ to be false is if
V(ϕ) = 1 and V(ψ) = 0. Since this is ruled out by our assumption, ϕ → ψ
must be a tautology.
We can even generalize this last result to show that propositional logic is
very well-behaved in the sense that entailment, truth of conditional statements
and validity all coalesce. This need not be the case for any logical system,
and so you might want to try to prove the following for yourself:
Exercise 6. Use the truth-table method to check whether the following argu-
ment schemas are valid: