Proper equivalence of binary quadratic forms (source code)

= Proper equivalence of binary quadratic forms

Integral forms $f$ and $g$ are properly equivalent when
$$
g(x,y)=f(\alpha x+\beta y,\gamma x+\delta y)
$$
for some $\left(\begin{smallmatrix}\alpha&\beta\\\gamma&\delta\end{smallmatrix}\right)\in\operatorname{SL}_2(\mathbb Z)$. Proper equivalence preserves both represented integers and orientation.