Lecture 4
Lecture 4
Lecture 4
Sets
Let me make this clear, the waters of set theory are vast and deep, we will only be
dipping our toes in barely. We will not go through a rigorous construction of what
constitutes a set via the ZFC (Zermelo–Fraenkel–Choice) axioms.
For the moment (and this course), a set will be an aggregate or a collection of objects
(elements). Or, better yet, to quote Georg Cantor “a set is a many that allows itself
to be thought of as a one.” Later, we will see an example that shows this vague
notion of defining a set can be problematic.
Def: A set S is a collection of elements x. Sets will typically be denoted by capital
letters. We say x ∈ S as a mathematical shorthand for “x is an element of the set
S”. The shorthand x ∈ / S means “x is not an element of the set S.”
Ex: Sets can be described in many ways:
A = {a, b, c, d}
is a set with the elements a, b, c and d. Also
B = {dog, cat, horse, coelacanth}
is a set with the elements dog, cat, horse, and coelacanth.
C = {{1}, {1, 2}, {π, e, 17}}
is a set with elements {1}, {1, 2} and {π, e, 17}. The thing to note from this last
example is that sets can be elements themselves of other sets.
Often times we are describing a collection of elements that is difficult to list directly
(especially if the number of elements is infinite), we instead describe the elements by
a property or a rule that will ‘grab’ all the elements at once.
Ex: For example take the set
E = {x ∈ N | x is even}.
This is read as the set of all elements x in the natural numbers such that x is an even
number. Thus, E is just the set of positive even numbers.
When reading a set, the brackets {} mean “the set of”, a | or : in the definition means
“such that” or “s.t.”.
2
Note: This is probably by far the most common way of defining sets in naive set
theory. We define sets by a collection of elements that return the truth value of ‘True”
when inserted into particular statements.
Ex: Just for another quick example.
S = {P ∈ {people who have ever lived} | P was/is a U.S. President}.
Def: For a finite set X, it’s cardinality, written as |X| is the number of elements
inside of X. This is a defiinition that we will return to and generalize later.
Def: The empty set, denoted by ∅, is the set that contains no elements.
Ex: Define the set
A = {7a + 3b | a, b ∈ Z}
(This set is really just Z written in a different way as we saw in class)
3
One of the sets we will be working with often is the real numbers, R. Intervals of the
real numbers are sets of the real numbers that will be used often enough to warrant
their own notation. Thus
Interval Notation
[a, b] = {x ∈ R | a ≤ x ≤ b}
[a, b) = {x ∈ R | a ≤ x < b}
(a, b] = {x ∈ R | a < x ≤ b}
(a, b) = {x ∈ R | a < x < b}.
Proof. For any element x ∈ S, the statement “If x ∈ S, then x ∈ S” is clearly true.
Thus, S ⊆ S.
Now, to prove that ∅ ⊆ S, we need to show why the statement “If x ∈ ∅, then
x ∈ S” is true. The hypothesis of this statement is always false as the empty set is
precisely that, empty. Thus, as the hypothesis is false, the implication is vacuously
true. Thus, ∅ ⊆ S.
Def 1: (Set Equality) Given two sets A and B, we say that A = B when they
contain exactly the same elements.
Def 2: (Set Equality) Given two sets A and B, we say that A = B when A ⊆ B
and B ⊆ A.
If A ⊆ S and A 6= S, then we say A ⊂ S, and say that A is a proper subset of S.
Ex: Let us answer the following questions
a). ∅⊆∅
b). ∅∈∅
c). ∅ ∈ {∅}
d). 1 ∈ {1, {1}}
4
Answers:
a). True
b). False
c). True
d). True
e). False
f). True
g). True
Set Operations
To begin, sets typically exist within some sort of larger universal set. A universal set
is a background for which set operations will occur. For example...
Ex: In the set
S = {x ∈ R | x2 = 4} = {−2, 2}
the universal set is the real numbers, R.
Usually in the context of the set or the question being asked at the time the universal
set will be clear. In the cases that it is not, or it needs to be referred to abstractly,
we will reserve the captial letter U to represent an abstract universal set.
Def: The complement of a set S ⊆ U , is defined to be the set
S c = {x ∈ U | x ∈
/ S}.
S = {−2, 2}
and
SRc = (−∞, −2) ∪ (−2, 2) ∪ (2, ∞).
(We’re jumping ahead a little here as I haven’t defined union yet, but you can check
for the definition below if there is any confusion.)
Another definition that is related to complement is the set difference.
Def: For two sets A and B, the set difference is the set defined by
A\B = A − B = {x ∈ A | x ∈
/ B}.
Note: If B ⊆ A, we can view A as the universe that B lives in, and in this case the
prior two definitions coincide. A\B = B c .
Note 2: Whereas complementation is a relative procedure, being dependent upon
choice of the universal set and all, set difference is not. The set difference does not
depend upon a choice of the universal set.
Ex: Let A and B be the following two sets.
A = {a, b, c, d}, B = {b, d, e, f, g, . . . , z}
Then
A\B = {a, c}, B\A = {e, f, g, . . . , z}.