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

Moving a polynomial from one ring to another
https://www.singular.uni-kl.de/forum/viewtopic.php?f=10&t=2909
Page 1 of 1

Author:  alec [ Fri May 01, 2020 1:00 pm ]
Post subject:  Moving a polynomial from one ring to another

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! :)

Author:  hannes [ Tue May 05, 2020 2:56 pm ]
Post subject:  Re: Moving a polynomial from one ring to another

Use imap:
imap maps variables and paramaters of the source ring to the variables and paramters with the same name in the current ring.

Author:  alec [ Tue May 05, 2020 8:18 pm ]
Post subject:  Re: Moving a polynomial from one ring to another

Perfect! Thank you, I'm very grateful for your help.

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