1 Logic

1.5 Logical equivalence

To motivate the idea of logical equivalence, consider the two WFFs

ϕ =(pq)
ψ =(qp).

These are different WFFs because a WFF is purely a sequence of symbols and these are two different sequences of symbols. However, given any truth assignment, no matter what it is, ϕ and ψ always get equal truth values. You can see this by looking at the truth table for , Table 1.1 which is symmetrical in p and q, in the sense that if you swap the truth values for p and q, the truth value of (pq) stays the same.

Definition 1.5.1.

Two WFFs ϕ and ψ are called logically equivalent, and we write ϕψ, if and only if they have the same truth value under every possible truth assignment.

Since the truth table for a WFF displays its truth values under every possible truth assignment, two WFFs are logically equivalent if and only if they have the same truth table.

When two WFFs are logically equivalent they may look different but they always have the same truth value, no matter what the truth values of their variables. This concept is useful in practise because if you want to prove something is true, you can prove some logically equivalent formula instead.

Theorem 1.5.1.

Let ϕ, ψ, and θ be WFFs. Then

  1. 1.

    (ϕψ)(ψϕ),

  2. 2.

    (ϕψ)(ψϕ),

  3. 3.

    (ϕ(ψθ))((ϕψ)θ), and

  4. 4.

    (ϕ(ψθ))((ϕψ)θ).

The first two parts of this theorem are referred to as the commutativity properties for and , and the second two parts as the associativity properties.

Proof.

Parts 1 and 2 are very easy to check as they follow straight from the truth tables for , Table 1.1 and , Table 1.3.

Parts 3 and 4 are tedious to check, but very easy. I will work out the truth values for one truth assignment and leave the others to you. Let v be a truth assignment such that v(ϕ)=v(ψ)=T and v(θ)=F. For the left hand side of part 3 we have

v(ϕ(ψθ)) =v(ϕ)v(ψθ)
=T(v(ψ)v(θ))
=T(TF)
=TF
=F

and for the right hand side

v((ϕψ)θ) =v(ϕψ)v(θ)
=(v(ϕ)v(ψ))F
=(TT)F
=TF
=F.

Continuing like this you can show that the truth tables for both (ϕ(ψθ)) and ((ϕψ)θ) are as follows.

ϕ ψ θ
T T T T
T T F F
T F T F
T F F F
F T T F
F T F F
F F T F
F F F F

Part 4 can be done similarly. ∎

What the associativity laws, parts 3 and 4, do, is to allow us to drop some brackets while remaining logically unambiguous. Something like pqr isn’t a WFF — because it has symbols but no brackets — but part 3 guarantees us that any two ways we choose to bracket it give logically equivalent WFFs. Similarly

p1p2pn
p1p2pn

may not be WFFs, but any bracketings that do turn them into WFFs give logically equivalent formulas. For this reason, we often omit bracketings when they don’t cause ambiguity, even though when we miss out the brackets we don’t strictly speaking have a WFF.

Example 1.5.1.

Sometimes brackets are essential. The WFFs

ϕ =(p(qr))
ψ =((pq)r)

are not logically equivalent. Before you look at the truth tables below you should prove this by finding a truth assignment for the variables p,q,r which makes one of these WFFs true and the other false.

Here are the truth tables:

p q r (p(qr)) ((pq)r)
T T T T T
T T F T T
T F T T T
T F F F F
F T T F T
F T F F F
F F T F T
F F F F F

so they differ under the truth assignment making p false, q true, and r true, and also under the truth assignment making p false, q false, and r true.