Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - Real solutions
Author Message
  Post subject:  Re: Bug in decision realrad.lib  Reply with quote
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
Post Posted: Tue Feb 09, 2010 8:36 pm
  Post subject:   Reply with quote
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
Post Posted: Fri Aug 01, 2008 1:56 am
  Post subject:   Reply with quote
You could try the Singular procedure realrad from realrad.lib which
computes the real radical of an ideal defined over Q.
Post Posted: Sun Jul 27, 2008 6:53 pm
  Post subject:  Real solutions  Reply with quote
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
Post Posted: Sat Jul 19, 2008 2:11 am


It is currently Fri May 13, 2022 11:06 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group