I am wondering why the following is well-defined...
The definition of well-defined is given as; $g:(X/\sim) \to Z$ is well-defined if a mapping $f:X \to Z$ can be found where $f$ has the property $x \sim y \implies f(x)=f(y)$
So, I am asked if the following is well-defined; $E(x) \to e^{2i \pi x}$
I thought No. Because, actually, the mapping didn't really make sense to me. Say $x_1,x_2 \in E(x)$ then, $x_1-x_2=z \in \mathbb{Z}$. Now, $E(x_1)=e^{2i \pi (z+x_2)}=e^{2i \pi z}e^{2i \pi x_2}$ and $E(x_2)=e^{2i \pi x_2}$. Thus $E(x_1) \neq E(x_2)$ unless $x_1 = x_2$ so at least, $x_1 \sim x_2$ does not imply $E(x_1) = E(x_2)$. Which is strange, since both $x_1,x_2$ are related and so in the same equivalence class, but the mapping from the said class does not go to the same element in the image.
And how am I supposed to find "mapping $f:X \to Z$ where $f$ has the property $x \sim y \implies f(x)=f(y)$"? I can't randomly try out every possible mapping a person can think of from $X$ to $Z$ of course, but I mean the definition just says "mapping" which is very very broad. Say, even if I construct a mapping $f:X \to e^{2i \pi x}$ such that $f(x_1) = e^{2i \pi x_1}$, for $f(x_1)=f(x_2)$ to happen, I definitely need $x_1=x_2$ for reals...
But the answer apparently says that they are well-defined, and, by definition, I have no idea why.
Am I misunderstanding the definition of well-defined? I really don't see why this mapping is so at all...
Normally well-defined means that if you have choices to make during the evaluation of some function or quantity, it doesn't matter what choices you make you'll end up with the same result. When dealing with equivalence classes this means you have to get the same function value for whatever representative you choose from the equivalence class.
For what you're doing, I believe this should be interpreted as: If $x\sim y\implies f(x)=f(y)$, you have to show that the implication holds for all pairs of elements in the equivalence class. That way, the function can be interpreted as acting on the entire class, rather than just members of the class.
Your example $E(x)$ works, because if $x\sim y$, then $x-y\in\mathbb{Z}$. So, $x=y+n$. Then
$$E(x)=e^{2\pi ix}=e^{2\pi i(y+n)}=e^{2\pi iy}e^{2\pi in} = e^{2\pi iy}=E(y)$$
This works because $e^{2\pi in}=1$ for any integer $n$.
So we just showed that $x\sim y\implies E(x)=E(y)$. Because $x$ and $y$ were arbitrary members of the equivalence class, this is well-defined.