// SCI CODE // Determining the desired monomial coefficient // We are looking for the coefficient of the monomial x1*x2^3*(x3*x4*x5)^4*x6^3*x7*y1*y2^3*(y3*y4*y5*y6)^4*y7^3*y8 // in the polynomial: // //f := func< x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8 | (x1-x2)*(x1-x3)*(x2-x3)*(x2-x4)*(x3-x4)*(x3-x5)*(x4-x5)*(x4-x6)*(x5-x6)*(x5-x7)*(x6-x7)*(y1-x1)*(y1-x2)*(y2-x1)*(y2-x2)*(y2-x3)*(y1-y2)*(y2-y3)*(y3-y4)*(y4-y5)*(y5-y6)*(y6-y7)*(y7-y8)*(y3-x1)*(y3-x2)*(y3-x3)*(y3-x4)*(y4-x2)*(y4-x3)*(y4-x4)*(y4-x5)*(y5-x3)*(y5-x4)*(y5-x5)*(y5-x6)*(y6-x4)*(y6-x5)*(y6-x6)*(y6-x7)*(y7-x5)*(y7-x6)*(y7-x7)*(y8-x6)*(y8-x7) >; // // Define a polynomial ring with these variables P := PolynomialRing(Integers(),15); // Now the polynomial is too big to deal with in one chunk so we isolate terms that have the desired degree on each variable x_i for 0 < i < 8. We add enough terms in the first polynomial to have at least one linear factor with each of the variables. fx1 := func< x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8 | (x1-x2)*(x1-x3)*(y1-x1)*(y2-x1)*(y3-x1)*(x4-x5)*(x6-x7)*(y4-y5)*(y6-y7)*(y7-y8) >; C1 := Coefficient(fx1(x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8), x1, 1); fx2 := func< x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8 | x1*C1*(x2-x3)*(x2-x4)*(y1-x2)*(y2-x2)*(y3-x2)*(y4-x2) >; C2 := Coefficient(fx2(x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8), x2, 3); fx3 := func< x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8 |x2^3*C2*(x3-x4)*(x3-x5)*(y2-x3)*(y3-x3)*(y4-x3)*(y5-x3) >; C3 := Coefficient(fx3(x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8), x3, 4); fx4 := func< x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8 | x3^4*C3*(x4-x6)*(y4-x4)*(y5-x4)*(y6-x4)*(y3-x4) >; C4 := Coefficient(fx4(x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8), x4, 4); fx5 := func< x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8 | x4^4*C4*(x5-x6)*(x5-x7)*(y4-x5)*(y5-x5)*(y6-x5)*(y7-x5) >; C5 := Coefficient(fx5(x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8), x5, 4); fx6 := func< x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8 | x5^4*C5*(y5-x6)*(y6-x6)*(y7-x6)*(y8-x6) >; C6 := Coefficient(fx6(x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8), x6, 3); fx7 := func< x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8 | x6^3*C6*(y6-x7)*(y7-x7)*(y8-x7) >; C7 := Coefficient(fx7(x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8), x7, 1); //We have now reduced far enough so that we can take the rest of the terms f := func< x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8 | x7*C7*(y1-y2)*(y2-y3)*(y3-y4)*(y5-y6) >; MonomialCoefficient( f(x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,y8),x1*x2^3*(x3*x4*x5)^4*x6^3*x7*y1*y2^3*(y3*y4*y5*y6)^4*y7^3*y8);