# A primitive Pythagorean triple

I was reading a proof of the case $n=4$ of Fermat's last theorem. The first step was to let $(x,y,w)$ be a solution to $x^4+y^4=w^2$ in positive integers with minimal $w$. Then the proof said that $(x^2,y^2,w)$ will be a primitive Pythagorean triple. But I do not know why this must be true? Please help me understand this.

As $(x^2)^2+(y^2)^2=z^2$ then $(x^2,y^2,z)$ is a Pythagorean triple.
If $(x^2,y^2,z)$ is not primitive, then $\gcd(x^2,y^2)>1$. But as $x^2$ and $y^2$ are squares, so is their gcd: $\gcd(x^2,y^2)=g^2$ with $g>1$ and then $g^2\mid z$. Then $$(x/g)^4+(y/g)^4=(z/g^2)^2$$ contradicting the minimality of $z$.