Informally: When is a Sobolev function, post-composed by a vector-valued function still Sobolev?
Assumptions/Setup
Let $(X,d_X,m_X)$ and $(Y,d_Y,m_Y)$ be complete and separable metric measure spaces; abreheviated $X$ and $Y$ respectively. Embed $Y$ isometrically into $\ell^{\infty}$.
To define my question, let us first review some terminology.
For any $1\leq p<\infty$ define the Sobolev class $\tilde{N}^{1,p}(X,Y)$ as consisting of all Borel functions $f:X\rightarrow Y$ for which there exists a $0\leq g\in L^p(m_X)$, called an upper-gradient, such that $$ \|f(\gamma(a))-f(\gamma(b))\|\leq \int_a^b g(\gamma(t)) \,dt, $$ for every rectifiable $\gamma:[a,b]\rightarrow X$ and each $\infty<a\leq b<\infty$. Taking the infimum over all upper-gradients of a function $f\in \tilde{N}^{1,p}(X,Y)$ we define the norm thereon by $$ \|f\|_{1,p}:=\inf\,\|f\|_{L^p(X,m_X)}\, + \|g\|_{L^p(X,m_X)}. $$ Define the Hajłasz-Sobolev space via the Komologorov quotient as the $N(X,Y)^{1,p}:=\tilde{N}^{1,p}(X,Y)/\sim$ where $f\sim g$ if and only if $\|f-g\|_{1,p}=0$. We note that, it is known that $N^{1,p}(X,Y)$ is a Banach space if $Y$ is itself Banachian.
Rigorous Question
Let $f\in N^{1,p}(X,Y)$ be continuous and let $g:Y\rightarrow E$ be continuous and take values in a separable Banach space $E$. Under what conditions on $g$, $p$, on $E$ does $g\circ f\in N^{1,p}(X,E)$?
This post is related to this earlier open question.