Understanding the Eisenstein's lemma proof on Wikipedia. 
$1.$ Why is it that in the proof of Eisenstein's lemma (the addendum on wikipedia), $$(-1)^{(p-1)/2} \equiv (-1)^{\sum_{\ u} \lfloor qu/p\rfloor} \equiv (-1)^{\sum_{\ u} r(u)+u},$$ where $1\leq u\leq (p-1)/2$?


$2.$ Also, why does the lemma follow easily from Gauss' lemma?

I know that if $u$ is an integer, then $\lfloor qu/p\rfloor \equiv r(u) + u\mod 2$. The first question thus amounts to proving that $$\displaystyle\sum_{1\leq u\leq (p-1)/2}\left\lfloor\frac{qu}p\right\rfloor\equiv (p-1)/2 \mod 2.$$ Gauss' Lemma says that $$\left(\frac{q}p\right) = (-1)^{|qP\ \cap\ N|},$$ where $P$ is the set of residues modulo $p$ that are smaller than $(p+1)/2$ and $N$ is the set of residues that are at least $(p+1)/2$. So to show the lemma holds, it's enough to show $$|qP \cap N| \equiv \sum_u \lfloor qu/p\rfloor \mod 2,$$ where $u$ ranges over even positive residues modulo $p$.
 A: For question 1, the proof in Wikipedia is written quite clearly, in my opinion. But I will try to clarify it further.
Let $U$ be the set of even integers in the range $[1\ldots p-1]$. For each $u\in U$, let $a_u = r\left((-1)^{r(u)}r(u)\right)$.
Each $a_u$ can clearly be seen to be even by considering cases on the parity of $r(u)$.
Each $a_u$ is also clearly distinct, since if $a_t = a_u$ for $t,u\in U$, then we have $(-1)^{r(t)}qt \equiv (-1)^{r(u)}qu$, or dividing by $q$, $t \equiv \pm u$, or using the fact that $t$ and $u$ are even, $t \equiv u$.
Thus, the set of values $\{a_u\}_{u\in U}$ is a rearrangement of $U$. Multiplying together, we have:
$$\prod_{u\in U} a_u \equiv \prod_{u\in U} u.$$
The lemma follows simply by substituting $a_u \equiv (-1)^{r(u)}r(u)$, then substituting $r(u) \equiv qu$, and finally dividing by $\prod_{u\in U} u$.
As for question 2, I believe that the Wikipedia article has a typo. I think it means to say that the lemma follows easily from Euler's criterion, not from Gauss' lemma.
