import scas._
import Implicits.{QQ, coef2univariatePolynomial}
implicit val r = UnivariatePolynomial(QQ, "x")
import r.{generators, gcd, modInverse}
val Array(x) = generators
assert (gcd((1+x)*(1+frac(1, 2)*x), (1+frac(1, 2)*x)*(1-x)) >< 2+x)
assert (modInverse(1-x, pow(1+x, 2)) >< frac(3, 4)+frac(1, 4)*x)