I am reading a book about smooth manifold and it introduces the $C^{\infty}$ in the following way:
Let $M$ and $N$ be two differentiable manifolds, with dimensions $m$ and $n$ respectively. A map $\Phi:M\longrightarrow N$ is said to be $C^{\infty}$ if that for every coordinate system $(U,\varphi)$ on $M$ and $(V,\psi)$ on $N$, the composition map $\psi\circ\Phi\circ\varphi^{-1}$ is $C^{\infty}$.
Is this definition even correct?
I derived a counter-example and I have no idea about what is happening:
For each real number $r>0$, consider the map $\varphi_{r}:\mathbb{R}\longrightarrow\mathbb{R}$ where $\varphi_{r}(t)=t$ if $t\leq 0$ and $\varphi_{r}(t)=rt$ if $t>0$.
Let $\mathbb{R}_{\varphi_{r_{1}}}$ and $\mathbb{R}_{\varphi_{r_{2}}}$ be two differentiable manifolds defined from the differentiable structures obtained from the atlases $\{(\mathbb{R},\varphi_{r_{1}})\}$ and $\{(\mathbb{R},\varphi_{r_{2}})\}$, respectively.
Then, consider the map defined by $\varphi:\mathbb{R}_{\varphi_{r_{1}}}\longrightarrow \mathbb{R}_{\varphi_{r_{2}}}$ by $$\varphi(t):=\left\{ \begin{array}{ll} t\ \ \ \ \ \ \ \text{if}\ t\leq 0\\ (r_{1}/r_{2})t\ \ \ \ \ \ \ \text{if}\ t> 0. \end{array} \right.$$
This map is not differentiable at $t=0$ if $r_{1}\neq r_{2}$. Since if you consider the definition of $f'(0)$ and then the limit when $t\nearrow 0$ is $1$ and the limit when $t\searrow 0$ is $r_{1}/r_{2}$.
However, if we use the definition above, we could see that $\varphi$ is indeed $C^{\infty}$.
Consider the composition map $$\varphi_{r_{2}}\circ\varphi\circ\varphi_{r_{1}}^{-1}:\mathbb{R}\longrightarrow\mathbb{R}_{\varphi_{1}}\longrightarrow\mathbb{R}_{\varphi_{2}}\longrightarrow\mathbb{R}.$$ If $t\leq 0$, then $$\varphi_{r_{2}}\circ\varphi\circ\varphi_{r_{1}}^{-1}(t)=\varphi_{r_{2}}\circ\varphi(t)=\varphi_{r_{2}}(t)=t,$$ if $t\geq 0$, then $$\varphi_{r_{2}}\circ\varphi\circ\varphi_{r_{1}}^{-1}(t)=\varphi_{r_{2}}\circ\varphi\Big(\dfrac{t}{r_{1}}\Big)=\varphi_{r_{2}}\Big(\dfrac{1}{r_{2}}\Big)=t.$$
Therefore, the composition map is always $id_{\mathbb{R}}$ and thus is $C^{\infty}$ by the above definition..
What is happening here?
Thank you!