Lee book introduction to smooth manifold problem 8.15 I need help with one of the problem in Lee's introduction to smooth manifolds. the problem is :
EXTENSION LEMMA FOR VECTOR FIELDS ON SUBMANIFOLDS: Suppose $M$ is a smooth manifold and $S\subseteq M$ is an embedded submanifold with or without boundary. Given $X\in \mathfrak{X}(S)$, show that there is a smooth vector field $Y$ on a neighborhood of $S$ in $M$ such that $X=Y|_S$ . Show that every such
vector field extends to all of $M$ if and only if $S$ is properly embedded.
The first part of thr ptoblem I could manage and one direction of the second part of the problem: to show that $X$ extends to whole of $M$ if $S$ is properly embedded, is easy because $S$ is closed and it follows by the first part of this problem together with the extension lemma of vector fields. It is the converse of the second part of the problem that I cannot prove: if every vector field $X\in \mathfrak{X}(S)$ extends to all of $M$ then $S$ is properly embedded.
My plan to solve this is by using extension lemma for smooth functions on submanifolds (problem 5.18 (b) Lee's introduction to smooth manifold book). If I take an arbitrary $f\in C^{\infty}(S)$ then construct a vector field $X\in \mathfrak{X}(S)$ whose local representation is roughly of the form $X=f\frac{\partial }{\partial x^i}$, then if $X$ extends to all of $M$ we can also extend $f$ to a smooth function defined on all of $M$ and hence conclude $S$ is properly embedded. My problem is how do we construct such smooth vector fields?.
Please help Im stuck at this problem for three days now.
EDIT: I have come up with the following proof. Please can anyone check if it is a valid proof.
Proof: Let $\dim M= n$ and $\dim S =k$. Let $f\in C^{\infty}(S)$ be arbitrary. We show that $f$ can be extended to a smooth function $g\in C^{\infty}(M)$. Let $p\in S$ and let $(U_p, \phi_p)$ be a smooth slice chart for $S$ in $M$ containing $p$. If $V_p= S\cap U_p$ and $\theta_p = \phi_p|_{V_p}$, then $(V_p, \theta_p)$ is a smooth chart for $S$ containing $p$. Writing $\theta_p= (\theta^1_p, \ldots, \theta^k_p)$ for the component functions of $\theta$, we define a vector field $X_p: V_p\to TS$ on $S$ by
$$X_p(x) = f(x) \dfrac{\partial}{\partial \theta^1_p}\bigg|_x.$$
Clearly $X_p$ is smooth because $f$ is smooth. Choose a neighborhood $W_p$ of $p$ in $M$ such that $\overline{W_p}\subset U_p$, then $X|_{S\cap \overline{W_p}}$ is a smooth vector field on $S$ along the closed set $S\cap \overline{W_p}$ (It has a smooth extension to a neighborhood $V_p \supset S\cap \overline{W_p}$). So by extension lemma for vector fields it has a smooth extension to a vector field $\widetilde{X_p}\in \mathfrak{X}(S)$. And by hypothesis there exists a vector field $Y_p\in \mathfrak{X}(M)$ such that
$$Y_p \circ i = di \circ \widetilde{X_p},$$
where $i: S \hookrightarrow M$ is the inclusion. Write $\phi_p= (\phi_p^1, \ldots, \phi_p^n)$ for the component functions of $\phi$, then $Y_p$ can be expressed locally as,
$$Y_p = \sum_{i=1}^{n}a_{p, i}\dfrac{\partial }{\partial \theta_p^i},$$
for some $a_{p,i} \in C^{\infty}(U_p)$. Now for all $x\in S\cap W_p$, we have from the equation $Y_p \circ i = di \circ \widetilde{X_p}$,
$$\sum_{i=1}^{n}a_{p, i}(x)\dfrac{\partial }{\partial \theta_p^i}\bigg|_x = di_x (\widetilde{X_p}(x))= di_x \left(f(x)\dfrac{\partial}{\partial \theta_p^1}\bigg|_x\right) = f(x) \dfrac{\partial}{\partial \phi_p^1}\bigg|_x.$$
Comparing the coefficients we get
$$a_{p,1}(x) = f(x), \hphantom{----} \forall x\in S\cap W_p.$$
Next we extend the collection of open sets $\{W_p\}_{p\in S}$ to an open cover $\{W_p\}_{p\in S} \cup \{O_{\alpha}\}$ of $M$ such that whenever $S \cap O_{\alpha} \neq \emptyset$, $S\cap O_{\alpha}$ is a slice of $O_{\alpha}$. Since $S$ is embedded, $f$ has a smooth extension to a smooth function $\widetilde{f}$ on a neighborhood $O$ containing $S$. So, $\widetilde{f}|_{S\cap O_{\alpha}}= f|_{S\cap O_{\alpha}}$ is a smooth function on a closed subset $S\cap O_{\alpha}$ of $O_{\alpha}$ (recall $S \cap O_{\alpha}$ is a slice of $O_{\alpha}$) because it has a smooth extension $\widetilde{f}|_{O \cap O_{\alpha}}$ on a neighborhood $O\cap O_{\alpha}\supset S\cap O_{\alpha}.$ Therefore by smooth extension lemma for smooth functions there exists $f_{\alpha}\in C^{\infty}(O_{\alpha})$ such that $f_{\alpha}|_{S\cap O_{\alpha}} = f|_{S\cap O_{\alpha}}$.
Now take a partition of unity $\{\psi_p\}\cup \{\psi_{\alpha}\}$ on $M$ subordinate to an open cover $\{W_p\}_{p\in S}\cup\{O_{\alpha}\}$ and define $g:M\to \mathbb{R}$ by
$$g(x) = \sum_{p\in S}\psi_p(x) a_{p,1}(x) + \sum_{\alpha: S\cap O_{\alpha}\neq \emptyset}\psi_{\alpha}(x) f_{\alpha}(x) + \sum_{\alpha: S\cap O_{\alpha}= \emptyset}\psi_{\alpha}(x).$$
Where we interpret the products $\psi_pa_{p,1}$ and $\psi_{\alpha}f_{\alpha}$ as smooth functions on $M$ by assigning the value $0$ outside the support of $\psi_p$ and $\psi_{\alpha}$ respectively. Then $g\in C^{\infty}(M)$. It remains to show that $g$ agree with $f$ on $S$. So let $x\in S$, then as $\psi_p(x)a_{p,1}(x) =0 $ for those $p$ in which $x\notin W_p$, and also $\psi_{\alpha}(x) =0$ for those $\alpha$ in which $S\cap O_{\alpha}= \emptyset$, we get
$$\begin{align}
    g(x) & = \sum_{p: x\in W_p}\psi_p(x) a_{p,1}(x) + \sum_{\alpha: S\cap O_{\alpha}\neq \emptyset}\psi_{\alpha}(x) f_{\alpha}(x)\\
& = \sum_{p: x\in W_p}\psi_p(x) f(x) + \sum_{\alpha: S\cap O_{\alpha}\neq \emptyset}\psi_{\alpha}(x)f(x) \\
& = \left(\sum_{p\in S}\psi_p(x) + \sum_{\alpha}\psi_{\alpha}(x)\right)f(x) \\
& = f(x).
  \end{align}
$$
Therefore we have shown that every $f\in C^{\infty}(S)$ admits a smooth extension $g\in C^{\infty}(M)$ and thus by problem 5.18(b) (Lee's book) we conclude that $S$ is properly embedded.
 A: First let's take $S$ just to be an embedded submanifold of $M$. For any $p \in S$, we can choose a smooth slice chart $(U_p, \varphi_p)$ for $S$ centered at $p$. This makes $S \cap U_p$ a closed subset of $U_p$ (i.e. it is closed in $U_p$). As you've suggested, we can consider the local representation of the vector field $X$. Let's write
$$X = X^i \frac{\partial}{\partial x^i}$$
for the representation of $X$ in $S \cap U_p$. Note that each $X^i$ is a smooth function defined on $S \cap U_p$. By the extension lemma for smooth functions (Lemma 2.26 in Lee), each function $X^i$ extends to a function $\tilde X^i$ on $U_p$. Then we define
$$\tilde X_p = \tilde X^i \frac{\partial}{\partial x^i}$$
since $\tilde X^i$ agrees with $X^i$ on $S \cap U_p$, we can see that the vector field $\tilde X_p$ agrees with $X$ on $S \cap U_p$, or in other words, it extends $X$ to $U_p$.
At this point, we have proven the claim in a neighborhood of each point. That is, we have extended $X$ (in possibly many distinct, incoherent ways) to a neighborhood of each point of $S$. To complete the proof, we need to patch together these extensions, and for this we use partitions of unity. In particular, note that the collection $\{U_p \mid p \in S\}$ covers $\bigcup_{p \in S} U_p$; let $\{\psi_p \mid p \in S\}$ be a partition of unity subordinate to this cover. We set
$$\tilde X = \sum_{p \in S} \psi_p \tilde X_p$$
By setting $\psi_p \equiv 0$ outside of $U_p$, we see that $\tilde X$ is defined on $\bigcup_{p \in S} U_p$. Additionally, since each vector field $\tilde X_p$ agrees with $X$ on $S \cap U_p$ and $\sum_{p \in S} \psi_p \equiv 1$, we see that $\tilde X$ agrees with $X$ on $S$, meaning that $\tilde X$ extends $X$ to a neighborhood of $S$.
We can treat the case of $S$ being properly embedded very quickly in light of this. In particular, if $S$ is properly embedded, then $S$ is closed in $M$ (this can be proved fairly simply, but I believe it is also a proposition in Lee). This means that $\{U_p \mid p \in S\} \cup \{M \setminus S\}$ is an open cover of $M$. Let $\{\psi_p \mid p \in S\} \cup \{\psi_0\}$ be a partition of unity subordinate to this cover, and define
$$\tilde X = \sum_{p \in S} \psi_p \tilde X_p$$
Notice that this is exactly the same s before. The distinction lies in the fact that $\sum_{p \in S} \psi_p$ may not equal 1 outside of $S$ as it did before. Essentially, we have patched in the zero vector field on $M \setminus S$, which allows us to extend $X$ to the entirety of $M$.
