# Modulo Addition is Associative

## Theorem

$\forall \eqclass x m, \eqclass y m, \eqclass z m \in \Z_m: \paren {\eqclass x m +_m \eqclass y m} +_m \eqclass z m = \eqclass x m +_m \paren {\eqclass y m +_m \eqclass z m}$

where $\Z_m$ is the set of integers modulo $m$.

That is:

$\forall x, y, z \in \Z: \paren {x + y} + z \equiv x + \paren {y + z} \pmod m$

## Proof

 $\ds \paren {\eqclass x m +_m \eqclass y m} +_m \eqclass z m$ $=$ $\ds \eqclass {x + y} m +_m \eqclass z m$ Definition of Modulo Addition $\ds$ $=$ $\ds \eqclass {\paren {x + y} + z} m$ Definition of Modulo Addition $\ds$ $=$ $\ds \eqclass {x + \paren {y + z} } m$ Associative Law of Addition $\ds$ $=$ $\ds \eqclass x m +_m \eqclass {y + z} m$ Definition of Modulo Addition $\ds$ $=$ $\ds \eqclass x m +_m \paren {\eqclass y m +_m \eqclass z m}$ Definition of Modulo Addition

$\blacksquare$