Sorting and labelling integral ideals in a number field
Official code: JohnCremona/sorting (2 stars, TeX, last commit 2024-09-11).
Abstract
We define a scheme for labelling and ordering integral ideals of number fields, including prime ideals as a special case. The order we define depends only on the choice of a monic irreducible integral defining polynomial for each field $K$, and we start by defining for each field its unique reduced defining polynomial, after Belabas.
Show full abstractHide
We define a total order on the set of prime ideals of $K$ and then extend this to a total order on the set of all nonzero integral ideals of $K$. This order allows us to give a unique label of the form $N.i$, where $N$ is its norm and $i$ is the index of the ideal in the ordered list of all ideals of norm $N$. Our ideal labelling scheme has several nice properties: for a given norm, prime ideals always appear first, and given the factorisation of the norm, the bijection between ideals of norm $N$ and labels is computable in polynomial time. Our motivation for this is to have a well-defined and concise way to sort and label ideals for use in databases such as the LMFDB. We have implemented algorithms which realise this scheme, in Sage, Magma and Pari.