Skip to content

Instantly share code, notes, and snippets.

@fujidig
Created June 11, 2018 14:29
Show Gist options
  • Save fujidig/400364d31a9871c14b5eaf048adce6d7 to your computer and use it in GitHub Desktop.
Save fujidig/400364d31a9871c14b5eaf048adce6d7 to your computer and use it in GitHub Desktop.
from edu.jas.arith import *
from edu.jas.poly import *
from edu.jas.gbufd import *
br = BigInteger(0)
vars = ["y", "x"]
ring = GenPolynomialRing(br, len(vars), TermOrder(TermOrder.INVLEX), vars)
a = ring.parse("x^3 - 3 x^2 - y + 1")
b = ring.parse("-x^2 + y^2 - 1")
cp = [a, b]
sgb = GBFactory.getImplementation(br)
gb = sgb.GB(cp)
print(gb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment