Question on the definition of outward normal vector from Spivak, Calculus on Manifolds The following definition of the outward unit normal at the boundary of a manifold $M \subseteq \mathbb R^n$ is taken from Spivak, Calculus on manifolds (page 119).

If $M$ is a $k$-dimensional manifold-with-boundary and $x \in \partial M$, then $(\partial M)_x$ is a $(k-1)$-dimensional subspace of the $k$-dimensional vector space $M_x$. Thus there are exactly two unit vectors in $M_x$ which are perpendicular to $(\partial M)_x$; they can be distinguished as follows: If $f : W \to \mathbb R^n$ is a coordinate system with $W \subseteq H^k$ and $f(0) = x$, then only one of these vectors is $f_{\ast}(v_0)$ for some $v_0$ with $v^k < 0$. This unit vector is called the outward unit vector.

What wonders me is how a coordinate system is defined according to the book. If $M \subseteq \mathbb R^n$ is $k$-dimensional manifold, then for each $x \in M$ there exists an open set $U$ containing $x$, an open set $W \subseteq \mathbb R^k$, and a 1-1 differentiable function $f : W \to \mathbb R^n$ such that
(1) $f(W) = M \cap U$
(2) $f'(y)$ has rank $k$ for each $y \in W$,
(3) $f^{-1} : f(W) \to W$ is continuous.
This $f : W \to \mathbb R^n$ is called a coordinate system. As $H^k := \{ x \in \mathbb R^k : x^k \ge 0 \}$ is not open, if $W \subseteq H^k$ and $x \in \partial M$, then as $W$ does not touches the boundardy of $H^k$ (i.e those points $x$ with $x^k = 0$) the condition $f(0) = x$ implies $0 \notin W$ and so $x \notin M \cap U$. But by the requirement $x \in U$. So this gives a contradiction?
Have I understood something wrong here? I guess this might be an error in the book, and I think to fix it the definition of a coordinate system $f : W \to \mathbb R^n$ must be altered to account for boundary points, i.e. I guess what would work is if $x$ is not a boundary point, then the conditions are as above, and if $x \in \partial M$ to alter (1) to 
(1') $f(W \cap H^k) = M \cap U$
(guess the others could also be restricted to $W \cap H^k$, but I guess leaving them would also be fine). But after this alteration the assertion ''$W \subseteq H^k$'' has to be dropped or we would still get the same contradictions for $W$ open in $\mathbb R^k$.
So am I right in my objections? And how would you fix it?
 A: I recall being puzzled by this as well. Look at page 113, where condition M' is described. Spivak says that a set is called a manifold with boundary if every point has a neighborhood in which condition M (from a few pages earlier) holds, OR a neighborhood in which condition M' holds (which maps a relatively open subset of half-space to the interior-and-boundary around the point). 
In particular, this means that a "manifold-with-boundary" is not a "manifold", which seems (as English goes) to be crazy. 
But we have lots of other cases of this in mathematics -- a skew-field is not necessarily a field, for instance. (We also see examples in other domains: a madonna-with-child is not a madonna, for instance, at least not if you're thinking of the painting or sculpture rather than the thing depicted.)
POST-COMMENT ADDITION
A manifold with boundary is divided into two subsets (see last sentence of page 113): the boundary, denoted $\partial M$, consisting of points $x$ satisfying condition M', and the interior, consisting of points satisfying condition M. (It requires a bit of work to show that these are in fact disjoint, that's what the last paragraph on P 113 does.) 
The definition of outward normal applies only to points $x$ of the boundary $\partial M$, i.e., those satisfying condition M'. 
Theorem 5.2 shows how to get a "coordinate system $f$ at $x$" for a point $x$ of a manifold $M$, from the function $h$ described in condition M: you define $f(a) = h^{-1}(a, 0)$. 
You can write/prove an analogous theorem for a point in the boundary of a manifold with boundary:
Given a diffeomorphism 
$$
h : U \subset \mathbb R^n \to V \subset \mathbb R^n
$$
such that 
\begin{align}
h(U \cap M)& = V \cap (H^k \times \{0\})\\
& = \{ y \in V \mid y^k \ge 0 \
\text{ and } y^{k+1} = \cdots = y^m = 0 \}
\end{align}
there's an open set $W' \subset \mathbb R^k$ and a function 
\begin{align}
f: W' \to \mathbb R^n
\end{align}
such that 


*

*$f(W' \cap H^k) = M \cap U$,

*$f'(y)$ has rank $k$ for each $y \in W'$, and

*$f^{-1}: f(W) \to W'$ is continuous. 


The restriction of $f$ to $W = W' \cap H^k$ is called a coordinate system at $x$. 
(Note that this is the definition of a coordinate system for a point of the boundary $\partial M$, not the interior of $M$, for which the definition following theorem 5.2 applies.) 
The proof is essentially the same as the proof of 5.2, so I won't write it out. 
So when Spivak writes, on page 119, 
"If $f: W \to \mathbb R^n$ is a coordinate system with $W \subset H^k$ and $f(0) = x$, then only one of these ...."
he means that $f$ is a function like the one I've described above, not like the one from theorem 5.2. 
I have to agree here: it would have been nice if he'd taken the time to write this out (or at least make it a HW problem!). 
