Given $F \subseteq C\_C(\mathbb{R}^d, \mathbb{R}^p)$, $F$ is dense in $C\_C(\mathbb{R}^d, \mathbb{R}^p)$ in the supremum norm $\|\cdot\|\_\infty$. Also given $G \subseteq C\_C(\mathbb{R}^p, \mathbb{R}^s)$, $G$ is dense in $C\_C(\mathbb{R}^p, \mathbb{R}^s)$ in $\|\cdot\|\_\infty$. Is the set $G \circ F := \{g \circ f: g \in G, f \in F, g \circ f \in C\_C(\mathbb{R}^d, \mathbb{R}^s)\}$ dense in $C\_C(\mathbb{R}^d, \mathbb{R}^s)$? Note that $d, p, s\in \mathbb{N}$ are not necessarily equal. Any help would be much appreciated. Thanks!



Is the "composition" of two dense subsets of functions dense?
This is hopeless in general: if $p=1$ and $d=s=2$, then the function $h(x,y)=(x,y)$ (or a compactly supported version of it) is very far from being a composition of a function in $C(\mathbb R,\mathbb R^2)$ with a function in $C(\mathbb R^2,\mathbb R)$. To see this, suppose that $f$ and $g$ belong to $C(\mathbb R^2,\mathbb R)$ and $C(\mathbb R,\mathbb R^2)$ respectively. Suppose for a contradiction that $\|g\circ f(x,y)-h(x,y)\|<1$ for each $(x,y)\in [0,3]^2$. We may assume without loss of generality that $f(0,0)=0$.
Now consider $f(3,0)$, $f(0,3)$ and $f(3,3)$. Two of these must have the same sign. Say for example $0<f(0,3)<f(3,3)$. Now by the intermediate value theorem, there exists $s\in (0,3)$ such that $f(s,s)=f(0,3)$. So now $g\circ f(s,s)=g\circ f(0,3)$, but $\|g\circ f(s,s)-(s,s)\|<1$ and $\|g\circ f(0,3)\|-(0,3)\|<1$. This contradicts the triangle inequality since $(0,3)$ is at a distance more than 2 from the line $y=x$. 


