Bijection between an ideal class group and a set of classes of binary quadratic forms.
Solution 1:
We prove Proposition (2). We use the same notation as that of the proof of Proposition (1).
Lemma 2 The map $\phi$ of Proposition (2) is well-defined.
Proof: We define a map $\Phi\colon \mathfrak{F}_0(D) \rightarrow Cl^+(R)$ by $\Phi((a, b, c)) = [\alpha[a, (-b + \sqrt{D})/2]]$, where $\alpha$ is any element of $K$ such that sgn$(N(\alpha)) =$ sgn$(a)$. This is clearly well-defined. Let $G = \{\sigma \in SL_2(\mathbb{Z})\ |\ \Phi((a, b, c)^{\sigma}) = \Phi((a, b, c))$ for all $(a, b, c) \in \mathfrak{F}_0(D)\}$. Clearly $G$ is a subgroup of $SL_2(\mathbb{Z})$. Since $SL_2(\mathbb{Z})$ is generated by $S = \left( \begin{array}{ccc}0 & -1 \\1 & 0 \end{array} \right)$ and $T = \left( \begin{array}{ccc}1 & 1 \\0 & 1 \end{array} \right)$(see this question), it suffices to prove that $S, T \in G$.
Let $(a, b, c) \in \mathfrak{F}_0(D)$. Then $\Phi((a, b, c)) = [\alpha [a, (-b + \sqrt D)/2]]$, where $\alpha$ is any element of $K$ such that sgn$(N(\alpha)) =$ sgn$(a)$.
Since $(a, b, c)^S = (c, -b, a), \Phi((a, b, c)^S) = [\beta [c, (b + \sqrt D)/2]]$, where $\beta$ is any element of $K$ such that sgn$(N(\beta)) =$ sgn$(c)$. Let $I = [a, (-b + \sqrt D)/2], J = [c, (b + \sqrt D)/2], \theta = (-b + \sqrt D)/2$. Then $\theta'I = [a\theta', \theta\theta'] = [a(-b - \sqrt D)/2, ac] = a[(-b - \sqrt D)/2, c] = a[c, (b + \sqrt D)/2] = aJ$. Hence $\alpha I = (\alpha a/\theta')J = (\alpha a/\beta\theta')\beta J$. $N(\alpha a/\beta \theta') = N(\alpha)a^2/N(\beta)ac = N(\alpha)a/N(\beta)c \gt 0$. Hence $[\alpha I] = [\beta J]$. Hence $S \in G$.
It remains to prove that $T \in G$. Since $(a, b, c)^T = (a, 2a + b, a + b + c), \Phi((a, b, c)^T) = [\alpha[a, -a + (-b + √D)/2]]= [\alpha[a, (-b + √D)/2]] = \Phi(a, b, c).$
QED
Proof of Proposition (2) We fist prove that $\psi\phi = 1$. Let $(a, b, c) \in \mathfrak{F}_0(D)$. $\phi([ (a, b, c) ]) = [ [a, (-b + \sqrt D)/2]\delta ]$, where $\delta$ is any element of $K$ such that sgn$(N(\delta)) =$ sgn$(a)$. Let $I = [a, (-b + \sqrt D)/2]\delta$. Let $\alpha = a\delta, \beta = (-b + \sqrt D)\delta/2$. Then $I = [\alpha, \beta]$. $\Delta(-\alpha, \beta) = -a\delta(-b - \sqrt D)\delta'/2 + a\delta'(-b + \sqrt D)\delta/2 = aN(\delta)\sqrt D$. Hence the base $\{\alpha, \beta\}$ of $I$ is positively oriented.
$\alpha\alpha'/N(I) = N(\delta)a^2/|N(\delta)||a|$ = sgn$(N(\delta))$sgn$(a)a = a$
$-(\alpha\beta' + \alpha'\beta)/N(I) = N(\delta)(ab)/|N(\delta)||a| =$ sgn$(N(\delta))$sgn$(a)b = b$
$\beta\beta'/N(I) = N(\delta)ac/|N(\delta)||a| =$ sgn$(N(\delta))$sgn$(a)c = c$
Hence $N(x\alpha - y\beta)/N(I) = ax^2 + bxy + cy^2$. Hence $\psi\phi = 1$.
It remains to prove that $\phi\psi = 1$. Every class of $Cl^+(R)$ contains a primitive ideal. Let $I = [a, b + \omega]$ be an invertible primitive ideal, where $a \gt 0, b$ are rational integers and $\omega = (D + \sqrt D)/2$. Let $\theta = b + \omega$. Since $\Delta(-a, \theta) = -a\theta' + a\theta = a\sqrt D$, $\{a, \theta\}$ is positively oriented. $a^2/N(I) = a,\ -(a\theta' + a\theta)/N(I) = -a(2b + D)/a = -2b - D,\ \theta\theta'/N(I) = (b^2 + bD + (D^2 - D)/4)/a.$
Hence $\psi([I]) = [(a, -2b - D, (b^2 + bD + (D^2 - D)/4)/a)]$. Hence $\phi\psi([I]) = [ \alpha[a, b + (D + \sqrt D)/2] ]$, where $\alpha$ is any element of $K$ such that sgn$(N(\alpha)) =$ sgn$(a)$. Since $a \gt 0$, we may take $\alpha = 1$. Hence $\phi\psi = 1$. QED
Solution 2:
We prove the assertion (1) of the proposition.
Notation Let $\sigma$ be the unique non-identity automorphism of $K/\mathbb{Q}$. We denote $\sigma(\alpha)$ by $\alpha'$ for $\alpha \in K$.
We denote a binary quadratic form $ax^2 + bxy + cy^2$ by $(a, b, c)$.
Let $x_1,\cdots,x_n \in K$. We denote by $[x_1,\cdots,x_n]$ the subgroup of $K$ generated by $x_1,\cdots,x_n$.
Let $I$ be an invertible fractional ideal of $R$. We denote by $[I]$ the class of $Cl^+(R)$ which contains $I$. Let $f \in \mathfrak{F}^+_0(D)$ or $\mathfrak{F}_0(D)$. We denote by $[f]$ the class of $\mathfrak{F}^+_0(D)/SL_2(\mathbb{Z})$ or $\mathfrak{F}_0(D)/SL_2(\mathbb{Z})$ which contains $f$.
Lemma 1 Let $I$ be a fractional ideal of $R$. Let $\{\alpha, \beta\}$ be a positively oriented basis of $I$. Then $f(\alpha, \beta; x, y) = ax^2 + bxy + cy^2$, where $a = αα'/N(I), b = -(αβ' + βα')/N(I), c = ββ'/N(I)$.
Proof: $N(xα - yβ) = (xα - yβ)(xα' - yβ') = (αα')x^2 - (αβ' + βα')xy + (ββ')y^2$. QED
Proof of (1)
We first prove that the map $\phi\colon \mathfrak{F}^+_0(D)/SL_2(\mathbb{Z}) \rightarrow Cl^+(R)$ is well-defined. Let $f = (a, b, c), g = (k, l, m) \in \mathfrak{F}^+_0(D)$. Suppose $f^{\sigma} = g$, where $\sigma = \left( \begin{array}{ccc} p & q \\ r & s \end{array} \right) \in SL_2(\mathbb{Z})$, i.e. $f(px + qy, rx + sy) = kx^2 + lxy + my^2$. By this question, $I = [a, (-b + \sqrt{D})/2]$ and $J = [k, (-l + \sqrt{D})/2]$ are invertible ideals of $R$. Let $\theta = (-b + \sqrt{D})/2a, \tau = (-l + \sqrt{D})/2k$. By this question, $\theta = \sigma^{-1}\tau$. Then, by this question, there exists $\alpha \in K$ such that $I = \alpha J$ . Hence $\phi$ is well-defined.
Next we prove that $\psi\phi = 1$. Let $(a, b, c) \in \mathfrak{F}^+_0(D)$. Let $I = [a, \theta]$, where $\theta = (-b + \sqrt{D})/2]$. Note that $N(I) = a$. Hence $a^2/N(I) = a, -(a\theta' + \theta a)/N(I) = b, \theta\theta'/N(I) = (b^2 - D)/4a = c$. Hence, by Lemma 1, $f(a, \theta; x, y) = ax^2 + bxy + cy^2$. Hence $\psi\phi = 1$ as desired.
It remains to prove that $\phi\psi = 1$. Clearly every class of $Cl^+(R)$ contains a primitive ideal(see this question for the definition of a primitive ideal of $R$). Let $I = [a, b + \omega]$ be an invertible primitive ideal, where $a \gt 0, b$ are rational integers and $\omega = (D + \sqrt D)/2$. Let $\theta = b + \omega$. Since $\Delta(-a, \theta) = -a\theta' + a\theta = a\sqrt D$, $\{a, \theta\}$ is positively oriented. $a^2/N(I) = a,\ -(a\theta' + a\theta)/N(I) = -a(2b + D)/a = -2b - D,\ \theta\theta'/N(I) = (b^2 + bD + (D^2 - D)/4)/a.$
Hence $\phi([I]) = [(a, -2b - D, (b^2 + bD + (D^2 - D)/4)/a)]$. Hence $\psi\phi([I]) = [ [a, b + (D + √D)/2] ] = [I]$. QED