I'm stuck on the following part of a proof:
Let $\phi: \mathbb R^m \to \mathbb R^n$ be a function such that $\gamma'(t) := \phi(\gamma(t))$ is smooth for every smooth function $\gamma: \mathbb R \to \mathbb R^m$.
I want to show that $\phi$ is smooth under these assumptions.
Could someone give me a pointer?
Thanks in advance!