Let $f_n \rightarrow f$ and $g_n \rightarrow g$ in $C([0,1])$. Is it true that $f_n \circ g_n \rightarrow f \circ g$?
where the metric space we're interested in is $(C([0,1]), d)$ and $d$ is the sup norm:
$$ d(f,g) = \sup_{x \in [0,1]} \big|f(x) - g(x)\big|$$
I've written the following proof that seems correct to me but I don't quite feel right because I didn't have to use continuity at all:
Fix $\varepsilon > 0$. Since $g^{-1}_n([0, 1]) \subset [0,1]$ and $g^{-1}([0,1]) \subset [0,1]$,
$$\sup_{x \in [0,1]} \big|f_n(g_n(x)) - f(g(x))\big| \le \sup_{x \in [0,1]} \big|f_n(x) - f(x)\big| < \varepsilon$$
for all $n \ge N$ for some $N$ since $f_n \rightarrow f$. So since $\varepsilon$ was arbitrarily small, it must be the case that $f_n \circ g_n \rightarrow f \circ g$.
Is this ok, or is my intuition that this was too easy correct and my proof is wrong?
Edit: it wasn't specified that $g_n: [0,1] \rightarrow [0,1]$, but since we are composing it with a function defined on the unit interval we can assume that the preimage of each $g_n$ is a subset of $[0,1]$.
\circrather than\cdot. – Ben Grossmann Nov 19 '13 at 15:54