## Computing Class Groups

Recall from the previous post (now with errata) that for every number field K, there exists a constant m depending on K such that every ideal of K is equivalent in the class group H to an ideal of norm <= m. In addition, every ideal of norm <= m is generated by prime ideals of norm <= m; hence, it’s enough to look at the behavior of prime integers less than m under decomposition into ideals.

If K = Q(SQRT(-19)), then O(K) = Z[0.5+0.5SQRT(-19)], with integral basis {1, 0.5+0.5SQRT(-19)}. With the identity conjugate, m1 = |1| + |0.5+0.5SQRT(-19)| = 1 + SQRT(5). Similarly, m2 = 1 + SQRT(5), so m = 6 + 2SQRT(5) ~= 10.42. So it’s enough to look at the behavior of 2, 3, 5, and 7.

The element 2 is prime in O(K). Let s = 0.5+0.5SQRT(-19), and note that s^2 = -4.5 + 0.5SQRT(-19) = s – 5. If 2 is not prime, it divides (a + bs)(c + ds) = ac – 5bd + (ad + bc + bd)s, but not a + bs or c + ds. If b is even, then a is odd, so as ac – 5bd is even, c is even; and as ad + bc + bd is even, d is even, which is a contradiction. Hence, b is odd. Similarly, a, c, and d must be odd. But in that case, ad + bc + bd is odd, which is a contradiction. So the ideal (2) is prime.

The element 3 is similarly prime. As with 2, the element 3 can’t divide a, b, c, or d. Modulo 3, we have equations ac – 5bd = 0, ad + bc + bd = 0. -5 = 1 mod 3, so the first equation becomes ac + bd = 0. If a = 1, then c = –bd, and we get dbbd + bd = 0 –> b^2 – b – 1 = 0 which is impossible for any of the two possible values of b. If a = -1, then c = bd, and we get –d + bbd + bd = 0 –> b^2 + b – 1 = 0 which is again impossible.

Note that N(s) = 5, so 5 = s*w2(s) = s*(1-s). The ideals (s) and (1-s) are prime since they have prime norm. Also, 7 = (1+s)(2-s), and N(1+s) = N(2-s) = 7, so the ideals they generate are prime. Therefore, all ideals of O(K) are equivalent to products of principal ideals, so that H is the trivial group, and K is a PID. In fact, it’s one of four PIDs known not to be Euclidean by any function, the other three being generated by SQRT(-43), SQRT(-67), and SQRT(-163).

If K = Q(SQRT(-5)), then m = 10.42 again, so we need to check 2, 3, 5, and 7 again. We have 5 = -SQRT(-5)^2. But the other elements don’t split so nicely. If r = SQRT(-5), then we have (2) = (2, 1+r)(2, 1+r), (3) = (3, 1+r)(3, 1-r), (7) = (7, 3+r)(7, 3-r). The ideal (2, 1+r) has a principal square, obviously. From way earlier, (3, 1+r) is equivalent to (2, 1+r). Thus, by division, so is (3, 1-r). Also, (7, 3+r)(2, 1+r) = (14, 7+7r, 6+2r, -2+4r) = (3+r), so by division so are (7, 3+r) and (7, 3-r). Hence H has just two elements, the class of principal ideals and the class of principal ideals times (2, 1+r). So H = Z/2Z. We say that h = 2, where h is the size of H.

In the next post, I’ll show how to use the fact that h = 2 in Q(SQRT(-5)) to partially recover unique factorization in the Diophantine equation x^2 + 5 = y^3.