def rightGB(self): '''Compute a right Groebner base. ''' s = self.pset; F = s.list; t = System.currentTimeMillis(); G = SolvableGroebnerBaseSeq().rightGB(F); t = System.currentTimeMillis() - t; print "executed rightGB in %s ms" % t; return SolvableIdeal(self.ring,"",G);
def isRightGB(self): '''Test if this is a right Groebner base. ''' s = self.pset; F = s.list; t = System.currentTimeMillis(); b = SolvableGroebnerBaseSeq().isRightGB(F); t = System.currentTimeMillis() - t; print "isRightGB executed in %s ms" % t; return b;
( ( x^2 + y^3 ) ) """ f = SolvableIdeal(r, ps) print "SolvableIdeal: " + str(f) print rg = f.leftGB() print "seq left GB:", rg print from edu.jas.ring import SolvableGroebnerBaseSeq if SolvableGroebnerBaseSeq().isLeftGB(rg.list): print "is left GB" else: print "is not left GB" rg = f.twosidedGB() print "seq twosided GB:", rg print if SolvableGroebnerBaseSeq().isLeftGB(rg.list): print "twosided GB is left GB" else: print "twosided GB is not left GB" if SolvableGroebnerBaseSeq().isRightGB(rg.list): print "twosided GB is right GB"
print "is not left syzygy" Zr = SolvableSyzygyAbstract().rightZeroRelationsArbitrary(f.list) #Z = SolvableSyzygyAbstract().rightZeroRelations( g ); Zpr = ModuleList(r.ring, Zr) print "seq right syz Output:", Zpr print if SolvableSyzygyAbstract().isRightZeroRelation(Zpr.list, f.list): print "is right syzygy" else: print "is not right syzygy" rg = f.leftGB() print "seq left Output:", rg print if SolvableGroebnerBaseSeq().isLeftGB(rg.list): print "is left GB" else: print "is not left GB" g = rg.list rg = f.twosidedGB() print "seq twosided Output:", rg print if SolvableGroebnerBaseSeq().isTwosidedGB(rg.list): print "is twosided GB" else: print "is not twosided GB" rgb = SolvableGroebnerBaseSeq().rightGB(f.list) rp = OrderedPolynomialList(r.ring, rgb)