# Concatenation of continuous function with uniformly convergent series converges uniformly?

Let $I=[a,b]\subseteq\mathbb R$ a (finite) interval and $$y_n\colon I \to \mathbb R,\qquad x\mapsto y_n(x)$$ be continuous functions. Assume that $(y_n)_{n\in\mathbb N}$ converges uniformly $y_n\rightrightarrows y^*$ on $I$. We know that it follows that $y^*$ is continuous, as well.

Let now $$J = \overline{\bigcup_{n\in\mathbb N} y_n(I)}$$ be the closure of the union of all images of $y_n$. Now let $$g\colon J \to \mathbb R,\qquad y\mapsto g(y)$$ be a continuous function.

Can we prove, or give a counterexample, that then the sequence of the concatenation $g\circ y_n$, where $$(g\circ y)(x) = g\bigl(y(x)\bigr),\qquad (x\in I)$$ converges uniformly $$g\circ y_n \rightrightarrows h.\qquad (n\to\infty)$$

Is then, if my claim holds, $h = g(y^*)$?

I can't come up with a counterexample, but I feel like it shouldn't be true. I see that when $g$ is Lipschitz-continuous it is trivial. I tried to use some non-Lipschitz functions for $g$ such as the square root, but I had no success.

It is clear that $(g\circ y_n)(x)\to (g\circ y^*)(x)$, but only point-wise.

Edit: I realised that the square root is Hölder-continuous and for a $g$ that is Hölder-continuous, the same as for Lipschitz-continous $g$ applies.

I think its true, let me try a proof: First of all, we need $J$ to be compact, so that $g$ becomes uniformely continuous:
Since $y_n$ converges uniformely we can employ the Cauchy-Criterion and obtain $$\exists n_0\in\mathbb{N},\ \forall n\geq n_0,\ \forall x\in[a,b]:\ |y_{n_0}(x)-y_n(x)| < \frac{1}{2}.$$ Therefore $$\forall x\in [a,b], \forall n\geq n_0: \ y_n(x)\in \bigcup_{z\in[\min y_{n_0},\max y_{n_0}]} B_{\frac{1}{2}}(z),$$ hence $J$ is bounded. Therefore $J$ is compact and then $g$ is uniformely continuous.
Now let $\varepsilon>0$ be arbitrary. Then there exists a $\delta>0$ such that $$|x-y|<\delta\Rightarrow |g(x)-g(y)|<\varepsilon.$$ Since $y_n$ converges uniformely, we can find an $n_0\in\mathbb{N}$ such that for every $n\geq n_0$ and every $x\in[a,b]$ we have $$|y_n(x)-y^*(x)|<\delta.$$ Inserting this into the uniform continuity statement if $g$ we obtain $$|y_n(x)-y^*(x)|< \delta \Rightarrow |g(y_n(x))-g(y^*(x))|<\varepsilon.$$ Hence $g\circ y_n$ converges uniformely.