Is the following a valid proof for showing that addition modulo $2\ +_2$ is associative on $\mathbb{Z}_{2} = \left\{0, 1\right\}$? Here, $\left(\star\right)$ refers to the fact that I have made use of the property of associativity of $+$ on $\mathbb{Z}$. $$ \begin{align} \left(a+_2 b\right) +_2 c &= \left(\left(a+b\right)\operatorname{mod}\left(2\right) + c\right)\operatorname{mod}(2) \\ &= \left(a+b\right)\operatorname{mod}\left(2\right)\operatorname{mod}\left(2\right)+c\operatorname{mod}\left(2\right) \\ &=\left(a+b\right)\operatorname{mod}\left(2\right)+c\operatorname{mod}\left(2\right) \\ &= \left(\left(a+b\right)+c\right)\operatorname{mod}\left(2\right) \\ &\stackrel{\left(\star\right)\label{s}}= \left(a+\left(b+c\right)\right)\operatorname{mod}\left(2\right) \\ &= a +_2 \left(b +_2 c\right) \end{align} $$
Asked
Active
Viewed 32 times
0
-
This is unclear. $\mathbb{Z}_2$ has two elements and you can check associativity in just a few cases if that's what you are asking. If you are asking something about arithmetic in the integers, you have to start with your definition of $+_2$ when the things you are adding are integers. (Do not try to clarify in comments. [edit] the question. – Ethan Bolker Jan 18 '23 at 22:37
-
After the first line, "$((a+b)\bmod(2) + c)\bmod (2)$" is not always equal to "$(a+b)\bmod (2) \bmod (2) + c\bmod (2)$", even for $a,b,c\in\mathbb Z_2$. For counter example, $a+b=1$ and $c=1$. – peterwhy Jan 18 '23 at 22:51