If a composition of functions is smooth and one of them is smooth, then the other is smooth Show that a map $\xi$ between smooth manifolds $M$ and $N$ is
smooth if and only if $f ◦\xi$ is a smooth function on $M$ whenever $f$ is a smooth function on $N$.
One implication is clear because I can use that composition of smooth functions is smooth, but I'm having trouble with the converse and I don't know what to do. I would appreciate your help. Thank you!!
 A: You can construct a counterexample such as $\xi$ be any function and $f : x \mapsto 1$. Clearly $(f \circ \xi) (x) = 1$ is smooth but $\xi$ doesn't have to be smooth.
However, as pointed out in the comments, if you mean that the problem is to show that : if $\forall f \in C^{\infty}(N), f \circ \xi \in C^{\infty}(M)$  implies $\xi$ is smooth, i think this is true. We can prove this by choose $f$ to be particular the projection maps. Let $(U,\varphi)$ contain $p$ and $(V,\psi)$ contain $\xi(p)$ be smooth charts on $M$ and $N$ respectively. The representation of $f \circ \xi$ is
\begin{align}
f \circ \xi  \circ \varphi^{-1}(x^1,\dots,x^n) &= (f \circ \psi^{-1}) \circ (\psi \circ \xi \circ \varphi^{-1})(x^1,\dots,x^n)\\ &= \hat{f}(\xi^1(x^1,\dots,x^n),\dots,\xi^m(x^1,\dots,x^n)) 
\end{align}
then we can choose $f$ so that $\hat{f} = f \circ \psi^{-1}$ are the projection maps. So we have $\xi^i(x^1,\dots,x^n)$ is smooth for all $i =1,\dots,m$ by hypothesis. Therefore $\xi$ is smooth.
A: Pick any point $p\in M$, and a chart $(V,\psi)$ containing $\xi(p)\in N$. Recall that the codomain of $\psi$ is $\Bbb R^n$. So you can obtain the component functions $\psi^i:V\to\Bbb R$ which are smooth, where $\psi(q)=(\psi^1(q),\psi^2(q),\dots,\psi^n(q))$.
We would like each of $\psi^i$ to play the role of $f$ as in your question. Unfortunately, $\psi^i$ is not defined on the whole $N$. A workaround is to multiply $\psi^i$ by a bump function $b_i$ that is equal to $1$ on a neighbourhood $V_i'$ of $\xi(p)$ and is equal to $0$ on an open neighbourhood of $N\setminus V$. The product would be the smooth function $f:N\to\Bbb R$ we want, with the property that $f=\psi^i$ on $V_i'$, while $f=0$ outside $V$. We denote $f_i:=f$ to mean that this $f_i$ depends on $\psi^i$.
By assumption in your question, $f_i\circ\xi$ is smooth. This means you can find a chart $(U,\varphi)$ containing $p$ such that $f_i\circ\xi\circ\varphi^{-1}$ is smooth. Now choose a smaller chart $(U_i,\varphi)$ with $U_i\subseteq U$ being an open subset, $U_i:=\{x\in U:f_i\circ\xi(x)\not=0\}$. Define also the open subsets $V_i\subseteq V$, $V_i:=\{y\in V:f_i(y)\not=0\}$ and hence we obtain the smaller chart $(V_i,\psi)$. By construction of $U_i$ and $V_i$, we have $\xi(U_i)\subseteq V$ and hence $\xi(U_i)\subseteq V_i$.
Do the above for each $i=1,\dots,n$, obtaining $U_i,V_i$. Then we have $$\xi\left(\bigcap_{i=1}^nU_i\right)\subseteq \bigcap_{i=1}^n\xi(U_i)\subseteq \bigcap_{i=1}^nV_i.\tag{1}\label{eq1}$$ Note that on the set $\bigcap_{i=1}^nV_i$, each of the bump function $b_i$ is nonzero, and so the reciprocal functions $\frac{1}{b_i}$ exists on $\bigcap_{i=1}^nV_i$, where $\frac{1}{b_i}(q):=\frac{1}{b_i(q)}$. They are smooth functions. The functions $\frac{1}{b_i}\circ\xi\circ\varphi^{-1}$ are smooth on $\varphi\left(\bigcap_{i=1}^nU_i\right)$ by assumption in your question.
Now the pointwise product $(f_i\circ\xi\circ\varphi^{-1})\cdot(\frac{1}{b_i}\circ\xi\circ\varphi^{-1})$ is smooth on $\varphi\left(\bigcap_{i=1}^nU_i\right)$. While $(f_i\circ\xi\circ\varphi^{-1})\cdot(\frac{1}{b_i}\circ\xi\circ\varphi^{-1})$ is simply equal to $\psi^i\circ\xi\circ\varphi^{-1}$, which are component functions of $\psi\circ\xi\circ\varphi^{-1}$. So the component functions of $\psi\circ\xi\circ\varphi^{-1}$ are smooth and hence $\psi\circ\xi\circ\varphi^{-1}$ is itself smooth on $\varphi\left(\bigcap_{i=1}^nU_i\right)$.
Together with the inclusion relation $(1)$, we have proved that $\xi$ is smooth using the charts $$\left(\bigcap_{i=1}^nU_i,\ \varphi\right), \left(\bigcap_{i=1}^nV_i,\ \psi\right).$$
Edit: There is a minor mistake in my proof. I have not yet demonstrated that $p\in\bigcap_{i=1}^nU_i$, and we could have really run into trouble here: it is possible that $f_i(\xi(p))=0$, and the set $U_i$ by definition does not contain $p$.
To get around this, we declare that the chart $(V,\psi)$ satisfy that $\psi^i(\xi(p))\not=0$ for each $i=1,\dots,n$. We can do so, because if $\psi^i(\xi(p))=0$, we can replace $\psi^i$ by the function $\psi^i+1$. Then, we would have $p\in\bigcap_{i=1}^nU_i$.
