I know it is somewhat trivial, but I am not sure what would be an acceptable way to submit the answer to this:
Let $a,b \in \mathbb{Z}$ .
Given the function $f: \mathbb{Z}\times\mathbb{Z}\rightarrow \mathbb{Z}$, defined as follows: $f(a,b) := |a·b|$; prove that $f$ is associative.
($·$ is the usual product and || is the operation absolute value, both defined in $\mathbb{Z}$)
If $a\ge 0$ and $b\ge 0$ then $ab\ge 0$, $|a|=a$, $|b|=b$. Since $a\cdot b\ge 0$, $|a\cdot b|=a\cdot b=|a|\cdot|b|$
If $a\lt 0$ and $b\lt 0$ then $ab\gt 0$, $|a|=-a$, $|b|=-b$. Since $a\cdot b\gt 0$, $|a\cdot b|=-a\cdot -b=|a|\cdot|b|$
If $a\ge 0$ and $b\lt 0$ then $ab\lt 0$, $|a|=a$, $|b|=-b$. Since $a\cdot b\lt 0$, $|a\cdot b|=a\cdot -b=|a|\cdot|b|$
Similar for $a\lt0$, $b\ge 0$