Modulo Multiplication is Well-Defined/Proof 1

Proof
We need to show that if:
 * $\eqclass {x'} m = \eqclass x m$

and:
 * $\eqclass {y'} m = \eqclass y m$

then:
 * $\eqclass {x' y'} m = \eqclass {x y} m$

We have that:
 * $\eqclass {x'} m = \eqclass x m$

and:
 * $\eqclass {y'} m = \eqclass y 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 = \paren {x' + k_1 m} \paren {y' + k_2 m} = x' y' + \paren {x' k_2 + y' k_1} m + k_1 k_2 m^2$

Thus by definition:
 * $x y \equiv \paren {x' y'} \pmod m$

Therefore, by the definition of residue class modulo $m$:
 * $\eqclass {x' y'} m = \eqclass {x y} m$