Why aren't those spaces diffeomorphic? (Taken from Bredon - Topology and Geometry):

Let $X$ be the graph of the real valued function $\theta(x)=|x|$ of a real variable $x$. Define a functional structure on $X$ by taking $f \in F(U) \iff f$ is the restriction to $U$ of a $C^{ \infty}$ function on some open set $V$ in the plane with $U=V \cap X$. Show that $X$ with this structure is not diffeomorphic to the real line with usual $C^{\infty}$ structure.

Well, I arrived at the fact that a diffeomorphism between them would have to be the restriction of a differentiable function with non-zero derivative. I imagine I have to use the Implicit Function Theorem and conclude that $\theta$ would have to be the graph of a $C^1$ function near $0$, but I don't know how to proceed.
 A: At the point $p = (0,0) \in X$ consider the tangent space
$$
\newcommand{\R}{\mathbb{R}}
T_p X := \{ V \colon C^\infty(X) \to \R \text{ linear} : \forall_{f,g \in C^\infty(X)} V(fg) = V(f)g(p)+f(p)V(g) \}.
$$
In case you're not familiar with this definition of the tangent space, don't worry. Just treat it as an ad-hoc invariant for the moment. The main point is that $T_p X$ is two-dimensional, while the tangent space to $\R$ (at any point) is one-dimensional.
That said, there are a few things to check. If you need more hints, please indicate it in the comments.

*

*By the very definition, $T_p X$ is a linear space.

*The maps $V_1(f) := \partial_x f(p) + \partial_y f(p)$ and $V_2(f) := \partial_x f(p) - \partial_y f(p)$ are well-defined (don't depend on the chosen extension of $f$).

*They are linearly independent, as can be seen by taking $f_1(x,y)=x+y$ and $f_2(x,y)=x-y$.

*For any $q \in \R$, the tangent space $T_q \R$ (defined in the same way) is one dimensional.

*If $\Phi \colon \R \to X$ is smooth (which by definition means that $\Phi$ is continuous and $f \circ \Phi \in C^\infty(\R)$ for every $f \in C^\infty(X)$), then
$$
D_q \Phi \colon T_q \R \to T_{\Phi(q)} X, \qquad 
(D_q \Phi \cdot V)(f) = V(f \circ \Phi)
$$
is a linear map.

*If $\Phi \colon \R \to X$ is a diffemorphism (which means that there exists a smooth inverse $\Psi \colon X \to \R$), then $D_q \Phi$ is a linear isomorphism for each $q \in \R$.

A: Let me summarize the steps I've taken to produce (what I think is) a proof:

*

*Suppose, for a contradiction, that $\Theta\colon\mathbb R\to X$ is a diffeomorphism.


*Then $\Theta(t)=(f(t),|f(t)|)$ for $f$ bijective and both $f$ and $|f|$ $C^\infty$. You can also assume that $\Theta(0)=(0,0)$.


*Use the MVT on $|f|$ to deduce that $|f|'(0)=0$.


*Then $f'(0)=0$.


*$\Theta^{-1}(x,|x|)=f^{-1}(x)$.


*There exists $g\in C^\infty(V)$, where $V$ a nbh of $(0,0)$ in $\mathbb R^2$, such that $g(x,|x|)=f^{-1}(x)$ for $x\in V\cap X$.


*Work with limits and the MVT to establish (sign depends on $h$)
$$
  \lim_{h\to0}\frac{f^{-1}(h)-f^{-1}(0)}{h}
      = \frac{\partial g}{\partial x}\Big|_{(0,0)}
            \pm \frac{\partial g}{\partial y}\Big|_{(0,0)}.
$$


*Conclude that the lateral derivatives satisfy
$$
    (f^{-1})'_\pm = \frac{\partial g}{\partial x}\Big|_{(0,0)}
            \pm \frac{\partial g}{\partial y}\Big|_{(0,0)}
$$


*Conclude that $f\circ f^{-1}(x)=x$ is impossible around $0$ because of 4. $\to\leftarrow$
