#---------------- EXERCISE 1 ---------------------------- > restart; with(Groebner): > F := [ > z^2-12*x*z-10*y*z+36*x^2+60*x*y+25*y^2, > 9*z^2+5*y*z-6*x*z+6*y^2+4*x*y+x^2-3*z-y+x, > 11*x*z-2*x*y-x^2+12*y*z+3*y^2-7*z^2, > x^3+6*x^2*y-4*x^2*z+9*x*y^2-12*x*y* > z+4*z^2*x-2*x^2-x*y+8*x*z-9*z^2-6*y*z-y^2+3*z+y-x > ]; 2 2 2 F := [z - 12 x z - 10 y z + 36 x + 60 x y + 25 y , 2 2 2 9 z + 5 y z - 6 x z + 6 y + 4 x y + x - 3 z - y + x, 2 2 2 3 2 2 2 11 x z - 2 x y - x + 12 y z + 3 y - 7 z , x + 6 x y - 4 x z + 9 x y 2 2 2 2 - 12 x y z + 4 z x - 2 x - x y + 8 x z - 9 z - 6 y z - y + 3 z + y - x] > ord := lexdeg([x],[y,z]); ord := lexdeg([x], [y, z]) > gbasis(F,ord); 2 2 3 2 [143 y - 187 z + 100 y z, 3249 z - 257 z - 572 y z, 2 2 2 3249 y z - 748 z + 143 y z, 26 x + 209 y z + 323 z - 78 z - 26 y] # I didn't get an equation that involves only x. That's because I used # the wrong term-ordering. The term-ordering I used eliminates x as much # as possible. But I want an equation that involves only x. So I need # to eliminate y,z as much as possible, so the ordering should be: > ord := lexdeg([y,z],[x]); ord := lexdeg([y, z], [x]) > gbasis(F,ord); 4 2 3 2 3 [3249 x + 112 x + 1311 x , 336 x z + 1289 x + 5415 x , 3 2 2 2 3 49 y + 147 z - 20577 x - 5776 x - 49 x, 37632 z - 216907 x - 709365 x ] > remove(has,%,{y,z}); 4 2 3 [3249 x + 112 x + 1311 x ] > factor(%[1]); 2 x (57 x + 16) (57 x + 7) # So x = 0 or -16/57 or -7/57 # # Note: If you want to compute the corresponding values of y,z # for one of those x-values, then just substitute that x-value # and solve the remaining equations in y,z in a similar way. E.g. # if you want to know what y,z are when x is say -16/57, then do: # F1 := subs(x=-16/57, F); # ord := lexdeg([z],[y]); # gbasis(F1, ord); # remove(has,%,z); # Now we have an equation for y. Factor it to read of the # solutions, then substitute those y-value(s) into F1, and # then we have equations in just 1 variable z. To solve those, # just take their gcd and then factor. # However, the exercise only asked for the x-values, so you don't # need to do all those steps. #---------------- EXERCISE 2 ---------------------------- > restart; with(Groebner): > F := {y^5+2*x*y^2+2*x*y^3+x^2*y-4*x^3*y+2*x^5, > 2*y^2+2*y^3+2*x*y-12*x^2*y+10*x^4, 5*y^4+4*x*y > +6*x*y^2+x^2-4*x^3}; 5 2 3 2 3 5 F := {y + 2 x y + 2 x y + x y - 4 x y + 2 x , 2 3 2 4 4 2 2 3 2 y + 2 y + 2 x y - 12 x y + 10 x , 5 y + 4 x y + 6 x y + x - 4 x } > f1 := x*y^2+3*y^3+x^2+4*x*y-x^3; 2 3 2 3 f1 := x y + 3 y + x + 4 x y - x > f2 := y^4+x^2+4*x*y; 4 2 f2 := y + x + 4 x y > f3 := y^4-x^2-4*x*y+4*x^3; 4 2 3 f3 := y - x - 4 x y + 4 x > f4 := x*(y-1)*(x^2-x+1); 2 f4 := x (y - 1) (x - x + 1) > ord := tdeg(x,y); ord := tdeg(x, y) > G := gbasis(F,ord); 2 3 2 2 3 2 3 3 G := [x y + 4 y + x + 4 x y, x y - y - x y - y , x + y , 4 3 2 y - 4 y - x - 4 x y] > for f in [f1,f2,f3,f4] do reduce(f, G, ord) od; 0 2 3 x + 4 x y + 2 y 0 3 2 -4 x y - x - 4 y - y # So f1 and f3 are in the ideal, but f2 and f4 are not. > gbasis(F union {t*f2 - 1}, tdeg(x,y,t)); 2 [x - 14 t - 2 y - 4, 28 t + y + 24 t + 4, 2 y t - 4 t - 1, 2 y + 2 y + 14 t + 4] > gbasis(F union {t*f4 - 1}, tdeg(x,y,t)); [1] # So f4 is in the radical ideal, but f2 is not. #---------------- EXERCISE 3a ---------------------------- > equations := > y1 = x1^2 + x2^2, > y2 = x1^3 + x2^3, > y3 = x1^4 + x2^4 : > > equations := {seq(rhs(i)-lhs(i), i=equations)}; 3 3 4 4 2 2 equations := {x1 + x2 - y2, x1 + x2 - y3, x1 + x2 - y1} > > ord := lexdeg([x1,x2],[y1,y2,y3]); ord := lexdeg([x1, x2], [y1, y2, y3]) > G := gbasis(equations, ord): > remove(has, G, {x1,x2}); 6 2 3 4 2 2 2 3 [y1 - 4 y2 y1 - 4 y2 + 12 y3 y1 y2 - 3 y3 y1 - 2 y3 ] # This polynomial gives a relation between y1,y2,y3. #---------------- EXERCISE 3b ---------------------------- > for k to 8 do > f[k] := x1^k + x2^k > od; f[1] := x1 + x2 2 2 f[2] := x1 + x2 3 3 f[3] := x1 + x2 4 4 f[4] := x1 + x2 5 5 f[5] := x1 + x2 6 6 f[6] := x1 + x2 7 7 f[7] := x1 + x2 8 8 f[8] := x1 + x2 > reduce(f[5],G,ord); 2 2 x2 y3 + x1 y3 - x2 y1 - y1 x1 + 2 y1 y2 > indets(%); {y3, y1, x1, x2, y2} # f[5] can not be written as a polynomial in y1,y2,y3 because if # it could, the above computation would have found it. > for k to 8 do > indets( reduce(f[k], G, ord) ) > od; {x1, x2} {y1} {y2} {y3} {y3, y1, x1, x2, y2} {y3, y1} {y3, y1, x1, x2, y2} {y3, y1} # We see that f[2], f[3], f[4], f[6], and f[8] can be written # in terms of y1,y2,y3. #---------------- EXERCISE 4 ---------------------------- > I1 := {x^4 + y^4 + x^2*y^2, x^3 + y^5}; 4 2 2 4 3 5 I1 := {x + x y + y , x + y } > I2 := {x^5+y^6, x^6+y^7}; 5 6 6 7 I2 := {x + y , x + y } > gbasis( > {seq(t*i, i=I1), seq((1-t)*i,i=I2)} > ,lexdeg([t],[x,y])): > remove(has,%,t); 7 7 6 6 [x + y - x y - y x, 2 6 5 3 6 2 7 8 6 7 6 5 2 y x - 2 x y + y x - 2 x y - 2 y - 3 x y + 3 y + 2 x + y x , 9 5 3 6 2 7 6 2 5 6 7 6 5 y + x y - y x + x y + x y - y x - y x - y - x - y x , 8 5 3 7 6 7 6 6 5 x y + x y + x y + x y - 2 y - 2 x + y + x , 7 2 5 3 6 2 7 6 2 5 7 6 5 2 y x + 2 x y + y x + 2 x y + x y + 2 y x - y - 2 x + y x , 6 3 5 3 6 2 7 6 7 6 5 2 y x + 2 x y + y x + 2 x y + 3 x y - y - 2 x + y x ] # The above polynomials generate the ideal (I1) intersected (I2).