In PR #5454, @jwj61 said:
Here's another suggestion. I haven't looked closely at what you are doing, but I assume you have a polynomial, know its Galois group (or at least that it is abelian), and know the list of ramifying primes (or at least a superset of them). I will describe this in terms of gp, sage should have wrappers for these functions.
You can search the database with the information you know. First, loop through the results looking for exact matches.
If you don't have a match, use nfinit([polynomial, [list containing ramified primes]) to get a p-maximal order at all possible ramifying primes. Take the valuation of the discriminant for each potentially ramifying prime to get the discriminant on the nose. Use that to prune the list you got from the database.
All of this should be fast since there should be relatively few hits in the database and because we don't ask gp to fully factor a polynomial discriminant.
Then use nfisisom to directly test for isomorphism with candidates from the database. This is the only part where I don't have a feel for speed when the degree gets up near 47, but I don't think it will be as slow as polredabs.
Originally posted by @jwj61 in #5454 (comment)
The idea is to do a number field lookup in cases where we know that the number field is abelian (e.g. for the kerpoly in dirchars). This idea works much faster than polredabs, and might be worth implementing.
In PR #5454, @jwj61 said:
Originally posted by @jwj61 in #5454 (comment)
The idea is to do a number field lookup in cases where we know that the number field is abelian (e.g. for the kerpoly in dirchars). This idea works much faster than polredabs, and might be worth implementing.