To motivate the idea of logical equivalence, consider the two WFFs
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 and , in the sense that if you swap the truth values for and , the truth value of stays the same.
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.
Let , , and be WFFs. Then
,
,
, and
.
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.
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 be a truth assignment such that and . For the left hand side of part 3 we have
and for the right hand side
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 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
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.
Sometimes brackets are essential. The WFFs
are not logically equivalent. Before you look at the truth tables below you should prove this by finding a truth assignment for the variables which makes one of these WFFs true and the other false.
Here are the truth tables:
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 false, true, and true, and also under the truth assignment making false, false, and true.