\( \newcommand{\mc}{\mathcal} \newcommand{\bb}{\mathbb} \newcommand{\powerset}[1]{\mathbb{P}\left(#1\right)} \newcommand{\set}[2]{\left\{#1:#2\right\}} \newcommand{\genrel}[2]{\left\langle#1:#2\right\rangle} \newcommand{\id}{\operatorname{id}} \newcommand{\dom}{\operatorname{dom}} \newcommand{\cod}{\operatorname{cod}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\N}{\mathbb{N}_0} \newcommand{\Q}{\mathbb{Q}} \newcommand{\R}{\mathbb{R}} \newcommand{\C}{\mathbb{C}} \newcommand{\abs}{\operatorname{abs}} \newcommand{\mat}[3]{\mathbb{M}_{#3}(#1, #2)} \newcommand{\gl}[2]{\operatorname{GL}_{#2}(#1)} \newcommand{\sl}[2]{\operatorname{SL}_{#2}(#1)} \newcommand{\inv}[1]{#1^{-1}} \newcommand{\sgn}{\operatorname{sgn}} \)

Naive Set Theory

Introduction

This page serves as a brief introduction to (better: a brief refresher of) naive set theory.

Last updated: Tuesday, 22 August 2023.

Terminology and Notation

A set is a collection of objects. Objects are said to belong or be elements of a set. We write \( a \in S \) to denote the statement "\( a \) is an element of the set \( S \)".

When working symbolically, sets are often denoted by uppercase letters and their elements are denoted by lowercase letters, in the way we wrote above. However, if the set or its elements have other, more specific or more natural notations, we use those notations instead. For example, we write \( \pi \in \bb{R} \) to say "\( \pi \) is a real number".

To write out a specific set, we have a few options for notation.

List Notation
write all of the set's elements between curly braces. Examples include \( \{1, 3, 42\} \), \( \{e, x, a, m, p, l, e\} \), and \( \{\} \).
Set-builder Notation
write a constructor-predicate description of the set's elements. For example, \( \set{(x, y, z) \in \bb{Z}_{>0} \times \bb{Z}_{>0} \times \bb{Z}_{>0}}{x^2 + y^2 = z^2} \) and \( \set{t}{t \text{ is a Pythagorean triple}} \) use set-builder notation to describe their elements. Both are built of two pieces: a constructor detailing how elements are built (which should include variables), and a predicate detailing what the constructed values must satisfy. Sets expressed in this way are always written in the format \[ \set{CONSTRUCTOR}{PREDICATE}. \]

Scruples Warning: Each of these has its own advantages and disadvantages. If the set has a lot of elements, it's often better to use the set-builder notation; however, this may obscure what the elements of the set are in some cases.

Important Sets

The following is a list of important sets and standard notations for them. It is not exhaustive.1

Empty Set
\( \emptyset = \{\} \).
Natural Numbers
\( \bb{N} = \{0, 1, 2, ...\} \).2
Integers
\( \bb{Z} = \{..., -2, -1, 0, 1, 2, ...\} \).
Positive Integers
\( \bb{Z}_+ = \bb{Z}_{> 0} = \{1, 2, 3, ...\} \).
Rational Numbers
\( \bb{Q} = \set{\frac{n}{d}}{n \in \bb{Z},d \in \bb{Z}_+} \).
Real Numbers
\( \bb{R} = \set{x}{x \text{ is a real number}} \).
Complex Numbers
\( \bb{C} = \set{a + bi}{a, b \in \bb{R}} \).

Relationships

Subset

A set \( S \) is a subset of set \( T \) when for all \( x \) we have \( x \in S \) implies \( x \in T \). This relationship is denoted \( S \subseteq T \).

Equality

Sets \( S \) and \( T \) are equal when they have precisely the same elements. This relationship is denoted \( S = T \).

Written more formally, \( S = T \) when for all \( x \) we have \( x \in S \) if and only if \( x \in T \).

Recall that this relationship means that the order of elements and repeated elements in a set do not change the set. For example, \( \{1, 2, 3, 1\} = \{3, 1, 2, 2\} = \{1, 3, 2\} \).

Operations

Let \( S \) and \( T \) be sets.

Intersection

The intersection of \( S \) and \( T \) is the set \( S \cap T = \set{x}{x \in S \text{ and } x \in T} \).

Union

The union of \( S \) and \( T \) is the set \( S \cup T = \set{x}{x \in S \text{ or } x \in T} \).

Set Difference

The relative complement of \( T \) in \( S \) (or the difference of \( S \) with \( T \)) is the set \( S \setminus T = \set{x}{x \in S, x \notin T} \).

Cartesian Product

The Cartesian product of \( S \) and \( T \) is the set \( S \times T = \set{(s, t)}{s \in S \text{ and } t \in T} \).

Note that \( (s, t) \) is an ordered pair, so the order matters!

Powerset

The powerset of \( S \) is the set \( \powerset{S} = \set{X}{X \subseteq S} \).

There are several competing notations for the powerset. The most common ones you might see are \( 2^S \), \( \mathcal{P}(S) \), and \( \bb{P}(S) \).

Fundamental Propositions

Let \( A \), \( B \), \( C \), and \( D \) be sets.

  • \( A \cap \emptyset = \emptyset \), \( A \cup \emptyset = A \), and \( A \setminus \emptyset = A \) (Universe Laws).
  • \( A \cap (B \cap C) = (A \cap B) \cap C \) and \( A \cup (B \cup C) = (A \cup B) \cup C \) (Associativity).
  • \( A \cap B = B \cap A \) and \( A \cup B = B \cup A \) (Commutativity).
  • \( A \cap (B \cup C) = (A \cap B) \cup (A \cap C) \) and \( A \cup (B \cap C) = (A \cup B) \cap (A \cup C) \) (Distributivity).
  • \( A \setminus (B \cup C) = (A \setminus B) \cap (A \setminus C) \) and \( A \setminus (B \cap C) = (A \setminus B) \cup (A \setminus C) \) (DeMorgan's Law).
  • \( A = B \) if and only if \( A \subseteq B \) and \( B \subseteq A \) (Alternate Definition of Equality).
  • If \( A \subseteq B \) and \( B \subseteq C \), then \( A \subseteq C \) (Transitivity of Subsets).
  • If \( A \subseteq B \), then \( C \setminus B \subseteq C \setminus A \).
  • If \( A \subseteq B \) and \( C \subseteq D \), then \( A \cup C \subseteq B \cup D \).
  • \( A \cap B \subseteq A \subseteq A \cup B \).

Note that these bear a striking resemblance to the laws of sentential/propositional/predicate logic. That's not a coincidence; in many ways, set theory and logic are two sides of the same coin.

Footnotes:

1

Maybe one day I'll get a chance to write down all the important sets…

2

Some mathematicians and textbooks don't consider \( 0 \) to be a natural number.