Chapter 7 Logic

# 7.6 De Morgan’s Laws

Learning Objectives

By the end of this section, you will be able to:

• Use De Morgan’s laws to negate conjunctions and disjunctions
• Construct the negation of a conditional statement
• Use truth tables to evaluate De Morgan’s laws

The contributions to logic made by Augustus De Morgan and George Boole during the nineteenth century acted as a bridge to the development of computers, which may be the greatest invention of the twentieth century. Boolean logic is the basis for computer science and digital electronics, and without it the technological revolution of the late twentieth and early twenty-first centuries—including the creation of computer chips, microprocessors, and the Internet—would not have been possible. Every modern computer language uses Boolean logic statements, which are translated into commands understood by the underlying electronic circuits enabling computers to operate.

# Negation of Conjunctions and Disjunctions

In a previous chapter we used a Venn diagram to prove De Morgan’s law for set complement over union. Because the complement of a set is analogous to negation and union is analogous to an or statement, there are equivalent versions of De Morgan’s laws for logic. (Recall that the symbol for logical equivalence is $\equiv$.)

De Morgan’s law for negation of a conjunction: $\sim{(p \wedge q)}\equiv \sim{p} \vee \sim{q}$

De Morgan’s law for the negation of a disjunction: $\sim{(p \vee q)} \equiv \sim{p} \wedge \sim{q}$

Negation of a conditional: $\sim{(p \rightarrow q)} \equiv p \wedge \sim{q}$

Writing conditional as a disjunction: $p \rightarrow q \equiv \sim{p} \vee q$

De Morgan’s laws allow us to write the negation of conjunctions and disjunctions without using the phrase “It is not the case that …” to indicate the parentheses. Avoiding this phrase often results in a written or verbal statement that is clearer or easier to understand.

Example 1

#### Write the negation of each statement in words without using the phrase “It is not the case that.”

a) Kristin is a biomedical engineer and Thomas is a chemical engineer.

Kristin is a biomedical engineer and Thomas is a chemical engineer has the form  “$p \wedge q$,” where $p$ is the statement “Kristin is a biomedical engineer,” and $q$ is the statement “Thomas is a chemical engineer.” By De Morgan’s law, the negation of a conjunction, $\sim{(p \wedge q)}$, is logically equivalent to $\sim{p} \vee \sim{q}$. $\sim{p}$ is “Kristen is not a biomedical engineer,” and $\sim{q}$  is “Thomas is not a chemical engineer.” By De Morgan’s law, the solution has the form”$\sim{p} \vee \sim{q}$” so the answer is “Kristin is not a biomedical engineer or Tom is not a chemical engineer.”

b) A person had cake or they had ice cream.

A person had cake or they had ice cream has the form “$p \vee q$,” where $p$ is the statement “A person had cake” and $q$ is the statement “A person had ice cream.” By De Morgan’s law for the negations of a disjunction, $\sim{(p \vee q)} \equiv \sim{p} \wedge \sim{q}$. The solution is the statement “A person did not have cake and they did not have ice cream.”

Exercise 1

Write the negation of each statement in words without using the phrase it is not the case that.

a) Jackie played softball or she ran track.

b) Brandon studied for his certification exam, and he passed his exam.

Solution

a) Jackie did not play softball, and she did not run track.

b) Brandon did not study for his certification exam, or he did not pass his exam.

# Negation of a Conditional Statement

The negation of any statement has the opposite truth values of the original statement. The negation of a conditional, $\sim{(p \rightarrow q)}$, is the conjunction of $p$ and nor $q$, $p \wedge \sim{q}$.

Consider the truth table below for the negation of the conditional.

$\begin{array}{|cccc|}\hline p& q& p\to q& \sim \left(p\to q\right)\\ \text{T}& \text{T}& \text{T}& \text{F}\\ \text{T}& \text{F}& \text{F}& \text{T}\\ \text{F}& \text{T}& \text{T}& \text{F}\\ \text{F}& \text{F}& \text{T}& \text{F}\\ \hline\end{array}$

The only time the negation of the conditional statement is true is when $p$ is true, and $q$  is false. This means that $\sim{(p \rightarrow q)}$ is logically equivalent to $p \wedge \sim{q}$, as the following truth table demonstrates.

$\begin{array}{|c|c|c|c|c|c|c|} \hline p&q&p\rightarrow q& \sim{(p \rightarrow q)} & \sim{q} & p \wedge \sim{q}& \sim{(p \rightarrow q)} \leftrightarrow (p \wedge \sim{q})\\ \hline \text{T}&\text{T}&\text{T}&\text{F}&\text{F}& \text{F}& \textbf{T} \\ \hline \text{T}&\text{F}&\text{F}&\text{T}&\text{T}&\text{T}&\textbf{T} \\ \hline \text{F}&\text{T}&\text{T}&\text{F}&\text{F}&\text{F}&\textbf{T} \\ \hline \text{F}&\text{F}&\text{T}&\text{F}&\text{T}&\text{F}&\textbf{T} \\ \hline \end{array}$

Example 2

#### Write the negation of each conditional statement.

a) If Adele won a Grammy, then she is a singer.

The negation of the conditional statement, $p \rightarrow q$, is the statement $p \wedge \sim{q}$. The hypothesis of the conditional statement is $p$: “Adele won a Grammy,” and the conclusion of the conditional statement is $q$: “Adele is a singer.” The negation of the conclusion, $\sim{q}$, is the statement “She is not a singer.” Therefore, the answer is $p \wedge \sim{q}$: “Adele won a Grammy, and she is not a singer.”

b) If Drew Brees played for the New Orleans Saints, then he did not win the Super Bowl.

The hypothesis is $p$: “Drew Brees played for the New Orleans Saints,” and the conclusion of the conditional statement is $q$: “He did not win the Super Bowl.” The negation of $q$ is the statement “He won the Super Bowl.” The negation of the conditional statement is equal to $p \wedge \sim{q}$: “Drew Brees played for the New Orleans Saints, and he won the Super Bowl.”

Exercise 2

Write the negation of each conditional statement.

a) If Edna Mode makes a new superhero costume, then it will not include a cape.

b) If I had pancakes for breakfast, then I used maple syrup.

Solution

a) Edna Mode made a new superhero costume, and it includes a cape.

b) I had pancakes for breakfast, and I did not use maple syrup.

Example 3

#### Write the negation of each conditional statement.

a) If all cats purr, then my partner’s cat purrs.

The negation of the conditional statement $p \rightarrow q$ is the statement $p \wedge \sim{q}$. The hypothesis of the conditional statement is $p$: “All cats purr,” and the conclusion of the conditional statement is $q$: “My partner’s cat purrs.” The negation of the conclusion, $\sim{q}$, is the statement “My partner’s cat does not purr.” Therefore, the answer is $p \wedge \sim{q}$: “All cats purr, but my partner’s cat does not purr.”

b) If a penguin is a bird, then some birds do not fly.

The hypothesis is $p$: “A penguin is a bird,” and the conclusion of the conditional statement is $q$: “Some birds do not fly.” The negation of $q$ is the statement “All birds fly.” Therefore, the negation of the conditional statement is equal to $p \wedge \sim{q}$: “A penguin is a bird, and all birds fly.”

Exercise 3

Write the negation of each conditional statement.

a) If some people like ice cream, then ice cream makers will make a profit.

b) If Raquel cannot play video games, then nobody will play video games.

Solution

a) Some people like ice cream, but ice cream makers will not make a profit.

b) Raquel cannot play video games, but somebody will play video games.

Many of the properties that hold true for number systems and sets also hold true for logical statements. The following table summarizes some of the most useful properties for analyzing and constructing logical arguments. These properties can be verified using a truth table.

$\begin{array} {|c|c|c|} \hline \text{Property} & \text{Conjunction (AND)} & \text{Disjunction (OR)} \\ \hline \text{Commutative} & p\wedge q \equiv q\wedge p & p \vee q \equiv q \vee p \\ \hline \text{Associative} & (p \wedge q) \wedge r \equiv p \wedge (q \wedge r)& (p \vee q) \vee r \equiv p \vee(q \vee r)\\ \hline \text{Distributive} & p \wedge (q \wedge r) \equiv (p \wedge q) \vee (p \wedge r) & p \vee (q \wedge r) \equiv (p \vee q) \wedge (p \vee r) \\ \hline \text{De Morgan's} & \sim{(p\wedge q)} \equiv \sim{p} \vee \sim{q} & \sim{(p\vee q)} \equiv \sim{p} \wedge \sim{q} \\ \hline \text{Conditional} & \sim{(p\rightarrow q )} \equiv p \wedge \sim{q} & p \rightarrow q \equiv \sim{p} \vee q \\ \hline \end{array}$

Example 4

Write the negation of each conditional statement applying De Morgan’s law.

a) If Mom needs to buy chips, then Mike had friends over and Bob was hungry.

The conditional has the form “If $p$, then $q$ or $r$,” where $p$ is “Mom needs to buy chips,” $q$ is “Mike had friends over,” and $r$ is “Bob was hungry.” The negation of $p \rightarrow (q \wedge r)$ is $p \wedge \sim{(q \wedge r)}$. Applying De Morgan’s law to the statement $\sim{(q \wedge r)}$, the result is $\sim{q} \vee \sim{r}$, so our conditional statement becomes $p \wedge (\sim{q} \vee \sim{r}$.  By the distributive property for conjunction over disjunction, this statement is equivalent to $(p \wedge \sim{q}) \vee (p \wedge \sim{r})$. Translating the statement $(p \wedge \sim{q}) \vee (p \wedge \sim{r})$ into words, the solution is “Mom needs to buy chips and Mike did not have friends over, or Mom needs to buy chips and Bob was not hungry.”

b) If Juan had pizza or Chris had wings, then Dad watched the game.

The conditional has the form “If $p$ or $q$, then $r$,” where $p$ is “Juan had pizza, ” $q$ is “Chris had wings,” and $r$ is “Dad watched the game.” The negation of $(p \vee q) \rightarrow r$ is $(p \vee q)\wedge \sim r$. By the distributive property for disjunction over conjunction, the statement is equivalent to $(p\vee \sim r)\wedge(q \vee \sim r)$. Translating the statement $(p \vee \sim r) \wedge (q \vee \sim r)$ into words, the solution is “Juan had pizza or Dad did not watch the game, and Chris had wings or Dad did not watch the game.”

Exercise 4

Write the negation of each conditional statement applying De Morgan’s law.

a) If Eric needs to replace the light bulb, then Marcus left the light on all night or Dan broke the bulb.

b) If Trenton went to school and Regina went to work, then Merika cleaned the house.

Solution

a) Eric needs to replace the light bulb, and Marcos did not leave the light bulb on all night, and Dan did not break the light bulb.

b) Trenton went to school, and Regina went to work, and Merika did not clean the house.

# Evaluating De Morgan’s Laws with Truth Tables

In Chapter 5, you learned that you could prove the validity of De Morgan’s laws using Venn diagrams. Truth tables can also be used to prove that two statements are logically equivalent. If two statements are logically equivalent, you can use the form of the statement that is clearer or more persuasive when constructing a logical argument.

The next example will prove the validity of one of De Morgan’s laws using a truth table. The same procedure can be applied to any two logical statements that you believe are equivalent. If the last column of the truth table is a tautology, then the two statements are logically equivalent.

Example 5

Construct a truth table to verify De Morgan’s law for the negation of a conjunction, $\sim (p \wedge q) \equiv \sim p \vee \sim q$, is valid.

Step 1: To verify any logical equivalence, you must first replace the logical equivalence symbol, $\equiv$, with the biconditional symbol, $\leftrightarrow$. The statement $\sim (p \wedge q) \equiv \sim q \vee \sim q$ becomes $\sim (p \wedge q) \leftrightarrow \sim p \vee \sim q$.

Step 2: Next, you create a truth table for the statement. Because we have two basic statements, $p$ and $q$, the truth table will have four rows to account for all the possible outcomes. The columns will be $p, q, \sim p, \sim q, p \wedge q, \sim (p \wedge q), \sim p \vee \sim q$, and the biconditional statement is $\sim (p \wedge q) \leftrightarrow \sim p \vee \sim q$.

$\begin{array}{|c|c|c|c|c|c|c|c|} \hline p&q&p\wedge q& \sim{(p \wedge q)} & \sim{p} & \sim{q} &\sim{p} \vee \sim{q}& \sim{(p \wedge q)} \leftrightarrow (\sim {p} \vee \sim{q})\\ \hline \text{T}&\text{T}&\text{T}&\text{F}&\text{F}&\text{F}& \text{F}& \textbf{T} \\ \hline \text{T}&\text{F}&\text{F}&\text{T}&\text{F}&\text{T}&\text{T}&\textbf{T} \\ \hline \text{F}&\text{T}&\text{F}&\text{T}&\text{T}&\text{F}&\text{T}&\textbf{T} \\ \hline \text{F}&\text{F}&\text{F}&\text{T}&\text{T}&\text{T}&\text{T}&\textbf{T} \\ \hline \end{array}$

Step 3: Finally, verify that the statement is valid by confirming it is a tautology. In this instance, the last column is all true. Therefore, the statement is valid, and De Morgan’s law for the negation of a conjunction is verified.

Exercise 5

Construct a truth table to verify De Morgan’s law for the negation of a disjunction, $\sim (p \vee q) \equiv \sim p \wedge \sim q$, is valid.

Solution

$\begin{array}{|c|c|c|c|c|c|c|c|} \hline p&q&p\vee q& \sim{(p \vee q)} & \sim{p} & \sim{q} &\sim{p} \wedge \sim{q}& \sim{(p \vee q)} \leftrightarrow (\sim {p} \wedge \sim{q})\\ \hline \text{T}&\text{T}&\text{T}&\text{F}&\text{F}&\text{F}& \text{F}& \textbf{T} \\ \hline \text{T}&\text{F}&\text{T}&\text{F}&\text{F}&\text{T}&\text{F}&\textbf{T} \\ \hline \text{F}&\text{T}&\text{FT}&\text{F}&\text{T}&\text{F}&\text{F}&\textbf{T} \\ \hline \text{F}&\text{F}&\text{F}&\text{T}&\text{T}&\text{T}&\text{T}&\textbf{T} \\ \hline \end{array}$

definition