( ( y ), ( x ), ( 0i1 x y ) ( X ), ( Y ), ( 0i1 Y X ) ) """ r = SolvableModule(rsc) print "SolvableModule: " + str(r) print ps = """ ( ( ( x + 1 ), ( y ) ), ( ( x y ), ( 0 ) ), ( ( x - X ), ( x - X ) ), ( ( y - Y ), ( y - Y ) ) ) """ f = SolvableSubModule(r, ps) print "SolvableSubModule: " + str(f) print flg = f.leftGB() print "seq left GB:", flg print ftg = f.twosidedGB() print "seq twosided GB:", ftg print
r = SolvableModule( rsc ); #r = SolvableModule( rsan ); print "SolvableModule: " + str(r); print; ps = """ ( ( ( x + 1 ), ( y ) ), ( ( x y ), ( 0 ) ), ( ( x - X ), ( x - X ) ), ( ( y - Y ), ( y - Y ) ) ) """; f = SolvableSubModule( r, ps ); print "SolvableSubModule: " + str(f); print; flg = f.leftGB(); print "seq left GB:", flg; print; if flg.isLeftGB(): print "is left GB"; else: print "is not left GB";
r = SolvableModule( rsc ); print "SolvableModule: " + str(r); print; ps = """ ( ( ( x + 1 ), ( y ) ), ( ( x y ), ( 0 ) ), ( ( x - X ), ( x - X ) ), ( ( y - Y ), ( y - Y ) ) ) """; f = SolvableSubModule( r, ps ); print "SolvableSubModule: " + str(f); print; flg = f.leftGB(); print "seq left GB:", flg; print; from edu.jas.module import ModSolvableGroebnerBaseAbstract; if ModSolvableGroebnerBaseAbstract().isLeftGB( flg.mset ): print "is left GB"; else: print "is not left GB";
print "one = " + str(one); print "i = " + str(i); print "X = " + str(X); print "Y = " + str(Y); print "x = " + str(x); print "y = " + str(y); m1 = ( ( x + 1 ), ( y ) ) m2 = ( ( x * y ), ( 0 ) ) m3 = ( ( x - X ), ( x - X ) ) m4 = ( ( y - Y ), ( y - Y ) ) ml = [m1,m2,m3,m4]; #print "ml = " + str(ml); ssm = SolvableSubModule( sr, list=ml ); print "ssm: " + str(ssm); print; xsm = SolvableSubModule(SolvPolyRing(CC(),"X, Y, x, y",PolyRing.lex,rel=[y, x, ( ((0,),(1,)) * x * y ), Y, X, ( ((0,),(1,)) * X * Y )]),list=[ ( x - X, x - X ), ( x + ((1,),), y ), ( y - Y, y - Y ), ( x * y, 0 ) ]); # SolvableSubModule(SolvPolyRing(CC(),"X, Y, x, y",PolyRing.lex,rel=[y, x, ( ((0,),(1,)) * x * y ), Y, X, ( ((0,),(1,)) * X * Y )]),list=[ ( x - X, x - X ), ( x + ((1,),), y ), ( y - Y, y - Y ), ( x * y, 0 ) ]); # SolvableSubModule(SolvPolyRing(CC(),"X, Y, x, y",PolyRing.lex,(( y ), ( x ), ( ((0,),(1,)) * x * y ),( Y ), ( X ), ( ((0,),(1,)) * X * Y ))),list=[ ( x - X, x - X ), ( x + ((1,),), y ), ( y - Y, y - Y ), ( x * y, 0 ) ]); print "xsm: " + str(xsm); print; mlg = ssm.leftGB(); print "mlg: " + str(mlg); print; mtg = ssm.twosidedGB(); print "mtg: " + str(mtg);
ps = """ ( ( ( x + 1 ), ( y ) ), ( ( x y ), ( 0 ) ), ( ( x - X ), ( x - X ) ), ( ( y - Y ), ( y - Y ) ) ) """ # ( ( y^2 x ) ), # ( ( y^3 x^2 ) ) # ( ( x + 1 ) ), # ( ( x + 1 ), ( y ) ), # ( ( x y ), ( 0 ) ) f = SolvableSubModule(r, ps) print "SolvableSubModule: " + str(f) print # flg = f.leftGB(); # print "seq left GB Output:", flg; # print; ftg = f.twosidedGB() print "seq twosided GB Output:", ftg print from edu.jas.gbufd import SolvableSyzygySeq # from edu.jas.gbmod import ModSolvableGroebnerBase;
r = SolvableModule( rsc ); #r = SolvableModule( rsan ); print "SolvableModule: " + str(r); print; ps = """ ( ( ( x + 1 ), ( y ) ), ( ( x y ), ( 0 ) ), ( ( x - X ), ( x - X ) ), ( ( y - Y ), ( y - Y ) ) ) """; f = SolvableSubModule( r, ps ); print "SolvableSubModule: " + str(f); print; flg = f.leftGB(); print "seq left GB:", flg; print; ftg = f.twosidedGB(); print "seq twosided GB:", ftg; print; # split term order not supported for rightGB
f = rs.ideal("", [t**2 + z**2 + x**2 + y**2 + 1]) print "f: " + str(f) tf = f.twosidedGB() print "t: " + str(tf) print #exit(0) r = SolvableModule("", rs) print "SolvableModule: " + str(r) print subm = [[0, t**2 + z**2 + x**2 + y**2 + 1], [x**2 + y**2, z]] m = SolvableSubModule(r, "", subm) print "SolvableSubModule: " + str(m) print #exit() #startLog(); lg = m.leftGB() print "seq left GB: " + str(lg) print "is left GB: " + str(lg.isLeftGB()) print tg = m.twosidedGB() print "seq twosided GB: " + str(tg) print "is twosided GB: " + str(tg.isTwosidedGB()) print "is right GB: " + str(tg.isRightGB())
tf = f.twosidedGB(); print "t: " + str(tf); print; #exit(0) r = SolvableModule("",rs); print "SolvableModule: " + str(r); print; subm = [ [ 0, t**2 + z**2 + x**2 + y**2 + 1], [ x**2 + y**2, z ] ]; m = SolvableSubModule( r, "", subm ); print "SolvableSubModule: " + str(m); print; #exit() #startLog(); lg = m.leftGB(); print "seq left GB: " + str(lg); print "is left GB: " + str(lg.isLeftGB()); print; tg = m.twosidedGB(); print "seq twosided GB: " + str(tg); print "is twosided GB: " + str(tg.isTwosidedGB()); print "is right GB: " + str(tg.isRightGB());