Lagrange multipliers on manifolds in Lee's book Here is Problem 11-11 on page 301 of John Lee’s book:


Let $ M $ be a smooth manifold, and $ C \subset M $ be an embedded sub-manifold. Let $ f \in {C^{\infty}}(M) $, and suppose $ p \in C $ is a point at which $ f $ attains a local maximum or minimum value among points in $ C $. Given a smooth local defining function $ \Phi: U \to \mathbb{R}^{k} $ for $ C $ on a neighborhood $ U $ of $ p $ in $ M $, there are real numbers $ \lambda_{1},\ldots,\lambda_{k} $ (called Lagrange multipliers) such that
    $$
\mathrm{d} f_{p} = \sum_{i = 1}^{k} \lambda_{i} \cdot \mathrm{d} \Phi^{i}|_{p}.
$$


I got confused when I was trying to solve it. Here are my questions:
(1) He didn’t say anything about the dimension of $ M $ and $ C $, nor did he put corrections here. Is it necessary to assume that $ \operatorname{dim}(M) = n > k $ and $ \operatorname{dim}(C) = n - k $, or do these results implicitly follow from the conditions of this problem?
(2) Why do we need the condition that $ C $ is an embedded sub-manifold? Assume $ \operatorname{dim}(C) = n - k $; then Theorem 5.8 on page 102 tells us that $ C $ satisfies the local $ k $-slice condition (this is the only theorem I can think of that is related to this condition), but what good can this condition do for us?
(3) I think I need to apply the Lagrange Multiplier Theorem (see page 113) in multi-variable calculus, but we need to make sure that the rank of the Jacobian matrix of $ \Phi $ is of rank $ k $ at the point $ p $. However, there aren’t any extra conditions on $ \Phi $.
You can either answer my questions separately or show me a detailed proof of it. Thank you in advance!
 A: Here are a few comments that might be helpful.

(1) He didn't say anything about the dimension of $M$ and $C$, nor did
  he put corrections [here][1]. Is it necessary to assume that $dim
> M=n>k$ and that $dim C=n-k$ or these results implicitly follow from
  the conditions in this problem?

The definition of a local defining function (page 107) specifies that $C\cap U$ is a regular level set of $\Phi$, which implies that $d\Phi$ has rank $k$ everywhere on $C\cap U$, and therefore $C$ has codimension $k$ in $M$. 

(2) Why do we need the condition that $C$ is an embedded submanifold?

Embedded submanifolds are the only ones that admit local defining functions in a neighborhood of each point. 

(3) I think I need to apply the Lagrange multipliers theorem in multi-variable calculus. But we need to make sure that
  the rank of the Jacobian matrix of $\Phi$ is of rank $k$ at the point
  $p$. However, there isn't any extra conditions on $\Phi$.

The point of this problem is to prove the Lagrange multiplier theorem, albeit in a more general setting than the one usually introduced in advanced calculus courses. The fact that the Jacobian of $\Phi$ in coordinates has maximal rank is an immediate consequence of the definition of a local defining function. 
A: Assume that $\dim M=n$. Since $C$ is a regular submanifold of $M$
  defined as a level set of $\Phi$ and $p\in C$, there exists an
  adapted chart, also called a slice chart, $(V,\varphi)$ on some
  neighbhorhood $V$ of $p$, so that on $C$, $n-k$ coordinate functions
  vanish. Let $(r^1,\ldots,r^n)$ be the standard coordinates on
  $\mathbb{R}^n$. We can write $\varphi=(x^1,\ldots,x^n)$, where
  $x^i=r^i\circ\varphi$. Without loss of generality, we may assume
  that the last $k$ coordinates, $x^{k+1},\ldots,x^n$, vanish on
  $C\cap V$.
Let $(r^1,\ldots,r^k)$ be the standard coordinates on
  $\mathrm{d}^k$. Since $C\cap V=\Phi^{-1}(a)$ for some $a\in\mathrm{d}^k$ and
  $p\in C$, we have
  \begin{equation*}
    \left.\frac{\partial \Phi^i}{\partial x^j}\right|_{p}=
    \left.\frac{\partial (r^i\circ\Phi)}{\partial x^j}\right|_{p}=
    \left.\frac{\partial (r^i\circ\Phi\circ\varphi^{-1})}{\partial
      r^j}\right|_{\varphi(p)}\neq 0,
  \end{equation*}
  for all $i\in\{1,\ldots,k\}$ and all $j\in\{k+1,\ldots,n\}$. It
  follows from the Implicit Function Theorem that
  $(x^1,\ldots,x^{n-k},\Phi^1,\ldots,\Phi^k)$ are smooth coordinates
  in some neighborhood $W\subset V$ of $q$. Hence $\mathrm{d} f_p$ has
  coordinate representation,
  \begin{equation*}
    \mathrm{d} f_p=\lambda_1 \mathrm{d} \Phi^1_p+\cdots+\lambda_k\mathrm{d}\Phi^k_p+
    \lambda_{k+1}\mathrm{d} x^1_p + \cdots + \lambda_{n}\mathrm{d} x^{n-k}_p.
  \end{equation*}
  Since $f|_C$ attains local extremum at $p$ and
  $(x^1,\ldots,x^{n-k})$ are smooth local coordinates for the regular
  submanifold $C$ in some neighborhood $V$ of $p$.
  \begin{equation*}
    \lambda_i=\mathrm{d} f_p\left(\left.\frac{\partial}{\partial
      x^{i-k}}\right|_p\right)= \left.\frac{\partial f}{\partial
      x^{i-k}}\right|_p=0, \quad i\in\{k+1,\ldots,n\}.
  \end{equation*}
  Hence 
  \begin{equation*}
  \mathrm{d} f_p=\lambda_1\mathrm{d}\Phi^1_p+\cdots
  +\lambda_k\mathrm{d}\Phi^k_p.
  \end{equation*}
