📚 Revision: sets and mappings#

| words

References and additional materials
_images/simon1994.png

[Simon and Blume, 1994]

  • Appendix A1.1, 1.2

  • Chapters 2.1, 2.2, 3.1-3.4, 5.1

_images/sundaram1996.png

[Sundaram, 1996]

Appendix A.1, B.1, B.2


  • Veritasium video on paradoxes of set theory and mathematical incompleteness YouTube

Notation cheat sheet

Notation

Meaning

\(P \implies Q\)

\(P\) implies \(Q\)

\(P \iff Q\)

\(P \implies Q\) and \(Q \implies P\)

\(\exists\), \(\exists !\)

there exists, there exists one and only one [element, value]

\(\forall\)

for all [elements in a set]

\(\therefore\)

therefore [in logical statements]

\(\because\)

because [in logical statements]

\(a \stackrel{def.}{=}\text{[expr]}\) or
\(a := \text{[expr]}\)


\(a\) is defined to be equal to \(\text{[expr]}\)

\(\in\)

is element of [a set]

\(\subset\)

is subset of [a set]

\(\cup\)

union [of sets]

\(\cap\)

intersection [of sets]

Naive set theory#

Definition

A set (\(X\)) is a collection of objects.
A particular object within a set (\(x\)) is known as an element of that set.

  • Sets: \(A, B, X\)

  • Elements: \(x,y,z\)

  • \(x \in X\) denotes the idea that x is an element of X

  • \(y \notin X\) denotes the idea that y is not an element of X

  • empty set is denoted by \(\varnothing\)

Definition of a set

A set \(A\) can be defined by either

  • direct enumeration of its elements

  • defining a formula for infinite number of elements

  • as a subset of already defined set \(B\), formula \(\psi(x)\) to form elements of \(A\), and a condition/property on \(x\)

\[A = \{ \psi(x), x \in B \,\colon\, \text{condition on x}\}\]

Russell’s Paradox

Let \(\mathbb{A}\) be the property “is a set and does not belong to itself”. Suppose that \(A\) is the set of all sets that possess property \(\mathbb{A}\). Is \(A \in A\)?

– Bertrand Russell, 1901

If \(A \in A\), then it must be the case that \(A\) possesses property \(\mathbb{A}\). This means that \(A \notin A\). Contradiction! Thus it must be the case that \(A \notin A\). But if \(A\) is a set and \(A \notin A\), then it clearly possesses property \(\mathbb{A}\). Thus \(A \in A\). Contradiction. Thus it must be the case that \(A \in A\).

We have a paradox. It cannot be the case that both \(A \in A\) and \(A \notin A\).

One possible resolution to Russell’s paradox is to not allow mathematical objects like this particular \(A\) to be considered a set. Re-definition of the set theory by Ernst Zermelo, Abraham Fraenkel and Thoralf Skolem in 1908-1920, known today as ZFC axiomatic set theory.

Definition

Consider two sets, \(X\) and \(Y\). Suppose that every element of \(X\) also belongs to \(Y\). If this is the case, then we say that \(X\) is a subset of \(Y\).

This is written in mathematical notation as \(X \subseteq Y\).

Definition

Suppose that in addition to every element of \(X\) also belonging to \(Y\), there is at least one element of Y that does not belong to \(X\). If this is the case, then we say that \(X\) is a proper subset of \(Y\).

Definition

The power set \(2^X\) of a set \(X\) is the set of all subsets of \(X\).

Note that the elements of a power set are sets themselves.

Example

Suppose that \(X = \{1, 2, 3\}\). The power set for the set \(X\) in this example is

\[2^X = \big\{\varnothing, \{1\} , \{2\} , \{3\} , \{1, 2\} , \{1, 3\} , \{2, 3\} , \{1, 2, 3\}\big\}\]

Definition

The Cartesian product of two sets is defined to be the set of all ordered pairs (or doublets) that contain one component from each of the two sets in the order that the sets were specified. This can be formally expressed as

\[X \times Y = \{(x, y) : x \in X , \: y \in Y \}\]

Definition

The Cartesian product of \(n\) sets is defined to be the set of all ordered \(n\)-tuples that contain one component from each of the \(n\) sets in the order that the sets were specified. This can be formally expressed as

\[\times_{i \in \{1,2,··· ,n\}} X_i = \{(x_1, x_2, · · · , x_n) : x_i \in X_i \; \forall i \in \{1, 2, · · · , n\}\}\]

Note that the order of the sets matters here. Cartesian products generate sets of “ordered” n-tuples.

Operations on sets#

Definition

The union of \(X\) and \(Y\), which is denoted by \(X \cup Y\), is the set

\[ X \cup Y = \{a \in U : a \in X \text{ or } a \in Y\} \]
_images/71926ac4b423521561feae3483f796d652aae48cb3f34feb68eed2398c2dfe9c.png

Definition

The intersection of \(X\) and \(Y\), which is denoted by \(X \cap Y\), is the set

\[ X \cap Y = \{a \in U : a \in X \text{ and } a \in Y\} \]
_images/1412eed8f697ca15c3934ecdf4fab97a121d631505a338283ca8570e6bb64df2.png

Definition

If \(X \cap Y = \varnothing\), then the sets \(X\) and \(Y\) are said to be disjoint.

_images/fff947bec790e8ba5839a797069de06be6db0e38ca5cfd03fb70614e4d4246d6.png

Definition

The set difference “X excluding Y”, which is denoted by \(X \setminus Y\), is the set

\[X \setminus Y = \{a \in X : a \notin Y \}\]
_images/cec2113e3d00a5c374e3f1c99085f6b28f6401cee59193473e9f70d8437877d6.png

Definition

Set complementation is a special case of set exclusion. The complement of the set \(X\), which is denoted by \(X^C\) , is defined as \(X^C = U \setminus X\).

Note

There are several alternative notations for the complement of a set, including \(X^C\), \(X'\), \(\bar{X}\), and \(\neg X\).

_images/4ed420936d2f1dbdf5c5a7ceea1d415f67a25b18dd1e166c09d4193b2d7b29a7.png

Note that \(X \cup X^C = U\) and \(X \cap X^C = \varnothing\).

Definition

The symmetric difference of \(X\) and \(Y\), which is denoted by \(X \bigtriangleup Y\), is the set

\[X \bigtriangleup Y = (X \setminus Y) \cup (Y \setminus X)\]

Note

Exclusive or is another name for the symmetric difference operation.

_images/29cc725c64811eca0717848ceb243559d260a7389a772110c2b2ab3f5a543c6a.png

Sets of numbers#

  • The set of natural numbers \(\mathbb{N} = \{1, 2, 3, · · · \}\)

  • The set of integer \(\mathbb{Z} = \{· · · , −2, −1, 0, 1, 2, · · · \}\)

  • The set of rational number \(\mathbb{Q} = \{ \frac{m}{n} : m \in \mathbb{Z}, n \in \mathbb{N}\}\)

  • The set of real numbers \(\mathbb{R} = (-\infty, \infty)\)

  • The set of non-negative real numbers \(\mathbb{R}_+ = \{x \in \mathbb{R} : x \geqslant 0\} = [0, \infty)\)

  • The set of positive real numbers \(\mathbb{R}_{++} = \{x \in \mathbb{R}: x > 0\} = (0, \infty)\)

  • The set of complex numbers \(\mathbb{C} = \{ a + bi : a \in \mathbb{R}, \: b \in \mathbb{R}, \: i = \sqrt{−1} \}\)

Example

\[\begin{split}\begin{array}{ccc} 1 \in \mathbb{N} & 0 \in \mathbb{Z}_+ & -1 \in \mathbb{Z} \\ \frac{1}{2} \in \mathbb{Q} & \sqrt{2} \in \mathbb{R} & \sqrt{2} \in \mathbb{R}_{++} \end{array}\end{split}\]

The following “nesting” relationship exists between these common sets of numbers:

\[\mathbb{N} \subset \mathbb{Z}_+ \subset \mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R} \subset \mathbb{C}\]

Let \(a \in \mathbb{R}, b \in \mathbb{R} \text{ and } a < b\). There are four types of intervals of an interval:

  • \([a, b] = \{x \in \mathbb{R} : a \leqslant x \leqslant b\}\)

  • \((a, b) = \{x \in \mathbb{R} : a < x < b\}\)

  • \([a, b) = \{x \in \mathbb{R} : a \leqslant x < b\}\)

  • \((a, b] = \{x \in \mathbb{R} : a < x \leqslant b\}\)


Multidimensional number sets (with vectors as elements) are given by Cartesian products

\[\mathbb{R}^2 = \mathbb{R} \times \mathbb{R} = \{(x, y) : x \in \mathbb{R}, \; y \in \mathbb{R}\}\]

The \(n\)-dimensional Euclidean coordinate plane:

\[\mathbb{R}^n = \times_{i \in \{1,2,··· ,n\}} \mathbb{R} = \{(x_1, x_2, · · · , x_n) : x_i \in \mathbb{R} \; \forall i \in \{1, 2, · · · , n\}\}\]

The real number system#

There are several approaches for defining rigorously what numbers are:

  • axiomatic approach (real numbers are something that )

  • model-theoretic approach (Dedekind cuts, etc)

Axiomatic definition#

Definition

A field is a set of numbers that is closed under addition, subtraction, multiplication, and division (except by zero element).

  • “closed” means that any two elements in the field can be added, subtracted, multiplied, and divided (except by zero) to produce another element in the field

  • field is one of many abstract algebraic structures (such as groups, rings, lattices, algebras, etc) which are axiomatically defined by imposing specific properties on the set and its operations between its elements

Definition

An ordered field is a field that is also equipped with a total order relation that is compatible with the field operations.

  • every pair of elements in the total order can be compared

Example

The set of rational numbers \(\mathbb{Q}\) is an ordered field.

Definition

A complete field is a field in which every non-empty subset that is bounded above has a least upper bound (which belongs to the field).

  • this property is known as the completeness axiom and can be stated in several different equivalent ways:

    • through infinite series of nested intervals (Cantor’s intersection theorem)

    • through limits of monotone sequences (details later in the course)

    • through convergence of Cauchy sequences (details later in the course)

  • it does not hold for the set of rational numbers \(\mathbb{Q}\): for example, the set of rational numbers each element of which squared is is less than \(2\) has no least upper bound in \(\mathbb{Q}\)

Definition

Real numbers \(\mathbb{R}\) are defined as a complete ordered field.

  • completeness ensures that the real number line has no gaps in it

  • unlike the rational numbers!

Fact

\(\sqrt{2}\) is not a rational number.

  • however, \(\sqrt{2}\) is a very “real” number which we encounter in many practical situations: diagonal of a square with side length 1 meter

What’s next?#

  • rigorous definitions of number representation

    • decimal representation

    • continued fractions

  • rigorous definitions of algebraic operations

    • addition

    • subtraction

    • multiplication

    • division

  • rigorous definitions of order relations

    • less than

    • greater than

    • less than or equal to

    • greater than or equal to

  • rigorous definitions of convergence and limits

  • etc.

This is re-definition of all our “common sense” knowledge about numbers in a rigorous mathematical language \(\implies\) we can use standard arithmetic operations at a deeper level of mathematical rigour.

Dedekind cuts#

  • theoretical model of real numbers

  • allows for rigorous definition of real numbers in a constructive way without relying on the axioms

  • associates a real number to a set (rather, two sets forming a partition of another set)

Definition

A Dedekind cut is a partition of the rational numbers into two non-empty sets \(A\) and \(A'\) such that

  1. every rational number is in either \(A\) or \(A'\), but not in both

\[ A \cup A' = \mathbb{Q} \text{ and } A \cap A' = \varnothing \]
  1. every element of \(A\) is less than every element of \(A'\)

\[ \forall a \in A, \: \forall a' \in A' \implies a < a' \]

The set \(A\) is referred to as lower half, the set \(A'\) as upper half.

Examples of Dedekind cuts

  1. \(A \subset \mathbb{Q}: \forall a \in A \:\: a < 1\), \(A' \subset \mathbb{Q}: \forall a' \in A' \:\: a' \ge 1\)

  2. \(A \subset \mathbb{Q}: \forall a \in A \:\: a \le 1\), \(A' \subset \mathbb{Q}: \forall a' \in A' \:\: a' > 1\)

  3. \(A \subset \mathbb{Q}: \forall a \in A \:\: a^2 < 2\), \(A' \subset \mathbb{Q}: \forall a' \in A' \:\: a'^2 > 2\)

Fact

The above three examples cover all possible cases for Dedekind cuts:

  1. Upper half has the least element

  2. Lower half has the greatest element

  3. Neither half has the least or the greatest element

Fact

Dedekind cut of the third type (those which do not have the least element in the upper half and the greatest element in the lower half) defines an irrational number.

_images/dedekind.png
  • irrational numbers are objects of new type, they are not rational numbers by construction

  • fill in the “holes” between rational numbers

  • rational numbers \(\mathbb{Q}\) and irrational numbers defined by Dedekind cuts form the set of real numbers \(\mathbb{R}\)

Fact

For any real numbers \(a,b \in \mathbb{R}\) where \(a>b\) there is a real number \(c \in \mathbb{R}\) such that \(b<c<a\).

  • it follows from the proof that the number \(c\) is in fact rational

  • it also follows by repeated application of the proposition that an infinite number of rational numbers can be fitted between any two given rational numbers, however close they are in the number line

  • overall, the number line of real numbers has no gaps!

What’s next?#

Same steps as in axiomatic approach to define the common sense operations, but using Dedekind cuts as the definition of real numbers.

  • rigorous definitions of number representation using Dedekind cuts

    • decimal representation

    • continued fractions

  • rigorous definitions of algebraic operations using Dedekind cuts

    • addition

    • subtraction

    • multiplication

    • division

  • rigorous definitions of order relations from set theory

    • less than

    • greater than

    • less than or equal to

    • greater than or equal to

  • rigorous definitions of convergence and limits

  • etc.

This is re-definition of all our “common sense” knowledge about numbers in a rigorous mathematical language \(\implies\) we can use standard arithmetic operations at a deeper level of mathematical rigour.

Example

\[\begin{array}{ccc} 32^{\frac{3}{5}} & \frac{8}{27}^{\frac{2}{3}} & -9^{\frac{3}{2}} \end{array}\]

Note

Division by zero in not defined for any real number \(p\).

Note

When exponent is fractional and base is negative, the result is undefined for non-integer exponents.
See discussion here

Functions and other mappings#

Definition

A generic mapping \(f\) from \(A\) to \(B\) is a rule that assigns elements \(x\) of a set \(A\) to elements of a set \(B\). We write

\[f: A \to B \qquad\text{ or }\qquad f: A \ni x \mapsto f(x) \in B\]

Definition

A function \(f: A \rightarrow B\) from set \(A\) to set \(B\) is a mapping that associates to each element of \(A\) a uniquely determined element of \(B\).

_images/function.png

Definition

\(A\) is called the domain of \(f\) and \(B\) is called the co-domain

Example

Consider the sets \(A=\{a,b,c,d\}\) and \(B=\{1,2,3,4\}\). The following diagrams illustrate possible associations between elements of \(A\) and \(B\), i.e. domain \(A\) and co-domain \(B\):

_images/mapping_cartesian.png

These associations can be written as subsets of the Cartesian product \(A \times B\) as follows:

  • (i) \(\{(a,2),(b,1),(c,4),(d,4)\} \subset A \times B\)

  • (ii) \(\{(a,1),(a,2),(b,3),(c,4)\} \subset A \times B\)

Panel (i) illustrates a function from \(A\) to \(B\) because each element of \(A\) is associated with no more than one element of \(B\).

Panel (ii) does not illustrate a function from \(A\) to \(B\) because the element \(a\) is associated with two elements of \(B\), and element \(d\) is not associated with any element of \(B\).

Example

_images/allfunctions.png
  • functions have to map all elements in domain to a uniquely determined element in co-domain

Definition

Functions can be:

  • scalar-valued when \(n=1\), so \(f: A \to \mathbb{R}\)

  • vector-valued when \(n>1\), so \(f: A \to \mathbb{R}^n\)

  • univariate when \(A = \mathbb{R}\), so \(f: \mathbb{R} \to \mathbb{R}^n\)

  • multivariate when \(A = \mathbb{R}^m\), so \(f: \mathbb{R}^m \to \mathbb{R}^n\)

Example: not a function

_images/xy_not_function.png

Definition

For each \(a \in A\), \(f(a) \in B\) is called the image of \(a\) under \(f\)

Definition

If \(f(a) = b\) then \(a\) is called a pre-image of \(b\) under \(f\)

Definition

The definitions of image and pre-image naturally generalize to subsets of the domain.

  • For each \(X \subset A\), \(f(X) = \{f(x): x \in X\} \in B\) is called the image of \(X\) under \(f\)

  • For each \(Y \subset B\), \(\{x: f(x) \in Y\} \in A\) is called the pre-image of \(Y\) under \(f\)

_images/image_and_preimage.png

Definition

The smallest possible co-domain is called the range of \(f: A \to B\):

\[ \mathrm{rng}(f) := \{ b \in B : f(a) = b \text{ for some } a \in A \} \]
_images/mapping_diagram.png

Definition

The composition of \(f: A \to B\) and \(g: B \to C\) is the function \(g \circ f\) from \(A\) to \(C\) defined by

\[ (g \circ f)(a) = g(f(a)) \quad (a \in A) \]
_images/composition.png

Surjection, injection and bijection#

Definition

A function \(f: A \to B\) is called onto (or surjection) if every element of \(B\) is the image under \(f\) of at least one point in \(A\).

Equivalently, \(\mathrm{rng}(f) = B\)

_images/function1.png

Fact

\(f: A \to B\) is onto if and only if each element of \(B\) has at least one pre-image under \(f\)

_images/bijection3.png

Fig. 1 Onto (surjection)#

_images/function3.png

Fig. 2 Not onto!#

_images/bijection2.png

Fig. 3 Not onto!#

Definition

A function \(f: A \to B\) is called one-to-one (or injection) if distinct elements of \(A\) are always mapped into distinct elements of \(B\).

That is, \(f\) is one-to-one if

\[ a \in A, \; a' \in A \text{ and } a \ne a' \implies f(a) \ne f(a') \]

Equivalently,

\[ f(a) = f(a') \implies a = a' \]

Fact

\(f: A \to B\) is one-to-one if and only if each element of \(B\) has at most one pre-image under \(f\)

_images/bijection2.png

Fig. 4 One-to-one#

_images/bijection3.png

Fig. 5 One-to-one#

_images/bijection1.png

Fig. 6 Not one-to-one#

Definition

A function that is

  1. one-to-one (injection) and

  2. onto (surjection)

is called a bijection or one-to-one correspondence

_images/bijection3.png

Fact

\(f: A \to B\) is a bijection if and only if each \(b \in B\) has one and only one pre-image in \(A\)

Fact

If \(f: A \to B\) a bijection, then there exists a unique function \(\phi: B \to A\) such that

\[ \phi(f(a)) = a, \quad \forall \; a \in A \]

That function \(\phi\) is called the inverse of \(f\) and written \(f^{-1}\)

_images/bijec.png

Fact

If \(f: A \to B\) is one-to-one, then \(f: A \to \mathrm{rng}(f)\) is a bijection

Fact

Let \(f: A \to B\) and \(g: B \to C\) be bijections

  1. \(f^{-1}\) is a bijection and its inverse is \(f\)

  • \(f^{-1}(f(a)) = a\) for all \(a \in A\)

  • \(f(f^{-1}(b)) = b\) for all \(b \in B\)

  • \(g \circ f\) is a bijection from \(A\) to \(C\) and \((g \circ f)^{-1} = f^{-1} \circ g^{-1}\)

_images/bij_inv.png

Fig. 7 Illustration of \((g \circ f)^{-1} = f^{-1} \circ g^{-1}\)#

Monotonicity#

Definition

A function \(f : X \rightarrow \mathbb{R}\), where \(X \subseteq \mathbb{R}\), is said to be a non-decreasing function if

\[x \leqslant y \iff f(x) \leqslant f(y)\]

Definition

A function \(f : X \rightarrow \mathbb{R}\), where \(X \subseteq \mathbb{R}\), is said to be a strictly increasing function if both

  • (a) \(x = y \iff f(x) = f(y)\); and

  • (b) \(x < y \iff f(x) < f(y)\).

Definition

Non-increasing and strictly decreasing functions are defined in a similar manner, with the inequality signs flipped.

Definition

Monotonic transformation of a given function is its composition with a a strictly increasing or strictly decreasing function.

Graphs#

Definition

A graph of a mapping \(f \colon X \to Y\) is a set \(\Gamma \subset X \times Y\) of points \(x \in X\) and \(y \in Y\) where it holds \(y \in f(x)\), or \(y = f(x)\) in hte case \(f\) is a function.

Example

_images/graph_func.png

Fig. 8 Graphs of various functions#

_images/graph_corr.png

Fig. 9 Graphs of various correspondences#

Fact

Consider \(\Gamma_0\) the graph of function \(f(x): \mathbb{R} \to \mathbb{R}\). Denote \(\Gamma_1\) the graph of the composite function \(g(x) = af(bx+c)+d\), such that when \(a=b=1\) and \(c=d=0\) \(f(x)=g(x)\). It holds that:

  • for \(a \ne 1\), \(a>0\) graph \(\Gamma_1\) is a vertical stretch or compression of \(\Gamma_0\) by a factor of \(|a|\)

  • for \(a<0\) in addition graph \(\Gamma_1\) flips around the horizontal axis

  • for \(b \ne 1\), \(b>0\) graph \(\Gamma_1\) is a horizontal stretch or compression of \(\Gamma_0\) by a factor of \(|b|\)

  • for \(b<0\) in addition graph \(\Gamma_1\) flips around the vertical axis

  • for \(c \ne 0\) graph \(\Gamma_1\) is a horizontal shift of \(\Gamma_0\) by \(\frac{c}{b}\), left for \(\frac{c}{b}>0\) and right for \(\frac{c}{b}<0\)

  • for \(d \ne 0\) graph \(\Gamma_1\) is a vertical shift of \(\Gamma_0\) by \(d\), up for \(d>0\) and down for \(d<0\)

Fact

When the inverse exists, its graph is a flip of the original graph over the 45 degree line.

_images/exp_ln.jpg

Fig. 10 Graph of inverse functions#

Cardinality#

Definition

If a bijection exists between sets \(A\) and \(B\) they are said to have the same cardinality, and we write \(|A| = |B|\)

Fact

If \(|A| = |B|\) and \(A\) and \(B\) are finite then \(A\) and \(B\) have the same number of elements (same cardinality).

Hence “same cardinality” is analogous to “same size”

Definition

The number of elements of finite set \(X\) is called the cardinality of \(X\), and is denoted by any of the following notation:

  • \(\lvert X \rvert\)

  • \(\# X\)

  • \(nX\)

  • \(n(X)\)

General rule

\[|A \cup B| = |A| + |B| - |A \cap B|\]

Example

What is the number of elements of \(A \cup B\), \(|A \cup B|\)?

\[| \{1,2,3,4 \} \cup \{5,6,7,8\} | = 8\]

But!

\[| \{1,2,3,4 \} \cup \{3,4,5,6\} | = 6\]
  • It depends on whether \(A\) and \(B\) are disjoint or not!

Fact

If \(A_n\) are finite for \(n=1, \ldots,N\), then

\[\#(A_1 \times \cdots \times A_N) = (\# A_1) \times \cdots \times (\# A_N)\]

That is, number of possible tuples \(=\) product of the number of possibilities for each element

Example

Number of binary sequences of length \(10\) is

\[\# [\{0, 1\} \times \cdots \times \{0, 1\}] = 2 \times \cdots \times 2 = 2^{10}\]

But cardinality applies to infinite sets as well!

Fact

If \(|A| = |B|\) and \(|B| = |C|\) then \(|A| = |C|\)

Definition

A nonempty set \(A\) is called finite if

\[ |A| = |\{1, 2, \ldots, n\}| \quad \text{ for some } \quad n \in \mathbb{N} \]

Otherwise called infinite

Definition

Sets that either are finite, or have the same cardinality as \(\mathbb{N}\), denoted \(|A| = \aleph_0\), are called countable

Fact

A set \(X\) countable if and only if there exists a bijection \(f: X \rightarrow \mathbb{N}\).

Example

\(-\mathbb{N} := \{\ldots, -4, -3, -2, -1\}\) is countable

\[\begin{split}\begin{array}{ccc} -1 & \leftrightarrow & 1 \\ -2 & \leftrightarrow & 2 \\ -3 & \leftrightarrow & 3 \\ & \vdots & \\ -n & \leftrightarrow & n \\ & \vdots & \end{array}\end{split}\]

Formally: \(f(k) = -k\) is a bijection from \(-\mathbb{N}\) to \(\mathbb{N}\)

Example

\(E := \{2,4,6, \ldots\}\) is countable

\[\begin{split} \begin{array}{ccc} 2 & \leftrightarrow & 1 \\ 4 & \leftrightarrow & 2 \\ 6 & \leftrightarrow & 3 \\ & \vdots & \\ 2n & \leftrightarrow & n \\ & \vdots & \end{array} \end{split}\]

Formally: \(f(k) = k/2\) is a bijection from \(E\) to \(\mathbb{N}\)

Fact

Nonempty subsets of countable sets are countable

Fact

Finite unions of countable sets are countable

Example

\(\mathbb{Z} = \{\ldots, -2, -1\} \cup \{ 0 \} \cup \{1, 2, \ldots\}\) is countable

Fact

Finite Cartesian products of countable sets is countable

Example

\(\mathbb{Z} \times \mathbb{Z} = \{ (p,q) : p \in \mathbb{Z}, q \in \mathbb{Z} \}\) is countable

_images/lattice.png

Fact

\(\mathbb{Q}\) is countable

Example

An example of an uncountable set is all binary sequences

\[ \{0,1\}^{\mathbb{N}} := \big\{ (b_1,b_2,\ldots) : \, b_n \in \{0,1\ \} \text{ for each } n \big\} \]

Cardinality of \(\{0,1\}^{\mathbb{N}}\) called the power of the continuum

Other sets with the power of the continuum

  • \(\mathbb{R}\)

  • \((a, b)\) for any \(a < b\)

  • \([a, b]\) for any \(a < b\)

  • \(\mathbb{R}^N\) for any finite \(N \in \mathbb{N}\)

Continuum hypothesis

Every nonempty subset of \(\mathbb{R}\) is either countable or has the power of the continuum

Example

\(\mathbb{R}\) and \((-1, 1)\) have the same cardinality because \(x \mapsto 2\arctan(x)/\pi\) is a bijection from \(\mathbb{R}\) to \((-1, 1)\)

_images/arctan.png

Fig. 11 Same cardinality#