More Operations on Sets

Chapter 2: Quantificational Logic

Learning objectives

  • Compute indexed unions and intersections of families of sets
  • Determine the power set of a given set and count its elements
  • Compute Cartesian products of two or more sets
  • Recognize when an element of P(A)\mathcal{P}(A) is a subset, not a member, of AA

Two sets are easy; an infinite family of sets is where set theory earns its keep. Once you allow more than two sets at a time, the basic operations from §1.4 need to scale: indexed union generalizes \cup to arbitrarily many sets, and indexed intersection generalizes \cap. Two further constructions — the power set, which collects every subset of a set into one giant new set, and the Cartesian product, which builds the set of ordered pairs — will be the foundation for relations (Chapter 4) and functions (Chapter 5). All four constructions are essentially shorthand for quantified statements you already know, which is why this section sits right after the quantifier negation rules.

Indexed unions and intersections

An indexed family of sets is a collection {Ai}iI{A_i}_{i \in I}, where II is some index set (often N\mathbb{N} or a finite list). The indexed union and indexed intersection are:

iIAi={xiI,  xAi}\bigcup_{i \in I} A_i = \{x \mid \exists i \in I,\; x \in A_i\}
iIAi={xiI,  xAi}\bigcap_{i \in I} A_i = \{x \mid \forall i \in I,\; x \in A_i\}

The union collects everything that lies in at least one AiA_i; the intersection keeps only what lies in every AiA_i. The quantifier \exists powers the union; the quantifier \forall powers the intersection. This is the deep reason the two are duals: De Morgan for quantifiers gives De Morgan for indexed sets.

For example, if An={1,2,,n}A_n = {1, 2, \ldots, n} for n=1,2,3n = 1, 2, 3:

n=13An={1,2,3}\bigcup_{n=1}^{3} A_n = {1, 2, 3} (the largest AnA_n) and n=13An={1}\bigcap_{n=1}^{3} A_n = {1} (the smallest AnA_n).

Set VennInteractive figure — enable JavaScript to interact.

The power set

The power set of AA, written P(A)\mathcal{P}(A) (also 2A2^A), is the set of all subsets of AA:

P(A)={SSA}.\mathcal{P}(A) = \{S \mid S \subseteq A\}.

If AA has nn elements, P(A)\mathcal{P}(A) has 2n2^n elements — one for each choice of "include or exclude" per element. For A={1,2}A = {1, 2}:

P({1,2})={,  {1},  {2},  {1,2}}.\mathcal{P}(\{1, 2\}) = \{\emptyset,\; \{1\},\; \{2\},\; \{1, 2\}\}.

Notice the empty set \emptyset is always a member of P(A)\mathcal{P}(A) (the empty set is a subset of everything), and AA itself is always a member of P(A)\mathcal{P}(A) (every set is a subset of itself).

Cartesian products

The Cartesian product of AA and BB is the set of ordered pairs

A×B={(a,b)aAbB}.A \times B = \{(a, b) \mid a \in A \wedge b \in B\}.

If A=m|A| = m and B=n|B| = n, then A×B=mn|A \times B| = mn. The order in a pair matters: (a,b)(b,a)(a, b) \neq (b, a) in general. Cartesian products are how we model planes (R×R=R2\mathbb{R} \times \mathbb{R} = \mathbb{R}^2), strings (Σ\Sigma^*), database joins (one row from each table), and — coming up in Chapter 4 — relations between sets.

Pause and think: Is {1}{1} an element of P({1,2})\mathcal{P}({1, 2})? Is 11 an element of P({1,2})\mathcal{P}({1, 2})? What is the difference between xP(A)x \in \mathcal{P}(A) and xAx \subseteq A? (Hint: members of P(A)\mathcal{P}(A) are SETS; the number 11 is not a set.)

Try it

  • Before listing: predict the size of P({a,b,c})\mathcal{P}({a, b, c}). Then list every element to verify your count of 23=82^3 = 8.
  • Predict first: which is bigger, i=13{i}\bigcup_{i=1}^{3} {i} or i=13{i}\bigcap_{i=1}^{3} {i}? Compute both and explain.
  • Let An=[0,1/n]A_n = [0, 1/n] for n=1,2,3,n = 1, 2, 3, \ldots. Predict n=1An\bigcap_{n=1}^{\infty} A_n before computing. (Hint: 00 is in every AnA_n; is any positive number in every AnA_n?)
  • Compute {0,1}×{0,1}×{0,1}{0, 1} \times {0, 1} \times {0, 1} and count its elements. (You should see all binary strings of length 33.)
  • Is P(A)\emptyset \in \mathcal{P}(A) for every set AA? Is AP(A)A \in \mathcal{P}(A)? Justify by recalling that elements of P(A)\mathcal{P}(A) are exactly the subsets of AA.

Code ChallengeInteractive figure — enable JavaScript to interact.

A trap to watch for

The single most common mistake is confusing membership with subsethood when working with P(A)\mathcal{P}(A). For A={1,2}A = {1, 2}: {1}{1} is an element of P(A)\mathcal{P}(A) because {1}{1} is a subset of AA; but 11 is not an element of P(A)\mathcal{P}(A), because 11 is not a set. The general rule: xP(A)xAx \in \mathcal{P}(A) \Leftrightarrow x \subseteq A. Element-of P(A)\mathcal{P}(A) means subset-of AA. Spending sixty seconds with this rule now saves hours of confusion later when you start building relations on power sets and seeing nested set notation.

What you now know

You can build indexed unions and intersections, list power sets, and compute Cartesian products. Chapter 2 is now complete — you have a working vocabulary of propositional and predicate logic, plus the set-theoretic operations they describe. Chapter 3 leverages all of this into the art of writing proofs: direct, by contradiction, by contrapositive, and proofs that maneuver through quantifiers.

References

  • Velleman, D. J. (2019). How to Prove It: A Structured Approach (3rd ed.). Cambridge University Press, ch. 2.
  • Halmos, P. R. (1960). Naive Set Theory. Van Nostrand, §§6–7.
  • Enderton, H. B. (1977). Elements of Set Theory. Academic Press, ch. 3.
  • Kunen, K. (2009). The Foundations of Mathematics. College Publications, ch. 1.

This page is prerendered for SEO and accessibility. The interactive widgets above hydrate on JavaScript load.