A difficulty in understanding a proof of well definedness of an action The proof that an action is well defined is given in the following picture:
 
But I did not understand it because I know that to prove that an action is well defined I have to show that:
$$ \bar{k_{1}} = \bar{k_{2}} \Rightarrow \bar{k_{1}}.a = \bar{k_{1}}.a \Rightarrow k_{1}a = k_{2}a $$
So how is this applied in the proof given in the picture, could anyone explain this for me?
Thanks!  
 A: Well-defined in this context means "independent of representative".
If you write $\overline{k}$ for a member of $\mathbb{Z}_n$ you have to realise that $k$ is not unique, but if we take $k+n$ then (in $\mathbb{Z}_n$) $\overline{k+n} = \overline{k}$, as two numbers that are a multiple of $n$ apart are equivalent modulo $n$. To get an operation like scalar multiplication we need a function from $\mathbb{Z}_n \times A \to A$, so if we can write the same element of $\mathbb{Z}_n$ in two ways that give the same element, we need to check that the image is still the same regardless. As the formula is now defined it explicitly depends on the representative of a class.
So if we define $\overline{k}a = ka$ for $a \in A$ we need to check that $ka$ and $(k+n)a$ become the same element of $A$. In this case we get that this holds as $(k+n)a = ka + na = ka$ as $na=0$, so multiplying by multiples of $n$ just creates $0$.. This is what is done in the second paragraph of the proof.
A: The way that you have framed the proof that a function is well-defined is not the only way to do so.  This proof is also a bit confusing in that the author uses $\bar k$ to represent a specific element of $\mathbf Z$ rather than the associated equivalence class.  Perhaps you will find this proof more accessible if we frame it in your terms:
Suppose that $k_1,k_2$ are such that $\bar k_1 = \bar k_2$ (i.e. they are in the same equivalence class in $\mathbf Z_n$).  As such, both numbers have the same remainder $r$ when divided by $n$.  That is, we can write
$$
k_1 = nm_1 + r\\
k_2 = nm_2 + r
$$
for some fixed $r$ with $0 \leq r < n$ (this $r$ plays the role of what the author calls $\bar k$).
We now have
$$
k_1a = (nm_1 + r)a = m_1(na) + ra = ra\\
k_2a = (nm_2 + r)a = m_2(na) + ra = ra
$$
So, we have deduced that if $\bar k_1 = \bar k_2$, then $k_1 a = k_2 a$, as desired.

If we want to get a bit closer to the author's idea in this proof, note that we can define the function by $k a = r_ka$, where $k = nm_k + r_k$ for some $0 \leq r_k < n$.  Noting that each equivalence class has a canonical representative $0 \leq r < n$, we can say that our proof above was equivalent to showing that for every $r$: $\bar k = \bar r$ implies that $r = r_k$, which implies that $ka = ra$.
A: You are right, and this is what they prove they show that
$$ka = (nm_k + \overline k)a = m_k(na)+\overline k a = \overline k a$$Hence,
In particular, this means that if $k_1,k_2\in\mathbb{Z}$ are such that $\overline k_1 = \overline k_2$ then $k_1a=k_2a$.
Why? Let $l=\overline k_1 = \overline k_2$ then
write $k_1 = n m_1 + l$ and $k_2 = nm_2+l$ and apply the same computation we have 
$$k_1a = (nm_1+l)a =m_1 (na) + la = la$$
$$k_2 a = (nm_2+l)a = m_2(na) + la = la$$
