TITLE: function is smooth iff the composition with any smooth curve is again smooth
QUESTION [7 upvotes]: 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!
S.L.

REPLY [6 votes]: This was proved by Jan Boman in the paper "Differentiability of a function and of its compositions with functions of one variable", Math. Scand. 20 (1967), 249-268.  (The theorem as stated is for the case $n=1$, but that is no problem as Jason DeVito already mentioned in a comment.)  Here's an online version, and here's the MathSciNet link.  According to the article and review, it had been an unpublished conjecture of Rådström.