Proving that $N$ is a manifold. I'm dealing with the following exercise from Munkres' "Analysis on Manifolds":

Let $f:\mathbb R^{n+k}\rightarrow \mathbb R^n$ be of class $C^r$. Let $M$ be the set of all $x$ such that $f(x)=0$. Assume that $M$ is non-empty and that $Df(x)$ has rank $n$ for $x \in M$. Then $M$ is a $k$-manifold without boundary in $\mathbb R^{n+k}$. Furthermore, if $N$ is the set of all $x$ for which
$$f_1(x)=\dots=f_{n-1}(x)=0 \, \, \text{ and } \, \, f_n(x)\geq 0$$
and if the matrix $$\partial (f_1, \dots, f_{n-1})/\partial x$$has rank $n-1$ at each point of $N$, then $N$ is a $k+1$ manifold and $\partial N=M$.

The first part (that states that $M$ is a $k$-manifold without boundary) is clear for me. However, I don't know what to do to prove the second part.
 A: For points in $N$ with $f_n(x)>0$ there is the assumption on the rank of $\partial(f_1,\dots,f_{n-1})/\partial x$. Hence you get local charts (in dimension $k+1$) by the same argument you use for $M$ in dimension $k$. 
Hence the only problem is to get appropriate charts for $N$ around points $x\in M$ (in which the assumption on the rank is automatically satisfied).  For such a point $x$, the standard proof that $M$ is a submanifold gives you an open neighborhood $U$ of $x$ in $\mathbb R^{n+k}$ and smooth functions $g_1,\dots, g_k:U\to\mathbb R$ such that $(f_1,\dots,f_n,g_1,\dots,g_k)$ defines a diffeomorphism from $U$ onto an open subset of $\mathbb R^{n+k}$. Then you use $(g_1,\dots,g_k)$ as a chart on $U\cap M$. But in the same way, you can use $(f_n,g_1,\dots, g_k)$ as a chart for $U\cap N$, which by assumption now has values in a half-space, thus showing that $N$ is a submanifold of dimension $k+1$ with boundary $M$.    
A: One way to think about this is to first consider just the first $(n-1)$ maps, into $\mathbb{R}^{n-1}$. There the preimage of $0$ is a $(k+1)$-manifold, let's call it $D$ [this is by the first part]. Then consider, by restriction, the map $f_n:D\rightarrow\mathbb{R}$. The preimage of $(0,\infty)$ is an open subset of $D$ (by continuity), so is a $(k+1)$ dimensional manifold. The preimage of $0$ is $M$ (by the first part). Showing everything meshes well ($M$ is the boundary, etc.) Can be done by using the fact that, locally, $f_n$ looks like $f_n(x _1,\ldots,x_{k+1})=x_{k+1}$. 
