TITLE: Extend isometry on some cube vertices to the entire cube
QUESTION [5 upvotes]: Let $K\subset V=\{-1,1\}^n$ be a set of vertices of the $n$-dimensional hypercube $D=[-1,+1]^n$ and let $f:K\to V$ be an isometry with respect to the Euclidean metric inherited from $\mathbb R^n.$ We do not know a priori that $f$ corresponds to a linear endomorphism of $\mathbb R^n.$
Can $f$ necessarily be expressed as a composition of reflections by coordinate hyperplanes and permutations of coordinates, i.e.,
does there exist a global symmetry of $D$ that restricts to $f$ on $K$?
This question came up here when analysing the distribution of some random vectors.

REPLY [2 votes]: Here is a counterexample.  Let $n=4$ and let $K$ consist of the rows of the following array: 
$$\begin{matrix} 
-1 & -1 & -1 & -1 \\
1 & 1 & -1 & -1 \\
1 & -1 & 1 & -1 \\
1 & -1 & -1 & 1 \\
\end{matrix}$$
Note that any isometry $D\to D$ which  fixes the first $3$ points must be the identity (fixing the first point says you don't reverse the sign of any coordinate, and each coordinate is uniquely determined by the subset of the $3$ points that take the value $1$ on that coordinate, so the permutation of the coordinates must be trivial).  But there is an isometry $K\to V$ which fixes the first $3$ points and sends the last point to 
$$\begin{matrix}
-1 & 1 & 1 & -1
\end{matrix}$$