Proof of Euclidean division algorithm for the ring of Gaussian integers

356 Views Asked by At

I'm trying to prove this property from this Wikipedia page.

enter image description here

Let $\mathbb Z[i]$ denote the ring of Gaussian integers and $N(z) = z \overline{z}$ for $z \in \mathbb Z[i]$. For $p,q \in \mathbb Z[i]$ such that $N(q)>0$, there exist $s,r \in \mathbb Z[i]$ such that $p=sq+r$ and $N(r) \le N(q)/2$.


My below attempt contains heavy calculation which is very sensitive to errors, even small ones.

  1. Could you please have a check on it?

  2. Is there any cleaner way to obtain the result?


Let $a,b,c,d \in \mathbb Z$ such that $cd\neq0$. It suffices to show that there are $x,y \in \mathbb Z$ such that $N((a+bi)-(c+di)(x+yi)) \le N(c+di)/2$, or equivalently $N(a-cx+dy+(b-cy-dx)i) \le N(c+di)/2$. This inequality simplifies to $(a-cx+dy)^2 + (b-cy-dx)^2 \le (c^2+d^2)/2$.

First, let $e = a+dy$ and $f = b-cy$. Then the inequality becomes $(cx-e)^2 + (dx-f)^2 \le (c^2+d^2)/2$, or equivalently $$(c^2+d^2)x^2-2(ce+df)x+e^2+f^2-(c^2+d^2)/2 \le 0$$

Consider the map $F: x \mapsto (c^2+d^2)x^2-2(ce+df)x+e^2+f^2-(c^2+d^2)/2$. It suffices to show that the equation $F(x)=0$ has $2$ different solutions $x_1,x_2$ such that $|x_1-x_2| \ge 1$. This means $$\begin{cases} \Delta & > 0 \\ (x_1+x_2)^2-4x_1 x_2 &\ge 1\end{cases}$$ or equivalently $$\begin{cases} (ce+df)^2-(c^2+d^2)[e^2+f^2-(c^2+d^2)/2] \ge 0 & > 0 \\ \left( \frac{2(ce+df)}{c^2+d^2} \right )^2 -4 \frac{e^2+f^2-(c^2+d^2)/2}{c^2+d^2} &\ge 1\end{cases}$$ or equivalently $$\begin{cases} (ce+df)^2-(c^2+d^2)[e^2+f^2-(c^2+d^2)/2] & > 0 \\ (ce+df)^2-(c^2+d^2)[e^2+f^2-(c^2+d^2)/2] &\ge (c^2+d^2)/4\end{cases}$$

As such, it suffices to show that there is $y \in \mathbb Z$ such that $(ce+df)^2-(c^2+d^2)[e^2+f^2-(c^2+d^2)/2] \ge (c^2+d^2)/4$, or equivalently $(c^2+d^2)^2 \ge 4(cf-de)^2$. Substituting back $e = a+dy$ and $f = b-cy$, this inequality becomes $(c^2+d^2)^2 \ge 4[(c^2+d^2)y+ad-bc]^2$, which is equivalent to $$4(c^2+d^2)^2y^2+8(c^2+d^2)(ad-bc)y+4(ad-bc)^2-(c^2+d^2)^2\le 0$$

Let $k = c^2+d^2$ and $t=ad-bc$. The inequality becomes $4k^2y^2 +8kty+4t^2-k^2 \le 0$. Consider the map $H: y \mapsto 4k^2y^2 +8kty+4t^2-k^2$. It suffices to show that the equation $H(y)=0$ has $2$ different solutions $y_1,y_2$ such that $|y_1-y_2| \ge 1$.

This means $$\begin{cases} \Delta & > 0 \\ (y_1+y_2)^2-4y_1y_2 &\ge 1\end{cases}$$ or equivalently $$\begin{cases} (4kt)^2-4k^2(4t^2-k^2) & > 0 \\ \left (\frac{-8kt}{4k^2} \right)^2-4 \frac{4t^2-k^2}{4k^2} &\ge 1\end{cases}$$ or equivalently $$\begin{cases} 4k^4 & > 0 \\ \left (\frac{-8kt}{4k^2} \right)^2-4 \frac{4t^2-k^2}{4k^2} &\ge 1\end{cases}$$ or equivalently $k = c^2+d^2 \neq 0$. This completes the proof.