1 Logic

1.3 Truth tables

We’ve seen what a WFF is. It’s important to remember that a WFF like (pq) isn’t true or false on its own: that will depend on the truth or falsity of the statements represented by the propositional variables p and q. The aim of the next couple of sections is to see how, once we decide whether the propositional variables in a WFF are true or false, we can give a truth value to the whole WFF.

The way we do this is by making a truth-table definition for each connective of how the truth value of a WFF using that connective depends on the truth values of the WFFs it connects. We do this in such a way that the connective behaves like the informal logical idea it is supposed to represent: for example, is supposed to represent and so we will define (ϕψ) to be true if and only if ϕ and ψ are both true. Once we’ve done this for every connective, we can determine the truth value of any WFF by looking at the simplest formulas contained in it, determining their truth values using our tables, and working our way upwards until we have the truth value of the whole formula.

1.3.1 Truth assignments for propositional variables

Let’s start with giving truth values to propositional variables. Here and elsewhere T means true and F means false.

Definition 1.3.1.

A truth assignment for a set V of propositional variables is a function v:V{T,F}.

(A better name for this concept would be ‘truth-value assignment’ since a truth assignment can make variables false as well as true, but this is the conventional name.)

Example 1.3.1.

If p and q are propositional variables and V={p,q} then there is a truth assignment v for V such that v(p)=T and v(q)=F.

This is one of the four different truth assignments for a set of two propositional variables. In general, if you have n propositional variables then there are 2n different truth assignments for those variables, since each variable must be given one of two different truth values.

1.3.2 Extending a truth assignment to WFFs

Given a truth assignment for some propositional variables, we would like to extend it to get a truth value for all the WFFs using those variables in a way that takes into account the intended meaning of the logical connectives. This is a difficult problem for complex WFFs. For example, if you have a truth assignment which makes p and r true and q false, what should the truth value of the following WFF be?

((p(qr))(¬pq))

In order to approach the problem of extending a truth assignment so that it gives a sensible truth value to any WFF, suppose that we somehow already knew what truth values we were going to assign to the WFFs ϕ and ψ. What truth value should we give to the WFF (ϕψ)? We are free to choose this of course, but since is supposed to represent the ordinary usage of the word “and” it would be sensible to assign (ϕψ) the value true if both ϕ and ψ were assigned true, and false otherwise.

This idea is summed up in the following truth table for :

ϕ ψ (ϕψ)
T T T
T F F
F T F
F F F
Table 1.1: Truth table for

The meaning of the table is that given a truth assignment v:V{T,F}, our method of assigning a truth value to a WFF (ϕψ) using the variables V will be as follows. Row 1 means that if v(ϕ)=T and v(ψ)=T then v((ϕψ)) will be T. Row 2 means that if v(ϕ)=T and v(ψ)=F then v((ϕψ)) will be F, and so on.

Another way to think about this truth table is to use it to define as a way to combine two truth values into another truth value, just like + combines two numbers into another number. We let TT=T, TF=F, FT=F, and TF=F. The advantage of this is that it lets us rewrite the last paragraph in a single sentence: we will define v((ϕψ)) to be v(ϕ)v(ψ).

Here are the truth tables for the other connectives in our language.

ϕ ¬ϕ
T F
F T
Table 1.2: Truth table for ¬
ϕ ψ (ϕψ)
T T T
T F T
F T T
F F F
Table 1.3: Truth table for
ϕ ψ (ϕψ)
T T T
T F F
F T T
F F T
Table 1.4: Truth table for

Similarly to what we did for , we regard all of our connectives not just as symbols to be used in WFFs but as ways of combining truth values. For example, we define ¬T=F, TF=T, and FT=T.

People often find the truth table for implies confusing, especially the final two rows where ϕ is false. These last two rows tell us that (ϕψ) is true whenever ϕ is false, regardless of the truth value given to ψ. If you’d like to read more about why this truth table is a sensible way to define truth values for statements containing implies, this short piece of writing by (Fields medallist) Tim Gowers, or this longer version is good.