Prove that $N(Z;Y)$ is trivial if and only if there exists a set of $k$ independent functions $g_1,…,g_k$ for $Z$ on some set $U$ in $Y$. Prove that $N(Z;Y)$ is trivial if and only if there exists a set of $k$ independent global defining functions $g_1,…,g_k$ for $Z$ on some set $U$ in $Y$. That is $Z=\{y∈U:g_1 (y)=0,…,g_k (y)=0\}$

Local submersion theorem: Suppose that $f:X\to Y$ is submersion at $x$ and $y=f(x)$. Then there exist local coordinate around $x$ and $y$ such that $f(x_1,...x_k)=(x_1,...,x_k)$.
$\epsilon$ neighborhood theorem: For a compact boundaryless manifold $Y$ in $R^M$ and $\epsilon >0$, let $Y^\epsilon$ be the open set of points in $R^k$ with distance less than $\epsilon$ from $Y$. If $\epsilon$ is sufficiently small then each point $w\in Y^\epsilon$ possesses a unique closest point in $Y$, denoted $\pi(w)$. Moreover the map $\pi : Y^\epsilon \to Y$ is a submersion.
Tubular neighborhood theorem there exist a diffeomorphism from an open neighborhood $Z$ in $N(Z;Y)$ onto an open neighborhood of $Z$ in $Y$
Trivial normal bundle proposition: Let $Z$ be a submanifold of codimension $k$ in $Y$, then $N(Z;Y)$ is trivial if there exists a diffeomorphism $\phi :N(Z;Y) \to Z\times R^k$ that restrict to a linear isomorphism $N_z (Z;Y)\to {z}\times R^k$ for each point $z\in Z$.

Here is what I got so far.
=>
Assume that $N(Z;Y)$ , the normal bundle of $Z$ in $Y$, is trivial, then by Tubular neighborhood theorem, there exist a diffeomorphism from an open neighborhood $Z$ in $N(Z;Y)$ onto an open neighborhood of $Z$ in $Y$. Let $U$ be an open neighborhood in $Y$, then $g:U \to R^k $ is submersion, thus $U$ can be cut out by many independent functions $g_1, \dots, g_k$
I feel like I'm saying something really stupid here.
<=
Assume that there exists a submersion $g:U \to R^k $ with $g^{-1} (0)=Z$. For this part, the book give me a hint that for each $z\in Z$ the transpose map $dg_z ^t:R^k \to T_z(Y)$ carries $R^k$ isomorphically onto the orthogonal complement of $T_z(Z) $ in $T_z(Y)$. But I don't know how they get this.
 A: Let $S$ be an embedded submanifold of $\mathbb{R}^n$ of codimension $k$. Let $NS$ denote the normal bundle and $\pi_{NS}:NS \rightarrow S$ the projection.
Suppose first that there is a smooth defining function $\Phi:U \rightarrow \mathbb{R}^k$ on a neighborhood $U$ of $S$ in $\mathbb{R}^n$, say $S = \Phi^{-1}(c)$. Consider the map $\Psi: NS \rightarrow S \times \mathbb{R}^k$ (identifying $T_c\mathbb{R}^k$ with $\mathbb{R}^k$) given by $\Psi(v) = (p, d\Phi_p v)$ for $v \in N_pS$ and $p \in S$. If $\delta: NS \rightarrow NS \times NS$ is the diagonal map, then $\Psi = (\pi_S \times d\Phi|_{NS}) \circ \delta$, so $\Psi$ is smooth. Note that $\pi_S \circ \Psi = \pi_{NS}$, where $\pi_S:S \times \mathbb{R}^k \rightarrow S$ is the projection, so $\Psi$ is a smooth bundle homomorphism over $S$. For $p \in S$, $T_pS = \text{Ker}(d\Phi_p)$, so $d\Phi_p|_{N_pS} = (d\Phi|_{NS})_p:N_pS \rightarrow \mathbb{R}^k$ is a linear isomorphism. The map $\Gamma: S \times \mathbb{R}^k \rightarrow NS$ defined by $\Gamma(p,w) = (d\Phi|_{NS})_p^{-1} w$ is thus an inverse for $\Psi$.
We now show that $\Gamma$ is smooth. Let $(E_1, \ldots, E_k)$ be a smooth local frame for $NS$ on an open set $V$ in $S$. Then $d\Phi|_{NS} \circ E_i = A_i^j \frac{\partial}{\partial x^i}\big|_c$ for some smooth functions $A^j_i$ on $V$, namely
\begin{equation*}
 A^j_i(p) = \big((d \Phi|_{NS})_p \circ E_i|_p \big)(x^j) = E_i|_p(\Phi^j) = (E_i \Phi^j)(p)
\end{equation*}
for $p \in V$. Since $(d\Phi|_{NS})_p$ is an isomorphism for $p \in V$, the matrix $A^j_i$ is (smoothly) invertible. Let $B$ denote the inverse matrix. Then, for $p \in V$,
\begin{equation*}
 \Gamma(p,w) = w^i B_i^j(p) E_j|_p,
\end{equation*}
so $\Gamma$ is smooth. Since $\Gamma$ is also a bundle homomorphism over $S$, $NS$ is trivial.
Suppose conversely that $NS$ is trivial. By the tubular neighborhood theorem, there is a neighborhood $U$ of $S$ in $\mathbb{R}^n$ and a diffeomorphism $E:V \rightarrow U$, where $V \subset NS$ is an open set of the form
\begin{equation*}
 V = \{(p,v) \in NS : |v|< \delta(p)\}
\end{equation*}
for some continuous function $\delta:M \rightarrow \mathbb{R}$. By construction, $E(p,0) = p$ for $p \in S$, so $E^{-1}(q) \in N_{\pi_{NS}(E^{-1}(q))}S$ is nonzero for any $q \in U \smallsetminus S$. Let $\Theta: NS \rightarrow S \times \mathbb{R}^k$ be a smooth bundle isomorphism, and let $\pi_k:S \times \mathbb{R}^k \rightarrow \mathbb{R}^k$ denote the projection onto $\mathbb{R}^k$. Then $\Phi = \pi_k \circ \Theta \circ E^{-1}:U \rightarrow \mathbb{R}^k$, as a composition of smooth submersions, is a smooth submersion. For $p \in S$, since $\Theta|_{N_pS}: N_pS \rightarrow \{p\} \times \mathbb{R}^k$ is a linear isomorphism and $E^{-1}(q) \in N_{\pi_{NS}(E^{-1}(q))}S$ is zero if and only if $q \in S$, $S = \Phi^{-1}(0)$.
