Chapter 13
Notes for the third week: set theory

Notes also available as PDF.

13.1 Language of set theory

Goals:

13.2 Basic definitions

To start, we require unambiguous definitions of terms and items. When a term or item is unambiguously defined, it is called well-defined.

set
An unordered collection of unique elements.
element
Any item in a set, even other sets. (Also entry, member, item, etc.)
empty set
Or null set. Denoted by rather than \{\}.
singleton
A set with only one element.

13.3 Translating sets into (and from) English

From English:

To English:

13.4 Relations

element of
The expression x ∈ A states that x is an element of A. If x\mathrel{∉}A, then x is not an element of A.
subset
If all entries of set A also are in set B, A is a subset of B.
superset
The reverse of subset. If all entries of set B also are in set A, then A is a superset of B.
proper subset
If all entries of set A also are in set B, but some entries of B are not in A, then A is a proper subset of B.
equality
Set A equals set B when A is a subset of B and B is a subset of A.

The symbols for these relations are subject to a little disagreement.

13.5 Translating relations into (and from) English

From English:

To English:

13.6 Consequences of the set relation definitions

Every set is a subset of itself. Expected.

If A = B, then every member of A is a member of B, and every member of B is a member of A. This is what we expect from equality, but we did not define set equality this way. Follow the rules:

The empty set is a subset of all sets. Unexpected! This is a case of carrying the formal logic to its only consistent end.

The alternatives would not be consistent, but proving that requires more machinery that we need.

13.7 Visualizing two or three sets: Venn diagrams

Also known as Venn diagrams.

yes, at some point I will draw some and stick them in the notes.

13.8 Operations

union
The union of two sets A and B, denoted by A ∪ B, is the set consisting of all elements from A and B.
intersection
The intersection of two sets A and B, denoted A ∩ B, is the set consisting of all elements that are in both A and B.
set difference
The set difference of two sets A and B, written A \ B, is the set of entries of A that are not entries of B.

If A and B share no entries, they are called disjoint. One surprising consequence is that every set A has a subset disjoint to the set A itself.

Can any other subset be disjoint with its superset? No.

13.8.1 Similarities to arithmetic

Properties of arithmetic:

commutative
a + b = b + a, a ⋅ b = b ⋅ a
associative
a + (b + c) = (a + b) + c, a(bc) = (ab)c
distributive
a(b + c) = ab + ac

Which of these apply to set operations union and intersection? (Informally. Formally we must rely on the properties of and and or.)

If C = A ∪ B, then C = \{x\kern 1.66702pt |\kern 1.66702pt x ∈ A\text{ or }x ∈ B\}. Reversing the sets does not matter, so C = A ∪ B = B ∪ A. The union is commutative. Similary, if D = A ∪ (B ∪ C), we can write D in an implicit form and see that D = (A ∪ B) ∪ C to see that the union is associative.

The same arguments show that set intersection is commutative and associative.

For the distributive property, which is similar to addition and which to multiplication? A gut feeling is that unions add, so try it.

\eqalignno{ A ∩ (B ∪ C) & = \{x\kern 1.66702pt |\kern 1.66702pt x ∈ A\text{ and }x ∈ B ∪ C\} & & \cr & = \{x\kern 1.66702pt |\kern 1.66702pt x ∈ A\text{ and }(x ∈ B\text{ or }x ∈ C)\} & & \cr & = \{x\kern 1.66702pt |\kern 1.66702pt (x ∈ A\text{ and }x ∈ B)\text{ or }(x ∈ A\text{ and }x ∈ C)\} & & \cr & = (A ∩ B) ∪ (A ∩ C) & & }

But with sets, both operations distribute:

\eqalignno{ A ∪ (B ∩ C) & = \{x\kern 1.66702pt |\kern 1.66702pt x ∈ A\text{ or }x ∈ B ∩ C\} & & \cr & = \{x\kern 1.66702pt |\kern 1.66702pt x ∈ A\text{ or }(x ∈ B\text{ and }x ∈ C)\} & & \cr & = \{x\kern 1.66702pt |\kern 1.66702pt (x ∈ A\text{ or }x ∈ B)\text{ and }(x ∈ A\text{ or }x ∈ C)\} & & \cr & = (A ∪ B) ∩ (A ∪ C) & & }

The rules of set theory are intimately tied to logic. Logical operations dictate how set operations behave. We will cover the properties of logic in the next chapter.

13.9 Translating operations into English

To English:

13.10 Special operations

The complement and cross-product operations require extra definitions.

13.10.1 Universes and complements

universe
A master set containing all the other sets in the current context.
complement
The complement of a set A is the set of all elements in a specified universal set U that are not in A.

13.10.2 Tuples and cross products

tuple
An ordered collection of elements, (A,B,C).
cross product
A set of all ordered pairs whose entries are drawn from two sets.

Let A = \{{a}_{1},{a}_{2}\} and B = \{{b}_{1},{b}_{2}\}.

Then A × B = \{({a}_{1},{b}_{1}),({a}_{1},{b}_{2}),({a}_{2},{b}_{1}),({a}_{2},{b}_{2})\} and
B × A = \{({b}_{1},{a}_{1}),({b}_{1},{a}_{2}),({b}_{2},{a}_{1}),({b}_{2},{a}_{2})\}. Because ({a}_{1},{b}_{1})≠({b}_{1},{a}_{1}) in general, A × B≠B × A in general.

When does A × B = B × A?

13.11 Cardinality and the power set

cardinality
The cardinality of a set A is the number of elements in A. Often written as |A|. The text uses n(A).
power set
The power set of a set A is the set of all subsets of A.

What is the cardinality of the power set of A?

What is the cardinality of A ∪ B?