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$
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.