# Arithmetic in GF(p): Frobenius, inverses of rational constants, division.
ring grevlex x y z
mod 7
show (x + y)^7
show (x + 1)^6 * (x - 1)
show 1/3*x + 2/5*y
eval x^6 + y ; 3 ; 4
mod 32003
divide x^3*y*z + y^2*z^3 - 2 ; x*y - z ; y*z - 1 ; x + y + z
spoly x^3 - 2*x*y ; x^2*y - 2*y^2 + x
mod 4611686018427387847
show (x - 1)^2 * (x + 1)^2 - 1/2
eval (x - 1)^3 ; 1/2 ; 0 ; 0
mod 7
residues 1/3*x + 2/5*y - 3
residues x^2 - 13*x + 1/2
residues 1/7*x + 1