Modulo Multiplication is Well-Defined/Proof 1

Proof
We need to show that if:
 * $\left[\!\left[{x'}\right]\!\right]_m = \left[\!\left[{x}\right]\!\right]_m$

and:
 * $\left[\!\left[{y'}\right]\!\right]_m = \left[\!\left[{y}\right]\!\right]_m$

then:
 * $\left[\!\left[{x' y'}\right]\!\right]_m = \left[\!\left[{x y}\right]\!\right]_m$

We have that:
 * $\left[\!\left[{x'}\right]\!\right]_m = \left[\!\left[{x}\right]\!\right]_m$

and:
 * $\left[\!\left[{y'}\right]\!\right]_m = \left[\!\left[{y}\right]\!\right]_m$

It follows from the definition of residue class modulo $m$ that:
 * $x \equiv x' \pmod m$

and:
 * $y \equiv y' \pmod m$

By definition, we have:


 * $x \equiv x' \pmod m \implies \exists k_1 \in \Z: x = x' + k_1 m$
 * $y \equiv y' \pmod m \implies \exists k_2 \in \Z: y = y' + k_2 m$

which gives us:
 * $x y = \left({x' + k_1 m}\right) \left({y' + k_2 m}\right) = x' y' + \left({x' k_2 + y' k_1}\right) m + k_1 k_2 m^2$

Thus by definition:
 * $x y \equiv \left({x' y'}\right) \pmod m$

Therefore, by the definition of residue class modulo $m$:
 * $\left[\!\left[{x' y'}\right]\!\right]_m = \left[\!\left[{x y}\right]\!\right]_m$