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 - accessing intrnal functions of a library
Author Message
  Post subject:  Re: accessing intrnal functions of a library  Reply with quote
It is a bit more complicated than I wrote.
Inspecting the code how ClosureRees is called from the proc normalI
one sees that one has to set the new basering first.
Code:

list Rees = ReesAlgebra(I);
  def R(1)=Rees[1];
  def Kxt=Rees[2];
  setring R(1);

  if (dblvl>0)
  {
    R(1);
    ker;
    "";
    "// Now ClosureRees computes generators for the integral closure";
    "// of R[It] step by step";
  }

  // ClosureRees computes fractions in R[x,t] representing the generators
  // of the closure of R[It] in k[x,t], which is the same as the closure
  // in Q(R[It]).
  // the first size(images)-1 entries are the numerators of the gene-
  // rators, the last entry is the 'universal' denominator

  setring Kxt;
  list images = ClosureRees(Rees);

So you may proceed in your example:
Code:
> ring r=2,(x,y),dp;      //  ordering dp: see the Note below.
> ideal i=x2+x5,x2*x4y,y2+y5;
> list reesi=ReesAlgebra(i);reesi;
>  def Kxt=reesi[2];
> setring Kxt;
> list images = ClosureRees(reesi);

which gives
Code:
pause>
// Get back to the original basering and construct the
// generators of the closure of I

// Back in k[x,t], the fractions, stored in the list images:
// ** redefining j **
numerator 1 : x10+x7
numerator 2 : x9y+x6y
numerator 3 : x14t+x8t
numerator 4 : x15yt+x12yt
numerator 5 : x9y5t+x9y2t+x6y5t+x6y2t
numerator 6 : x15yt2+x12y4t2+x9y4t2+x9yt2
numerator 7 : x12y9t3+x9y9t3+x12y3t3+x9y3t3
numerator 8 : x10y4t+x10yt+x7y4t+x7yt

denominator:   x9+x6
pause>

Note: In your example you use the ordering ds. Do you really expect to work in the local case? As far as I see, computations are done with global ordering (see the examples and the description). I have chosen above the
ordering dp. But ds will give the same result since internally the
proc switches to the global ordering dp.
Post Posted: Wed Sep 05, 2012 2:18 pm
  Post subject:  Re: accessing intrnal functions of a library  Reply with quote
Thanks, but....
I copied reesclos.lib to my home directory and put // in front of static as suggeted.
That did indeed let me start computing ClosureRees(ReesAlgebra(i)), which I couldn't do before.
But I quickly got an error message that I don't understand:

LIB "/home/leonada/reesclos.lib";
> ring r=2,(x,y),ds;
> ideal i=x2+x5,x2*x4y,y2+y5;
> list reesi=ReesAlgebra(i);reesi;
[1]:
// characteristic : 2
// number of vars : 5
// block 1 : ordering dp
// : names x y U(1) U(2) U(3)
// block 2 : ordering C
[2]:
// characteristic : 2
// number of vars : 3
// block 1 : ordering dp
// : names x y t
// block 2 : ordering C
> ClosureRees(reesi);
? incompatible type in list assignment
? error occurred in or before /home/leonada/reesclos.lib::ClosureRees line 353: ` map psi=R(1),mapI; // from ReesAlgebra: the map Rees->Kxt`
? expected map-expression. type 'help map;'
? leaving /home/leonada/reesclos.lib::ClosureRees
skipping text from `;` error at token `)`
Post Posted: Tue Sep 04, 2012 10:32 pm
  Post subject:  Re: accessing intrnal functions of a library  Reply with quote
Open the the file reesclos.lib, which is located in your LIB subdirectory,
in a editor and but // in front of the command static.
Code:
//static
proc ClosureRees (list L)
Compare with the original file:
http://www.singular.uni-kl.de/svn/trunk ... esclos.lib

Save the file and load the the library again.
Now the proc reesclos.lib will be user available.

(If you don't want to modify the code, you can outsmart the behaviour
of the static proc by calling it from an another proc. Wrap it into
Code:
proc closurerees(list L) {return(ClosureRees(L));}
Then you may call closurerees instead.)

The appropriate input for ClosureRees is the output from the proc ReesAlgebra. So call, where I is an ideal
Code:
ClosureRees(ReesAlgebra(I))


More information about the ongoing computation is obtained as follows:

1.) The author of the library has built in some messages which
will be shown when you set the system variable
printlevel to a large positive value. E.g.:
Code:
printlevel = 5;
At some stages you have to hit the return key to let the computation
continue. (Reset by printlevel =0;)

2.) If you set TRACE = 3; then the code will be echoed, line by line,
and you have to press each time RETURN. (Reset by TRACE =0;)
Post Posted: Tue Sep 04, 2012 9:57 pm
  Post subject:  accessing intrnal functions of a library  Reply with quote
I would like to see what the function ClosureRees in reesclos.lib actually does by running it on test input,
but it seems not to be exported. What is the best way access this?

Doug
Post Posted: Tue Sep 04, 2012 2:58 pm


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