**Metric** (度量) is a mapping $d: X \times X \to \mathbb{R}_{\ge 0}$ which satisfies:

- Non-degeneracy: $d(x, y) = 0 \Rightarrow x = y$;
- Triangular inequality: $d(x, y) + d(y, z) \ge d(x, z)$;
- Symmetry: $d(x, y) = d(y, x)$;

**Psudo-metric** is a mapping satisfying all the requirements of a metric except non-degeneracy.
For example, for the space $C(\mathbb{R})$ of continuous real functions,
$\rho_n(f, g) = \sup_{x \in [-n,n]} |f(x) - g(x)|$, $n \in \mathbb{N}$, are psudo-metrics.
But they can be transformed into a metric, e.g.
$\sigma(f, g) = \sum_{n=1}^{\infty} 2^{-n} \min \{1,\rho_n(f, g) \}$.

**Metric space** (度量空间) $(X, d)$ is a set $X$ with a metric $d: X \times X \to \mathbb{R}_{\ge 0}$.
Metric specifies the distance among elements within a space.
Subspace $(A, d)$ of a metric space $(X, d)$, where $A \subset X$, is also a metric space.
Product space $(X \times Y, d_x \times d_y)$ of two metric spaces $(X, d_x)$ and $(Y, d_y)$,
where $d_x \times d_y ((x_1, y_1), (x_2, y_2)) = d_x(x_1, x_2) + d_y(y_1, y_2)$,
is also a metric space.

**Distance to a set** in a metric space $(X, d)$
is the mapping $d: X \times \mathcal{P}(X) \to \mathbb{R}*{\ge 0}$
such that $d(x, A) = \inf*{y \in A} d(x,y)$.
**Diameter of a set** in a metric space $(X, d)$
is the mapping $\mathrm{diam}: \mathcal{P}(X) \to \mathbb{R}_{\ge 0}$
such that $\mathrm{diam}(A) = \sup_{x,y\in A} d(x,y)$.

**Bounded space** is a metric space whose diameter is finite.
**Totally-bounded space** is a metric space
that can be represented as a finite union of arbitrarily bounded subspaces:
$\forall \varepsilon > 0$, $\exists \{x_i\}_{i=1}^{n} \subset X$:
$X \subset \cup_{i=1}^n B_\varepsilon(X_i)$.

**Lp metric** is the metric induced from an Lp norm.

Euclidean metric...

**Convergent sequence** is a sequence $\{x_n\}_{n \in \mathbb{N}}$ in a metric space $(X, d)$
such that $\exists x \in X$, $\forall \varepsilon > 0$, $\exists N \in \mathbb{N}:$
$\forall n > N$, $d(x_n, x) < \varepsilon$; and we say the sequence **converges** to $x$.
A sequence in a set may converge in one metric but not in another.

Uniform convergence.

**Cauchy sequence** is a sequence $\{a_i\}_{i=1}^N$ in a metric space that satisfies:
$\forall \varepsilon > 0$, $\exists N \in \mathbb{N}:$,
$\forall m, n > N$, $d(a_m, a_n) < \varepsilon$.

**Complete space** is a metric space where every Cauchy sequence converges.

Theorem: (equivalence of metric and topological definitions of complete space).

Baire's Theorem.

Contraction mapping theorem.

Completion.

Equivalent sequence.

Theorem: (Completion of metric space).

**Open ball** $B_r(x)$ of radius $r$ centered at $x$ in a metric space $(X, d)$
is the set of points with distance to $x$ less than $r$:
$B_r(x) = \{y \in X \mid d(y, x) < r\}$, $r > 0$.
**Closed ball** $B_r\left[x\right]$ is the set of points with distance to $x$ no greater than $r$:
$B_r\left[x\right] = \{y \in X \mid d(y, x) \le r\}$, $r \ge 0$.
**Sphere** $S_r\left[x\right]$ is the set of points with distance to $x$ equal $r$:
$S_r\left[x\right] = \{y \in X \mid d(y, x) = r\}$, $r \ge 0$.

**Topology generated by a metric** or **metric topology** $\mathcal{T}_d$
is the topology $\mathcal{T(B)}$ generated by the class $\mathcal{B}$ of open balls
in a metric space $(X, d)$:
$\mathcal{T}_d = \mathcal{T(B)}$, $\mathcal{B} = \{B_r(x) \mid x \in X, r > 0\}$.
**Euclidean topology**, **usual topology**, or **ordinary topology** on $\mathbb{R}^n$
is the topology generated by the Euclidean metric in $\mathbb{R}^n$.

Sequentially compact.

Boltzano-Weierstras property

Covering, sub-covering, open covering, compact.

**Covering number** $N(S,s)$ of a metric space $S$ with disks at radius $s$
is the minimal number of such disks needed to cover the space.
This number is finite if the metric space is compact.

Compactness Theorem: equivalence of sequentially compact, compact, Boltzano-Weierstras property, H-compact

Theorem: continuous mapping from a compact space induces another compact space.

Theorem: product space of compact spaces is compact.

Boltzano-Weierstras theorem

Theorem: real continuous mapping from a compact space has maximum and minimum.

Pointwise compace, equi-continuous.

Theorem: (Arzela-Ascoli)

In case of function spaces, compact spaces typically are similar to finite-dimensional space.

Theorem: (equivalence of metric and topological definitions of continuous mapping)

continuity, uniform continuity.