Skip to main content
\(\newcommand{\versionNum}{$4.0$\ } \renewcommand{\tabcolsep}{2.4pt} \def\savedlnot{\lnot} \renewcommand{\arraystretch}{.63} \renewcommand{\arraystretch}{1} \renewcommand{\Naturals}{{\mathbb Z}^{\mbox{\tiny noneg}} } \renewcommand{\arraystretch}{.9} \renewcommand{\arraystretch}{.77} \newcommand{\hint}[1]{ } \newcommand{\inlinehint}[1]{ } \newcommand{\sageprompt}{ \texttt{sage$>$} } \newcommand{\tab}{} \newcommand{\blnk}{\rule{.4pt}{1.2pt}\rule{9pt}{.4pt}\rule{.4pt}{1.2pt}} \newcommand{\suchthat}{\; \;} \newcommand{\divides}{\!\mid\!} \newcommand{\tdiv}{\; \mbox{div} \;} \newcommand{\restrict}[2]{#1 \,_{\,#2}} \newcommand{\lcm}[2]{\mbox{lcm} (#1, #2)} \renewcommand{\gcd}[2]{\mbox{gcd} (#1, #2)} \newcommand{\Naturals}{{\mathbb N}} \newcommand{\Integers}{{\mathbb Z}} \newcommand{\Znoneg}{{\mathbb Z}^{\mbox{\tiny noneg}}} \newcommand{\Zplus}{{\mathbb N}} \newcommand{\Enoneg}{{\mathbb E}^{\mbox{\tiny noneg}}} \newcommand{\Qnoneg}{{\mathbb Q}^{\mbox{\tiny noneg}}} \newcommand{\Rnoneg}{{\mathbb R}^{\mbox{\tiny noneg}}} \newcommand{\Rationals}{{\mathbb Q}} \newcommand{\Reals}{{\mathbb R}} \newcommand{\Complexes}{{\mathbb C}} \newcommand{\relQ}{\mbox{\textsf Q}} \newcommand{\relR}{\mbox{\textsf R}} \newcommand{\nrelR}{\mbox{$\not${\textsf R}}} \newcommand{\relS}{\mbox{\textsf S}} \newcommand{\relA}{\mbox{\textsf A}} \newcommand{\Dom}[1]{\mbox{Dom}(#1)} \newcommand{\Cod}[1]{\mbox{Cod}(#1)} \newcommand{\Rng}[1]{\mbox{Rng}(#1)} \DeclareMathOperator{\caret}{$\scriptstyle\wedge$} \renewcommand{\arraystretch}{.77} \newcommand{\lt}{ < } \newcommand{\gt}{ > } \newcommand{\amp}{ & } \)

Section2.3Logical equivalences

Some logical statements are “the same.” For example, in the last section, we discussed the fact that a conditional and its contrapositive have the same logical content. Wouldn't we be justified in writing something like the following? \begin{equation*} A \implies B \; = \; {\lnot}B \implies {\lnot}A \end{equation*}

Well, one pretty serious objection to doing that is that the equals sign (\(=\)) has already got a job; it is used to indicate that two numerical quantities are the same. What we're doing here is really sort of a different thing! Nevertheless, there is a concept of “sameness” between certain compound statements, and we need a symbolic way of expressing it. There are two notations in common use. The notation that seems to be preferred by logicians is the biconditional (\(\iff\)). The notation we'll use in the rest of this book is an equals sign with a bit of extra decoration on it (\(\cong\)).

Thus we can can either write \begin{equation*} (A \implies B) \; \iff \; ({\lnot}B \implies {\lnot}A) \end{equation*} or \begin{equation*} A \implies B \; \cong \; {\lnot}B \implies {\lnot}A. \end{equation*}

I like the latter, but use whichever form you like — no one will have any problem understanding either.

The formal definition of logical equivalence, which is what we've been describing, is this: two compound sentences are logically equivalent if in a truth table (that contains all possible combinations of the truth values of the predicate variables in its rows) the truth values of the two sentences are equal in every row.

Exercise2.3.1

Consider the two compound sentences \(A \lor B\) and \(A \lor ({\lnot}A \land B)\). There are a total of 2 predicate variables between them, so a truth table with 4 rows will suffice. Fill out the missing entries in the truth table and determine whether the statements are equivalent.

\(A\) \(B\) \(A \lor B\) \(A \lor ({\lnot}A \land B)\)
T T
T \(\phi\)
\(\phi\) T
\(\phi\) \(\phi\)

One could, in principle, verify all logical equivalences by filling out truth tables. Indeed, in the exercises for this section we will ask you to develop a certain facility at this task. While this activity can be somewhat fun, and many of my students want the filling-out of truth tables to be a significant portion of their midterm exam, you will probably eventually come to find it somewhat tedious. A slightly more mature approach to logical equivalences is this: use a set of basic equivalences — which themselves may be verified via truth tables — as the basic rules or laws of logical equivalence, and develop a strategy for converting one sentence into another using these rules. This process will feel very familiar, it is like “doing” algebra, but the rules one is allowed to use are subtly different.

First we have the commutative laws, one each for conjunction and disjunction. It's worth noting that there isn't a commutative law for implication.

The commutative property of conjunction says that \(A \land B \cong B \land A\). This is quite an apparent statement from the perspective of linguistics. Surely it's the same thing to say “the weather is cold and snowy” as it is to say “the weather is snowy and cold.” This commutative property is also clear from the perspective of digital logic circuits.

\ifx\SetFigFont\undefined\gdef\SetFigFont#1#2#3#4#5{ \reset@font\fontsize{#1}{#2pt} \fontfamily{#3}\fontseries{#4}\fontshape{#5} \selectfont}\fi

The commutative property of disjunctions is equally transparent from the perspective of a circuit diagram.

\ifx\SetFigFont\undefined\gdef\SetFigFont#1#2#3#4#5{ \reset@font\fontsize{#1}{#2pt} \fontfamily{#3}\fontseries{#4}\fontshape{#5} \selectfont}\fi

The associative laws also have something to do with what order operations are done. One could think of the difference in the following terms: Commutative properties involve spatial or physical order and the associative properties involve temporal order. The associative law of addition could be used to say we'll get the same result if we add 2 and 3 first, then add 4, or if we add 2 to the sum of 3 and 4 (i.e. that \((2+3)+4\) is the same as \(2+(3+4)\).) Note that physically, the numbers are in the same order (2 then 3 then 4) in both expressions but that the parentheses indicate a precedence in when the plus signs are evaluated.

The associative law of conjunction states that \(A \land (B \land C) \cong (A \land B) \land C\). In visual terms, this means the following two circuit diagrams are equivalent.

\ifx\SetFigFont\undefined\gdef\SetFigFont#1#2#3#4#5{ \reset@font\fontsize{#1}{#2pt} \fontfamily{#3}\fontseries{#4}\fontshape{#5} \selectfont}\fi

The associative law of disjunction states that \(A \lor (B \lor C) \cong (A \lor B) \lor C\). Visually, this looks like:

\ifx\SetFigFont\undefined\gdef\SetFigFont#1#2#3#4#5{ \reset@font\fontsize{#1}{#2pt} \fontfamily{#3}\fontseries{#4}\fontshape{#5} \selectfont}\fi
Exercise2.3.2

In a situation where both associativity and commutativity pertain the symbols involved can appear in any order and with any reasonable parenthesization. In how many different ways can the sum \(2+3+4\) be expressed? Only consider expression that are fully parenthesized.

The next type of basic logical equivalences we'll consider are the so-called distributive laws. Distributive laws involve the interaction of two operations, when we distribute multiplication over a sum, we effectively replace one instance of an operand and the associated operator, with two instances, as is illustrated below.

\ifx\SetFigFont\undefined\gdef\SetFigFont#1#2#3#4#5{ \reset@font\fontsize{#1}{#2pt} \fontfamily{#3}\fontseries{#4}\fontshape{#5} \selectfont}\fi

The logical operators \(\land\) and \(\lor\) each distribute over the other. Thus we have the distributive law of conjunction over disjunction, which is expressed in the equivalence \(A \land (B \lor C) \cong (A \land B) \lor (A \land C)\) and in the following digital logic circuit diagram.

\ifx\SetFigFont\undefined\gdef\SetFigFont#1#2#3#4#5{ \reset@font\fontsize{#1}{#2pt} \fontfamily{#3}\fontseries{#4}\fontshape{#5} \selectfont}\fi

We also have the distributive law of disjunction over conjunction which is given by the equivalence \(A \lor (B \land C) \cong (A \lor B) \land (A \lor C)\) and in the circuit diagram:

\ifx\SetFigFont\undefined\gdef\SetFigFont#1#2#3#4#5{ \reset@font\fontsize{#1}{#2pt} \fontfamily{#3}\fontseries{#4}\fontshape{#5} \selectfont}\fi

Traditionally, the laws we've just stated would be called left-distributive laws and we would also need to state that there are right-distributive laws that apply. Since, in the current setting, we have already said that the commutative law is valid, this isn't really necessary.

Exercise2.3.3

State the right-hand versions of the distributive laws.

The next set of laws we'll consider come from trying to figure out what the distribution of a minus sign over a sum (\(-(x+y) = -x + -y\)) should correspond to in Boolean algebra. At first blush one might assume the analogous thing in Boolean algebra would be something like \({\lnot}(A \land B) \cong {\lnot}A \land {\lnot}B\), but we can easily dismiss this by looking at a truth table.

\(A\) \(B\) \({\lnot}(A \land B)\) \({\lnot}A \land {\lnot}B\)
T T \(\phi\) \(\phi\)
T \(\phi\) T \(\phi\)
\(\phi\) T T \(\phi\)
\(\phi\) \(\phi\) T T

What actually works is a set of rules known as DeMorgan's laws, which basically say that you distribute the negative sign but you also must change the operator. As logical equivalences, DeMorgan's laws are \begin{equation*} {\lnot}(A \land B) \; \cong \; {\lnot}A \lor {\lnot}B \end{equation*} and \begin{equation*} {\lnot}(A \lor B) \; \cong \; {\lnot}A \land {\lnot}B. \end{equation*}

In ordinary arithmetic there are two notions of “inverse.” The negative of a number is known as its additive inverse and the reciprocal of a number is its multiplicative inverse. These notions lead to a couple of equations, \begin{equation*} x + -x = 0 \end{equation*} and \begin{equation*} x \cdot \frac{1}{x} = 1. \end{equation*}

Boolean algebra only has one “inverse” concept, the denial of a predicate (i.e. logical negation), but the equations above have analogues, as do the symbols \(0\) and \(1\) that appear in them. First, consider the Boolean expression \(A \lor {\lnot}A\). This is the logical or of a statement and its exact opposite; when one is true the other is false and vice versa. But, the disjunction \(A \lor {\lnot}A\), is always true! We use the symbol \(t\) (which stands for tautology) to represent a compound sentence whose truth value is always true. A tautology (\(t\)) is to Boolean algebra something like a zero (\(0\)) is to arithmetic. Similar thinking about the Boolean expression \(A \land {\lnot}A\) leads to the definition of the symbol \(c\) (which stands for contradiction) to represent a sentence that is always false. The rules we have been discussing are known as complementarity laws: \begin{equation*} A \lor {\lnot}A \; \cong \; t \mbox{ and } A \land {\lnot}A \; \cong \; c \end{equation*}

Now that we have the special logical sentences represented by \(t\) and \(c\) we can present the so-called identity laws, \(A \land t \cong A\) and \(A \lor c \cong A\). If you “and” a statement with something that is always true, this new compound has the exact same truth values as the original. If you “or” a statement with something that is always false, the new compound statement is also unchanged from the original. Thus performing a conjunction with a tautology has no effect — sort of like multiplying by 1. Performing a disjunction with a contradiction also has no effect — this is somewhat akin to adding 0.

The number 0 has a special property: \(0 \cdot x = 0\) is an equation that holds no matter what \(x\) is. This is known as a domination property. Note that there isn't a dominance rule that involves 1. On the Boolean side, both the symbols \(t\) and \(c\) have related domination rules. \begin{equation*} A \lor t \cong t \mbox{ and } A \land c \cong c \end{equation*}

In mathematics the word idempotent is used to describe situations where a power of a thing may be equal to that thing. For example, because \((-1)^3 = -1\), we say that \(-1\) is an idempotent. Both of the Boolean operations have idempotence relations that just always work (regardless of the operand). In ordinary algebra idempotents are very rare (\(0\), \(1\) and \(-1\) are the only ones that come to mind), but in Boolean algebra every statement is equivalent to its square — where the square of \(A\) can be interpreted either as \(A \land A\) or as \(A \lor A\). \begin{equation*} A \lor A \cong A \mbox{ and } A \land A \cong A \end{equation*}

There are a couple of properties of the logical negation operator that should be stated, though probably they seem self-evident. If you form the denial of a denial, you come back to the same thing as the original; also the symbols \(c\) and \(t\) are negations of one another. \begin{equation*} \lnot({\lnot}A) \cong A \mbox{ and } {\lnot}t \cong c \end{equation*}

Finally, we should mention a really strange property, called absorption, which states that the expressions \(A \land (A \lor B)\) and \(A \lor (A \land B)\) don't actually have anything to do with \(B\) at all! Both of the preceding statements are equivalent to \(A\). \begin{equation*} A \land (A \lor B) \cong A \mbox{ and } A \lor (A \land B) \cong A \end{equation*}

In Table 2.3.4, we have collected all of these basic logical equivalences in one place.

Conjunctive version \Disjunctive \version \Algebraic \analog
Commutative
laws \\(A \land B \cong B \land A\) \\(A \lor B \cong B \lor A\) \\(2+3 = 3+2\)
Associative
laws \\(A \land (B \land C)\) \\(\cong (A \land B) \land C\) \\(A \lor (B \lor C)\) \\(\cong (A \lor B) \lor C\) \\(2+(3+4)\) \\(= (2+3)+4\)
Distributive
laws \\(A \land (B \lor C) \cong\) \\((A \land B) \lor (A \land C)\) \\(A \lor (B \land C) \cong\) \\((A \lor B) \land (A \lor C)\) \\(2\cdot(3+4)\) \\(= (2\cdot 3 + 2\cdot 4)\)
DeMorgan's
laws \\({\lnot}(A \land B)\) \\(\cong \; {\lnot}A \lor {\lnot}B\) \\({\lnot}(A \lor B)\) \\(\cong \; {\lnot}A \land {\lnot}B\) none
Double negation \\({\lnot}({\lnot}A) \; \cong \; A\) \same \(-(-2) = 2\)
Complementarity \\(A \land {\lnot}A \; \cong \; c\) \\(A \lor {\lnot}A \; \cong \; t\) \\(2 + (-2) = 0\)
Identity
laws \\(A \land t \cong A\) \\(A \lor c \cong A\) \\(7 + 0 = 7\)
Domination \\(A \land c \cong c\) \\(A \lor t \cong t\) \\(7 \cdot 0 = 0\)
Idempotence \\(A \land A \cong A\) \\(A \lor A \cong A\) \\(1 \cdot 1 = 1\)
Absorption \\(A \land (A \lor B) \cong A\) \\(A \lor (A \land B) \cong A\) none
Table2.3.4Basic logical equivalences.

Subsection2.3.1Exercises

  1. There are 3 operations used in basic algebra (addition, multiplication and exponentiation) and thus there are potentially 6 different distributive laws. State all 6 “laws” and determine which 2 are actually valid. (As an example, the distributive law of addition over multiplication would look like \(x + (y \cdot z) = (x + y) \cdot (x + z)\), this isn't one of the true ones.) \hint{ These “laws” should probably be layed-out in a big 3 by 3 table. Such a table would of course have 9 cells, but we won't be using the cells on the diagonal because they would involve an operation distributing over itself. (That can't happen, can it?) I'm going to put a few of the entries in, and you do the rest.

    \(+\) \(\ast\) \(\caret\)
    \(+\) \(\emptyset\) \text{ \begin{gather*} x+(y\ast z)\\ = (x+y) \ast (x+z) \end{gather*} } \text{ \begin{gather*} x+(y^z)\\ = (x+y)^{(x+z)} \end{gather*} }
    \(\ast\) \text{ \begin{gather*} x \ast (y+z)\\ = (x \ast y) + (x \ast z) \end{gather*} } \(\emptyset\)
    \(\caret\) \(\emptyset\)
    }

  2. Use truth tables to verify or disprove the following logical equivalences.

    1. \((A \land B) \lor B \; \cong \; (A \lor B) \land B\)

    2. \(A \land (B \lor {\lnot}A) \; \cong \; A \land B\)

    3. \((A \land {\lnot}B) \lor ({\lnot}A \land {\lnot}B) \cong (A \lor {\lnot}B) \land ({\lnot}A \lor {\lnot}B)\)

    4. The absorption laws.

  3. Draw pairs of related digital logic circuits that illustrate DeMorgan's laws. \hint{ Here's the pair that shows the negation of an AND is the same as the OR of the same inputs negated. \ }

  4. Find the negation of each of the following and simplify as much as possible.

    1. \((A \lor B) \; \iff \; C\)

    2. \((A \lor B) \; \implies \; (A \land B)\)

    “simplify”not\(\implies\)\(\iff\)\(\land\)\(\lor\)\(\lnot\)\((A \lor B) \; \iff \; {\lnot}C\)—\(A \oplus B\)\((A \lor B) \land {\lnot}(A \land B)\)—
  5. Because a conditional sentence is equivalent to a certain disjunction, and because DeMorgan's law tells us that the negation of a disjunction is a conjunction, it follows that the negation of a conditional is a conjunction. Find denials (the negation of a sentence is often called its “denial”) for each of the following conditionals.

    1. “If you smoke, you'll get lung cancer.”

    2. “If a substance glitters, it is not necessarily gold.”

    3. “If there is smoke, there must also be fire.”

    4. “If a number is squared, the result is positive.”

    5. “If a matrix is square, it is invertible.”

    1. “You smoke and you haven't got lung cancer.”

    2. “A substance glitters and it is necessarily gold.”

    3. “There is smoke,and there isn't fire.”

    4. “A number is squared, and the result is not positive.”

    5. “A matrix is square and it is not invertible.”

  6. The so-called “ethic of reciprocity” is an idea that has come up in many of the world's religions and philosophies. Below are statements of the ethic from several sources. Discuss their logical meanings and determine which (if any) are logically equivalent.

    1. “One should not behave towards others in a way which is disagreeable to oneself.” Mencius Vii.A.4 (Hinduism)

    2. “None of you [truly] believes until he wishes for his brother what he wishes for himself.” Number 13 of Imam “Al-Nawawi's Forty Hadiths.” (Islam)

    3. “And as ye would that men should do to you, do ye also to them likewise.” Luke 6:31, King James Version. (Christianity)

    4. “What is hateful to you, do not to your fellow man. This is the law: all the rest is commentary.” Talmud, Shabbat 31a. (Judaism)

    5. “An it harm no one, do what thou wilt” (Wicca)

    6. “What you would avoid suffering yourself, seek not to impose on others.” (the Greek philosopher Epictetus — first century A.D.)

    7. “Do not do unto others as you expect they should do unto you. Their tastes may not be the same.” (the Irish playwright George Bernard Shaw — 20th century A.D.)

    —“treat others as you would want to be treated”“Don't treat your fellows in a way that would be hateful to you.”—\begin{equation*} W(x,y) \; = \; \mbox{``x would want y done to him.''} \end{equation*}\begin{equation*} N(x,y) \; = \; \mbox{``x would not want y done to him.''} \end{equation*}\begin{equation*} D(x,y) \; = \; \mbox{``do y to x.''} \end{equation*}\begin{equation*} DD(x,y) \; = \; \mbox{``don't do y to x.''} \end{equation*}\begin{equation*} (W(you, y) \implies D(others, y)) \land (N(you, y) \implies DD(others, y)) \end{equation*}
  7. You encounter two natives of the land of knights and knaves. Fill in an explanation for each line of the proofs of their identities.

    1. Natasha says, “Boris is a knave.” Boris says, “Natasha and I are knights.” Claim: Natasha is a knight, and Boris is a knave.

    2. Bonaparte says “I am a knight and Wellington is a knave.” Wellington says “I would tell you that B is a knight.” Claim: Bonaparte is a knight and Wellington is a knave.

      \hint{ Here's the second one: }