Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Why the "resultant" command doesn't work in my code?
PostPosted: Thu Apr 16, 2020 8:31 am 
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!


Report this post
Top
  
Reply with quote  
 Post subject: Re: Why the "resultant" command doesn't work in my code?
PostPosted: Thu Apr 16, 2020 12:05 pm 

Joined: Wed May 25, 2005 4:16 pm
Posts: 275
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;


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

It is currently Fri May 13, 2022 10:54 am
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group