Pythagorean triples and Fermat's last theorem for n = 4
import /Freeks/6.book
1 Preparation on coprime products
The product of natural numbers is a natural number (a small tool for the proofs below).
If coprime \(v, w\) have a product \(vw\) that is a square, then \(v\) is also a square (preparation for #23).
If a prime \(p\) divides \(k^2\), it divides \(k\) (Euclid's lemma).
If \(p \mid v\), \(p \nmid w\) and \(vw = k^2\), then we can write \(v = p^2 u\) and \(uw = j^2\). Since \(p \mid k\), \(k = pj\); put \(v = ps\), then \(sw = p j^2\). Because \(p \nmid w\), \(p \mid s\).