Metric Induces Topology

Theorem
Consider a metric space $$(S,d) \ $$ where $$S \ $$ is some set and $$d:S \to \mathbb{R}_+ \ $$ is a metric. Then $$(S,d) \ $$ is a topological space with a topology defined by $$d \ $$.

Proof
Call a subset $$X \subset S \ $$ open if

$$\forall x \in X, \exists \epsilon \in \mathbb{R}_+ \text{ s.t. } (\forall y \in S, d(x,y)<\epsilon \Longrightarrow y \in X)$$

Call the collection of all such open sets $$\vartheta_{(S,d)} \ $$.

Claim: $$\vartheta_{(S,d)} \ $$ forms a topology on $$S \ $$.

Proof:

We examine each of the criteria for being a topology separately.

(1). Since there are no elements in the empty set, $$\varnothing \in \vartheta_{(S,d)} \ $$ trivially. Similarly, since all $$y \in S \text{ s.t. } d(x,y)<\epsilon \ $$ satisfy $$y \in S \ $$ by definition, $$S \in \vartheta_{(S,d)} \ $$.

(2). Suppose $$\left\{{A_i}\right\}_{i=1}^\infty \ $$ or $$\left\{{A_i}\right\}_{i=1}^n \ $$ are sequences of open sets, such that $$\forall i, A_i \in \vartheta_{(S,d)} \ $$. Then if

$$z \in \bigcup A_i \, \exists j \text{ s.t. } \forall y \in A_j, d(z,y)<\epsilon \Longrightarrow y \in A_j \ $$.

But since $$A_j \subset \bigcup A_i \ $$, we have $$ \bigcup A_i \in \vartheta_{(S,d)} \ $$.

(3). Let $$\left\{{A_i}\right\}_{i=1}^n \ $$ be a finite sequence of open sets. Suppose $$z \in \bigcup_{i=1}^n A_i \ $$.

Then, by definition, for each $$A_i, \exists \epsilon_i \text{ s.t. } \forall y \in S, d(z,y)<\epsilon_i \Longrightarrow y \in A_i \ $$.

Since $$\left\{{\epsilon_i}\right\}_{i=1}^n \ $$ is a finite set, there is a least member; call it $$\epsilon \ $$.

Then $$\epsilon \ $$ satisfies $$\forall y \in S, d(z,y)<\epsilon \Longrightarrow y \in \bigcap_{i=1}^n A_i \ $$.

Hence $$ \bigcap_{i=1}^n A_i \in \vartheta_{(S,d)} \ $$.