1 Logic

1.4 Truth values for WFFs

Suppose we have a truth assignment v:V{T,F}. There is then a unique way to extend v so that it gives a truth value to any WFF using the propositional variables V such that for any WFFs ϕ and ψ,

v((ϕψ)) =v(ϕ)v(ψ),
v((ϕψ)) =v(ϕ)v(ψ),
v((ϕψ)) =v(ϕ)v(ψ), and
v(¬ϕ) =¬v(ϕ).

Recall that we use the connective symbols not just as parts of WFFs but as ways of combining truth values, for example TF=F, TT=T, and ¬F=T. For example, if V={p,q} and v(p)=T,v(q)=F we would have

v((pq)) =v(p)v(q)
=FT
=F

and

v((¬p)(pq)) =v(¬p)v(pq)
=(¬v(p))((v(p)v(q)))
=F(TF)
=FT
=T.

It’s not completely obvious this really works, but you can read a proof in section 2.3 of the book by Goldrei mentioned in the further reading section at the end of this chapter.

This method of assigning truth values to WFFs can be thought of in a slightly different way: we just substitute in truth values in place of the propositional variables, and combine them using the truth tables for the connectives — exactly like how if you wanted to find the value of x2+y+3 when x=1 and y=2, you would substitute the values in to get 12+2+3 and combine them using the usual arithmetic operations to get 6.

Example 1.4.1.

Let

ϕ=((pq)(¬p¬q)).

Let v(p)=T,v(q)=F. We are going to find v(ϕ).

The method of assigning truth values to WFFs above tells us

v(ϕ) =v((pq)(¬p¬q))
=v(pq)v(¬p¬q) (1.1)

so we need to work out v(pq) and v(¬p¬q).

We have v(pq)=v(p)v(q)=TF. Looking at the T,F row of Table 1.1, the truth table for , we see that TF is F.

Next,

v(¬p¬q) =v(¬p)v(¬q)
=¬v(p)¬v(q)
=¬T¬F
=FT.

The F,T row of the same truth table tells us that this is F.

Finally, substituting the values we have just worked out for v(pq) and v(¬p¬q) into (1.1)

v(ϕ)=FF.

Looking at the F,F row of Table 1.3, the truth table for , we see that v(ϕ)=F.

Example 1.4.2.

Consider the WFF ϕ=(p(pp)) and the truth assignment v(p)=T. What is v(ϕ)?

By definition,

v(ϕ) =v(p)(v(p)v(p))
=T(TT).

Looking at the T,T row of the truth table for implies, Table 1.4, we see that TT is T. So v(ϕ)=TT. For the same reason, v(ϕ)=T.

If you work out the truth value of ϕ when v(p)=F, you should find that the result is also T.

p (p(pp))
T T
F T

Notice that the WFF ϕ from the previous example is true for every truth assignment of its variables. A WFF with this property is called a tautology, and a WFF which is false under every truth assignment, for example (p¬p), is a contradiction.

Example 1.4.3.

Let

ϕ=((pq)(p¬q)).

Given the truth assignment v such that v(p)=T,v(q)=F, let’s work out the truth value v(ϕ). Since

v(ϕ)=v(pq)v(p¬q)

we can start by working out v(pq) and v(p¬q) separately. From the truth table for , Table 1.1, we see that

v(pq)=TF=T.

We have v(¬q)=¬v(q)=¬F=T, so

v(p¬q)=TT=T.

Finally v(ϕ)=TT=T.

The truth table for a WFF lists its truth value under all possible truth assignments for its propositional variables. The truth table for the formula ϕ from the previous example (and for some of the formulas that make up ϕ) is given below. You should check that the following table is correct.

p q (pq) ¬q (p¬q) ϕ
T T T F T T
T F T T T T
F T T F F F
F F F T T F