[proofplan]
The equivalence has two directions. The backward direction ($f \sim g$ with $g = (n, b, c) \Rightarrow f$ properly represents $n$) is immediate: $g(1, 0) = n$ and $\gcd(1, 0) = 1$, so $g$ properly represents $n$, and proper representation is preserved under equivalence. The forward direction is the substantive content: given a proper representation $f(\gamma, \delta) = n$ with $\gcd(\gamma, \delta) = 1$, we must exhibit an equivalent form with leading coefficient $n$. The strategy is to extend the column $(\gamma, \delta)^\top$ to a unimodular matrix. Since $\gcd(\gamma, \delta) = 1$, [Bezout](/theorems/???) produces integers $\alpha, \beta$ with $\alpha\delta - \beta\gamma = 1$, so the matrix $T$ with first column $(\gamma, \delta)^\top$ and second column $(\alpha, \beta)^\top$ has determinant $1$. The form $g := f \circ T$ is equivalent to $f$ and satisfies $g(1, 0) = f(\gamma, \delta) = n$, forcing the leading coefficient of $g$ to equal $n$.
[/proofplan]
[step:Verify the backward direction]
Suppose $f \sim g$ where $g = (n, b, c)$ for some $b, c \in \mathbb{Z}$. Evaluate
\begin{align*}
g(1, 0) &= n \cdot 1^2 + b \cdot 1 \cdot 0 + c \cdot 0^2 = n,
\end{align*}
and $\gcd(1, 0) = 1$. Hence $g$ properly represents $n$.
By the [Invariance of Proper Representations under Equivalence](/theorems/???), if $f \sim g$ then $f$ and $g$ properly represent exactly the same integers. Therefore $f$ properly represents $n$.
[/step]
[step:Set up the forward direction and invoke Bezout]
Suppose $f$ properly represents $n$. By definition there exist $\gamma, \delta \in \mathbb{Z}$ with
\begin{align*}
f(\gamma, \delta) &= n, \qquad \gcd(\gamma, \delta) = 1.
\end{align*}
Since $\gcd(\gamma, \delta) = 1$, the [Linear Diophantine Equation in Two Variables](/theorems/1696) (Bezout's identity) produces integers $\alpha, \beta \in \mathbb{Z}$ with
\begin{align*}
\alpha \delta - \beta \gamma &= 1.
\end{align*}
(We have applied Bezout to the equation $(-\gamma) \cdot \beta + \delta \cdot \alpha = 1$, using that $\gcd(-\gamma, \delta) = \gcd(\gamma, \delta) = 1$ divides $1$.)
[guided]
We want to build a unimodular substitution matrix whose first column is the representation vector $(\gamma, \delta)^\top$. Recall: $T \in \mathrm{GL}_2(\mathbb{Z})$ is unimodular iff $\det T \in \{\pm 1\}$; for $\mathrm{SL}_2(\mathbb{Z})$-equivalence we want $\det T = 1$.
If $T$ has first column $(\gamma, \delta)^\top$ and second column $(\alpha, \beta)^\top$, then
\begin{align*}
\det T &= \gamma \beta - \delta \alpha = -(\alpha \delta - \beta \gamma).
\end{align*}
So $\det T = 1$ is equivalent to $\alpha \delta - \beta \gamma = -1$, and $\det T = -1$ is equivalent to $\alpha \delta - \beta \gamma = 1$. Either sign works for producing an equivalent form (in the broad sense), but to get $\det T = 1$ we should instead take the relation with the opposite sign; we will adjust below. For clarity let us set up $T$ directly.
Bezout's theorem (Linear Diophantine Equation in Two Variables) states: if $\gcd(\gamma, \delta) = 1$, there exist $u, v \in \mathbb{Z}$ with $u\gamma + v\delta = 1$. Taking $\alpha := v$ and $\beta := -u$, this becomes $\alpha \delta - \beta \gamma = v\delta + u\gamma = 1$. So the integers $\alpha, \beta$ satisfying $\alpha \delta - \beta \gamma = 1$ exist.
[/guided]
[/step]
[step:Construct the substitution matrix $T$ and verify $\det T = 1$]
Define the substitution matrix
\begin{align*}
T &= \begin{pmatrix} \gamma & \alpha \\ \delta & \beta \end{pmatrix} \in \mathbb{Z}^{2 \times 2}.
\end{align*}
Compute its determinant:
\begin{align*}
\det T &= \gamma \beta - \alpha \delta = -(\alpha \delta - \beta \gamma) = -1.
\end{align*}
This gives $\det T = -1$, not $+1$. Replace the second column by its negative: define
\begin{align*}
T' &= \begin{pmatrix} \gamma & -\alpha \\ \delta & -\beta \end{pmatrix}, \qquad \det T' = -\gamma \beta + \alpha \delta = \alpha \delta - \beta \gamma = 1.
\end{align*}
Thus $T' \in \mathrm{SL}_2(\mathbb{Z})$ and the first column of $T'$ is still $(\gamma, \delta)^\top$.
Writing $\alpha' := -\alpha$ and $\beta' := -\beta$, we have
\begin{align*}
T' &= \begin{pmatrix} \gamma & \alpha' \\ \delta & \beta' \end{pmatrix}, \qquad \gamma \beta' - \delta \alpha' = 1.
\end{align*}
[/step]
[step:Define $g := f \circ T'$ and verify $g \sim f$]
Define the form
\begin{align*}
g: \mathbb{Z}^2 &\to \mathbb{Z} \\
(x, y) &\mapsto f(\gamma x + \alpha' y,\, \delta x + \beta' y) = f\!\left( T' \begin{pmatrix} x \\ y \end{pmatrix} \right).
\end{align*}
Since $T' \in \mathrm{SL}_2(\mathbb{Z})$, the form $g$ is obtained from $f$ by a unimodular substitution of determinant $1$. By the [Definition of Equivalence of BQFs](/pages/???),
\begin{align*}
g &\sim f.
\end{align*}
In particular $g$ is a binary quadratic form (with integer coefficients, since $T'$ has integer entries and $f$ has integer coefficients) of the same discriminant as $f$.
[/step]
[step:Compute the leading coefficient of $g$]
Evaluate $g$ at $(1, 0)$:
\begin{align*}
g(1, 0) &= f(\gamma \cdot 1 + \alpha' \cdot 0,\, \delta \cdot 1 + \beta' \cdot 0) = f(\gamma, \delta) = n.
\end{align*}
Writing $g(x, y) = A x^2 + B xy + C y^2$, evaluation at $(1, 0)$ gives $g(1, 0) = A$. Hence the leading coefficient of $g$ is $A = n$, i.e.
\begin{align*}
g &= (n, b, c) \qquad \text{with } b := B,\ c := C \in \mathbb{Z}.
\end{align*}
Thus $f \sim g$ with $g$ having leading coefficient $n$, completing the forward direction.
[guided]
Let us verify the computation of $A$ in detail. Expanding $g(x, y) = f(\gamma x + \alpha' y,\ \delta x + \beta' y)$ with $f(X, Y) = aX^2 + bXY + cY^2$:
\begin{align*}
g(x, y) &= a(\gamma x + \alpha' y)^2 + b(\gamma x + \alpha' y)(\delta x + \beta' y) + c(\delta x + \beta' y)^2.
\end{align*}
The coefficient of $x^2$ is
\begin{align*}
A &= a\gamma^2 + b\gamma\delta + c\delta^2 = f(\gamma, \delta) = n.
\end{align*}
This confirms that $g$ has the shape $(n, b, c)$, as required.
Why was this construction the right one? The substitution $T'$ is designed precisely so that the basis vector $e_1 = (1, 0)$ of $\mathbb{Z}^2$ maps to the representation vector $(\gamma, \delta)$. That carries the value $f(\gamma, \delta) = n$ to the value $g(e_1)$, which is the leading coefficient of $g$. The unimodularity $\det T' = 1$ ensures the substitution is a valid equivalence and that $g$ has integer coefficients and the same discriminant as $f$.
[/guided]
[/step]
[step:Combine the two directions]
The forward direction shows: if $f$ properly represents $n$, then $f \sim g$ for some $g = (n, b, c)$. The backward direction shows: if $f \sim g$ with $g = (n, b, c)$, then $f$ properly represents $n$. Together, these give
\begin{align*}
f \text{ properly represents } n \iff f \sim (n, b, c) \text{ for some } b, c \in \mathbb{Z}.
\end{align*}
This completes the proof.
[/step]