Skip to main content

Boolean Equivalences

Reasoning in propositional logic often involves showing that two different formulas express the same proposition (i.e., that two formulas are tautologically equivalent). For instance, ¬(PQ)\neg (P\vee Q) and (¬P¬Q)(\neg P\wedge\neg Q) are different formulas (they have different syntax trees), but they are tautologically equivalent. The following truth table shows that that these formulas are tautologically equivalent:

PPQQ¬(PQ)\neg (P\vee Q)(¬P¬Q)(\neg P\wedge \neg Q)
T\mathsf{T}T\mathsf{T}F\mathsf{F}F\mathsf{F}
T\mathsf{T}F\mathsf{F}F\mathsf{F}F\mathsf{F}
F\mathsf{F}T\mathsf{T}F\mathsf{F}F\mathsf{F}
F\mathsf{F}F\mathsf{F}T\mathsf{T}T\mathsf{T}

Note that ¬(PQ)\neg (P\vee Q) and (¬P¬Q)(\neg P\wedge\neg Q) are both assigned F\mathsf{F} is rows 1, 2, and 3 and are both assigned T\mathsf{T} in row 4.

The above fact is a special case of the more general observation that any formula of the form ¬(XY)\neg(X\vee Y) is tautologically equivalent to any formula of the form (¬X¬Y)(\neg X\wedge\neg Y). Other instances of this general observation include:

  1. ¬(¬PQ)\neg (\neg P\vee Q) is tautologically equivalent to (¬¬P¬Q)(\neg\neg P \wedge \neg Q).
  2. ¬(¬PP)\neg (\neg P\vee P) is tautologically equivalent to (¬¬P¬P)(\neg\neg P \wedge \neg P).
  3. ¬((PQ)(RP))\neg ((P\rightarrow Q)\vee (R\vee P)) is tautologically equivalent to (¬(PQ)¬(RP))(\neg(P\rightarrow Q) \wedge \neg (R\vee P)).

For all formulas XX and YY, we write XYX\approx Y when XX and YY are tautologically equivalent. For instance,

  1. ¬(¬PQ)(¬¬P¬Q)\neg (\neg P\vee Q)\approx (\neg\neg P \wedge \neg Q);
  2. ¬(¬PP)(¬¬P¬P)\neg (\neg P\vee P)\approx(\neg\neg P \wedge \neg P); and
  3. ¬((PQ)(RP))(¬(PQ)¬(RP))\neg ((P\rightarrow Q)\vee (R\vee P))\approx(\neg(P\rightarrow Q) \wedge \neg (R\vee P))

These are all instances of the following general principle (called DeMorgan's Law):

¬(XY)(¬X¬Y)\neg(X\vee Y)\approx(\neg X\wedge\neg Y)

In the following table, some key equivalences are displayed (these are known as axioms of Boolean algebra).

NameEquivalence
Double Negation¬¬XX\neg\neg X\approx X
DeMorgan's Rules¬(XY)(¬X¬Y)\neg( X\vee Y)\approx (\neg X\wedge \neg Y)
¬(XY)(¬X¬Y)\neg( X\wedge Y)\approx (\neg X\vee \neg Y)
Distribution(X(YZ))((XY)(XZ))(X\wedge( Y\vee Z))\approx ((X\wedge Y)\vee ( X\wedge Z))
(X(YZ))((XY)(XZ))(X\vee(Y\wedge Z))\approx ((X\vee Y)\wedge (X\vee Z))
Absorption(X(XY)X(X\vee(X\wedge Y)\approx X
(X(XY)X(X\wedge( X\vee Y)\approx X
Commutativity(XY)(YX)(X\wedge Y)\approx(Y\wedge X)
(XY)(YX)(X\vee Y)\approx(Y\vee X)
Conditional Definition(XY)(¬XY)(X\rightarrow Y)\approx(\neg X\vee Y)

In addition to the above principles, the following general facts about tautological equivalence can be used to explain why two formulas are tautologically equivalent.

NameRule
ReflexivityXXX\approx X
SymmetryIf XYX\approx Y, then YXY\approx X
TransitivityIf XYX\approx Y and YZY\approx Z, then XZX\approx Z
TautologyIf YY is a tautology, then X(XY)X\approx (X\wedge Y)
ContradictionIf YY is a contradiction, then X(XY)X\approx (X\vee Y)

We can think of the above facts about tautological equivalence as inference rules that can be used with the axioms of Boolean algebra to explain why equivalences hold.

Example

We can use the above principles and rules to explain why the following equivalence holds.

P(PQ)(P¬Q).P \approx (P\wedge Q)\vee (P\wedge \neg Q).

We do this by listing some equivalences with brief explanations that reference the axioms and rules given above.

1.PP(Q¬Q)P\approx P\wedge(Q\vee\neg Q)
Explanation: Since Q¬QQ\vee\neg Q is a tautology, this is an instance of the Tautology Rule.
2.P(Q¬Q)(PQ)(P¬Q)P\wedge(Q\vee\neg Q)\approx (P\wedge Q)\vee (P\wedge\neg Q)
Explanation: This is an instance of one of the Distribution axioms.
3.P(PQ)(P¬Q)P\approx (P\wedge Q)\vee (P\wedge\neg Q)
Explanation: This follows from the Transitivity Rule since we established in step 1 that PP(Q¬Q)P\approx P\wedge(Q\vee\neg Q) and in step 2 that P(Q¬Q)(PQ)(P¬Q)P\wedge(Q\vee\neg Q)\approx (P\wedge Q)\vee (P\wedge\neg Q).

More generally, we can adapt the above explanation to show the following: for any formulas XX and YY,

X(XY)(X¬Y).X\approx ( X\wedge Y)\vee ( X\wedge\neg Y).
Example

We can use the above principles and rules to explain why the following equivalence holds.

P¬PQ¬Q.P\vee \neg P \approx Q\vee \neg Q.

We do this by listing some equivalences with brief explanations that reference the axioms and rules given above.

1.(P¬P)(P¬P)(Q¬Q)(P\vee \neg P)\approx (P\vee \neg P)\wedge(Q\vee\neg Q)
Explanation: Since Q¬QQ\vee\neg Q is a tautology, this is an instance of the Tautology Rule.
2.(Q¬Q)(Q¬Q)(P¬P)(Q\vee \neg Q)\approx (Q\vee \neg Q)\wedge(P\vee\neg P)
Explanation: Since P¬PP\vee\neg P is a tautology, this is an instance of the Tautology Rule.
3.(P¬P)(Q¬Q)(Q¬Q)(P¬P)(P\vee \neg P)\wedge(Q\vee\neg Q) \approx (Q\vee\neg Q)\wedge (P\vee \neg P)
Explanation: This is an instance of the commutative axiom for \wedge statying that XYYXX\wedge Y \approx Y\wedge X, with XX is (P¬P)(P \vee \neg P) and YY is (Q¬Q)(Q \vee \neg Q).
4.(P¬P)(Q¬Q)(P¬P)(P\vee\neg P)\approx (Q\vee\neg Q)\wedge (P\vee \neg P)
Explanation: This follows from the Transitivity Rule since we established in step 1 that (P¬P)(P¬P)(Q¬Q)(P\vee \neg P)\approx (P\vee \neg P)\wedge(Q\vee\neg Q) and in step 3 that (P¬P)(Q¬Q)(Q¬Q)(P¬P)(P\vee \neg P)\wedge(Q\vee\neg Q) \approx (Q\vee\neg Q)\wedge (P\vee \neg P).
5.(Q¬Q)(P¬P)(Q¬Q)(Q\vee \neg Q)\wedge(P\vee\neg P) \approx (Q\vee \neg Q)
Explanation: This follows from the Symmetry Rule since we established (Q¬Q)(Q¬Q)(P¬P)(Q\vee \neg Q)\approx (Q\vee \neg Q)\wedge(P\vee\neg P) in step 2.
6.(P¬P)(Q¬Q)(P\vee\neg P) \approx (Q\vee \neg Q)
Explanation: This follows from the Transitivity Rule since we established in step 4 that (P¬P)(Q¬Q)(P¬P)(P\vee\neg P)\approx (Q\vee\neg Q)\wedge (P\vee \neg P) and in step 5 that (Q¬Q)(P¬P)(Q¬Q)(Q\vee \neg Q)\wedge(P\vee\neg P) \approx (Q\vee \neg Q).

More generally, we can adapt the above explanation to show the following: for any formulas XX and YY, if XX and YY are both tautologies, then XYX\approx Y.

There is an additional inference rule that plays a crucial role when showing two formulas are equivalent.

Replacement of Equivalents: If XYX\approx Y and αβ\alpha\approx\beta, then ZZZ\approx Z' where ZZ' is ZZ with some occurrences of XX replaced with YY.

For example, since ¬¬PP\neg \neg P\approx P and ¬(¬PQ)(¬¬P¬Q)\neg (\neg P \wedge Q)\approx (\neg\neg P\vee \neg Q), we can use the above rule to conclude that ¬(¬PQ)(P¬Q)\neg (\neg P \wedge Q)\approx (P\vee \neg Q). This is an application of the above rule since (PQ)(P\wedge Q) is (¬¬PQ)(\neg\neg P\wedge Q) with the single occurrence of ¬¬P\neg\neg P replaced with PP.

Example

We can use the above principles and rules (including Replacements of Equivalents) to explain why the following equivalence holds.

¬(PQ)P¬Q.\neg(P\rightarrow Q) \approx P\wedge\neg Q.

We do this by listing some equivalences with brief explanations that reference the axioms and rules given above.

1.(PQ)(¬PQ)(P\rightarrow Q)\approx (\neg P\vee Q)
Explanation: This is an instance of the Conditional Equivalence axiom.
2.¬(PQ)¬(PQ)\neg(P\rightarrow Q)\approx \neg(P\rightarrow Q)
Explanation: This is an instance of the Reflexivity Rule.
3.¬(PQ)¬(¬PQ)\neg(P\rightarrow Q)\approx \neg(\neg P\vee Q)
Explanation: This is an instance of the Replacement of Equivalents rule given that we established in step 1 that (PQ)(¬PQ)(P\rightarrow Q)\approx (\neg P\vee Q), we established in step 2 that ¬(PQ)¬(PQ)\neg(P\rightarrow Q)\approx \neg(P\rightarrow Q), and ¬(¬PQ)\neg (\neg P\vee Q) is ¬(PQ)\neg (P\rightarrow Q) with the single occurrence of PQP\rightarrow Q replaced with ¬PQ\neg P\vee Q.
4.¬(¬PQ)(¬¬P¬Q)\neg(\neg P\vee Q)\approx (\neg\neg P\wedge \neg Q)
Explanation: This is an instance of the DeMorgan's Rule.
5.¬¬PP\neg\neg P \approx P
Explanation: This is an instance of the Double Negation.
6.¬(¬PQ)(P¬Q)\neg(\neg P\vee Q)\approx (P\wedge \neg Q)
Explanation: This is an instance of the Replacement of Equivalents rule given that we established in step 4 that ¬(¬PQ)(¬¬P¬Q)\neg(\neg P\vee Q)\approx (\neg\neg P\wedge \neg Q), we established in step 5 that ¬¬PP\neg\neg P\approx P, and $ (P\wedge \neg Q)$ is (¬¬P¬Q)(\neg\neg P\wedge \neg Q) with the single occurrence of ¬¬P\neg\neg P replaced with PP.
6.¬(PQ)(P¬Q)\neg (P\rightarrow Q) \approx (P\wedge \neg Q)
Explanation: This follows from the Transitivity Rule since we established in step 3 that ¬(PQ)¬(¬PQ)\neg(P\rightarrow Q)\approx \neg(\neg P\vee Q) and we established in step 6 that ¬(¬PQ)(P¬Q)\neg(\neg P\vee Q)\approx (P\wedge \neg Q).

More generally, we can adapt the above explanation to show the following: for any formulas XX and YY,

¬(XY)(X¬Y).\neg(X\rightarrow Y)\approx(X\wedge\neg Y).

Practice Questions

  1. True or False: For any formulas XX and YY if XX and YY are both tautologies, then XYX\approx Y.

  2. True or False: (A¬A)(B¬B)(A\wedge \neg A) \approx (B\wedge \neg B)

  3. Which formula can be substituted for XX to make the following true: (AB)X(A \rightarrow B)\approx X?

  4. Which of the formulas is equivalent to ¬AA\neg A\rightarrow A?

  5. Which of the formulas is equivalent to A¬AA\rightarrow \neg A?

  6. Which of the following formulas is equivalent to ((AB)A)((AB)¬A)((A\rightarrow B)\wedge A)\vee ((A\rightarrow B) \wedge \neg A)?

  7. Which of the following formulas is equivalent to P(QR)P\rightarrow (Q\rightarrow R)?

  8. True or False: For all formulas XX and YY, ¬(XY)(¬X¬Y)\neg (X\leftrightarrow Y)\approx (\neg X \leftrightarrow \neg Y)

  9. True or False: For all formulas XX and YY, XYX\approx Y if and only if ¬X¬Y\neg X \approx \neg Y.

  10. Suppose that XX and YY are formulas and that XYXX\wedge Y \approx X. Which of the following is true?

  11. Suppose that XX and YY are formulas and that XYXX\vee Y \approx X. Which of the following is true?