If f is an irreducible polynomial in Q[x], and b is a nonzero polynomial in Q[x] of degree less than the degree of f, then the polmod Mod(b, f) is invertible. Thus, Mod(a/b,f) is defined for any polynomial a in Q[x]. In PariGP calculations, f is usually monic (leading coefficient is 1) with integer coefficients. It is often the defining polynomial of a number field.
In the above example, I took f = x^2  2, and I also found the characteristic polynomial of Mod(a/b, f). The point of doing that was that Mod(a/b, f) is an algebraic integer precisely when its characteristic polynomial is monic and has integer coefficients. In fields of degree greater than 2, there can be cases where algebraic integers have polynomial expressions (mod f) which have fractional coefficients.
