defining smooth functions on smooth manifolds The standard approach to defining smooth functions $f:M\to\mathbb{R}$ on a topological manifold $M$ equipped with a smooth structure (i.e., a maximal smooth atlas) $\mathcal{A}$ is the following. Say a function $f$ is smooth at $p\in M$ if there exists a coordinate chart $(U,\phi)\in\mathcal{A}$ such that $p\in U$ and $$f\circ\phi^{-1}:\phi(U)\to\mathbb{R}$$ is smooth. (Say $M$ is $n$-dimensional, so that $U$ is homeomorphic to $\phi(U)\subset\mathbb{R}^n$.)
It is then supposed to be a simple exercise that the smoothness of $f$ at $p$ doesn't depend on the choice of chart $(U,\phi)$, in the sense that $f$ will be smooth in all charts $(V,\theta)\in\mathcal{A}$ such that $p\in V$. (Lang, for example, says "One sees then immediately..." See the photo at the end of this post.) I take this to mean that if $f\circ\phi^{-1}$ is smooth for some $(U,\phi)$, then for any $V$ such that $p\in V$, we have $$\boxed{f\circ\theta^{-1}:\theta(V)\to\mathbb{R}}$$
is smooth.
Here is where I'm confused. I know how the proof is supposed to go: you use the fact that chart transformations must be smooth (by the definition of the smooth atlas), writing $$f\circ\theta^{-1}=(\underbrace{f\circ\phi^{-1}}_{:=\alpha})\circ(\underbrace{\phi\circ\theta^{-1}}_{:=\beta})$$
By assumption, $\alpha$ is smooth, and $\beta$ is smooth because it is a chart transformation. Indeed the point of requiring smooth chart transitions is precisely to make this argument go through.
But the problem I'm having is with domains. The function $f\circ\theta^{-1}$ is defined on all of $\theta(V)\subset\mathbb{R}^n$, whereas the chart transformation $\beta$ is defined only on the smaller domain $\theta(U\cap V)\subset\theta(V)$. So I don't see how $f\circ\theta^{-1}$ can be defined on all of $\theta(V)$, and that seems to be what I need to check (per the box above). So my question is: how exactly is this argument supposed to go? Do I need define $f\circ\theta^{-1}$ piecewise as $\alpha\circ\beta$ on $\theta(U\cap V)$ together with some other definition on $\theta(V)-\theta(U\cap V)$?
I think I'm missing something very simple, but I can't see it. This issue has bothered me for years.

Lang's definition:

 A: If we're looking at the local version, the correct criterion for arbitrary charts is

For all charts $(V,\theta)$ with $p\in V$ there is an open neighbourhood $\tilde{V}\subset V$ of $p$ such that $f\circ \theta^{-1}$ is smooth on $\theta(\tilde{V})$.

Then it is easily seen that the existence of one chart $(U,\varphi)$ such that $f\circ \varphi^{-1}$ is smooth on $\varphi(\tilde{U})$ for some open neighbourhood $\tilde{U}$ of $p$ is sufficient to have the same for every chart around $p$, for if $(V,\theta)$ is a chart around $p$, then $\tilde{V} := \tilde{U} \cap V$ is an open neighbourhood of $p$, and on $\theta(\tilde{V})$
$$f\circ \theta^{-1} = (f\circ \varphi^{-1})\circ (\varphi\circ \theta^{-1})$$
is the composition of two smooth functions.
We cannot demand that $f\circ\theta$ is smooth on all of $\theta(V)$ then, since a chart around $p$ might contain points where $f$ is not smooth (possibly not even continuous).
The global variant follows from the local variant, since we can for every $x\in V$ choose a chart $(U_x,\varphi_x)$ around $x$ such that $f\circ \varphi_x^{-1}$ is smooth, from which it follows that $f\circ \theta^{-1}$ is smooth on a neighbourhood of $\theta(x)$, and since $x\in V$ was arbitrary, it then follows that $f\circ\theta^{-1}$ is smooth on all of $\theta(V)$.
A: First we refer the definition of smoothness of real-valued functions $M\to\Bbb R$ defined on a manifold. The definition is from Loring Tu's An introduction to manifolds p.59.

Suppose the chart $(U,\phi)$ ($p\in U$) can make $f\circ\phi^{-1}$ be $C^\infty$ at the point $\phi(p)$. (Notice that it only requires "being $C^\infty$" at that point). Now let $(V,\psi)$ be another chart ($p\in V$). Then $f\circ\psi^{-1}:\psi(V)\to\Bbb R$ must be $C^\infty$ at the point $\psi(p)$ (the domain is exactly $\psi(V)$). That is because its restriction $\left. (f\circ\psi^{-1})\right\vert_{\psi(U\cap V)}=f\circ\phi^{-1}\circ t_{U,V}$ (where $t_{U,V}$ is the transition map from $V$ to $U$) is $C^\infty$ at the point $\psi(p)$.
