code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/gaussman_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/gaussman_lib.doc INSTEAD
@c library version: (1.33.2.26,2003/02/10)
@c library file: ../Singular/LIB/gaussman.lib
@cindex gaussman.lib
@cindex gaussman_lib
@table @asis
@item @strong{Library:}
gaussman.lib
@item @strong{Purpose:}
  Algorithmic Gauss-Manin Connection

@item @strong{Author:}
Mathias Schulze, email: mschulze@@mathematik.uni-kl.de

@item @strong{Overview:}
A library to compute Hodge-theoretic invariants
@*of isolated hypersurface singularities

@end table

@strong{Procedures:}
@menu
* gmsring:: Gauss-Manin system of t with variable s
* gmsnf:: Gauss-Manin normal form of p
* gmscoeffs:: Gauss-Manin basis representation of p
* bernstein:: roots of the Bernstein polynomial of t
* monodromy:: Jordan data of complex monodromy of t
* spectrum:: singularity spectrum of t
* sppairs:: spectral pairs of t
* spnf:: spectrum normal form of (a,m,V)
* sppnf:: spectral pairs normal form of (a,w,m,V)
* vfilt:: V-filtration of t on Brieskorn lattice
* vwfilt:: weighted V-filtration of t on Brieskorn lattice
* tmatrix:: C[[s]]-matrix of t on Brieskorn lattice
* endvfilt:: endomorphism V-filtration on Jacobian algebra
* spprint:: print spectrum sp
* sppprint:: print spectral pairs spp
* spadd:: sum of spectra sp1 and sp2
* spsub:: difference of spectra sp1 and sp2
* spmul:: linear combination of spectra sp
* spissemicont:: semicontinuity test of spectrum sp
* spsemicont:: semicontinuous combinations of spectra sp0 in sp
* spmilnor:: Milnor number of spectrum sp
* spgeomgenus:: geometrical genus of spectrum sp
* spgamma:: gamma invariant of spectrum sp
@end menu
@cindex singularities
@cindex Gauss-Manin connection
@cindex Brieskorn lattice
@cindex monodromy
@cindex spectrum
@cindex spectral pairs
@cindex mixed Hodge structure
@cindex V-filtration
@cindex weight filtration
@c inserted refs from d2t_singular/gaussman_lib.doc:56
@ifinfo
@menu
See also:
* mondromy_lib::
* spectrum_lib::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{mondromy_lib};
@ref{spectrum_lib}.
@end iftex
@c end inserted refs from d2t_singular/gaussman_lib.doc:56

@c ---end content LibInfo---

@c ------------------- gmsring -------------
@node gmsring, gmsnf,, gaussman_lib
@subsubsection gmsring
@cindex gmsring
@c ---content gmsring---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
gmsring(t,s); poly t, string s

@item @strong{Assume:}
characteristic 0; local degree ordering;
@*isolated critical point 0 of t

@item @strong{Return:}
@format
ring G;  Gauss-Manin system of t with variable s
  poly gmspoly=t;
  ideal gmsjacob;  Jacobian ideal of t
  ideal gmsstd;  standard basis of Jacobian ideal
  matrix gmsmatrix;  matrix(gmsjacob)*gmsmatrix==matrix(gmsstd)
  ideal gmsbasis;  monomial vector space basis of Jacobian algebra
  int gmsmaxdeg;  maximal weight of variables
@end format

@item @strong{Note:}
gmsbasis is a C[[s]]-basis of H'' and [t,s]=s^2

@cindex singularities
@cindex Gauss-Manin connection
@cindex Brieskorn lattice
@end table
@strong{Example:}
@smallexample
@c computed example gmsring d2t_singular/gaussman_lib.doc:97
LIB "gaussman.lib";
ring R=0,(x,y),ds;
poly t=x5+x2y2+y5;
def G=gmsring(t,"s");
setring(G);
gmspoly;
@expansion{} x2y2+x5+y5
print(gmsjacob);
@expansion{} 2xy2+5x4,
@expansion{} 2x2y+5y4
print(gmsstd);
@expansion{} 2x2y+5y4,
@expansion{} 2xy2+5x4,
@expansion{} 5x5-5y5,
@expansion{} 10y6+25x3y4
print(gmsmatrix);
@expansion{} 0,1,x, -2xy,
@expansion{} 1,0,-y,2y2+5x3
print(gmsbasis);
@expansion{} y5,
@expansion{} y4,
@expansion{} y3,
@expansion{} y2,
@expansion{} xy,
@expansion{} y,
@expansion{} x4,
@expansion{} x3,
@expansion{} x2,
@expansion{} x,
@expansion{} 1
gmsmaxdeg;
@expansion{} 1
@c end example gmsring d2t_singular/gaussman_lib.doc:97
@end smallexample
@c ---end content gmsring---

@c ------------------- gmsnf -------------
@node gmsnf, gmscoeffs, gmsring, gaussman_lib
@subsubsection gmsnf
@cindex gmsnf
@c ---content gmsnf---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
gmsnf(p,K); poly p, int K

@item @strong{Assume:}
basering returned by gmsring

@item @strong{Return:}
@format
list nf;
  ideal nf[1];  projection of p to <gmsbasis>C[[s]] mod s^(K+1)
  ideal nf[2];  p==nf[1]+nf[2]
@end format

@item @strong{Note:}
computation can be continued by setting p=nf[2]

@cindex singularities
@cindex Gauss-Manin connection
@cindex Brieskorn lattice
@end table
@strong{Example:}
@smallexample
@c computed example gmsnf d2t_singular/gaussman_lib.doc:143
LIB "gaussman.lib";
ring R=0,(x,y),ds;
poly t=x5+x2y2+y5;
def G=gmsring(t,"s");
setring(G);
list l0=gmsnf(gmspoly,0);
print(l0[1]);
@expansion{} -1/2y5
list l1=gmsnf(gmspoly,1);
print(l1[1]);
@expansion{} -1/2y5+1/2s
list l=gmsnf(l0[2],1);
print(l[1]);
@expansion{} 1/2s
@c end example gmsnf d2t_singular/gaussman_lib.doc:143
@end smallexample
@c ---end content gmsnf---

@c ------------------- gmscoeffs -------------
@node gmscoeffs, bernstein, gmsnf, gaussman_lib
@subsubsection gmscoeffs
@cindex gmscoeffs
@c ---content gmscoeffs---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
gmscoeffs(p,K); poly p, int K

@item @strong{Assume:}
basering constructed by gmsring

@item @strong{Return:}
@format
list l;
  matrix l[1];  C[[s]]-basis representation of p mod s^(K+1)
  ideal l[2];  p==matrix(gmsbasis)*l[1]+l[2]
@end format

@item @strong{Note:}
computation can be continued by setting p=l[2]

@cindex singularities
@cindex Gauss-Manin connection
@cindex Brieskorn lattice
@end table
@strong{Example:}
@smallexample
@c computed example gmscoeffs d2t_singular/gaussman_lib.doc:189
LIB "gaussman.lib";
ring R=0,(x,y),ds;
poly t=x5+x2y2+y5;
def G=gmsring(t,"s");
setring(G);
list l0=gmscoeffs(gmspoly,0);
print(l0[1]);
@expansion{} -1/2,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0
list l1=gmscoeffs(gmspoly,1);
print(l1[1]);
@expansion{} -1/2,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 1/2s
list l=gmscoeffs(l0[2],1);
print(l[1]);
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 0,
@expansion{} 1/2s
@c end example gmscoeffs d2t_singular/gaussman_lib.doc:189
@end smallexample
@c ---end content gmscoeffs---

@c ------------------- bernstein -------------
@node bernstein, monodromy, gmscoeffs, gaussman_lib
@subsubsection bernstein
@cindex bernstein
@c ---content bernstein---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
bernstein(t); poly t

@item @strong{Assume:}
characteristic 0; local degree ordering;
@*isolated critical point 0 of t

@item @strong{Return:}
ideal r; roots of the Bernstein polynomial b excluding the root -1

@item @strong{Note:}
the roots of b are negative rational numbers and -1 is a root of b

@cindex singularities
@cindex Gauss-Manin connection
@cindex Brieskorn lattice
@cindex Bernstein polynomial
@end table
@strong{Example:}
@smallexample
@c computed example bernstein d2t_singular/gaussman_lib.doc:233
LIB "gaussman.lib";
ring R=0,(x,y),ds;
poly t=x5+x2y2+y5;
bernstein(t);
@expansion{} [1]:
@expansion{}    _[1]=-1/2
@expansion{}    _[2]=-7/10
@expansion{}    _[3]=-9/10
@expansion{}    _[4]=-1
@expansion{}    _[5]=-11/10
@expansion{}    _[6]=-13/10
@expansion{} [2]:
@expansion{}    2,1,1,2,1,1
@c end example bernstein d2t_singular/gaussman_lib.doc:233
@end smallexample
@c ---end content bernstein---

@c ------------------- monodromy -------------
@node monodromy, spectrum, bernstein, gaussman_lib
@subsubsection monodromy
@cindex monodromy
@c ---content monodromy---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
monodromy(t); poly t

@item @strong{Assume:}
characteristic 0; local degree ordering;
@*isolated critical point 0 of t

@item @strong{Return:}
@format
list l;  Jordan data jordan(M) of monodromy matrix exp(-2*pi*i*M)
  ideal l[1];
    number l[1][i];  eigenvalue of i-th Jordan block of M
  intvec l[2];
    int l[2][i];  size of i-th Jordan block of M
  intvec l[3];
    int l[3][i];  multiplicity of i-th Jordan block of M
@end format

@cindex singularities
@cindex Gauss-Manin connection
@cindex Brieskorn lattice
@cindex monodromy
@end table
@strong{Example:}
@smallexample
@c computed example monodromy d2t_singular/gaussman_lib.doc:275
LIB "gaussman.lib";
ring R=0,(x,y),ds;
poly t=x5+x2y2+y5;
monodromy(t);
@expansion{} [1]:
@expansion{}    _[1]=1/2
@expansion{}    _[2]=7/10
@expansion{}    _[3]=9/10
@expansion{}    _[4]=1
@expansion{}    _[5]=11/10
@expansion{}    _[6]=13/10
@expansion{} [2]:
@expansion{}    2,1,1,1,1,1
@expansion{} [3]:
@expansion{}    1,2,2,1,2,2
@c end example monodromy d2t_singular/gaussman_lib.doc:275
@end smallexample
@c inserted refs from d2t_singular/gaussman_lib.doc:282
@ifinfo
@menu
See also:
* linalg_lib::
* mondromy_lib::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{linalg_lib};
@ref{mondromy_lib}.
@end iftex
@c end inserted refs from d2t_singular/gaussman_lib.doc:282

@c ---end content monodromy---

@c ------------------- spectrum -------------
@node spectrum, sppairs, monodromy, gaussman_lib
@subsubsection spectrum
@cindex spectrum
@c ---content spectrum---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
spectrum(t); poly t

@item @strong{Assume:}
characteristic 0; local degree ordering;
@*isolated critical point 0 of t

@item @strong{Return:}
@format
list sp;  singularity spectrum of t
  ideal sp[1];
    number sp[1][i];  i-th spectral number
  intvec sp[2];
    int sp[2][i];  multiplicity of i-th spectral number
@end format

@cindex singularities
@cindex Gauss-Manin connection
@cindex Brieskorn lattice
@cindex mixed Hodge structure
@cindex V-filtration
@cindex spectrum
@end table
@strong{Example:}
@smallexample
@c computed example spectrum d2t_singular/gaussman_lib.doc:321
LIB "gaussman.lib";
ring R=0,(x,y),ds;
poly t=x5+x2y2+y5;
spprint(spectrum(t));
@expansion{} (-1/2,1),(-3/10,2),(-1/10,2),(0,1),(1/10,2),(3/10,2),(1/2,1)
@c end example spectrum d2t_singular/gaussman_lib.doc:321
@end smallexample
@c inserted refs from d2t_singular/gaussman_lib.doc:328
@ifinfo
@menu
See also:
* spectrum_lib::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{spectrum_lib}.
@end iftex
@c end inserted refs from d2t_singular/gaussman_lib.doc:328

@c ---end content spectrum---

@c ------------------- sppairs -------------
@node sppairs, spnf, spectrum, gaussman_lib
@subsubsection sppairs
@cindex sppairs
@c ---content sppairs---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
sppairs(t); poly t

@item @strong{Assume:}
characteristic 0; local degree ordering;
@*isolated critical point 0 of t

@item @strong{Return:}
@format
list spp;  spectral pairs of t
  ideal spp[1];
    number spp[1][i];  V-filtration index of i-th spectral pair
  intvec spp[2];
    int spp[2][i];  weight filtration index of i-th spectral pair
  intvec spp[3];
    int spp[3][i];  multiplicity of i-th spectral pair
@end format

@cindex singularities
@cindex Gauss-Manin connection
@cindex Brieskorn lattice
@cindex mixed Hodge structure
@cindex V-filtration
@cindex weight filtration
@cindex spectrum
@cindex spectral pairs
@end table
@strong{Example:}
@smallexample
@c computed example sppairs d2t_singular/gaussman_lib.doc:371
LIB "gaussman.lib";
ring R=0,(x,y),ds;
poly t=x5+x2y2+y5;
sppprint(sppairs(t));
@expansion{} ((-1/2,2),1),((-3/10,1),2),((-1/10,1),2),((0,1),1),((1/10,1),2),((3/10,1)\
   ,2),((1/2,0),1)
@c end example sppairs d2t_singular/gaussman_lib.doc:371
@end smallexample
@c inserted refs from d2t_singular/gaussman_lib.doc:378
@ifinfo
@menu
See also:
* spectrum_lib::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{spectrum_lib}.
@end iftex
@c end inserted refs from d2t_singular/gaussman_lib.doc:378

@c ---end content sppairs---

@c ------------------- spnf -------------
@node spnf, sppnf, sppairs, gaussman_lib
@subsubsection spnf
@cindex spnf
@c ---content spnf---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Assume:}
ncols(a)==size(m)==size(V); typeof(V[i])=="int"

@item @strong{Return:}
order (a[i][,V[i]]) with multiplicity m[i] lexicographically

@end table
@c ---end content spnf---

@c ------------------- sppnf -------------
@node sppnf, vfilt, spnf, gaussman_lib
@subsubsection sppnf
@cindex sppnf
@c ---content sppnf---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Assume:}
ncols(e)=size(w)=size(m)=size(V); typeof(V[i])=="module"

@item @strong{Return:}
order (a[i][,w[i]][,V[i]]) with multiplicity m[i] lexicographically

@end table
@c ---end content sppnf---

@c ------------------- vfilt -------------
@node vfilt, vwfilt, sppnf, gaussman_lib
@subsubsection vfilt
@cindex vfilt
@c ---content vfilt---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
vfilt(t); poly t

@item @strong{Assume:}
characteristic 0; local degree ordering;
@*isolated critical point 0 of t

@item @strong{Return:}
@format
list v;  V-filtration on H''/s*H''
  ideal v[1];
    number v[1][i];  V-filtration index of i-th spectral number
  intvec v[2];
    int v[2][i];  multiplicity of i-th spectral number
  list v[3];
    module v[3][i];  vector space of i-th graded part in terms of v[4]
  ideal v[4];  monomial vector space basis of H''/s*H''
  ideal v[5];  standard basis of Jacobian ideal
@end format

@cindex singularities
@cindex Gauss-Manin connection
@cindex Brieskorn lattice
@cindex mixed Hodge structure
@cindex V-filtration
@cindex spectrum
@end table
@strong{Example:}
@smallexample
@c computed example vfilt d2t_singular/gaussman_lib.doc:455
LIB "gaussman.lib";
ring R=0,(x,y),ds;
poly t=x5+x2y2+y5;
vfilt(t);
@expansion{} [1]:
@expansion{}    _[1]=-1/2
@expansion{}    _[2]=-3/10
@expansion{}    _[3]=-1/10
@expansion{}    _[4]=0
@expansion{}    _[5]=1/10
@expansion{}    _[6]=3/10
@expansion{}    _[7]=1/2
@expansion{} [2]:
@expansion{}    1,2,2,1,2,2,1
@expansion{} [3]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(11)
@expansion{}    [2]:
@expansion{}       _[1]=gen(10)
@expansion{}       _[2]=gen(6)
@expansion{}    [3]:
@expansion{}       _[1]=gen(9)
@expansion{}       _[2]=gen(4)
@expansion{}    [4]:
@expansion{}       _[1]=gen(5)
@expansion{}    [5]:
@expansion{}       _[1]=gen(3)
@expansion{}       _[2]=gen(8)
@expansion{}    [6]:
@expansion{}       _[1]=gen(2)
@expansion{}       _[2]=gen(7)
@expansion{}    [7]:
@expansion{}       _[1]=gen(1)
@expansion{} [4]:
@expansion{}    _[1]=y5
@expansion{}    _[2]=y4
@expansion{}    _[3]=y3
@expansion{}    _[4]=y2
@expansion{}    _[5]=xy
@expansion{}    _[6]=y
@expansion{}    _[7]=x4
@expansion{}    _[8]=x3
@expansion{}    _[9]=x2
@expansion{}    _[10]=x
@expansion{}    _[11]=1
@expansion{} [5]:
@expansion{}    _[1]=2x2y+5y4
@expansion{}    _[2]=2xy2+5x4
@expansion{}    _[3]=5x5-5y5
@expansion{}    _[4]=10y6+25x3y4
@c end example vfilt d2t_singular/gaussman_lib.doc:455
@end smallexample
@c inserted refs from d2t_singular/gaussman_lib.doc:462
@ifinfo
@menu
See also:
* spectrum_lib::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{spectrum_lib}.
@end iftex
@c end inserted refs from d2t_singular/gaussman_lib.doc:462

@c ---end content vfilt---

@c ------------------- vwfilt -------------
@node vwfilt, tmatrix, vfilt, gaussman_lib
@subsubsection vwfilt
@cindex vwfilt
@c ---content vwfilt---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
vwfilt(t); poly t

@item @strong{Assume:}
characteristic 0; local degree ordering;
@*isolated critical point 0 of t

@item @strong{Return:}
@format
list vw;  weighted V-filtration on H''/s*H''
  ideal vw[1];
    number vw[1][i];  V-filtration index of i-th spectral pair
  intvec vw[2];
    int vw[2][i];  weight filtration index of i-th spectral pair
  intvec vw[3];
    int vw[3][i];  multiplicity of i-th spectral pair
  list vw[4];
    module vw[4][i];  vector space of i-th graded part in terms of vw[5]
  ideal vw[5];  monomial vector space basis of H''/s*H''
  ideal vw[6];  standard basis of Jacobian ideal
@end format

@cindex singularities
@cindex Gauss-Manin connection
@cindex Brieskorn lattice
@cindex mixed Hodge structure
@cindex V-filtration
@cindex weight filtration
@cindex spectrum
@cindex spectral pairs
@end table
@strong{Example:}
@smallexample
@c computed example vwfilt d2t_singular/gaussman_lib.doc:509
LIB "gaussman.lib";
ring R=0,(x,y),ds;
poly t=x5+x2y2+y5;
vwfilt(t);
@expansion{} [1]:
@expansion{}    _[1]=-1/2
@expansion{}    _[2]=-3/10
@expansion{}    _[3]=-1/10
@expansion{}    _[4]=0
@expansion{}    _[5]=1/10
@expansion{}    _[6]=3/10
@expansion{}    _[7]=1/2
@expansion{} [2]:
@expansion{}    2,1,1,1,1,1,0
@expansion{} [3]:
@expansion{}    1,2,2,1,2,2,1
@expansion{} [4]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(11)
@expansion{}    [2]:
@expansion{}       _[1]=gen(10)
@expansion{}       _[2]=gen(6)
@expansion{}    [3]:
@expansion{}       _[1]=gen(9)
@expansion{}       _[2]=gen(4)
@expansion{}    [4]:
@expansion{}       _[1]=gen(5)
@expansion{}    [5]:
@expansion{}       _[1]=gen(3)
@expansion{}       _[2]=gen(8)
@expansion{}    [6]:
@expansion{}       _[1]=gen(2)
@expansion{}       _[2]=gen(7)
@expansion{}    [7]:
@expansion{}       _[1]=gen(1)
@expansion{} [5]:
@expansion{}    _[1]=y5
@expansion{}    _[2]=y4
@expansion{}    _[3]=y3
@expansion{}    _[4]=y2
@expansion{}    _[5]=xy
@expansion{}    _[6]=y
@expansion{}    _[7]=x4
@expansion{}    _[8]=x3
@expansion{}    _[9]=x2
@expansion{}    _[10]=x
@expansion{}    _[11]=1
@expansion{} [6]:
@expansion{}    _[1]=2x2y+5y4
@expansion{}    _[2]=2xy2+5x4
@expansion{}    _[3]=5x5-5y5
@expansion{}    _[4]=10y6+25x3y4
@c end example vwfilt d2t_singular/gaussman_lib.doc:509
@end smallexample
@c inserted refs from d2t_singular/gaussman_lib.doc:516
@ifinfo
@menu
See also:
* spectrum_lib::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{spectrum_lib}.
@end iftex
@c end inserted refs from d2t_singular/gaussman_lib.doc:516

@c ---end content vwfilt---

@c ------------------- tmatrix -------------
@node tmatrix, endvfilt, vwfilt, gaussman_lib
@subsubsection tmatrix
@cindex tmatrix
@c ---content tmatrix---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
tmatrix(t); poly t

@item @strong{Assume:}
characteristic 0; local degree ordering;
@*isolated critical point 0 of t

@item @strong{Return:}
@format
list l=A0,A1,T,M;
  matrix A0,A1;  t=A0+s*A1+s^2*(d/ds) on H'' w.r.t. C[[s]]-basis M*T
  module T;  C-basis of C^mu
  ideal M;  monomial C-basis of H''/sH''
@end format

@cindex singularities
@cindex Gauss-Manin connection
@cindex Brieskorn lattice
@cindex mixed Hodge structure
@cindex opposite Hodge filtration
@cindex V-filtration
@end table
@strong{Example:}
@smallexample
@c computed example tmatrix d2t_singular/gaussman_lib.doc:554
LIB "gaussman.lib";
ring R=0,(x,y),ds;
poly t=x5+x2y2+y5;
list A=tmatrix(t);
print(A[1]);
@expansion{} 0,0,0,0,0,0,0,0,0,0,0,
@expansion{} 0,0,0,0,0,0,0,0,0,0,0,
@expansion{} 0,0,0,0,0,0,0,0,0,0,0,
@expansion{} 0,0,0,0,0,0,0,0,0,0,0,
@expansion{} 0,0,0,0,0,0,0,0,0,0,0,
@expansion{} 0,0,0,0,0,0,0,0,0,0,0,
@expansion{} 0,0,0,0,0,0,0,0,0,0,0,
@expansion{} 0,0,0,0,0,0,0,0,0,0,0,
@expansion{} 0,0,0,0,0,0,0,0,0,0,0,
@expansion{} 0,0,0,0,0,0,0,0,0,0,0,
@expansion{} 1,0,0,0,0,0,0,0,0,0,0
print(A[2]);
@expansion{} 1/2,0,   0,   0,   0,   0,0,    0,    0,    0,    0,
@expansion{} 0,  7/10,0,   0,   0,   0,0,    0,    0,    0,    0,
@expansion{} 0,  0,   7/10,0,   0,   0,0,    0,    0,    0,    0,
@expansion{} 0,  0,   0,   9/10,0,   0,0,    0,    0,    0,    0,
@expansion{} 0,  0,   0,   0,   9/10,0,0,    0,    0,    0,    0,
@expansion{} 0,  0,   0,   0,   0,   1,0,    0,    0,    0,    0,
@expansion{} 0,  0,   0,   0,   0,   0,11/10,0,    0,    0,    0,
@expansion{} 0,  0,   0,   0,   0,   0,0,    11/10,0,    0,    0,
@expansion{} 0,  0,   0,   0,   0,   0,0,    0,    13/10,0,    0,
@expansion{} 0,  0,   0,   0,   0,   0,0,    0,    0,    13/10,0,
@expansion{} 0,  0,   0,   0,   0,   0,0,    0,    0,    0,    3/2
print(A[3]);
@expansion{} -1445/64,0,  0,  0,0,85/8,0,0,0,0,1/2,
@expansion{} 0,       125,0,  0,0,0,   0,0,1,0,0,
@expansion{} 0,       0,  0,  5,0,0,   1,0,0,0,0,
@expansion{} 0,       0,  0,  0,4,0,   0,0,0,0,0,
@expansion{} 2,       0,  0,  0,0,1,   0,0,0,0,0,
@expansion{} 0,       0,  16, 0,0,0,   0,0,0,0,0,
@expansion{} 0,       0,  125,0,0,0,   0,0,0,1,0,
@expansion{} 0,       0,  0,  0,5,0,   0,1,0,0,0,
@expansion{} 0,       0,  0,  4,0,0,   0,0,0,0,0,
@expansion{} 0,       16, 0,  0,0,0,   0,0,0,0,0,
@expansion{} -1,      0,  0,  0,0,0,   0,0,0,0,0
print(A[4]);
@expansion{} y5,
@expansion{} y4,
@expansion{} y3,
@expansion{} y2,
@expansion{} xy,
@expansion{} y,
@expansion{} x4,
@expansion{} x3,
@expansion{} x2,
@expansion{} x,
@expansion{} 1
@c end example tmatrix d2t_singular/gaussman_lib.doc:554
@end smallexample
@c ---end content tmatrix---

@c ------------------- endvfilt -------------
@node endvfilt, spprint, tmatrix, gaussman_lib
@subsubsection endvfilt
@cindex endvfilt
@c ---content endvfilt---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
endvfilt(v); list v

@item @strong{Assume:}
v returned by vfilt

@item @strong{Return:}
@format
list ev;  V-filtration on Jacobian algebra
  ideal ev[1];
    number ev[1][i];  i-th V-filtration index
  intvec ev[2];
    int ev[2][i];  i-th multiplicity
  list ev[3];
    module ev[3][i];  vector space of i-th graded part in terms of ev[4]
  ideal ev[4];  monomial vector space basis of Jacobian algebra
  ideal ev[5];  standard basis of Jacobian ideal
@end format

@cindex singularities
@cindex Gauss-Manin connection
@cindex Brieskorn lattice
@cindex mixed Hodge structure
@cindex V-filtration
@cindex endomorphism filtration
@end table
@strong{Example:}
@smallexample
@c computed example endvfilt d2t_singular/gaussman_lib.doc:603
LIB "gaussman.lib";
ring R=0,(x,y),ds;
poly t=x5+x2y2+y5;
endvfilt(vfilt(t));
@expansion{} [1]:
@expansion{}    _[1]=0
@expansion{}    _[2]=1/5
@expansion{}    _[3]=2/5
@expansion{}    _[4]=1/2
@expansion{}    _[5]=3/5
@expansion{}    _[6]=4/5
@expansion{}    _[7]=1
@expansion{} [2]:
@expansion{}    1,2,2,1,2,2,1
@expansion{} [3]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(11)
@expansion{}    [2]:
@expansion{}       _[1]=gen(10)
@expansion{}       _[2]=gen(6)
@expansion{}    [3]:
@expansion{}       _[1]=gen(9)
@expansion{}       _[2]=gen(4)
@expansion{}    [4]:
@expansion{}       _[1]=gen(5)
@expansion{}    [5]:
@expansion{}       _[1]=gen(8)
@expansion{}       _[2]=gen(3)
@expansion{}    [6]:
@expansion{}       _[1]=gen(7)
@expansion{}       _[2]=gen(2)
@expansion{}    [7]:
@expansion{}       _[1]=gen(1)
@expansion{} [4]:
@expansion{}    _[1]=y5
@expansion{}    _[2]=y4
@expansion{}    _[3]=y3
@expansion{}    _[4]=y2
@expansion{}    _[5]=xy
@expansion{}    _[6]=y
@expansion{}    _[7]=x4
@expansion{}    _[8]=x3
@expansion{}    _[9]=x2
@expansion{}    _[10]=x
@expansion{}    _[11]=1
@expansion{} [5]:
@expansion{}    _[1]=2x2y+5y4
@expansion{}    _[2]=2xy2+5x4
@expansion{}    _[3]=5x5-5y5
@expansion{}    _[4]=10y6+25x3y4
@c end example endvfilt d2t_singular/gaussman_lib.doc:603
@end smallexample
@c ---end content endvfilt---

@c ------------------- spprint -------------
@node spprint, sppprint, endvfilt, gaussman_lib
@subsubsection spprint
@cindex spprint
@c ---content spprint---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
spprint(sp); list sp

@item @strong{Return:}
string s; spectrum sp

@end table
@strong{Example:}
@smallexample
@c computed example spprint d2t_singular/gaussman_lib.doc:629
LIB "gaussman.lib";
ring R=0,(x,y),ds;
list sp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));
spprint(sp);
@expansion{} (-1/2,1),(-3/10,2),(-1/10,2),(0,1),(1/10,2),(3/10,2),(1/2,1)
@c end example spprint d2t_singular/gaussman_lib.doc:629
@end smallexample
@c ---end content spprint---

@c ------------------- sppprint -------------
@node sppprint, spadd, spprint, gaussman_lib
@subsubsection sppprint
@cindex sppprint
@c ---content sppprint---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
sppprint(spp); list spp

@item @strong{Return:}
string s; spectral pairs spp

@end table
@strong{Example:}
@smallexample
@c computed example sppprint d2t_singular/gaussman_lib.doc:655
LIB "gaussman.lib";
ring R=0,(x,y),ds;
list spp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(2,1,1,1,1,1,0),intvec(1,2,2,1,2,2,1));
sppprint(spp);
@expansion{} ((-1/2,2),1),((-3/10,1),2),((-1/10,1),2),((0,1),1),((1/10,1),2),((3/10,1)\
   ,2),((1/2,0),1)
@c end example sppprint d2t_singular/gaussman_lib.doc:655
@end smallexample
@c ---end content sppprint---

@c ------------------- spadd -------------
@node spadd, spsub, sppprint, gaussman_lib
@subsubsection spadd
@cindex spadd
@c ---content spadd---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
spadd(sp1,sp2); list sp1, list sp2

@item @strong{Return:}
list sp; sum of spectra sp1 and sp2

@end table
@strong{Example:}
@smallexample
@c computed example spadd d2t_singular/gaussman_lib.doc:681
LIB "gaussman.lib";
ring R=0,(x,y),ds;
list sp1=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));
spprint(sp1);
@expansion{} (-1/2,1),(-3/10,2),(-1/10,2),(0,1),(1/10,2),(3/10,2),(1/2,1)
list sp2=list(ideal(-1/6,1/6),intvec(1,1));
spprint(sp2);
@expansion{} (-1/6,1),(1/6,1)
spprint(spadd(sp1,sp2));
@expansion{} (-1/2,1),(-3/10,2),(-1/6,1),(-1/10,2),(0,1),(1/10,2),(1/6,1),(3/10,2),(1/\
   2,1)
@c end example spadd d2t_singular/gaussman_lib.doc:681
@end smallexample
@c ---end content spadd---

@c ------------------- spsub -------------
@node spsub, spmul, spadd, gaussman_lib
@subsubsection spsub
@cindex spsub
@c ---content spsub---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
spsub(sp1,sp2); list sp1, list sp2

@item @strong{Return:}
list sp; difference of spectra sp1 and sp2

@end table
@strong{Example:}
@smallexample
@c computed example spsub d2t_singular/gaussman_lib.doc:710
LIB "gaussman.lib";
ring R=0,(x,y),ds;
list sp1=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));
spprint(sp1);
@expansion{} (-1/2,1),(-3/10,2),(-1/10,2),(0,1),(1/10,2),(3/10,2),(1/2,1)
list sp2=list(ideal(-1/6,1/6),intvec(1,1));
spprint(sp2);
@expansion{} (-1/6,1),(1/6,1)
spprint(spsub(sp1,sp2));
@expansion{} (-1/2,1),(-3/10,2),(-1/6,-1),(-1/10,2),(0,1),(1/10,2),(1/6,-1),(3/10,2),(\
   1/2,1)
@c end example spsub d2t_singular/gaussman_lib.doc:710
@end smallexample
@c ---end content spsub---

@c ------------------- spmul -------------
@node spmul, spissemicont, spsub, gaussman_lib
@subsubsection spmul
@cindex spmul
@c ---content spmul---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
spmul(sp0,k); list sp0, int[vec] k

@item @strong{Return:}
list sp; linear combination of spectra sp0 with coefficients k

@end table
@strong{Example:}
@smallexample
@c computed example spmul d2t_singular/gaussman_lib.doc:739
LIB "gaussman.lib";
ring R=0,(x,y),ds;
list sp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));
spprint(sp);
@expansion{} (-1/2,1),(-3/10,2),(-1/10,2),(0,1),(1/10,2),(3/10,2),(1/2,1)
spprint(spmul(sp,2));
@expansion{} (-1/2,2),(-3/10,4),(-1/10,4),(0,2),(1/10,4),(3/10,4),(1/2,2)
list sp1=list(ideal(-1/6,1/6),intvec(1,1));
spprint(sp1);
@expansion{} (-1/6,1),(1/6,1)
list sp2=list(ideal(-1/3,0,1/3),intvec(1,2,1));
spprint(sp2);
@expansion{} (-1/3,1),(0,2),(1/3,1)
spprint(spmul(list(sp1,sp2),intvec(1,2)));
@expansion{} (-1/3,2),(-1/6,1),(0,4),(1/6,1),(1/3,2)
@c end example spmul d2t_singular/gaussman_lib.doc:739
@end smallexample
@c ---end content spmul---

@c ------------------- spissemicont -------------
@node spissemicont, spsemicont, spmul, gaussman_lib
@subsubsection spissemicont
@cindex spissemicont
@c ---content spissemicont---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
spissemicont(sp[,1]); list sp, int opt

@item @strong{Return:}
@format
int k=
  1;  if sum of sp is positive on all intervals [a,a+1) [and (a,a+1)]
  0;  if sum of sp is negative on some interval [a,a+1) [or (a,a+1)]
@end format

@end table
@strong{Example:}
@smallexample
@c computed example spissemicont d2t_singular/gaussman_lib.doc:775
LIB "gaussman.lib";
ring R=0,(x,y),ds;
list sp1=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));
spprint(sp1);
@expansion{} (-1/2,1),(-3/10,2),(-1/10,2),(0,1),(1/10,2),(3/10,2),(1/2,1)
list sp2=list(ideal(-1/6,1/6),intvec(1,1));
spprint(sp2);
@expansion{} (-1/6,1),(1/6,1)
spissemicont(spsub(sp1,spmul(sp2,3)));
@expansion{} 1
spissemicont(spsub(sp1,spmul(sp2,4)));
@expansion{} 0
@c end example spissemicont d2t_singular/gaussman_lib.doc:775
@end smallexample
@c ---end content spissemicont---

@c ------------------- spsemicont -------------
@node spsemicont, spmilnor, spissemicont, gaussman_lib
@subsubsection spsemicont
@cindex spsemicont
@c ---content spsemicont---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
spsemicont(sp0,sp,k[,1]); list sp0, list sp

@item @strong{Return:}
@format
list l;
  intvec l[i];  if the spectra sp0 occur with multiplicities k
                in a deformation of a [quasihomogeneous] singularity
                with spectrum sp then k<=l[i]
@end format

@end table
@strong{Example:}
@smallexample
@c computed example spsemicont d2t_singular/gaussman_lib.doc:810
LIB "gaussman.lib";
ring R=0,(x,y),ds;
list sp0=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));
spprint(sp0);
@expansion{} (-1/2,1),(-3/10,2),(-1/10,2),(0,1),(1/10,2),(3/10,2),(1/2,1)
list sp1=list(ideal(-1/6,1/6),intvec(1,1));
spprint(sp1);
@expansion{} (-1/6,1),(1/6,1)
list sp2=list(ideal(-1/3,0,1/3),intvec(1,2,1));
spprint(sp2);
@expansion{} (-1/3,1),(0,2),(1/3,1)
list sp=sp1,sp2;
list l=spsemicont(sp0,sp);
l;
@expansion{} [1]:
@expansion{}    3
@expansion{} [2]:
@expansion{}    2,1
spissemicont(spsub(sp0,spmul(sp,l[1])));
@expansion{} 1
spissemicont(spsub(sp0,spmul(sp,l[1]-1)));
@expansion{} 1
spissemicont(spsub(sp0,spmul(sp,l[1]+1)));
@expansion{} 0
@c end example spsemicont d2t_singular/gaussman_lib.doc:810
@end smallexample
@c ---end content spsemicont---

@c ------------------- spmilnor -------------
@node spmilnor, spgeomgenus, spsemicont, gaussman_lib
@subsubsection spmilnor
@cindex spmilnor
@c ---content spmilnor---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
spmilnor(sp); list sp

@item @strong{Return:}
int mu; Milnor number of spectrum sp

@end table
@strong{Example:}
@smallexample
@c computed example spmilnor d2t_singular/gaussman_lib.doc:846
LIB "gaussman.lib";
ring R=0,(x,y),ds;
list sp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));
spprint(sp);
@expansion{} (-1/2,1),(-3/10,2),(-1/10,2),(0,1),(1/10,2),(3/10,2),(1/2,1)
spmilnor(sp);
@expansion{} 11
@c end example spmilnor d2t_singular/gaussman_lib.doc:846
@end smallexample
@c ---end content spmilnor---

@c ------------------- spgeomgenus -------------
@node spgeomgenus, spgamma, spmilnor, gaussman_lib
@subsubsection spgeomgenus
@cindex spgeomgenus
@c ---content spgeomgenus---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
spgeomgenus(sp); list sp

@item @strong{Return:}
int g; geometrical genus of spectrum sp

@end table
@strong{Example:}
@smallexample
@c computed example spgeomgenus d2t_singular/gaussman_lib.doc:873
LIB "gaussman.lib";
ring R=0,(x,y),ds;
list sp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));
spprint(sp);
@expansion{} (-1/2,1),(-3/10,2),(-1/10,2),(0,1),(1/10,2),(3/10,2),(1/2,1)
spgeomgenus(sp);
@expansion{} 6
@c end example spgeomgenus d2t_singular/gaussman_lib.doc:873
@end smallexample
@c ---end content spgeomgenus---

@c ------------------- spgamma -------------
@node spgamma,, spgeomgenus, gaussman_lib
@subsubsection spgamma
@cindex spgamma
@c ---content spgamma---
Procedure from library @code{gaussman.lib} (@pxref{gaussman_lib}).

@table @asis
@item @strong{Usage:}
spgamma(sp); list sp

@item @strong{Return:}
number gamma; gamma invariant of spectrum sp

@end table
@strong{Example:}
@smallexample
@c computed example spgamma d2t_singular/gaussman_lib.doc:900
LIB "gaussman.lib";
ring R=0,(x,y),ds;
list sp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));
spprint(sp);
@expansion{} (-1/2,1),(-3/10,2),(-1/10,2),(0,1),(1/10,2),(3/10,2),(1/2,1)
spgamma(sp);
@expansion{} 1/240
@c end example spgamma d2t_singular/gaussman_lib.doc:900
@end smallexample
@c ---end content spgamma---


code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/general_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/general_lib.doc INSTEAD
@c library version: (1.38.2.9,2003/04/04)
@c library file: ../Singular/LIB/general.lib
@cindex general.lib
@cindex general_lib
@table @asis
@item @strong{Library:}
general.lib
@item @strong{Purpose:}
   Elementary Computations of General Type

@end table

@strong{Procedures:}
@menu
* A_Z:: string a,b,... of n comma separated letters
* ASCII:: string of printable ASCII characters (number n to m)
* absValue:: absolute value of c
* binomial:: n choose m (type int), [type string/type number]
* deleteSublist:: delete entries given by iv from list l
* factorial:: n factorial (=n!) (type int), [type string/number]
* fibonacci:: nth Fibonacci number [char p]
* kmemory:: active [allocated] memory in kilobyte
* killall:: kill all user-defined variables
* number_e:: compute exp(1) up to n decimal digits
* number_pi:: compute pi (area of unit circle) up to n digits
* primes:: intvec of primes p, n<=p<=m
* product:: multiply components of vector/ideal/...[indices v]
* sort:: sort generators according to monomial ordering
* sum:: add components of vector/ideal/...[with indices v]
* watchdog:: only wait for result of command cmd for i seconds
* which:: search for command and return absolute path, if found
* primecoeffs:: primefactors <= min(p,32003) of coeffs of J
* primefactors:: primefactors <= min(p,32003) of n
* timeStd:: std(i) if computation finished after d seconds else i
* timeFactorize:: works as timeStd with factorization
* factorH:: factorizes with good choice of principal variable
@end menu
@c ---end content LibInfo---

@c ------------------- A_Z -------------
@node A_Z, ASCII,, general_lib
@subsubsection A_Z
@cindex A_Z
@c ---content A_Z---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
A_Z("a",n); a any letter, n integer (-26<= n <=26, !=0)

@item @strong{Return:}
string of n small (if a is small) or capital (if a is capital)
letters, comma separated, beginning with a, in alphabetical
order (or revers alphabetical order if n<0)

@end table
@strong{Example:}
@smallexample
@c computed example A_Z d2t_singular/general_lib.doc:60
LIB "general.lib";
A_Z("c",5);
@expansion{} c,d,e,f,g
A_Z("Z",-5);
@expansion{} Z,Y,X,W,V
string sR = "ring R = (0,"+A_Z("A",6)+"),("+A_Z("a",10)+"),dp;";
sR;
@expansion{} ring R = (0,A,B,C,D,E,F),(a,b,c,d,e,f,g,h,i,j),dp;
execute(sR);
R;
@expansion{} //   characteristic : 0
@expansion{} //   6 parameter    : A B C D E F
@expansion{} //   minpoly        : 0
@expansion{} //   number of vars : 10
@expansion{} //        block   1 : ordering dp
@expansion{} //                  : names    a b c d e f g h i j
@expansion{} //        block   2 : ordering C
@c end example A_Z d2t_singular/general_lib.doc:60
@end smallexample
@c ---end content A_Z---

@c ------------------- ASCII -------------
@node ASCII, absValue, A_Z, general_lib
@subsubsection ASCII
@cindex ASCII
@c ---content ASCII---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
ASCII([n,m]); n,m= integers (32 <= n <= m <= 126)

@item @strong{Return:}
string of printable ASCII characters (no native language support)
ASCII(): string of all ASCII characters with its numbers,
ASCII(n): n-th ASCII character
@*ASCII(n,m): n-th up to m-th ASCII character (inclusive)

@end table
@strong{Example:}
@smallexample
@c computed example ASCII d2t_singular/general_lib.doc:92
LIB "general.lib";
ASCII();"";
@expansion{}      !    "    #    $    %    &    '    (    )    *    +    ,    -    .
@expansion{} 32   33   34   35   36   37   38   39   40   41   42   43   44   45   46
@expansion{} /    0    1    2    3    4    5    6    7    8    9    :    ;    <    =
@expansion{} 47   48   49   50   51   52   53   54   55   56   57   58   59   60   61
@expansion{} >    ?    @@    A    B    C    D    E    F    G    H    I    J    K    L
@expansion{} 62   63   64   65   66   67   68   69   70   71   72   73   74   75   76
@expansion{} M    N    O    P    Q    R    S    T    U    V    W    X    Y    Z    [
@expansion{} 77   78   79   80   81   82   83   84   85   86   87   88   89   90   91
@expansion{} \    ]    ^    _    `    a    b    c    d    e    f    g    h    i    j
@expansion{} 92   93   94   95   96   97   98   99  100  101  102  103  104  105  10
@expansion{} k    l    m    n    o    p    q    r    s    t    u    v    w    x    y
@expansion{} 107  108  109  110  111  112  113  114  115  116  117  118  119  120  121
@expansion{} z    @{    |    @}    ~
@expansion{} 122  123  124  125  126
@expansion{}
ASCII(42);
@expansion{} *
ASCII(32,126);
@expansion{}  !"#$%&'()*+,-./0123456789:;<=>?@@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh\
   ijklmnopqrstuvwxyz@{|@}~
@c end example ASCII d2t_singular/general_lib.doc:92
@end smallexample
@c ---end content ASCII---

@c ------------------- absValue -------------
@node absValue, binomial, ASCII, general_lib
@subsubsection absValue
@cindex absValue
@c ---content absValue---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
absValue(c); c int, number or poly

@item @strong{Return:}
absValue(c); the absolute value of c

@item @strong{Note:}
absValue(c)=c if c>=0; absValue=-c if c<=0.
@* So the function can be applied to any type, for which comparison
@* operators are defined.

@end table
@strong{Example:}
@smallexample
@c computed example absValue d2t_singular/general_lib.doc:123
LIB "general.lib";
ring r1 = 0,x,dp;
absValue(-2002);
@expansion{} 2002
poly f=-4;
absValue(f);
@expansion{} 4
@c end example absValue d2t_singular/general_lib.doc:123
@end smallexample
@c inserted refs from d2t_singular/general_lib.doc:131
@ifinfo
@menu
See also:
* boolean expressions::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{boolean expressions}.
@end iftex
@c end inserted refs from d2t_singular/general_lib.doc:131

@c ---end content absValue---

@c ------------------- binomial -------------
@node binomial, deleteSublist, absValue, general_lib
@subsubsection binomial
@cindex binomial
@c ---content binomial---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
binomial(n,k[,p]); n,k,p integers

@item @strong{Return:}
binomial(n,k); binomial coefficient n choose k
@* - of type string (computed in characteristic 0)
@* binomial(n,k,p); n choose k, computed in characteristic 0 or prime(p)
@* - of type number if a basering, say R, is present and p=0=char(R)
or if prime(p)=char(R)
@* - of type string else

@item @strong{Note:}
In any characteristic, binomial(n,k) = coefficient of x^k in (1+x)^n

@end table
@strong{Example:}
@smallexample
@c computed example binomial d2t_singular/general_lib.doc:162
LIB "general.lib";
binomial(200,100);"";                   //type string, computed in char 0
@expansion{} 90548514656103281165404177077484163874504589675413336841320
@expansion{}
binomial(200,100,3);"";                 //type string, computed in char 3
@expansion{} 0
@expansion{}
int n,k = 200,100;
ring r = 0,x,dp;
number b1 = binomial(n,k,0);            //type number, computed in ring r
poly b2 = coeffs((x+1)^n,x)[k+1,1];     //coefficient of x^k in (x+1)^n
b1-b2;                                  //b1 and b2 should coincide
@expansion{} 0
@c end example binomial d2t_singular/general_lib.doc:162
@end smallexample
@c inserted refs from d2t_singular/general_lib.doc:173
@ifinfo
@menu
See also:
* prime::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{prime}.
@end iftex
@c end inserted refs from d2t_singular/general_lib.doc:173

@c ---end content binomial---

@c ------------------- deleteSublist -------------
@node deleteSublist, factorial, binomial, general_lib
@subsubsection deleteSublist
@cindex deleteSublist
@c ---content deleteSublist---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
deleteSublist(v,l); intvec v; list l
@*where the entries of the integer vector v correspond to the
positions of the elements to be deleted

@item @strong{Return:}
list without the deleted elements

@end table
@strong{Example:}
@smallexample
@c computed example deleteSublist d2t_singular/general_lib.doc:198
LIB "general.lib";
list l=1,2,3,4,5;
intvec v=1,3,4;
l=deleteSublist(v,l);
l;
@expansion{} [1]:
@expansion{}    2
@expansion{} [2]:
@expansion{}    5
@c end example deleteSublist d2t_singular/general_lib.doc:198
@end smallexample
@c ---end content deleteSublist---

@c ------------------- factorial -------------
@node factorial, fibonacci, deleteSublist, general_lib
@subsubsection factorial
@cindex factorial
@c ---content factorial---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
factorial(n[,p]); n,p integers

@item @strong{Return:}
factorial(n): n! (computed in characteristic 0), of type string.
@* factorial(n,p): n! computed in characteristic 0 or prime(p)
@* - of type number if a basering is present and 0=p=char(basering)
or if prime(p)=char(basering)
@* - of type string else

@end table
@strong{Example:}
@smallexample
@c computed example factorial d2t_singular/general_lib.doc:229
LIB "general.lib";
factorial(37);"";                 //37! of type string (as long integer)
@expansion{} 13763753091226345046315979581580902400000000
@expansion{}
ring r1 = 0,x,dp;
number p = factorial(37,0);       //37! of type number, computed in r
p;
@expansion{} 13763753091226345046315979581580902400000000
@c end example factorial d2t_singular/general_lib.doc:229
@end smallexample
@c inserted refs from d2t_singular/general_lib.doc:237
@ifinfo
@menu
See also:
* prime::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{prime}.
@end iftex
@c end inserted refs from d2t_singular/general_lib.doc:237

@c ---end content factorial---

@c ------------------- fibonacci -------------
@node fibonacci, kmemory, factorial, general_lib
@subsubsection fibonacci
@cindex fibonacci
@c ---content fibonacci---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
fibonacci(n); n,p integers

@item @strong{Return:}
fibonacci(n): nth Fibonacci number, f(0)=f(1)=1, f(i+1)=f(i-1)+f(i)
@* - computed in characteristic 0, of type string
@* fibonacci(n,p): f(n) computed in characteristic 0 or prime(p)
@* - of type number if a basering is present and p=0=char(basering)
or if prime(p)=char(basering)
@* - of type string else

@end table
@strong{Example:}
@smallexample
@c computed example fibonacci d2t_singular/general_lib.doc:265
LIB "general.lib";
fibonacci(42); "";             //f(42) of type string (as long integer)
@expansion{} 267914296
@expansion{}
ring r = 2,x,dp;
number b = fibonacci(42,2);    //f(42) of type number, computed in r
b;
@expansion{} 0
@c end example fibonacci d2t_singular/general_lib.doc:265
@end smallexample
@c inserted refs from d2t_singular/general_lib.doc:273
@ifinfo
@menu
See also:
* prime::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{prime}.
@end iftex
@c end inserted refs from d2t_singular/general_lib.doc:273

@c ---end content fibonacci---

@c ------------------- kmemory -------------
@node kmemory, killall, fibonacci, general_lib
@subsubsection kmemory
@cindex kmemory
@c ---content kmemory---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
kmemory([n,[v]]); n,v integers

@item @strong{Return:}
memory in kilobyte of type int
@* n=0: memory used by active variables (same as no parameters)
@* n=1: total memory allocated by Singular
@* n=2: difference between top and init memory address (sbrk memory)
@* n!=0,1,2: 0

@item @strong{Display:}
detailed information about allocated and used memory if v!=0

@item @strong{Note:}
kmemory uses internal function 'memory' to compute kilobyte, and
is the same as 'memory' for n!=0,1,2

@end table
@strong{Example:}
@smallexample
@c computed example kmemory d2t_singular/general_lib.doc:307
LIB "general.lib";
kmemory();
@expansion{} 152
kmemory(1,1);
@expansion{} // total memory allocated, at the moment, by SINGULAR (kilobyte):
@expansion{} 650
@c end example kmemory d2t_singular/general_lib.doc:307
@end smallexample
@c ---end content kmemory---

@c ------------------- killall -------------
@node killall, number_e, kmemory, general_lib
@subsubsection killall
@cindex killall
@c ---content killall---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
killall(); (no parameter)
@*killall("type_name");
@*killall("not", "type_name");

@item @strong{Return:}
killall(); kills all user-defined variables except loaded procedures,
no return value.
@* - killall("type_name"); kills all user-defined variables,
of type "type_name"
@* - killall("not", "type_name"); kills all user-defined variables,
except those of type "type_name" and except loaded procedures
@* - killall("not", "name_1", "name_2", ...);
kills all user-defined variables, except those of name "name_i"
and except loaded procedures

@item @strong{Note:}
killall should never be used inside a procedure

@end table
@strong{Example:}
@smallexample
@c computed example killall d2t_singular/general_lib.doc:345
LIB "general.lib";
ring rtest; ideal i=x,y,z; string str="hi"; int j = 3;
export rtest,i,str,j;       //this makes the local variables global
@expansion{} // ** `rtest` is already global
@expansion{} // ** `i` is already global
@expansion{} // ** `str` is already global
@expansion{} // ** `j` is already global
listvar();
@expansion{} // j                    [0]  int 3
@expansion{} // str                  [0]  string hi
@expansion{} // rtest                [0]  *ring
@expansion{} //      i                    [0]  ideal, 3 generator(s)
@expansion{} // LIB                  [0]  string standard.lib,general..., 74 char(s)
killall("ring");            // kills all rings
@expansion{} // ** killing the basering for level 0
listvar();
@expansion{} // j                    [0]  int 3
@expansion{} // str                  [0]  string hi
@expansion{} // LIB                  [0]  string standard.lib,general..., 74 char(s)
killall("not", "int");      // kills all variables except int's (and procs)
listvar();
@expansion{} // j                    [0]  int 3
@expansion{} // LIB                  [0]  string standard.lib,general..., 74 char(s)
killall();                  // kills all vars except loaded procs
listvar();
@expansion{} // j                    [0]  int 3
@expansion{} // LIB                  [0]  string standard.lib,general..., 74 char(s)
@c end example killall d2t_singular/general_lib.doc:345
@end smallexample
@c ---end content killall---

@c ------------------- number_e -------------
@node number_e, number_pi, killall, general_lib
@subsubsection number_e
@cindex number_e
@c ---content number_e---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
number_e(n); n integer

@item @strong{Return:}
Euler number e=exp(1) up to n decimal digits (no rounding)
@* - of type string if no basering of char 0 is defined
@* - of type number if a basering of char 0 is defined

@item @strong{Display:}
decimal format of e if printlevel > 0 (default:printlevel=0 )

@item @strong{Note:}
procedure uses algorithm of A.H.J. Sale

@end table
@strong{Example:}
@smallexample
@c computed example number_e d2t_singular/general_lib.doc:385
LIB "general.lib";
number_e(30);"";
@expansion{} 2.71828182845904523536028747135
@expansion{}
ring R = 0,t,lp;
number e = number_e(30);
e;
@expansion{} 13591409142295226176801437356763/5000000000000000000000000000000
@c end example number_e d2t_singular/general_lib.doc:385
@end smallexample
@c ---end content number_e---

@c ------------------- number_pi -------------
@node number_pi, primes, number_e, general_lib
@subsubsection number_pi
@cindex number_pi
@c ---content number_pi---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
number_pi(n); n positive integer

@item @strong{Return:}
pi (area of unit circle) up to n decimal digits (no rounding)
@* - of type string if no basering of char 0 is defined,
@* - of type number, if a basering of char 0 is defined

@item @strong{Display:}
decimal format of pi if printlevel > 0 (default:printlevel=0 )

@item @strong{Note:}
procedure uses algorithm of S. Rabinowitz

@end table
@strong{Example:}
@smallexample
@c computed example number_pi d2t_singular/general_lib.doc:420
LIB "general.lib";
number_pi(11);"";
@expansion{} 3.1415926535
@expansion{}
ring r = (real,10),t,dp;
number pi = number_pi(11); pi;
@expansion{} 3.1415926536
@c end example number_pi d2t_singular/general_lib.doc:420
@end smallexample
@c ---end content number_pi---

@c ------------------- primes -------------
@node primes, product, number_pi, general_lib
@subsubsection primes
@cindex primes
@c ---content primes---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
primes(n,m); n,m integers

@item @strong{Return:}
intvec, consisting of all primes p, prime(n)<=p<=m, in increasing
order if n<=m, resp. prime(m)<=p<=n, in decreasing order if m<n.

@item @strong{Note:}
prime(n); returns the biggest prime number <= min(n,32003)
if n>=2, else 2

@end table
@strong{Example:}
@smallexample
@c computed example primes d2t_singular/general_lib.doc:451
LIB "general.lib";
primes(50,100);"";
@expansion{} 47,53,59,61,67,71,73,79,83,89,97
@expansion{}
intvec v = primes(37,1); v;
@expansion{} 37,31,29,23,19,17,13,11,7,5,3,2
@c end example primes d2t_singular/general_lib.doc:451
@end smallexample
@c ---end content primes---

@c ------------------- product -------------
@node product, sort, primes, general_lib
@subsubsection product
@cindex product
@c ---content product---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
product(id[,v]); id ideal/vector/module/matrix/intvec/intmat/list,
v intvec (default: v=1..number of entries of id)

@item @strong{Assume:}
list members can be multiplied.

@item @strong{Return:}
The product of all entries of id [with index given by v] of type
depending on the entries of id.

@item @strong{Note:}
If id is not a list, id is treated as a list of polys resp. integers.
A module m is identified with the corresponding matrix M (columns
of M generate m).
@* If v is outside the range of id, we have the empty product and the
result will be 1 (of type int).

@end table
@strong{Example:}
@smallexample
@c computed example product d2t_singular/general_lib.doc:488
LIB "general.lib";
ring r= 0,(x,y,z),dp;
ideal m = maxideal(1);
product(m);
@expansion{} xyz
product(m[2..3]);
@expansion{} yz
matrix M[2][3] = 1,x,2,y,3,z;
product(M);
@expansion{} 6xyz
intvec v=2,4,6;
product(M,v);
@expansion{} xyz
intvec iv = 1,2,3,4,5,6,7,8,9;
v=1..5,7,9;
product(iv,v);
@expansion{} 7560
intmat A[2][3] = 1,1,1,2,2,2;
product(A,3..5);
@expansion{} 4
@c end example product d2t_singular/general_lib.doc:488
@end smallexample
@c ---end content product---

@c ------------------- sort -------------
@node sort, sum, product, general_lib
@subsubsection sort
@cindex sort
@c ---content sort---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
sort(id[v,o,n]); id = ideal/module/intvec/list(of intvec's or int's)
@* sort may be called with 1, 2 or 3 arguments in the following way:
@* sort(id[v,n]); v=intvec of positive integers, n=integer,
@* sort(id[o,n]); o=string (any allowed ordstr of a ring), n=integer

@item @strong{Return:}
a list l of two elements:
@format
        l[1]: object of same type as input but sorted in the following way:
           - if id=ideal/module: generators of id are sorted w.r.t. intvec v
             (id[v[1]] becomes 1-st, id[v[2]]  2-nd element, etc.). If no v is
             present, id is sorted w.r.t. ordering o (if o is given) or w.r.t.
             actual monomial ordering (if no o is given):
             NOTE: generators with SMALLER(!) leading term come FIRST
             (e.g. sort(id); sorts backwards to actual monomial ordering)
           - if id=list of intvec's or int's: consider a list element, say
             id[1]=3,2,5, as exponent vector of the monomial x^3*y^2*z^5;
             the corresponding monomials are ordered w.r.t. intvec v (s.a.).
             If no v is present, the monomials are sorted w.r.t. ordering o
             (if o is given) or w.r.t. lexicographical ordering (if no o is
             given). The corresponding ordered list of exponent vectors is
             returned.
             (e.g. sort(id); sorts lexicographically, smaller int's come first)
             WARNING: Since negative exponents create the 0 polynomial in
             Singular, id should not contain negative integers: the result
             might not be as expected
           - if id=intvec: id is treated as list of integers
           - if n!=0 the ordering is inverse, i.e. w.r.t. v(size(v)..1)
             default: n=0
         l[2]: intvec, describing the permutation of the input (hence l[2]=v
             if v is given (with positive integers))
@end format

@item @strong{Note:}
If v is given id may be any simply indexed object (e.g. any list or
string); if v[i]<0 and i<=size(id) v[i] is set internally to i;
entries of v must be pairwise distinct to get a permutation if id.
Zero generators of ideal/module are deleted

@end table
@strong{Example:}
@smallexample
@c computed example sort d2t_singular/general_lib.doc:558
LIB "general.lib";
ring r0 = 0,(x,y,z,t),lp;
ideal i = x3,z3,xyz;
sort(i);            //sorts using lex ordering, smaller polys come first
@expansion{} [1]:
@expansion{}    _[1]=z3
@expansion{}    _[2]=xyz
@expansion{}    _[3]=x3
@expansion{} [2]:
@expansion{}    2,3,1
sort(i,3..1);
@expansion{} [1]:
@expansion{}    _[1]=xyz
@expansion{}    _[2]=z3
@expansion{}    _[3]=x3
@expansion{} [2]:
@expansion{}    3,2,1
sort(i,"ls")[1];     //sort w.r.t. negative lex ordering
@expansion{} _[1]=x3
@expansion{} _[2]=xyz
@expansion{} _[3]=z3
intvec v =1,10..5,2..4;v;
@expansion{} 1,10,9,8,7,6,5,2,3,4
sort(v)[1];          // sort v lexicographically
@expansion{} 1,2,3,4,5,6,7,8,9,10
sort(v,"Dp",1)[1];   // sort v w.r.t (total sum, reverse lex)
@expansion{} 10,9,8,7,6,5,4,3,2,1
@c end example sort d2t_singular/general_lib.doc:558
@end smallexample
@c ---end content sort---

@c ------------------- sum -------------
@node sum, watchdog, sort, general_lib
@subsubsection sum
@cindex sum
@c ---content sum---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
sum(id[,v]); id ideal/vector/module/matrix/intvec/intmat/list,
v intvec (default: v=1..number of entries of id)

@item @strong{Assume:}
list members can be added.

@item @strong{Return:}
The sum of all entries of id [with index given by v] of type
depending on the entries of id.

@item @strong{Note:}
If id is not a list, id is treated as a list of polys resp. integers.
A module m is identified with the corresponding matrix M (columns
of M generate m).
@* If v is outside the range of id, we have the empty sum and the
result will be 0 (of type int).

@end table
@strong{Example:}
@smallexample
@c computed example sum d2t_singular/general_lib.doc:601
LIB "general.lib";
ring r= 0,(x,y,z),dp;
vector pv = [xy,xz,yz,x2,y2,z2];
sum(pv);
@expansion{} x2+xy+y2+xz+yz+z2
sum(pv,2..5);
@expansion{} x2+y2+xz+yz
matrix M[2][3] = 1,x,2,y,3,z;
intvec w=2,4,6;
sum(M,w);
@expansion{} x+y+z
intvec iv = 1,2,3,4,5,6,7,8,9;
sum(iv,2..4);
@expansion{} 9
@c end example sum d2t_singular/general_lib.doc:601
@end smallexample
@c ---end content sum---

@c ------------------- watchdog -------------
@node watchdog, which, sum, general_lib
@subsubsection watchdog
@cindex watchdog
@c ---content watchdog---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Return:}
Result of cmd, if the result can be computed in i seconds.
Otherwise the computation is interrupted after i seconds,
the string "Killed" is returned and the global variable
'watchdog_interrupt' is defined.

@item @strong{Note:}
* the MP package must be enabled
@** the current basering should not be watchdog_rneu, since
watchdog_rneu will be killed
@** if there are variable names of the structure x(i) all
polynomials have to be put into eval(...) in order to be
interpreted correctly
@** a second Singular process is started by this procedure

@end table
@strong{Example:}
@smallexample
@c computed example watchdog d2t_singular/general_lib.doc:642
LIB "general.lib";
ring r=0,(x,y,z),dp;
poly f=x^30+y^30;
watchdog(1,"factorize(eval("+string(f)+"))");
@expansion{} [1]:
@expansion{}    _[1]=1
@expansion{}    _[2]=x16+x14y2-x10y6-x8y8-x6y10+x2y14+y16
@expansion{}    _[3]=x8-x6y2+x4y4-x2y6+y8
@expansion{}    _[4]=x4-x2y2+y4
@expansion{}    _[5]=x2+y2
@expansion{} [2]:
@expansion{}    1,1,1,1,1
watchdog(100,"factorize(eval("+string(f)+"))");
@expansion{} [1]:
@expansion{}    _[1]=1
@expansion{}    _[2]=x16+x14y2-x10y6-x8y8-x6y10+x2y14+y16
@expansion{}    _[3]=x8-x6y2+x4y4-x2y6+y8
@expansion{}    _[4]=x4-x2y2+y4
@expansion{}    _[5]=x2+y2
@expansion{} [2]:
@expansion{}    1,1,1,1,1
@c end example watchdog d2t_singular/general_lib.doc:642
@end smallexample
@c ---end content watchdog---

@c ------------------- which -------------
@node which, primecoeffs, watchdog, general_lib
@subsubsection which
@cindex which
@c ---content which---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
which(command); command = string expression

@item @strong{Return:}
Absolute pathname of command, if found in search path.
Empty string, otherwise.

@item @strong{Note:}
Based on the Unix command 'which'.

@end table
@strong{Example:}
@smallexample
@c computed example which d2t_singular/general_lib.doc:673
LIB "general.lib";
which("sh");
@expansion{} /bin/sh
@c end example which d2t_singular/general_lib.doc:673
@end smallexample
@c ---end content which---

@c ------------------- primecoeffs -------------
@node primecoeffs, primefactors, which, general_lib
@subsubsection primecoeffs
@cindex primecoeffs
@c ---content primecoeffs---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
primecoeffs(J[,q]); J any type which can be converted to a matrix
e.g. ideal, matrix, vector, module, int, intvec
@*q = intger

@item @strong{Compute:}
primefactors <= min(p,32003) of coeffs of J (default p = 32003)

@item @strong{Return:}
a list, say l, of two intvectors:
@*l[1] : the different primefactors of all coefficients of J
l[2] : the different remaining factors

@item @strong{Note:}
the procedure works for small integers only, just by testing all
primes (not to be considerd as serious prime factorization!)

@end table
@strong{Example:}
@smallexample
@c computed example primecoeffs d2t_singular/general_lib.doc:708
LIB "general.lib";
primecoeffs(intvec(7*8*121,7*8));"";
@expansion{} [1]:
@expansion{}    2,7,11
@expansion{} [2]:
@expansion{}    1
@expansion{}
ring r = 0,(b,c,t),dp;
ideal I = -13b6c3t+4b5c4t,-10b4c2t-5b4ct2;
primecoeffs(I);
@expansion{} [1]:
@expansion{}    2,5,13
@expansion{} [2]:
@expansion{}    _[1]=1
@c end example primecoeffs d2t_singular/general_lib.doc:708
@end smallexample
@c ---end content primecoeffs---

@c ------------------- primefactors -------------
@node primefactors, timeStd, primecoeffs, general_lib
@subsubsection primefactors
@cindex primefactors
@c ---content primefactors---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
primefactors(n [,p]); n = int or number, p = integer

@item @strong{Compute:}
primefactors <= min(p,32003) of n (default p = 32003)

@item @strong{Return:}
a list, say l,
@*l[1] : primefactors <= min(p,32003) of n
@*l[2] : l[2][i] = multiplicity of l[1][i]
@*l[3] : remaining factor ( n=product@{ (l[1][i]^l[2][i])*l[3]@} )
type(l[3])=typeof(n)

@item @strong{Note:}
If n is a long integer (of type number) then the procedure
finds primefactors <= min(p,32003) but n may be larger as
2147483647 (max. integer representation)

@item @strong{Warning:}
the procedure works for small integers only, just by testing all
primes (not to be considerd as serious prime factorization!)

@end table
@strong{Example:}
@smallexample
@c computed example primefactors d2t_singular/general_lib.doc:751
LIB "general.lib";
primefactors(7*8*121);
@expansion{} [1]:
@expansion{}    2,7,11
@expansion{} [2]:
@expansion{}    3,1,2
@expansion{} [3]:
@expansion{}    1
ring r = 0,x,dp;
primefactors(123456789100);
@expansion{} [1]:
@expansion{}    2,5
@expansion{} [2]:
@expansion{}    2,2
@expansion{} [3]:
@expansion{}    1234567891
@c end example primefactors d2t_singular/general_lib.doc:751
@end smallexample
@c ---end content primefactors---

@c ------------------- timeStd -------------
@node timeStd, timeFactorize, primefactors, general_lib
@subsubsection timeStd
@cindex timeStd
@c ---content timeStd---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
timeStd(i,d), i ideal, d integer

@item @strong{Return:}
std(i) if the standard basis computation finished after
d-1 seconds and i otherwise

@end table
@strong{Example:}
@smallexample
@c computed example timeStd d2t_singular/general_lib.doc:778
LIB "general.lib";
ring r=32003,(a,b,c,d,e),dp;
int n=6;
ideal i=
a^n-b^n,
b^n-c^n,
c^n-d^n,
d^n-e^n,
a^(n-1)*b+b^(n-1)*c+c^(n-1)*d+d^(n-1)*e+e^(n-1)*a;
ideal j=timeStd(i,2);
j;
@expansion{} j[1]=a6-b6
@expansion{} j[2]=b6-c6
@expansion{} j[3]=c6-d6
@expansion{} j[4]=d6-e6
@expansion{} j[5]=a5b+b5c+c5d+d5e+ae5
@c end example timeStd d2t_singular/general_lib.doc:778
@end smallexample
@c ---end content timeStd---

@c ------------------- timeFactorize -------------
@node timeFactorize, factorH, timeStd, general_lib
@subsubsection timeFactorize
@cindex timeFactorize
@c ---content timeFactorize---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
timeFactorize(p,d) poly p , integer d

@item @strong{Return:}
factorize(p) if the factorization finished after d-1
@*seconds otherwise f is considered to be irreducible

@end table
@strong{Example:}
@smallexample
@c computed example timeFactorize d2t_singular/general_lib.doc:812
LIB "general.lib";
ring r=0,(x,y),dp;
poly p=((x2+y3)^2+xy6)*((x3+y2)^2+x10y);
p=p^2;
list l=timeFactorize(p,2);
l;
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       1
@expansion{}    [2]:
@expansion{}       x22y14+2x21y14+4x23y11+x20y14+2x25y8+4x22y11+6x24y8+4x26y5+2x18y13+\
   x28y2+4x17y13+4x15y15+8x19y10+2x16y13+8x14y15+2x12y17+4x21y7+8x18y10+16x1\
   6y12+4x13y15+4x11y17+12x20y7+8x18y9+16x15y12+8x13y14+2x10y17+8x22y4+24x17\
   y9+4x15y11+x14y12+8x12y14+2x24y+16x19y6+12x14y11+2x13y12+4x11y14+4x21y3+8\
   x16y8+4x15y9+x12y12+8x10y14+6x8y16+2x18y5+2x17y6+4x14y9+16x12y11+4x9y14+1\
   2x7y16+4x5y18+6x16y6+8x14y8+16x11y11+24x9y13+6x6y16+8x4y18+x2y20+4x18y3+2\
   4x13y8+12x11y10+24x8y13+16x6y15+4x3y18+2xy20+x20+16x15y5+36x10y10+8x8y12+\
   16x5y15+4x3y17+y20+4x17y2+24x12y7+24x7y12+2x5y14+4x2y17+6x14y4+16x9y9+6x4\
   y14+4x11y6+4x6y11+x8y8
@expansion{} [2]:
@expansion{}    1,1
@c end example timeFactorize d2t_singular/general_lib.doc:812
@end smallexample
@c ---end content timeFactorize---

@c ------------------- factorH -------------
@node factorH,, timeFactorize, general_lib
@subsubsection factorH
@cindex factorH
@c ---content factorH---
Procedure from library @code{general.lib} (@pxref{general_lib}).

@table @asis
@item @strong{Usage:}
factorH(p) p poly

@item @strong{Return:}
factorize(p)

@item @strong{Note:}
changes variables to become the last variable the principal
one in the multivariate factorization and factorizes then
the polynomial

@end table
@strong{Example:}
@smallexample
@c computed example factorH d2t_singular/general_lib.doc:845
LIB "general.lib";
system("random",992851144);
ring r=32003,(x,y,z,w,t),lp;
poly p=y2w9+yz7t-yz5w4-z2w4t4-w8t3;
//factorize(p);  //fast
//system("random",992851262);
//factorize(p);  //slow
//system("random",992851262);
factorH(p);
@expansion{} [1]:
@expansion{}    _[1]=1
@expansion{}    _[2]=y2w9+yz7t-yz5w4-z2w4t4-w8t3
@expansion{} [2]:
@expansion{}    1,1
@c end example factorH d2t_singular/general_lib.doc:845
@end smallexample
@c ---end content factorH---

repo_name: mthl/texinfo

license: mit


code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/graphics_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/graphics_lib.doc INSTEAD
@c library version: (1.10,2001/02/19)
@c library file: ../Singular/LIB/graphics.lib
@cindex graphics.lib
@cindex graphics_lib
@table @asis
@item @strong{Library:}
graphics.lib
@item @strong{Purpose:}
    Procedures to use Graphics with Mathematica
@item @strong{Author:}
Christian Gorzel, gorzelc@@math.uni-muenster.de

@end table

@strong{Procedures:}
@menu
* staircase:: Mathematica text for displaying staircase of I
* mathinit:: string for loading Mathematica's ImplicitPlot
* mplot:: Mathematica text for various plots
@end menu
@c ---end content LibInfo---

@c ------------------- staircase -------------
@node staircase, mathinit,, graphics_lib
@subsubsection staircase
@cindex staircase
@c ---content staircase---
Procedure from library @code{graphics.lib} (@pxref{graphics_lib}).

@table @asis
@item @strong{Usage:}
staircase(s,I); s a string, I ideal in two variables

@item @strong{Return:}
string with Mathematica input for displaying staircase diagrams of an
ideal I, i.e. exponent vectors of the initial ideal of I

@item @strong{Note:}
ideal I should be given by a standard basis. Let s="" and copy and
paste the result into a Mathematica notebook.

@end table
@strong{Example:}
@smallexample
@c skipped computation of example staircase d2t_singular/graphics_lib.doc:46
LIB "graphics.lib";
ring r0 = 0,(x,y),ls;
ideal I = -1x2y6-1x4y2, 7x6y5+1/2x7y4+6x4y6;
staircase("",std(I));
ring r1 = 0,(x,y),dp;
ideal I = fetch(r0,I);
staircase("",std(I));
ring r2 = 0,(x,y),wp(2,3);
ideal I = fetch(r0,I);
staircase("",std(I));
// Paste the output into a Mathematica notebook
// active evalutation of the cell with SHIFT RETURN
@end smallexample
@c ---end content staircase---

@c ------------------- mathinit -------------
@node mathinit, mplot, staircase, graphics_lib
@subsubsection mathinit
@cindex mathinit
@c ---content mathinit---
Procedure from library @code{graphics.lib} (@pxref{graphics_lib}).

@table @asis
@item @strong{Usage:}
mathinit();

@item @strong{Return:}
initializing string for loading Mathematica's ImplicitPlot

@end table
@strong{Example:}
@smallexample
@c skipped computation of example mathinit d2t_singular/graphics_lib.doc:80
LIB "graphics.lib";
mathinit();
// Paste the output into a Mathematica notebook
// active evalutation of the cell with SHIFT RETURN
@end smallexample
@c ---end content mathinit---

@c ------------------- mplot -------------
@node mplot,, mathinit, graphics_lib
@subsubsection mplot
@cindex mplot
@c ---content mplot---
Procedure from library @code{graphics.lib} (@pxref{graphics_lib}).

@table @asis
@item @strong{Usage:}
mplot(fname, I [,I1,I2,..,s] ); fname=string; I,I1,I2,..=ideals,
s=string representing the plot region.@*
Use the ideals I1,I2,.. in order to produce multiple plots (they need
to have the same number of entries as I!).

@item @strong{Return:}
string, text with Mathematica commands to display a plot

@item @strong{Note:}
The plotregion is defaulted to -1,1 around zero.
@*For implicit given curves enter first the string returned by
proc mathinit into Mathematica in order to load ImplicitPlot.
The following conventions for I are used:
  @format
  - ideal with 2 entries in one variable means a parametrised plane curve,
  - ideal with 3 entries in one variable means a parametrised space curve,
  - ideal with 3 entries in two variables means a parametrised surface,
  - ideal with 2 entries in two variables means an implicit curve
    given as I[1]==I[2],
  - ideal with 1 entry (or one polynomial) in two variables means
    an implicit curve given as  f == 0,
  @end format

@end table
@strong{Example:}
@smallexample
@c skipped computation of example mplot d2t_singular/graphics_lib.doc:124
LIB "graphics.lib";
// ---------  plane curves ------------
ring rr0 = 0,x,dp; export rr0;
ideal I = x3 + x, x2;
ideal J = x2, -x+x3;
mplot("",I,J,"-2,2");
// Paste the output into a Mathematica notebook
// active evalutation of the cell with SHIFT RETURN
// --------- space curves --------------
I = x3,-1/10x3+x2,x2;
mplot("",I);
// Paste the output into a Mathematica notebook
// active evalutation of the cell with SHIFT RETURN
// ----------- surfaces -------------------
ring rr1 = 0,(x,y),dp; export rr1;
ideal J = xy,y,x2;
mplot("",J,"-2,1","1,2");
// Paste the output into a Mathematica notebook
// active evalutation of the cell with SHIFT RETURN
kill rr0,rr1;
@end smallexample
@c ---end content mplot---