## DeMorgan’s Laws

### Learning Outcomes

• Combine sets using Boolean logic, using proper notations
• Use statements and conditionals to write and interpret expressions
• Use a truth table to interpret complex statements or conditionals
• Write truth tables given a logical implication, and it’s related statements – converse, inverse, and contrapositive
• Determine whether two statements are logically equivalent
• Use DeMorgan’s laws to define logical equivalences of a statement

There are two pairs of logically equivalent statements that come up again and again in logic. They are prevalent enough to be dignified by a special name: DeMorgan’s laws.

The laws are named after Augustus De Morgan (1806–1871), who introduced a formal version of the laws to classical propositional logic. De Morgan’s formulation was influenced by algebraization of logic undertaken by George Boole, which later cemented De Morgan’s claim to the find. Nevertheless, a similar observation was made by Aristotle, and was known to Greek and Medieval logicians. For example, in the 14th century, William of Ockham wrote down the words that would result by reading the laws out. Jean Buridan, in his Summulae de Dialectica, also describes rules of conversion that follow the lines of De Morgan’s laws. Still, De Morgan is given credit for stating the laws in the terms of modern formal logic, and incorporating them into the language of logic. De Morgan’s laws can be proved easily, and may even seem trivial. Nonetheless, these laws are helpful in making valid inferences in proofs and deductive arguments.

### DeMorgan’s Laws

1. $\sim\left(P{\wedge}Q\right)=({\sim}P)\vee\left(\sim{Q}\right)$
2. $\sim\left(P\vee{Q}\right)=\left(\sim{P}\right)\wedge\left(\sim{Q}\right)$

The first of DeMorgan’s laws is verified by the following table. You are asked to verify the second in an exercise.

 $P$ $Q$ $\sim{P}$ $\sim{Q}$ $P\wedge{Q}$ $\sim\left(P\wedge{Q}\right)$ $\left(\sim{P}\right)\vee\left(\sim{Q}\right)$ T T F F T F F T F F T F T T F T T F F T T F F T T F T T

DeMorgan’s laws are actually very natural and intuitive. Consider the statement $\sim\left(P\wedge{Q}\right)$, which we can interpret as meaning that it is not the case that both P and Q are true. If it is not the case that both P and Q are true, then at least one of P or Q is false, in which case $\left(\sim{P}\right)\vee\left(\sim{Q}\right)$ is true. Thus $\sim\left(P\wedge{Q}\right)$ means the same thing as $\left(\sim{P}\right)\vee\left(\sim{Q}\right)$.

DeMorgan’s laws can be very useful. Suppose we happen to know that some statement having form $\sim\left(P\vee{Q}\right)$ is true. The second of DeMorgan’s laws tells us that $\left(\sim{Q}\right)\wedge\left(\sim{P}\right)$ is also true, hence $\sim{P}$ and $\sim{Q}$ are both true as well. Being able to quickly obtain such additional pieces of information can be extremely useful.

Here is a summary of some significant logical equivalences. Those that are not immediately obvious can be verified with a truth table.

$\text{Contrapositive law}\begin{array}{c}P\rightarrow{Q}=(\sim{Q})\rightarrow(\sim{P})\end{array}$

$\text{DeMorgan's laws}\begin{array}{c}{\sim(P\land{Q})=\sim{P}\lor\sim{Q}}\\{\sim(P\lor{Q})=\sim{P}\land\sim{Q}}\end{array}$

$\text{Commutative laws}\begin{array}{c}{(P\land{Q})={P}\land{Q}}\\{(P\lor{Q})={P}\lor{Q}}\end{array}$

$\text{Distributive laws}\begin{array}{c}{{P}\land(Q\lor{R})=({P}\land{Q})\lor(P\land{R})}\\{P\lor(Q\land{R})=({P}\lor{Q})\land(P\lor{R})}\end{array}$

$\text{Associative laws}\begin{array}{c}{P\land(Q\land{R})=(P\land{Q})\land{R}}\\{P\lor(Q\lor{R})=(P\lor{Q})\lor{R}}\end{array}$

Notice how the distributive law $P\wedge\left(Q\vee{R}\right)=\left(P\wedge{Q}\right)\vee\left(P\wedge{Q}\right)\vee\left(P\wedge{R}\right)$ has the same structure as the distributive law $p\left(q+r\right)=p\cdot{q}+p\cdot{r}$ from algebra. Concerning the associative laws, the fact that $P\wedge\left(Q\wedge{R}\right)=\left(P\wedge{Q}\right)\wedge{R}$ means that the position of the parentheses is irrelevant, and we can write this as $P\wedge{Q}\wedge{R}$ without ambiguity. Similarly, we may drop the parentheses in an expression such as $P\vee\left(Q\vee{R}\right)$.

But parentheses are essential when there is a mix of $\wedge$ and $\vee$, as in $P\vee\left(Q\wedge{R}\right)$. Indeed, $P\vee\left(Q\wedge{R}\right)$ and $P\vee\left(Q\wedge{R}\right)$ and $P\vee\left({Q}\right)\wedge{R}$ are not logically equivalent.

### Negating Statements

Given a statement R, the statement $\sim{R}$ is called the negation of R. If R is a complex statement, then it is often the case that its negation $\sim{R}$ can be written in a simpler or more useful form. The process of finding this form is called negating R. In proving theorems it is often necessary to negate certain statements. We now investigate how to do this.

We have already examined part of this topic. DeMorgan’s laws

$\sim\left(P\wedge{Q}\right)=\left(\sim{P}\right)\vee\left(\sim{Q}\right)\\\sim\left(P\vee{Q}\right)=\left(\sim{P}\right)\wedge\left(\sim{Q}\right)$

(from “Logical Equivalence”) can be viewed as rules that tell us how to negate the statements $P\wedge{Q}$ and $P\vee{Q}$. Here are some examples that illustrate how DeMorgan’s laws are used to negate statements involving “and” or “or.”

### Example

Consider negating the following statement.

R : You can solve it by factoring or with the quadratic formula.

### Example

We will negate the following sentence.

R : The numbers x and y are both odd.