1. Metric Spaces¶
1.1. Euclidean Space¶
Definition 1.1
Definition 1.2
The Euclidean metric on \(\mathbb{R}^n\) is the function \(d: \mathbb{R} \times \mathbb{R} \to {[0,\infty)}\) is defined by
where \(\mathbb{R}\) is the set of real numbers and \(n \in\mathbb{Z}^+\)
Definition 1.3
\(d\) is a metric if it satisfies:
\(d(x,y)\geq0\) with equality if and only if \(x=y\)
\(d(x,y)=d(y,x)\)
\(d(x,z)\leq d(x,y)+d(y,z)\) [Triangle Inequality]
Fact 1.4
For each \(n\in\mathbb{Z}^+\), the set \(\mathbb{R}^n\) is uncountable, with \(\lvert {\mathbb{R^n}} \rvert = \lvert {\mathbb{R}} \rvert = 2^{\aleph_0} = \mathfrak{c}\)
Definition 1.5
A set \(D\subseteq\mathbb{R}^n\) is dense if for every \(x\in\mathbb{R}^n\) and \(\varepsilon>0\) there exists a point \(q\in D\) such that
Fact 1.6
\(\mathbb{Q}^n\) is dense in \(\mathbb{R}^n\) and \(\mathbb{Q}^n\) is countable with \(\lvert {\mathbb{Q}^n} \rvert = \lvert {\mathbb{N}} \rvert = \aleph_0\)
(Proof: see this post)
Definition 1.7
A metric space \((X,d)\) is separable if it has a countable dense subset.
Definition 1.8
An open ball of radius \(r\) about \(x\), denoted \(B_r(x)\) is defined as
(See also: Open Ball)
Examples: an interval in \(\mathbb{R}\), a circle in \(\mathbb{R}^2\), a sphere in \(\mathbb{R}^3\), etc.
Definition 1.9
A closed ball of radius \(r\) about \(x\), denoted \(\bar B_r(x)\) is defined as
Definition 1.10
A set \(G\subseteq\mathbb{R}^n\) is open if there is a set \(\cal B\) of open balls in \(\mathbb{R}^n\) such that
Definition 1.11
A set \(F\subseteq\mathbb{R}^n\) is closed if \(\mathbb{R}^n\setminus F\) is open.
Fact 1.12
The only clopen (sets that are closed and open) are \(\emptyset\) and \(\mathbb{R}^n\)
Definition 1.13
A set \(Z\subseteq\mathbb{R}\) has measure 0 if for every \(\varepsilon>0\) there is a countable set \(\cal I\) of open intervals in \(\mathbb{R}\) with the following properties:
\(Z\subseteq\cup{\cal I}_\varepsilon\) [i.e., \(\cal I\) covers \(Z\)]
\(\sum_{I\in{\cal I}}\textup{length}(I)<\varepsilon\)
( See also: this question on Math Stack Exchange.)
1.2. Cantor Space¶
Definition 1.14
\(\mathbf{C}=\set{0,1}^\infty = \set{0,1}^\omega=2^\omega\) is the set of all (infinite binary) sequences \(s\),
where each \(b_i\in\set{0,1}\)
Definition 1.15
\(\set{0,1}^*=2^{<\omega}\) is the set of all (finite binary) strings
where \(n\in\mathbf{N}\) and each \(b_i\in\set{0,1}\). The length of the string is \(\lvert w \rvert =n\). If \(n=0\) this is the empty string, denoted \(\lambda\)
Definition 1.16
Define \(\set{0,1}^{\leq\omega}=\set{0,1}^{<\omega}\cup\mathbf{C}\)
Definition 1.17
Let \(w\in\set{0,1}^*\) and \(y\in\set{0,1}^{\leq\omega}\). \(w\) is a prefix of \(y\), and we write \(w\sqsubseteq y\) if there exists \(z\in\set{0,1}^{\leq w}\) such that
( note: here \(wz\) is the concatenation of \(w\) and \(z\))
Definition 1.18
\(w\) is a proper prefix of \(y\), and we write \(w\sqsubset y\) if \(w\sqsubseteq y\) and \(w\neq y\)
Definition 1.19
The cylinder generated by a string \(w\in\set{0,1}^*\) is the set
( note: \(\Rightarrow\) the set of all infinite sequences that start with \(w\), see also cylinder set on Wikipedia )
Definition 1.20
The standard metric in \(\mathbf{C}\) is the function \(d:{\mathbf{C}\times\mathbf{C}} \to {[0,1]}\) defined by
( note: This perfectly matches the idea of “longest common prefix” “how soon they differ”. The deeper the common prefix, the closer the two sequences are in this metric.)
This is a metric. In fact, it is an ultrametric, meaning that it satisfies the strengthening of the triangle inequality:
Fact 1.21
\(\mathbf{C}\) is uncountable, with \(\lvert \mathbf{C} \rvert = \lvert \mathbb{R} \rvert =2^{\aleph_0}\)
Fact 1.22
The countable set
testifies that \(\mathbf{C}\) is separable.
Brief Proof
countable: prove \(\set{0,1}^*\) is countable
dense: for every \(\varepsilon>0\) and given \(w \in \mathbb{C}\),
\(w\) is an infinite binary sequence
find a large \(n\) such that \(2^{-n}<\varepsilon\)
match the prefix of \(w\) with the length \(n\), denoted \(w_n\), we have \(w_n 0 ^{w_n} \in D\) and \(d(w,w_n 0 ^{w_n})=2^{-n}<\varepsilon\)
Definition 1.23
The (uniform, or Lebesgue product) measure of a cylinder \(\mathbb{C}_w\) is
( note: all strings in the cylinder have the metric distance \(2^{-\lvert w \rvert}\) with \(w\), which is the upper bound of the metric distance between any two strings in the cylinder)
Definition 1.24
A set \(G \subseteq \mathbf{C}\) is open if it is a union of cylinders.
Definition 1.25
A set \(F \subseteq \mathbf{C}\) is closed if \(\mathbf{C} \setminus F\) is open.
Fact 1.26
The set \(\varnothing\) and \(\mathbf{C}\) are clopen in \(\mathbf{C}\), but there are many other clopen sets. (Exercise)
Definition 1.27
A set \(Z \subseteq \mathbf{C}\) has measure 0, and we write \(\mu(Z) = 0\) if for every \(\varepsilon > 0\) there is a countable set \(\mathbf{C}_\varepsilon\) of cylinders with the following two properties:
\( Z \subseteq \bigcup \mathbf{C}_\varepsilon = \bigcup_{C \in \mathbf{C}_\varepsilon} C \)
\( \sum_{C \in \mathbf{C}_\varepsilon} \mu(C) < \varepsilon \)
Definition 1.28
A set \(Z \subseteq \mathbf{C}\) has algorithmic measure 0, if there exists a computable function
such that for every \(k \in \mathbb{N}\)
\( Z \subseteq \bigcup_{l=0}^{\infty} \mathbf{C}_{f(k,l)} \)
\( \sum_{l=0}^{\infty} 2^{-|f(k,l)|} < 2^{-k} \)
Remark. There are certain edge cases in the above definition that can be dealt with by perhaps defining \(\emptyset\) as a cylinder.
Definition 1.29
A sequence \(z\in\mathbb{C}\) is (algorithmically, or Martin-Löf) random [1] if \(\set{z}\) does not have algorithmic measure 0.