Changeset 6fe3a0 in git for Singular/LIB/deform.lib


Ignore:
Timestamp:
Apr 25, 2005, 12:13:07 PM (19 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
3329dd9bcf2662f9666579abea56c33dfcb530ac
Parents:
8604751c5a5f572004bf8d35d4307e485b728435
Message:
*hannes/lossen: new libs, new tests


git-svn-id: file:///usr/local/Singular/svn/trunk@7891 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/deform.lib

    r860475 r6fe3a0  
    1 // $Id: deform.lib,v 1.30 2004-04-20 15:55:22 Singular Exp $
     1// $Id: deform.lib,v 1.31 2005-04-25 10:13:05 Singular Exp $
    22// author: Bernd Martin email: martin@math.tu-cottbus.de
    33//(bm, last modified 4/98)
    44///////////////////////////////////////////////////////////////////////////////
    5 version="$Id: deform.lib,v 1.30 2004-04-20 15:55:22 Singular Exp $";
     5version="$Id: deform.lib,v 1.31 2005-04-25 10:13:05 Singular Exp $";
    66category="Singularities";
    77info="
     
    1414 lift_kbase(N,M);          lifting N into standard kbase of M
    1515 lift_rel_kb(N,M[,kbM,p])  relative lifting N into a kbase of M
    16  kill_rings([\"prefix\"])  kills the exported rings from above
    1716";
    1817
     
    2726"USAGE:   versal(Fo[,d,any]); Fo=ideal, d=int, any=list
    2827COMPUTE: miniversal deformation of Fo up to degree d (default d=100),
    29 CREATE:  Rings (exported):
    30          'my'Px = extending the basering Po by new variables given by
    31            \"A,B,..\" (deformation parameters), returns as basering; the
    32            new variables precede the old ones, the ordering is the
    33            product between \"ls\" and \"ord(Po)\"
    34          @*'my'Qx = Px/Fo extending Qo=Po/Fo,
    35          @*'my'So = the embedding-ring of the versal base space,
    36          @*'my'Ox = Px/Js extending So/Js.   (default my=\"\")
    37 
    38       Matrices (in Px, exported):
     28RETURN: list L of 4 rings:
     29         L[1] extending the basering Po by new variables given by
     30          \"A,B,..\" (deformation parameters); the new variables precede
     31         the old ones, the ordering is the product of \"ls\" and \"ord(Po)\" @*
     32         L[2] = L[1]/Fo extending Qo=Po/Fo, @*
     33         L[3] = the embedding ring of the versal base space, @*
     34         L[4] = L[1]/Js extending L[3]/Js. @*
     35      In the ring L[1] the following matrices are stored:
    3936         @*Js  = giving the versal base space (obstructions),
    4037         @*Fs  = giving the versal family of Fo,
     
    4340      If d is defined (!=0), it computes up to degree d.
    4441      @*If 'any' is defined and any[1] is no string, interactive version.
    45       @*Otherwise 'any' gives predefined strings: \"my\",\"param\",\"order\",\"out\"
    46       (\"my\" prefix-string, \"param\" is a letter (e.g. \"A\")  for the name of
    47       first parameter or (e.g. \"A(\") for index parameter variables, \"order\"
    48       ordering string for ring extension), \"out\" name of output-file).
    49 NOTE:   printlevel < 0        no output at all,
     42      @*Otherwise 'any' is interpreted as a list of predefined strings:
     43      \"my\",\"param\",\"order\",\"out\": @*
     44      (\"my\" internal prefix, \"param\" is a letter (e.g. \"A\") for the
     45      name of the first parameter or (e.g. \"A(\") for index parameter
     46      variables, \"order\" ordering string for ring extension), \"out\" name
     47      of output file).
     48NOTE:   printlevel < 0        no additional output,
    5049        printlevel >=0,1,2,.. informs you, what is going on;
    5150        this proc uses 'execute'.
     
    104103  kill Ls;
    105104  t1' = @t1;
    106   if( @t1==0) { dbprint(p,"// rigid!"); return();}
     105  if( @t1==0) { dbprint(p,"// rigid!"); return(list());}
    107106  if( @t2==0) { @smooth=1; dbprint(p,"// smooth base space");}
    108107  dbprint(p,"// ready: T_1 and T_2");
     
    123122  }
    124123 //---- create new rings and objects ------------------------------------------
    125   get_rings(Fo,t1',1,@my,@order,@param);
    126  setring `myPx`;
     124  list list_of_rings=get_rings(Fo,t1',1,@order,@param);
     125  def `myPx`= list_of_rings[1];
     126  def `myQx`= list_of_rings[2];
     127  def `myOx`= list_of_rings[3];
     128  def `mySo`= list_of_rings[4];
     129  kill list_of_rings;
     130  setring `myPx`;
    127131  @jv=0; @jv[t1']=0; @jv=@jv+1; @jv[nvars(basering)]=0;
    128132                                               //weight-vector for calculating
     
    206210      degBound = 0;
    207211//--------------- obtain new base-ring ----------------------------------------
    208         if(system("with","Namespaces")==1) { kill Top::`myOx`; }
    209212        if(defined(`myOx`)) {kill `myOx`;}
    210213  qring `myOx` = J;
     
    268271   "// ___ Equations of miniversal base space ___",Js,
    269272   "// ___ Equations of miniversal total space ___",Fs);
    270    dbprint(p,"","// Result belongs to ring "+myPx+".",
    271    "// Equations of total space of miniversal deformation are ",
    272    "// given by Fs, equations of miniversal base space by Js.",
    273    "// Make "+myPx+" the basering and list objects defined in "
    274    +myPx+" by typing:",
    275    "   setring "+myPx+"; show("+myPx+");","   listvar(matrix);",
    276    "// NOTE: rings "+myQx+", "+myPx+", "+mySo+" are alive!",
    277    "// (use 'kill_rings(\""+@my+"\");' to remove)");
    278    return();
     273   dbprint(p,"","
     274// 'versal' returned a list, say L, of four rings. In L[1] are stored:
     275//   as matrix Fs: Equations of total space of the miniversal deformation,
     276//   as matrix Js: Equations of miniversal base space,
     277//   as matrix Rs: syzygies of Fs mod Js.
     278// To access these data, type
     279     def Px=L[1]; setring Px; print(Fs); print(Js); print(Rs);
     280");
     281   return(list(`myPx`,`myQx`,`mySo`,`myOx`));
    279282}
    280283example
     
    286289   ideal Fo       = minor(m,2);
    287290                    // cone over rational normal curve of degree 4
    288    versal(Fo);
     291   list L=versal(Fo);
     292   L;
     293   def Px=L[1];
    289294   setring Px;
    290295   // ___ Equations of miniversal base space ___:
     
    298303"USAGE:   mod_versal(Mo,I[,d,any]); I=ideal, M=module, d=int, any =list
    299304COMPUTE: miniversal deformation of coker(Mo) over Qo=Po/Io, Po=basering;
    300 CREATE:  Ringsr (exported):
    301          'my'Px  = extending the basering by new variables (deformation
    302                    parameters), the new variables precede the old ones,
    303                    the ordering is the product between \"my_ord\"
    304                    and \"ord(Po)\"
    305          @*'my'Qx  = Px/Io extending Qo (returns as basering),
    306          @*'my'Ox  = Px/(Io+Js) ring of the versal deformation of coker(Ms),
    307          @*'my'So  = embedding-ring of the versal base space.  (default 'my'=\"\")
    308 
    309       Matrices (in Qx, exported):
     305RETURN:  list L of 4 rings:
     306         L[1] extending the basering Po by new variables given by
     307          \"A,B,..\" (deformation parameters); the new variables precede
     308         the old ones, the ordering is the product of \"ls\" and \"ord(Po)\" @*
     309         L[2] = L[1]/Io extending Qo, @*
     310         L[3] = the embedding ring of the versal base space, @*
     311         L[4] = L[1]/(Io+Js) ring of the versal deformation of coker(Ms). @*
     312      In the ring L[1] the following matrices are stored:
    310313         @*Js  = giving the versal base space (obstructions),
    311          @*Ms  = giving the versal family of Mo,
    312          @*Ls  = giving the lifting of syzygies Lo=syz(Mo),
    313 
     314         @*Fs  = giving the versal family of Mo,
     315         @*Rs  = giving the lifting of syzygies Lo=syz(Mo).   
    314316      If d is defined (!=0), it computes up to degree d.
    315317      @*If 'any' is defined and any[1] is no string, interactive version.
    316       @*Otherwise 'any' gives predefined strings:\"my\",\"param\",\"order\",\"out\"
    317       (\"my\" prefix-string, \"param\" is a letter (e.g. \"A\")  for the name of
    318       first parameter or (e.g. \"A(\") for index parameter variables, \"ord\"
    319       ordering string for ring extension), \"out\" name of output-file).
    320 NOTE:   printlevel < 0        no output at all,
     318      @*Otherwise 'any' is interpreted as a list of predefined strings:
     319      \"my\",\"param\",\"order\",\"out\": @*
     320      (\"my\" internal prefix, \"param\" is a letter (e.g. \"A\") for the
     321      name of the first parameter or (e.g. \"A(\") for index parameter
     322      variables, \"order\" ordering string for ring extension), \"out\" name
     323      of output file).
     324NOTE:   printlevel < 0        no additional output,
    321325        printlevel >=0,1,2,.. informs you, what is going on,
    322326        this proc uses 'execute'.
     
    381385//-------- get new rings and objects ------------------------------------------
    382386 setring Po;
    383   get_rings(I,e1',0,@my,@order,@param);
     387  list list_of_rings=get_rings(I,e1',0,@order,@param);
     388  def `myPx`= list_of_rings[1];
     389  def `myQx`= list_of_rings[2];
     390  def `myOx`= list_of_rings[3];
     391  def `mySo`= list_of_rings[4];
     392  kill list_of_rings;
    384393 setring `myPx`;
    385394  ideal  J,m_J;
     
    454463      I_J = Io,J;                attrib(I_J,"isSB",1);
    455464//-------- obtain new base ring -----------------------------------------------
    456       if(system("with","Namespaces")) {
    457          if(defined(Top::`myOx`)) { kill Top::`myOx`; }
    458       }
    459465      if (defined(`myOx`)) {kill `myOx`;}
    460466 qring `myOx` = I_J;
     
    517523    dbprint(p-1,"// quasi-homogeneous weights of miniversal base",@degr);
    518524  }
    519   dbprint(p-1,"// Result belongs to qring "+myQx,
    520   "// Equations of total space of miniversal deformation are in Js",
    521   simplify(ideal(Js),10),
    522   "// Matrix of the deformed module is Ms and lifted syzygies are Ls.",
    523   "// Make "+myQx+" the basering and list objects defined in "+myQx+
    524   " by typing:",
    525   "   listvar(ring);setring "+myQx+"; show("+myQx+");listvar(ideal);"+
    526   "listvar(matrix);",
    527   "// NOTE: rings "+myQx+", "+myOx+", "+mySo+" are still alive!",
    528   "// (use: 'kill_rings("+@my+");' to remove them)");
     525  dbprint(p,"
     526// 'mod_versal' returned a list, say L, of four rings. In L[2] are stored:
     527//   as matrix Ms: presentation matrix of the deformed module,
     528//   as matrix Ls: lifted syzygies,
     529//   as matrix Js:  Equations of total space of miniversal deformation
     530// To access these data, type
     531     def Qx=L[2]; setring Qx; print(Ms); print(Ls); print(Js);
     532");
    529533  option(set,save_opt);
    530   return();
     534  return(list(`myPx`,`myQx`,`mySo`,`myOx`));
    531535}
    532536example
     
    537541  ideal Io = x4+y3;
    538542  matrix Mo[2][2] = x2,y,-y2,x2;
    539   mod_versal(Mo,Io);
     543  list L = mod_versal(Mo,Io);
     544  def Qx=L[2]; setring Qx;
     545  print(Ms);
     546  print(Ls);
     547  print(Js);
    540548  printlevel = p;
    541   if(system("with","Namespaces")) {
    542         kill Top::Px,Top::Qx,Top::So;
    543   }
    544549  if (defined(Px)) {kill Px,Qx,So;}
    545550}
     
    549554RETURN: nothing, but kills exported rings generated by procedures
    550555        'versal' and 'mod_versal' with optional prefix 'string'
     556NOTE: obsolete
    551557"
    552558{
     
    640646}
    641647///////////////////////////////////////////////////////////////////////////////
    642 proc get_rings(ideal Io,int e1,int switch, list #)
    643 "
    644 Sub-procedure: creating ring-extensions
     648static proc get_rings(ideal Io,int e1,int switch, list #)
     649"
     650Sub-procedure: creating ring-extensions, returned as a list of 4 rings
    645651"
    646652{
     
    649655   string my_ord = "ds";
    650656   string my_var = "A";
    651    if (size(#)>2)
     657   if (size(#)>1)
    652658   {
    653      my     = #[1];
    654      my_ord = #[2];
    655      my_var = #[3];
    656    }
    657    string my_Px = my+"Px";
    658    string my_Qx = my+"Qx";
    659    string my_Ox = my+"Ox";
    660    string my_So = my+"So";
    661    extendring(my_Px,e1,my_var,my_ord);
    662    ideal Io  = imap(Po,Io);         attrib(Io,"isSB",1);
    663    my ="qring "+my_Qx+" = Io;       export("+my_Qx+");";
    664    execute(my);
     659     my_ord = #[1];
     660     my_var = #[2];
     661   }
     662   def my_Px=extendring(e1,my_var,my_ord);
     663   setring my_Px;
     664   ideal Io  = imap(Po,Io);         
     665   attrib(Io,"isSB",1);
     666   qring my_Qx = Io;
    665667   if (switch)
    666668   {
    667      setring `my_Px`;
    668      my = "qring "+my_Ox+" = std(ideal(0));export("+my_Ox+");";
     669     setring my_Px;
     670     qring my_Ox = std(ideal(0));
    669671   }
    670672   else
    671673   {
    672      my = "def "+my_Ox+" = "+my_Qx+";export("+my_Ox+");";
    673    }
    674   execute(my);
    675   defring(my_So,charstr(Po),e1,my_var,my_ord);
    676   return();
     674     def my_Ox = my_Qx;
     675   }
     676   def my_So=defring(charstr(Po),e1,my_var,my_ord);
     677   setring my_So;
     678   list erg=list(my_Px,my_Qx,my_Ox,my_So);
     679   return(erg);
    677680}
    678681///////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.