Modulo Addition is Well-Defined/Proof 1

Theorem
Let $z \in \R$.

Let $\R_z$ be the set of all residue classes modulo $z$ of $\R$.

The modulo addition operation on $\R_z$, defined by the rule:
 * $\left[\!\left[{a}\right]\!\right]_z +_z \left[\!\left[{b}\right]\!\right]_z = \left[\!\left[{a + b}\right]\!\right]_z$

is a well-defined operation.

Proof
We need to show that if:


 * $\left[\!\left[{x'}\right]\!\right]_z = \left[\!\left[{x}\right]\!\right]_z$
 * $\left[\!\left[{y'}\right]\!\right]_z = \left[\!\left[{y}\right]\!\right]_z$

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

Since $\left[\!\left[{x'}\right]\!\right]_z = \left[\!\left[{x}\right]\!\right]_z$ and $\left[\!\left[{y'}\right]\!\right]_z = \left[\!\left[{y}\right]\!\right]_z$, it follows from the definition of residue class modulo $z$ that:
 * $x \equiv x' \pmod z$ and $y \equiv y' \pmod z$

By definition, we have:


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

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

As $k_1 + k_2$ is an integer, it follows that, by definition:
 * $x + y \equiv \left({x' + y'}\right) \pmod z$

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