f2 = y*x + x + y; print "f1 = " + str(f1); print "f2 = " + str(f2); print; c1 = f1 * f2; c2 = f2 * f1; s = c1 - c2; print "c1 = " + str(c1); print "c2 = " + str(c2); print "s = " + str(s); print; F = r.ideal( list=[f1,f2] ); print "F = " + str(F); print; startLog(); G = F.GB(); print "G = " + str(G); print "isGB(G) = " + str(G.isGB()); print; F = r.ideal( list=[f1,f2,c1,c2,s] ); print "F = " + str(F); print;
f2 = y * x + x + y print "f1 = " + str(f1) print "f2 = " + str(f2) print c1 = f1 * f2 c2 = f2 * f1 s = c1 - c2 print "c1 = " + str(c1) print "c2 = " + str(c2) print "s = " + str(s) print F = r.ideal(list=[f1, f2]) print "F = " + str(F) print startLog() G = F.GB() print "G = " + str(G) print "isGB(G) = " + str(G.isGB()) print F = r.ideal(list=[f1, f2, c1, c2, s]) print "F = " + str(F) print G = F.GB()
x * x , y * y , z * z ]; # ( a*b + c*f + g*h ), # ( u*v + w*x + y*z ), # ( a*v + w*x + y*z ) ff = [ ( a*b + c*f + g*h ), ( u*v + w*x + y*z ) ]; fi = r.ideal("", ff + rs); print "WordPolyIdeal: " + str(fi); print; #startLog(); gi = fi.GB(); print "seq GB: " + str(gi); print; # from exterior.rb # ee = [ ( g * h + c * f + a * b ), ( y * z + w * x + u * v ), ( c * f * g + a * b * g ),
f3 = g**3 + g**2 - b print "r1 = " + str(r1) print "r2 = " + str(r2) print "r3 = " + str(r3) print "r4 = " + str(r4) print "r5 = " + str(r5) print "r6 = " + str(r6) print "r7 = " + str(r7) print "r8 = " + str(r8) print "f1 = " + str(f1) print "f2 = " + str(f2) print "f3 = " + str(f3) print F = r.ideal(list=[r1, r2, r3, r4, r5, r6, r7, r8, f1, f2, f3]) #F = r.ideal( list=[r1,r2,f1,f2,f3] ); print "F = " + str(F) print startLog() G = F.GB() print "G = " + str(G) print "isGB(G) = " + str(G.isGB()) print # now as solvable polynomials p = PolyRing(QQ(), "a,b,e1,e2,e3") #is automatic: [one,a,b,e1,e2,e3] = p.gens();
print "one = " + str(one) print "x = " + str(x) print "y = " + str(y) print "z = " + str(z) print f1 = x * y - z f2 = y * z + 2 * x + z f3 = y * z + x print "f1 = " + str(f1) print "f2 = " + str(f2) print "f3 = " + str(f3) print F = r.ideal(list=[f1, f2, f3]) print "F = " + str(F) print startLog() G = F.GB() print "G = " + str(G) print "isGB(G) = " + str(G.isGB()) print # exit(0); c1 = f1 * f2 c2 = f2 * f1 s = c1 - c2
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] # make all variables commute cm = [RingElem(q) for q in r.ring.commute()] print "commute: " + str([str(q) for q in cm]) print g = r.ideal("", F + cm) print "Ideal: " + str(g) print startLog() rg = g.GB() print "GB: " + str(rg) print bg = rg.isGB() print "isGB: " + str(bg) print #startLog(); terminate()
a * a , b * b , c * c , f * f , g * g , h * h , u * u , v * v , w * w , x * x , y * y , z * z ]; fi = r.ideal("", rs); print "WordPolyIdeal: " + str(fi); print; ff = [ ( a*b + c*f + g*h ), ( u*v + w*x + y*z ), ( a*v + w*x + y*z ) ]; r1 = WRC(fi,ff[0]); print "r1: " + str(r1); r2 = WRC(fi,ff[1]); print "r2: " + str(r2);
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]; # make all variables commute cm = [ RingElem(q) for q in r.ring.commute() ]; print "commute: " + str( [ str(q) for q in cm] ); print; g = r.ideal( "", F + cm ); print "Ideal: " + str(g); print; startLog(); rg = g.GB(); print "GB: " + str(rg); print; bg = rg.isGB(); print "isGB: " + str(bg); print; #startLog(); terminate();
f3 = e3**3 + e3**2 - b; print "r1 = " + str(r1); print "r2 = " + str(r2); print "r3 = " + str(r3); print "r4 = " + str(r4); print "r5 = " + str(r5); print "r6 = " + str(r6); print "r7 = " + str(r7); print "r8 = " + str(r8); print "f1 = " + str(f1); print "f2 = " + str(f2); print "f3 = " + str(f3); print; F = r.ideal( list=[r1,r2,r3,r4,r5,r6,r7,r8,f1,f2,f3] ); #F = r.ideal( list=[r1,r2,f1,f2,f3] ); print "F = " + str(F); print; startLog(); G = F.GB(); print "G = " + str(G); print "isGB(G) = " + str(G.isGB()); print; # now as solvable polynomials p = PolyRing(QQ(),"a,b,e1,e2,e3");
print "one = " + str(one) print "x = " + str(x) print "y = " + str(y) print "z = " + str(z) print f1 = x * y - z f2 = y * z + 2 * x + z f3 = y * z + x print "f1 = " + str(f1) print "f2 = " + str(f2) print "f3 = " + str(f3) print F = r.ideal(list=[f1, f2, f3]) print "F = " + str(F) print startLog() G = F.GB() print "G = " + str(G) print "isGB(G) = " + str(G.isGB()) print #exit(0); c1 = f1 * f2 c2 = f2 * f1 s = c1 - c2
v * g - g * v, w * g - g * w, x * g - g * x, y * g - g * y, z * g - g * z, u * h - h * u, v * h - h * v, w * h - h * w, x * h - h * x, y * h - h * y, z * h - h * z, v * u - u * v, w * u - u * w, x * u - u * x, y * u - u * y, z * u - u * z, w * v - v * w, x * v - v * x, y * v - v * y, z * v - v * z, x * w - w * x, y * w - w * y, z * w - w * z, y * x - x * y, z * x - x * z, z * y - y * z, a * a, b * b, c * c, f * f, g * g, h * h, u * u, v * v, w * w, x * x, y * y, z * z ] # ( a*b + c*f + g*h ), # ( u*v + w*x + y*z ), # ( a*v + w*x + y*z ) ff = [(a * b + c * f + g * h), (u * v + w * x + y * z)] fi = r.ideal("", ff + rs) print "WordPolyIdeal: " + str(fi) print #startLog(); gi = fi.GB() print "seq GB: " + str(gi) print # from exterior.rb # ee = [ (g * h + c * f + a * b), (y * z + w * x + u * v), (c * f * g + a * b * g), (c * f * h + a * b * h), (w * x * y + u * v * y), (w * x * z + u * v * z), a * b * c * g, a * b * f * g, a * b * c * h, a * b * f * h, a * b * c * f,
f1 = x4*x4 - 25*x4*x2 - x1*x4 - 6*x1*x3 - 9*x1*x2 + x1*x1; f2 = x4*x4 - 4*x4*x3 + 13*x4*x2 + 12*x4*x1 - 9*x3*x4 + 4*x3*x2 + 41*x3*x1 - 7*x1*x4 - x1*x2; f3 = x4*x4 + 12*x4*x3 - 4*x3*x3 - 9*x3*x2 + 9*x1*x4 + x1*x1; f4 = x4*x4 - 14*x4*x3 - 17*x4*x2 - 5*x2*x2 - 42*x1*x4; f5 = x4*x4 - 2*x4*x3 + 2*x4*x2 - 7*x4*x1 - x2*x2 - 13*x2*x1 - 4*x1*x3 + 2*x1*x2 - x1*x1; f6 = x4*x4 + 7*x4*x2 - 15*x4*x1 - 9*x3*x4 + 4*x2*x2 + 15*x2*x1 + x1*x2; print "f1 = " + str(f1); print "f2 = " + str(f2); print "f3 = " + str(f3); print "f4 = " + str(f4); print "f5 = " + str(f5); print "f6 = " + str(f6); print ff = r.ideal( "", [f1,f2,f3,f4,f5,f6] ); #]) # print "ff = " + str(ff); print; startLog(); gg = ff.GB(); print "gg = " + str(gg); print print "isGB(gg) = " + str(gg.isGB()); print #hh = gg.sum(gg); #hh = hh.GB(); #print "hh = " + str(hh); #print
f1 = x4 * x4 - 25 * x4 * x2 - x1 * x4 - 6 * x1 * x3 - 9 * x1 * x2 + x1 * x1 f2 = x4 * x4 - 4 * x4 * x3 + 13 * x4 * x2 + 12 * x4 * x1 - 9 * x3 * x4 + 4 * x3 * x2 + 41 * x3 * x1 - 7 * x1 * x4 - x1 * x2 f3 = x4 * x4 + 12 * x4 * x3 - 4 * x3 * x3 - 9 * x3 * x2 + 9 * x1 * x4 + x1 * x1 f4 = x4 * x4 - 14 * x4 * x3 - 17 * x4 * x2 - 5 * x2 * x2 - 42 * x1 * x4 f5 = x4 * x4 - 2 * x4 * x3 + 2 * x4 * x2 - 7 * x4 * x1 - x2 * x2 - 13 * x2 * x1 - 4 * x1 * x3 + 2 * x1 * x2 - x1 * x1 f6 = x4 * x4 + 7 * x4 * x2 - 15 * x4 * x1 - 9 * x3 * x4 + 4 * x2 * x2 + 15 * x2 * x1 + x1 * x2 print "f1 = " + str(f1) print "f2 = " + str(f2) print "f3 = " + str(f3) print "f4 = " + str(f4) print "f5 = " + str(f5) print "f6 = " + str(f6) print ff = r.ideal("", [f1, f2, f3, f4, f5, f6]) #]) # print "ff = " + str(ff) print startLog() gg = ff.GB() print "gg = " + str(gg) print print "isGB(gg) = " + str(gg.isGB()) print #hh = gg.sum(gg); #hh = hh.GB(); #print "hh = " + str(hh);