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

Some questions
https://www.singular.uni-kl.de/forum/viewtopic.php?f=10&t=1448
Page 1 of 1

Author:  Hossein Movasati [ Thu Aug 11, 2005 5:33 pm ]
Post subject:  Some questions

Hi

I have written some proceedures and I have observed that
they work well when I restart Singular; Otherwise they just
start doing something and when I want to interupt them then I get:

//**Interupt at cmd: $INVALID$ in line .....

and some times

//**Interupt at cmd: return(aa) ....

(In aa there is no calculations going on; it contains a polynomial)


Another Question: If inside a proceedure one wants
to add a new parameter to the basering (outside the proceedure)
and do some calculations and then export some data
(without containing the new parameter) to the basering,
which combination of commands one must use?


Bests
.

email: movasati@mathematik.tu-darmstadt.de
Posted in old Singular Forum on: 2005-08-03 09:37:31+02

Author:  lossen [ Tue Oct 04, 2005 2:27 pm ]
Post subject: 

Dear Hossein,

concerning your second question, you should try something like this:

Code:
proc testp (poly p)
{
  def BR = basering;
 
  // Set up new ring and make it the active ring:
  //====================================
  list L = ringlist(basering);
  int s = size(L[2]);   // number of variables
  L[2][s+1] = "@t";     // add new variable with name @t
  int m = size(L[3]);   // number of blocks in def. of ordering
  L[3][m+1] = list("lp",intvec(1));  // implement product ordering
  def newRing = ring(L);
  setring newRing;

  // Compute in the new basering:
  //=========================
  ideal I = @t^2*imap(BR,p), @t^2+var(1)+var(2);
  I = eliminate(I,@t);  // output does not depend on @t
             
  // Transfer results to the previous basering:
  //==================================
  setring BR;
  ideal I = imap(newRing,I);

  return(I);
}


Christoph Lossen
(SINGULAR Team)

Author:  hannes [ Fri Nov 11, 2005 4:31 pm ]
Post subject: 

Concerning your first question:
factorize and therefor commands using factorize run sometimes into an infinite
loop:
Solution: update to version 3-0-1.

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