4

Let $N$ be odd and $N = a^2 + b^2 = c^2 + d^2$, where $a, b, c, d \in \mathbb{N}$ and WLOG let $a, c$ be odd, $b, d$ be even, $a > c$, and $b < d$. Prove that $\frac{a-c}{k}=\frac{d+b}{n}$.

I first began the proof my showing that $k$ and $n$ are positive integers.

Let $k= \gcd(a -c, d-b)$ and $n= \gcd(a + c, d + b)$. If $a$ and $c$ are both odd, then $a\pm c$ is even. Similarly, if $d$ and $b$ are both even, then $b\pm d$ is also even. Thus, $k$ and $n$ are also both even.

Now I wish to show that $\frac{a-c}{k}=\frac{d+b}{n}$.

I first tried to use the fact that $N = a^2 + b^2 = c^2 + d^2$. $$ \begin{align*} a^2 + b^2 &= c^2 + d^2\\ a^2 -c^2 &= d^2-b^2\\ (a+c)(a-c)&=(d+b)(d-b)\\ \end{align*} $$

This seems like I'm getting close but I can't quite see how to finish it. Any hints are appreciated.

Bill Dubuque
  • 285,713

3 Answers3

9

This follows by the basic fact that possible denominators for a fraction are closed under gcd, i.e. if a fraction $\:\!q\:\!$ is writable with denom's $\,b\,$ and $\,b'\:\!$ then it's also writable with denom $\:\!\gcd(b,b').\, $ It is a $\:\!1\:\!$ line $\rm\color{#90f}{Proof}$ from your $\:\!\color{#0af}{\rm E}\:\!$ equality, via $\:\!\rm\color{#0a0}{DL}$ = gcd Distributive Law $\,x(y,z)\! =\! (xy,xz),\,$ i.e.

$\!\begin{align} {\bf Your\ case}\!:\,\ \ 0< q = \rm\small \color{c00}{\frac{a\!-\!c}{d\!+\!b}} &\overset{\color{#0af}{\rm\small E}}={\rm {\small \dfrac{d\!-\!b}{a\!+\!c}}} \Rightarrow\ q \rm = {\small \dfrac{(a\!-\!c,d\!-\!b)}{(d\!+\!b,a\!+\!c)} = \frac{k}n}, \ \ \text{follows by}\\[.5em] {\bf Lemma}\!:\quad\ \ 0\,<\, q\ =\ \color{#c00}{\dfrac{a}{b}}\,\ &=\,\ \color{#c00}{\dfrac{a'}{b'}}\ \ \ \Rightarrow\,\ \ \ q\ =\ \dfrac{(a,a')}{(b,b')}, \ \ \begin{array}{}(x,y) :=\gcd(x,y)\\ \:\!{\rm wlog}\,\ \color{c00}{a,b} > 0\end{array}\\ \color{#90f}{\bf Proof}\!:\:\!\ \color{darkorange}{a}(b,b') \overset{\rm\color{#0a0}{\small DL_{\phantom{'}\!}}}=\:\! (\!\!\overbrace{a b, \color{#c00}{ab'}}^{\textstyle (ba,\color{#c00}{ba'})}\!\!) & \overset{\rm\color{#0a0}{\small DL_{\phantom{'}\!}}}=\:\! \color{darkorange}{b}\:\!(a,a')\,\Rightarrow\, {\dfrac{\color{darkorange}a}{\color{darkorange}b}}=\dfrac{(a,a')}{(b,b')}\\[.4em] {\bf Example}\!:\qquad\ \ \ q \,=\, \dfrac{133}{247} &= \dfrac{119}{221} \,\Rightarrow\, q = \dfrac{(133,119)}{(247,221)} = \dfrac{7}{13}\\ \end{align}\qquad$


Remark $ $ It's instructive to give a few more proofs. First, by $\:\!\color{#0af}{\rm U}$ = gcd Universal property we've

$(1)\ $ Recall that a fraction $\:\!q\:\!$ can be written with denominator $\:\!b\:\!$ iff its least denominator $\,d\mid b.\,$ Hence $\:\!b,b'\:\!$ are denoms for $\:\!q\:\!$ $\!\iff\! d\mid b,b'\!\!\!\!\overset{\color{#0af}{\rm U}\!\!}\iff\! d\mid (b,b')\!\iff\! (b,b')\,$ is a denom for $\:\!q$.

$(2)\ $ Bezout $\Rightarrow (b,b')\!=\!j\:\!b\! +\! j'\:\!b',\,$ so $\, \begin{align} \color{#c00}{b\ q} &= \color{#c00}a\\ \color{#0a0}{b'q} &= \color{#0a0}{a'}\end{align}\!\Rightarrow\:\! (b,b')q = j\:\!\color{#c00}{bq}+j'\:\!\color{#0a0}{b'q} = j\:\!\color{#c00}a\!+\!j'\color{#0a0}{a'}\!\in\Bbb Z,\,$ which effectively boils down to transforming our above initial proof of the Lemma by replacing use of $\:\!\rm\color{#0a0}{DL}$ = gcd Distributivity by its Bezout-based proof (which fails in non-Bezout UFDs like $\Bbb Z[x], \Bbb Q[x,y]$).

$(3)\ $ The Lemma can be also interpreted in terms of a natrual extension of gcd to rationals..

Though - as usual - we can also give a proof of the Lemma using prime factorizations, the above proof has the advantage that it generalizes more widely since it requires much less - only a distributive law. Namely, if we eliminate use of fractions then the Lemma boils down to

$$\begin{align} \color{#c00}{b'a} &\,=\, \color{#0a0}{a'b}\\[.2em] \Rightarrow\ \ (b,\color{#c00}{b'})\color{#c00}a &\,=\, (a,\color{#0a0}{a'})\color{#0a0}b\end{align}\qquad\qquad$$

This inference also works for many other algebraic systems enjoying distributivity, e.g. we can read $\:\!(x,y)\:\!$ as an ideal instead of a gcd and it remains true. More simply, we can read $\:\!(x,y)\:\!$ as $\,x+y\,$ and then the proof shows that the mediant has the same value as two equal fractions, i.e.

$$q\, =\, \color{c00}{\dfrac{a}{b}\ =\ \dfrac{a'}{b'}}\ \Rightarrow\ q = \dfrac{a+a'}{b+b'}\ \left[=\dfrac{j\:\!a+k\:\!a'}{j\:\!b+k\:\!b'}\right]\qquad\quad\ \ \ $$

[and works similarly for the (multi-)linear form $\,(x,y):= j\:\!x\!+\!k\:\!y,\,$ used e.g. here to prove uniqueness of prime factorizations, by a (subtractive) denom descent proof of Euclid's Lemma].

Such Euclidean descent on equivalent fractions often proves handy, e.g. we can use it to efficiently do the extended Euclidean algorithm in (modular) fraction form, e.g. see here and here.

As explained here, we can also view the Lemma in order language, since the least denom of a fraction is its order in $\,\Bbb Q/\Bbb Z.\,$ Then said denominator descent is: $ $ if $\,m,n\,$ are denom's of $\,q\,$ then so too is their gcd $\:\!(n,m),\,$ i.e.

$${\rm if}\ \ \overbrace{\color{#0a0}{mq, nq\equiv 0}\in\Bbb Q/\Bbb Z}^{\textstyle mq,nq\in\Bbb Z}\ \ {\rm then}\ \ \overbrace{\color{#c00}{(m,n)q\equiv 0}\in\Bbb Q/\Bbb Z}^{\textstyle(m,n)q\in\Bbb Z},\ \ {\rm by}\! \overbrace{{\rm ord}\,q}^{\text{least denom}}\!\!\!\!\mid m,n\,\overset{\color{#0af}{\!\rm U}}\Rightarrow\, {{\rm ord}\,q}\mid (m,n)$$

which is simply an additive form of the following well-known theorem written in period language: if $\,m,n\,$ are periods of $\,q\,$ then so too is their gcd $\,(m,n),\,$ i.e. $$\ {\rm if}\ \ \ \color{#0a0}{q^m,q^n\! = 1}\ \ \ \ {\rm then}\ \ \ \ \color{#c00}{q^{(m,n)}=1},\ \ {\rm by} \underbrace{{\rm ord}\,q}_{\text{least period}}\!\!\!\!\mid m,n\,\overset{\color{#0af}{\!\rm U}}\Rightarrow\,{\rm ord}\,q\mid (m,n)\quad$$

These ideas are abstracted when studying pertinent algebraic structures: $ $ ideals and modules - in particular order ideals and denominator ideals, or annihilator ideals (in PIDs).

Bill Dubuque
  • 285,713
2

We have that

$$k = \gcd(a - c, d - b) \; \; \to \; \; a - c = ke, \; d - b = kf, \; \gcd(e, f) = 1 \tag{1}\label{eq1A}$$

$$n = \gcd(a + c, d + b) \; \; \to \; \; a + c = ng, \; d + b = nh, \; \gcd(g, h) = 1 \tag{2}\label{eq2A}$$

Using \eqref{eq1A} and \eqref{eq2A} with your factorization gives

$$\begin{equation}\begin{aligned} (a + c)(a - c) & = (d + b)(d - b) \\ (ng)(ke) & = (nh)(kf) \\ ge & = hf \end{aligned}\end{equation}\tag{3}\label{eq3A}$$

With \eqref{eq1A} giving $\gcd(e,f) = 1$, then \eqref{eq3A} shows that

$$f \mid g \; \; \to \; \; g = sf, \; s \ge 1 \tag{4}\label{eq4A}$$

Similarly, since $\gcd(g,h) = 1$ from \eqref{eq2A}, then

$$h \mid e \; \to \; e = th, \; t \ge 1 \tag{5}\label{eq5A}$$

Thus, \eqref{eq3A} becomes

$$(sf)(th) = hf \; \; \to \; \; st = 1 \; \; \to \; \; s = t = 1 \tag{6}\label{eq6A}$$

Therefore, using \eqref{eq1A}, \eqref{eq2A}, \eqref{eq5A} and \eqref{eq6A}, we have that

$$e = h \; \; \to \; \; \frac{a - c}{k} = \frac{d + b}{n} \tag{7}\label{eq7A}$$

Pedro
  • 125,989
John Omielan
  • 53,529
2

It seems to me that those sums and differences are there to muddy the waters.

Let's write $A=a+c$, $C=A-c$, $D=d+b$ and $B=d-b$. As you observed, the given equation $a^2+b^2=c^2+d^2$ is equivalent to $$AC=DB.\qquad(*)$$ And the claim is that $(*)$ implies $$\frac C{\gcd(B,C)}=\frac{D}{\gcd(A,D)}.\qquad(\dagger)$$

It is simple to do this one prime factor at a time. So let $p$ be a prime number, and assume that in the prime factorizations we have $p^n$ appearing in $A$, $p^m$ appearing in $C$, $p^r$ in $D$ and $p^s$ in $B$. By uniqueness of factorization $(*)$ implies that $$n+m=r+s.\qquad(**)$$ The claim $(\dagger)$ is then translated to $$ m-\min\{m,s\}=r-\min\{r,n\}.\qquad(\dagger\dagger) $$ This is now easy to see. From $(**)$ it follows that $m-s=r-n$. Hence $\min\{m,s\}=s$ if and only if $\min\{r,n\}=m$ in which case the claim is exactly $m-s=r-n$. In the complementary case $\min\{m,s\}=m$ and $\min\{r,n\}=r$ the claim $(\dagger\dagger)$ reads $0=0$.

Jyrki Lahtonen
  • 142,653
  • The endgame reflects the analogy between the $\gcd$, $\mathrm{lcm}$ and $\min$, $\max$. The product of the former pair being equal to the actual product, and the sum of the latter pair being equal to the actual sum. – Jyrki Lahtonen Apr 26 '22 at 05:32
  • There were a number of obvious typos. Hopefully fixed now. – Jyrki Lahtonen Apr 26 '22 at 11:43
  • In reply to your prior comment, I reorganized and expanded my answer to explain some advantages of using distributivity, e.g. it yields a proof that also works for ideals, which can't be done as above. – Bill Dubuque Apr 26 '22 at 18:39