This is a problem which addresses the dilemma of what can happen of we restrict the conditions for the definition of a smooth function between manifolds.
Firstly, the definition of a smooth function between manifolds is that if we have a function $F:M \rightarrow N$, with $(U, \varphi)$ and $(V, \psi)$ being smooth charts containing $p \in M$ and $F(p) \in N$ respectively, then we say that $F$ is smooth if and only if the composition $\psi \circ F \circ \varphi^{-1}$ is smooth with respect to ordinary calculus.
Now, if we have the function $f: \mathbb{R} \rightarrow \mathbb{R},\ \text{where} \ f(x) = \begin{cases} 1 & x\geq 0 \\ 0 & x \lt 0 \end{cases} $ and $(U,\varphi)$ and $(V, \psi)$ are both smooth charts for the domain and codomain respectively, how do we choose the coordinate maps for smooth charts of both copies of $\mathbb{R}$ such that the composition $\psi \circ f \circ \varphi^{-1}: \varphi(U \cap f^{-1}(V)) \rightarrow \psi(V)$ is smooth even though the internal function $f$ is clearly not smooth.
Now, I have been thinking about this problem and have come to the conclusion that if we have the standard smooth chart for the first copy of $\mathbb{R}$, where $\varphi$ is the identity function we are left to choose some smooth coordinate map of the second chart that smoothly maps $\{0,1\}$ into $\mathbb{R}$. If we choose the atlas of the codomain $\mathbb{R}$ to have $\psi$ as a constant function (being non-zero) is this sufficient? I ask about the sufficiency of such a map because the composition becomes smooth, $f$ is not smooth, however I am in doubt if the chart for the codomain is actually a smooth chart, recalling that a smooth coordinate chart is given as any chart that is housed in the maximal smooth atlas.