The domination laws: A ∪ U = U and A ∩ ∅ = ∅¶
Level: 101 · one law of the algebra of sets, on its own page
One line: The universe swallows any union and the empty set swallows any intersection: once U or ∅ is in the expression, A no longer matters.
The law¶
| Sets | Logic | Python |
|---|---|---|
| A ∪ U = U, A ∩ ∅ = ∅ | p ∨ true = true, p ∧ false = false | a | U == U and a & set() == set() |
Why it is true¶
"x ∈ A or x ∈ U" is true for every x of the universe whatever A is, so the union is U; "x ∈ A and x ∈ ∅" is false for every x, so the intersection is ∅. In logic, or true is true and and false is false, whatever p says. A law of sets is decided one member at a time, so checking it on every subset of a four-element universe, every pattern of membership there is, proves it; the program does that and prints the matching truth table.
Where it is used, and the trap¶
These are the short-circuit rules of every programming language: a or True is True and a and False is False without looking at a, which is exactly why x in A or x in U can skip the first test. The trap is reading them as saying something about A; they say A is irrelevant.
What the program prints¶
Verified output of law_domination.py — regenerated by tools/run_examples.py, never hand-typed.
1. THE LAW: A ∪ U = U, A ∩ ∅ = ∅
checked on all 16 choices of 1 subset(s) of U = {1, 2, 3, 4}: True
2. ONE INSTANCE, WORKED
A = {1, 2}, B = {2, 3}, C = {3, 4}, A' = {3, 4}, B' = {1, 4}
A ∪ U = {1, 2, 3, 4} = U
A ∩ ∅ = ∅ = ∅
3. THE SAME LAW IN LOGIC: p ∨ true = true, p ∧ false = false
every row of the truth table agrees, which is why the member-by-member check is a proof:
p left right
T T T
F T T
Po polsku, w skrócie¶
Prawa pochłaniania przez U i ∅: uniwersum pochłania każdą sumę, zbiór pusty każdy przekrój, więc A przestaje mieć znaczenie. W kodzie to „leniwe" or True i and False.
Auf Deutsch: Stichwörter¶
Dominanzgesetze: A ∪ U = U und A ∩ ∅ = ∅.
Stichwörter: Dominanzgesetz (absorbierendes Element), Grundmenge, leere Menge.
See also¶
- The algebra of sets — all the laws in one table, and the ones that look true and are not
- The laws, one page each — the other nine
- Truth tables and the laws of logic — the same list for ∨, ∧, ¬
- The laws of an operation — what every such list has in common