A proof about congruences got me wondering about the linearity property:

$\displaystyle a|b \wedge a|c \Rightarrow a|bm+cn$ for $\displaystyle m,n \in R$

Here's how it went:

If $\displaystyle a \equiv b$ (mod m) and $\displaystyle c \equiv d$ (mod m), then $\displaystyle a \pm c \equiv b \pm d$ (mod m)

By assumption $\displaystyle m|a-b$ and $\displaystyle m|c-d$.

By the linearity property, $\displaystyle m|(a-b)-(c-d)$. Re-arranging we get $\displaystyle m|(a+c)- (b+d)$

Can you just rearrange that easily??? Sure the total sum (a+c)-(b+d) stays the same, and it also does when you convert it back to mods.

$\displaystyle a+c \equiv b+d$ (mod m)

But what if I went and did

$\displaystyle m|8-5$ and $\displaystyle m|12-3$

Then $\displaystyle m|(8-5)-(12-3)$ so.... $\displaystyle m|12+(8+5-3) \Rightarrow 12 \equiv 10$ (mod m) ???

Which is not true.

I've rearranged it so that there are two terms, x = 12 and y = 8+5-3. That's what happened in the proof. But my version doesn't work.

What the associativity rules and restrictions on this arithmetic?