<s>[INST] $\left\lfloor \frac{a-b}{2} \right\rfloor + \left\lceil \frac{a+b}{2} \right\rceil = a$ when $a,b$ are integers? Let $a$ and $b$ be positive integers.
If $b$ is even, then we have $$\left\lfloor \frac{a-b}{2} \right\rfloor + \left\lceil \frac{a+b}{2} \right\rceil = a$$
I think the equality also hold when $b$ is odd. What could be a proof for it?
 [/INST] If $a$ and $b$ are both odd (or both even), then $a-b$ and $a+b$ are both even, and thus $$\left\lfloor \frac{a-b}{2} \right\rfloor = \frac{a-b}{2} \quad\text{and}\quad \left\lceil \frac{a+b}{2} \right\rceil = \frac{a+b}{2}.$$
Otherwise, if exactly one of $a$ and $b$ is odd, then $a-b$ and $a+b$ are both odd, and thus $$\left\lfloor \frac{a-b}{2} \right\rfloor = \frac{a-b}{2} - \frac12 \quad\text{and}\quad \left\lceil \frac{a+b}{2} \right\rceil = \frac{a+b}{2} + \frac12.$$
In either case, it's easy to check that your equation holds.

BTW, as noted by Gareth McCaughan, your equation in fact holds for all real numbers $b$, as long as $a$ is an integer.  One fairly simple way to show this is to note that $\frac{a+b}{2} = a - \frac{a-b}{2}.$  Thus, we can rewrite your equation as $$\left\lfloor \frac{a-b}{2} \right\rfloor + \left\lceil a - \frac{a-b}{2} \right\rceil = a.$$
Since $a$ is an integer (by assumption), and since $\lceil k + x \rceil = k + \lceil x \rceil$ for any integer $k$, we can extract $a$ from the ceiling term to get $$\left\lfloor \frac{a-b}{2} \right\rfloor + a + \left\lceil - \frac{a-b}{2} \right\rceil = a,$$ and finally, by applying the identity $\lceil -x \rceil = - \lfloor x \rfloor$, rewrite this as $$\left\lfloor \frac{a-b}{2} \right\rfloor + a - \left\lfloor \frac{a-b}{2} \right\rfloor = a.$$  Cancelling the floor terms then just leaves the identity $a = a$.
On the other hand, as also noted by Gareth, your equation cannot hold for any non-integer $a$, since its left-hand side is always an integer.
</s>