Uniformly Continuous Function Preserves Uniform Convergence

Theorem
Let $X$ be a set.

Let $M$ and $N$ be metric spaces.

Let $\sequence {g_n}$ be a sequence of mappings $g_n: X \to M$.

Let $g_n$ converge uniformly to $g: X \to M$.

Let $f: M \to N$ be uniformly continuous.

Then $\sequence {f \circ g_n}$ converges uniformly to $f \circ g$.

Proof
Let $\epsilon \in \R_{>0}$.

Because $f$ is uniformly continuous, there exist $\delta \in \R_{>0}$ such that $\map d {\map f x, \map f y} < \epsilon$ for $\map d {x, y} < \delta$.

Because $\sequence {g_n}$ converges uniformly, there exist $N > 0$ such that $\map d {\map {g_n} x, \map g x} < \delta$ for $n > N$ and all $x \in X$.

Thus $\map d {\map f {\map {g_n} x}, \map f {\map g x} } < \epsilon$ for $n > N$ and all $x \in X$.

Thus $\sequence {f \circ g_n}$ converges uniformly to $f \circ g$.