// Requires : de.uni-mannheim.rz.krum#jas;2.7.10

import edu.jas.poly.TermOrderByName
import edu.jas.poly.{GenPolynomial, GenPolynomialRing}
import jas.{BigInteger, poly2scas}
import BigInteger.given

given GenPolynomialRing[BigInteger](BigInteger.factory, Array("x", "y", "z"), TermOrderByName.INVLEX)
val r = poly2scas
val List(one, x, y, z) = r.gens
import r.given

assert(x + 1 >< 1 + x)
assert(x + BigInteger("1") >< BigInteger("1") + x)
assert(x + BigInteger("18446744073709551616") >< BigInteger("18446744073709551616") + x)
assert(x + one >< one + x)
assert(x > one)

given GenPolynomialRing[GenPolynomial[BigInteger]](r.factory, Array("a"), TermOrderByName.INVLEX)
val s = poly2scas[GenPolynomial[BigInteger]]
val List(_, a) = s.gens
import s.given

assert(a + 1 >< 1 + a)
assert(a + BigInteger("1") >< BigInteger("1") + a)
assert(a + x >< x + a)
assert(a > x)