# Extending from the domain from an open subsets of the manifold to the whole manifold

I am proving the following thing.

Suppose $f : X \rightarrow Y$ is a map between manifold such that for all smooth $g : Y \rightarrow \mathbb{R}$ we have $g \circ f$ is smooth. I would like to prove that f is smooth. Suppose that X has dimension n and Y has dimension m. Suppose that $\{U_i,\phi_i\}$ smooth atlas for X, $\{V_j,\psi_j\}$ is smooth atlas for Y, and $\{\mathbb{R},id\}$ is the smooth atlas of $\mathbb{R}$. Set $g = \pi_u \circ \psi_j$ where $\pi_u : \mathbb{R}^m \rightarrow \mathbb{R}$ is regular projection map of onto the u coordinate. g is smooth as it is composition of smooth maps. We are given that $g \circ f$ is smooth, which means that $id \circ (g \circ f) \circ \phi_i^{-1}$ is smooth, but this means that $\pi_u \circ (\psi_j \circ f \circ \phi_i^{-1})$ is smooth, since u is arbtrarily coordinate, then $\psi_j \circ f \circ \phi_i^{-1}$ is smooth. Here I assumed though that each function $\psi_j$ has domain Y instead of an open subset of Y, so how can I extend this to the whole manifold Y ? If someone could explain fully how we can do this with bump functions as I don't understand them very much.

You don't need to. You started off with a globally defined function. To check smoothness is only a local question. So, given a chart $\psi\colon V\to\Bbb R^m$ for $Y$, make a smooth function $g$ by taking a bump function $\rho$ supported in $V$ and let $g=\rho\cdot\psi^\alpha$ (for any $\alpha=1,\dots,m$) [these being the component functions of $\psi$]. You should understand that $g$ is globally defined, smooth, and $0$ outside a compact set contained in $V$.
Conversely, if you had a bunch of locally-defined functions that were smooth, to decide if they patched together to make a smooth function on all of $X$, you'd just have to check that they were compatible on overlaps (i.e., on intersections of their [open] domains).
• @user170039 I was tacitly assuming you have smooth functions $f_i$ on open sets $U_i$ with $\{U_i\}$ an open cover of $X$. – Ted Shifrin May 12 '18 at 20:32