69. The DeMorgan Laws

Consider what happens when you negate a conjunction. The statement $\neg (P \wedge Q)$ means that it is false that $P$ and $Q$ are both true; thus one of them must be false. In other words, either $\neg P$ is true or $\neg Q$ is true. This is one of the two DeMorgan Laws:

69.1 Definition: DeMorgan Laws

The DeMorgan Laws are:

DM.1 $\neg (P \wedge Q) \Leftrightarrow \neg P \vee \neg Q$

DM.2 $\neg (P \vee Q) \Leftrightarrow \neg P \wedge \neg Q$.

These laws are true no matter what propositions $P$ and $Q$ are.

69.1.1 Remark The DeMorgan Laws give rules of inference

$$\neg (P \wedge Q) \vdash \neg P \vee \neg Q \quad\text{and}\quad \neg P \vee \neg Q \vdash \neg (P \wedge Q) \tag{69.1}$$

and

$$\neg (P \vee Q) \vdash \neg P \wedge \neg Q \quad\text{and}\quad \neg P \wedge \neg Q \vdash \neg (P \vee Q) \tag{69.2}$$

69.1.2 Example The negation of $(x + y = 10)\wedge (x < 7)$ is $(x + y \neq 10)\vee \neg (x < 7)$. Of course, $\neg (x < 7)$ is the same as $x \geq 7$.

69.2 Using the DeMorgan Laws in proofs

The unit interval $\mathrm{I} = \{x \mid 0\leq x \leq 1\}$, which means that $x \in \mathrm{I}$ if and only if $0\leq x$ and $x \leq 1$. Therefore to prove that some number $a$ is not in I, you must prove the negation of the defining condition, namely that it is not true that $0\leq x$ and $x \leq 1$. By the DeMorgan Laws, this means you must prove

$$\neg (0\leq x )\vee \neg (x \leq 1)$$

which is the same as proving that $(0 > x)\vee (x > 1)$.

69.2.1 Warning When proving that a conjunction is false, it is easy to forget the DeMorgan Laws and try to prove that both negatives are true. In the preceding example, this would require showing that both $0 > x$ and $x > 1$, which is obviously impossible.

In contrast, if you must prove that a disjunction $P \vee Q$ is false, you must show that both $P$ and $Q$ are false. An error here is even more insidious, because if you are tempted to prove that only one of $P$ and $Q$ is false, you often can do that without noticing that you have not done everything required.

69.2.2 Example Consider the statement, “A positive integer is either even or it is prime”. This statement is false. To show it is false, you must find a positive integer such as 9 which is both odd and nonprime.

69.2.3 Method

To prove that $P \vee Q$ is false, prove that $\neg P \wedge \neg Q$ is true. To prove that $P \wedge Q$ is false, prove that $\neg P \vee \neg Q$ is true.

69.2.4 Example Given two sets $A$ and $B$, how does one show that $A \neq B$? By Method 21.2.1 on page 32, $A = B$ means that every element of $A$ is an element of $B$ and every element of $B$ is an element of $A$. By DeMorgan, to prove $A \neq B$ you must show that one of those two statements is false: you must show either that there is an element of $A$ that is not an element of $B$ or that there is an element of $B$ that is not an element of $A$. You needn’t show both, and indeed you often can’t show both. For example, $\{ 1, 2\} \neq \{ 1, 2, 3\}$, yet every element of the first one is an element of the second one.

69.2.5 Worked Exercise Let $A$ and $B$ be sets. How do you prove $x \notin A\cup B$? How do you prove $x \notin A\cap B$?

Answer To prove that $x \notin A\cup B$, you must prove both that $x \notin A$ and that $x \notin B$. This follows from the DeMorgan Law and the definition of union. To prove $x \notin A\cap B$, you need only show $x \notin A$ or $x \notin B$.

69.3 Exercise set

Reword the predicates in Exercises 69.3.1 through 69.3.3 so that they do not begin with “$\neg$”. $x$ is real.

69.3.1 $\neg (x < 10)\wedge (x > 12)$. (Answer on page 246.)

69.3.2 $\neg (x < 10)\wedge (x <12)$. (Answer on page 247.)

69.3.3 $\neg (\neg (x > 5)\wedge \neg (x < 6))$.

Pages 102–103 of the book (PDF).