2  Set Algebra

Set theory is the ambient language of mathematics. We do not attempt to develop it axiomatically — that belongs to logic — but record the operations and identities that will be used without comment throughout.

2.1 Families of sets

Definition 2.1 (Set) A set \(X\) is a collection of well-defined objects, called elements, such that for any object \(x\) it is unambiguous whether \(x \in X\) or \(x \notin X\).

In practice, sets arise as subsets of some ambient set \(X\), and we work relative to it. The complement of \(A \subset X\) is \[ X \setminus A := \{x \in X : x \notin A\}. \]

Definition 2.2 (Union and intersection) Let \(\{U_\alpha\}_{\alpha \in \Lambda}\) be a family of sets indexed by a set \(\Lambda\). Define \[ \bigcup_{\alpha \in \Lambda} U_\alpha := \{x : x \in U_\alpha \text{ for some } \alpha \in \Lambda\}, \qquad \bigcap_{\alpha \in \Lambda} U_\alpha := \{x : x \in U_\alpha \text{ for every } \alpha \in \Lambda\}. \]

The index set \(\Lambda\) is a labelling device and nothing more. When \(\Lambda = \mathbb{N}\) we write \(\bigcup_n U_n\); when \(\Lambda = \mathbb{R}\) and \(U_x = (x-1, x+1)\), the family is uncountably large. The notation is uniform regardless, and this uniformity is precisely its value.

NoteConvention

An intersection over an empty index set is \(X\) (every condition holds vacuously), and a union over an empty index set is \(\varnothing\). These edge cases will not arise explicitly, but they are the reason the identities in Proposition 2.1 hold without exception.

2.2 De Morgan’s laws

Theorem 2.1 (De Morgan) Let \(\{U_\alpha\}_{\alpha \in \Lambda}\) be a family of subsets of \(X\). Then \[ X \setminus \bigcup_{\alpha} U_\alpha = \bigcap_{\alpha} (X \setminus U_\alpha), \qquad X \setminus \bigcap_{\alpha} U_\alpha = \bigcup_{\alpha} (X \setminus U_\alpha). \]

Proof. For the first identity: \(x \in X \setminus \bigcup_\alpha U_\alpha\) iff \(x \notin U_\alpha\) for every \(\alpha\), iff \(x \in X \setminus U_\alpha\) for every \(\alpha\), iff \(x \in \bigcap_\alpha (X \setminus U_\alpha)\).

The second is the same argument with “every” replaced by “some.”

De Morgan dualises union and intersection under complementation. The figure below makes the first identity visible for two sets.

Figure 2.1: De Morgan’s first law.

The topological payoff is worth naming: since the complement of an arbitrary union is a (possibly infinite) intersection of complements, and closed sets are defined as complements of open sets, the topology axioms — closed under arbitrary unions, closed under finite intersections — are not arbitrary. The asymmetry is forced.

Exercise. Let \(A, B \subset X\). Prove or disprove: \(A \subset B\) implies \(X \setminus B \subset X \setminus A\).

True. Let \(x \in X \setminus B\). Then \(x \notin B\). Since \(A \subset B\), if \(x \in A\) then \(x \in B\), a contradiction. Hence \(x \notin A\), i.e., \(x \in X \setminus A\). \(\square\)

Note the direction: containment reverses under complementation. This is a set-theoretic instance of contraposition, and recurs constantly — in topology it is why the preimage of a closed set under a continuous function is closed.

2.3 Basic identities

Proposition 2.1 (Set algebra) Let \(A, B, C \subset X\). Then:

  1. Distributive laws. \[A \cap (B \cup C) = (A \cap B) \cup (A \cap C), \quad A \cup (B \cap C) = (A \cup B) \cap (A \cup C).\]

  2. Inclusion. \[A \cap B \subset A \subset A \cup B,\] and if \(A \subset B\) then \(A \cup C \subset B \cup C\) and \(A \cap C \subset B \cap C\).

  3. Complements. \[A \cup (X \setminus A) = X, \qquad A \cap (X \setminus A) = \varnothing.\]

Proof.

  1. \(x \in A \cap (B \cup C)\) iff \(x \in A\) and (\(x \in B\) or \(x \in C\)), iff (\(x \in A \cap B\)) or (\(x \in A \cap C\)). The second distributive law is the same with \(\cap\) and \(\cup\) exchanged.

  2. If \(x \in A \cap B\) then \(x \in A\); if \(x \in A\) then \(x \in A \cup B\). Monotonicity under \(A \subset B\) is an immediate element chase.

  3. Every \(x \in X\) either lies in \(A\) or does not, so \(A \cup (X \setminus A) = X\). If \(x \in A \cap (X \setminus A)\) then \(x \in A\) and \(x \notin A\), a contradiction.

These identities will be used without citation. The point of recording them is to fix a shared vocabulary — in topology, algebra, and analysis alike, set-theoretic manipulation is the common background language, and fluency with it should become automatic.

Exercise. Let \(\{U_\alpha\}_{\alpha \in \Lambda}\) and \(\{V_\beta\}_{\beta \in \Gamma}\) be two families of subsets of \(X\). Prove that \[ \bigcup_{\alpha \in \Lambda} U_\alpha \cap \bigcup_{\beta \in \Gamma} V_\beta = \bigcup_{(\alpha, \beta) \in \Lambda \times \Gamma} (U_\alpha \cap V_\beta). \]

Let \(x \in \bigcup_\alpha U_\alpha \cap \bigcup_\beta V_\beta\). Then \(x \in U_\alpha\) for some \(\alpha\) and \(x \in V_\beta\) for some \(\beta\), so \(x \in U_\alpha \cap V_\beta \subset \bigcup_{(\alpha,\beta)} (U_\alpha \cap V_\beta)\).

Conversely, if \(x \in U_\alpha \cap V_\beta\) for some \((\alpha, \beta)\), then \(x \in \bigcup_\alpha U_\alpha\) and \(x \in \bigcup_\beta V_\beta\), so \(x\) is in the intersection of the two unions. \(\square\)

This identity — intersection distributes over arbitrary unions in both arguments — recurs throughout topology whenever one needs to verify that a collection of sets generates a basis.

2.4 Symmetric difference

The symmetric difference of \(A, B \subset X\) is \[ A \triangle B := (A \setminus B) \cup (B \setminus A), \] the set of elements in exactly one of \(A\) and \(B\). It is the natural notion of “distance” between sets in measure theory.

Exercise. Prove that \(\triangle\) is associative: \((A \triangle B) \triangle C = A \triangle (B \triangle C)\).

One checks that \(x \in A \triangle B\) iff \(x\) belongs to an odd number of the sets \(A, B\). Writing \(\mathbf{1}_A\) for the indicator of \(A\) with values in \(\mathbb{Z}/2\mathbb{Z}\), we have \(\mathbf{1}_{A \triangle B} = \mathbf{1}_A + \mathbf{1}_B \pmod{2}\). Addition mod 2 is associative, so \(\triangle\) is associative. \(\square\)

In fact, \((\mathcal{P}(X), \triangle, \cap)\) is a Boolean ring — \(\triangle\) plays the role of addition and \(\cap\) plays the role of multiplication. This algebraic structure underlies measure theory, where symmetric difference is the natural notion of “distance” between measurable sets.