Is there a pari or gp function to add two orders in a number field? Here of course I mean to return the smallest order containing both the summands, not just their sum as Z-modules, so the sum of Z[a] and Z[b] would Z[a,b].
I could not find it but think it would be useful. Here is a use case: you construct a number field using a monic integral irreducible polynomial whose root a generates an order O1 which is very far from maximal, and whose discriminant has hundreds of digits and cannot be factors. However, you also have a supply of other algebraic integers b, c, d, ... in the same field so it is natural to want to consider in turn the orders Z[a], Z[a,b], Z[a,b,c], adjoining one more algebraic integer at each step (after first checking that it is not already in the order you have so far), and watch the discriminant get smaller. After a few of these you expect the successive discriminants to stabilise, at which point you have an order which may not be maximal but might be good enough for your purposes; moreover you may be able to factor this last discriminant and do some more p-saturation to get the maximal order.
In case all that sounds unconvincing, think of the situation where you have a newform (of some weight, level and character) whose Hecke field has large degree, generated by some root of a characteristic polynomial of a Hecke operator T_p (for some small p, assuming that you are in a nice situation where the field is generated by a single Hecke eigenvalue. Then, by using the matrices of other Hecke operators, and not just their characteristic polynomials, some easy linear algebra (exercise!) allows you to express these subsequent Hecke matrices as polynomials in the first, so you can gradually build up the order containing (probably) all the a_p.
John
--