Singular
https://www.singular.uni-kl.de/forum/

Why the "resultant" command doesn't work in my code?
https://www.singular.uni-kl.de/forum/viewtopic.php?f=10&t=2907
Page 1 of 1

Author:  Alb [ Thu Apr 16, 2020 8:31 am ]
Post subject:  Why the "resultant" command doesn't work in my code?

LIB "matrix.lib";
ring r=0,(s,t,u,x(0..5)),dp;
varstr(r);
ideal I=x(0)-s2,x(1)-t2,x(2)-u2,x(3)-st,x(4)-su,x(5)-tu;
std(I);
vector v=[x(3)*x(4)-x(0)*x(5),x(1)*x(4)-x(3)*x(5),x(2)*x(3)-x(4)*x(5),x(1 )*x(2)-x(5)^2,x(0)*x(2)-x(4)^2,x(0)*x(1)-x(3)^2];
matrix A[4][6]=1,1,1,1,1,0,0,0,0,0,1,2,2,2,1,1,1,0,0,0,-1,-2,1,0,1;
print(A);
matrix B=A*v;
print(B);
ideal F=flatten(B);
print(F);
ideal J=eliminate(F,x(4)*x(5));
print(J);
poly f=J[1];
print(f);
poly g=J[2];
print(g);
poly h=resultant(f,g,x(3));
the resultat gives me 0.
Instead if I change the ring and try it with the same polynomials as above, it works
like this
ring r=0, (x,y,z,w),dp;
poly f=14xy2+xyz+14xyw-14xw2-zw2-14w3;
poly g=4x2y+6xy2+xyz+10xyw-4xw2-6yw2-yw2-10w3;
resultant(f,g,x);
thank you in advance!

Author:  hannes [ Thu Apr 16, 2020 12:05 pm ]
Post subject:  Re: Why the "resultant" command doesn't work in my code?

The results are correct (resultant is 0 in the first case).
But the polynomials in the second ring are not the same.
This can be checked by defining a map
Code:
map F=r,0,0,0,x,y,z,w,0,0,;
F(f);F(f)-f;
F(g);F(g)-g;

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/