Although it may not be the most efficient method in the world, you can do rational operations on real algebraic numbers by choosing a square matrix whose characteristic polynomial is the minimal polynomial for the algebraic number. (Remember the theorem: a matrix satisfies its own characteristic polynomial, so this automatically handles the "mod p(x)" part.) As long as the matrices don't get too large, this may be "good enough" for some government work. I've done this in Maxima many times. Comparisons for ordering (i.e., is a<b ?) are more challenging, tho. At 07:36 AM 7/2/2012, Robert Smith wrote:
P.S., I'm also working on code (no where near complete) for manipulating real algebraic numbers. That might be more interesting for you folks whenever it gets done.