To fix notation, let the quadratic order R be given as + ^{ . }, where = (D + )/2 with D = D_{R} the discriminant of the order R; then satisfies the equation
a^{ . } | = | p^{ . }a + q^{ . }(b + c) | |
(b + c)^{ . } | = | r^{ . }a + s^{ . }(b + c) |
a | = qc | and | 0 | = pa + qb | ||
b + cD | = sc | and | - | = ra + sb |
Now, it is clear that the ideal c^{-1}I = ^{ . }q + (- p + ) is equivalent to I in the class group. Thus, we say the ideal is primitive if the representative tuple (a, b, c) satisfies c = 1. Clearly, we only need to look at primitive ideals for the purpose of computing the class group; but there are more equivalence relations.
We write a general element of I as ax + (b + c)y; its norm is a multiple of Nm(I) = ac. Thus,
Now, if I = ^{ . }u_{1} + ^{ . }u_{2}, for some elements u_{1}, u_{2} in R, then the quadratic form Q_{u1, u2}(x, y) = Nm(xu_{1} + yu_{2})/Nm(I) is (in general) different from Q_{I}(x, y). However, it is obtained from Q_{I}(x, y) by a substitution (x, y) (Ax + By, Cx + Dy) where is an integer matrix with integer inverse. One way to obtain a new basis is to consider I = ^{ . }J for some ideal J in R and some in K. Then, we write J = ^{ . }a' + ^{ . }(b' + c') as before. Clearly u_{1} = a' and u_{2} = (b' + c') is another basis of I.
Conversely, given a basis u_{1} and u_{2} of the ideal I, let d be a denominator of u_{2}/u_{1}; i. e. d is a positive integer so that du_{2}/d_{1} lies in R. Consider the ideal J = (d /u_{1})^{ . }I, we see that J = ^{ . }d + ^{ . }(du_{2}/u_{1}) and J = ^{ . }d. Thus, as above we can find e and f so that 0 e < d and (du_{2}/u_{1}) = nd±(e + f) for some integer n. Thus J = ^{ . }d + ^{ . }(e + f). Putting = u_{1}/d we see that u_{1} = d and u_{2} = (nd±(e + f)); in particular, I = ^{ . }J. Moreover, we have
Thus we have shown that Q_{I}(x, y) and Q_{J}(x, y) are equivalent under an integer change of co-ordinates for the variables (x, y) if and only if the corresponding ideals are equivalent in the class group. The problem of finding representatives of ideal classes can be replaced by the problems of finding quadratic forms that represent equivalence classes.
We now separate the cases D < 0 and D > 0. In the first case, we restrict our attention to quadratic forms Q(x, y) = qx^{2} + sxy - ry^{2} (continuing the above notation) such that q > 0. Since D = s^{2} + 4qr < 0, we see that r < 0. In fact Q(x, y) > 0 for all (x, y) (0, 0). Pictorially, the region Q(x, y) r is bounded by an ellipse. Thus, among lattice points we can choose u_{1} to be an element where the Q(u_{1}) takes its minimum (non-zero) value. Now, we can complete u_{1} to a basis by picking a suitable vector u_{2}. The only possible alternative choices for u_{2} are nu_{1}±u_{2} for some integer n. Let u_{2} be so chosen that the value Q(u_{2}) is minimum in this collection. It is not too difficult to show that the expression for Q in this basis is independent of the finitely many choices available. (In fact for D| > 4 the choices of u_{1} and u_{2} are unique upto sign). Now, in this basis we get Q(x, y) = Ax^{2} + Bxy + Cy^{2} with A C and | B| A. Moreover, if one of these is an equality (which can only happen if | D| 4), we have B 0 as well. A quadratic form with negative discriminant is said to be reduced if it has this special form. Clearly, there are only finitely many such forms for a given D; one for each equivalence class of quadratic forms. Thus we have found representatives for the class group.
When D > 0, the quadratic forms are indefinite. The locus Q(x, y) = r represents a hyperbola. Now the value 0 is not attained at non-zero (x, y) (else D would have a square root in integers) and the values are all integers. Thus, the absolute value of Q attains a minimum at some point u_{1} on the lattice. But this u_{1} is far from unique (in fact there are infinitely many points where Q takes this value. One can show that upto a finite number of choices these are related by an integer change of co-ordinates. Now, as before, u_{1} can be completed to a basis by a choice of u_{2}. The alternatives for this choice are nu_{1}±u_{2} as earlier. Again, there are only finitely many of these with sign opposite to that of Q(u_{1}) (since the term n^{2}Q(u_{1}) in the expansion of the quadratic form will dominate for n large). Among this finite set we choose u_{2} so that the absolute value of Q is minimum (again with only finitely many options for this choice). Thus, each equivalence class of quadratic forms has been represented upto a finite ambiguity. Moreover, one can bound the ambiguity depending on D_{R}.