Dipper Operation is Associative

Theorem
Let $m, n \in \Z$ be integers such that $m \ge 0, n > 0$.

Let $\N_{< \paren {m \mathop + n} }$ denote the initial segment of the natural numbers:
 * $\N_{< \paren {m \mathop + n} } := \set {0, 1, \ldots, m + n - 1}$

The dipper operation on $\N_{< \paren {m \mathop + n} }$ is associative.

Proof
Recall the definition of the dipper operation on $\N_{< \paren {m \mathop + n} }$ defined as:
 * $\forall a, b \in \Z_{>0}: a +_{m, n} b = \begin{cases}

a + b & : a + b < m \\ a + b - k n & : a + b \ge m \end{cases}$

where $k$ is the largest integer satisfying:
 * $m + k n \le a + b$

Let $a, b, c \in \N_{< \paren {m \mathop + n} }$ be arbitrary.

There are a number of cases to address.

By Dipper Operation is Commutative it is possible to arrange $a$, $b$ and $c$ into any order, and the result of $\paren {a +_{m, n} b} +_{m, n} c$ and $a +_{m, n} \paren {b +_{m, n} c}$ will be unaffected.

, therefore, it is sufficient to consider the scenario where $a \le b \le c$.


 * Case 1: Let $a + b + c < m$.

Then:

Otherwise $a + b + c \ge m$.


 * Case 2: Let $a + b < m$ and $b + c < m$.

Then:


 * Case 3: Let $a + b < m$ and $b + c \ge m$.

Then:

and:


 * Case 4: Let $a + b \ge m$ and $b + c \ge m$.

Then:

and:

So in all cases:
 * $\paren {a +_{m, n} b} +_{m, n} c = a +_{m, n} \paren {b +_{m, n} c}$

and the result follows by definition of associative operation.

Also see

 * Dipper Operation is Commutative