Solution (source code)

= Solution

A smooth $n$-dimensional <manifold with boundary> has charts onto relatively open subsets of the half-space $\mathbb H^n=\{u_n\geq0\}$, with smooth transition maps extending smoothly locally across the boundary. A point is a boundary point when its last coordinate in such a chart is zero; this condition is independent of chart. One way to see the independence is that a local diffeomorphism between half-spaces preserves their interior and hence their topological boundary.

Restrict each boundary chart to $u_n=0$ and drop the last coordinate. It maps the boundary onto an open subset of $\mathbb R^{n-1}$, and the restricted transitions are smooth diffeomorphisms. These charts, with the inherited Hausdorff and countability properties, make $\partial X$ a <smooth manifold> without boundary. Therefore
$$
\boxed{\dim\partial X=n-1,\qquad\partial(\partial X)=\varnothing.}
$$