All courses › Discrete Mathematics › De Morgan's laws

De Morgan's laws

De Morgan's laws show how not distributes over and and or. Not (A and B) is the same as (not A) or (not B). The laws are used in logic, in set theory and when simplifying conditions in program code.

¬(p∧q)≡¬p∨¬q\lnot(p \land q) \equiv \lnot p \lor \lnot qfirst law
¬(p∨q)≡¬p∧¬q\lnot(p \lor q) \equiv \lnot p \land \lnot qsecond law

Symbols

p, qp,\ qpropositions

Example

"Not (Saturday or Sunday)" is the same as "not Saturday and not Sunday", in other words a weekday.

When not moves inside the brackets, and and or swap places.
Practise logic and sets for free →

← Propositional logic · Sets →

Part of Discrete Mathematics: Logic and sets.