Is $\mathbb{D} = [-1,1]^3$ a compact manifold? Today I read about a generalization of the no-retraction theorem here which states the following:

Then there is no smooth mapping $f:M\to \partial M$ such that the restriction $f_{|\partial M}: \partial M \to \partial $ is the identity, where $M$ is a compact manifold with boundary $\partial M$ and $f_{|\partial M}$ denotes the restriction of the function $f$ to the boundary of the manifold $M.$

I know this theorem to be true for balls in $\mathbb{R}^n,$, however, the problem I am working on requires me to apply this theorem on a cube domain $\mathbb{D} = [-1,1]^3$ in $\mathbb{R}^3.$ So my question is whether the domain $\mathbb{D}$ is a compact manifold? Any hints/suggestions will be much appreciated.
 A: Indeed, a cube is homeomorphic to a closed ball in the usual metric, so anything topological that applies to the closed ball also applies to a cube.
A: $\mathbb{D}$ is a compact manifold with boundary. Once you know it is a manifold with boundary, it is quickly compact, by the Heine-Borel Theorem (because it is closed and bounded).
You can verify it is a manifold with boundary either by finding charts into $\mathbb{H}^3$ (which takes a little bit of effort at corners and edges) or by considering the map $f:\mathbb{D} \to \overline{B_1(0, 0, 0)},$
where $$f(x, y, z) = \frac{\max(|x|, |y|,|z|)}{\sqrt{x^2+y^2+z^2}}(x, y, z)$$ if $(x, y, z)\ne (0, 0, 0),$ and $f(0, 0, 0) = 0.$
($\overline{B_1(0, 0, 0)}$ is the closed unit ball around the origin.)
Then, $f$ is diffeomorphic, and charts for $\mathbb{D}$ can be obtained from charts on $\overline{B_1(0, 0, 0)}$ using $f$. For instance, if $$\varphi: U\subset \overline{B_1(0, 0, 0)} \to \mathbb{H}^n$$ is a chart for $\overline{B_1(0, 0, 0)}$, $$\varphi\circ f: f^{-1}(U)\to \mathbb{H}^n$$ gives a chart for $\mathbb{D}.$
A: There's a bit of awkwardness since the theorem you want to use applies to smooth manifolds, and the restriction of the smooth structure from $\mathbb{R}^3$ to the cube is not a smooth structure.
But it's also true if we forget differential topology and only worry about continuous maps: the boundary of the cube has non-trivial $H^2$, so the identity map from the boundary to itself can't factor through the cube, which has trivial $H^2$.
