Def/Equivalence of binary quadratic forms

 =Properties= Suppose that $Q_1$ and $Q_2$ are two integer-valued binary quadratic forms. If $Q_1$ is Diophantinely equivalent to $Q_2$, then the following statements are true:
 * The discriminant of $Q_1$ equals the discriminant of $Q_2$.
 * If $n \in \ZZ$, and there exists $x_1,y_1 \in \ZZ$ such that $Q_1(x_1,y_1) = n$, then there exists $x_2, y_2 \in \ZZ$, such that $Q_2(x_2, y_2) = n$.

=Change of basis= An equivalent definition of Diophantine equivalence is the following. Two integer-valued binary quadratic forms $Q_1$ and $Q_2$ are Diophantinely equivalent, if and only if there exist integers $a,b,c,d$, such that:
 * $ad - bc = \pm 1$.
 * For all $x,y \in \ZZ$, $Q_1(x,y) = Q_2(ax + by, cx + dy)$.