1.2  Unions, Intersections, Complements and Families

Section 1.1 said what sets are, when two of them are equal, and when one lies inside another. It gave us ways to describe a single set, by listing or by a property cut out of an ambient set. This section makes new sets from old ones. Each connective of Logic and Proof, Chapter 1 gives a set operation: “or” gives the union, “and” gives the intersection, “and not” gives the difference. That observation is the thesis of the chapter: the laws of sets are the laws of logic, read through membership. We state it, prove the standard laws of set algebra from it, and then take the step analysis needs constantly, from two sets to a whole family of them, where “or” becomes “there exists” and “and” becomes “for all”.

1.2.1. Union, intersection and difference

Here is the standard example of a new set. Let A be the set of integers divisible by 2 and B the set of integers divisible by 3. Three natural questions about an integer x are: is it divisible by 2 or by 3? by 2 and by 3? by 2 and not by 3? Each question collects integers into a set, and each set is built from A and B by one connective applied to the statements x∈A and x∈B. The pattern does not depend on divisibility at all, so we name the three constructions once, for any sets.

The union collects what lies in either set, the intersection what lies in both, the difference what lies in the first and not the second.

Definition 1.2.1 (Union, Intersection, Difference)

Let A and B be sets.

  • (a) The union A∪B is the set whose elements are exactly the objects lying in A or in B: x∈A∪B⟺(x∈A∨x∈B).
  • (b) The intersection A∩B is the set {x∈A:x∈B}: so x∈A∩B⟺(x∈A∧x∈B).
  • (c) The difference A∖B is the set {x∈A:x∉B}: so x∈A∖B⟺(x∈A∧x∉B).

Sets A and B are disjoint if A∩B=∅. If A⊆X, the difference X∖A is called the complement of A in X.

In words, clause by clause. The union exists by the working rule (W3) of Section 1.1; it is not cut out of an ambient set, since its elements come from two sets at once. The intersection and the difference are cut out of an ambient set, namely A, so they exist by specification (W1), and the description {x∈A:…} names its ambient set as Section 1.1 requires. The “or” of the union is inclusive, as ∨ always is: an object in both sets is in the union. “Disjoint” means “no common element”.

The complement is always written X∖A, with the ambient set X named. Many books write Ac and leave X to the reader, and a reader who guesses X wrongly gets a different set: the complement of [0,1] in [0,2] is (1,2], and in R it is (−∞,0)∪(1,∞). There is no “complement of A” on its own: by Russell’s theorem (Theorem 1.1.4) there is no set of everything outside A (such a set, joined with A, would contain every set). So this book never writes Ac.

Examples, simplest first, each checked against the membership conditions.

  • Finite sets. For A={1,2,3} and B={2,4}: A∪B={1,2,3,4}, A∩B={2}, A∖B={1,3}, B∖A={4}. For instance 3∈A∖B because 3∈A and 3∉B; and 4∉A∖B because 4∉A.
  • Intervals. For A=[0,2] and B=[1,3]: A∪B=[0,3], A∩B=[1,2], A∖B=[0,1). The last one shows how an endpoint behaves: 1∈B, so 1∉A∖B, while every x with 0≤x<1 lies in A and not in B.
  • Divisibility. With A and B the multiples of 2 and of 3 in Z, as in the opening, A∩B is the set of multiples of 6 (this uses the school fact that an integer divisible by 2 and by 3 is divisible by 6), and Z∖A is the set of odd integers, the complement of A in Z.
  • Degenerate cases. For every set A: A∪∅=A, A∩∅=∅, A∖∅=A, and A∖A=∅. Each is one line: for example, x∈A∖A would mean x∈A and x∉A, which is impossible, so A∖A has no element. They matter because ∅ behaves for ∪ as 0 does for +, and for ∩ as 0 does for ×.

Three inclusions hold for all sets and are used without comment from now on: A∩B⊆A⊆A∪B,A∖B⊆A. Each is one element-chase that drops or adds a disjunct or a conjunct: if x∈A∩B, then x∈A (∧E); if x∈A, then x∈A∪B (∨I); if x∈A∖B, then x∈A (∧E).

A nonexample by minimal change: the “difference” of two sets is not “everything in one but not in both”. The set {x∈A∪B:not both x∈A and x∈B} is a different set: for A={1,2,3} and B={2,4} it is {1,3,4}, while A∖B={1,3}. The element 4 is in the first and not in A∖B, because the difference keeps only elements of A.

Warning. The difference is not symmetric. In general A∖B≠B∖A. With A={1} and B={2}, A∖B={1} and B∖A={2}, and the witness 1 lies in the first and not the second. In fact A∖B and B∖A are always disjoint, since an element of both would lie in A and not in A; they are equal only when both are empty, that is, when A=B.

Quick check. Let X={1,2,3,4,5,6}, A={1,2,3}, and B={2,4,6}. Compute A∪B, A∩B, X∖(A∪B), and (X∖A)∩(X∖B).

Solution. A∪B={1,2,3,4,6} and A∩B={2}. Then X∖(A∪B)={5}. Also X∖A={4,5,6} and X∖B={1,3,5}, whose intersection is {5}. The last two answers agree. This is the two-set case of De Morgan’s law for sets, which is proved for arbitrary families later in this section.

1.2.2. Laws of sets are laws of logic

Unwinding the three definitions turns every question about ∪, ∩, and ∖ into a question about ∨, ∧, and ¬. Here is the dictionary, with the notions of Section 1.1 included.

On sets Unwound through membership Logic
x∈A∪B x∈A∨x∈B ∨
x∈A∩B x∈A∧x∈B ∧
x∈A∖B x∈A∧¬(x∈B) ∧ and ¬
A=∅ ∀x¬(x∈A) ¬ under ∀
A⊆B ∀x(x∈A→x∈B) → under ∀
A=B ∀x(x∈A↔x∈B) ↔ under ∀

The dictionary makes an idea precise. Fix an object x and write p, q, r for the statements x∈A, x∈B, x∈C. Then membership of x in any set built from A, B, C by ∪, ∩, ∖ is a propositional formula in p, q, r: for instance, x∈A∩(B∪C)⟺p∧(q∨r). Two such sets are equal if their membership formulas can each be derived from the other, for then x lies in one exactly when it lies in the other, and x was arbitrary. So a law of propositional logic, with letters replaced by membership statements, is a law of sets. That is the thesis of this chapter.

The laws of sets are the laws of logic, read through membership.

Here are the laws used most.

Theorem 1.2.1 (Algebra of Sets)

For all sets A, B, and C:

  • (a) (commutativity) A∪B=B∪A and A∩B=B∩A;
  • (b) (associativity) (A∪B)∪C=A∪(B∪C) and (A∩B)∩C=A∩(B∩C);
  • (c) (distributivity) A∩(B∪C)=(A∩B)∪(A∩C) and A∪(B∩C)=(A∪B)∩(A∪C);
  • (d) (differences) A∖(B∪C)=(A∖B)∩(A∖C) and A∖(B∩C)=(A∖B)∪(A∖C).

Idea. Each law is a propositional equivalence under ∀x. Logic and Proof, Chapter 4 gives a uniform license for all of them at once: an equivalence that holds in every row of a truth table is derivable in both directions, by completeness, and a derived sequent may be used with its letters replaced by any statements. So one argument covers every law, and the table after the proof names, for each law, the equivalence it comes from. We also write out two laws in full, as element-chases, so that the reader sees what the uniform argument does: the first distributive law, and the second difference law, the one law whose element-chase needs a classical rule (the uniform argument uses one for every law, inside the proof of Logic and Proof, Theorem 4.8.4).

Proof. The uniform argument. Fix one of the eight equations, L=R, and let φ and ψ be the propositional formulas in the atoms p,q,r that describe membership in L and in R, as in the dictionary: for the first distributive law, φ=p∧(q∨r) and ψ=(p∧q)∨(p∧r). For (a)–(c), the semantic equivalence φ≡ψ is a clause of Logic and Proof, Proposition 4.5.1, with p,q,r in the places of φ,ψ,χ: (f) for (a), (h) for (b), (g) for (c). For (d), it is checked by the truth table displayed below. By Logic and Proof, Definition 4.5.4, φ⊨ψ and ψ⊨φ, so by Logic and Proof, Theorem 4.8.4, φ⊢ψ and ψ⊢φ. Now let x be arbitrary. By Logic and Proof, Definition 2.3.1, each of these two sequents may be used with p, q, r replaced by the statements x∈A, x∈B, x∈C; with Definition 1.2.1, the first gives x∈L→x∈R and the second x∈R→x∈L. Hence x∈L↔x∈R, and since x was arbitrary, L=R by Definition 1.1.1.

The truth table for (d), with the atoms in the book’s order (T before F, the last atom alternating fastest): pqrp∧¬(q∨r)(p∧¬q)∧(p∧¬r)p∧¬(q∧r)(p∧¬q)∨(p∧¬r)TTTFFFFTTFFFTTTFTFFTTTFFTTTTFTTFFFFFTFFFFFFFTFFFFFFFFFFF The fourth and fifth columns agree in every row, and so do the sixth and seventh. This proves all eight laws.

The first distributive law, in full. (⊆) Let x∈A∩(B∪C). Then x∈A and x∈B∪C, that is, x∈A and (x∈B or x∈C). By Logic and Proof, Proposition 1.6.1, with P, Q, R replaced by x∈A, x∈B, x∈C, we get (x∈A and x∈B) or (x∈A and x∈C); that is, x∈A∩B or x∈A∩C, so x∈(A∩B)∪(A∩C). (⊇) The same chain read backwards, using the second sequent of Logic and Proof, Proposition 1.6.1. By Proposition 1.1.1 the two sets are equal.

The second difference law, in full. (⊆) Let x∈A∖(B∩C). Then x∈A and ¬(x∈B∧x∈C). By Logic and Proof, Proposition 2.5.5 (d), x∉B or x∉C [RAA, inside (d)]. So x∈A and (x∉B or x∉C), and by Logic and Proof, Proposition 1.6.1, (x∈A and x∉B) or (x∈A and x∉C); that is, x∈(A∖B)∪(A∖C). (⊇) Let x∈(A∖B)∪(A∖C). By the second sequent of Logic and Proof, Proposition 1.6.1, x∈A and (x∉B or x∉C). By Logic and Proof, Proposition 2.5.5 (c), ¬(x∈B∧x∈C), so x∉B∩C, and x∈A∖(B∩C). By Proposition 1.1.1 the two sets are equal.

Each law is a propositional equivalence, and the table records where each comes from: the clause of Logic and Proof, Proposition 4.5.1, and the derivations of Logic and Proof, Chapters 1 and 2, where they exist, that prove one or both directions directly.

Law Clause of Logic and Proof, Proposition 4.5.1 Derived in Logic and Proof, Chapters 1–2
A∩B=B∩A (f) Logic and Proof, Proposition 1.2.1 (either direction, letters exchanged)
A∪B=B∪A (f) Logic and Proof, Example (First derivations with “or”) (likewise)
(A∩B)∩C=A∩(B∩C) (h) Logic and Proof, Proposition 1.2.2 (left to right)
(A∪B)∪C=A∪(B∪C) (h) Logic and Proof, Example (Regrouping a disjunction) (right to left)
A∩(B∪C)=(A∩B)∪(A∩C) (g) Logic and Proof, Proposition 1.6.1 (both directions)
A∪(B∩C)=(A∪B)∩(A∪C) (g) none in the text (both directions are exercises in Logic and Proof, Chapters 1 and 2)
A∖(B∪C)=(A∖B)∩(A∖C) (b), then regrouping of ∧ Logic and Proof, Proposition 2.5.5 (a), (b)
A∖(B∩C)=(A∖B)∪(A∖C) (b), then (g) Logic and Proof, Proposition 2.5.5 (c), (d); Logic and Proof, Proposition 1.6.1

The two difference laws look alike, but their element-chases are not alike. The first needs De Morgan’s laws (a) and (b), which Logic and Proof, Section 2.5 derives without RAA, followed by regrouping the conjunction x∈A∧(x∉B∧x∉C) into (x∈A∧x∉B)∧(x∈A∧x∉C), which takes only ∧E and ∧I. The second needs De Morgan (d) in its (⊆) direction, and (d) is the one of the four De Morgan laws that Logic and Proof, Section 2.5 derives with RAA; its (⊇) direction uses (c), derived without it. Knowing that x is not in both B and C does not by itself tell us which of the two it misses; De Morgan (d) supplies the answer “one of them”, and it is the classical rule that supplies it.

The laws let us calculate with sets as with numbers, but more symmetrically: each of ∪ and ∩ distributes over the other, whereas × distributes over + and not conversely. They also let us drop brackets: by associativity, A∪B∪C and A∩B∩C are unambiguous.

Quick check. Which propositional equivalence proves A∩(A∪B)=A? Is it one of the clauses of Logic and Proof, Proposition 4.5.1?

Solution. Membership in the left side is p∧(p∨q), and in the right side p. The equivalence p∧(p∨q)≡p holds in all four rows: if p is true, both sides are true; if p is false, both are false. It is not one of the clauses of Logic and Proof, Proposition 4.5.1, so the uniform argument applies with a two-atom truth table instead of a clause. (Directly: (⊆) is ∧E; (⊇) is ∨I followed by ∧I.) This is one of the absorption laws.

1.2.3. Power sets

The operations so far build sets whose elements are elements of the old sets. The next construction collects sets as elements. Many questions of analysis quantify over subsets: “every non-empty set of reals that is bounded above has a supremum” is a statement about all subsets of R. So the subsets of a set deserve to be collected into one set.

Definition 1.2.2 (Power Set)

Let X be a set. The power set of X is the set P(X) whose elements are exactly the subsets of X: S∈P(X)⟺S⊆X.

The set exists by the working rule (W4) of Section 1.1. Its elements are sets, and “S∈P(X)” is just another way of writing “S⊆X”. Two elements are always present: ∅∈P(X), because the empty set is a subset of every set, and X∈P(X), because X⊆X.

Example (Small power sets)

Compute P(∅), P({∅}), and P({1,2}).

Solution. P(∅)={∅}. The only subset of ∅ is ∅ itself: if S⊆∅, then an element of S would be an element of ∅, so S has no elements, and S=∅ by Proposition 1.1.3. And ∅⊆∅. So P(∅) has exactly one element, ∅. It is not empty: the empty set has one subset.

P({∅})={∅,{∅}}. Let S⊆{∅}. Either ∅∈S or ∅∉S (excluded middle, Logic and Proof, Proposition 2.5.3). If ∅∈S, then S and {∅} have the same elements (S has no element other than ∅, since S⊆{∅}), so S={∅}. If ∅∉S, then S has no elements, so S=∅. Conversely, both ∅ and {∅} are subsets of {∅}.

P({1,2})={∅,{1},{2},{1,2}}. Let S⊆{1,2}. A subset of {1,2} is determined by which of 1 and 2 it contains, by Definition 1.1.1, and for each of the two there are two cases, 1∈S or 1∉S, and 2∈S or 2∉S. The four combinations give S={1,2}, {1}, {2}, ∅. All four are subsets of {1,2}. So P({1,2}) has exactly four elements.

In each case the number of subsets is a power of two: 1, 2, 4, for sets with 0, 1, 2 elements, because each element is independently in or out. That a set with n elements has exactly 2n subsets is proved in Chapter 3, where counting is made exact. The name “power set” comes from this count.

Warning. The elements of P(X) are subsets, not elements, of X. For X={1,2}: 1∈X but 1∉P(X), since 1 is a number, not a subset; whereas {1}∈P(X) and {1}∉X. The correct translations are a∈X⟺{a}∈P(X), and S⊆X⟺S∈P(X).

1.2.4. Families of sets

Analysis rarely stops at two or three sets. It intersects all the intervals (−t,t) with t>0, or all the closed sets containing a given set, or all the subsets of R with some property. We need unions and intersections of many sets at once, and first a way to name “many sets at once”.

Definition 1.2.3 (Indexed Family)

Let I be a set. A family of sets indexed by I, written (Ai)i∈I, assigns to each i∈I a set Ai. The set I is the index set, and Ai is the member of the family with index i. If X is a set with Ai⊆X for every i∈I, we speak of a family of subsets of X.

Here “assigns” is used in its everyday sense. Section 1.4 makes it exact for a family of subsets of a set X: such a family is a function I→P(X), i↦Ai, whose value at i is written Ai. The parentheses follow the book’s rule that ordered or indexed things go in parentheses; the family (Ai)i∈I knows which set has which index, and two indices may carry the same set. Examples: for I={1,2} the family is just a pair of sets A1,A2; for I=(0,∞) and At=(−t,t) it is a family of intervals, one for each positive real t; for I=N it is a sequence of sets A0,A1,A2,… (indexed from 0; the sequences of real numbers in Section 1.4 are indexed from 1), which Chapter 2 treats as a sequence defined by recursion and Chapter 3 uses to form countable unions.

“Or” becomes “for some index”, and “and” becomes “for every index”.

The union of a family collects what lies in at least one member; the intersection collects what lies in every member.

Definition 1.2.4 (Union and Intersection of a Family)

Let (Ai)i∈I be a family of sets.

  • (a) The union ⋃i∈IAi is the set whose elements are exactly the objects lying in Ai for some i∈I: x∈⋃i∈IAi⟺∃i∈I (x∈Ai).
  • (b) If (Ai)i∈I is a family of subsets of a set X, the intersection is ⋂i∈IAi:={x∈X:∀i∈I (x∈Ai)}.

For a set S whose elements are sets, ⋃S:=⋃A∈SA; and for a non-empty set S⊆P(X), ⋂S:=⋂A∈SA. In both, the family is indexed by S itself, the member with index A being A.

In words, clause by clause. The union exists by (W3), like the union of two sets; when all Ai⊆X, it may also be written {x∈X:∃i∈I (x∈Ai)}, since then every element of the union lies in X, and this form names its ambient set as Section 1.1 requires. The intersection is cut out of X by specification. The last sentence covers sets of sets that come with no index: ⋂S is the set of objects lying in every set that belongs to S. For example, Analysis on the Real Line, Chapter 1 defines N inside R as ⋂S, where S is the set of all subsets of R that contain 0 and are closed under x↦x+1; S is non-empty because R itself belongs to it.

With two sets the new definitions give the old ones back. For I={1,2}, “∃i∈{1,2} with x∈Ai” says “x∈A1 or x∈A2”, since an i∈{1,2} is 1 or 2; so ⋃i∈{1,2}Ai=A1∪A2, and likewise ⋂i∈{1,2}Ai=A1∩A2. The dictionary gains two rows:

On sets Unwound through membership Logic
x∈⋃i∈IAi ∃i∈I (x∈Ai) ∃
x∈⋂i∈IAi, for x∈X ∀i∈I (x∈Ai) ∀

Why the intersection is taken inside X. The ambient set is not decoration; it is forced by the case I=∅. If I is empty, the condition ∀i∈I (x∈Ai) is vacuously true for every object x: there is no index at which it could fail (Logic and Proof, Chapter 5, vacuous truth for ∀). A definition without an ambient set, “⋂i∈IAi= all x with ∀i∈I (x∈Ai)”, would then describe the set of all objects, which Theorem 1.1.4 forbids. Inside X, the empty intersection is simply X: ⋂i∈∅Ai=X,⋃i∈∅Ai=∅. The union needs no ambient set, because its condition ∃i∈∅ (x∈Ai) is false for every x; the empty union is empty. For a non-empty index set the choice of X does not matter: if some i0∈I exists and x lies in every Ai, then in particular x∈Ai0⊆X, so the condition “x∈X” adds nothing. Only the empty family sees X, and there it must. This is also why ⋂S above asks S to be non-empty: a set of sets with no index carries no ambient set with it.

The smallest set closed under some steps

One use of the intersection pays a debt to Logic and Proof, Chapter 4. There, the formulas were described as the smallest collection of strings closed under (F1)–(F3) of Logic and Proof, Definition 4.1.1: the collection that contains the atoms and ⊥ and is closed under the building steps (F2) and (F3). What does “smallest” mean, and why does such a collection exist? Intersections answer both questions, in any setting of this kind.

Let X be a set, and consider some starting elements of X and some steps, each of which turns elements of X into an element of X. Call a subset S⊆X closed if it contains the starting elements and, whenever a step is applied to elements of S, the result lies in S.

Proposition 1.2.2 (Smallest Closed Set)

Let X be a set with given starting elements and steps, and let S⊆P(X) be the set of closed subsets of X. Then S is non-empty, and M:=⋂S is closed and lies inside every closed set: M is the smallest closed subset of X.

Idea. An element of M is an object lying in every closed set. So M lies inside each closed set by its very definition, and each requirement of being closed, met by every closed set at once, is met by what they have in common.

Proof. The set S is non-empty, since X itself is closed; so ⋂S is defined (Definition 1.2.4).

  • M lies inside every closed set. If S∈S and x∈M, then x lies in every member of S, in particular in S.
  • M is closed. Each starting element lies in every S∈S, hence in M. If a step is applied to elements of M, those elements lie in every S∈S; since each such S is closed, the result lies in every S∈S, hence in M.

This proves the proposition.

For Logic and Proof, Chapter 4, X is the set of all strings of symbols, the starting elements are the atoms and ⊥, and the steps are (F2) and (F3) of Logic and Proof, Definition 4.1.1; M is then the set of formulas. (That this M consists exactly of the strings with a formation sequence, as clause (F4) says, follows by strong induction along a formation sequence, Logic and Proof, Theorem 4.2.2; we do not need it here.) For Analysis on the Real Line, Chapter 1, X=R, the starting element is 0, the step is x↦x+1, and M is N, the set Analysis on the Real Line, Chapter 1 works with.

Worked examples with a real parameter

Families indexed by an interval of real numbers are the ones analysis meets most. In each example we guess the answer, then prove it by two inclusions; the union needs a witness index for each point, and the intersection needs, for each point outside the answer, an index whose member excludes it.

Example (Unions and intersections of intervals)

Show that:

  • (a) ⋃t∈(0,1)[t,1]=(0,1];
  • (b) ⋂t∈(0,∞)(−t,t)={0}, inside X=R;
  • (c) ⋂t∈(0,∞)(0,t)=∅, inside X=R.

Solution.

  • (a) (⊆) Let x∈⋃t∈(0,1)[t,1]. Then there is t∈(0,1) with x∈[t,1]; choose such a t. So 0<t≤x≤1, and x∈(0,1].

    (⊇) Let x∈(0,1]. We need an index t∈(0,1) with t≤x. Take t:=x/2. Then 0<x/2≤1/2<1, so t∈(0,1); and x/2<x≤1, so x∈[t,1]. Hence x lies in the union. (The witness depends on x, which is allowed: the union asks for some index for each point.)

  • (b) (⊇) For every t>0, −t<0<t, so 0∈(−t,t). Since t was arbitrary, 0 lies in the intersection.

    (⊆) Let x lie in the intersection. For a real number, x<0 or x=0 or x>0, and we argue by cases. If x<0 or x>0, then |x|>0, so t:=|x| is an index, and x∈(−|x|,|x|) would give |x|<|x| (since x is |x| or −|x|), which is false; this contradicts the assumption that x lies in every member, so these cases cannot occur. In the remaining case x=0, and x∈{0}. The index t=|x| depends on the point x it excludes.

  • (c) Let x lie in the intersection. With the index t=1, x∈(0,1), so x>0. Then x is itself an index, and x∈(0,x) would give x<x, which is false. So nothing lies in the intersection, and it is empty.

Part (c) is a degenerate case worth remembering. Each interval (0,t) is non-empty, and the intervals are nested: (0,s)⊆(0,t) whenever s≤t. Yet nothing lies in all of them. Analysis on the Real Line, Chapter 1 meets the same phenomenon with a sequence of intervals, and it is why its nested interval theorem needs closed intervals.

A nonexample by minimal change. Close the left endpoint of (c): ⋂t>0[0,t)={0}. The number 0 now lies in every member, since 0≤0<t; and any x≠0 is excluded as before (if x<0, by [0,1); if x>0, by [0,x)). One endpoint changes the answer from ∅ to {0}, and the element that (c) loses is exactly the endpoint 0.

Quick check. Compute ⋃t∈[1,2][0,t] and ⋂t∈[1,2][0,t], inside X=R.

Solution. The union is [0,2]: each [0,t]⊆[0,2] since t≤2, and [0,2] is itself a member (t=2). The intersection is [0,1]: [0,1]⊆[0,t] for every t≥1, and [0,1] is itself a member (t=1). In general, when the members are nested and there is a largest and a smallest member, the union is the largest and the intersection the smallest.

1.2.5. De Morgan’s laws for families

The laws of set algebra have versions for families, and the most used are De Morgan’s laws: the complement of a union is the intersection of the complements, and the complement of an intersection is the union of the complements. In analysis they convert statements about open sets into statements about closed sets, and back. By the dictionary, they should be the quantifier negation laws of Logic and Proof, Chapter 6, read through membership: “not in some Ai” is “outside every Ai”, and “not in every Ai” is “outside some Ai”.

Theorem 1.2.3 (De Morgan’s Laws for Families)

Let X be a set and (Ai)i∈I a family of subsets of X, with any index set I, including I=∅. Then X∖⋃i∈IAi=⋂i∈I(X∖Ai)andX∖⋂i∈IAi=⋃i∈I(X∖Ai).

All intersections here are taken inside X; the family (X∖Ai)i∈I is again a family of subsets of X, so both sides make sense.

Idea. Unwind both sides of each law through membership, for an element x∈X. In the first law, the left side says ¬∃i∈I (x∈Ai), and the right side says ∀i∈I ¬(x∈Ai). In the second, the left side says ¬∀i∈I (x∈Ai), and the right side says ∃i∈I ¬(x∈Ai). So each law is a quantifier negation law, and each inclusion is one of its directions. We write the first law out rule by rule, since it is the chapter’s model element-chase for families, and the second at level 3, tagging only the step it is about.

Before reading on: which law of Logic and Proof, Chapter 6 turns “not in every Ai” into “outside some Ai”, and which of its directions is classical?

Proof. First law. (⊆) Let x∈X∖⋃i∈IAi [∀I and →I, opening]. By Definition 1.2.1, x∈X and x∉⋃i∈IAi [↔E, ∧E]. Let i∈I [F1, Proposition 6.1.1]. Suppose x∈Ai [¬I, opening]. Then ∃j∈I (x∈Aj), with i as the witness [∃I], so x∈⋃j∈IAj by Definition 1.2.4. This contradicts x∉⋃j∈IAj [¬E]. Hence x∉Ai [¬I, closing]. With x∈X, this gives x∈X∖Ai [∧I, ↔E]. Since i∈I was arbitrary, ∀i∈I (x∈X∖Ai) [∀I, closing]. With x∈X, this is x∈⋂i∈I(X∖Ai) by Definition 1.2.4. Since x was arbitrary, the inclusion holds [→I, ∀I, closing].

(⊇) Let x∈⋂i∈I(X∖Ai) [∀I and →I, opening]. Then x∈X, and x∈X∖Ai for every i∈I [↔E, ∧E]. Suppose x∈⋃i∈IAi [¬I, opening]. Then there is i∈I with x∈Ai; choose such an index i0 [∃E, opening, with the new name i0]. Applying the hypothesis at i0, x∈X∖Ai0 [∀E], so x∉Ai0 [↔E, ∧E], which contradicts x∈Ai0 [¬E]. The contradiction ⊥ does not mention i0, so it stands outside the choice [∃E, closing]. Hence x∉⋃i∈IAi [¬I, closing], and with x∈X, x∈X∖⋃i∈IAi [∧I, ↔E]. Since x was arbitrary, the inclusion holds [→I, ∀I, closing].

By Proposition 1.1.1, the first law holds.

Second law. (⊆) Let x∈X∖⋂i∈IAi, so x∈X and x∉⋂i∈IAi. Then ∀i∈I (x∈Ai) fails: if it held, then together with x∈X it would put x in ⋂i∈IAi. By the bounded quantifier negation law of Logic and Proof, Chapter 6 (¬∀i∈I φ gives ∃i∈I ¬φ, the bound kept), there is i∈I with x∉Ai [RAA, inside the quantifier negation law]. Choose such an index i0. Then x∈X∖Ai0, so x∈⋃i∈I(X∖Ai), with i0 as the witness.

(⊇) Let x∈⋃i∈I(X∖Ai), and choose i0∈I with x∈X∖Ai0. Then x∈X and x∉Ai0. If x were in ⋂i∈IAi, then x∈Ai0 by the definition, applied at i0; so x∉⋂i∈IAi, and x∈X∖⋂i∈IAi.

By Proposition 1.1.1, the second law holds. This proves the theorem.

The answer to the prompt: the bounded quantifier negation law of Logic and Proof, Chapter 6 turns ¬∀i∈I into ∃i∈I ¬, and that direction is classical because it rests on the unbounded law ¬∀xφ⊢∃x¬φ, which needs RAA. It is used once, in the (⊆) half of the second law. The first law and the (⊇) half of the second use no classical rule: they are the directions of quantifier negation that Logic and Proof, Chapter 6 derives without RAA. The pattern is the one met in the difference laws of Theorem 1.2.1, which are the case I={1,2}, X=A, A1=A∩B, A2=A∩C (replacing B and C by A∩B and A∩C changes neither side): “not in every member” does not by itself name the member it misses.

The empty family. The theorem was stated for every index set, and the conventions of Definition 1.2.4 are what make that true. For I=∅, the first law reads X∖∅=X, since the empty union is ∅ and the empty intersection is X; and the second reads X∖X=∅, since the empty intersection is X and the empty union is ∅. Both are true. Had the empty intersection been defined as anything other than X, the laws would have needed the hypothesis I≠∅.

Warning. De Morgan swapped the wrong way. “The complement of a union is the union of the complements” is false. Take X={1,2}, A1={1}, A2={2}. Then X∖(A1∪A2)=X∖X=∅, but (X∖A1)∪(X∖A2)={2}∪{1}={1,2}. Complementing turns ∪ into ∩ and ∩ into ∪, just as negation turns ∃ into ∀ and ∨ into ∧; nothing stays the same.

1.2.6. Exercises

A. Check your understanding

Exercise (A1)

These parts are about Theorem 1.2.3 and its proof.

  • (a) Which law of Logic and Proof, Chapter 6 is used in the (⊆) half of the second law, and which of its directions is classical?
  • (b) Run the first law on X=Z, I={2,3}, and Ai the set of integer multiples of i. Describe both sides in words, and name two integers in each side and two outside it.
  • (c) What are the two sides of each law when I=∅?
  • (d) Let x∈X. Translate x∉⋂i∈IAi into a statement with ∃. What is the correct translation if x∈X is not assumed?

Solution.

  • (a) The bounded quantifier negation law of Logic and Proof, Chapter 6: ¬∀i∈I φ gives ∃i∈I ¬φ, with the bound kept. That direction is classical: it rests on the unbounded law ¬∀xφ⊢∃x¬φ, which needs RAA.

  • (b) The left side Z∖(A2∪A3) is the set of integers divisible by neither 2 nor 3. The right side (Z∖A2)∩(Z∖A3) is the set of integers that are odd and not multiples of 3. By the theorem they are equal. For instance 1 and 5 (also −1, 7) lie in both, and 3 and 4 (also 6) lie in neither.

  • (c) For I=∅, the empty union is ∅ and the empty intersection is X. First law: X∖∅=X and ⋂i∈∅(X∖Ai)=X. Second law: X∖X=∅ and ⋃i∈∅(X∖Ai)=∅.

  • (d) By Definition 1.2.4, x∈⋂i∈IAi means x∈X∧∀i∈I (x∈Ai). For x∈X, its negation is ¬∀i∈I (x∈Ai), which by the law of (a) is ∃i∈I (x∉Ai). Without x∈X, the negation of the conjunction is, by Logic and Proof, Proposition 2.5.5 (d), “x∉X or ∃i∈I (x∉Ai)”: an object may fail to be in the intersection simply because it is not in X, since the intersection is taken inside X.

B. Practice

Exercise (B1: Intersection and difference)

Prove that A∩(B∖C)=(A∩B)∖(A∩C) for all sets A, B, C, and name the propositional equivalence behind it.

Solution. With p,q,r for x∈A, x∈B, x∈C, the membership conditions are p∧(q∧¬r) and (p∧q)∧¬(p∧r), and the equivalence behind the law is p∧(q∧¬r)≡(p∧q)∧¬(p∧r). Both directions have short direct derivations, which the element-chase follows.

(⊆) Let x∈A∩(B∖C). Then x∈A, x∈B, and x∉C. So x∈A∩B. If x were in A∩C, then x∈C, a contradiction; so x∉A∩C. Hence x∈(A∩B)∖(A∩C).

(⊇) Let x∈(A∩B)∖(A∩C). Then x∈A, x∈B, and x∉A∩C. If x were in C, then, since x∈A, x∈A∩C, a contradiction; so x∉C. Hence x∈B∖C, and x∈A∩(B∖C).

By Proposition 1.1.1 the sets are equal. Both halves use ¬I and no classical rule.

Exercise (B2: Three families of intervals)

For each family, indexed by t∈(0,∞), compute the union and the intersection (inside X=R), and prove each answer by two inclusions.

  • (a) At=[t,1+t];
  • (b) Bt=(−t,1/t);
  • (c) Ct=(t,2t).

Solution.

  • (a) Union (0,∞). (⊆) If x∈[t,1+t] for some t>0, then x≥t>0. (⊇) If x>0, take t:=x: then x∈[x,1+x]. Intersection ∅. Let x be any real number and take t:=|x|+1>0. Then x≤|x|<t, so x∉[t,1+t]. So no real number lies in every At.

  • (b) Union R. (⊆) Every Bt is a set of reals. (⊇) Let x∈R. If x≤0, take t:=1−x≥1: then −t=x−1<x, and 1/t>0≥x, so x∈Bt. If x>0, take t:=1/(2x): then −t<0<x and 1/t=2x>x, so x∈Bt. Intersection {0}. (⊇) For every t>0, −t<0<1/t. (⊆) Let x lie in every Bt. If x<0, take t:=−x>0: x∈Bt would need −t<x, that is, x<x. If x>0, take t:=1/x: x∈Bt would need x<1/t=x. Both cases are impossible, so the remaining case of x<0, x=0, x>0 holds: x=0.

  • (c) Union (0,∞). (⊆) If t<x<2t for some t>0, then x>0. (⊇) If x>0, take t:=2x/3: then t=2x/3<x and 2t=4x/3>x, so x∈Ct. Intersection ∅. Already two members are disjoint: C1=(1,2) and C2=(2,4) have no common element, since x<2 and x>2 cannot both hold. An element of every Ct would lie in both.

In each union the witness t depends on the point x. In the intersections of (a) and (b) the index that excludes x depends on x too; in (c) two fixed disjoint members, C1 and C2, already exclude every x. All of these are allowed by the definitions.

Exercise (B3: Canceling a union)

Give sets A, B, C with A∪B=A∪C and B≠C. Then list the properties that any correct answer must have, so that a different answer can be checked against them.

Solution. Take A={1}, B=∅, C={1}. Then A∪B={1}=A∪C, and B≠C, with the witness 1∈C, 1∉B.

Properties of any answer. Call an element odd one out if it lies in exactly one of B and C.

  • B≠C holds exactly when there is at least one odd one out (by Definition 1.1.1; getting such an element from B≠C uses the classical direction of quantifier negation, Logic and Proof, Chapter 6).
  • A∪B=A∪C holds exactly when every odd one out lies in A. Indeed, if x∈B∖C and x∉A, then x∈A∪B but x∉A∪C; symmetrically for x∈C∖B. Conversely, if every odd one out lies in A, then an element of A∪B either lies in A, or lies in B and then, by excluded middle on x∈C (Logic and Proof, Proposition 2.5.3), in C or in A; so it lies in A∪C, and symmetrically.

So an answer is correct exactly when some element lies in exactly one of B, C, and every such element lies in A. The union with A “hides” the difference between B and C; the lesson is that ∪ cannot be canceled.

C. Going deeper

Exercise (C1: Power sets and operations)

Let A and B be sets.

  • (a) Decide whether P(A∖B)=P(A)∖P(B) can hold. Then prove that every non-empty element of P(A∖B) lies in P(A)∖P(B).
  • (b) Show by an example that P(A)∪P(B)=P(A∪B) can fail. Then prove that it holds if and only if A⊆B or B⊆A.

Solution (Hint 1). In (a), test the empty set against both sides. In (b), one inclusion always holds; for the other, ask which subset of A∪B could fail to be a subset of A and of B.

Solution (Hint 2). For (b) (⇒), argue by the contrapositive: if A⊈B and B⊈A, choose a∈A∖B and b∈B∖A.

Solution.

  • (a) Never. ∅∈P(A∖B), since ∅ is a subset of every set. But ∅∈P(B) as well, so ∅∉P(A)∖P(B). The empty set is a witness for every A and B.

    Now let S∈P(A∖B) be non-empty, and choose s∈S. Since S⊆A∖B⊆A, we have S∈P(A). Since s∈A∖B, s∉B; so s is an element of S outside B, and S⊈B, that is, S∉P(B). Hence S∈P(A)∖P(B).

  • (b) Failure. For A={1}, B={2}: {1,2}∈P(A∪B), but {1,2} is a subset of neither A nor B, so {1,2}∉P(A)∪P(B).

One inclusion always holds. If S∈P(A), then S⊆A⊆A∪B (Proposition 1.1.2), so S∈P(A∪B); likewise for S∈P(B). So P(A)∪P(B)⊆P(A∪B).

(⇐) Suppose A⊆B. Then A∪B=B (if x∈A∪B, then x∈A⊆B or x∈B; and B⊆A∪B). Let S∈P(A∪B). Then S⊆B, so S∈P(B)⊆P(A)∪P(B). With the inclusion above, equality holds. The case B⊆A is the same with A and B exchanged.

(⇒) We prove the contrapositive. Suppose that neither A⊆B nor B⊆A. By the negation of ⊆ (Exercise (A1) (a) records it), there is a∈A with a∉B, and there is b∈B with b∉A; choose such a and b. Let S:={a,b}. Then S⊆A∪B, so S∈P(A∪B). But S⊈A, because b∈S and b∉A; and S⊈B, because a∈S and a∉B. So S∉P(A)∪P(B), and the two sets differ. Two steps here are classical: turning “A⊈B” into a witness uses the classical directions of quantifier negation and of the law for negated implications (Logic and Proof, Chapter 6; see Exercise (A1) (a)), and concluding the implication from its contrapositive is Logic and Proof, Proposition 2.5.2.

Marking scheme. (10 points) - 2: (a) the empty set as the witness that the equality never holds, with both memberships checked. - 2: (a) a non-empty S⊆A∖B is shown to lie in P(A) and, via an element outside B, not in P(B). - 1: (b) a counterexample with the offending subset named. - 2: (b) the inclusion P(A)∪P(B)⊆P(A∪B) and the direction (⇐). - 3: (b) (⇒): witnesses a∈A∖B and b∈B∖A named, and {a,b} shown to lie in P(A∪B) and in neither P(A) nor P(B).

A direct proof also earns the 3: assume equality and A⊈B, fix a∈A∖B (1 point); for arbitrary b∈B, {a,b}∈P(A∪B)=P(A)∪P(B), and {a,b}⊈B because a∉B, so {a,b}⊆A and b∈A, giving B⊆A (2 points). Both routes also end with a classical step: excluded middle on A⊆B in the direct route, the contrapositive in the book’s.

Fatal errors (0 for the step): in (a), testing only non-empty subsets and concluding equality; in (b) (⇒), in the contrapositive route, using one witness a for both failures, or a set such as {a} that lies in P(A).

Exercise (C2: Find the error)

Here is a “proof” that (A∪B)∩(A∪C)⊆A∪(B∩C) for all sets A, B, C.

  1. Let x∈(A∪B)∩(A∪C). (2) Then x∈A∪B and x∈A∪C. (3) We consider two cases, according to x∈A∪B. (4) Case x∈A. Then x∈A∪(B∩C). (5) Case x∈B. Since x∈A∪C, x∈C. (6) So x∈B∩C, and hence x∈A∪(B∩C). (7) In both cases x∈A∪(B∩C), which proves the inclusion.
  • (a) Is the conclusion true?
  • (b) Which line fails, which rule does it break, and which entry of the catalogue of Logic and Proof, Chapter 8 does it commit?
  • (c) Give a counterexample to the illegal step itself: sets and an element for which the line’s premise holds and its conclusion fails.
  • (d) Repair the proof.

Solution.

  • (a) Yes. It is the (⊇) half of the second distributive law of Theorem 1.2.1 (c).

  • (b) Line (5). From x∈A∪C, that is, x∈A or x∈C, it concludes x∈C, dropping the case x∈A. A disjunction is used by ∨E, which needs both cases; the line uses only one. This is a missing case, entry (N7) of the catalogue of Logic and Proof, Chapter 8.

  • (c) Take A={1}, B={1}, C=∅, and x=1. Then x∈B (the case of line (5)) and x∈A∪C (the premise of the line), but x∉C. The step is illegal although the conclusion of the whole proof is true: here x∈A, so x∈A∪(B∩C) by the other case.

  • (d) Replace lines (5)–(6) by: Case x∈B. Since x∈A∪C, there are two sub-cases. If x∈A, then x∈A∪(B∩C). If x∈C, then x∈B∩C, so x∈A∪(B∩C). In both sub-cases x∈A∪(B∩C). The rest of the proof stands.