1. Jun 4, 2012

### ajbiol

Hello all,

I was wondering if someone can explain to me a step in a proof given to me by my professor in regards to a modular operation theorem.

Addition theorem: Given three integers x, y, d (d > 0), (x+y)%d = (x%d + y%d) %d

Proof:
Let x = q(1)d + r(1) and y = q(2)d + r(2).
We have (x+y)%d = (q(1)d + r(1) + q(2)d + r(2)) %d
= (r(1) + r(2)) %d
Therefore: (x+y)%d = (x%d + y%d) %d

I dont get how my professor jumped from (q(1)d + r(1) + q(2)d + r(2))%d to (r(1) + r(2))%d.

Is there a specific reason for why we just ignore the product of q(1)d and q(2)d?

2. Jun 4, 2012

### Hurkyl

Staff Emeritus
The Big Idea is that d is zero modulo d, so q(1)d is zero because you're multiplying q(1) by zero.

As for the technical detail, doesn't the equality follow directly from the definition of x%d? If you don't think so, then please state what definition you are using, and apply that definition to the two sides of that equation.

3. Jun 4, 2012

### ajbiol

d has to be greater than zero in our given. so i dont believe q(1)d and q(2)d are negated because d is zero.

4. Jun 4, 2012

### Hurkyl

Staff Emeritus
d is zero modulo d.

5. Jun 4, 2012

### ajbiol

oh i get it! ty ty!