I have a vector $\mathbf{i} \in \Bbb{Z}^n$ and I want to declare that $f(\mathbf{i}) = 1$ and any close neighbor $\mathbf{x}$ of $\mathbf{i}$, either diagonal or orthogonal (e.g. in $\Bbb{Z}^2$ it will be left, right, top, bottom, top left, top right, bottom left and bottom right neighbors), gives $f(\mathbf{x}) = 1$
Is it correct notation:
$$\forall \mathbf{x} \in \{\mathbf{x} \in\Bbb{Z}^n | \mathbf{i}-1\le x \le \mathbf{i}+1\}, f(\mathbf{x}) = 1$$
I'm a bit confused with the fact I used "$\mathbf{x} \in$" twice in the expression. Also I'm not sure that it's correct to add an integer 1 to the vector $\mathbf{i}$ in "$\mathbf{i}-1\le x \le \mathbf{i}+1$" part.
Regarding adding scalars and vectors: you're right, you can't do that. What you need is a distance function (norm) on $\mathbb Z^n$. I think the specific one you want is $$ \|\cdot\| : \mathbb Z^n \to [0,\infty) , \quad \|\mathbf v\| := \sum_{i=1}^n |v_i|$$ Then your set is $$ B := \{ \mathbf x \in \mathbb Z^n \mid \|\mathbf x - \mathbf i \| \le 1 \}$$ Now that I've given this set a name, you can go ahead and write what you want as $$ \forall \mathbf x \in B , \ f(\mathbf x) = 1$$ If you want to show that it depends on $\mathbf i$, you might want to write $B(\mathbf i)$. If you want to replace the number 1 with other numbers $r>0$, i.e. $|\mathbf x - \mathbf i | \le r$ you might want to write $B(\mathbf i, r)$. FYI if this was $\mathbb R^n$ instead of $\mathbb Z^n$, this would be the closed ball of radius $r$ around $\mathbf i$. (This norm is usually called the 1-norm, or the $\ell^1$ norm. Here's the wikipedia page on balls.. You might As the comment by Ennar indicates, this is a lattice in $\mathbb R^n$. It inherits the subspace metric from the vector space $\mathbb R^n$.)