# Equality simplification -- have I done it correctly?

I previously posted this equality and got some nice feedback. This is my final equality to prove Legendre's, Brocard's, Andrica's, and Oppermann's Conjectures. The first equality was to determine if there would be any surprises with this one: $$\left(\left(\frac{1}{2} (((k+1) \bmod 2)+k+1-2)\right)^2+\frac{1}{2} (((k+1) \bmod 2)+k+1-2) (2-((k+1) \bmod 2))\right) - \left(\left(\frac{1}{2} ((k \bmod 2)+k-2)\right)^2+\frac{1}{2} ((k \bmod 2)+k-2) (2-(k \bmod 2))\right) - ((k+1) \bmod 2) = \frac{1}{2} (((k+1) \bmod 2)+k+1-2),$$ which I was able to simplify to: $$(((k+1) \bmod 2)+2) ((k+1) \bmod 2)+4 (k \bmod 2)=(k \bmod 2)^2+3,$$ which Mathematica reduces to: $c_1\in \mathbb{Z}\land k=c_1,$ same as the previous equality. So, no surprises. I just need some eyes on this to double-check my results. Do you see any problems?
Edit Since $(k \bmod 2)^2$ is 0 or 1, we can remove the exponent without loss of information. Then we subtract from both sides to leave: $$(((k+1) \bmod 2)+2) ((k+1) \bmod 2)+3 (k \bmod 2)=3,$$ which reduces to: $c_1\in \mathbb{Z}\land k=c_1.$

That's a fascinating expression, $(k+1)\mod2$. It's 1 if k is even, or 0 if k is odd. And $k \mod 2$ is its mirror image, 1 if k is odd, or 0 if it's even.
Let $e=(k+1) \mod 2$ and $o=k \mod 2$. Then you can separate the equalities into two discrete cases, one where e=1 and o=0, and the other where e=0 and o=1. This easily verifies the simplified equality.
$$(e+2)(e) + 4o = o^2+3$$ $$(1+2)(1) + 4*0 = 0^2+3$$ $$3 = 3$$
$$(e+2)(e) + 4o = o^2+3$$ $$(0+2)(0) + 4*1 = 1^2+3$$ $$0 + 4 = 1 + 3$$ $$4 = 4$$