Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Real solutions
PostPosted: Sat Jul 19, 2008 2:11 am 

Joined: Sun Mar 02, 2008 10:17 pm
Posts: 11
Hello,
I have a finite system of polynomial equations with integer coefficients.
Suppose the complex variety defined by the system has dimension
at least 1. Is there an algorithm (preferably implemented in Singular)
to decide whether the variety has a real point?
Thanks.
DZ Djokovic


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Jul 27, 2008 6:53 pm 

Joined: Mon Aug 29, 2005 9:22 am
Posts: 41
Location: Kaiserslautern, Germany
You could try the Singular procedure realrad from realrad.lib which
computes the real radical of an ideal defined over Q.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 01, 2008 1:56 am 

Joined: Sun Mar 02, 2008 10:17 pm
Posts: 11
greuel wrote:
You could try the Singular procedure realrad from realrad.lib which
computes the real radical of an ideal defined over Q.


Thanks for the suggestion. I tried realrad command on my example,
with several different orderings, but ran out of memory in each case.

However I noticed that there may be a bug in realrad command. I get
an error message if I do the following (using emacs):

LIB "realrad.lib";
ring R=0,(v,q,u,p),lp;
ideal i=v2-4vq+q2+1;
realrad(i);

If I repeat this after changing the ring variable names to say x,y,z,u
then it gives me the answer and there is no error message.

DZ Djokovic


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Bug in decision realrad.lib
PostPosted: Tue Feb 09, 2010 8:36 pm 
DZDjokovic wrote:

However I noticed that there may be a bug in realrad command. I get
an error message if I do the following (using emacs):

LIB "realrad.lib";
ring R=0,(v,q,u,p),lp;
ideal i=v2-4vq+q2+1;
realrad(i);

If I repeat this after changing the ring variable names to say x,y,z,u
then it gives me the answer and there is no error message.

DZ Djokovic


There is indeed a bug in the proc decision.
Consider the following lines, where I have already put a
the buggy part into comments.

Code:
/* line 549 ->  */
//   perm="varlist="+varstr(r)+";"; 
//   execute(perm);                  //  here BUG
//   varlist=delete(varlist,n);   
//   for (@z=1;@z<n;@z++)
//   {
//     lessvar=lessvar+","+string(varlist[@z]); 
//   }
//   lessvar=lessvar[2..size(lessvar)];   
   parvar=string(var(n));           
   ri="ring r_neu="+charstr(r)+",(@t,"+parvar+","+lessvar+"),dp;";
   execute(ri);
/* <- line 559 */


Description of the BUG:

The author of the library wants to replace the
variables v(1),...,var(n) by var(n),var(1),...,var(n-1).
To do this, she passes the ringvariables to a string,
then by using execute to a list, to delete the last element.

This execute has the side effect to
evaluate instead of your ring variables
some local variables, with the same name, used
in the procedure.

Then she builts a new string, puts the last variable name
in front of it and create a new ring by calling execute
again.

Note that this excute does not cause problems.
(Unless a reader wants to know why, I will not explain
why the excute for the ring is OK).

Now the first task can be done without a execute.

Patch of the BUG:
Replace in the 8 lines: 549 - 556
the commented code by the following three lines.
Code:
      ideal II = maxideal(1);       
      varlist = II[1..n-1];
      lessvar=string(varlist);
// line 557 ->   
      parvar=string(var(n));           
      ri="ring r_neu="+charstr(r)+",(@t,"+parvar+","+lessvar+"),dp;";
      execute(ri);
// <- line 559


With this patch, it will work as expected. But
wthout, everybody will run in similar problems when using ringvariables g,f, etc.

Try for instance:
Code:
ring R=0,(v,q,u,p),lp;
ideal i=v2-4vq+q2+1;
realrad(i);

ring Rg=0,(v,g,u,p),lp;
ideal i=v2-4vg+g2+1;
realrad(i);

ring Rf=0,(f,q,u,p),lp;
ideal i=f2-4fq+q2+1;
realrad(i);


C. Gorzel


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 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 11:06 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group