Trouble proving that this is a function? By naming an equivalence class in the domain that is assigned at least two different values prove that the following is a well defined function.

$$f : \Bbb Z_{3} \to \Bbb Z_{6} \;\;\;\text{ given by } f(\overline x) = \underline {\left[ 2x \right]  }$$
In this case we represent an element of the domain as an $\bar x$ and use the notation $[x]$ for equivalence classes in the co-domain.

$f(\overline0) =  [0] \;,$  $ \Bbb Z_{3}  \quad (3x+0)\;\; \overline 0 = \{ \ldots,-6,-3,0,3,6,\ldots \}, \; \Bbb Z_{6}\;  (6x+0)\; \overline0 =\{ \ldots, -12, -6,0,6,12,\ldots\}$ 
$f(\overline1) = [2], $ $\qquad   \; (3x+1) \; \;\;\;\overline   1 = \{ \ldots,-5,-2,1,4,7,\ldots \},\; \;  (6x+1)\;\overline1 =\{\ldots, -11, -5, 1, 7, 13, \ldots \}$
$f(\overline2) = [4], $ $\qquad  \qquad \qquad \;\overline 2 = \{ \ldots, -4, -3, 2,5,8, \ldots \},\;\;\overline 2 = \{ \ldots,-10,-4,2,8,14,\ldots \},\;$
$f(\overline3) = [6] ,$  $\qquad \qquad \qquad \qquad \qquad \qquad,\; \quad \quad \quad \; \; \; \;\overline 3 = \{ \ldots,-9,-3,3,9,15,\ldots \},$
$f(\overline4) =  [8],\qquad \qquad \qquad\qquad \qquad\qquad \; \quad \quad \quad \quad \; \;\overline 4 = \{ \ldots,-8,-2,4,10,16,\ldots \}, $ 
$f(\overline5) = [10], \qquad \qquad \qquad\qquad \qquad\qquad \; \quad \quad \quad \quad \;\;\overline 5 = \{ \ldots,-7,-1,5,11,17,\ldots \},  $
$f(\overline6) = [12] ,$

The set of equivalence classes for the relation $\cong_{m}$ is denoted $\Bbb Z_{m}$

The $ 3x+0 \text{ and } 6x+0$ are just showing how I got $\overline 0 $
So my question for this problem is why is this a function? Since $\Bbb Z_{3}, \; \overline 0 = \overline 3, \text{why is it that }  \;\Bbb Z_{6} \; \overline 0\neq 3$ is not correct. Essentially my question is how does the codmain [2x] change the answer.
 A: In $\mathbb{Z}_3$, $\overline{0}=\{0,3,6,9,\ldots\}$.  We have $f(\overline{0})=\{0,6,12,18,\ldots\}$, where we double each element of the set.  This new set is exactly $\overline{0}$ in $\mathbb{Z}_6$.
We have a choice of how we work in $\mathbb{Z}_n$.  We can think of single numbers, with a bar.  This is very familiar, but equality is not our usual sense of equality.  Another way is to think of infinite subsets of $\mathbb{Z}$.  Now our intuitive sense of equality is correct, but it's no longer convenient or familiar.
A: I guess you want to ask why $f(\bar{x})=[2x]$ is a function but $f(\bar{x})=[x]$ is not, right? So in $\mathbb{Z}_3$, $\bar{0}=\bar{3}$, they are the same thing, so their image under the map should also be the same thing. While under $f(\bar{x})=[x]$, [0] does not equal [3] in $\mathbb{Z}_6$, but under $f(\bar{x})=[2x]$, the image is [0] and [6], they are still the same, so this is a well-defined function.
A: $k \mod 3 \equiv 3n + k\\
f(\bar k) = 6n + 2k \equiv 2k \mod 6$
For every $k$ in the domain everything in the equivalence class of $k$ maps to the same equivalence class in the co-domain.
$f$ is a function.
