[proofplan]
Existence of a reduced form in each equivalence class is established elsewhere. For uniqueness, suppose $f = (a, b, c)$ and $g = (a', b', c')$ are reduced and equivalent. The strategy has three ingredients. First, the [Least Integers Properly Represented (Computation)](/theorems/1731) identifies the three smallest integers properly represented by a reduced form $(a, b, c)$ as $a$, $c$, and $a - |b| + c$, in this order. Since proper representation is invariant under equivalence, equating the first two smallest values gives $a = a'$ and $c = c'$; equating the discriminants $b^2 - 4ac = b'^2 - 4a'c'$ then forces $b' = \pm b$. Second, the reducedness inequalities $-a < b \leq a \leq c$ (with $b \geq 0$ when either $a = c$ or $|b| = a$) are shown to rule out the case $b' = -b \neq b$. In the boundary cases $a = c$ or $|b| = a$, reducedness forces $b \geq 0$ and $b' \geq 0$, so $b' = -b$ only when $b = 0$, in which case $f = g$. In the strict interior $a < c$ and $|b| < a$, both $(a, b, c)$ and $(a, -b, c)$ are reduced. The substitution taking $f$ to $g$ must carry the pairs $(\pm 1, 0)$ representing $a$ in $f$ to the pairs representing $a$ in $g$; this rigidity forces the substitution matrix to be $\pm I_2$, whence $g(x, y) = f(\pm x, \pm y) = f(x, y)$ and so $b' = b$ after all.
[/proofplan]
[step:Fix notation for reduced forms and recall the least representation theorem]
Let $f = (a, b, c)$ denote the binary quadratic form
\begin{align*}
f: \mathbb{Z}^2 &\to \mathbb{Z} \\
(x, y) &\mapsto ax^2 + bxy + cy^2.
\end{align*}
By the [Definition of Reduced Form](/pages/???), $f$ is reduced when
\begin{align*}
|b| &\leq a \leq c, \quad \text{and } b \geq 0 \text{ whenever } |b| = a \text{ or } a = c.
\end{align*}
Assume $f \sim g$ with $g = (a', b', c')$ both reduced and positive definite, so in particular $a, c, a', c' \geq 1$.
By the [Least Integers Properly Represented (Computation)](/theorems/1731), the three smallest integers properly represented by a reduced form $(a, b, c)$, in increasing order, are
\begin{align*}
a, \qquad c, \qquad a - |b| + c.
\end{align*}
The same list, applied to $g$, yields $a'$, $c'$, $a' - |b'| + c'$.
[/step]
[step:Deduce $a = a'$, $c = c'$, and $b' = \pm b$ from equivalence]
Equivalence of forms preserves the set of properly represented integers together with their multiplicities: if $T \in \mathrm{SL}_2(\mathbb{Z})$ satisfies $g(x, y) = f(T(x, y))$, then $T$ is a bijection $\mathbb{Z}^2 \to \mathbb{Z}^2$ that preserves the property $\gcd(x, y) = 1$ (because $\det T = \pm 1$ acts invertibly on $\mathbb{Z}^2$). Hence $f$ and $g$ properly represent exactly the same integers with the same multiplicities.
Comparing the smallest two properly represented integers of $f$ and $g$:
\begin{align*}
a &= a', & c &= c'.
\end{align*}
Equivalent forms have the same discriminant, so $b^2 - 4ac = b'^2 - 4a'c' = b'^2 - 4ac$, whence
\begin{align*}
b^2 &= b'^2, \qquad \text{i.e. } b' = \pm b.
\end{align*}
Writing $d := b^2 - 4ac = b'^2 - 4ac$ for the common (negative) discriminant, we record that $f = (a, b, c)$ and $g = (a, \pm b, c)$.
[/step]
[step:Handle the boundary cases $a = c$ and $|b| = a$]
Suppose $a = c$. The reducedness condition for $f = (a, b, a)$ then forces $b \geq 0$; likewise the reducedness of $g = (a, \pm b, a)$ forces $\pm b \geq 0$. If $b' = -b$, both $b \geq 0$ and $-b \geq 0$ hold, so $b = 0$ and hence $b' = 0 = b$. Thus $f = g$ in this case.
Suppose $|b| = a$. Reducedness of $f$ forces $b \geq 0$, so $b = a$. Reducedness of $g = (a, \pm b, c)$ with $|\pm b| = a$ similarly forces $\pm b \geq 0$. If $b' = -b = -a < 0$, reducedness of $g$ is violated. Therefore $b' = b$, and $f = g$.
In the remaining case we have strict inequalities $a < c$ and $|b| < a$.
[guided]
The reducedness inequalities $|b| \leq a \leq c$ become equalities in two boundary cases, and in each such case the tie-breaking rule $b \geq 0$ applies to both $f$ and $g$.
Case $a = c$. Both $(a, b, a)$ and $(a, -b, a)$ must be reduced. The tie-breaking rule when $a = c$ says the middle coefficient is non-negative. So $b \geq 0$ from reducedness of $f$, and $-b \geq 0$ from reducedness of $g$ (if $b' = -b$). The two together force $b = 0$, hence $b' = 0 = b$, so $f = g$.
Case $|b| = a$ (with $a < c$). Reducedness requires $b \geq 0$ when $|b| = a$, so $b = a$. If $b' = -b = -a$, then $|b'| = a$ and reducedness of $g$ would require $b' \geq 0$, contradicting $b' = -a < 0$. Hence $b' = b$ and again $f = g$.
Why do these two tie-breaking rules exist in the definition of reduced form? Precisely because without them, the forms $(a, b, a)$ and $(a, -b, a)$ (when $a = c$), and the forms $(a, a, c)$ and $(a, -a, c)$ (when $|b| = a$), would be equivalent and both "canonical", destroying uniqueness. The rules select one representative from each equivalent pair, and that selection is exactly what makes the uniqueness proof work in the boundary cases.
[/guided]
[/step]
[step:Reduce the strict-interior case to rigidity of representations of $a$]
It remains to treat the case $a < c$ and $|b| < a$. We will show $b' = b$.
Suppose for contradiction $b' = -b \neq b$, i.e. $b \neq 0$. Both $(a, b, c)$ and $(a, -b, c)$ are reduced: for $(a, -b, c)$ we have $|-b| = |b| < a < c$ with $|-b| \neq a$ and $a \neq c$, so no tie-breaking clause applies and the inequality $|-b| \leq a \leq c$ suffices. Thus $f = (a, b, c)$ and $g = (a, -b, c)$ are two distinct reduced forms that are equivalent by hypothesis. We will derive a contradiction by analyzing the integer pairs $(x, y) \in \mathbb{Z}^2$ with $f(x, y) = a$.
[/step]
[step:Characterize the representations of $a$ by $f$ in the strict-interior case]
We show: in the case $a < c$ and $|b| < a$, the only $(x, y) \in \mathbb{Z}^2$ with $f(x, y) = a$ are $(x, y) = (\pm 1, 0)$.
Let $f(x, y) = ax^2 + bxy + cy^2 = a$. We rewrite $f$ by completing the square in $x$. Multiplying by $4a$,
\begin{align*}
4a \cdot f(x, y) &= (2ax + by)^2 + (4ac - b^2) y^2.
\end{align*}
Since $f$ is positive definite, $4ac - b^2 > 0$; set $D := 4ac - b^2 = -\mathrm{disc}(f) > 0$. If $f(x, y) = a$, then
\begin{align*}
4a^2 &= (2ax + by)^2 + D y^2, \qquad \text{hence } D y^2 \leq 4a^2.
\end{align*}
We bound $D$ from below using $c > a$ and $|b| < a$:
\begin{align*}
D &= 4ac - b^2 > 4a \cdot a - a^2 = 3a^2.
\end{align*}
Thus $3 a^2 y^2 < Dy^2 \leq 4a^2$, giving $y^2 < 4/3$, so $y \in \{-1, 0, 1\}$.
If $y = \pm 1$: then $f(x, \pm 1) = ax^2 \pm bx + c$. For this to equal $a$, we need $ax^2 \pm bx + c - a = 0$. Evaluating at $x = 0$ gives $c - a > 0$ by assumption, so $x = 0$ fails. For $|x| \geq 1$,
\begin{align*}
f(x, \pm 1) &= ax^2 \pm bx + c \geq ax^2 - |b||x| + c \geq a - |b| + c > c > a,
\end{align*}
using $|x|^2 \geq |x|$ and $c > a$. So no $y = \pm 1$ solution exists.
If $y = 0$: then $f(x, 0) = ax^2 = a$ forces $x^2 = 1$, i.e. $x = \pm 1$.
Hence the only solutions to $f(x, y) = a$ are $(\pm 1, 0)$. The same argument applied to $g = (a, -b, c)$ (which also satisfies $a < c$ and $|-b| < a$) shows that the only solutions to $g(x, y) = a$ are $(\pm 1, 0)$.
[guided]
Why isolate the representations of $a$? Because $a$ is the smallest value properly represented, and the pairs achieving this minimum are few and explicit; a unimodular substitution taking $f$ to $g$ must permute these pairs, and the constraint is rigid enough to force the substitution matrix to be trivial.
The completing-the-square identity $4a \cdot f(x, y) = (2ax + by)^2 + Dy^2$ converts the quadratic $f$ into a sum of two non-negative squares with positive weight $D = -\mathrm{disc}(f) = 4ac - b^2 > 0$. Setting $f(x, y) = a$ gives $(2ax + by)^2 + Dy^2 = 4a^2$.
To bound $y$, we lower-bound $D$ using the strict-interior hypotheses $c > a$ and $|b| < a$: $D = 4ac - b^2 > 4a \cdot a - a \cdot a = 3a^2$. Hence $3a^2 y^2 < 4a^2$, i.e. $y^2 < 4/3 < 2$, so $|y| \leq 1$.
Now we enumerate the three cases $y = 0, \pm 1$. For $y = \pm 1$, we show $f(x, \pm 1) > a$ for every $x \in \mathbb{Z}$: at $x = 0$ this is $c > a$ (the strict-interior hypothesis); for $|x| \geq 1$ we use $ax^2 \geq a|x| \geq a$, $\pm bx \geq -|b||x| \geq -|b| \cdot |x|$, and the fact that for $|x| \geq 1$ the quadratic $ax^2 - |b||x| + c$ is minimised at $|x| = 1$, giving $a - |b| + c > c > a$. So $y = \pm 1$ is excluded.
Only $y = 0$ remains, forcing $x = \pm 1$. Exactly the two pairs $(\pm 1, 0)$ represent the value $a$, for both $f$ and $g$.
[/guided]
[/step]
[step:Force the substitution matrix to be $\pm I_2$ and derive the contradiction]
Let $T \in \mathrm{SL}_2(\mathbb{Z})$ satisfy $g(v) = f(Tv)$ for $v \in \mathbb{Z}^2$. (Strictly speaking we should consider $T \in \mathrm{GL}_2(\mathbb{Z})$ if the equivalence is improper; we treat proper equivalence, as the convention in this text. The improper case is analogous using $\det T = -1$.) Since $g(\pm 1, 0) = a$ and the only pairs representing $a$ under $f$ are $(\pm 1, 0)$, the map $T$ sends $(1, 0)$ to $(\pm 1, 0)$ and $(-1, 0)$ to the other. So the first column of $T$ is $(\pm 1, 0)^\top$.
Since $\det T = 1$, the second column of $T$ has the form $(m, \pm 1)^\top$ for some $m \in \mathbb{Z}$ (the $\pm 1$ being the cofactor needed for determinant $1$). So $T$ has one of the four shapes
\begin{align*}
T &= \begin{pmatrix} \varepsilon_1 & m \\ 0 & \varepsilon_2 \end{pmatrix}, \qquad \varepsilon_1, \varepsilon_2 \in \{\pm 1\}, \ \varepsilon_1 \varepsilon_2 = 1, \ m \in \mathbb{Z}.
\end{align*}
Thus $\varepsilon_2 = \varepsilon_1$; write $\varepsilon := \varepsilon_1 = \varepsilon_2$.
We compute $g = f \circ T$ explicitly:
\begin{align*}
g(x, y) &= f(\varepsilon x + my, \varepsilon y) \\
&= a(\varepsilon x + my)^2 + b(\varepsilon x + my)(\varepsilon y) + c(\varepsilon y)^2 \\
&= a(x + \varepsilon m y)^2 + b \varepsilon^2 (x + \varepsilon m y) y + c y^2 \\
&= a x^2 + (2 a \varepsilon m + b)\, xy + (a m^2 + b \varepsilon m + c)\, y^2,
\end{align*}
using $\varepsilon^2 = 1$. Matching coefficients with $g = (a, -b, c)$:
\begin{align*}
a &= a \qquad \checkmark \\
-b &= 2 a \varepsilon m + b \\
c &= a m^2 + b \varepsilon m + c.
\end{align*}
The third equation gives $a m^2 + b \varepsilon m = 0$, i.e. $m(am + b\varepsilon) = 0$. Either $m = 0$, or $am = -b\varepsilon$.
If $m = 0$: the second equation becomes $-b = b$, hence $b = 0$, contradicting $b \neq 0$.
If $am = -b\varepsilon$: substitute into the second equation:
\begin{align*}
-b &= 2 a \varepsilon m + b = 2 \varepsilon \cdot (am) \cdot 1 + b = 2 \varepsilon \cdot (-b \varepsilon) + b = -2b + b = -b,
\end{align*}
which is an identity, so the second equation is consistent. But $am = -b\varepsilon$ requires $a \mid b\varepsilon$, i.e. $a \mid b$. Since $0 < |b| < a$, this is impossible.
Both sub-cases yield a contradiction, so our assumption $b' = -b \neq b$ is false. Hence $b' = b$, and $f = g$.
[/step]
[step:Combine the cases to conclude]
The three cases $a = c$, $|b| = a$, and $(a < c$ and $|b| < a)$ exhaust the possibilities allowed by the reducedness inequality $|b| \leq a \leq c$. In each case we have shown $b' = b$, hence $f = (a, b, c) = (a', b', c') = g$.
Therefore the reduced form in each equivalence class is unique.
[/step]