Integral basis for coprime biquadratic radicands congruent to three and two (source code)

= Integral basis for coprime biquadratic radicands congruent to three and two
{title2=$1,\sqrt m,\sqrt n,(\sqrt n+\sqrt m\sqrt n)/2$}

Let $m,n$ be coprime <square-free integers>, $m\equiv3\pmod4$ and $n\equiv2\pmod4$. For the <biquadratic extension> $L=\mathbb Q(\alpha,\beta)$, with $\alpha^2=m$ and $\beta^2=n$, an <integral basis> is $1,\alpha,\beta,(\beta+\alpha\beta)/2$. To prove spanning, write an <algebraic integer> as $(a+b\alpha+c\beta+d\alpha\beta)/2$. The <field traces> to the three quadratic subfields and the <ring of integers of a quadratic field> formula force $a,b,c,d\in\mathbb Z$. The <field norm> to $\mathbb Q(\alpha)$ has coefficients $(a^2+mb^2-nc^2-mnd^2)/4$ and $(ab-ncd)/2$. Their integrality gives $ab\equiv0\pmod2$ and $a^2-b^2-2(c^2+d^2)\equiv0\pmod4$. Thus $a,b$ are even and $c\equiv d\pmod2$, exactly the asserted integer span. Conversely, the half-sum $w$ has $w^2=n(1+m)/4+(n/2)\alpha\in\mathbb Z[\alpha]$, so <integral dependence is transitive> proves it is an <algebraic integer>. Rational <linear independence> is immediate from its nonzero $\alpha\beta$ coefficient.