I am trying to follow a set of lecture notes on group theory which define $\mathbb{Z}/n$ and addition mod $n$ as follows: $$ \mathbb{Z}/n = \{0, 1, \ldots, n-1\}, \qquad a \oplus b = \begin{cases} a + b & \text{ if $a + b \leq n-1$} \\ a + b - n & \text{ otherwise.} \end{cases} $$ I am trying to prove that this is a group. Closure and the existence of an identity and inverses is clear to me, but associativity of addition is the one thing I'm struggling with. One way is surely casework on whether each constituent sum is less than $n$, but I'm trying to see if there's a more intuitive way to do it.
One idea I had was as follows. The modulo $n$ function is well-defined. So every integer $(a+b) + c$ and $a + (b+c)$ has precisely one remainder upon division by $n$ which lives in $\mathbb{Z}/n$. Addition is associative in $\mathbb{Z}$, meaning that $(a+b) + c$ and $a + (b+c)$ have the same remainder mod $n$. So: \begin{align*} ((a+b)+c) \bmod n &= (a + (b+c)) \bmod n \\ (a+b) \bmod n+ c \bmod n &= a \mod n + (b+c) \bmod n \\ ((a+b) \bmod n \oplus c) &= (a \oplus (b+c) \bmod n) \\ (a \oplus b) \oplus c &= a \oplus (b \oplus c). \end{align*} How does this look?
solution-verificationquestion to be on topic you must specify precisely which step in the proof you question, and why so. This site is not meant to be used as a proof checking machine. – Bill Dubuque Oct 24 '24 at 18:31