Symbolic LogicTruth Tables

De Morgan's Laws

¬(p ∧ q) is equivalent to ¬p ∨ ¬q, and ¬(p ∨ q) to ¬p ∧ ¬q: moving a negation inside flips ∧ and ∨.

Not started Jump to practice

Some equivalences (Logical Equivalence) come up so often that they have names. The most useful pair is De Morgan's laws, which tell you how to move a negation inside parentheses.

Key idea

$\neg (p \land q)$ is equivalent to $\neg p \lor \neg q$, and $\neg (p \lor q)$ is equivalent to $\neg p \land \neg q$. When the negation moves inside, it goes onto each part and the connective switches.

Why it works

"Not both" means at least one fails: $\neg (p \land q)$ is true when $p$ is false or $q$ is false, which is $\neg p \lor \neg q$. "Not either" means neither holds: $\neg (p \lor q)$ is true only when $p$ is false and $q$ is false, which is $\neg p \land \neg q$. In everyday words: it is not true that the bakery has both bread and muffins exactly when it lacks bread or lacks muffins.
The first two columns match; the third, the common slip, does not.

Worked examples

Worked example: Move the negation in

Rewrite $\neg (r \land s)$ without a $\neg$ in front of the parentheses.
  1. Negate each part: $\neg r$, $\neg s$.
  2. Switch $\land$ to $\lor$.

Answer: $\neg r \lor \neg s$

Worked example: Parts that are already negated

Rewrite $\neg (\neg p \lor q)$.
  1. Negate each part: $\neg \neg p$ and $\neg q$.
  2. Switch $\lor$ to $\land$.
  3. A double negation may be dropped: $\neg \neg p$ is equivalent to $p$.

Answer: $p \land \neg q$

Worked example: Pull it out

Write $\neg p \lor \neg q$ as the negation of one formula.
  1. Read De Morgan right to left.
  2. Take the negations off, switch $\lor$ to $\land$, and negate the whole.

Answer: $\neg (p \land q)$

Both laws come from one idea. A conjunction claims every part; to deny it you only need one part to fail, so the denial is a disjunction of failures. A disjunction claims at least one part; to deny it every part must fail, so the denial is a conjunction of failures. Once you see that, you will not need to memorize which way the connective switches.

Worked example: In English

Rewrite "It is not the case that both the gate is open and the dog is outside" without "both".
  1. In symbols: $\neg (g \land d)$.
  2. De Morgan gives $\neg g \lor \neg d$.

Answer: "Either the gate is not open or the dog is not outside."

Common mistake

Distributing the $\neg$ but keeping the connective: writing $\neg (p \land q)$ as $\neg p \land \neg q$. Check the row $p$ T, $q$ F: $\neg (p \land q)$ is T, but $\neg p \land \neg q$ is F. The connective must switch. A quick memory aid: the negation "flips" both the parts and the connective.
  • Negation over $\land$: negate each part, switch to $\lor$.
  • Negation over $\lor$: negate each part, switch to $\land$.
  • Cancel any double negation $\neg \neg p$ to $p$ if you like; they are equivalent.
  • Check one row with the truth table if you are unsure.

The same laws work with larger parts: $\neg ((p \to q) \lor r)$ becomes $\neg (p \to q) \land \neg r$. And they apply in English: "it is not the case that either the bus is late or the train is late" says the bus is not late and the train is not late.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.

Loading practice…

Builds on

Leads to

Sources and further reading

  • Patrick J. Hurley and Lori Watson, A Concise Introduction to Logic, 13th ed., section 6.3 and section 7.3 (De Morgan's rule)
  • forall x: Calgary, an open introduction to formal logic (P. D. Magnus, Tim Button and others; Open Logic Project), chapter on equivalences
@teddyrookbook GitHub