Changeset 275721f in git


Ignore:
Timestamp:
Nov 20, 2001, 2:00:41 PM (22 years ago)
Author:
Mathias Schulze <mschulze@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
20f6fdc67e5c7c3be158b51d3369c84b45b48cc0
Parents:
1f1e936f1d8cfea771388e62a2423fe8f47f7d2e
Message:
*** empty log message ***


git-svn-id: file:///usr/local/Singular/svn/trunk@5691 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular/LIB
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/gaussman.lib

    r1f1e93 r275721f  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: gaussman.lib,v 1.57 2001-11-07 09:55:50 mschulze Exp $";
     2version="$Id: gaussman.lib,v 1.58 2001-11-20 13:00:34 mschulze Exp $";
    33category="Singularities";
    44
    55info="
    6 LIBRARY:  gaussman.lib  Gauss-Manin Connection of a Singularity
     6LIBRARY:  gaussman.lib  Algorithmic Gauss-Manin Connection
    77
    88AUTHOR:   Mathias Schulze, email: mschulze@mathematik.uni-kl.de
    99
    10 OVERVIEW: A library to compute invariants related to the Gauss-Manin connection
    11           of a an isolated hypersurface singularity
     10OVERVIEW: A library to compute Hodge-theoretic invariants
     11          of isolated hypersurface singularities
    1212
    1313PROCEDURES:
    14  gmsring(t,s);              Brieskorn lattice in Gauss-Manin system of t
    15  gmsnf(p,K[,Kmax]);         Gauss-Manin system normal form
    16  gmscoeffs(p,K[,Kmax]);     Gauss-Manin system basis representation
     14 gmsring(t,s);              Gauss-Manin system of t with variable s
     15 gmsnf(p,K[,Kmax]);         Gauss-Manin system normal form of p
     16 gmscoeffs(p,K[,Kmax]);     Gauss-Manin system basis representation of p
    1717 monodromy(t);              Jordan data of monodromy of t
    18  spectrum(t);               spectrum of t
     18 spectrum(t);               singularity spectrum of t
    1919 sppairs(t);                spectral pairs of t
    20  sppnf(a,w[,m][,v|V]);      normalize spectral pairs
    21  vfilt(t);                  V-filtration of t on H''/H'
    22  vwfilt(t);                 weight refined V-filtration of t on H''/H'
    23  saito(t);                  matrix A0+A1*s of t on H''
     20 sppnf(a,w[,m][,V]);        spectral pairs normal form of (a,w,m,V)
     21 vfilt(t);                  V-filtration of t on Brieskorn lattice H''
     22 vwfilt(t);                 weighted V-filtration of t on Brieskorn lattice H''
     23 tmatrix(t);                t-matrix on Brieskorn lattice H''
    2424 endvfilt(V);               endomorphism V-filtration on Jacobian algebra
    2525 spprint(sp);               print spectrum sp
     
    2727 spadd(sp1,sp2);            sum of spectra sp1 and sp2
    2828 spsub(sp1,sp2);            difference of spectra sp1 and sp2
    29  spmul(sp,k);               product of spectrum sp and integer k
    30  spmul(sp,k);               linear combination of spectra sp with coeffs k
    31  spissemicont(sp[,opt]);    test spectrum sp for semicontinuity
    32  spsemicont(sp0,sp[,opt]);  semicontinuity of spectra sp0 and sp
     29 spmul(sp0,k);              linear combination of spectra sp
     30 spissemicont(sp[,opt]);    semicontinuity test of spectrum sp
     31 spsemicont(sp0,sp[,opt]);  semicontinuous combinations of spectra sp0 in sp
    3332 spmilnor(sp);              milnor number of spectrum sp
    3433 spgeomgenus(sp);           geometrical genus of spectrum sp
     
    108107
    109108proc gmsring(poly t,string s)
    110 "USAGE:    gmsring(t,s); poly t, string s;
    111 ASSUME:   basering with characteristic 0 and local degree ordering,
    112           t with isolated citical point 0
     109"USAGE:    gmsring(t,s); poly t, string s
     110ASSUME:   characteristic 0; local degree ordering;
     111          isolated citical point 0 of t
    113112RETURN:
    114113@format
    115 ring G: C{{s}}*basering,
    116   poly gmspoly: image of t
    117   ideal gmsjacob: image of Jacobian ideal
    118   ideal gmsstd: image of standard basis of Jacobian ideal
    119   matrix gmsmatrix: matrix(gmsjacob)*gmsmatrix=matrix(gmsstd)
    120   ideal gmsbasis: image of monomial vector space basis of Jacobian algebra
    121   int gmsmaxweight: maximal weight of variables of basering
     114ring G;  Gauss-Manin system of t with variable s
     115  poly gmspoly=t;
     116  ideal gmsjacob;  Jacobian ideal of t
     117  ideal gmsstd; standard basis of Jacobian ideal
     118  matrix gmsmatrix; matrix(gmsjacob)*gmsmatrix=matrix(gmsstd)
     119  ideal gmsbasis; monomial vector space basis of Jacobian algebra
     120  int gmsmaxweight;  maximal weight of variables
    122121@end format
    123 NOTE:     do not modify gms variables if you want to use gms procedures
    124122KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice
    125 EXAMPLE:  example gms; shows examples
     123EXAMPLE:  example gmsring; shows examples
    126124"
    127125{
     
    214212
    215213proc gmsnf(ideal p,int K,list #)
    216 "USAGE:    gmsnf(p,K[,Kmax]); poly p, int K[, int Kmax];
    217 ASSUME:   basering constructed by gmsring, K<=Kmax
     214"USAGE:    gmsnf(p,K[,Kmax]); poly p, int K, int Kmax
     215ASSUME:   basering returned by gmsring; K<=Kmax
    218216RETURN:
    219217@format
    220 list l:
    221   ideal l[1]: projection of p to H''=C{{s}}*gmsbasis mod s^{K+1}
    222   ideal l[2]: p=l[1]+l[2] mod s^(Kmax+1)
     218list nf;
     219  ideal nf[1];  projection of p to gmsbasis mod s^(K+1)
     220  ideal nf[2];  p=nf[1]+nf[2] mod s^(Kmax+1)
    223221@end format
    224 NOTE:     by setting p=l[2] the computation can be continued up to order
    225           at most Kmax, by default Kmax=infinity
    226222KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice
    227223EXAMPLE:  example gmsnf; shows examples
     
    317313
    318314proc gmscoeffs(ideal p,int K,list #)
    319 "USAGE:    gmscoeffs(p,K[,Kmax]); poly p, int K[, int Kmax];
     315"USAGE:    gmscoeffs(p,K[,Kmax]); poly p, int K, int Kmax
    320316ASSUME:   basering constructed by gmsring, K<=Kmax
    321317RETURN:
    322318@format
    323 list l:
    324   matrix l[1]: projection of p to H''=C{{s}}*gmsbasis=C{{s}}^mu mod s^(K+1)
    325   ideal l[2]: p=matrix(gmsbasis)*l[1]+l[2] mod s^(Kmax+1)
     319list l;
     320  matrix l[1];  gmsbasis representation of p mod s^(K+1)
     321  ideal l[2]; p=matrix(gmsbasis)*l[1]+l[2] mod s^(Kmax+1)
    326322@end format
    327323NOTE:     by setting p=l[2] the computation can be continued up to order
     
    386382///////////////////////////////////////////////////////////////////////////////
    387383
     384static proc liftbound(module U,module H,int k,int K)
     385{
     386  def R=basering;
     387  ring S=0,s,ds;
     388  module U=imap(R,U);
     389  module H=imap(R,H);
     390  degBound=k+K+1;
     391  H=jet(lift(U,H),K);
     392  degBound=0;
     393  setring(R);
     394  return(imap(S,H));
     395}
     396///////////////////////////////////////////////////////////////////////////////
     397
    388398static proc saturate(int K0)
    389399{
     
    416426
    417427  dbprint(printlevel-voice+2,"// transform H'' to saturation of H''");
    418   l=division(H,freemodule(mu)*s^k);
    419   H0=l[1];
     428//  l=division(H,freemodule(mu)*s^k);
     429//  H0=l[1];
     430  H0=liftbound(H,freemodule(mu)*s^k,k,k);
    420431
    421432  return(A0,r,H,H0,k);
     
    423434///////////////////////////////////////////////////////////////////////////////
    424435
    425 static proc tmatrix(matrix A0,ideal r,module H,int k0,int K,int K0)
     436static proc tmat(matrix A0,ideal r,module H,int k0,int K,int K0)
    426437{
    427438  dbprint(printlevel-voice+2,"// compute matrix A of t");
     
    433444
    434445  dbprint(printlevel-voice+2,"// transform A to saturation of H''");
    435   l=division(H*s,A0*H+s^2*diff(matrix(H),s));
    436   matrix A=jet(l[1],l[2],K);
     446//  l=division(H*s,A0*H+s^2*diff(matrix(H),s));
     447//  matrix A=jet(l[1],l[2],K);
     448  matrix A=liftbound(H*s,A0*H+s^2*diff(matrix(H),s),k0+1,K);
    437449
    438450  return(A,A0,r);
     
    440452///////////////////////////////////////////////////////////////////////////////
    441453
    442 static proc eigenvals(matrix A0,ideal r,module H,int k0,int K0)
     454static proc eigvals(matrix A0,ideal r,module H,int k0,int K0)
    443455{
    444456  dbprint(printlevel-voice+2,
    445457    "// compute eigenvalues e with multiplicities m of A");
    446458  matrix A;
    447   A,A0,r=tmatrix(A0,r,H,k0,0,K0);
    448   list l=eigenvalues(A);
     459  A,A0,r=tmat(A0,r,H,k0,0,K0);
     460  list l=eigenvals(A);
    449461  def e,m=l[1..2];
    450462  dbprint(printlevel-voice+2,"// e="+string(e));
     
    455467///////////////////////////////////////////////////////////////////////////////
    456468
    457 static proc transform(matrix A,matrix A0,ideal r,module H,module H0,ideal e,intvec m,int k0,int k1,int K,int K0)
     469static proc transf(matrix A,matrix A0,ideal r,module H,module H0,ideal e,intvec m,int k0,int k1,int K,int K0)
    458470{
    459471  int mu=ncols(gmsbasis);
     
    463475  dbprint(printlevel-voice+2,"// e0="+string(e0));
    464476  dbprint(printlevel-voice+2,"// e1="+string(e1));
    465   A,A0,r=tmatrix(A0,r,H,k0,K+k1,K0+k1);
     477  A,A0,r=tmat(A0,r,H,k0,K+k1,K0+k1);
    466478  module U0=s^k0*freemodule(mu);
    467479
     
    541553///////////////////////////////////////////////////////////////////////////////
    542554
    543 proc monodromy(poly t,list #)
     555proc monodromy(poly t)
    544556"USAGE:    monodromy(t); poly t
    545 ASSUME:   basering with characteristic 0 and local degree ordering,
    546           t with isolated citical point 0
    547 RETURN:   list l: Jordan data jordan(M) of a monodromy matrix exp(-2*pi*i*M)
    548 SEE ALSO: mondromy_lib
     557ASSUME:   characteristic 0; local degree ordering;
     558          isolated citical point 0 of t
     559RETURN:   list l;  Jordan data jordan(M) of monodromy matrix exp(-2*pi*i*M)
     560SEE ALSO: mondromy_lib, linalg.lib
    549561KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; monodromy
    550562EXAMPLE:  example monodromy; shows examples
     
    563575
    564576  def A0,r,H,H0,k0=saturate(n);
    565   e,m,A0,r,k1=eigenvals(A0,r,H,k0,n);
    566   A,A0,r,H0,U0,e,m=transform(A,A0,r,H,H0,e,m,k0,k1,0,0);
     577  e,m,A0,r,k1=eigvals(A0,r,H,k0,n);
     578  A,A0,r,H0,U0,e,m=transf(A,A0,r,H,H0,e,m,k0,k1,0,0);
    567579
    568580  setring(R);
     
    579591proc spectrum(poly t)
    580592"USAGE:    spectrum(t); poly t
    581 ASSUME:   basering with characteristic 0 and local degree ordering,
    582           t with isolated citical point 0
     593ASSUME:   characteristic 0; local degree ordering;
     594          isolated citical point 0 of t
    583595RETURN:
    584596@format
    585 list sp: spectrum of t
    586   ideal sp[1]: V-filtration indices in increasing order
    587   intvec sp[2]: weight filtration indices in decreasing order
    588   intvec sp[3]:
    589     int sp[3][i]: multiplicity of spectral number sp[1][i]
     597list sp;  singularity spectrum of t
     598  ideal sp[1];
     599    number sp[1][i];  i-th spectral number
     600  intvec sp[2];
     601    int sp[2][i];  multiplicity of i-th spectral number
    590602@end format
    591603SEE ALSO: spectrum_lib
     
    608620proc sppairs(poly t)
    609621"USAGE:    sppairs(t); poly t
    610 ASSUME:   basering with characteristic 0 and local degree ordering,
    611           t with isolated citical point 0
     622ASSUME:   characteristic 0; local degree ordering;
     623          isolated citical point 0 of t
    612624RETURN:
    613625@format
    614 list spp: spectrum of t
    615   ideal spp[1],intvec spp[2]: spectral pairs in in-/decreasing lex. order
    616   intvec spp[3]:
    617     int spp[3][i]: multiplicity of spectral pair (spp[1][i],spp[2][i])
     626list spp;  spectral pairs of t
     627  ideal spp[1];
     628    number spp[1][i];  V-filtration index of i-th spectral pair
     629  intvec spp[2];
     630    int spp[2][i];  weight filtration index of i-th spectral pair
     631  intvec spp[3];
     632    int spp[3][i];  multiplicity of i-th spectral pair
    618633@end format
    619634SEE ALSO: spectrum_lib
     
    636651
    637652proc sppnf(ideal a,intvec w,list #)
    638 "USAGE:    sppnf(a,w[,m][,v|V]); ideal a, intvec w, intvec m, module v, list V
     653"USAGE:    sppnf(a,w[,m][,V]); ideal a, intvec w, intvec m, list V
     654ASSUME:   ncols(e)=size(w)=size(m)=size(V); module V[i]
    639655RETURN:
    640656@format
    641 list spp: normalized spectral pairs (a,w,m[,V])
    642   ideal spp[1]: numbers in a in increasing order
    643   intvec spp[2]: integers in w in decreasing order
    644   intvec spp[3]:
    645     int spp[3][i]: multiplicity of pair (spp[1][i],spp[2][i]) in (a,w)
    646   list spp[4]:
    647     module spp[4][i]: module associated to pair (spp[1][i],spp[2][i])
     657list spp;  spectral pairs normal form of (a,w,m,V)
     658  ideal spp[1];
     659    number spp[1][i];  V-filtration index of i-th spectral pair
     660  intvec spp[2];
     661    int spp[2][i];  weight filtration index of i-th spectral pair
     662  intvec spp[3];
     663    int spp[3][i];  multiplicity of i-th spectral pair
     664  list spp[4];
     665    module spp[4][i];  vector space of i-th spectral pair
    648666@end format
     667SEE ALSO: spectrum_lib
     668KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice;
     669          mixed Hodge structure; V-filtration; weight filtration;
     670          spectrum; spectral pairs
    649671EXAMPLE:  example sppnorm; shows examples
    650672"
     
    770792proc vfilt(poly t)
    771793"USAGE:    vfilt(t); poly t
    772 ASSUME:   basering with characteristic 0 and local degree ordering,
    773           t with isolated citical point 0
    774 RETURN:t
     794ASSUME:   characteristic 0; local degree ordering;
     795          isolated citical point 0 of t
     796RETURN:
    775797@format
    776 list v: V-filtration on H''/H'
    777   ideal v[1]: spectral numbers in increasing order
    778   intvec v[2]:
    779     int v[2][i]: multiplicity of spectral number v[1][i]
    780   list v[4]:
    781     module v[4][i]: vector space basis of v[1][i]-th graded part
    782                     in terms of v[4]
    783   ideal v[4]: monomial vector space basis of H''/H'
    784   ideal v[5]: standard basis of Jacobian ideal
     798list v;  V-filtration on H''/s*H''
     799  ideal v[1];
     800    number v[1][i];  V-filtration index of i-th spectral pair
     801  intvec v[2];
     802    int v[2][i];  multiplicity of i-th spectral pair
     803  list v[3];
     804    module v[3][i];  vector space of i-th spectral pair in terms of v[4]
     805  ideal v[4];  monomial vector space basis of H''/s*H''
     806  ideal v[5]; standard basis of Jacobian ideal
    785807@end format
    786808SEE ALSO: spectrum_lib
     
    803825proc vwfilt(poly t)
    804826"USAGE:    vwfilt(t); poly t
    805 ASSUME:   basering with characteristic 0 and local degree ordering,
    806           t with isolated citical point 0
     827ASSUME:   characteristic 0; local degree ordering;
     828          isolated citical point 0 of t
    807829RETURN:
    808830@format
    809 list vw: weight refined V-filtration on H''/H'
    810   ideal vw[1]: spectral numbers in increasing order
    811   intvec vw[2]: weights in decreasing order
    812   intvec vw[3]:
    813     int vw[3][i]: multiplicity of spectral pair (vw[1][i],vw[2][i])
    814   list vw[4]:
    815     module vw[4][i]: vector space basis of (vw[1][i],vw[2][i])-th graded part
    816                      in terms of vw[5]
    817   ideal vw[5]: monomial vector space basis of H''/H'
    818   ideal vw[6]: standard basis of Jacobian ideal
     831list vw;  weighted V-filtration on H''/s*H''
     832  ideal vw[1];
     833    number vw[1][i];  V-filtration index of i-th spectral pair
     834  intvec vw[2];
     835    int vw[2][i];  weight filtration index of i-th spectral pair
     836  intvec vw[3];
     837    int vw[3][i];  multiplicity of i-th spectral pair
     838  list vw[4];
     839    module vw[4][i];  vector space of i-th spectral pair
     840                      in terms of vw[5]
     841  ideal vw[5];  monomial vector space basis of H''/s*H''
     842  ideal vw[6];  standard basis of Jacobian ideal
    819843@end format
    820844SEE ALSO: spectrum_lib
     
    838862
    839863  def A0,r,H,H0,k0=saturate(n);
    840   e,m,A0,r,k1=eigenvals(A0,r,H,k0,n);
    841   A,A0,r,H0,U0,e,m=transform(A,A0,r,H,H0,e,m,k0,k1,0,0);
     864  e,m,A0,r,k1=eigvals(A0,r,H,k0,n);
     865  A,A0,r,H0,U0,e,m=transf(A,A0,r,H,H0,e,m,k0,k1,0,0);
    842866
    843867  dbprint(printlevel-voice+2,"// compute weight filtration basis");
     
    895919///////////////////////////////////////////////////////////////////////////////
    896920
    897 proc saito(poly t,list #)
    898 "USAGE:    saito(t); poly t
    899 ASSUME:   basering with characteristic 0 and local degree ordering,
    900           t with isolated citical point 0
    901 RETURN:   list A: matrix A[1]+A[2]*s of t on H''
     921static proc commutator(matrix A)
     922{
     923  int n=ncols(A);
     924  int i,j,k;
     925  matrix C[n^2][n^2];
     926  for(i=0;i<n;i++)
     927  {
     928    for(j=0;j<n;j++)
     929    {
     930      for(k=0;k<n;k++)
     931      {
     932        C[i*n+j+1,k*n+j+1]=C[i*n+j+1,k*n+j+1]+A[i+1,k+1];
     933        C[i*n+j+1,i*n+k+1]=C[i*n+j+1,i*n+k+1]-A[k+1,j+1];
     934      }
     935    }
     936  }
     937  return(C);
     938}
     939
     940///////////////////////////////////////////////////////////////////////////////
     941
     942proc tmatrix(poly t,list #)
     943"USAGE:    tmatrix(t); poly t
     944ASSUME:   characteristic 0; local degree ordering;
     945          isolated citical point 0 of t
     946RETURN:   list A;  t-matrix A[1]+s*A[2] on H''
    902947KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice;
    903948          mixed Hodge structure; opposite Hodge filtration; V-filtration;
    904 EXAMPLE:  example tmat; shows examples
     949EXAMPLE:  example tmatrix; shows examples
    905950"
    906951{
     
    918963
    919964  def A0,r,H,H0,k0=saturate(2*n+mu-1);
    920   e,m,A0,r,k1=eigenvals(A0,r,H,k0,n);
    921   A,A0,r,H0,U0,e,m=transform(A,A0,r,H,H0,e,m,k0,k1,k0+k1,k0+k1);
     965  e,m,A0,r,k1=eigvals(A0,r,H,k0,n);
     966  A,A0,r,H0,U0,e,m=transf(A,A0,r,H,H0,e,m,k0,k1,k0+k1,k0+k1);
    922967
    923968  dbprint(printlevel-voice+2,"// transform to Jordan basis");
     
    947992  dbprint(printlevel-voice+2,"// transform to V-splitting basis");
    948993  A=jet(A,0);
    949   H=jet(division(U,H)[1],k0+k1);
    950   H=std(H);
     994//  H=std(jet(division(U,H)[1],k0+k1));
     995  H=std(liftbound(U,H,0,k0+k1));
    951996
    952997  dbprint(printlevel-voice+2,"// compute V-leading terms of H''");
     
    9951040    }
    9961041    F0=intersect(C,H0);
     1042
    9971043    F=list();
    9981044    j=0;
     
    10531099  degBound=k0+k1+1;
    10541100  option("redSB");
     1101
    10551102  H=std(H);
     1103
    10561104  degBound=0;
    10571105  H=simplify(jet(H,k0+k1),1);
     
    10601108
    10611109  dbprint(printlevel-voice+2,"// compute matrix A0+sA1 of t");
    1062   list l=division(H,s*A*H+s^2*diff(matrix(H),s));
    1063   A=jet(l[1],l[2],k0+k1+1);
     1110//  list l=division(H,s*A*H+s^2*diff(matrix(H),s));
     1111//  A=jet(l[1],l[2],k0+k1+1);
     1112  A=liftbound(H,s*A*H+s^2*diff(matrix(H),s),k0+k1,1);
    10641113  A0=jet(A,0);
    10651114  A=jet(A,1)/s;
     
    10721121  ring R=0,(x,y),ds;
    10731122  poly t=x5+x2y2+y5;
    1074   list A=saito(t);
     1123  list A=tmatrix(t);
    10751124  print(A[1]);
    10761125  print(A[2]);
     
    10781127///////////////////////////////////////////////////////////////////////////////
    10791128
    1080 proc endvfilt(list V)
    1081 "USAGE:   endvfilt(V); list V
    1082 ASSUME:  V computed by vfilt
     1129proc endvfilt(list v)
     1130"USAGE:   endvfilt(v); list v
     1131ASSUME:  v returned by vfilt
    10831132RETURN:
    10841133@format
    1085 list EV: endomorphism V-filtration on the Jacobian algebra
    1086   ideal EV[1]: spectral numbers in increasing order
    1087   intvec EV[2]:
    1088     int EV[2][i]: multiplicity of spectral pair (EV[1][i],EV[2][i])
    1089   list EV[3]:
    1090     module EV[3][i]: vector space basis of the (EV[1][i],EV[2][i])-th
    1091                       graded part in terms of EV[4]
    1092   ideal EV[4]: monomial vector space basis
    1093   ideal EV[5]: standard basis of Jacobian ideal
     1134list ev;  endomorphism V-filtration on Jacobian algebra
     1135  ideal ev[1];
     1136    number ev[1][i];  V-filtration index of i-th spectral pair
     1137  intvec ev[2];
     1138    int ev[2][i];  multiplicity of i-th spectral pair
     1139  list ev[3];
     1140    module ev[3][i];  vector space of i-th spectral pair in terms of ev[4]
     1141  ideal ev[4];  monomial vector space basis of Jacobian algebra
     1142  ideal ev[5]; standard basis of Jacobian ideal
    10941143@end format
    10951144KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice;
    10961145          mixed Hodge structure; V-filtration; endomorphism filtration
    1097 EXAMPLE: example endvfilt; shows examples
    1098 "
    1099 {
    1100   def a,d,v,m,g=V[1..5];
     1146EXAMPLE:  example endvfilt; shows examples
     1147"
     1148{
     1149  def a,d,V,m,g=v[1..5];
    11011150  int mu=ncols(m);
    11021151
    1103   module V0=v[1];
    1104   for(int i=2;i<=size(v);i++)
    1105   {
    1106     V0=V0,v[i];
     1152  module V0=V[1];
     1153  for(int i=2;i<=size(V);i++)
     1154  {
     1155    V0=V0,V[i];
    11071156  }
    11081157
     
    12341283proc spprint(list sp)
    12351284"USAGE:   spprint(sp); list sp
    1236 RETURN:  string: spectrum sp
     1285RETURN:  string s; spectrum sp
    12371286EXAMPLE: example spprint; shows examples
    12381287"
     
    12561305proc sppprint(list spp)
    12571306"USAGE:   sppprint(spp); list spp
    1258 RETURN:  string: spectral pairs spp
     1307RETURN:  string s; spectral pairs spp
    12591308EXAMPLE: example sppprint; shows examples
    12601309"
     
    12771326
    12781327proc spadd(list sp1,list sp2)
    1279 "USAGE:   spadd(sp1,sp2); list sp1,sp2
    1280 RETURN:  list: sum of spectra sp1 and sp2
     1328"USAGE:   spadd(sp1,sp2); list sp1, list sp2
     1329RETURN:  list sp; sum of spectra sp1 and sp2
    12811330EXAMPLE: example spadd; shows examples
    12821331"
     
    13501399
    13511400proc spsub(list sp1,list sp2)
    1352 "USAGE:   spsub(sp1,sp2); list sp1,sp2
    1353 RETURN:  list: difference of spectra sp1 and sp2
     1401"USAGE:   spsub(sp1,sp2); list sp1, list sp2
     1402RETURN:  list sp; difference of spectra sp1 and sp2
    13541403EXAMPLE: example spsub; shows examples
    13551404"
     
    13691418
    13701419proc spmul(list #)
    1371 "USAGE:
    1372 @format
    1373 1) spmul(sp,k); list sp, int k
    1374 2) spmul(sp,k); list sp, intvec k
    1375 @end format
    1376 RETURN:
    1377 @format
    1378 1) list: product of spectrum sp and integer k
    1379 2) list: linear combination of spectra sp with coefficients k
    1380 @end format
     1420"USAGE:   spmul(sp0,k); list sp0, int[vec] k
     1421RETURN:  list sp;  linear combination of spectra sp0 with coefficients k
    13811422EXAMPLE: example spmul; shows examples
    13821423"
     
    14181459
    14191460proc spissemicont(list sp,list #)
    1420 "USAGE:   spissemicont(sp[,opt]); list sp, int opt
     1461"USAGE:   spissemicont(sp[,1]); list sp, int opt
    14211462RETURN:
    14221463@format
    14231464int k=
    1424 if opt=0:
    1425   1, if sum of spectrum sp over all intervals [a,a+1) is positive
    1426   0, if sum of spectrum sp over some interval [a,a+1) is negative
    1427 if opt=1:
    1428   1, if sum of spectrum sp over all intervals [a,a+1) and (a,a+1) is positive
    1429   0, if sum of spectrum sp over some interval [a,a+1) or (a,a+1) is negative
    1430 default: opt=0
     1465  1;  if sum of sp is positive on all intervals [a,a+1) [and (a,a+1)]
     1466  0;  if sum of sp is negative on some interval [a,a+1) [or (a,a+1)]
    14311467@end format
    14321468EXAMPLE: example spissemicont; shows examples
     
    14811517
    14821518proc spsemicont(list sp0,list sp,list #)
    1483 "USAGE:   spsemicont(sp,k[,opt]); list sp0, list sp, int opt
    1484 RETURN:  list of intvecs l:
    1485          spissemicont(sub(sp0,spmul(sp,k)),opt)==1 iff k<=l[i] for some i
     1519"USAGE:   spsemicont(sp0,sp,k[,1]); list sp0, list sp
     1520RETURN:
     1521@format
     1522list l;
     1523  intvec l[i];  if k<=l[i] then spissemicont(sub(sp0,spmul(sp,k))[,1])==1
     1524@end format
    14861525NOTE:    if the spectra sp occur with multiplicities k in a deformation
    1487          of the [quasihomogeneous] spectrum sp0 then
     1526         of the [quasihomogeneous] singularity with spectrum sp0 then
    14881527         spissemicont(sub(sp0,spmul(sp,k))[,1])==1
    14891528EXAMPLE: example spsemicont; shows examples
     
    15541593proc spmilnor(list sp)
    15551594"USAGE:   spmilnor(sp); list sp
    1556 RETURN:  int: Milnor number of spectrum sp
     1595RETURN:  int mu; Milnor number of spectrum sp
    15571596EXAMPLE: example spmilnor; shows examples
    15581597"
     
    15711610proc spgeomgenus(list sp)
    15721611"USAGE:   spgeomgenus(sp); list sp
    1573 RETURN:  int: geometrical genus of spectrum sp
     1612RETURN:  int g; geometrical genus of spectrum sp
    15741613EXAMPLE: example spgeomgenus; shows examples
    15751614"
     
    15991638proc spgamma(list sp)
    16001639"USAGE:   spgamma(sp); list sp
    1601 RETURN:  number: gamma invariant of spectrum sp
     1640RETURN:  number gamma; gamma invariant of spectrum sp
    16021641EXAMPLE: example spgamma; shows examples
    16031642"
  • Singular/LIB/linalg.lib

    r1f1e93 r275721f  
    11//GMG last modified: 04/25/2000
    22//////////////////////////////////////////////////////////////////////////////
    3 version="$Id: linalg.lib,v 1.20 2001-11-05 09:17:05 mschulze Exp $";
     3version="$Id: linalg.lib,v 1.21 2001-11-20 13:00:41 mschulze Exp $";
    44category="Linear Algebra";
    55info="
    6 LIBRARY:  linalg.lib        Algorithmic Linear Algebra
     6LIBRARY:  linalg.lib  Algorithmic Linear Algebra
    77AUTHORS:  Ivor Saynisch (ivs@math.tu-cottbus.de)
    88@*        Mathias Schulze (mschulze@mathematik.uni-kl.de)
     
    2525 U_D_O(A);            P*A=U*D*O, P,D,U,O=permutaion,diag,lower-,upper-triang
    2626 pos_def(A,i);        test symmetric matrix for positive definiteness
    27  hessenberg(M);       transforms M to Hessenberg form
    28  spnf(a[,m][,v|V]);   normalize spectrum
    29  eigenvalues(M);      eigenvalues of M with multiplicities
    30  jordan(M);           Jordan data of constant square matrix M
    31  jordanbasis(M);      Jordan basis of constant square matrix M
    32  jordanmatrix(e,b);   Jordan matrix with eigenvalues e and Jordan block sizes b
    33  jordanform(M);       Jordan matrix of constant square matrix M
    34  commutator(A);       matrix of commutator B->[A,B]=AB-BA
     27 hessenberg(M);       Hessenberg form of M
     28 spnf(a[,m][,V]);     spectrum normal form of (a,m,V)
     29 eigenvals(M);        eigenvalues and multiplicities of M
     30 jordan(M);           Jordan data of M
     31 jordanbasis(M);      Jordan basis and weight filtration of M
     32 jordanmatrix(e,b);   Jordan matrix with Jordan data (e,b)
     33 jordannf(M);         Jordan normal form of M
    3534";
    3635
     
    13021301"USAGE:   hessenberg(M); matrix M
    13031302ASSUME:  M constant square matrix
    1304 RETURN:  matrix H in Hessenberg form with H=inverse(U)*M*U for some U
     1303RETURN:  matrix H;  Hessenberg form of M
    13051304EXAMPLE: example hessenberg; shows examples
    13061305"
     
    13361335
    13371336proc spnf(ideal e,list #)
    1338 "USAGE:   spnf(e[,m][,v|V]); ideal e, intvec m, module v, list V
     1337"USAGE:   spnf(e[,m][,V]); ideal e, intvec m, list V of modules
     1338ASSUME:  ncols(e)=size(m)=size(V)
    13391339RETURN:
    13401340@format
    1341 list Sp: normalized spectrum (e,m[,V])
    1342   ideal Sp[1]: numbers in a in increasing order
    1343   intvec Sp[2]:
    1344     int Sp[2][i]: multiplicity of number Sp[1][i] in e
    1345   list Spp[3]:
    1346     module Spp[3][i]: module associated to number Spp[1][i]
     1341list sp;  spectrum normal form of (e,m[,V])
     1342  ideal sp[1];  numbers in e in increasing order
     1343  intvec sp[2];
     1344    int sp[2][i];  multiplicity of number sp[1][i] in e
     1345  list sp[3];
     1346    module sp[3][i];  module associated to number sp[1][i]
    13471347@end format
    13481348EXAMPLE: example spnf; shows examples
     
    14621462///////////////////////////////////////////////////////////////////////////////
    14631463
    1464 proc eigenvalues(matrix M)
    1465 "USAGE:   eigenvalues(M); matrix M
    1466 ASSUME:  M constant square matrix, eigenvalues of M in coefficient field
     1464proc eigenvals(matrix M)
     1465"USAGE:   eigenvals(M); matrix M
     1466ASSUME:  eigenvalues of M in basefield
    14671467RETURN:
    14681468@format
    1469 list l:
    1470   ideal l[1]: eigenvalues of M
    1471   intvec l[2]:
    1472     int l[2][i]: multiplicity of eigenvalue l[1][i]
     1469list l;
     1470  ideal l[1]; eigenvalues of M
     1471  intvec l[2];
     1472    int l[2][i]; multiplicity of eigenvalue l[1][i]
    14731473@end format
    1474 EXAMPLE: example eigenvalues; shows examples
     1474EXAMPLE: example eigenvals; shows examples
    14751475"
    14761476{
     
    15301530  matrix M[3][3]=3,2,1,0,2,1,0,0,3;
    15311531  print(M);
    1532   eigenvalues(M);
     1532  eigenvals(M);
    15331533}
    15341534///////////////////////////////////////////////////////////////////////////////
     
    15361536proc jordan(matrix M,list #)
    15371537"USAGE:   jordan(M); matrix M
    1538 ASSUME:  M constant square matrix, eigenvalues of M in coefficient field
     1538ASSUME:  eigenvalues of M in basefield
    15391539RETURN:
    15401540@format
    1541 list l:
    1542   ideal l[1]: eigenvalues of M in increasing order
    1543   intvec l[2]: corresponding Jordan block sizes
    1544   intvec l[3]: corresponding multiplicities
     1541list l;  Jordan data of M
     1542  ideal l[1];
     1543    number l[1][i];  eigenvalue of i-th Jordan block of M
     1544  intvec l[2];
     1545    int l[2][i];  size of i-th Jordan block of M
     1546  intvec l[3];
     1547    int l[3][i];  multiplicity of i-th Jordan block of M
    15451548@end format
    15461549EXAMPLE: example jordan; shows examples
     
    15601563  if(size(#)==0)
    15611564  {
    1562     #=eigenvalues(M);
     1565    #=eigenvals(M);
    15631566  }
    15641567  def e0,m0=#[1..2];
     
    15671570  for(i=1;i<=ncols(e0);i++)
    15681571  {
    1569     if(deg(e0[i]>0))
    1570     {
     1572    if(deg(e0[i])>0)
     1573    {
     1574
    15711575      ERROR("eigenvalues in coefficient field expected");
    15721576      return(list());
     
    16271631proc jordanbasis(matrix M,list #)
    16281632"USAGE:   jordanbasis(M); matrix M
    1629 ASSUME:  M constant square matrix, eigenvalues of M in coefficient field
     1633ASSUME:  eigenvalues of M in basefield
    16301634RETURN:
    16311635@format
    16321636list l:
    1633   module l[1]: inverse(l[1])*M*l[1] has Jordan normal form
    1634   intvec l[2]: weight filtration indices of l[1] with center 0
     1637  module l[1];  inverse(l[1])*M*l[1] Jordan normal form
     1638  intvec l[2];
     1639    int l[2][i];  weight filtration index of l[1][i]
    16351640@end format
    16361641EXAMPLE: example jordanbasis; shows examples
     
    16501655  if(size(#)==0)
    16511656  {
    1652     #=eigenvalues(M);
     1657    #=eigenvals(M);
    16531658  }
    16541659  def e,m=#[1..2];
     
    17261731proc jordanmatrix(ideal e,intvec s,intvec m)
    17271732"USAGE:   jordanmatrix(e,s,m); ideal e, intvec s, intvec m
     1733ASSUME:  ncols(e)=size(s)=size(m)
    17281734RETURN:
    17291735@format
    1730 matrix J: Jordan normal form with eigenvalues e and Jordan block sizes s
    1731           with multiplicities m
     1736matrix J;  Jordan matrix with eigenvalues e, Jordan block sizes s,
     1737           and multiplicities m
    17321738@end format
    17331739EXAMPLE: example jordanmatrix; shows examples
     
    17691775///////////////////////////////////////////////////////////////////////////////
    17701776
    1771 proc jordanform(matrix M,list #)
    1772 "USAGE:   jordanform(M); matrix M
    1773 ASSUME:  M constant square matrix, eigenvalues of M in coefficient field
    1774 RETURN:  matrix J in Jordan normal form with J=inverse(U)*M*U for some U
    1775 EXAMPLE: example jordanform; shows examples
     1777proc jordannf(matrix M,list #)
     1778"USAGE:   jordannf(M); matrix M
     1779ASSUME:  eigenvalues of M in basefield
     1780RETURN:  matrix J; Jordan normal form of M
     1781EXAMPLE: example jordannf; shows examples
    17761782"
    17771783{
     
    17841790  matrix M[3][3]=3,2,1,0,2,1,0,0,3;
    17851791  print(M);
    1786   print(jordanform(M));
    1787 }
    1788 ///////////////////////////////////////////////////////////////////////////////
    1789 
    1790 proc commutator(matrix A)
    1791 "USAGE:   (A); matrix A
    1792 ASSUME:  A is a square matrix
    1793 RETURN:  matrix C of the commutator B->[A,B]=AB-BA w.r.t. rowwise ordered basis
    1794 EXAMPLE: example commutator; shows examples
    1795 "
    1796 {
    1797   int n=ncols(A);
    1798   if(n!=nrows(A))
    1799   {
    1800     ERROR("square matrix expected");
    1801   }
    1802   int i,j,k;
    1803   matrix C[n^2][n^2];
    1804   for(i=0;i<n;i++)
    1805   {
    1806     for(j=0;j<n;j++)
    1807     {
    1808       for(k=0;k<n;k++)
    1809       {
    1810         C[i*n+j+1,k*n+j+1]=C[i*n+j+1,k*n+j+1]+A[i+1,k+1];
    1811         C[i*n+j+1,i*n+k+1]=C[i*n+j+1,i*n+k+1]-A[k+1,j+1];
    1812       }
    1813     }
    1814   }
    1815   return(C);
    1816 }
    1817 example
    1818 { "EXAMPLE:"; echo=2;
    1819   ring R;
    1820   matrix A[2][2]=1,2,3,4;
    1821   print(A);
    1822   print(commutator(A));
    1823 }
    1824 
     1792  print(jordannf(M));
     1793}
    18251794///////////////////////////////////////////////////////////////////////////////
    18261795
Note: See TracChangeset for help on using the changeset viewer.