I need to provide a good definition of the subset of $\{\{0,1,\ldots,n-1\} \times \{0,1,\ldots,n-1\} \times \cdots \times \{0,1,\ldots,n-1\}\} \subset \mathbb{Z}^k$ given by all the vertices of the aforementioned set that can be reached in a single move (or less) by a $k$-dimensional chess rook, $R$, that starts from the vertex $\{(x_1,x_2,\ldots,x_k)\}$ (i.e., $x_1,x_2,\ldots,x_k \in \{0,1,\ldots,n-1\}$), where the generalized rook move rule is shown below.
$n=4, k=3, x_1=1, x_2=0, x_3=0$" />
Now, I think that my definition $$\{x_1,x_2,\ldots,x_k\} \cup \{(x_1+c_1,x_2+c_2,\dots,x_k+c_k) : \exists \tilde{j} \in \{1,2,\dots,k\} : \\ ((c_{j \neq \tilde{j}}=0 \wedge |c_{j=\tilde{j}}|=c \wedge (|\{\tilde{j}\}|<|\{j\}|) \wedge (x_j+c_j) \in \{0,1,\dots,n-1\}) \quad \forall c \in \{1,2,\ldots,n-1\}), j=1,2,\ldots,k \}$$ is pretty ugly... is there a better way to indicate the described subset, working for any $n \in \mathbb{N}-\{0\}$ and $k \in \mathbb{N}-\{0,1\}$?
Thanks in advance for your help.
If I understand correctly, your set can be described as $$ \bigcup_{1 \leqslant j \leqslant k} \bigl\{ (x_1, \ldots, x_{j-1}, c, x_{j+1}, \ldots, x_k) \mid c \in \{0, \ldots, n-1\} \bigr\} $$ EDIT. New attempt, following the OP comments. $$ \bigcup_{I \subsetneq \{1, \ldots, k\}} \bigcup_{c \in \{0, \ldots, n-1\}} \Biggl\{ (z_1, \ldots, z_k) \mid z_i = \begin{cases} c &\text{if $i \in I$}\\ x_i &\text{otherwise} \end{cases} \Biggr\} $$