Well-defined function Prove or disprove that the following functions are well-defined for all $m \geq 2$:
$$
f : \mathbb Z_m \rightarrow \mathbb Z_m, \overline x \mapsto \overline{x^2}
$$
$$
g : \mathbb Z_m \rightarrow \mathbb Z_m, \overline x \mapsto \overline{2^x}
$$
$$
h : \mathbb Z_m \rightarrow \mathbb Z_d, \overline x \mapsto \overline{x} \quad d|m\quad (\text{i.e. } x\bmod m \mapsto x\bmod d)
$$
I know $\overline{x} = x+m \cdot \mathbb{Z} = \{x + k \cdot m \mid k \in \mathbb{Z} \}$. I'm not sure what well-defined means in this context.
From wikipedia article, I should check whether the definition of $f$, $g$ and $h$ assign a unique interpretation or value.
 A: It took me a long time to understand how to think about these sorts of questions. The trick is to reinterpret it in terms of a "preservation conjecture." This is most easily explained with an example. To say that "$g$ is well-defined" is just to say that the following is valid:

Conjecture. For all $x,x' \in \mathbb{Z}$, if $$x \equiv x'\mod m,$$ then $$2^x \equiv 2^{x'}\mod m.$$

Can you see why this is false for $m=2$? Observe that $0 \equiv 2 \mod 2.$ So if the above conjecture were true, we'd have $2^0 \equiv 2^2 \mod 2$. So we'd have $1 \equiv 4 \mod 2$. Or in other words, $1 \equiv 0 \mod 2$. Obviously, this isn't the case. So as a shorthand way of saying that the above conjecture is fallacious, we say "$g$ isn't well-defined."
A: Here is an example of a "function" which is not well-defined :
$$f : \Bbb Q \to \Bbb Q \quad;\quad \frac{n}{m} \mapsto n$$
Indeed : $2=2/1=4/2$ should imply $f(2)=f(2/1)=2=f(4/2)=4$ which is obviously wrong.
A function $g : X \to Y$ is well-defined if $a=b \implies g(a)=g(b)$ for all $a,b \in X$. This is not the case of $f$, as I have shown by choosing $a=2=2/1$ and $b=4/2=2$.

Then you have to check the following :


*

*If $\bar x = \bar y$, does $f(\bar x)=f(\bar y)$ ? That is : if $x-y$ is a multiple of $m$, is it true that $x^2-y^2$ is a multiple of $m$ ?

*Similarly, if $\bar x = \bar y$ (i.e. $x-y$ is a multiple of $m$), does it follow that $g(\bar x)=g(\bar y)$ (i.e. $2^x-2^y$ is a multiple of $m$) ?

*Finally, if $\bar x = \bar y$ (i.e. $x-y$ is a multiple of $m$), is it true that $h(\bar x)=h(\bar y)$ (i.e. $x-y$ is a multiple of $d$) ?

