Classical Propositional Logic (PL) : Introduction
Classical Propositional Logic (PL) : Introduction
Lecture 2
Classical propositional logic (PL): Introduction
1
We now begin the study of the formal theory of classical propositional
logic (PL). Let us first specify the language of PL.
1 Alphabet
The alphabet of PL consists of
1. a non-empty countable set P V of propositional variables, denoted as
p1 ,p2 ,p3 ,... (or simply, p, q, r, ...),
2. logical connectives ¬, ∧, ∨, →, and
3. parentheses (,).
In particular, the set P V could be finite. In fact, for all practical purposes,
one would begin with a finite P V .
Propositional variables represent simple declarative statements (termed propo-
sitions), such as ‘2 is an even number’, or ‘The grass is green’, which take
exactly one of two truth values ‘true’ and ‘false’.
Logical connectives connect simple propositions to form compound propo-
sitions. ¬ is a unary connective that stands for ‘not’ (or ‘negation’), and
∧, ∨, → are binary connectives that stand, respectively, for ‘and’ (or ‘con-
junction’), ‘or’ (or ‘disjunction’), and ‘if-then’ (or ‘implication’). (→ is also
referred to as the ‘conditional’.) Formally, compound propositions are built
as follows, to give well-formed formulae – the statements with which PL
deals.
2
Exercise 2.1. Which of the following are wffs?
(i) p ∨ (¬q).
(ii) ∧(q → r).
Proposition 2.1. The set F of all wffs of PL is countable.
Proof. (Hint) The alphabet of PL could be taken to be finite and given an
order. For instance, one may write it as {¬, →, (, ), p, 0 }, where the last sym-
bol, along with p, can be used to generate the countable set of propositional
variables. Then generate the set of all strings over this alphabet using the
connectives and parentheses in a suitable order, one that would demonstrate
its countability.
Abbreviation
• α ↔ β := (α → β) ∧ (β → α).
The wffs defined above may be used to express sentences in natural
language. For instance, take the sentence “If Australia reached the World
Cup finals, then either England slipped up or South Africa played very well.”
Let the propositional variable p denote “Australia reached the World Cup
finals”, q “England slipped up”, and r “South Africa played very well”.
Then the given sentence is translated in PL by the wff p → (q ∨ r). “m is
positive, but not an integer”, would simply be translated as p ∧ ¬q, where p
stands for “m is positive”, and q for “m is an integer”.
Exercise 2.2. Express the following arguments given in natural language,
as sequences of wffs in PL.
(i) If m is negative then n is negative. If s is positive then n is
negative. If m is negative or s is positive then n is negative.
(ii) If Gödel was the Prime Minister, the parliament would pass logical
laws. Gödel was not the Prime Minister. The parliament does not pass
logical laws.
In order to get a sense of the ‘use’ of PL, let us first take a look at the
semantics of PL, that deals with truth and falsity of propositions. We shall
study the deduction procedure of PL a little later, starting from Lecture 11
of this module.
As mentioned earlier, we deal in PL with exactly two truth values ‘true’
(in brief, T ), and ‘false’ (F ). (Your guess is right: there are formal theories
with semantics involving more than two truth values. These are called many-
valued logics.) Alternatively, we may denote ‘true’ and ‘false’ respectively by
1 and 0. We shall have a close encounter with the truth value set 2:={0, 1}
(or, {T, F }), in the part of the course on Boolean algebras.
How do we ascribe, mathematically, truth values to wffs? Given truth
values of atomic wffs, is there a procedure for evaluating the truth value of
3
a general (‘compound’) wff? This is done through valuations, defined in the
next lecture. In order to define valuations, we shall have to look at operations
on the set 2 that ‘correspond’ to the logical connectives ¬, ∧, ∨, → of PL.
The operations are defined by truth tables, given in the following section.
Note. We use the notations of the logical connectives for the corresponding
operations on 2 as well.
3 Truth tables
Let x ∈ 2.
Table for ¬
x ¬x
T F
F T
Table for ∧
∧ T F
T T F
F F F
Table for ∨
∨ T F
T T T
F T F
Table for →
→ T F
T T F
F T T
As we shall see in the next lecture, using these tables and the notion of
valuations, one may compute truth tables of wffs.
We stress here that these truth tables are sufficient to express the math-
ematical connotations of the logical connectives. They fail to capture the
varied usage of these connectives in natural language. For instance, very
often, ‘and’ would be used in a temporal sense in everyday language, and
hence is non-commutative: “I fell ill and went to the doctor” is certainly not
treated as equivalent to “I went to the doctor and fell ill”! But, as we can
see from the truth-table of ∧, ∧ is commutative. ‘Or’, given by the truth
table for ∨, is not mutually exclusive. However, some connectives of natural
language may be translated satisfactorily. “p, unless q” is expressed by the
wff ¬p → q. More often than not, we would say “Not p, unless q”, which is
then given by the wff p → q (equivalently, by ¬q → ¬p, as we shall see in
Lecture 3).
4
The following exercise is taken from Hodel. You may find the puzzles
given to be similar to some of those appearing in Raymond Smullyan’s For-
ever Undecided. Can you answer these using the truth tables just defined?
Exercise 3.1. The inhabitants of the planet GP are either green or purple.
Green people always tell the truth and purple people never tell the truth.
Consider two people named X and Y .
(i) X says: I am purple and Y is purple. What color is X? What
color is Y ?
(ii) X says: I am purple or Y is green. What color is X? What color
is Y ?
(iii) X says: If I am green, then Y is green. What color is X? What
color is Y ?
(iv) X says: I am green if and only if Y is green. What color is Y ?
5
Module I
Lecture 3
Semantics of PL: Valuations, Truth tables of wffs,
Logical equivalence
1
1 Valuations
Valuations are defined in two steps: first these assign truth-values to atomic
propositions, i.e. propositional variables in P V ; then using these truth
values, one determines the truth values of wffs in general, by defining an
extension of the initial assignment. Formally, the extension is done through
mathematical induction, on the number of connectives occurring in the wff
in question. The truth tables for the different connectives defined in the
previous lecture, are used to determine the truth values.
Definition 1.1. A valuation is a map v: P V −→ {T, F }.
v is extended to a map on the set F of wffs as follows. We retain the notation
v for the extension.
• v(¬α) := ¬v(α).
• v(α ∧ β) := v(α) ∧ v(β).
• v(α ∨ β) := v(α) ∨ v(β).
• v(α → β) := v(α) → v(β).
Example 1.1. Let α := (¬p) ∧ (¬q ∨ p), and v(p) := T , v(q) := F . Then
v(α) = v(¬p) ∧ v(¬q ∨ p) = ¬v(p) ∧ (¬v(q) ∨ v(p)) = ¬T ∧ (¬F ∨ T ) =
F ∧ (T ∨ T ) = F ∧ T = F.
Exercise 1.1.
(i) Let v be the truth assignment such that v(p1 ) := T , v(p2 ) := F ,
v(p3 ) := F . Find v(p1 → (¬p2 ∧ p3 )).
(ii) Let α be the wff ((p1 → p2 ) ∧ ¬p1 ) → ¬p2 . Find a valuation that
satisfies α and one that does not.
The (n + 1)-th entry of the row gives the truth value of α under that valu-
ation. So, notice that for the n propositional variables in α, there would be
2n distinct rows in its truth table. Observe also that there can be many val-
uations satisfying (*). However, we have the following simple but important
proposition.
2
Proposition 2.1. If α is a wff involving propositional variables p1 , p2 , ..., pn
and v, v 0 are two valuations such that v(pi ) = v 0 (pi ), i=1,2,...,n, then v(α)
= v 0 (α).
1. α := ¬β.
Since α has k + 1 connectives, β has k connectives, and has the
same propositional variables as α, of course. So the conditions of
the proposition are satisfied for v and the wff β, and thus, using
the induction hypothesis, v(β) = v 0 (β). This implies that
v(α) = v(¬β) = ¬v(β) = ¬v 0 (β) = v 0 (¬β) = v 0 (α).
2. α := β ∧ γ.
Using induction hypothesis on β, γ, we get v(β) = v 0 (β) and
v(γ) = v 0 (γ). So,
v(α) = v(β ∧ γ) = v(β) ∧ v(γ) = v 0 (β) ∧ v 0 (γ) = v 0 (β ∧ γ).
So v(α) = v 0 (α).
3. α := β ∨ γ.
Exercise.
4. α := β → γ.
Exercise.
The proposition says that if two valuations match on all the propositional
variables p1 , p2 , ..., pn occurring in the wff α, these would match on α itself.
In other words, propositional variables other than p1 , p2 , ..., pn do not matter
while evaluating the truth values of α under different valuations. Effectively
then, there are only 2n assignments of truth values to consider. These are
exactly the ones given by the 2n rows of the truth table of α.
3
Example 2.1. Let us find the truth table of (p ∧ q) → r.
p q r p∧q (p ∧ q) → r
T T T T T
T T F T F
T F T F T
T F F F T
F T T F T
F T F F T
F F T F T
F F F F T
In the 3rd row, for instance, we consider any valuation v such that v(p) =
v(r) = T, v(q) = F , and compute v((p ∧ q) → r) to get the last entry in the
row.
Exercise 2.1.
(i) Find the truth table of (¬p → q) ∨ r.
(ii) Show that p → q and ¬p ∨ q have the same truth tables.
4
4 The relation of logical equivalence
Definition 4.1. (Logically equivalent wffs)
Two wffs α,β are said to be logically equivalent (written as α ≡ β), if and
only if α ↔ β is a tautology. Equivalently (prove!), α ≡ β, provided under
every valuation v, v(α) = v(β).
Example: p ∧ q ≡ q ∧ p; p ∨ q ≡ q ∨ p.
Exercise 4.1. Show the following, where > denotes any tautology, and ⊥
any contradiction.
(i) p → q ≡ ¬p ∨ q
(ii) p 𠪪p
(iii) p ≡ p ∧ (p ∨ q); p ≡ p ∨ (p ∧ q)
(iv) p → q ≡ ¬q → ¬p
(v) p ∧ > ≡ p; p ∨ ⊥ ≡ p
(vi) p ∨ > ≡ >; p ∧ ⊥ ≡ ⊥
(vii) p ∨ p ≡ p; p ∧ p ≡ p
(viii) (p ∨ q) ∨ r ≡ p ∨ (q ∨ r); (p ∧ q) ∧ r ≡ p ∧ (q ∧ r)
(ix) p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r); p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
(x) ¬(p ∧ q) ≡ ¬p ∨ ¬q; ¬(p ∨ q) ≡ ¬p ∧ ¬q.
Observe that wffs with the same propositional variables are logically equiv-
alent, if and only if they have the same truth tables.
5
Module I
Lecture 4
Truth functions
1
Let us write α(p1 , ..., pn ) to denote that the wff α has the propositional
variables p1 , . . . , pn .
Exercise 0.1. Show that the number of possible truth functions from {T, F }n
n
to {T, F } is 22 .
Exercise 0.2. Suppose we assign the following truth function to the con-
ditional → (instead of that defined in Lecture 2).
α β α→β
T T T
T F F
F T T
F F F
(Note that this truth function simply repeats the truth value of β.)
Show that with this truth function for →, we do not have p → q ≡ ¬q → ¬p,
where ≡ is the relation of logical equivalence defined in the previous lecture.
We now show that for each wff α, there is a truth function fα , and, on
the other hand, for every truth function f , there is a wff α such that fα = f .
Proposition 0.1. Every wff α(p1 , p2 , ..., pn ) gives rise to a unique truth
function fα : {T, F }n −→ {T, F } that represents the truth table of α.
2
Proposition 0.2. Given any truth function f : {T, F }n −→ {T, F }, there
is a wff Af such that fAf = f. So f represents the truth table of Af .
2. Consider all the rows for which the corresponding tuples (t1 , t2 , ..., tn )
are such that f (t1 , t2 , ..., tn ) = T . (We have assumed that there is at
least one such row). Suppose the conjuncts for these rows constructed
as in (1) above are given by Ci1 , . . . , Cik . Define Af := Ci1 ∨ . . . ∨ Cik .
Note that
(i) v(Cj ) = T , for a valuation v corresponding to the jth row, i.e.
where v(pi ) = ti , i = 1, 2, ..., n, t1 , t2 , ..., tn being the first n entries of
the row.
(ii) Moreover, v(Ck ) = F, for any k 6= j, and v 0 (Cj ) = F , for every v 0
different from v, i.e. v 0 such that v 0 (pi ) 6= ti for some i = 1, . . . , n.
Now we need to prove that fAf = f .
For any (t1 , t2 , ..., tn ) ∈ {T, F }n , take v such that v(pi ) = ti , i = 1, 2, ..., n.
Then fAf (t1 , t2 , ..., tn ) = v(Af ), as given in the construction of Proposition
0.1.
Consider the ith row in the table of f , its first n entries t1 , t2 , ..., tn , and a
valuation v for (t1 , t2 , ..., tn ) just defined. There are two possible cases.
Case 1: f (t1 , t2 , ..., tn ) = T .
By the construction in (1), Ci occurs in Af . We must show that v(Af ) = T .
As observed in (i) above, v(Ci ) = T . As Af is a disjunction, v(Af ) = T .
Case 2: f (t1 , t2 , ..., tn ) = F .
Ci does not occur in Af , and v(Cj ) = F for all j 6= i (cf. (ii)). So v(Af ) =
F.
3
For any wff α with propositional variables p1 , . . . , pn , we get the truth
function fα by Proposition 0.1. Then by Proposition 0.2, we get the wff Afα
for the truth function fα , such that fAfα = fα . In other words, the truth
tables of the wffs α and Afα are identical. Thus, we have the following.
Note that there is nothing sacrosanct about taking the particular propo-
sitional variables p1 , . . . , pn – the above would all hold for α with any n
propositional variables, at best some re-labelling may have to be done. Sec-
ondly, if the set of propositional variables occurring in α happens to be a
proper subset of p1 , . . . , pn , Propositions 0.1 and 0.2 would still guarantee
the existence of a truth function f such that Af ≡ α and Af contains the
propositional variables p1 , . . . , pn .
t1 t2 t3 f (t1 , t2 , t3 )
T T T T
T T F T
T F T F
T F F F
F T T F
F T F F
F F T F
F F F F