I'm asking for verification of the following proof:
We start with the following equality, working entirely in $\mathbb{Z}$:
$$a(m^2+n^2)=b(p^2+q^2)$$
With $x=m^2+n^2,y=p^2+q^2; a,b$ coprime and $x,y$ coprime.
Claim: Under these constraints, both $a$ and $b$ must be sums of two squares.
Proof: Temporarily assume the claim is false, and assume that $a$ is not the sum of two squares. Therefore $a$ has some non-squared prime factor of the form $4k-1$, so that the prime factorization of $ax$ looks like this:
$$ax=(4k_1+1)^{e_1}(4k_2+1)^{e_2}(4k_2+1)^{e_2}\cdots (4k_n-1)$$
There may be other factors of the form $4k_i-1$, but they are extraneous to the proof; further, we can represent any factor of the form $(4k_i-1)^{2n+1}$ as $(4m+1)^n(4k_i-1)$ and move the first portion to the first portion of the product (though it is no longer prime), leaving us with a bare $4k_n-1$.
Because $ax=by$, the prime factorization of $ax$ is the same as that of $by$. Assuming there are sufficient factors to rearrange, we can rearrange these factors into $b$ and $y$. Since $y=p^2+q^2$ is the sum of two squares, the factor $4k_n-1$ cannot be in the factorization of $y$, and must be in the factorization of $b$. But if this is the case, then $a$ and $b$ share a factor and are not coprime, contradicting the initial constraints. Therefore, our assumption was incorrect, and $a$ must be the sum of two squares. By symmetry, $b$ is also the sum of two squares. $\blacksquare$
Have I made any mistakes, major or minor?
solution-verification
question to be on topic you must specify precisely which step in the proof you question, and why so. This site is not meant to be a proof checking machine. – Bill Dubuque Mar 22 '23 at 02:29