#is automatic: [one,x,y,z] = pcz.gens(); zrelations = [z, y, y * z + x ]; print "zrelations: = " + str([ str(f) for f in zrelations ]); print; pz = SolvPolyRing(QQ(), "x,y,z", PolyRing.lex, zrelations); print "SolvPolyRing: " + str(pz); print; #startLog(); fl = [ z**2 + y, y**2 + x]; ff = pz.ideal("",fl); print "ideal ff: " + str(ff); print; ff = ff.twosidedGB(); print "ideal ff: " + str(ff); print; f0 = SRC(ff,z + x + y + 1); print "f0 = " + str(f0); #f1 = SRC(ff, z-y+1 ); #f1 = SRC(ff, y*z+1 ); f1 = SRC(ff, y*z+x+1 ); print "f1 = " + str(f1);
print "relations: =", [str(f) for f in relations] print #rp = SolvPolyRing(QQ(), "a,b,e1,e2,e3", rel=relations); rp = SolvPolyRing(QQ(), "a,b,e1,e2,e3", PolyRing.lex, relations) print "SolvPolyRing: " + str(rp) print print "gens =", [str(f) for f in rp.gens()] #[one,a,b,e1,e2,e3] = rp.gens(); #[one,I,J,K,a,b,e1,e2,e3] = rp.gens(); f1 = e1 * e3**3 + e2**10 - a f2 = e1**3 * e2**2 + e3 f3 = e3**3 + e3**2 - b F = [f1, f2, f3] print "F =", [str(f) for f in F] print I = rp.ideal(list=F) print "SolvableIdeal: " + str(I) print rgt = I.twosidedGB() print "seq twosided GB:" + str(rgt) print "isTwosidedGB: " + str(rgt.isTwosidedGB()) print print "rgt: ", [str(f) for f in rgt.list] print
#print "monic(b) = " +str(bm); #print #exit(0); f1 = x**2 + y**2 + z**2 + t**2 + 1 print "f1 = ", f1 f2 = t * x * f1 print "f2 = ", f2 F = [f1, f2] print "F =", [str(f) for f in F] print I = pt.ideal(list=F) print "SolvableIdeal: " + str(I) print #exit(0); rgl = I.leftGB() print "seq left GB:" + str(rgl) print "isLeftGB: " + str(rgl.isLeftGB()) print #rgr = I.rightGB(); #print "seq right GB:" + str(rgr); #print "isRightGB: " + str(rgr.isRightGB()); #print;
f1 = e1 * e3**3 + e2**10 - a; f2 = e1**3 * e2**2 + e3; f3 = e3**3 + e3**2 - b; f4 = ( e3**2 * e2**3 + e1 )**3; #print "f1 = ", f1; #print "f2 = ", f2; #print "f3 = ", f3; #print "f4 = ", f4; F = [ f1, f2, f3 ]; print "F =", [ str(f) for f in F ]; print I = rp.ideal( list=F ); print "SolvableIdeal: " + str(I); print; rgl = I.leftGB(); print "seq left GB:" + str(rgl); print "isLeftGB: " + str(rgl.isLeftGB()); print; rgt = I.twosidedGB(); print "seq twosided GB:" + str(rgt); print "isTwosidedGB: " + str(rgt.isTwosidedGB()); print; rgr = I.rightGB(); print "seq right GB:" + str(rgr);
#is automatic: [one,x,y,z] = pcz.gens(); zrelations = [z, y, y * z + x ]; print "zrelations: = " + str([ str(f) for f in zrelations ]); print; pz = SolvPolyRing(QQ(), "x,y,z", PolyRing.lex, zrelations); print "SolvPolyRing: " + str(pz); print; #startLog(); fl = [ z**2 + y, y**2 + x]; ff = pz.ideal("",fl); print "ideal ff: " + str(ff); print; ff = ff.twosidedGB(); print "ideal ff: " + str(ff); print; f0 = SRC(ff,z + x + y + 1); print "f0 = " + str(f0); #f1 = SRC(ff, z-y+1 ); #f1 = SRC(ff, y*z+1 ); f1 = SRC(ff, y*z+x+1 ); print "f1 = " + str(f1);
rp = SolvPolyRing(QQ(), "x,y,z,t", PolyRing.lex, relations) print "SolvPolyRing: " + str(rp) print print "gens =" + str([str(f) for f in rp.gens()]) #is automatic: one,x,y,z,t = rp.gens(); #f1 = x**2 + y**2 + z**2 + t**2 + 1; #print "f1 = " +str(f1); ff = [x, y, z, t**2 - 1] print "ff = " + str([str(f) for f in ff]) print ii = rp.ideal("", ff) print "SolvableIdeal: " + str(ii) print rgl = ii.leftGB() print "seq left GB: " + str(rgl) print "isLeftGB: " + str(rgl.isLeftGB()) print s = rgl.leftSyzygy() print "syzygy: " + str(s) print t = rgl.isLeftSyzygy(s) print "is syzygy: " + str(t) print "is syzygy: " + str(s.isLeftSyzygy(rgl))
rp = SolvPolyRing(QQ(), "x,y,z,t", PolyRing.lex, relations); print "SolvPolyRing: " + str(rp); print; print "gens =" + str([ str(f) for f in rp.gens() ]); #is automatic: one,x,y,z,t = rp.gens(); #f1 = x**2 + y**2 + z**2 + t**2 + 1; #print "f1 = " +str(f1); ff = [ x, y, z, t**2 - 1 ]; print "ff = " + str([ str(f) for f in ff ]); print ii = rp.ideal( "", ff ); print "SolvableIdeal: " + str(ii); print; rgl = ii.leftGB(); print "seq left GB: " + str(rgl); print "isLeftGB: " + str(rgl.isLeftGB()); print; s = rgl.leftSyzygy(); print "syzygy: " + str(s); print; t = rgl.isLeftSyzygy(s); print "is syzygy: " + str(t);
# print "monic(b) = " +str(bm); # print # exit(0); f1 = x ** 2 + y ** 2 + z ** 2 + t ** 2 + 1 print "f1 = ", f1 f2 = t * x * f1 print "f2 = ", f2 F = [f1, f2] print "F =", [str(f) for f in F] print I = pt.ideal(list=F) print "SolvableIdeal: " + str(I) print # exit(0); rgl = I.leftGB() print "seq left GB:" + str(rgl) print "isLeftGB: " + str(rgl.isLeftGB()) print # rgr = I.rightGB(); # print "seq right GB:" + str(rgr); # print "isRightGB: " + str(rgr.isRightGB()); # print;
rm = PolyRing(rcs, "u,v,w", PolyRing.lex) #is automatic: [one,x,y,z,t,u,v,w] = rm.gens(); mrel = [v, u, u * v + x, w, v, v * w + y, w, u, u * w - z] print "mrel: = " + str([str(r) for r in mrel]) print rs = SolvPolyRing(rcs, "u,v,w", PolyRing.lex, mrel) #exit(0) ff = [(w**2 - v * u) * v * w**2, (u**3 + t) * v * w**2, (v * u**2 - x * y) * v * w**2] f = rs.ideal("", ff) print "f: " + str(f) print #exit(0) #startLog(); lf = f.leftGB() print "lf: " + str(lf) print ff = [(w**2 - v * u) * w, (u**3 + t) * w, (v * u**2 - x * y) * w] f = rs.ideal("", ff) print "f: " + str(f) print
# Ore extension solvable polynomial example, modules rp = PolyRing(QQ(), "x,y,z,t", PolyRing.lex) #is automatic: [one,x,y,z,t] = rp.gens(); trel = [z, y, y * z + x, t, y, y * t + y, t, z, z * t - z] print "trel: = " + str([str(f) for f in trel]) print rs = SolvPolyRing(QQ(), "x,y,z,t", PolyRing.lex, trel) #exit(0) 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)
r = SolvPolyRing( PolyRing(ZZ(),"a, c, b",PolyRing.lex), "y2, y1, z1, z2, x",PolyRing.grad); print "Ring: " + str(r); print; one,a,c,b,y2,y1,z1,z2,x = r.gens(); p1 = x + 2 * y1 * z1 + 3 * a * y1**2 + 5 * y1**4 + 2 * c * y1; p2 = x + 2 * y2 * z2 + 3 * a * y2**2 + 5 * y2**4 + 2 * c * y2; p3 = 2 * z2 + 6 * a * y2 + 20 * y2**3 + 2 * c; p4 = 3 * z1**2 + y1**2 + b; p5 = 3 * z2**2 + y2**2 + b; F = [p1,p2,p3,p4,p5]; g = r.ideal( "", F ); print "Ideal: " + str(g); print; #startLog(); rg = g.leftGB(); print "GB: " + str(rg); print; bg = rg.isLeftGB(); print "isGB: " + str(bg); print; startLog(); terminate();
zrelations = [z, y, y * z + x ]; print "zrelations: = " + str([ str(f) for f in zrelations ]); print; pz = SolvPolyRing(QQ(), "x,y,z", PolyRing.lex, zrelations); print "SolvPolyRing: " + str(pz); print; #startLog(); #fl = [ z**2 + y, y**2 + x]; fl = [ z**2 + y, x]; ff = pz.ideal("",fl); print "ideal ff: " + str(ff); print; ff = ff.twosidedGB(); print "ideal ff: " + str(ff); print; f0 = SLR(ff,z + x + y + 1); print "f0 = " + str(f0); #f1 = SLR(ff, z-y+1 ); #f1 = SLR(ff, y*z+1 ); f1 = SLR(ff, y*z+x+1 ); print "f1 = " + str(f1);
print "f1 = " + str(f1) print "f2 = " + str(f2) f3 = f1 * f2 print "f3 = " + str(f3) f4 = f2 * f1 print "f4 = " + str(f4) ff = [f4, f3] print "ff = [" + str([str(f) for f in ff]) print #exit(0); ii = rp2.ideal("", ff) print "SolvableIdeal: " + str(ii) print rgl = ii.leftGB() print "seq left GB: " + str(rgl) print "isLeftGB: " + str(rgl.isLeftGB()) print rgr = ii.rightGB() print "seq right GB: " + str(rgr) print "isRightGB: " + str(rgr.isRightGB()) print #startLog();
rp = PolyRing(QQ(),"x,y,z,t",PolyRing.lex); #is automatic: [one,x,y,z,t] = rp.gens(); trel = [ z, y, y * z + x, t, y, y * t + y, t, z, z * t - z ]; print "trel: = " + str([ str(f) for f in trel ]); print; rs = SolvPolyRing(QQ(),"x,y,z,t",PolyRing.lex,trel); #exit(0) 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 ] ];
zrelations = [z, y, y * z + x ]; print "zrelations: = " + str([ str(f) for f in zrelations ]); print; pz = SolvPolyRing(QQ(), "x,y,z", PolyRing.lex, zrelations); print "SolvPolyRing: " + str(pz); print; #startLog(); #fl = [ z**2 + y, y**2 + x]; fl = [ z**2 + y, x]; ff = pz.ideal("",fl); print "ideal ff: " + str(ff); print; ff = ff.twosidedGB(); print "ideal ff: " + str(ff); print; f0 = SLC(ff,z + x + y + 1); print "f0 = " + str(f0); #f1 = SLC(ff, z-y+1 ); #f1 = SLC(ff, y*z+1 ); f1 = SLC(ff, y*z+x+1 ); print "f1 = " + str(f1);
#f3 = (v - u)*f1; #f3 = f1*(v - u); f3 = v*f1*u; #print "f3 = " + str(f3); #ff = [ f3, f3 ]; ff = [ f1, f2, f3 ]; #ff = [ f1 ]; #ff = [ u ]; # isTwoSided ideal if uv = vu #ff = [ v ]; # isTwoSided ideal if uv = vu #ff = [ w ]; # no twoSided ideal print "ff = " + str( [ str(r) for r in ff ] ); print ii = pt.ideal( "", ff ); print "SolvableIdeal: " + str(ii); print; #syl = ii.leftSyzygy().leftGB(); #print "left syzygy: " + str(syl); #print; #syr = ii.rightSyzygy().rightGB(); #print "right syzygy: " + str(syr); #print; #exit(0); #startLog();
print "f1 = " +str(f1); print "f2 = " +str(f2); f3 = f1 * f2; print "f3 = " +str(f3); f4 = f2 * f1; print "f4 = " +str(f4); ff = [ f4 , f3 ]; print "ff = [" + str([ str(f) for f in ff ]); print #exit(0); ii = rp2.ideal( "", ff ); print "SolvableIdeal: " + str(ii); print; rgl = ii.leftGB(); print "seq left GB: " + str(rgl); print "isLeftGB: " + str(rgl.isLeftGB()); print; rgr = ii.rightGB(); print "seq right GB: " + str(rgr); print "isRightGB: " + str(rgr.isRightGB()); print; #startLog();
#is automatic: [one,x,y,z] = pcz.gens(); zrelations = [z, y, y * z + x] print "zrelations: = " + str([str(f) for f in zrelations]) print pz = SolvPolyRing(QQ(), "x,y,z", PolyRing.lex, zrelations) print "SolvPolyRing: " + str(pz) print #startLog(); #fl = [ z**2 + y, y**2 + x]; fl = [z**2 + y, x] ff = pz.ideal("", fl) print "ideal ff: " + str(ff) print ff = ff.twosidedGB() print "ideal ff: " + str(ff) print f0 = SLC(ff, z + x + y + 1) print "f0 = " + str(f0) #f1 = SLC(ff, z-y+1 ); #f1 = SLC(ff, y*z+1 ); f1 = SLC(ff, y * z + x + 1) print "f1 = " + str(f1)