Implicit Function Theorem: a counter-example The following theorem is stated in Spivak's "Calculus on Manifolds" as a follow-up on the Implicit Function Theorem:

Theorem 2.13: Let $f: \mathbb{R}^n \to \mathbb{R}^p$ be continuously differentiable in an open set containing $a$, where $p \le n$. if $f(a) = 0$ and the $p \times n$ matrix $(D_jf_i(a))$ has rank $p$, then there is an open set $A \subset \mathbb{R}^n$ containing $a$ and a differentiable function $h: A \to \mathbb{R}^n$ with differentiable inverse such that 
$$f \circ h (x^1, \dots, x^n) = (x^{n-p+1}, \dots, x^n).$$

I don't see how this can be true. For a simple counter-example, let $f(x) = \sin(x)$ with $n=p=1$. Since $f'(2\pi)=1$, the theorem should hold at $a = 2\pi$, and since $a \in A$ we get for $x = a = 2\pi$:
$$\sin(h(a)) = a = 2\pi,$$
which cannot be true for any $h$. Where is the mistake?
 A: You are correct, the Theorem as stated is false. You get the correct statement by replacing $h$ in the equation by $h^{-1}$ (and you also really want $h(a) = 0$). Then it is a consequence of the Implicit Function Theorem. (In fact, it is a more general version of the Inverse Function Theorem.)
A: You're right, the statement of the theorem is incorrect.

As the proof of the theorem shows, Spivak is talking about the function $h$ that was constructed in the proof of the Implicit Function Theorem (Theorem 2-12). So, a correct version of Theorem 2-13 can look like this:

Theorem 2-13. Let $f: \mathbb{R}^n \to \mathbb{R}^p$ be continuously differentiable in an open set containing $a$, where $p \leq n$. If $f(a) = 0$ and the $p \times n$ matrix $(D_j f^i(a))$ has rank $p$, then there is an open set $A \subset \mathbb{R}^n$ containing $a$, an open set $B \subset \mathbb{R}^n$ and a differentiable function $h : B \to A$ with differentiable inverse such that $$f \circ h(x^1,\dots,x^n) = (x^{n-p+1},\dots,x^n).$$

Also, note that $h$ and $h^{-1}$ are in fact continuously differentiable (and are $C^\infty$ if $f$ is).
