Mappings Between Residue Classes

Theorem
Let $$\left[\left[{a}\right]\right]_m$$ be the congruence class of $a$ (modulo $m$).

Let $$\phi: \mathbb{Z}_m \to \mathbb{Z}_n$$ be a mapping given by $$\phi \left({\left[\left[{x}\right]\right]_m}\right) = \left[\left[{x}\right]\right]_n$$.

Then $$\phi$$ is well defined when $$m \backslash n$$.

Proof
For $$\phi$$ to be well defined, we require that:

$$\forall x, y \in \mathbb{Z}_m: \left[\left[{x}\right]\right]_m = \left[\left[{y}\right]\right]_m \Longrightarrow \phi \left({\left[\left[{x}\right]\right]_m}\right) = \phi \left({\left[\left[{y}\right]\right]_m}\right)$$

Now $$\left[\left[{x}\right]\right]_m = \left[\left[{y}\right]\right]_m \Longrightarrow x - y \backslash m$$.

For $$\phi \left({\left[\left[{x}\right]\right]_m}\right) = \phi \left({\left[\left[{y}\right]\right]_m}\right)$$ we require that $$\left[\left[{x}\right]\right]_n = \left[\left[{y}\right]\right]_n \Longrightarrow x - y \backslash n$$.

Thus $$\phi$$ is well defined iff $$x - y \backslash m \Longrightarrow x - y \backslash n$$

That is, iff $$m \backslash n$$.