Solution (source code)

= Solution

Put $m=\dim M$ and $n=\dim N$. The hypothesis says that $q$ is a <regular value> of $F$. Since its preimage is nonempty and the <differential of a smooth map> is surjective there, $m\geq n$.

We use the following finite-dimensional <inverse function theorem>: if a smooth map $H:O\to\mathbb R^m$, with $O\subset\mathbb R^m$ open, has invertible derivative at $a$, there are open neighborhoods of $a$ and $H(a)$ on which $H$ is a <diffeomorphism>, with smooth inverse.

Fix $p\in F^{-1}(q)$. Choose <coordinate charts> centered at $p$ and $q$, and shrink the source neighborhood so that its image under $F$ lies in the target chart. Its coordinate expression is $f=(f^1,\ldots,f^n)$ with $f(0)=0$ and derivative of rank $n$. Choose $n$ domain coordinates giving an invertible $n\times n$ minor, and relabel them as $x^1,\ldots,x^n$. Define
$$
H(x)=\bigl(f^1(x),\ldots,f^n(x),x^{n+1},\ldots,x^m\bigr).
$$
Its derivative at zero has block form
$$
DH_0=\begin{pmatrix}B&C\\0&I_{m-n}\end{pmatrix},\qquad \det B\ne0,
$$
so it is invertible. The <inverse function theorem> makes $u=H(x)$ a new <coordinate chart> near $p$. In this chart $F=q$ is exactly $u^1=\cdots=u^n=0$, because the target chart sends $q$ to zero. These are <slice charts for an embedded submanifold>; reordering coordinates if desired puts the free coordinates first. Giving the level set the <subspace topology>, these restricted charts are smoothly compatible, as in part (a). This proves the <regular level set theorem> rather than merely invoking it.

\b[The level set is an embedded submanifold of dimension $\boxed{m-n}$]. The same coordinates show $T_pZ=\ker dF_p$: tangent vectors to the slice have zero first $n$ components, which are exactly the components of $dF_p$. The empty-dimensional case $m=n$ gives a discrete zero-dimensional <embedded submanifold>.