How can I show that $a,b \in Z$?

I have a question to the end of my proof for the problem 1.3.10 on Guillemin and Pollack's Differential Topology:

Generalizaition of the Inverse Function Theorem: Let $f: X \rightarrow Y$ be a smooth map that is injective on a compact sumbanifold $Z$ of $X$. Suppose that for all $x \in Z,$ $$df_x: T_x(X) \rightarrow T_{f(x)}(Y)$$ is an isomorphism. Then $f$ maps $Z$ diffeomorphically onto f(Z). Why? Prove that $f$ maps an open neighborhood of $Z$ in $X$ diffeomorphically onto an open neighborhood of $f(Z)$ in $Y$.

Suppose we have $$U_i = \cup_{z\in Z} B_i(Z),$$ where each $B_i$ is an open neighborhood centered at $z$, with $B_i(z) \rightarrow z$ as $i \rightarrow \infty$. Placing a metric on $X$ induced by $\mathbb{R}^N$ and take $B_i(z) = B(z, 1/i)$ for each $i \in \mathbb{N}$. Clearly $Z \subset U_i$ and $U_i$ is open. If $f$ is not one-to-one on some neighborhood of $Z$, we can find sequences of points $\{a_i\}, \{b_i\} \subset U_i$ such that $a_i \neq b_i$ and $f(a_i) = f(b_i).$ Since $Z$ is a compact manifold, the sequence $\{a_i\}, \{b_i\}$ is bounded, there exist convergent subsequences $a_i \to a, b_i \to b$ in $Z$.

Then I got lost here: How can I show that $a,b \in Z$?

• are you aware of the fact that compact submanifolds are also sequentially compact? – Eric O. Korman Jul 4 '13 at 2:05
• Yes @EricO.Korman, but I got lost considering all $a_i$s and $b_i$s just happen to be chosen in $U_i$ but outside of $Z$? Since only sequence in $Z$ converge $Z$, this case fails to converge in $Z$. – WishingFish Jul 4 '13 at 2:50

I guess some wording elsewhere confused me. Anyways, it just by the definition of compactness, $Z$ contains all of its limit points. Therefore, for any converging sequences $a_i \to a,b_i \to b$ in $Z$, $a,b \in Z.$