Changeset 82716e in git for Singular/LIB/deform.lib


Ignore:
Timestamp:
May 14, 1998, 8:45:19 PM (26 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
68e324ca946be87c2ab75edd4cc0fd161e1f6ead
Parents:
30c91fe3835d6ff4504cc9ddeeb5866465754c2a
Message:
*hannes: typos in the info-help-string


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/deform.lib

    r30c91f r82716e  
    1 // $Id: deform.lib,v 1.10 1998-05-05 11:55:22 krueger Exp $
     1// $Id: deform.lib,v 1.11 1998-05-14 18:44:57 Singular Exp $
    22// author: Bernd Martin email: martin@math.tu-cottbus.de
    3 //(bm, last modified 4/98)   
    4 ///////////////////////////////////////////////////////////////////////////////
    5 version="$Id: deform.lib,v 1.10 1998-05-05 11:55:22 krueger Exp $";
     3//(bm, last modified 4/98)
     4///////////////////////////////////////////////////////////////////////////////
     5version="$Id: deform.lib,v 1.11 1998-05-14 18:44:57 Singular Exp $";
    66info="
    77LIBRARY:  deform.lib       PROCEDURES FOR COMPUTING MINIVERSAL DEFORMATION
     
    1010 versal(Fo[,d,any])        miniversal deformation of isolated singularity Fo
    1111 mod_versal(Mo,I,[,d,any]) miniversal deformation of module Mo modulo ideal I
    12  lift_kbase(N,M);          lifting N into standard kbase of M 
     12 lift_kbase(N,M);          lifting N into standard kbase of M
    1313 lift_rel_kb(N,M[,kbM,p])  relative lifting N into a kbase of M
    1414 kill_rings([\"prefix\"])    kills the exported rings from above
    15  
     15
    1616  SUB-PROCEDURES            used by main procedure:
    1717                  get_rings,compute_ext,get_inf_def,interact1,
     
    3333COMUPTE: miniversal deformation of Fo up to degree d (default d=100),
    3434CREATE:  Rings (exported):
    35          'my'Px = extending the basering Po by new variables given by \"A,B,..\" 
     35         'my'Px = extending the basering Po by new variables given by \"A,B,..\"
    3636                  (deformation parameters), returns as basering,
    3737                  the new variables come before the old ones,
     
    4040         'my'So = being the embedding-ring of the versal base space,
    4141         'my'Ox = Px/Js extending So/Js.   (default my=\"\")
    42       Matrices (in Px, exported): 
     42      Matrices (in Px, exported):
    4343         Js  = giving the versal base space (obstructions),
    4444         Fs  = giving the versal family of Fo,
     
    4848      Otherwise 'any' gives predefined strings: \"my\",\"param\",\"order\",\"out\"
    4949      (\"my\" prefix-string, \"param\" is a letter (e.g. \"A\")  for the name of
    50       first parameter or (e.g. \"A(\") for index parameter variables, \"order\" 
     50      first parameter or (e.g. \"A(\") for index parameter variables, \"order\"
    5151      ordering string for ring extension), \"out\" name of output-file).
    5252NOTE:   printlevel < 0        no output at all,
    53         printlevel >=0,1,2,.. informs you, what is going on;           
     53        printlevel >=0,1,2,.. informs you, what is going on;
    5454        this proc uses 'execute'.
    5555EXAMPLE:example versal; shows an example
     
    6262  int time = timer;
    6363  intvec @iv,@jv,@is_qh,@degr;
    64   d_max    = 100; 
     64  d_max    = 100;
    6565  @my = ""; @param="A"; @order="ds"; @out="no";
    6666  @size    = size(#);
    6767  if( @size>0 ) { d_max = #[1]; }
    68   if( @size>1 ) 
    69   { if(typeof(#[2])!="string") 
     68  if( @size>1 )
     69  { if(typeof(#[2])!="string")
    7070    { string @active;
    7171      @my,@param,@order,@out = interact1();
     
    8686  int    @rowR= size(Fo);
    8787  def    Po   = basering;
    88 setring  Po; 
     88setring  Po;
    8989  poly   X_s  = product(maxideal(1));
    9090//-------  reproduce T12 ------------------------------------------------------
     
    106106  @t2 = Ls[4];                                 // vdim of T2
    107107  kill Ls;
    108   t1' = @t1; 
    109   if( @t1==0) { dbprint(p,"// rigit!"); return();} 
    110   if( @t2==0) { @smooth=1; dbprint(p,"// smooth base space");}   
     108  t1' = @t1;
     109  if( @t1==0) { dbprint(p,"// rigit!"); return();}
     110  if( @t2==0) { @smooth=1; dbprint(p,"// smooth base space");}
    111111  dbprint(p,"// ready: T1 and T2");
    112112  @colR = ncols(Ro);
     
    114114  @degrees = homog_test(@is_qh,matrix(Fo),InfD);
    115115  @jv = 1..@t1;
    116   if (@degrees!="") 
     116  if (@degrees!="")
    117117  { dbprint(p-1,"// T1 is quasi-homogeneous represented with weight-vector",
    118118    @degrees);
    119119  }
    120120  if (defined(@active))
    121   { "// matrix of infinitesimal deformations:";print(InfD); 
     121  { "// matrix of infinitesimal deformations:";print(InfD);
    122122    "// weights of infinitesimal deformations (  emty ='not qhomog'):";
    123123     @degrees;
    124124     matrix dummy;
    125125     InfD,dummy,t1' = interact2(InfD,@jv);kill dummy;
    126   } 
     126  }
    127127 //---- create new rings and objects ------------------------------------------
    128128  get_rings(Fo,t1',1,@my,@order,@param);
    129129 setring `myPx`;
    130   @jv=0; @jv[t1']=0; @jv=@jv+1; @jv[nvars(basering)]=0;       
     130  @jv=0; @jv[t1']=0; @jv=@jv+1; @jv[nvars(basering)]=0;
    131131                                               //weight-vector for calculating
    132132                                               //rel-jet with resp to def-para
    133   ideal  Io   = imap(Po,Fo);               
     133  ideal  Io   = imap(Po,Fo);
    134134  ideal  J,m_J,tid;     attrib(J,"isSB",1);
    135135  matrix Fo   = matrix(Io);                   //initial equations
     
    139139  matrix homFR= concat(homR,homF);
    140140  module hom' = std(homFR);
    141   matrix Js[1][@t2]; 
    142   matrix F_R,Fs,Rs,Fn,Rn; 
    143   export Js,Fs,Rs;                         
    144   matrix Mon[t1'][1]=maxideal(1);             
     141  matrix Js[1][@t2];
     142  matrix F_R,Fs,Rs,Fn,Rn;
     143  export Js,Fs,Rs;
     144  matrix Mon[t1'][1]=maxideal(1);
    145145  Fn  = transpose(imap(Po,InfD)*Mon);         //infinitesimal deformations
    146   Fs  = Fo + Fn; 
     146  Fs  = Fo + Fn;
    147147  dbprint(p-1,"// infinitesimal deformation: Fs: ",Fs);
    148148  Rn  = (-1)*lift(Fo,Fs*Ro);                  //infinit. relations
     
    151151  tid = 0 + ideal(F_R);
    152152  if (tid[1]==0) {d_max=1;}                   //finished ?
    153  setring `myOx`; 
     153 setring `myOx`;
    154154  matrix Fs,Rs,Cup,Cup',F_R,homFR,New,Rn,Fn;
    155155  module hom';
    156   ideal  null,tid;  attrib(null,"isSB",1); 
    157  setring `myQx`;   
    158   poly X_s = imap(Po,X_s);       
    159   matrix Cup,Cup',MASS;             
     156  ideal  null,tid;  attrib(null,"isSB",1);
     157 setring `myQx`;
     158  poly X_s = imap(Po,X_s);
     159  matrix Cup,Cup',MASS;
    160160  ideal  tid,null;               attrib(null,"isSB",1);
    161   ideal  J,m_J;                  attrib(J,"isSB",1); 
     161  ideal  J,m_J;                  attrib(J,"isSB",1);
    162162                                 attrib(m_J,"isSB",1);
    163   matrix PreO = imap(Po,PreO); 
     163  matrix PreO = imap(Po,PreO);
    164164  module PreO'= imap(Po,PreO');  attrib(PreO',"isSB",1);
    165165  module PreT = imap(Po,PreT);   attrib(PreT,"isSB",1);
     
    172172   {
    173173     if( @t1==0) {break};
    174      dbprint(p,"// start computation in degree "+string(@d)+".");     
     174     dbprint(p,"// start computation in degree "+string(@d)+".");
    175175     dbprint(p-3,">>> TIME = "+string(timer-time));
    176176     dbprint(p-3,"==> memory = "+string(kmemory())+"k");
     
    178178     if (@smooth) { @noObstr=1;}
    179179     else
    180      { Cup = jet(F_R,@d,@jv); 
    181        Cup = matrix(reduce(ideal(Cup),m_J),@colR,1);   
    182        Cup = jet(Cup,@d,@jv);         
    183      }   
     180     { Cup = jet(F_R,@d,@jv);
     181       Cup = matrix(reduce(ideal(Cup),m_J),@colR,1);
     182       Cup = jet(Cup,@d,@jv);
     183     }
    184184//------- express obstructions in kbase of T2  --------------------------------
    185185     if ( @noObstr==0 )
     
    191191        }
    192192        Cup   = lift(PreO,Cup);
    193         MASS  = lift_rel_kb(Cup,PreT,kbT2,X_s); 
    194         dbprint(p-3,"// next MASSEY-products:",MASS-jet(MASS,@d-1,@jv)); 
     193        MASS  = lift_rel_kb(Cup,PreT,kbT2,X_s);
     194        dbprint(p-3,"// next MASSEY-products:",MASS-jet(MASS,@d-1,@jv));
    195195        if    (MASS==transpose(Js))
    196               { @noObstr=1;dbprint(p-1,"// no obstruction"); } 
     196              { @noObstr=1;dbprint(p-1,"// no obstruction"); }
    197197         else { @noObstr=0; }
    198198      }
     
    204204 setring `myPx`;
    205205        Js   = imap(`myQx`,Js);
    206       degBound = @d+1; 
     206      degBound = @d+1;
    207207        J    = std(ideal(Js));
    208208        m_J  = std(J*ideal(Mon));
     
    210210//--------------- obtain new base-ring ----------------------------------------
    211211        kill `myOx`;
    212   qring `myOx` = J; 
     212  qring `myOx` = J;
    213213        matrix Fs,Rs,F_R,Cup,Cup',homFR,New,Rn,Fn;
    214214        module hom';
     
    217217//---------------- lift equations F and relations R ---------------------------
    218218 setring `myOx`;
    219       Fs    = fetch(`myPx`,Fs);                 
    220       Rs    = fetch(`myPx`,Rs);   
    221       F_R   = Fs*Rs;   
    222       F_R   = matrix(reduce(ideal(F_R),null)); 
     219      Fs    = fetch(`myPx`,Fs);
     220      Rs    = fetch(`myPx`,Rs);
     221      F_R   = Fs*Rs;
     222      F_R   = matrix(reduce(ideal(F_R),null));
    223223      tid   = 0 + ideal(F_R);
    224       if (tid[1]==0) { dbprint(p-1,"// finished"); break;}   
    225       Cup   = (-1)*transpose(jet(F_R,@d,@jv)); 
    226       homFR = fetch(`myPx`,homFR); 
     224      if (tid[1]==0) { dbprint(p-1,"// finished"); break;}
     225      Cup   = (-1)*transpose(jet(F_R,@d,@jv));
     226      homFR = fetch(`myPx`,homFR);
    227227      hom'  = fetch(`myPx`,hom');  attrib(hom',"isSB",1);
    228228      Cup'  = simplify(reduce(Cup,hom'),10);
     
    238238      Rs    = Rs+Rn;
    239239      F_R   = Fs*Rs;
    240       tid   = 0+reduce(ideal(F_R),null); 
     240      tid   = 0+reduce(ideal(F_R),null);
    241241//---------------- fetch results into other rings -----------------------------
    242242  setring `myPx`;
     
    248248      m_J = fetch(`myPx`,m_J);  attrib(m_J,"isSB",1);
    249249      J   = fetch(`myPx`,J);    attrib(J,"isSB",1);
    250       Js  = fetch(`myPx`,Js); 
    251       tid = fetch(`myOx`,tid); 
    252       if (tid[1]==0) { dbprint(p-1,"// finished");break;}         
     250      Js  = fetch(`myPx`,Js);
     251      tid = fetch(`myOx`,tid);
     252      if (tid[1]==0) { dbprint(p-1,"// finished");break;}
    253253   }
    254254//---------  end loop and final output ----------------------------------------
     
    256256   if (@out!="no")
    257257   {  string out = @out+"_"+string(@d);
    258       "// writing file "+out+" with matrix Js, matrix Fs, matrix Rs ready 
     258      "// writing file "+out+" with matrix Js, matrix Fs, matrix Rs ready
    259259      for reading in rings "+myPx+" or "+myQx;
    260260      write(out,"matrix Js[1][",@t2,"]=",Js,";matrix Fs[1][",@rowR,"]=",Fs,
    261261      ";matrix Rs[",@rowR,"][",@colR,"]=",Rs,";");
    262    } 
     262   }
    263263   dbprint(p-3,">>> TIME = "+string(timer-time));
    264264   if (@is_qh != 0)
     
    266266     @degr = @degr[1..t1'];
    267267     dbprint(p-1,"// quasi-homogeneous weights of miniversal base",@degr);
    268    } 
     268   }
    269269   dbprint(p-1,
    270270   "// ___ Equations of miniversal base space ___",Js,
     
    277277   "   setring "+myPx+"; show("+myPx+");","   listvar(matrix);",
    278278   "// NOTE: rings "+myQx+", "+myPx+", "+mySo+" are alive!",
    279    "// (use 'kill_rings(\""+@my+"\");' to remove)"); 
     279   "// (use 'kill_rings(\""+@my+"\");' to remove)");
    280280   return();
    281281}
     
    286286   ring r1        = 0,(x,y,z,u,v),ds;
    287287   matrix m[2][4] = x,y,z,u,y,z,u,v;
    288    ideal Fo       = minor(m,2);   
     288   ideal Fo       = minor(m,2);
    289289                    // cone over rational normal curve of degree 4
    290290   versal(Fo);
     
    305305proc mod_versal(matrix Mo, ideal I, list #)
    306306"
    307 USAGE:   mod_versal(Mo,I[,d,any]); I=ideal, M=module, d=int, any =list 
     307USAGE:   mod_versal(Mo,I[,d,any]); I=ideal, M=module, d=int, any =list
    308308COMUPTE: miniversal deformation of coker(Mo) over Qo=Po/Io, Po=basering;
    309309CREATE:  Ringsr (exported):
     
    314314         'my'Qx  = Px/Io extending Qo (returns as basering),
    315315         'my'Ox  = Px/(Io+Js) ring of the versal deformation of coker(Ms),
    316          'my'So  = embedding-ring of the versal base space.  (default 'my'=\"\") 
     316         'my'So  = embedding-ring of the versal base space.  (default 'my'=\"\")
    317317      Matrices (in Qx, exported):
    318318         Js  = giving the versal base space (obstructions),
    319319         Ms  = giving the versal family of Mo,
    320          Ls  = giving the lifting of syzygies Lo=syz(Mo), 
     320         Ls  = giving the lifting of syzygies Lo=syz(Mo),
    321321      If d is defined (!=0), it computes up to degree d.
    322322      If 'any' is defined and any[1] is no string, interactive version.
    323323      Otherwise 'any' gives predefined strings:\"my\",\"param\",\"order\",\"out\"
    324324      (\"my\" prefix-string, \"param\" is a letter (e.g. \"A\")  for the name of
    325       first parameter or (e.g. \"A(\") for index parameter variables, \"ord\" 
     325      first parameter or (e.g. \"A(\") for index parameter variables, \"ord\"
    326326      ordering string for ringextension), \"out\" name of output-file).
    327327NOTE:   printlevel < 0        no output at all,
    328         printlevel >=0,1,2,.. informs you, what is going on,             
     328        printlevel >=0,1,2,.. informs you, what is going on,
    329329        this proc uses 'execute'.
    330330EXAMPLE:example mod_versal; shows an example
     
    337337  int time = timer;
    338338  intvec @iv,@jv,@is_qh,@degr;
    339   d_max    = 100; 
     339  d_max    = 100;
    340340  @my = ""; @param="A"; @order="ds"; @out="no";
    341341  @size = size(#);
    342342  if( @size>0 ) { d_max = #[1]; }
    343   if( @size>1 ) 
    344   { if(typeof(#[2])!="string") 
     343  if( @size>1 )
     344  { if(typeof(#[2])!="string")
    345345    { string @active;
    346346      @my,@param,@order,@out = interact1();
     
    352352      if (@size>4) {@out   = #[5];}
    353353    }
    354   } 
     354  }
    355355  string myPx = @my+"Px";
    356356  string myQx = @my+"Qx";
     
    363363//-------- compute Ext's ------------------------------------------------------
    364364         I   = std(I);
    365  qring   Qo  = I;   
     365 qring   Qo  = I;
    366366  matrix Mo  = fetch(Po,Mo);
    367   list   Lo  = compute_ext(Mo,p); 
     367  list   Lo  = compute_ext(Mo,p);
    368368         f0,f1,f2,e1,e2,ok_ann=Lo[1];
    369369  matrix Ls,kb1,lift1 = Lo[2],Lo[3],Lo[4];
     
    373373  dbprint(p,"// ready: Ext1 and Ext2");
    374374//-----  test: quasi-homogeneous, choice of inf. def.--------------------------
    375   @degrees = homog_test(@is_qh,Mo,kb1); 
     375  @degrees = homog_test(@is_qh,Mo,kb1);
    376376  e1' = e1;  @jv = 1..e1;
    377   if (@degrees != "") 
     377  if (@degrees != "")
    378378  { dbprint(p-1,"// Ext1 is quasi-homogeneous represented: "+@degrees);
    379379  }
    380380  if (defined(@active))
    381381  { "// kbase of Ext1:";
    382     print(kb1); 
     382    print(kb1);
    383383    "// weights of kbase of Ext1 ( empty = 'not qhomog')";@degrees;
    384384    kb1,lift1,e1' = interact2(kb1,@jv,lift1);
    385   } 
     385  }
    386386//-------- get new rings and objects ------------------------------------------
    387387 setring Po;
     
    392392  ideal  Io   = I_J;
    393393  matrix Mon[e1'][1] = maxideal(1);
    394   matrix Ms   = imap(Qo,Mo);             
    395   matrix Ls   = imap(Qo,Ls);       
    396   matrix Js[1][e2];           
     394  matrix Ms   = imap(Qo,Mo);
     395  matrix Ls   = imap(Qo,Ls);
     396  matrix Js[1][e2];
    397397 setring `myQx`;
    398398  ideal  J,I_J,tet,null;              attrib(null,"isSB",1);
    399399  ideal  m_J  = fetch(`myPx`,m_J);   attrib(m_J,"isSB",1);
    400400  @jv=0;  @jv[e1] = 0; @jv = @jv+1;   @jv[nvars(`myPx`)] = 0;
    401   matrix Ms   = imap(Qo,Mo);          export(Ms);       
     401  matrix Ms   = imap(Qo,Mo);          export(Ms);
    402402  matrix Ls   = imap(Qo,Ls);          export(Ls);
    403403  matrix Js[e2][1];                   export(Js);
    404   matrix MASS; 
     404  matrix MASS;
    405405  matrix Mon  = fetch(`myPx`,Mon);
    406406  matrix Mn,Ln,ML,Cup,Cup',Lift;
     
    410410  matrix D'   = imap(Qo,D');
    411411  module Do   = imap(Qo,Do);          attrib(Do,"isSB",1);
    412   matrix kb2  = imap(Qo,kb2);   
     412  matrix kb2  = imap(Qo,kb2);
    413413  matrix kb1  = imap(Qo,kb1);
    414414  matrix lift1= imap(Qo,lift1);
    415415  poly   X_s  = imap(Po,X_s);
    416   intvec intv = e1',e1,f0,f1,f2; 
    417          Ms,Ls= get_inf_def(Ms,Ls,kb1,lift1,X_s);     
     416  intvec intv = e1',e1,f0,f1,f2;
     417         Ms,Ls= get_inf_def(Ms,Ls,kb1,lift1,X_s);
    418418  kill   kb1,lift1;
    419419  dbprint(p-1,"// infinitesimal extension",Ms);
    420420//----------- start the loop --------------------------------------------------
    421421  for (@d=2;@d<=d_max;@d=@d+1)
    422   { 
     422  {
    423423    dbprint(p-3,">>> time = "+string(timer-time));
    424424    dbprint(p-3,"==> memory = "+string(memory(0)/1000)+
    425425                ",  allocated = "+string(memory(1)/1000));
    426     dbprint(p,"// start deg = "+string(@d));   
     426    dbprint(p,"// start deg = "+string(@d));
    427427//-------- get obstruction ----------------------------------------------------
    428428    Cup  = matrix(ideal(Ms*Ls),f0*f2,1);
     
    433433    Cup' = reduce(Cup,Do);
    434434    tet  = simplify(ideal(Cup'),10);
    435     if (tet[1]!=0) 
     435    if (tet[1]!=0)
    436436    { dbprint(p-4,"// *");
    437437      Cup = Cup-Cup';
     
    441441    { MASS = lift_rel_kb(Cup,ex2,kb2,X_s);}
    442442    else
    443     { MASS = reduce(Cup,ex2);}     
     443    { MASS = reduce(Cup,ex2);}
    444444    dbprint(p-3,"// next MATRIC-MASSEY-products",
    445445    MASS-jet(MASS,@d-1,@jv));
    446446    if   ( MASS==transpose(Js))
    447447         { @noObstr = 1;dbprint(p-1,"//no obstruction"); }
    448     else { @noObstr = 0; }       
     448    else { @noObstr = 0; }
    449449//-------- obtain equations of base space -------------------------------------
    450450    if (@noObstr == 0)
     
    458458     degBound=0;
    459459      I_J = Io,J;                attrib(I_J,"isSB",1);
    460 //-------- obtain new base ring ----------------------------------------------- 
     460//-------- obtain new base ring -----------------------------------------------
    461461      kill `myOx`;
    462  qring `myOx` = I_J;     
     462 qring `myOx` = I_J;
    463463      ideal null,tet;            attrib(null,"isSB",1);
    464464      matrix Ms  = imap(`myQx`,Ms);
    465465      matrix Ls  = imap(`myQx`,Ls);
    466466      matrix Mn,Ln,ML,Cup,Cup',Lift;
    467       matrix C'  = imap(Qo,C'); 
     467      matrix C'  = imap(Qo,C');
    468468      module Co  = imap(Qo,Co);   attrib(Co,"isSB",1);
    469469      module ex2 = imap(Qo,ex2);  attrib(ex2,"isSB",1);
    470470      matrix kb2 = imap(Qo,kb2);
    471471      poly   X_s = imap(Po,X_s);
    472     } 
     472    }
    473473//-------- get lifts ----------------------------------------------------------
    474474   setring `myOx`;
     
    477477    Cup = jet(Cup,@d,@jv);
    478478    Cup'= reduce(Cup,Co);
    479     tet = simplify(ideal(Cup'),10);   
    480     if (tet[1]!=0) 
     479    tet = simplify(ideal(Cup'),10);
     480    if (tet[1]!=0)
    481481    { dbprint(p-4,"// #");
    482482     Cup = Cup-Cup';
    483483    }
    484     Lift = lift(C',Cup);                 
     484    Lift = lift(C',Cup);
    485485    Mn   = matrix(ideal(Lift),f0,f1);
    486486    Ln   = matrix(ideal(Lift[f0*f1+1..nrows(Lift),1]),f1,f2);
     
    490490    dbprint(p-3,"// next extension of syz(Mo)",Ln);
    491491    ML   = reduce(ideal(Ms*Ls),null);
    492 //--------- test: finished ---------------------------------------------------- 
     492//--------- test: finished ----------------------------------------------------
    493493    tet  = simplify(ideal(ML),10);
    494494    if (tet[1]==0) { dbprint(p-1,"// finished in degree ",@d);}
     
    496496   setring `myPx`;
    497497    Ms   = fetch(`myOx`,Ms);
    498     Ls   = fetch(`myOx`,Ls); 
     498    Ls   = fetch(`myOx`,Ls);
    499499   setring `myQx`;
    500500    Ms   = fetch(`myOx`,Ms);
    501     Ls   = fetch(`myOx`,Ls); 
     501    Ls   = fetch(`myOx`,Ls);
    502502    ML   = Ms*Ls;
    503     ML   = matrix(reduce(ideal(ML),null),f0,f2); 
     503    ML   = matrix(reduce(ideal(ML),null),f0,f2);
    504504    tet  = imap(`myOx`,tet);
    505505    if (tet[1]==0) { break;}
    506   } 
    507 //------- end of loop, final output ------------------------------------------- 
     506  }
     507//------- end of loop, final output -------------------------------------------
    508508  if (@out != "no")
    509509  { string out = @out+"_"+string(@d);
    510     "// writing file '"+out+"' with matrix Js, matrix Ms, matrix Ls 
     510    "// writing file '"+out+"' with matrix Js, matrix Ms, matrix Ls
    511511    ready for reading in rings "+myPx+" or "+myQx;
    512512    write(out,"matrix Js[1][",e2,"]=",Js,";matrix Ms[",f0,"][",f1,"]=",Ms,
     
    518518    @degr = @degr[1..e1'];
    519519    dbprint(p-1,"// quasi-homogeneous weights of miniversal base",@degr);
    520   } 
     520  }
    521521  dbprint(p-1,"// Result belongs to qring "+myQx,
    522522  "// Equations of total space of miniversal deformation are in Js",
     
    540540  mod_versal(Mo,Io);
    541541  printlevel = p;
    542   kill Px,Qx,So; 
    543 }
    544 //============================================================================= 
     542  kill Px,Qx,So;
     543}
     544//=============================================================================
    545545///////////////////////////////////////////////////////////////////////////////
    546546proc kill_rings(list #)
    547547"USAGE: kill_rings([string]);
    548 Sub-procedure: kills exported rings of 'versal' and 
     548Sub-procedure: kills exported rings of 'versal' and
    549549               'mod_versal' with prefix 'string'
    550550"
     
    574574Sub-procedure: obtain Ext1 and Ext2 and other objects used by mod_versal
    575575"
    576 { 
     576{
    577577   int    l,f0,f1,f2,f3,e1,e2,ok_ann;
    578578   module Co,Do,ima,ex1,ex2;
    579    matrix M0,M1,M2,ker,kb1,lift1,kb2,A,B,C,D; 
     579   matrix M0,M1,M2,ker,kb1,lift1,kb2,A,B,C,D;
    580580//------- resM ---------------------------------------------------------------
    581    list resM = res(Mo,3);   
     581   list resM = res(Mo,3);
    582582   M0 = resM[1];
    583583   M1 = resM[2];
     
    588588   f3 = ncols(M2);
    589589//------ compute Ext^2  ------------------------------------------------------
    590    B    = kohom(M0,f3); 
     590   B    = kohom(M0,f3);
    591591   A    = kontrahom(M2,f0);
    592    D    = modulo(A,B); 
    593    Do   = std(D);   
     592   D    = modulo(A,B);
     593   Do   = std(D);
    594594   ima  = kohom(M0,f2),kontrahom(M1,f0);
    595595   ex2  = modulo(D,ima);
     
    603603   }
    604604   if (ok_ann==0)
    605    {  e2 =nrows(ex2);   
     605   {  e2 =nrows(ex2);
    606606      dbprint(p,"// Ann(Ext2) is maximal");
    607607   }
    608608//------ compute Ext^1 -------------------------------------------------------
    609    B     = kohom(M0,f2); 
     609   B     = kohom(M0,f2);
    610610   A     = kontrahom(M1,f0);
    611611   ker   = modulo(A,B);
    612    ima   = kohom(M0,f1),kontrahom(M0,f0); 
     612   ima   = kohom(M0,f1),kontrahom(M0,f0);
    613613   ex1   = modulo(ker,ima);
    614614   ex1   = std(ex1);
     
    621621//------ compute the liftings of Ext^1 ---------------------------------------
    622622   lift1 = A*kb1;
    623    lift1 = lift(B,lift1); 
     623   lift1 = lift(B,lift1);
    624624   intvec iv = f0,f1,f2,e1,e2,ok_ann;
    625625   list   L' = ex2,kb2,C,Co,D,Do;
     
    629629proc get_rings(ideal Io,int e1,int switch, list #)
    630630"
    631 Sub-procedure: creating ring-extensions 
    632 "
    633 { 
    634    def Po = basering; 
     631Sub-procedure: creating ring-extensions
     632"
     633{
     634   def Po = basering;
    635635   string my;
    636636   string my_ord = "ds";
    637    string my_var = "A"; 
     637   string my_var = "A";
    638638   if (size(#)>2)
    639639   {
     
    642642     my_var = #[3];
    643643   }
    644    string my_Px = my+"Px"; 
    645    string my_Qx = my+"Qx"; 
    646    string my_Ox = my+"Ox"; 
    647    string my_So = my+"So"; 
     644   string my_Px = my+"Px";
     645   string my_Qx = my+"Qx";
     646   string my_Ox = my+"Ox";
     647   string my_So = my+"So";
    648648  extendring(my_Px,e1,my_var,my_ord);
    649649   ideal Io  = imap(Po,Io);         attrib(Io,"isSB",1);
     
    666666proc get_inf_def(list #)
    667667"
    668 Sub-procedure: compute infinitesimal family of a module and its syzygies 
     668Sub-procedure: compute infinitesimal family of a module and its syzygies
    669669               from a kbase of Ext1 and its lifts
    670670"
     
    687687  }
    688688  return(Ms,Ls);
    689 } 
     689}
    690690//////////////////////////////////////////////////////////////////////////////
    691691proc lift_rel_kb (module N, module M, list #)
     
    695695        N, M modules of same rank,
    696696        M depending only on variables not in p and vdim(M) finite in this ring,
    697         [ kbaseM the kbase of M in the subring given by variables not in p ] 
     697        [ kbaseM the kbase of M in the subring given by variables not in p ]
    698698        warning: check that these assumtions are fulfilled!
    699699RETURN  matrix A, whose j-th columnes present the coeff's of N[j] in kbaseM,
     
    704704  poly p = product(maxideal(1));
    705705       M = std(M);
    706   matrix A; 
     706  matrix A;
    707707  if (size(#)>0) { p=#[2]; module kbaseM=#[1];}
    708   else 
     708  else
    709709  { if (vdim(M)<=0) { "// vdim(M) not finite";return(A);}
    710710    module kbaseM = kbase(M);
     
    714714  A = coeffs(N,kbaseM,p);
    715715  return(A);
    716 } 
     716}
    717717example
    718718{
     
    736736  print(kbase(std(M))*A);
    737737  print(reduce(N,std(M)));
    738 } 
     738}
    739739///////////////////////////////////////////////////////////////////////////////
    740740proc lift_kbase (N, M)
     
    769769proc interact1 ()
    770770"
    771 Sub_procedure: asking for and reading your input-strings 
     771Sub_procedure: asking for and reading your input-strings
    772772"
    773773{
     
    775775 string str,out,my_ord,my_var;
    776776 my_ord = "ds";
    777  my_var = "A"; 
     777 my_var = "A";
    778778 "INPUT: name of output-file (ENTER = no output, do not use \"my\"!)";
    779    str = read("");                                 
    780    if (size(str)>1) 
     779   str = read("");
     780   if (size(str)>1)
    781781   { out = str[1..size(str)-1];}
    782782   else
    783783   { out = "no";}
    784784 "INPUT: prefix-string of ring-extension (ENTER = '@')";
    785    str = read(""); 
    786    if ( size(str) > 1 ) 
    787    { my = str[1..size(str)-1]; }     
    788  "INPUT:parameter-string 
     785   str = read("");
     786   if ( size(str) > 1 )
     787   { my = str[1..size(str)-1]; }
     788 "INPUT:parameter-string
    789789   (give a letter corresponding to first new variable followed by the next letters,
    790790   or 'T('       - a letter + '('  - getting a string of indexed variables)
    791791   (ENTER = A) :";
    792    str = read(""); 
     792   str = read("");
    793793   if (size(str)>1) { my_var=str[1..size(str)-1]; }
    794794 "INPUT:order-string (local or weighted!) (ENTER = ds) :";
    795    str = read(""); 
    796    if (size(str)>1) { my_ord=str[1..size(str)-1]; }   
     795   str = read("");
     796   if (size(str)>1) { my_ord=str[1..size(str)-1]; }
    797797   if( find(my_ord,"s")+find(my_ord,"w") == 0 )
    798798   { "// ordering must be an local! changed into 'ds'";
     
    816816  if (size(str)>1)
    817817  { ">> Choose columnes of the matrix";
    818     ">> (Enter = all columnes)"; 
     818    ">> (Enter = all columnes)";
    819819    "INPUT (number of columnes to use as integer-list 'i_1,i_2,.. ,i_t' ):";
    820820    string columnes = read("");
     
    826826      execute("l1= "+columnes[2*l-1]+";");
    827827      B[l] = A[l1];
    828       if(flag) { C[l]=D[l1];}   
     828      if(flag) { C[l]=D[l1];}
    829829    }
    830830    A = matrix(B,nrows(A),size(B));
     
    836836proc negative_part(intvec iv)
    837837"
    838 RETURNS intvec of indices of jv having negative entries (or iv, if non) 
     838RETURNS intvec of indices of jv having negative entries (or iv, if non)
    839839"
    840840{
     
    842842   int    l,k;
    843843   for (l=1;l<=size(iv);l=l+1)
    844    { if (iv[l]<0) 
     844   { if (iv[l]<0)
    845845     {  k = k+1;
    846846        jv[k]=l;
     
    865865  matrix A    = imap(br,A);
    866866  intmat degA[@r][@c];
    867   if (homog(ideal(A))) 
     867  if (homog(ideal(A)))
    868868  { for (i=1;i<=@r;i=i+1)
    869869    { for(j=1;j<=@c;j=j+1)
     
    872872  }
    873873 setring br;
    874   kill nr; 
     874  kill nr;
    875875  return(degA);
    876876}
     
    878878proc homog_test(intvec w_vec, matrix Mo, matrix A)
    879879"
    880 Sub proc: return relative weight string of columnes of A with respect 
    881           to the given w_vec and to Mo, or \"\" if not qh 
     880Sub proc: return relative weight string of columnes of A with respect
     881          to the given w_vec and to Mo, or \"\" if not qh
    882882    NOTE: * means weight is not determined
    883883"
     
    888888  int @r = nrows(A);
    889889  int @c = ncols(A);
    890   A = concat(matrix(ideal(Mo),@r,1),A); 
    891   intmat a = find_ord(A,w_vec);     
     890  A = concat(matrix(ideal(Mo),@r,1),A);
     891  intmat a = find_ord(A,w_vec);
    892892  intmat b[@r][@c];
    893893  for (l=1;l<=@c;l=l+1)
    894   { 
     894  {
    895895    for (k=1;k<=@r;k=k+1)
    896     {  if (A[k,l+1]!=0) 
     896    {  if (A[k,l+1]!=0)
    897897       { b[k,l] = a[k,l+1]-a[k,1];}
    898898    }
    899899    tv = 0;
    900900    for (k=1;k<=@r;k=k+1)
    901     {  if (A[k,l+1]*A[k,1]!=0) 
     901    {  if (A[k,l+1]*A[k,1]!=0)
    902902       {tv = tv,b[k,l];}
    903903    }
    904904    if (size(tv)>1)
    905     { k = tv[2]; 
     905    { k = tv[2];
    906906      tv = tv[2..size(tv)]; tv = tv -k;
    907       if (tv==0) { @nv = @nv+string(-k)+",";} 
     907      if (tv==0) { @nv = @nv+string(-k)+",";}
    908908      else {return("");}
    909909    }
     
    916916proc homog_t(intvec d_vec, matrix Fo, matrix A)
    917917"
    918 Sub-procedure: Computing relative (with respect to flatten(Fo)) weight_vec 
     918Sub-procedure: Computing relative (with respect to flatten(Fo)) weight_vec
    919919               of columnes of A (return zero if Fo or A not qh)
    920920"
     
    934934   dv = dv[2..size(dv)];
    935935   dv = dv-l;
    936  setring br; 
     936 setring br;
    937937   kill nr;
    938938   return(dv);
Note: See TracChangeset for help on using the changeset viewer.