# How does assuming GRH help us calculate class group?

It seems that, almost all computer programs assume GRH to calculate $$\mathbb{Q}(\zeta_p)$$ for $$p > 23$$. I'm very curious how assuming the GRH, helps us to calculate class groups in practice. Can anyone give an explicit example of a number field (not necessarily $$\mathbb{Q}(\zeta_p)$$'s), and explicit calculation of the class group, based on assuming the GRH?

• This seems to be briefly explained in GP/PARI documentation here: pari.math.u-bordeaux.fr/dochtml/html/… – Wojowu Jan 23 at 16:25
• @Wojowu Oh yes, you are right. This link, introduced by you, summarizes almost the entire mainline of the story. Thanks. – Davood KHAJEHPOUR Jan 24 at 8:12

In general, to compute the class group of a number field $$K$$ of degree $$n$$ and discriminant $$\Delta$$, we need to find some bound $$N$$ such that the class group of $$K$$ is generated by primes of norm at most $$N$$. Unconditionally, we have the Minkowski bound $$M_K = \sqrt{\lvert \Delta \rvert} \left( \frac{4}{\pi} \right)^{s} \frac{n!}{n^n},$$ where $$s$$ is the number of conjugate pairs of complex places of $$K$$. Since $$M_K$$ is proportional to the square root of the absolute discriminant, it is often infeasible to check all primes up to that bound. To my knowledge, no sizable asymptotic improvement on this bound has been proven unconditionally.
However, assuming GRH, we have a vastly stronger bound due to Bach (1990): under GRH, the class group is generated by primes of norm at most $$B_K = 12 \log^2 \lvert \Delta \rvert.$$ A similar bound, asymptotically weaker in theory but stronger in practice for many fields of interest, is due to Belabas, Diaz y Diaz, and Friedman (2008).
Let's take $$\mathbb{Q}(\zeta_{29})$$ as an example: the Minkowski bound is $$14956520729 \approx 1.4 \times 10^{10}$$, so we would need to check about 64 million primes to provably compute the class group—not totally infeasible with supercomputers but certainly a very computationally intensive task. In contrast, the Bach bound is $$99190$$, while the version implemented in Magma using results of Belabas, Diaz y Diaz, and Friedman gives a bound of $$826$$. With this latter bound, Magma can compute the class group in $$1.8$$ seconds on my laptop, assuming there are no elements of the class group whose representatives all have norm greater than $$826$$ (the existence of which would contradict GRH).