A system for sorting and labelling ideals in any number field has been developed by John Cremona, Aurel Page and Andrew Sutherland.

In a number field $K$, each nonzero ideal $I$ of its ring of integers $\mathcal{O}_K$ is assigned a label of the form $N.i$, where $N$ and $i$ are positive integers, in which $N:=[\mathcal{O}_K:I]$ is the norm of the ideal and $i$ is the index of the ideal in a sorted list of all ideals of norm $N$. To sort ideals of the same norm we use the following scheme in which there are no arbitrary choices necessary once an integral primitive element $\alpha$ for the field $K$ is fixed. In the LMFDB we always represent number fields as $K = \mathbb{Q}[X]/(g(X))$ where $g$ is the unique monic integral polynomial which satisfies the polredabs condition. In this representation the image of $X$ under the quotient map $\mathbb{Q}[X]\rightarrow\mathbb{Q}[X]/(g(X))$ is a canonical integral primitive element $\alpha$ for $K$.

To define an ordering of prime ideals, it suffices to order all prime ideals of the same norm $N$, which is necessarily a power of some integer prime $p$. When $p$ does not divide the discriminant of $g(X)$, the factorization of $g(X)$ modulo $p$ has no repeated factors, and we order the irreducible factors $h(X)$ by degree and then lexicographically by their coefficient sequences, with coefficients uniquely represented as integers in $\{0,1,\dots,p-1\}$ and listed in increasing order by the degree of the corresponding term. By the Dedekind-Kummer theorem, each $h(X)$ of degree $n$ corresponds to a prime ideal $(p,h(\alpha))$ of norm $p^n$, and every prime ideal of norm $p^n$ can be uniquely represented in this way. Our lexicographic ordering of the irreducible factors $h(X)$ of degree $n$ thus induces an ordering of the prime ideals of norm $p^n$, for all primes $p$ not dividing the discriminant of $g(X)$.

For primes $p$ dividing the discriminant of $g(X)$, including all primes ramified in $K$ as well as possibly additional primes dividing the index of $\mathbb{Z}[\alpha]$ in $\mathcal{O}_K$, we extend this scheme by considering the factorization of $g(X)$ as an element of the $p$-adic polynomial ring $\mathbb{Z}_p[X]$, which has no repeated factors. This yields a total ordering of all prime ideals of $\mathcal{O}_K$ that refines their partial ordering by norm.

We now extend our ordering of prime ideals to an ordering on all ideals of $\mathcal{O}_K$ as follows. Each ideal is assigned an exponent vector based on its unique factorization into prime ideals in which the exponents are ordered according to the ordering of prime ideals defined above. Ideals of the same prime power norm are sorted first by the sum of their exponents, and then by reverse lexicographical order of the exponent vectors. This system guarantees that prime ideals always come first in the ordering of ideals of the same norm, and in the same order as defined above.

Full details are described in a preprint (in preparation).

**Authors:**

**Knowl status:**

- Review status: reviewed
- Last edited by David Roberts on 2019-04-30 16:49:18

**Referred to by:**

**History:**(expand/hide all)

- 2020-10-18 17:27:38 by Andrew Sutherland
- 2019-04-30 16:49:18 by David Roberts (Reviewed)
- 2017-06-14 04:13:48 by Andrew Sutherland

**Differences**(show/hide)