Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Moving a polynomial from one ring to another
PostPosted: Fri May 01, 2020 1:00 pm 
I'd like to find the number of real roots of a polynomial f obtained as a resultant using mp_res_mat(). To do this, I write:
LIB "solve.lib";
LIB "rootsur.lib";
ring r = (0,x),(y),dp;
poly p1 = 2*(1+x^2)^2*(1+y^2)*(x^5-x+y)-y^4*x*(1+y^2)-2*x^3*(1+x^2)^2;
poly p2 = 2*(1+y^2)^2*(1+x^2)*(y^5-y-x)-x^4*y*(1+x^2)-2*y^3*(1+y^2)^2;
ideal i = p1,p2;
poly f = det(mp_res_mat(i));

I would now like to invoke nrroots(f), but x is a parameter in the ring r, not a variable, so this doesn't work. How can I take f to a new ring s = 0,x,dp and then invoke nrroots(f)?

Thanks in advance! :)


Report this post
Top
  
Reply with quote  
 Post subject: Re: Moving a polynomial from one ring to another
PostPosted: Tue May 05, 2020 2:56 pm 

Joined: Wed May 25, 2005 4:16 pm
Posts: 275
Use imap:
imap maps variables and paramaters of the source ring to the variables and paramters with the same name in the current ring.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Moving a polynomial from one ring to another
PostPosted: Tue May 05, 2020 8:18 pm 
Perfect! Thank you, I'm very grateful for your help.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 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