Supose that $\mathbb{A}$ is a finite set and take $\overline{u},\overline{v} \in \mathbb{A}^n$. Let:
$$X=\{\overline{x} \in \mathbb{A}^n\mid d(\overline{u},\overline{x})<d(\overline{v},\overline{x})\}$$
$$Y=\{\overline{y} \in \mathbb{A}^n\mid d(\overline{u},\overline{y})>d(\overline{v},\overline{y})\}$$
Prove that $Card(X)=Card(Y)$
I am really stuck on this problem. I thought about creation some bijection between both sets. But I don't really know how to do that, what makes me feel it's not the good path. Maybe I have to use some propiety about distances.
To each $i=1,2,\ldots,n,$ let $\pi_i:\Bbb{A}\to\Bbb{A}$ be the permutation defined by $\pi_i(u_i)=v_i$, $\pi_i(v_i)=u_i$, and $\pi_i(a)=a$ for all $a\in\Bbb{A}\setminus\{u_i,v_i\}$. Then define $\phi:\Bbb{A}^n\to\Bbb{A}^n$ by the recipe $$ \phi:(x_1,x_2,\ldots,x_n)\mapsto (\pi_1(x_1),\pi_2(x_2),\ldots,\pi_n(x_n)). $$ Show that