Q: Prove the associativity of $(\Bbb Z_7,\oplus)$. I am reading  this Problem 14.4.1.
We want to prove that $(Z_7,\oplus)$ is group.
I have difficulty proving associativity axiom. The solution reads


*Associativity: Let $a\in\mathbb Z_7,$ $b\in\mathbb Z_7$ and $c\in\mathbb Z_7$. By Theorem 3.4.10 we only need to show $$(a+(b+c))\bmod 7 = ((a+b)+c)\bmod 7.$$ This holds since $a+(b+c)=(a+b)+c$ for all integers $a$, $b$, and $c$ by the associative property of the integers. Hence $\oplus$ is associative.

Theorem $3.4.10$ states that
$$\boxed{
\textbf{Therorem 3.4.10.} \text{ Let $a$ and $b$ be integers, and let $m$ be a natural number. Then}\\ (a+b)\bmod m=\big((a\bmod m)+(b\bmod m)\big)\bmod m
}$$
I am having hard time understanding why from above theorem follows that we only need to show that $(a+(b+c))\pmod{7} =((a+b)+c)\pmod{7}$?
Can you explain this part?
We need to show that $a\oplus (b \oplus c))$ = $(a \oplus b) \oplus c$
$a\oplus (b \oplus c))=a\oplus((b+c)\bmod 7) =(a+((b+c)\bmod7))\bmod7$

A: The point of the theorem 3.4.10 is that you can take the $\bmod$ additionally at any point in your calculation without changing the result. This should make it clear intuitively that the statement is true.
If you want to be very formal, you can continue your calculation \begin{align}a\oplus(b\oplus c)&=\big(a+(b+c)\bmod 7\big)\bmod 7\\
&\overset{(1)}=\Big(a\bmod 7+\big((b+c)\bmod7\big)\bmod 7\Big)\bmod7\\
&\overset{(2)}=\big(a\bmod7+(b+c)\bmod7\big)\bmod7\\
&\overset{(3)}=(a+(b+c))\bmod7,
\end{align}
which is exactly the claim the solution makes (after you do the same exact calculation for $(a\oplus b)\oplus c$). For (1) and (3), we used the theorem, for (2) notice that $\bmod 7$ is applied twice to $b+c$ in the second line, which is unnecessary.

A: If what you are looking for is an intuitive approach, you can appreciate if you imagined a clock with only 7 numbers; let those numbers be $0,\ldots ,6$. Adding 2 different hours $h_1,h_2$, no matter in which order, will always give you the same hour in the clock. This is what theorem 3.4.10 states.
Now, from a formal definition, associativity of an operation $*$ in a group is defined as $a*(b*c)=(a*b)*c$, and that is what "suffices" you to prove. However, if what you mean is that why does it also imply $a+(b+c)\mod 7 = a+b+c\mod 7$ comes from extending your theorem 3.4.10 to that particular case.
Hope it helps.
