Product Distributes over Modulo Operation

Theorem
Let $x, y, z \in \R$ be real numbers.

Let $x \bmod y$ denote the modulo operation.

Then:
 * $z \paren {x \bmod y} = \paren {z x} \bmod \paren {z y}$

Proof
By definition of modulo operation:


 * $x \bmod y := \begin {cases}

x - y \floor {\dfrac x y} & : y \ne 0 \\ x & : y = 0 \end {cases}$

If $y = 0$ we have that:
 * $z \paren {x \bmod 0} = z x = \paren {z x} \bmod \paren {z 0}$

If $y \ne 0$ we have that: