No matter how I look at it, the following derivation from "Concrete Mathematics" seems wrong:
Book text (The black box is irrelevant to my question)
After cancelling identical terms, the remaining claim is as follows, where $0\le\alpha',v'<1$ and $\alpha'$ is irrational: $$ \sum_{0 \le j < \lceil n\alpha\rceil} (\lceil j\alpha'-v'\rceil - \lceil j\alpha'\rceil) = -\sum_{0 \le j < \lceil n\alpha\rceil} (\lfloor j\alpha'\rfloor - \lfloor j\alpha'-v'\rfloor) + \{0 \text{ or } 1\} $$ And after moving the minus sign back into the sum: $$ \sum_{0 \le j < \lceil n\alpha\rceil} (\lceil j\alpha'-v'\rceil - \lceil j\alpha'\rceil) = \sum_{0 \le j < \lceil n\alpha\rceil} (\lfloor j\alpha'-v'\rfloor - \lfloor j\alpha'\rfloor) + \{0 \text{ or } 1\} $$
My issue is with the sign of $\{0 \text{ or } 1\}$. I'd expect it to be minus, not plus.
As the book says, $j\alpha'$ can't be an integer, and $j\alpha'-v'$ is an integer at most once. So instead of $\lceil j\alpha'-v'\rceil - \lceil j\alpha'\rceil$ we can write $\lfloor j\alpha'-v'\rfloor + 1 - \lfloor j\alpha'\rfloor - 1$ and the ones cancel out, except for the case where $j\alpha'-v'$ is an integer, in which case we get $\lfloor j\alpha'-v'\rfloor - \lfloor j\alpha'\rfloor - 1$. So when summing all these up, we might have to subtract a $1$, and therefore we obtain $-\{0 \text{ or } 1\}$.
Can you help me understand if it's me or the book that's wrong?
Actually, a simple counter example proves that the book is wrong here. Take $\lceil n\alpha \rceil=2$ and $\alpha'=v'=\sqrt2-1$ and we get: $$-\lceil\sqrt2 - 1\rceil = -\lfloor\sqrt2 - 1\rfloor + \{0 \text{ or } 1\}$$ $$-1 = \{0 \text{ or } 1\}$$
So yes, it should be $-\{0 \text{ or } 1\}$.