Changeset d2b2a7 in git for Singular/LIB


Ignore:
Timestamp:
May 5, 1998, 1:55:40 PM (25 years ago)
Author:
Kai Krüger <krueger@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
97f92aa6d280f6022eaae47195ccc02503ccb984
Parents:
4996f5286c7671191ad22e654499fd8b752fe4f0
Message:
Modified Files:
	libparse.l utils.cc LIB/classify.lib LIB/deform.lib
	LIB/elim.lib LIB/factor.lib LIB/fastsolv.lib LIB/finvar.lib
	LIB/general.lib LIB/hnoether.lib LIB/homolog.lib LIB/inout.lib
	LIB/invar.lib LIB/makedbm.lib LIB/matrix.lib LIB/normal.lib
	LIB/poly.lib LIB/presolve.lib LIB/primdec.lib LIB/primitiv.lib
	LIB/random.lib LIB/ring.lib LIB/sing.lib LIB/standard.lib
	LIB/tex.lib LIB/tst.lib
Changed help section o procedures to have an quoted help-string between
proc-definition and proc-body.


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/classify.lib

    r4996f52 rd2b2a7  
    1 // $Id: classify.lib,v 1.22 1998-04-22 09:13:07 krueger Exp $
    2 ///////////////////////////////////////////////////////////////////////////////
    3 
    4 version  =       "$Id: classify.lib,v 1.22 1998-04-22 09:13:07 krueger Exp $";
     1// $Id: classify.lib,v 1.23 1998-05-05 11:55:20 krueger Exp $
     2///////////////////////////////////////////////////////////////////////////////
     3
     4version  =       "$Id: classify.lib,v 1.23 1998-05-05 11:55:20 krueger Exp $";
    55info="
    66LIBRARY:  classify.lib  PROCEDURES FOR THE ARNOLD-CLASSIFIER OF SINGULARITIES 
     
    5252
    5353proc classify (poly f_in)
    54 USAGE:    classify(f);  f=poly
     54"USAGE:    classify(f);  f=poly
    5555COMPUTE:  normal form and singularity type of f with respect to right
    56           equivalence, as given in the book "Singularities of
    57           differentiables maps, Volume I" by V.I. Arnold, S.M. Gusein-Zade,
     56          equivalence, as given in the book \"Singularities of
     57          differentiables maps, Volume I\" by V.I. Arnold, S.M. Gusein-Zade,
    5858          A.N. Varchenko
    5959RETURN:   normal form of f, of type poly
    6060REMARK:   This version of classify is only alpha. Please send bugs and
    61           comments to: "Kai Krueger" <krueger@mathematik.uni-kl.de>
     61          comments to: \"Kai Krueger\" <krueger@mathematik.uni-kl.de>
    6262          Be sure to have at least Singular version 0.9.3, better 1.0.1
    6363          Updates can be found under:
     
    6868          with @, hence there should be no name conflicts
    6969EXAMPLE:  example classify; shows an example
     70"
    7071{
    7172//---------------------------- initialisation ---------------------------------
     
    12791280///////////////////////////////////////////////////////////////////////////////
    12801281proc tschirnhaus (poly f, poly x)
    1281 USAGE:    tschirnhaus();
     1282"USAGE:    tschirnhaus();
     1283"
    12821284{
    12831285//---------------------------- initialisation ---------------------------------
     
    15231525///////////////////////////////////////////////////////////////////////////////
    15241526proc morsesplit(poly f)
     1527"
    15251528USAGE:    morsesplit(f);        f=poly
    15261529RETURN:   Normal form of f in M^3 after application of the splitting lemma
    15271530COMPUTE:  apply the splitting lemma (generalized Morse lemma) to f
    15281531EXAMPLE:  example morsesplit; shows an example
     1532"
    15291533{
    15301534//---------------------------- initialisation ---------------------------------
     
    17701774
    17711775///////////////////////////////////////////////////////////////////////////////
    1772 proc quickclass(poly f);
     1776proc quickclass(poly f)
     1777"
    17731778USAGE:    quickclass(f);         f=poly
    17741779RETURN:   Normal form of f in Arnold's list
     
    17771782          no coordinate change is needed (see also proc 'milnorcode').
    17781783EXAMPLE:  example quickclass; shows an example
     1784"
    17791785{
    17801786//---------------------------- initialisation ---------------------------------
     
    18291835///////////////////////////////////////////////////////////////////////////////
    18301836proc milnorcode (poly f, list #)
    1831 USAGE:    milnorcode(f[,e]); f=poly, e=int
     1837"USAGE:    milnorcode(f[,e]); f=poly, e=int
    18321838RETURN:   intvec, coding the Hilbert function of the e-th Milnor algebra
    18331839          of f, i.e. of basering/(jacob(f)^e) (default e=1), according
    18341840          to proc Hcode
    18351841EXAMPLE:  example milnorcode; shows an example
     1842"
    18361843{
    18371844  int  e=1;
     
    18521859///////////////////////////////////////////////////////////////////////////////
    18531860proc Hcode (intvec v)
    1854 USAGE:    Hcode(v); v=intvec
     1861"USAGE:    Hcode(v); v=intvec
    18551862RETURN:   intvec, coding v according to the number of successive
    18561863          repetitions of an entry
    18571864EXAMPLE:  example Hcode; shows an example.
     1865"
    18581866{
    18591867  int    col, len, i, cur, cnt, maxcoef, nlen;
     
    19421950static
    19431951proc parity  (int e)
    1944 USAGE:    parity()
     1952"USAGE:    parity()
     1953"
    19451954{
    19461955  int r = e/2;
     
    22652274///////////////////////////////////////////////////////////////////////////////
    22662275proc singularity(string typ, list #)
    2267 USAGE:    singularity(t, l); t=string (name of singularity),
     2276"USAGE:    singularity(t, l); t=string (name of singularity),
    22682277          l=list of integers (index/indices of singularity)
    22692278COMPUTE:  get the Singularity named by type t from the database.
     
    22762285          index (indices) l
    22772286EXAMPLE:  example singularity; shows an example
     2287"
    22782288{
    22792289  poly a1, a2, a3, a4, f;
     
    23722382///////////////////////////////////////////////////////////////////////////////
    23732383proc RandomPolyK (int M, string Typ)
    2374 USAGE:    RandomPolyK(M, Typ)
     2384"USAGE:    RandomPolyK(M, Typ)
     2385"
    23752386{
    23762387//---------------------------- initialisation ---------------------------------
     
    24302441///////////////////////////////////////////////////////////////////////////////
    24312442proc debug_log (int level, list #)
    2432 USAGE:    debug_log(level,li); level=int, li=comma separated "message" list
    2433 COMPUTE:  print "messages" if level>=@DeBug.
     2443"USAGE:    debug_log(level,li); level=int, li=comma separated \"message\" list
     2444COMPUTE:  print \"messages\" if level>=@DeBug.
    24342445          useful for user-defined trace messages.
    24352446EXAMPLE:  example debug_log; shows an example
    24362447SEE ALSO: init_debug();
     2448"
    24372449{
    24382450   int len = size(#);
     
    24552467///////////////////////////////////////////////////////////////////////////////
    24562468proc init_debug(list #)
    2457 USAGE:    init_debug([level]);  level=int
     2469"USAGE:    init_debug([level]);  level=int
    24582470COMPUTE:  Set the global variable @DeBug to level. The variable @DeBug is
    24592471          used by the function debug_log(level, list of strings) to know
     
    24632475          range from 0 to 10, higher values of n give more information.
    24642476EXAMPLE:  example init_debug; shows an example
     2477"
    24652478{
    24662479  int newDebug=0;
     
    25082521///////////////////////////////////////////////////////////////////////////////
    25092522proc basicinvariants(poly f)
    2510 USAGE:    basicinvariants(f);   f = poly
     2523"USAGE:    basicinvariants(f);   f = poly
    25112524COMPUTE:  Compute basic invariants of f: an upper bound d for the
    25122525          determinacy, the milnor number mu and the corank c of f
    25132526RETURN:   intvec: d, mu, c
    25142527EXAMPLE:  example basicinvariants; shows an example
     2528"
    25152529{
    25162530  intvec v;
     
    25302544///////////////////////////////////////////////////////////////////////////////
    25312545proc corank(poly f)
    2532 USAGE:    corank(f);   f=poly
     2546"USAGE:    corank(f);   f=poly
    25332547RETURN:   the corank of the Hessian matrix of f, of type int
    25342548REMARK:   corank(f) is the number of variables occuring in the residual
    25352549          singulartity after applying 'morsesplit' to f
    25362550EXAMPLE:  example corank; shows an example
     2551"
    25372552{
    25382553  matrix M = jacob(jacob(jet(f,2)));
     
    26122627static
    26132628proc GetRf (poly fi, int n)
    2614 USAGE:    GetRf();
     2629"USAGE:    GetRf();
     2630"
    26152631{
    26162632//---------------------------- initialisation ---------------------------------
     
    26682684static
    26692685proc DecodeNormalFormString (string S_in)
    2670 USAGE:    DecodeNormalFormString
     2686"USAGE:    DecodeNormalFormString
     2687"
    26712688{
    26722689//---------------------------- initialisation ---------------------------------
     
    27712788///////////////////////////////////////////////////////////////////////////////
    27722789proc A_L
    2773 USAGE:    A_L(f);         f=poly
    2774           A_L("name");    type=string
     2790"USAGE:    A_L(f);         f=poly
     2791          A_L(\"name\");    type=string
    27752792COMPUTE:  the normal form in Arnold's list of the singularity given either
    27762793          by a polynomial f or by its name.
    27772794RETURN:   A_L(f): compute via 'milnorcode' the class of f and
    27782795          return the normal form of f found in the database.
    2779           A_L("name"): Get the normal form from the database for
     2796          A_L(\"name\"): Get the normal form from the database for
    27802797          the singularity given by its name.
    27812798EXAMPLE:  example A_L; shows an example
     2799"
    27822800{
    27832801  // if trace/debug mode not set, do it!
     
    28042822///////////////////////////////////////////////////////////////////////////////
    28052823proc normalform(string s_in)
    2806 USAGE:    normalform(s);  s=string
     2824"USAGE:    normalform(s);  s=string
    28072825RETURN:   Arnold's normal form of singularity with name s
    28082826EXAMPLE:  example normalform; shows an example.
     2827"
    28092828{
    28102829  string Typ;
     
    28362855///////////////////////////////////////////////////////////////////////////////
    28372856proc swap
    2838 USAGE:    swap(a,b);
     2857"USAGE:    swap(a,b);
    28392858RETURN:   b,a if b,a is the input (any type)
     2859"
    28402860{
    28412861  return(#[2],#[1]);
     
    28482868///////////////////////////////////////////////////////////////////////////////
    28492869proc Setring(int c, string name)
    2850 USAGE:   
     2870"USAGE:   
     2871"
    28512872{
    28522873  string s="ring "+name+"=0,(x(1.."+ string(c) +")),(c,ds);";
     
    28562877///////////////////////////////////////////////////////////////////////////////
    28572878proc internalfunctions
    2858 USAGE:   internalfunctions();
     2879"USAGE:   internalfunctions();
    28592880RETURN:  nothing, display names of internal procedures of classify.lib
    28602881EXAMPLE: no example
     2882"
    28612883{ "   Internal functions for the classification using Arnold's method,";
    28622884 "   the function numbers correspond to numbers in Arnold's classifier:";
  • Singular/LIB/deform.lib

    r4996f52 rd2b2a7  
    1 // $Id: deform.lib,v 1.9 1998-05-03 14:09:50 obachman Exp $
     1// $Id: deform.lib,v 1.10 1998-05-05 11:55:22 krueger Exp $
    22// author: Bernd Martin email: martin@math.tu-cottbus.de
    33//(bm, last modified 4/98)   
    44///////////////////////////////////////////////////////////////////////////////
    5 version="$Id: deform.lib,v 1.9 1998-05-03 14:09:50 obachman Exp $";
     5version="$Id: deform.lib,v 1.10 1998-05-05 11:55:22 krueger Exp $";
    66info="
    77LIBRARY:  deform.lib       PROCEDURES FOR COMPUTING MINIVERSAL DEFORMATION
     
    3030///////////////////////////////////////////////////////////////////////////////
    3131proc versal (ideal Fo,list #)
    32 USAGE:   versal(Fo[,d,any]); Fo=ideal, d=int, any=list
     32"USAGE:   versal(Fo[,d,any]); Fo=ideal, d=int, any=list
    3333COMUPTE: miniversal deformation of Fo up to degree d (default d=100),
    3434CREATE:  Rings (exported):
    35          'my'Px = extending the basering Po by new variables given by "A,B,.."
     35         'my'Px = extending the basering Po by new variables given by \"A,B,..\"
    3636                  (deformation parameters), returns as basering,
    3737                  the new variables come before the old ones,
    38                   the ordering is the product between "ls" and "ord(Po)",
     38                  the ordering is the product between \"ls\" and \"ord(Po)\",
    3939         'my'Qx = Px/Fo extending Qo=Po/Fo,
    4040         'my'So = being the embedding-ring of the versal base space,
    41          'my'Ox = Px/Js extending So/Js.   (default my="")
     41         'my'Ox = Px/Js extending So/Js.   (default my=\"\")
    4242      Matrices (in Px, exported):
    4343         Js  = giving the versal base space (obstructions),
     
    4646      If d is defined (!=0), it computes up to degree d.
    4747      If 'any' is defined and any[1] is no string, interactive version.
    48       Otherwise 'any' gives predefined strings: "my","param","order","out"
    49       ("my" prefix-string, "param" is a letter (e.g. "A")  for the name of
    50       first parameter or (e.g. "A(") for index parameter variables, "order"
    51       ordering string for ring extension), "out" name of output-file).
     48      Otherwise 'any' gives predefined strings: \"my\",\"param\",\"order\",\"out\"
     49      (\"my\" prefix-string, \"param\" is a letter (e.g. \"A\")  for the name of
     50      first parameter or (e.g. \"A(\") for index parameter variables, \"order\"
     51      ordering string for ring extension), \"out\" name of output-file).
    5252NOTE:   printlevel < 0        no output at all,
    5353        printlevel >=0,1,2,.. informs you, what is going on;           
    5454        this proc uses 'execute'.
    5555EXAMPLE:example versal; shows an example
     56"
    5657{
    5758//------- prepare -------------------------------------------------------------
     
    303304///////////////////////////////////////////////////////////////////////////////
    304305proc mod_versal(matrix Mo, ideal I, list #)
    305 
     306"
    306307USAGE:   mod_versal(Mo,I[,d,any]); I=ideal, M=module, d=int, any =list
    307308COMUPTE: miniversal deformation of coker(Mo) over Qo=Po/Io, Po=basering;
     
    310311                   (deformation parameters),
    311312                   the new variables come before the old ones,
    312                    the ordering is the product between "my_ord" and "ord(Po)",
     313                   the ordering is the product between \"my_ord\" and \"ord(Po)\",
    313314         'my'Qx  = Px/Io extending Qo (returns as basering),
    314315         'my'Ox  = Px/(Io+Js) ring of the versal deformation of coker(Ms),
    315          'my'So  = embedding-ring of the versal base space.  (default 'my'="")
     316         'my'So  = embedding-ring of the versal base space.  (default 'my'=\"\")
    316317      Matrices (in Qx, exported):
    317318         Js  = giving the versal base space (obstructions),
     
    320321      If d is defined (!=0), it computes up to degree d.
    321322      If 'any' is defined and any[1] is no string, interactive version.
    322       Otherwise 'any' gives predefined strings:"my","param","order","out"
    323       ("my" prefix-string, "param" is a letter (e.g. "A")  for the name of
    324       first parameter or (e.g. "A(") for index parameter variables, "ord"
    325       ordering string for ringextension), "out" name of output-file).
     323      Otherwise 'any' gives predefined strings:\"my\",\"param\",\"order\",\"out\"
     324      (\"my\" prefix-string, \"param\" is a letter (e.g. \"A\")  for the name of
     325      first parameter or (e.g. \"A(\") for index parameter variables, \"ord\"
     326      ordering string for ringextension), \"out\" name of output-file).
    326327NOTE:   printlevel < 0        no output at all,
    327328        printlevel >=0,1,2,.. informs you, what is going on,             
    328329        this proc uses 'execute'.
    329330EXAMPLE:example mod_versal; shows an example
     331"
    330332{
    331333//------- prepare -------------------------------------------------------------
     
    543545///////////////////////////////////////////////////////////////////////////////
    544546proc kill_rings(list #)
    545 USAGE: kill_rings([string]);
     547"USAGE: kill_rings([string]);
    546548Sub-procedure: kills exported rings of 'versal' and
    547549               'mod_versal' with prefix 'string'
     550"
    548551{
    549552  string my,br;
     
    568571///////////////////////////////////////////////////////////////////////////////
    569572proc compute_ext(matrix Mo,int p)
    570 
     573"
    571574Sub-procedure: obtain Ext1 and Ext2 and other objects used by mod_versal
     575"
    572576{
    573577   int    l,f0,f1,f2,f3,e1,e2,ok_ann;
     
    624628//////////////////////////////////////////////////////////////////////////////
    625629proc get_rings(ideal Io,int e1,int switch, list #)
    626 
     630"
    627631Sub-procedure: creating ring-extensions
     632"
    628633{
    629634   def Po = basering;
     
    659664}
    660665//////////////////////////////////////////////////////////////////////////////
    661 proc get_inf_def(list #);     
    662 
     666proc get_inf_def(list #)
     667"
    663668Sub-procedure: compute infinitesimal family of a module and its syzygies
    664669               from a kbase of Ext1 and its lifts
     670"
    665671{
    666672  matrix Ms  = #[1];
     
    684690//////////////////////////////////////////////////////////////////////////////
    685691proc lift_rel_kb (module N, module M, list #)
    686 
     692"
    687693USAGE   lift_rel_kb(N,M[,kbaseM,p]);
    688694ASSUME  [p a monomial ] or the product of all variables
     
    694700        i.e. kbaseM*A = reduce(N,std(M))
    695701EXAMPLE example lift_rel_kb;  shows examples
     702"
    696703{
    697704  poly p = product(maxideal(1));
     
    732739///////////////////////////////////////////////////////////////////////////////
    733740proc lift_kbase (N, M)
    734 USAGE:   lift_kbase(N,M); N,M=poly/ideal/vector/module
     741"USAGE:   lift_kbase(N,M); N,M=poly/ideal/vector/module
    735742RETURN:  matrix A, coefficient matrix expressing N as linear combination of
    736743         k-basis of M. Let the k-basis have k elements and size(N)=c columns.
     
    740747         block of the ordering is c or C
    741748EXAMPLE: example lift_kbase; shows an example
     749"
    742750{
    743751  return(lift_rel_kb(N,M));
     
    760768///////////////////////////////////////////////////////////////////////////////
    761769proc interact1 ()
    762 
     770"
    763771Sub_procedure: asking for and reading your input-strings
     772"
    764773{
    765774 string my = "@";
     
    794803///////////////////////////////////////////////////////////////////////////////
    795804proc interact2 (matrix A, intvec col_vec, list #)
    796 
     805"
    797806Sub-procedure: asking for and reading your input
     807"
    798808{
    799809  module B,C;
     
    825835///////////////////////////////////////////////////////////////////////////////
    826836proc negative_part(intvec iv)
    827 
     837"
    828838RETURNS intvec of indices of jv having negative entries (or iv, if non)
     839"
    829840{
    830841   intvec jv;
     
    841852///////////////////////////////////////////////////////////////////////////////
    842853proc find_ord(matrix A, intvec w_vec)
    843 
     854"
    844855Sub-proc: return martix ord(a_ij) with respect to weight_vec, or
    845856          0 if A non-qh
     857"
    846858{
    847859  int @r = nrows(A);
     
    865877//////////////////////////////////////////////////////////////////////////////////
    866878proc homog_test(intvec w_vec, matrix Mo, matrix A)
    867 
     879"
    868880Sub proc: return relative weight string of columnes of A with respect
    869           to the given w_vec and to Mo, or "" if not qh
     881          to the given w_vec and to Mo, or \"\" if not qh
    870882    NOTE: * means weight is not determined
     883"
    871884{
    872885  int k,l;
     
    902915//////////////////////////////////////////////////////////////////////////////////
    903916proc homog_t(intvec d_vec, matrix Fo, matrix A)
    904 
     917"
    905918Sub-procedure: Computing relative (with respect to flatten(Fo)) weight_vec
    906919               of columnes of A (return zero if Fo or A not qh)
     920"
    907921{
    908922   Fo = matrix(Fo,nrows(A),1);
  • Singular/LIB/elim.lib

    r4996f52 rd2b2a7  
    1 // $Id: elim.lib,v 1.3 1998-04-03 22:47:00 krueger Exp $
     1// $Id: elim.lib,v 1.4 1998-05-05 11:55:22 krueger Exp $
    22// system("random",787422842);
    33// (GMG, last modified 22.06.96)
    44///////////////////////////////////////////////////////////////////////////////
    55
    6 version="$Id: elim.lib,v 1.3 1998-04-03 22:47:00 krueger Exp $";
     6version="$Id: elim.lib,v 1.4 1998-05-05 11:55:22 krueger Exp $";
    77info="
    88LIBRARY:  elim.lib      PROCEDURES FOR ELIMINATIOM, SATURATION AND BLOWING UP
     
    2323
    2424proc blowup0 (ideal j,list #)
    25 USAGE:   blowup0(j[,s1,s2]); j ideal, s1,s2 nonempty strings
     25"USAGE:   blowup0(j[,s1,s2]); j ideal, s1,s2 nonempty strings
    2626CREATE:  Create a presentation of the blowup ring of j
    2727RETURN:  no return value
    2828NOTE:    s1 and s2 are used to give names to the blownup ring and the blownup
    29          ideal (default: s1="j", s2="A")
    30          Assume R = char,x(1..n),ord is the basering of j, and s1="j", s2="A"
     29         ideal (default: s1=\"j\", s2=\"A\")
     30         Assume R = char,x(1..n),ord is the basering of j, and s1=\"j\", s2=\"A\"
    3131         then the procedure creates a new ring with name Bl_jR
    3232         (equal to R[A,B,...])
     
    3434         with k=ncols(j) new variables A,B,... and ordering wp(d1..dk) if j is
    3535         homogeneous with deg(j[i])=di resp. dp otherwise for these vars.
    36          If k>26 or size(s2)>1, say s2="A()", the new vars are A(1),...,A(k).
     36         If k>26 or size(s2)>1, say s2=\"A()\", the new vars are A(1),...,A(k).
    3737         Let j_ be the kernel of the ring map Bl_jR -> R defined by A(i)->j[i],
    3838         x(i)->x(i), then the quotient ring Bl_jR/j_ is the blowup ring of j
     
    4242DISPLAY: printlevel >=0: explain created objects (default)
    4343EXAMPLE: example blowup0; shows examples
    44 {
     44"{
    4545   string bsr = nameof(basering);
    4646   def br = basering;
     
    100100
    101101proc elim (id, int n, int m)
    102 USAGE:   elim(id,n,m);  id ideal/module, n,m integers
     102"USAGE:   elim(id,n,m);  id ideal/module, n,m integers
    103103RETURNS: ideal/module obtained from id by eliminating variables n..m
    104104NOTE:    no special monomial ordering is required, result is a SB with
     
    107107         This proc uses 'execute' or calls a procedure using 'execute'.
    108108EXAMPLE: example elim; shows examples
     109"
    109110{
    110111//---- get variables to be eliminated and create string for new ordering ------
     
    137138
    138139proc elim1 (id, poly vars)
    139 USAGE:   elim1(id,poly); id ideal/module, poly=product of vars to be eliminated
     140"USAGE:   elim1(id,poly); id ideal/module, poly=product of vars to be eliminated
    140141RETURN:  ideal/module obtained from id by eliminating vars occuring in poly
    141142NOTE:    no special monomial ordering is required, result is a SB with
     
    144145         This proc uses 'execute' or calls a procedure using 'execute'.
    145146EXAMPLE: example elim1; shows examples
     147"
    146148{
    147149//---- get variables to be eliminated and create string for new ordering ------
     
    175177
    176178proc nselect (id, int n, list#)
    177 USAGE:   nselect(id,n[,m]); id a module or ideal, n, m integers
     179"USAGE:   nselect(id,n[,m]); id a module or ideal, n, m integers
    178180RETURN:  generators of id not containing the variable n [up to m]
    179181EXAMPLE: example nselect; shows examples
    180 {
     182"{
    181183   int j,k;
    182184   if( size(#)==0 ) { #[1]=n; }
     
    200202
    201203proc sat (id, ideal j)
    202 USAGE:   sat(id,j);  id=ideal/module, j=ideal
     204"USAGE:   sat(id,j);  id=ideal/module, j=ideal
    203205RETURN:  list of an ideal/module [1] and an integer [2]:
    204206         [1] = saturation of id with respect to j (= union_(k=1...) of id:j^k)
     
    207209DISPLAY: saturation exponent during computation if printlevel >=1
    208210EXAMPLE: example sat; shows an example
    209 {
     211"{
    210212   int ii,kk;
    211213   def i=id;
     
    240242
    241243proc select (id, int n, list#)
    242 USAGE:   select(id,n[,m]); id ideal/module, n, m integers
     244"USAGE:   select(id,n[,m]); id ideal/module, n, m integers
    243245RETURN:  generators of id containing the variable n [up to m]
    244246EXAMPLE: example select; shows examples
    245 {
     247"{
    246248   if( size(#)==0 ) { #[1]=n; }
    247249   int j,k;
  • Singular/LIB/factor.lib

    r4996f52 rd2b2a7  
    1 // $Id: factor.lib,v 1.4 1998-04-03 22:47:01 krueger Exp $
     1// $Id: factor.lib,v 1.5 1998-05-05 11:55:23 krueger Exp $
    22//(RS)
    33///////////////////////////////////////////////////////////////////////////////
    44
    5 version="$Id: factor.lib,v 1.4 1998-04-03 22:47:01 krueger Exp $";
     5version="$Id: factor.lib,v 1.5 1998-05-05 11:55:23 krueger Exp $";
    66info="
    77LIBRARY:  factor.lib    PROCEDURES FOR CALLING THE REDUCE FACTORIZER
     
    1414
    1515proc delete_dollar ( string s )
    16 USAGE:   delete_dollar(s);  s = string
     16"USAGE:   delete_dollar(s);  s = string
    1717RETURN:  string, with '$' replaced by ' '
    1818EXAMPLE: example delete_dollar; shows an example
     19"
    1920{
    2021   while( s[size(s)]=="$" and size(s)!=1 ) { s=s[1,size(s)-1]; }
     
    3839
    3940proc reduce_factor ( poly f )
    40 USAGE:   reduce_factor(f);  f = poly
     41"USAGE:   reduce_factor(f);  f = poly
    4142RETURN:  list, the factors of f
    4243NOTE:    due to a limitation of REDUCE, multivariate polynomials can only
     
    4445             This proc runs under UNIX only
    4546EXAMPLE: example reduce_factor; shows an example
     47"
    4648{
    4749  string pid = string( system( "pid" ) );
  • Singular/LIB/fastsolv.lib

    r4996f52 rd2b2a7  
    11//
    2 version="$Id: fastsolv.lib,v 1.2 1998-04-03 22:47:01 krueger Exp $";
     2version="$Id: fastsolv.lib,v 1.3 1998-05-05 11:55:24 krueger Exp $";
    33info="";
    44
     
    99
    1010proc Tsimplify
    11 USAGE:    simplify(id,n);  id ideal, n integer
     11"USAGE:    simplify(id,n);  id ideal, n integer
    1212RETURNS:  list of two ideals the first containing the simplified
    1313          elements, the second the variables which already have
     
    1616          n+1,... is not supported
    1717EXAMPLE:  example simplify; shows an example
    18 
     18"
    1919{
    2020  def bsr=basering;
     
    8888
    8989proc simplifyInBadRings
    90 USAGE:    simplify(id,n);  id ideal, n product of the variables
     90"USAGE:    simplify(id,n);  id ideal, n product of the variables
    9191          to be eliminated later
    9292RETURNS:  list of two ideals the first containing the simplified
     
    9494          been eliminated
    9595EXAMPLE:  example simplify; shows an example
    96 
     96"
    9797{
    9898  int @i,@j;
     
    144144
    145145proc fastElim
    146 USAGE:    fastelim(id,v);  id ideal, v Product of variables to
     146"USAGE:    fastelim(id,v);  id ideal, v Product of variables to
    147147          be eliminated.
    148148RETURNS:  list of two ideals the first containing the simplified
     
    150150          been eliminated
    151151EXAMPLE:  example fastElim; shows an example.
    152 {
     152"{
    153153   string @oldgnir = nameof(basering);  // Namen des alten Baserings merken
    154154   string @varnames;
     
    275275
    276276proc valvars
    277 
     277"
    278278USAGE:    valvars(id, [n1, [m, [n2]]]); id (poly|ideal|vector|module);
    279279                                        m monom; n1,n2 int
     
    289289          contains more monomials than that of y.
    290290EXAMPLE:  example valvars; shows an example
    291 
     291"
    292292{
    293293  int     @order1, @order2,     // order of vars not to elim resp. to elim
  • Singular/LIB/finvar.lib

    r4996f52 rd2b2a7  
    1 // $Id: finvar.lib,v 1.9 1998-05-03 11:57:37 obachman Exp $
     1// $Id: finvar.lib,v 1.10 1998-05-05 11:55:25 krueger Exp $
    22// author: Agnes Eileen Heydtmann, email:agnes@math.uni-sb.de
    33// last change: 3.5.98
    44//////////////////////////////////////////////////////////////////////////////
    5 version="$Id: finvar.lib,v 1.9 1998-05-03 11:57:37 obachman Exp $"
     5version="$Id: finvar.lib,v 1.10 1998-05-05 11:55:25 krueger Exp $"
    66info="
    77LIBRARY:  finvar.lib       LIBRARY TO CALCULATE INVARIANT RINGS & MORE
     
    6565
    6666proc cyclotomic (int i)
    67 USAGE:   cyclotomic(i);
     67"USAGE:   cyclotomic(i);
    6868         i: an <int> > 0
    6969RETURNS: the i-th cyclotomic polynomial (type <poly>) as one in the first ring
     
    7272THEORY:  x^i-1 is divided by the j-th cyclotomic polynomial where j takes on the
    7373         value of proper divisors of i
     74"
    7475{ if (i<=0)
    7576  { "ERROR:   the input should be > 0.";
     
    114115
    115116proc group_reynolds (list #)
    116 USAGE:   group_reynolds(G1,G2,...[,v]);
     117"USAGE:   group_reynolds(G1,G2,...[,v]);
    117118         G1,G2,...: nxn <matrices> generating a finite matrix group, v: an
    118119         optional <int>
     
    135136         the Reynolds operator is made up is generated. They are stored in the
    136137         rows of the first return value.
     138"
    137139{ int ch=char(basering);               // the existance of the Reynolds operator
    138140                                       // is dependent on the characteristic of
     
    320322
    321323proc molien (list #)
    322 USAGE:   molien(G1,G2,...[,ringname,lcm,flags]);
     324"USAGE:   molien(G1,G2,...[,ringname,lcm,flags]);
    323325         G1,G2,...: nxn <matrices> generating a finite matrix group, ringname:
    324326         a <string> giving a name for a new ring of characteristic 0 for the
     
    350352         enumerator and denominator of the expanded version where common factors
    351353         have been canceled.
     354"
    352355{ def br=basering;                     // the Molien series depends on the
    353356  int ch=char(br);                     // characteristic of the coefficient
     
    858861
    859862proc reynolds_molien (list #)
    860 USAGE:   reynolds_molien(G1,G2,...[,ringname,flags]);
     863"USAGE:   reynolds_molien(G1,G2,...[,ringname,flags]);
    861864         G1,G2,...: nxn <matrices> generating a finite matrix group, ringname:
    862865         a <string> giving a name for a new ring of characteristic 0 for the
     
    894897         modular case). The returned matrix gives enumerator and denominator of
    895898         the expanded version where common factors have been canceled.
     899"
    896900{ def br=basering;                     // the Molien series depends on the
    897901  int ch=char(br);                     // characteristic of the coefficient
     
    14031407
    14041408proc partial_molien (matrix M, int n, list #)
    1405 USAGE:   partial_molien(M,n[,p]);
     1409"USAGE:   partial_molien(M,n[,p]);
    14061410         M: a 1x2 <matrix>, n: an <int> indicating  number of terms in the
    14071411         expansion, p: an optional <poly>
     
    14211425            (a1-b1)x+b1(a1-b1)x^2+...
    14221426EXAMPLE: example partial_molien; shows an example
     1427"
    14231428{ poly A(2);                           // A(2) will contain the return value of
    14241429                                       // the intermediate result
     
    14891494
    14901495proc evaluate_reynolds (matrix REY, ideal I)
    1491 USAGE:   evaluate_reynolds(REY,I);
     1496"USAGE:   evaluate_reynolds(REY,I);
    14921497         REY: a <matrix> representing the Reynolds operator, I: an arbitrary
    14931498         <ideal>
     
    15001505THEORY:  REY has been constructed in such a way that each row serves as a ring
    15011506         mapping of which the Reynolds operator is made up.
     1507"
    15021508{ def br=basering;
    15031509  int n=nvars(br);
     
    15371543
    15381544proc invariant_basis (int g,list #)
    1539 USAGE:   invariant_basis(g,G1,G2,...);
     1545"USAGE:   invariant_basis(g,G1,G2,...);
    15401546         g: an <int> indicating of which degree (>0) the homogeneous basis
    15411547         shoud be, G1,G2,...: <matrices> generating a finite matrix group
     
    15461552         system of linear equations is created. It is solved by computing
    15471553         syzygies.
     1554"
    15481555{ if (g<=0)
    15491556  { "ERROR:   the first parameter should be > 0";
     
    16261633
    16271634proc invariant_basis_reynolds (matrix REY,int d,list #)
    1628 USAGE:   invariant_basis_reynolds(REY,d[,flags]);
     1635"USAGE:   invariant_basis_reynolds(REY,d[,flags]);
    16291636         REY: a <matrix> representing the Reynolds operator, d: an <int>
    16301637         indicating of which degree (>0) the homogeneous basis shoud be, flags:
     
    16431650         operator. A linearly independent set is generated with the help of
    16441651         minbase.
     1652"
    16451653{
    16461654 //---------------------- checking that the input is ok -----------------------
     
    20252033
    20262034proc primary_char0 (matrix REY,matrix M,list #)
    2027 USAGE:   primary_char0(REY,M[,v]);
     2035"USAGE:   primary_char0(REY,M[,v]);
    20282036         REY: a <matrix> representing the Reynolds operator, M: a 1x2 <matrix>
    20292037         representing the Molien series, v: an optional <int>
     
    20362044THEORY:  Bases of homogeneous invariants are generated successively and those
    20372045         are chosen as primary invariants that lower the dimension of the ideal
    2038          generated by the previously found invariants (see paper "Generating a
    2039          Noetherian Normalization of the Invariant Ring of a Finite Group" by
     2046         generated by the previously found invariants (see paper \"Generating a
     2047         Noetherian Normalization of the Invariant Ring of a Finite Group\" by
    20402048         Decker, Heydtmann, Schreyer (1997) to appear in JSC).
     2049"
    20412050{ degBound=0;
    20422051  if (char(basering)<>0)
     
    21652174
    21662175proc primary_charp (matrix REY,string ring_name,list #)
    2167 USAGE:   primary_charp(REY,ringname[,v]);
     2176"USAGE:   primary_charp(REY,ringname[,v]);
    21682177         REY: a <matrix> representing the Reynolds operator, ringname: a
    21692178         <string> giving the name of a ring where the Molien series is stored,
     
    21782187THEORY:  Bases of homogeneous invariants are generated successively and those
    21792188         are chosen as primary invariants that lower the dimension of the ideal
    2180          generated by the previously found invariants (see paper "Generating a
    2181          Noetherian Normalization of the Invariant Ring of a Finite Group" by
     2189         generated by the previously found invariants (see paper \"Generating a
     2190         Noetherian Normalization of the Invariant Ring of a Finite Group\" by
    21822191         Decker, Heydtmann, Schreyer (1997) to appear in JSC).
     2192"
    21832193{ degBound=0;
    21842194// ---------------- checking input and setting verbose mode -------------------
     
    23172327
    23182328proc primary_char0_no_molien (matrix REY, list #)
    2319 USAGE:   primary_char0_no_molien(REY[,v]);
     2329"USAGE:   primary_char0_no_molien(REY[,v]);
    23202330         REY: a <matrix> representing the Reynolds operator, v: an optional
    23212331         <int>
     
    23292339THEORY:  Bases of homogeneous invariants are generated successively and those
    23302340         are chosen as primary invariants that lower the dimension of the ideal
    2331          generated by the previously found invariants (see paper "Generating a
    2332          Noetherian Normalization of the Invariant Ring of a Finite Group" by
     2341         generated by the previously found invariants (see paper \"Generating a
     2342         Noetherian Normalization of the Invariant Ring of a Finite Group\" by
    23332343         Decker, Heydtmann, Schreyer (1997) to appear in JSC).
     2344"
    23342345{ degBound=0;
    23352346 //-------------- checking input and setting verbose mode ---------------------
     
    24592470
    24602471proc primary_charp_no_molien (matrix REY, list #)
    2461 USAGE:   primary_charp_no_molien(REY[,v]);
     2472"USAGE:   primary_charp_no_molien(REY[,v]);
    24622473         REY: a <matrix> representing the Reynolds operator, v: an optional
    24632474         <int>
     
    24712482THEORY:  Bases of homogeneous invariants are generated successively and those
    24722483         are chosen as primary invariants that lower the dimension of the ideal
    2473          generated by the previously found invariants (see paper "Generating a
    2474          Noetherian Normalization of the Invariant Ring of a Finite Group" by
     2484         generated by the previously found invariants (see paper \"Generating a
     2485         Noetherian Normalization of the Invariant Ring of a Finite Group\" by
    24752486         Decker, Heydtmann, Schreyer (1997) to appear in JSC).
     2487"
    24762488{ degBound=0;
    24772489 //----------------- checking input and setting verbose mode ------------------
     
    26032615
    26042616proc primary_charp_without (list #)
    2605 USAGE:   primary_charp_without(G1,G2,...[,v]);
     2617"USAGE:   primary_charp_without(G1,G2,...[,v]);
    26062618         G1,G2,...: <matrices> generating a finite matrix group, v: an optional
    26072619         <int>
     
    26122624THEORY:  Bases of homogeneous invariants are generated successively and those
    26132625         are chosen as primary invariants that lower the dimension of the ideal
    2614          generated by the previously found invariants (see paper "Generating a
    2615          Noetherian Normalization of the Invariant Ring of a Finite Group" by
     2626         generated by the previously found invariants (see paper \"Generating a
     2627         Noetherian Normalization of the Invariant Ring of a Finite Group\" by
    26162628         Decker, Heydtmann, Schreyer (1997) to appear in JSC). No Reynolds
    26172629         operator or Molien series is used.
     2630"
    26182631{ degBound=0;
    26192632 //--------------------- checking input and setting verbose mode --------------
     
    27412754
    27422755proc primary_invariants (list #)
    2743 USAGE:   primary_invariants(G1,G2,...[,flags]);
     2756"USAGE:   primary_invariants(G1,G2,...[,flags]);
    27442757         G1,G2,...: <matrices> generating a finite matrix group, flags: an
    27452758         optional <intvec> with three entries, if the first one equals 0 (also
     
    27672780THEORY:  Bases of homogeneous invariants are generated successively and those
    27682781         are chosen as primary invariants that lower the dimension of the ideal
    2769          generated by the previously found invariants (see paper "Generating a
    2770          Noetherian Normalization of the Invariant Ring of a Finite Group" by
     2782         generated by the previously found invariants (see paper \"Generating a
     2783         Noetherian Normalization of the Invariant Ring of a Finite Group\" by
    27712784         Decker, Heydtmann, Schreyer (1997) to appear in JSC).
     2785"
    27722786{
    27732787 // ----------------- checking input and setting flags ------------------------
     
    31493163
    31503164proc primary_char0_random (matrix REY,matrix M,int max,list #)
    3151 USAGE:   primary_char0_random(REY,M,r[,v]);
     3165"USAGE:   primary_char0_random(REY,M,r[,v]);
    31523166         REY: a <matrix> representing the Reynolds operator, M: a 1x2 <matrix>
    31533167         representing the Molien series, r: an <int> where -|r| to |r| is the
     
    31633177         linear combinations are chosen as primary invariants that lower the
    31643178         dimension of the ideal generated by the previously found invariants
    3165          (see paper "Generating a Noetherian Normalization of the Invariant Ring
    3166          of a Finite Group" by Decker, Heydtmann, Schreyer (1997) to appear in
     3179         (see paper \"Generating a Noetherian Normalization of the Invariant Ring
     3180         of a Finite Group\" by Decker, Heydtmann, Schreyer (1997) to appear in
    31673181         JSC).
     3182"
    31683183{ degBound=0;
    31693184  if (char(basering)<>0)
     
    32953310
    32963311proc primary_charp_random (matrix REY,string ring_name,int max,list #)
    3297 USAGE:   primary_charp_random(REY,ringname,r[,v]);
     3312"USAGE:   primary_charp_random(REY,ringname,r[,v]);
    32983313         REY: a <matrix> representing the Reynolds operator, ringname: a
    32993314         <string> giving the name of a ring where the Molien series is stored,
     
    33103325         linear combinations are chosen as primary invariants that lower the
    33113326         dimension of the ideal generated by the previously found invariants
    3312          (see paper "Generating a Noetherian Normalization of the Invariant Ring
    3313          of a Finite Group" by Decker, Heydtmann, Schreyer (1997) to appear in
     3327         (see paper \"Generating a Noetherian Normalization of the Invariant Ring
     3328         of a Finite Group\" by Decker, Heydtmann, Schreyer (1997) to appear in
    33143329         JSC).
     3330"
    33153331{ degBound=0;
    33163332 // ---------------- checking input and setting verbose mode ------------------
     
    34523468
    34533469proc primary_char0_no_molien_random (matrix REY, int max, list #)
    3454 USAGE:   primary_char0_no_molien_random(REY,r[,v]);
     3470"USAGE:   primary_char0_no_molien_random(REY,r[,v]);
    34553471         REY: a <matrix> representing the Reynolds operator, r: an <int> where
    34563472         -|r| to |r| is the range of coefficients of the random combinations of
     
    34663482         linear combinations are chosen as primary invariants that lower the
    34673483         dimension of the ideal generated by the previously found invariants
    3468          (see paper "Generating a Noetherian Normalization of the Invariant Ring
    3469          of a Finite Group" by Decker, Heydtmann, Schreyer (1997) to appear in
     3484         (see paper \"Generating a Noetherian Normalization of the Invariant Ring
     3485         of a Finite Group\" by Decker, Heydtmann, Schreyer (1997) to appear in
    34703486         JSC).
     3487"
    34713488{ degBound=0;
    34723489 //-------------- checking input and setting verbose mode ---------------------
     
    35993616
    36003617proc primary_charp_no_molien_random (matrix REY, int max, list #)
    3601 USAGE:   primary_charp_no_molien_random(REY,r[,v]);
     3618"USAGE:   primary_charp_no_molien_random(REY,r[,v]);
    36023619         REY: a <matrix> representing the Reynolds operator, r: an <int> where
    36033620         -|r| to |r| is the range of coefficients of the random combinations of
     
    36133630         linear combinations are chosen as primary invariants that lower the
    36143631         dimension of the ideal generated by the previously found invariants
    3615          (see paper "Generating a Noetherian Normalization of the Invariant Ring
    3616          of a Finite Group" by Decker, Heydtmann, Schreyer (1997) to appear in
     3632         (see paper \"Generating a Noetherian Normalization of the Invariant Ring
     3633         of a Finite Group\" by Decker, Heydtmann, Schreyer (1997) to appear in
    36173634         JSC).
     3635"
    36183636{ degBound=0;
    36193637 //----------------- checking input and setting verbose mode ------------------
     
    37473765
    37483766proc primary_charp_without_random (list #)
    3749 USAGE:   primary_charp_without_random(G1,G2,...,r[,v]);
     3767"USAGE:   primary_charp_without_random(G1,G2,...,r[,v]);
    37503768         G1,G2,...: <matrices> generating a finite matrix group, r: an <int>
    37513769         where -|r| to |r| is the range of coefficients of the random
     
    37583776         linear combinations are chosen as primary invariants that lower the
    37593777         dimension of the ideal generated by the previously found invariants
    3760          (see paper "Generating a Noetherian Normalization of the Invariant Ring
    3761          of a Finite Group" by Decker, Heydtmann, Schreyer (1997) to appear in
     3778         (see paper \"Generating a Noetherian Normalization of the Invariant Ring
     3779         of a Finite Group\" by Decker, Heydtmann, Schreyer (1997) to appear in
    37623780         JSC). No Reynolds operator or Molien series is used.
     3781"
    37633782{ degBound=0;
    37643783 //--------------------- checking input and setting verbose mode --------------
     
    38963915
    38973916proc primary_invariants_random (list #)
    3898 USAGE:   primary_invariants_random(G1,G2,...,r[,flags]);
     3917"USAGE:   primary_invariants_random(G1,G2,...,r[,flags]);
    38993918         G1,G2,...: <matrices> generating a finite matrix group, r: an <int>
    39003919         where -|r| to |r| is the range of coefficients of the random
     
    39253944         linear combinations are chosen as primary invariants that lower the
    39263945         dimension of the ideal generated by the previously found invariants
    3927          (see paper "Generating a Noetherian Normalization of the Invariant Ring
    3928          of a Finite Group" by Decker, Heydtmann, Schreyer (1997) to appear in
     3946         (see paper \"Generating a Noetherian Normalization of the Invariant Ring
     3947         of a Finite Group\" by Decker, Heydtmann, Schreyer (1997) to appear in
    39293948         JSC).
     3949"
    39303950{
    39313951 // ----------------- checking input and setting flags ------------------------
     
    41104130
    41114131proc power_products(intvec deg_vec,int d)
    4112 USAGE:   power_products(dv,d);
     4132"USAGE:   power_products(dv,d);
    41134133         dv: an <intvec> giving the degrees of homogeneous polynomials, d: the
    41144134         degree of the desired power products
     
    41174137         of the powers is then homogeneous of degree d.
    41184138EXAMPLE: example power_products; gives an example
     4139"
    41194140{ ring R=0,x,dp;
    41204141  if (d<=0)
     
    41664187
    41674188proc secondary_char0 (matrix P, matrix REY, matrix M, list #)
    4168 USAGE:   secondary_char0(P,REY,M[,v]);
     4189"USAGE:   secondary_char0(P,REY,M[,v]);
    41694190         P: a 1xn <matrix> with primary invariants, REY: a gxn <matrix>
    41704191         representing the Reynolds operator, M: a 1x2 <matrix> giving enumerator
     
    41834204         to invariants with the Reynolds operator and using these images or
    41844205         their power products such that they are linearly independent modulo the
    4185          primary invariants (see paper "Some Algorithms in Invariant Theory of
    4186          Finite Groups" by Kemper and Steel (1997)).
     4206         primary invariants (see paper \"Some Algorithms in Invariant Theory of
     4207         Finite Groups\" by Kemper and Steel (1997)).
     4208"
    41874209{ def br=basering;
    41884210  degBound=0;
     
    43734395
    43744396proc secondary_charp (matrix P, matrix REY, string ring_name, list #)
    4375 USAGE:   secondary_charp(P,REY,ringname[,v]);
     4397"USAGE:   secondary_charp(P,REY,ringname[,v]);
    43764398         P: a 1xn <matrix> with primary invariants, REY: a gxn <matrix>
    43774399         representing the Reynolds operator, ringname: a <string> giving the
     
    43914413         to invariants with the Reynolds operator and using these images or
    43924414         their power products such that they are linearly independent modulo the
    4393          primary invariants (see paper "Some Algorithms in Invariant Theory of
    4394          Finite Groups" by Kemper and Steel (1997)).
     4415         primary invariants (see paper \"Some Algorithms in Invariant Theory of
     4416         Finite Groups\" by Kemper and Steel (1997)).
     4417"
    43954418{ def br=basering;
    43964419  degBound=0;
     
    45964619
    45974620proc secondary_no_molien (matrix P, matrix REY, list #)
    4598 USAGE:   secondary_no_molien(P,REY[,deg_vec,v]);
     4621"USAGE:   secondary_no_molien(P,REY[,deg_vec,v]);
    45994622         P: a 1xn <matrix> with primary invariants, REY: a gxn <matrix>
    46004623         representing the Reynolds operator, deg_vec: an optional <intvec>
     
    46134636         to invariants with the Reynolds operator and using these images as
    46144637         candidates for secondary invariants.
     4638"
    46154639{ int i;
    46164640  degBound=0;
     
    47544778
    47554779proc secondary_with_irreducible_ones_no_molien (matrix P, matrix REY, list #)
    4756 USAGE:   secondary_with_irreducible_ones_no_molien(P,REY[,v]);
     4780"USAGE:   secondary_with_irreducible_ones_no_molien(P,REY[,v]);
    47574781         P: a 1xn <matrix> with primary invariants, REY: a gxn <matrix>
    47584782         representing the Reynolds operator, v: an optional <int>
     
    47684792         to invariants with the Reynolds operator and using these images or
    47694793         their power products such that they are linearly independent modulo the
    4770          primary invariants (see paper "Some Algorithms in Invariant Theory of
    4771          Finite Groups" by Kemper and Steel (1997)).
     4794         primary invariants (see paper \"Some Algorithms in Invariant Theory of
     4795         Finite Groups\" by Kemper and Steel (1997)).
     4796"
    47724797{ int i;
    47734798  degBound=0;
     
    49504975
    49514976proc secondary_not_cohen_macaulay (matrix P, list #)
    4952 USAGE:   secondary_not_cohen_macaulay(P,G1,G2,...[,v]);
     4977"USAGE:   secondary_not_cohen_macaulay(P,G1,G2,...[,v]);
    49534978         P: a 1xn <matrix> with primary invariants, G1,G2,...: nxn <matrices>
    49544979         generating a finite matrix group, v: an optional <int>
     
    49574982DISPLAY: information if v does not equal 0
    49584983EXAMPLE: example secondary_not_cohen_macaulay; shows an example
    4959 THEORY:  The secondary invariants are generated following "Generating Invariant
    4960          Rings of Finite Groups over Arbitrary Fields" by Kemper (1996, to
     4984THEORY:  The secondary invariants are generated following \"Generating Invariant
     4985         Rings of Finite Groups over Arbitrary Fields\" by Kemper (1996, to
    49614986         appear in JSC).
     4987"
    49624988{ int i, j;
    49634989  degBound=0;
     
    51175143
    51185144proc invariant_ring (list #)
    5119 USAGE:   invariant_ring(G1,G2,...[,flags]);
     5145"USAGE:   invariant_ring(G1,G2,...[,flags]);
    51205146         G1,G2,...: <matrices> generating a finite matrix group, flags: an
    51215147         optional <intvec> with three entries: if the first one equals 0, the
     
    51435169THEORY:  Bases of homogeneous invariants are generated successively and those
    51445170         are chosen as primary invariants that lower the dimension of the ideal
    5145          generated by the previously found invariants (see paper "Generating a
    5146          Noetherian Normalization of the Invariant Ring of a Finite Group" by
     5171         generated by the previously found invariants (see paper \"Generating a
     5172         Noetherian Normalization of the Invariant Ring of a Finite Group\" by
    51475173         Decker, Heydtmann, Schreyer (1997) to appear in JSC). In the
    51485174         non-modular case secondary invariants are calculated by finding a
     
    51505176         invariants, mapping to invariants with the Reynolds operator and using
    51515177         those or their power products such that they are linearly independent
    5152          modulo the primary invariants (see paper "Some Algorithms in Invariant
    5153          Theory of Finite Groups" by Kemper and Steel (1997)). In the modular
    5154          case they are generated according to "Generating Invariant Rings of
    5155          Finite Groups over Arbitrary Fields" by Kemper (1996, to appear in
     5178         modulo the primary invariants (see paper \"Some Algorithms in Invariant
     5179         Theory of Finite Groups\" by Kemper and Steel (1997)). In the modular
     5180         case they are generated according to \"Generating Invariant Rings of
     5181         Finite Groups over Arbitrary Fields\" by Kemper (1996, to appear in
    51565182         JSC).
     5183"
    51575184{ if (size(#)==0)
    51585185  { "ERROR:   There are no generators given.";
     
    53225349
    53235350proc invariant_ring_random (list #)
    5324 USAGE:   invariant_ring_random(G1,G2,...,r[,flags]);
     5351"USAGE:   invariant_ring_random(G1,G2,...,r[,flags]);
    53255352         G1,G2,...: <matrices> generating a finite matrix group, r: an <int>
    53265353         where -|r| to |r| is the range of coefficients of random
     
    53525379         hopefully they lower the dimension of the previously found primary
    53535380         invariants by the right amount.
     5381"
    53545382{ if (size(#)<2)
    53555383  { "ERROR:   There are too few parameters.";
     
    55455573
    55465574proc algebra_containment (poly p, matrix A)
    5547 USAGE:   algebra_containment(p,A);
     5575"USAGE:   algebra_containment(p,A);
    55485576         p: arbitrary <poly>, A: a 1xm <matrix> giving generators of a
    55495577         subalgebra of the basering
     
    55585586         to a polynomial only in the y(i) <=> p is contained in the subring
    55595587         generated by the polynomials in A.
     5588"
    55605589{ degBound=0;
    55615590  if (nrows(A)==1)
     
    56015630
    56025631proc module_containment(poly p, matrix P, matrix S)
    5603 USAGE:   module_containment(p,P,S);
     5632"USAGE:   module_containment(p,P,S);
    56045633         p: arbitrary <poly>, P: a 1xn <matrix> giving generators of an algebra,
    56055634         S: a 1xt <matrix> giving generators of a module over the algebra
     
    56195648         again. p reduces to a polynomial only in the y(j) and z(i) linear in
    56205649         the z(i)) <=> p is contained in the module.
     5650"
    56215651{ def br=basering;
    56225652  degBound=0;
     
    56695699
    56705700proc orbit_variety (matrix F,string newring)
    5671 USAGE:   orbit_variety(F,s);
     5701"USAGE:   orbit_variety(F,s);
    56725702         F: a 1xm <matrix> defing an invariant ring, s: a <string> giving the
    56735703         name for a new ring
     
    56785708         calculated, then the variables of the original ring are eliminated and
    56795709         the polynomials that are left over define the orbit variety
     5710"
    56805711{ if (newring=="")
    56815712  { "ERROR:   the second parameter may not be an empty <string>";
     
    57255756
    57265757proc relative_orbit_variety(ideal I,matrix F,string newring)
    5727 USAGE:   relative_orbit_variety(I,F,s);
     5758"USAGE:   relative_orbit_variety(I,F,s);
    57285759         I: an <ideal> invariant under the action of a group, F: a 1xm
    57295760         <matrix> defining the invariant ring of this group, s: a <string>
     
    57375768         the polynomials that are left over define thecrelative orbit variety
    57385769         with respect to I.
     5770"
    57395771{ if (newring=="")
    57405772  { "ERROR:   the third parameter may not be empty a <string>";
     
    58055837
    58065838proc image_of_variety(ideal I,matrix F)
    5807 USAGE:   image_of_variety(I,F);
     5839"USAGE:   image_of_variety(I,F);
    58085840         I: an arbitray <ideal>, F: a 1xm <matrix> defining an invariant ring
    58095841         of a some matrix group
     
    58155847         invariant ring. This ideal in the original variables defines the image
    58165848         of the variety defined by I
     5849"
    58175850{ if (nrows(F)==1)
    58185851  { def br=basering;
  • Singular/LIB/general.lib

    r4996f52 rd2b2a7  
    1 // $Id: general.lib,v 1.6 1998-04-23 17:09:20 Singular Exp $
     1// $Id: general.lib,v 1.7 1998-05-05 11:55:27 krueger Exp $
    22//system("random",787422842);
    33//(GMG, last modified 22.06.96)
    44///////////////////////////////////////////////////////////////////////////////
    55
    6 version="$Id: general.lib,v 1.6 1998-04-23 17:09:20 Singular Exp $";
     6version="$Id: general.lib,v 1.7 1998-05-05 11:55:27 krueger Exp $";
    77info="
    88LIBRARY:  general.lib   PROCEDURES OF GENERAL TYPE
     
    3030
    3131proc A_Z (string s,int n)
    32 USAGE:   A_Z("a",n);  a any letter, n integer (-26<= n <=26, !=0)
     32"USAGE:   A_Z(\"a\",n);  a any letter, n integer (-26<= n <=26, !=0)
    3333RETURN:  string of n small (if a is small) or capital (if a is capital)
    3434         letters, comma seperated, beginning with a, in alphabetical
    3535         order (or revers alphabetical order if n<0)
    3636EXAMPLE: example A_Z; shows an example
     37"
    3738{
    3839  if ( n>=-26 and n<=26 and n!=0 )
     
    8586
    8687proc binomial (int n, int k, list #)
    87 USAGE:   binomial(n,k[,p/s]); n,k,p integers, s string
     88"USAGE:   binomial(n,k[,p/s]); n,k,p integers, s string
    8889RETURN:  binomial(n,k);    binomial coefficient n choose k of type int
    8990                           (machine integer, limited size! )
     
    9293                           in char of basering if a basering is defined
    9394EXAMPLE: example binomial; shows an example
     95"
    9496{
    9597   if ( size(#)==0 ) { int rr=1; }
     
    120122
    121123proc factorial (int n, list #)
    122 USAGE:   factorial(n[,string]);  n integer
     124"USAGE:   factorial(n[,string]);  n integer
    123125RETURN:  factorial(n); string of n! in char 0
    124126         factorial(n,s);  n! of type number (s any string), computed in char of
    125127         basering if a basering is defined
    126128EXAMPLE: example factorial; shows an example
     129"
    127130{
    128131   if ( size(#)==0 ) { ring R = 0,x,dp; poly r=1; }
     
    148151
    149152proc fibonacci (int n, list #)
    150 USAGE:   fibonacci(n[,string]);  (n integer)
     153"USAGE:   fibonacci(n[,string]);  (n integer)
    151154RETURN:  fibonacci(n); string of nth Fibonacci number,
    152155            f(0)=f(1)=1, f(i+1)=f(i-1)+f(i)
     
    154157         computed in characteristic of basering if a basering is defined
    155158EXAMPLE: example fibonacci; shows an example
     159"
    156160{
    157161   if ( size(#)==0 ) { ring fibo = 0,x,dp; number f=1; }
     
    177181
    178182proc kmemory ()
    179 USAGE:   kmemory();
     183"USAGE:   kmemory();
    180184RETURN:  memory used by active variables, of type int (in kilobyte)
    181185EXAMPLE: example kmemory; shows an example
     186"
    182187{
    183188  if ( voice==2 ) { "// memory used by active variables (kilobyte):"; }
     
    191196
    192197proc killall
    193 USAGE:   killall(); (no parameter)
    194          killall("type_name");
    195          killall("not", "type_name");
     198"USAGE:   killall(); (no parameter)
     199         killall(\"type_name\");
     200         killall(\"not\", \"type_name\");
    196201COMPUTE: killall(); kills all user-defined variables but not loaded procedures
    197          killall("type_name"); kills all user-defined variables, of type "type_name"
    198          killall("not", "type_name"); kills all user-defined
    199          variables, except those of type "type_name" and except loaded procedures
     202         killall(\"type_name\"); kills all user-defined variables, of type \"type_name\"
     203         killall(\"not\", \"type_name\"); kills all user-defined
     204         variables, except those of type \"type_name\" and except loaded procedures
    200205RETURN:  no return value
    201206NOTE:    killall should never be used inside a procedure
    202207EXAMPLE: example killall; shows an example AND KILLS ALL YOUR VARIABLES
     208"
    203209{
    204210   list L=names(); int joni=size(L);
     
    255261
    256262proc number_e (int n)
    257 USAGE:   number_e(n);  n integer
     263"USAGE:   number_e(n);  n integer
    258264COMPUTE: exp(1) up to n decimal digits (no rounding)
    259265         by A.H.J. Sale's algorithm
     
    262268         display its decimal format
    263269EXAMPLE: example number_e; shows an example
     270"
    264271{
    265272   int i,m,s,t;
     
    296303
    297304proc number_pi (int n)
    298 USAGE:   number_pi(n);  n positive integer
     305"USAGE:   number_pi(n);  n positive integer
    299306COMPUTE: pi (area of unit circle) up to n decimal digits (no rounding)
    300307         by algorithm of S. Rabinowitz
     
    303310         its decimal format
    304311EXAMPLE: example number_pi; shows an example
     312"
    305313{
    306314   int i,m,t,e,q,N;
     
    366374
    367375proc primes (int n, int m)
    368 USAGE:   primes(n,m);  n,m integers
     376"USAGE:   primes(n,m);  n,m integers
    369377RETURN:  intvec, consisting of all primes p, prime(n)<=p<=m, in increasing
    370378         order if n<=m, resp. prime(m)<=p<=n, in decreasing order if m<n
    371379NOTE:    prime(n); returns the biggest prime number <= n (if n>=2, else 2)
    372380EXAMPLE: example primes; shows an example
     381"
    373382{  int change;
    374383   if ( n>m ) { change=n; n=m ; m=change; change=1; }
     
    386395
    387396proc product (id, list #)
    388 USAGE:    product(id[,v]); id=ideal/vector/module/matrix
     397"USAGE:    product(id[,v]); id=ideal/vector/module/matrix
    389398          resp.id=intvec/intmat, v=intvec (e.g. v=1..n, n=integer)
    390399RETURN:   poly resp. int which is the product of all entries of id, with index
     
    393402          identified with corresponding matrix M (columns of M generate m)
    394403EXAMPLE:  example product; shows an example
     404"
    395405{
    396406   int n,j;
     
    431441
    432442proc ringweights (r)
    433 USAGE:   ringweights(r); r ring
     443"USAGE:   ringweights(r); r ring
    434444RETURN:  intvec of weights of ring variables. If, say, x(1),...,x(n) are the
    435445         variables of the ring r, in this order, the resulting intvec is
     
    439449         the resulting intvec is 1,...,1
    440450EXAMPLE: example ringweights; shows an example
     451"
    441452{
    442453   int i; intvec v; setring r;
     
    456467
    457468proc sort (id, list #)
    458 USAGE:   sort(id[v,o,n]); id=ideal/module/intvec/list (of intvec's or int's)
     469"USAGE:   sort(id[v,o,n]); id=ideal/module/intvec/list (of intvec's or int's)
    459470         sort may be called with 1, 2 or 3 arguments in the following way:
    460471         -  sort(id[v,n]); v=intvec, n=integer,
     
    488499         Zero generators of ideal/module are deleted
    489500EXAMPLE: example sort; shows an example
     501"
    490502{
    491503   int ii,jj,s,n = 0,0,1,0;
     
    580592
    581593proc sum (id, list #)
    582 USAGE:    sum(id[,v]); id=ideal/vector/module/matrix resp. id=intvec/intmat,
     594"USAGE:    sum(id[,v]); id=ideal/vector/module/matrix resp. id=intvec/intmat,
    583595                       v=intvec (e.g. v=1..n, n=integer)
    584596RETURN:   poly resp. int which is the sum of all entries of id, with index
     
    587599          identified with corresponding matrix M (columns of M generate m)
    588600EXAMPLE:  example sum; shows an example
     601"
    589602{
    590603   if( typeof(id)=="poly" or typeof(id)=="ideal" or typeof(id)=="vector"
     
    625638
    626639proc which (command)
    627 USAGE:    which(command); command = string expression
     640"USAGE:    which(command); command = string expression
    628641RETURN:   Absolute pathname of command, if found in search path.
    629642          Empty string, otherwise.
    630643NOTE:     Based on the Unix command 'which'.
    631644EXAMPLE:  example which; shows an example
     645"
    632646{
    633647   int rs;
  • Singular/LIB/hnoether.lib

    r4996f52 rd2b2a7  
    1 // $Id: hnoether.lib,v 1.5 1998-04-23 13:23:23 obachman Exp $
     1// $Id: hnoether.lib,v 1.6 1998-05-05 11:55:27 krueger Exp $
    22// author:  Martin Lamm,  email: lamm@mathematik.uni-kl.de
    33// last change:           26.03.98
    44///////////////////////////////////////////////////////////////////////////////
    55
    6 version="$Id: hnoether.lib,v 1.5 1998-04-23 13:23:23 obachman Exp $";
     6version="$Id: hnoether.lib,v 1.6 1998-05-05 11:55:27 krueger Exp $";
    77info="
    88LIBRARY:  hnoether.lib   PROCEDURES FOR THE HAMBURGER-NOETHER-DEVELOPMENT
     
    5454
    5555proc getnm (poly f)
    56 USAGE:   getnm(f); f polynomial in x,y
     56"USAGE:   getnm(f); f polynomial in x,y
    5757ASSUME:  basering = ...,(x,y),ls;  or ds
    5858RETURN:  intvec(n,m) : (0,n) is the intersection point of the Newton
     
    6161         m=-1 if this point doesn't exist
    6262EXAMPLE: example getnm; shows an example
     63"
    6364{
    6465 // wir gehen davon aus, dass die Prozedur von develop aufgerufen wurde, also
     
    7576
    7677proc leit (poly f, int n, int m)
    77 // leit(poly f, int n, int m) returns all monomials on the line
     78"// leit(poly f, int n, int m) returns all monomials on the line
    7879// from (0,n) to (m,0) in the Newton diagram
     80"
    7981{
    8082 return(jet(f,m*n,intvec(n,m))-jet(f,m*n-1,intvec(n,m)))
     
    8284///////////////////////////////////////////////////////////////////////////////
    8385proc testreducible (poly f, int n, int m)
    84 // testreducible(poly f,int n,int m) returns true if there are points in the
     86"// testreducible(poly f,int n,int m) returns true if there are points in the
    8587// Newton diagram below the line (0,n)-(m,0)
     88"
    8689{
    8790 return(size(jet(f,m*n-1,intvec(n,m))) != 0)
     
    8992///////////////////////////////////////////////////////////////////////////////
    9093proc T_Transform (poly f, int Q, int N)
    91 // returns f(y,xy^Q)/y^NQ
     94"// returns f(y,xy^Q)/y^NQ
     95"
    9296{
    9397 map T = basering,y,x*y^Q;
     
    96100///////////////////////////////////////////////////////////////////////////////
    97101proc T1_Transform (poly f, number d, int M)
    98 // returns f(x,y+d*x^M)
     102"// returns f(x,y+d*x^M)
     103"
    99104{
    100105 map T1 = basering,x,y+d*x^M;
     
    104109
    105110proc T2_Transform (poly f, number d, int M, int N)
    106 USAGE: T2_Transform(f,d,M,N); f poly, d number; M,N int
     111"USAGE: T2_Transform(f,d,M,N); f poly, d number; M,N int
    107112RETURN: list: poly T2(f,d',M,N), number d' in \{ d, 1/d \}
     113"
    108114{
    109115 //---------------------- compute gcd and extgcd of N,M -----------------------
     
    145151
    146152proc koeff (poly f, int I, int J)
    147 USAGE:  koeff(f,I,J); f polynomial in x and y, I,J integers
     153"USAGE:  koeff(f,I,J); f polynomial in x and y, I,J integers
    148154RETURN: if f = sum(a(i,j)*x^i*y^j), then koeff(f,I,J)= a(I,J) (of type number)
    149155EXAMPLE: example koeff;  shows an example
    150 {
     156"{
    151157  matrix mat = coeffs(coeffs(f,y)[J+1,1],x);
    152158  if (size(mat) <= I) { return(0);}
     
    161167
    162168proc squarefree (poly f)
    163 USAGE:  squarefree(f); f poly in x and y
     169"USAGE:  squarefree(f); f poly in x and y
    164170RETURN: a squarefree divisor of f
    165171        Normally the return value is a greatest squarefree divisor, but there
     
    167173        are lost.
    168174EXAMPLE: example squarefree; shows some examples.
    169 {
     175"{
    170176 // es gibt noch ein Problem: syz gibt manchmal in Koerpererweiterung (p,a)
    171177 // nicht f/g zurueck, obwohl die Division aufgeht ... In dem Fall ist die
     
    261267
    262268proc allsquarefree (poly f, poly l)
    263 USAGE : allsquarefree(f,l);  poly f,l
     269"USAGE : allsquarefree(f,l);  poly f,l
    264270        l is the squarefree divisor of f you get by l=squarefree(f);
    265271RETURN: the squarefree divisor of f consisting of all irreducible factors of f
     
    270276         at the moment: it can return nonsense, if the basering has parameters)
    271277EXAMPLE: example allsquarefree;  shows an example
    272 {
     278"{
    273279 //---------- eliminiere bereits mit squarefree gefundene Faktoren ------------
    274280 poly g=l;                            // g = gcd(f,l);
     
    303309
    304310proc polytest(poly f)
    305 USAGE : polytest(f); f poly in x and y
     311"USAGE : polytest(f); f poly in x and y
    306312RETURN: a monomial of f with |coefficient| > 16001
    307313          or exponent divisible by 32003, if there is one
     
    310316NOTE:   this procedure is only useful in characteristic zero, because otherwise
    311317        there is no appropriate ordering of the leading coefficients
    312 {
     318"{
    313319 poly verbrecher=0;
    314320 intvec leitexp;
     
    327333
    328334proc develop
    329 USAGE:   develop(f [,n]); f polynomial in two variables, n integer
     335"USAGE:   develop(f [,n]); f polynomial in two variables, n integer
    330336ASSUME:  f irreducible as a power series (for reducible f use reddevelop)
    331337RETURN:  Hamburger-Noether development of f, in form of a list:
     
    360366
    361367         For time critical computations it is recommended to use
    362          "ring ...,(x,y),ls" as basering - it increases the algorithm's speed.
     368         \"ring ...,(x,y),ls\" as basering - it increases the algorithm's speed.
    363369
    364370EXAMPLES: example develop; shows an example
    365371          example param;   shows an example for using the 2nd parameter
    366 {
     372"{
    367373 //--------- Abfangen unzulaessiger Ringe: 1) nur eine Unbestimmte ------------
    368374 poly f=#[1];
     
    729735
    730736proc param
    731 USAGE:  param(l) takes the output of develop(f)
     737"USAGE:  param(l) takes the output of develop(f)
    732738        (list l (matrix m, intvec v, int s[,poly g]))
    733739        and gives a parametrisation for f; the first variable of the active
     
    741747         example develop;   shows another example
    742748
    743 {
     749"{
    744750 //-------------------------- Initialisierungen -------------------------------
    745751 matrix m=#[1];
     
    838844
    839845proc invariants
    840 USAGE:  invariants(l) takes the output of develop(f)
     846"USAGE:  invariants(l) takes the output of develop(f)
    841847        (list l (matrix m, intvec v, int s[,poly g]))
    842848        and computes some invariants:
     
    848854         an empty list, if an error occurred in the procedure develop
    849855EXAMPLE: example invariants; shows an example
    850 {
     856"{
    851857 //-------------------------- Initialisierungen -------------------------------
    852858 matrix m=#[1];
     
    930936
    931937proc displayInvariants
    932 USAGE:   displayInvariants(l); takes the output both of
     938"USAGE:   displayInvariants(l); takes the output both of
    933939         develop(f) and reddevelop(f)
    934940          ( list l (matrix m, intvec v, int s[,poly g])
     
    938944RETURN:  nothing
    939945EXAMPLE: example displayInvariants;  shows an example
    940 {
     946"{
    941947 int i,j,k,mul;
    942948 string Ausgabe;
     
    10151021
    10161022proc multiplicities
    1017 USAGE:   multiplicities(l) takes the output of develop(f)
     1023"USAGE:   multiplicities(l) takes the output of develop(f)
    10181024         (list l (matrix m, intvec v, int s[,poly g]))
    10191025RETURN:  intvec of the different multiplicities that occur during the succes-
    10201026         sive blowing up of the curve corresponding to f
    10211027EXAMPLE: example multiplicities;  shows an example
    1022 {
     1028"{
    10231029 matrix m=#[1];
    10241030 intvec v=#[2];
     
    10541060
    10551061proc puiseux2generators (intvec m, intvec n)
    1056 USAGE:   puiseux2generators (m,n);
     1062"USAGE:   puiseux2generators (m,n);
    10571063         m,n intvecs with 1st resp. 2nd components of puiseux pairs
    10581064RETURN:  intvec of the generators of the semigroup of values
    10591065EXAMPLE: example puiseux2generators;  shows an example
    1060 {
     1066"{
    10611067 intvec beta;
    10621068 int q=1;
     
    10811087
    10821088proc generators
    1083 USAGE:   generators(l); takes the output of develop(f)
     1089"USAGE:   generators(l); takes the output of develop(f)
    10841090         (list l (matrix m, intvec v, int s[,poly g]))
    10851091RETURN:  intvec of the generators of the semigroup of values
    10861092EXAMPLE: example generators;  shows an example
     1093"
    10871094{
    10881095 list inv=invariants(#);
     
    11001107
    11011108proc intersection (list hn1, list hn2)
    1102 USAGE:   intersection(hne1,hne2);
     1109"USAGE:   intersection(hne1,hne2);
    11031110         hne1,hne2 two lists representing a HNE (normally two entries out of
    11041111         the output of reddevelop), i.e. list(matrix,intvec,int[,poly])
     
    11061113         (of type int)
    11071114EXAMPLE: example intersection;  shows an example
     1115"
    11081116{
    11091117 //------------------ `intersect' ist schon reserviert ... --------------------
     
    12161224
    12171225proc displayHNE(list ldev,list #)
    1218 USAGE:   displayHNE(ldev,[,n]); ldev=list
     1226"USAGE:   displayHNE(ldev,[,n]); ldev=list
    12191227         (output list of develop(f) or reddevelop(f)), n=int
    12201228RETURN:  - if only one argument is given, no return value, but
     
    12391247     The optional parameter is then ignored.
    12401248EXAMPLE: example displayHNE; shows an example
     1249"
    12411250{
    12421251 if ((typeof(ldev[1])=="list") || (typeof(ldev[1])=="none")) {
     
    13131322
    13141323proc newtonhoehne (poly f)
    1315 USAGE:   newtonhoehne(f);   f poly
     1324"USAGE:   newtonhoehne(f);   f poly
    13161325ASSUME:  basering = ...,(x,y),ds  or ls
    13171326RETURN:  list of intvec(x,y) of coordinates of the newtonpolygon of f
    13181327NOTE:    This proc is only available in versions of Singular that know the
    1319          command  system("newton",f);  f poly
     1328         command  system(\"newton\",f);  f poly
     1329"
    13201330{
    13211331 intvec nm = getnm(f);
     
    13291339
    13301340proc newtonpoly (poly f)
    1331 USAGE:   newtonpoly(f);   f poly
     1341"USAGE:   newtonpoly(f);   f poly
    13321342RETURN:  list of intvec(x,y) of coordinates of the newtonpolygon of f
    13331343NOTE: There are many assumptions: (to improve speed)
     
    13351345      - f(x,0) != 0 != f(0,y), f(0,0) = 0
    13361346EXAMPLE: example newtonpoly;  shows an example
     1347"
    13371348{
    13381349 intvec A=(0,ord(subst(f,x,0)));
     
    13911402
    13921403proc charPoly(poly f, int M, int N)
    1393 USAGE:  charPoly(f,M,N);  f poly in x,y,  M,N int: length and height
     1404"USAGE:  charPoly(f,M,N);  f poly in x,y,  M,N int: length and height
    13941405                          of newtonpolygon of f, which has to be only one line
    13951406RETURN:  the characteristic polynomial of f
    13961407EXAMPLE: example charPoly;  shows an example
     1408"
    13971409{
    13981410 poly charp;
     
    14121424
    14131425proc find_in_list(list L,int p)
    1414 USAGE:  find_in_list(L,p); L: list of intvec(x,y)
     1426"USAGE:  find_in_list(L,p); L: list of intvec(x,y)
    14151427        (sorted in y: L[1][2]>=L[2][2]), int p >= 0
    14161428RETURN: int i: L[i][2]=p if existent; otherwise i with L[i][2]<p if existent;
    14171429        otherwise i = size(L)+1;
     1430"
    14181431{
    14191432 int i;
     
    14241437///////////////////////////////////////////////////////////////////////////////
    14251438proc set_list
    1426 USAGE: set_list(L,v,l); L list, v intvec, l element of L (arbitrary type)
     1439"USAGE: set_list(L,v,l); L list, v intvec, l element of L (arbitrary type)
    14271440RETURN: L with L[v[1]][v[2]][...][v[n]] set to l
    14281441WARNING: Make sure there is no conflict of types!
     
    14321445                         L[a][b][c]=q;
    14331446         (but the last command will only produce an error message)
     1447"
    14341448{
    14351449 list L=#[1];
     
    14511465///////////////////////////////////////////////////////////////////////////////
    14521466proc get_last_divisor(int M, int N)
    1453 USAGE:   get_last_divisor(M,N); int M,N
     1467"USAGE:   get_last_divisor(M,N); int M,N
    14541468RETURN:  int Q: M=q1*N+r1, N=q2*r1+r2, ..., ri=Q*r(i+1) (Euclidean alg.)
    14551469EXAMPLE: example get_last_divisor; shows an example
     1470"
    14561471{
    14571472 int R=M%N; int Q=M / N;
     
    14661481///////////////////////////////////////////////////////////////////////////////
    14671482proc redleit (poly f,intvec S, intvec E)
    1468 USAGE:   redleit(f,S,E); f poly,
     1483"USAGE:   redleit(f,S,E); f poly,
    14691484         S,E intvec(x,y): two different points on a line in the newtonpolygon
    14701485         of f (e.g. the starting and the ending point)
     
    14721487NOTE:    It is not checked whether S and E really belong to the newtonpolygon!
    14731488EXAMPLE: example redleit;  shows an example
     1489"
    14741490{
    14751491 if (E[1]<S[1]) { intvec H=E; E=S; S=H; } // S,E verkehrt herum eingegeben
     
    14851501
    14861502proc extdevelop (list l, int Exaktheit)
    1487 USAGE:   extdevelop(l,n);  list l (matrix m, intvec v, int s, poly g), int n
     1503"USAGE:   extdevelop(l,n);  list l (matrix m, intvec v, int s, poly g), int n
    14881504         takes the output l of develop(f) ( or extdevelop(L,n),
    14891505         or one entry of the output of reddevelop(f))  and
     
    14961512         Type  help develop;  for more details
    14971513EXAMPLE: example extdevelop;  shows an example
     1514"
    14981515{
    14991516 //------------ Initialisierungen und Abfangen unzulaessiger Aufrufe ----------
     
    16431660
    16441661proc stripHNE (list l)
    1645 USAGE:   stripHNE(l);    takes the output both of develop(f) and reddevelop(f)
     1662"USAGE:   stripHNE(l);    takes the output both of develop(f) and reddevelop(f)
    16461663           ( list l (matrix m, intvec v, int s[,poly g])
    16471664             or list of lists in the form l            )
     
    16531670         to use extdevelop with them.
    16541671EXAMPLE: example stripHNE;  shows an example
     1672"
    16551673{
    16561674 list h;
     
    16751693
    16761694proc extractHNEs(list HNEs, int transvers)
    1677 USAGE:  extractHNEs(HNEs,transvers);  list HNEs (output from HN),
     1695"USAGE:  extractHNEs(HNEs,transvers);  list HNEs (output from HN),
    16781696        int transvers: 1 if x,y were exchanged, 0 else
    16791697RETURN: list of Hamburger-Noether-Extensions in the form of reddevelop
    16801698NOTE:   This procedure is only for internal purpose; examples don't make sense
     1699"
    16811700{
    16821701 int i,maxspalte,hspalte,hnezaehler;
     
    17101729
    17111730proc factorfirst(poly f, int M, int N)
    1712 USAGE : factorfirst(f,M,N); f poly, M,N int
     1731"USAGE : factorfirst(f,M,N); f poly, M,N int
    17131732RETURN: number d: f=c*(y^(N/e) - d*x^(M/e))^e with e=gcd(M,N), number c fitting
    17141733        0 if d does not exist
    17151734EXAMPLE: example factorfirst;  shows an example
     1735"
    17161736{
    17171737 number c = koeff(f,0,N);
     
    17591779
    17601780proc reddevelop (poly f)
    1761 USAGE:   reddevelop(f); f poly
     1781"USAGE:   reddevelop(f); f poly
    17621782RETURN:  Hamburger-Noether development of f :
    17631783         A list of lists in the form of develop(f); each entry contains the
     
    17681788         the basering to  ring HNEring=...,(x,y),ls; !
    17691789EXAMPLE: example reddevelop;  shows an example
     1790"
    17701791{
    17711792 def altring = basering;
     
    20922113}
    20932114///////////////////////////////////////////////////////////////////////////////
    2094 
     2115static
    20952116proc HN (poly f,int grenze, int Aufruf_Ebene)
    2096 NOTE: This procedure is only for internal use, it is called via reddevelop
     2117"NOTE: This procedure is only for internal use, it is called via reddevelop
     2118"
    20972119{
    20982120 //---------- Variablendefinitionen fuer den unverzweigten Teil: --------------
     
    25432565///////////////////////////////////////////////////////////////////////////////
    25442566
     2567static
    25452568proc constructHNEs (list HNEs,int hnezaehler,list aneu,list azeilen,int zeile,ideal deltais,int Q,int j)
    2546 NOTE: This procedure is only for internal use, it is called via HN
     2569"NOTE: This procedure is only for internal use, it is called via HN
     2570"
    25472571{
    25482572  int zaehler,zl;
     
    25742598
    25752599proc extrafactor (poly leitf, int M, int N)
    2576 USAGE:   factors,flag=extrafactor(f,M,N);
     2600"USAGE:   factors,flag=extrafactor(f,M,N);
    25772601         list factors, int flag,M,N, poly f in x,y
    25782602ASSUME:  basering is (0,a),(x,y),ds or ls
     
    25872611         It becomes obsolete as soon as factorize works also in such rings.
    25882612EXAMPLE: example extrafactor;  shows an example
     2613"
    25892614{
    25902615 list faktoren;
  • Singular/LIB/homolog.lib

    r4996f52 rd2b2a7  
    1 // $Id: homolog.lib,v 1.5 1998-04-03 22:47:06 krueger Exp $
     1// $Id: homolog.lib,v 1.6 1998-05-05 11:55:28 krueger Exp $
    22//(BM/GMG, last modified 22.06.96)
    33///////////////////////////////////////////////////////////////////////////////
    44
    5 version="$Id: homolog.lib,v 1.5 1998-04-03 22:47:06 krueger Exp $";
     5version="$Id: homolog.lib,v 1.6 1998-05-05 11:55:28 krueger Exp $";
    66info="
    77LIBRARY:  homolog.lib   PROCEDURES FOR HOMOLOGICAL ALGEBRA
     
    2525
    2626proc cup (module M,list #)
    27 USAGE:   cup(M,[,any,any]);  M=module
     27"USAGE:   cup(M,[,any,any]);  M=module
    2828COMPUTE: cup-product Ext^1(M',M') x Ext^1(M',M') ---> Ext^2(M',M'),
    2929         where M':=R^m/M, if M in R^m, R basering (i.e. M':=coker(matrix(M)))
     
    4343         For computing cupproduct of M itself, apply proc to syz(M)!
    4444EXAMPLE: example cup; shows examples
     45"
    4546{
    4647//---------- initialization ---------------------------------------------------
     
    207208
    208209proc cupproduct (module M,N,P,int p,q,list #)
    209 USAGE:   cupproduct(M,N,P,p,q[,any]);  M,N,P modules, p,q integers
     210"USAGE:   cupproduct(M,N,P,p,q[,any]);  M,N,P modules, p,q integers
    210211COMPUTE: cup-product Ext^p(M',N') x Ext^q(N',P') ---> Ext^p+q(M',P')
    211212         where M':=R^m/M, if M in R^m, R basering (i.e. M':=coker(matrix(M)))
     
    225226         For computing cupproduct of M,N itself, apply proc to syz(M),syz(N)!
    226227EXAMPLE: example cupproduct; shows examples
     228"
    227229{
    228230//---------- initialization ---------------------------------------------------
     
    413415
    414416proc Ext_R (intvec v, module M, list #)
    415 USAGE:   Ext_R(v,M[,p]);  v=int/intvec , M=module, p=int
     417"USAGE:   Ext_R(v,M[,p]);  v=int/intvec , M=module, p=int
    416418COMPUTE: A presentation of Ext^k(M',R); for k=v[1],v[2],..., M'=coker(M).
    417419         Let ...--> F2 --> F1 --M-> F0-->M'-->0 be a free resolution of M'. If
     
    434436         or the 2 commands: list L=mres(M,2);  Ext_R(k,L[2]);
    435437EXAMPLE: example Ext_R; shows examples
     438"
    436439{
    437440
     
    542545
    543546proc Ext (intvec v, module M, module N, list #)
    544 USAGE:   Ext(v,M,N[,any]);  v=int/intvec, M,N=modules
     547"USAGE:   Ext(v,M,N[,any]);  v=int/intvec, M,N=modules
    545548COMPUTE: A presentation of Ext^k(M',N'); for k=v[1],v[2],... where
    546549         M'=coker(M) and N'=coker(N). Let
     
    574577         or: list P=mres(M,2); list Q=mres(N,2); Ext(k,P[2],Q[2]);
    575578EXAMPLE: example Ext;   shows examples
     579"
    576580{
    577581//---------- initialisation ---------------------------------------------------
     
    703707
    704708proc Hom (module M, module N, list #)
    705 USAGE:   Hom(M,N,[any]);  M,N=modules
     709"USAGE:   Hom(M,N,[any]);  M,N=modules
    706710COMPUTE: A presentation of Hom(M',N'), M'=coker(M), N'=coker(N) as follows:
    707711         Let ...-->F1 --M-> F0-->M'-->0 and ...-->G1 --N-> G0-->N'-->0  be
     
    732736         from another proc has the same effect as decreasing printlevel by 1.
    733737EXAMPLE: example Hom;  shows examples
     738"
    734739{
    735740//---------- initialisation ---------------------------------------------------
     
    796801
    797802proc homology (matrix A,matrix B,module M,module N,list #)
    798 USAGE:   homology(A,B,M,N);
     803"USAGE:   homology(A,B,M,N);
    799804COMPUTE: Let M and N be submodules of R^m and R^n presenting M'=R^m/M, N'=R^n/N
    800805         (R=basering) and let A,B matrices inducing maps R^k--A-->R^m--B-->R^n.
     
    806811NOTE:    homology returns a free module of rank m if ker(B)=im(A)
    807812EXAMPLE: example homology; shows examples
     813"
    808814{
    809815  module ker,ima;
     
    831837
    832838proc kernel (matrix A,module M,module N)
    833 USAGE:   kernel(A,M,N);
     839"USAGE:   kernel(A,M,N);
    834840COMPUTE: Let M and N be submodules of R^m and R^n presenting M'=R^m/M, N'=R^n/N
    835841         (R=basering) and let A:R^m-->R^n a matrix inducing a map A':M'-->N'.
     
    845851RETURN:  module K, a presentation of ker(A')
    846852EXAMPLE: example kernel; shows examples
     853"
    847854{
    848855  module M1 = modulo(A,N);
     
    862869
    863870proc kohom (matrix M, int j)
    864 USAGE:   kohom(A,k); A=matrix, k=integer
     871"USAGE:   kohom(A,k); A=matrix, k=integer
    865872RETURN:  matrix Hom(R^k,A) i.e. let A be a matrix defining a map: F1 --> F2 of
    866873         free R-modules, the matrix of Hom(R^k,F1)-->Hom(R^k,F2) is computed
    867874EXAMPLE: example kohom; shows an example
     875"
    868876{
    869877  if (j==1)
     
    882890
    883891proc kontrahom (matrix M, int j)
    884 USAGE:   kontrahom(A,k); A=matrix, k=integer
     892"USAGE:   kontrahom(A,k); A=matrix, k=integer
    885893RETURN:  matrix Hom(A,R^k), i.e. let A be a matrix defining a map: F1 --> F2 of
    886894         free  R-modules, the matrix of Hom(F2,R^k)-->Hom(F1,R^k) is computed
    887895EXAMPLE: example kontrahom; shows an example
     896"
    888897{
    889898if (j==1)
  • Singular/LIB/inout.lib

    r4996f52 rd2b2a7  
    1 // $Id: inout.lib,v 1.4 1998-04-03 22:47:06 krueger Exp $
     1// $Id: inout.lib,v 1.5 1998-05-05 11:55:29 krueger Exp $
    22// system("random",787422842);
    33// (GMG/BM, last modified 22.06.96)
    44///////////////////////////////////////////////////////////////////////////////
    55
    6 version="$Id: inout.lib,v 1.4 1998-04-03 22:47:06 krueger Exp $";
     6version="$Id: inout.lib,v 1.5 1998-05-05 11:55:29 krueger Exp $";
    77info="
    88LIBRARY:  inout.lib     PROCEDURES FOR MANIPULATING IN- AND OUTPUT
     
    2424
    2525proc allprint (list #)
    26 USAGE:   allprint(L);  L list
     26"USAGE:   allprint(L);  L list
    2727CREATE:  display L[1], L[2], ... if an integer with name ALLprint is defined,
    28          makes "pause",   if ALLprint > 0
     28         makes \"pause\",   if ALLprint > 0
    2929         listvar(matrix), if ALLprint = 2
    3030RETURN:  no return value
    3131EXAMPLE: example allprint; shows an example
     32"
    3233{
    3334   if( defined(ALLprint) )
     
    5152
    5253proc dbpri (int n ,list #)
    53 USAGE:   dbpri(n,L);  n integer, L list
     54"USAGE:   dbpri(n,L);  n integer, L list
    5455CREATE:  display L[1], L[2], ... if an integer with name printlevel is defined
    5556         and if n<=printlevel, set printlevel to 0 if it is not defined
     
    5960         It is similair but not the same as the internal function dbprint
    6061EXAMPLE: example dbpri; shows an example
     62"
    6163{
    6264   int i;
     
    7779
    7880proc lprint
    79 USAGE:   lprint(id[,n]);  id poly/ideal/vector/module/matrix, n integer
     81"USAGE:   lprint(id[,n]);  id poly/ideal/vector/module/matrix, n integer
    8082RETURN:  string of id in a format fitting into lines of size n; if only one
    8183         argument is present, n = pagewidth
     
    8486         can be used as input to reproduce id
    8587EXAMPLE: example lprint; shows an example
     88"
    8689{
    8790   if (size(#)==1) { int n = pagewidth-3; }
     
    142145
    143146proc pmat (matrix m, list #)
    144 USAGE:   pmat(M,[n]);  M matrix, n integer
     147"USAGE:   pmat(M,[n]);  M matrix, n integer
    145148CREATE:  display M in array format if it fits into pagewidth, no return value;
    146149         if n is given, only the first n characters of each colum are shown
    147150RETURN:  no return value
    148151EXAMPLE: example pmat; shows an example
     152"
    149153{
    150154//------------- main case: input is a matrix, no second argument---------------
     
    212216
    213217proc rMacaulay
    214 USAGE:   rMacaulay(s[,n]);  s string, n integer
     218"USAGE:   rMacaulay(s[,n]);  s string, n integer
    215219RETURN:  a string which should be readable by Singular if s is a string read
    216220         by Singular from a file which was produced by Macaulay_1 (='Macaulay
     
    221225         from the screen, the character \ is treated differently
    222226EXAMPLE: example rMacaulay; shows an example
     227"
    223228{
    224229   int n;
     
    335340
    336341proc show (id, list #)
    337 USAGE:   show(id);   id any object of basering or of type ring/qring
     342"USAGE:   show(id);   id any object of basering or of type ring/qring
    338343         show(R,s);  R=ring, s=string (s = name of an object belonging to R)
    339344DISPLAY: display id/s in a compact format together with some information
     
    345350CAUTION: show(R,s) does not work inside a procedure
    346351EXAMPLE: example show; shows an example
     352"
    347353{
    348354//------------- use funny names in order to avoid name conflicts --------------
     
    515521
    516522proc showrecursive (id,poly p,list #)
    517 USAGE:   showrecursive(id,p[ord]); id=any object of basering, p=product of
     523"USAGE:   showrecursive(id,p[ord]); id=any object of basering, p=product of
    518524         variables and ord=string (any allowed ordstr)
    519525DISPLAY: display 'id' in a recursive format as a polynomial in the variables
    520526         occuring in p with coefficients in the remaining variables. Do this
    521527         by mapping in a ring with parameters [and ordering 'ord', if a 3rd
    522          argument is present (default: ord="dp")] and applying procedure 'show'
     528         argument is present (default: ord=\"dp\")] and applying procedure 'show'
    523529RETURN:  no return value
    524530EXAMPLE: example showrecursive; shows an example
     531"
    525532{
    526533   def P = basering;
     
    558565
    559566proc split (string s, list #)
    560 USAGE:    split(s[,n]); s string, n integer
     567"USAGE:    split(s[,n]); s string, n integer
    561568RETURN:   same string, split into lines of length n separated by \
    562569          (default: n=pagewidth)
    563570NOTE:     may be used in connection with lprint
    564571EXAMPLE:  example split; shows an example
     572"
    565573{
    566574   string line,re; int p,l;
     
    596604
    597605proc tab (int n)
    598 USAGE:   tab(n);  n integer
     606"USAGE:   tab(n);  n integer
    599607RETURN:  string of n space tabs
    600608EXAMPLE: example tab; shows an example
     609"
    601610{
    602611   if( n==0 ) { return(""); }
     
    612621
    613622proc writelist (string fil, string nam, list L)
    614 USAGE:   writelist(fil,nam,L);  fil,nam=strings (file-name, list-name), L=list
     623"USAGE:   writelist(fil,nam,L);  fil,nam=strings (file-name, list-name), L=list
    615624CREATE:  a file with name `fil`, write the content of the list L into it and
    616625         call the list `nam`.
     
    618627NOTE:    The syntax of writelist uses and is similar to the syntax of the
    619628         write command of Singular which does not manage lists properly.
    620          If, say, (fil,nam) = ("listfile","L1"),  writelist creates (resp.
     629         If, say, (fil,nam) = (\"listfile\",\"L1\"),  writelist creates (resp.
    621630         appends if listfile exists) a file with name listfile and stores
    622631         there the list L under the name L1. The Singular command
    623          execute(read("listfile")); assignes the content of L (stored in
     632         execute(read(\"listfile\")); assignes the content of L (stored in
    624633         listfile) to a list L1.
    625          On a UNIX system, overwrite an existing file if fil=">...", resp.
    626          append if fil=">>...".
     634         On a UNIX system, overwrite an existing file if fil=\">...\", resp.
     635         append if fil=\">>...\".
    627636EXAMPLE: example writelist; shows an example
     637"
    628638{
    629639   int i;
  • Singular/LIB/invar.lib

    r4996f52 rd2b2a7  
    1 // $Id: invar.lib,v 1.5 1998-04-03 22:47:07 krueger Exp $
     1// $Id: invar.lib,v 1.6 1998-05-05 11:55:30 krueger Exp $
    22///////////////////////////////////////////////////////
    33// invar.lib
     
    77//////////////////////////////////////////////////////
    88
    9 version="$Id: invar.lib,v 1.5 1998-04-03 22:47:07 krueger Exp $";
     9version="$Id: invar.lib,v 1.6 1998-05-05 11:55:30 krueger Exp $";
    1010info="
    1111LIBRARY: invar.lib PROCEDURES FOR COMPUTING INVARIANTS OF (C,+)-ACTIONS
     
    6363
    6464proc der (matrix m, poly f)
    65 USAGE:   der(m,f);  m matrix, f poly
     65"USAGE:   der(m,f);  m matrix, f poly
    6666RETURN:  poly= application of the vectorfield m befined by the matrix m
    6767         (m[i,1] are the coefficients of d/dx(i)) to f
    6868NOTE:   
    6969EXAMPLE: example der; shows an example
     70"
    7071{
    7172  matrix mh=matrix(jacob(f))*m;
     
    8889
    8990proc actionIsProper(matrix m)
    90 USAGE:   actionIsProper(m); m matrix
     91"USAGE:   actionIsProper(m); m matrix
    9192RETURN:  int= 1 if is proper, 0 else
    9293NOTE:   
    9394EXAMPLE: example actionIsProper; shows an example
     95"
    9496{
    9597  int i;
     
    146148
    147149proc reduction(poly p, ideal dom, list #)
    148 USAGE:   reduction(p,dom,q); p poly, dom ideal, q (optional) monomial
     150"USAGE:   reduction(p,dom,q); p poly, dom ideal, q (optional) monomial
    149151RETURN:  poly= (p-H(f1,...,fr))/q^a, if Lt(p)=H(Lt(f1),...,Lt(fr)) for
    150152               some polynomial H in r variables over the base field,
     
    153155NOTE:   
    154156EXAMPLE: example reduction; shows an example
     157"
    155158{
    156159  int i;
     
    221224
    222225proc completeReduction(poly p, ideal dom, list #)
    223 USAGE:   completeReduction(p,dom,q); p poly, dom ideal,
     226"USAGE:   completeReduction(p,dom,q); p poly, dom ideal,
    224227                                     q (optional) monomial
    225228RETURN:  poly= the polynomial p reduced with dom via the procedure
     
    227230NOTE:   
    228231EXAMPLE: example completeReduction; shows an example
     232"
    229233{
    230234  poly p1=p;
     
    248252
    249253proc inSubring(poly p, ideal dom)
    250 USAGE:   inSubring(p,dom); p poly, dom ideal
     254"USAGE:   inSubring(p,dom); p poly, dom ideal
    251255RETURN:  list= 1,string(@(0)-h(@(1),...,@(size(dom)))) :if p = h(dom[1],...,dom[size(dom)])
    252256              0,string(h(@(0),...,@(size(dom)))) :if there is only a nonlinear relation
     
    254258NOTE:   
    255259EXAMPLE: example inSubring; shows an example
     260"
    256261{
    257262  int z=size(dom);
     
    309314
    310315proc localInvar(matrix m, poly p, poly q, poly h)
    311 USAGE:   localInvar(m,p,q,h); m matrix, p,q,h poly
     316"USAGE:   localInvar(m,p,q,h); m matrix, p,q,h poly
    312317RETURN:  poly= the invariant of the vectorfield m=Sum m[i,1]*d/dx(i) with respect
    313318               to p,q,h, i.e.
     
    317322NOTE:   
    318323EXAMPLE: example localInvar; shows an example
     324"
    319325{
    320326  if ((der(m,h) !=0) || (der(m,der(m,q)) !=0))
     
    360366
    361367proc furtherInvar(matrix m, ideal id, ideal karl, poly q)
    362 USAGE:   furtherInvar(m,id,karl,q); m matrix, id,karl ideal,q poly
     368"USAGE:   furtherInvar(m,id,karl,q); m matrix, id,karl ideal,q poly
    363369RETURN:  ideal= further invariants of the vectorfield m=Sum m[i,1]*d/dx(i) with respect
    364370               to id,p,q, i.e.
     
    371377NOTE:   
    372378EXAMPLE: example furtherInvar; shows an example
     379"
    373380{
    374381  int i;
     
    453460
    454461proc invariantRing(matrix m, poly p, poly q,list #)
    455 USAGE:   invariantRing(m,p,q); m matrix, p,q poly
     462"USAGE:   invariantRing(m,p,q); m matrix, p,q poly
    456463RETURN:  ideal= the invariants of the vectorfield m=Sum m[i,1]*d/dx(i)
    457464                p,q variables with m(p)=q invariant
    458465NOTE:
    459466EXAMPLE: example furtherInvar; shows an example
     467"
    460468{
    461469  ideal j;
  • Singular/LIB/makedbm.lib

    r4996f52 rd2b2a7  
    1 // $Id: makedbm.lib,v 1.6 1998-04-03 23:18:16 krueger Exp $
     1// $Id: makedbm.lib,v 1.7 1998-05-05 11:55:31 krueger Exp $
    22//=========================================================================
    33//
     
    66//=============================================================================
    77
     8version="$Id: makedbm.lib,v 1.7 1998-05-05 11:55:31 krueger Exp $";
     9info="
    810LIBRARY:  makedbm.lib     some usefull tools needed by the Arnold-Classifier.
    911
     
    1214   create_sing_dbm();
    1315   read_sing_dbm();
     16";
    1417
    1518//=============================================================================
  • Singular/LIB/matrix.lib

    r4996f52 rd2b2a7  
    1 // $Id: matrix.lib,v 1.5 1998-04-03 22:47:08 krueger Exp $
     1// $Id: matrix.lib,v 1.6 1998-05-05 11:55:31 krueger Exp $
    22// (GMG/BM, last modified 22.06.96)
    33///////////////////////////////////////////////////////////////////////////////
    44
    5 version="$Id: matrix.lib,v 1.5 1998-04-03 22:47:08 krueger Exp $";
     5version="$Id: matrix.lib,v 1.6 1998-05-05 11:55:31 krueger Exp $";
    66info="
    77LIBRARY:  matrix.lib    PROCEDURES FOR MATRIX OPERATIONS
     
    3838
    3939proc compress (A)
    40 USAGE:   compress(A); A matrix/ideal/module/intmat/intvec
     40"USAGE:   compress(A); A matrix/ideal/module/intmat/intvec
    4141RETURN:  same type, zero columns/generators from A deleted
    4242         (in an intvec zero elements are deleted)
    4343EXAMPLE: example compress; shows an example
     44"
    4445{
    4546   if( typeof(A)=="matrix" ) { return(matrix(simplify(A,2))); }
     
    7980////////////////////////////////////////////////////////////////////////////////
    8081proc concat (list #)
    81 USAGE:   concat(A1,A2,..); A1,A2,... matrices
     82"USAGE:   concat(A1,A2,..); A1,A2,... matrices
    8283RETURN:  matrix, concatenation of A1,A2,... . Number of rows of result matrix is
    8384         max(nrows(A1),nrows(A2),...)
    8485EXAMPLE: example concat; shows an example
     86"
    8587{
    8688   int i;
     
    102104
    103105proc diag (list #)
    104 USAGE:   diag(p,n); p poly, n integer
     106"USAGE:   diag(p,n); p poly, n integer
    105107         diag(A);   A matrix
    106108RETURN:  diag(p,n): diagonal matrix, p times unitmatrix of size n
     
    108110                    nxm matrix A, taken from the 1st row, 2nd row etc of A
    109111EXAMPLE: example diag; shows an example
     112"
    110113{
    111114   if( size(#)==2 ) { return(matrix(#[1]*freemodule(#[2]))); }
     
    129132
    130133proc dsum (list #)
    131 USAGE:   dsum(A1,A2,..); A1,A2,... matrices
     134"USAGE:   dsum(A1,A2,..); A1,A2,... matrices
    132135RETURN:  matrix, direct sum of A1,A2,...
    133136EXAMPLE: example dsum; shows an example
     137"
    134138{
    135139   int i,N,a;
     
    159163
    160164proc flatten (matrix A)
    161 USAGE:   flatten(A); A matrix
     165"USAGE:   flatten(A); A matrix
    162166RETURN:  ideal, generated by all entries from A
    163167EXAMPLE: example flatten; shows an example
     168"
    164169{
    165170   return(ideal(A));
     
    175180
    176181proc genericmat (int n,int m,list #)
    177 USAGE:   genericmat(n,m[,id]);  n,m=integers, id=ideal
     182"USAGE:   genericmat(n,m[,id]);  n,m=integers, id=ideal
    178183RETURN:  nxm matrix, with entries from id (default: id=maxideal(1))
    179184NOTE:    if id has less than nxm elements, the matrix is filled with 0's,
    180185         genericmat(n,m); creates the generic nxm matrix
    181186EXAMPLE: example genericmat; shows an example
     187"
    182188{
    183189   if( size(#)==0 ) { ideal id=maxideal(1); }
     
    202208
    203209proc is_complex (list c)
    204 USAGE:   is_complex(c); c = list of size-compatible modules or matrices
     210"USAGE:   is_complex(c); c = list of size-compatible modules or matrices
    205211RETURN:  1 if c[i]*c[i+1]=0 for all i, 0 if not.
    206212NOTE:    Ideals are treated internally as 1-line matrices
    207213EXAMPLE: example is_complex; shows an example
     214"
    208215{
    209216   int i;
     
    234241
    235242proc outer (matrix A, matrix B)
    236 USAGE:   outer(A,B); A,B matrices
     243"USAGE:   outer(A,B); A,B matrices
    237244RETURN:  matrix, outer product of A and B
    238245EXAMPLE: example outer; shows an example
     246"
    239247{
    240248   int i,j; list L;
     
    271279
    272280proc power ( A, int n)
    273 USAGE:   power(A,n);  A a square-matrix of type intmat or matrix, n=integer
     281"USAGE:   power(A,n);  A a square-matrix of type intmat or matrix, n=integer
    274282RETURN:  inmat resp. matrix, the n-th power of A
    275283NOTE:    for intamt and big n the result may be wrong because of int overflow
    276284EXAMPLE: example power; shows an example
     285"
    277286{
    278287//---------------------------- type checking ----------------------------------
     
    346355
    347356proc skewmat (int n, list #)
    348 USAGE:   skewmat(n[,id]);  n integer, id ideal
     357"USAGE:   skewmat(n[,id]);  n integer, id ideal
    349358RETURN:  skew-symmetric nxn matrix, with entries from id
    350359         (default: id=maxideal(1))
     
    352361         skewmat(n); creates the generic skew-symmetric matrix
    353362EXAMPLE: example skewmat; shows an example
     363"
    354364{
    355365   matrix B[n][n];
     
    382392
    383393proc submat (matrix A, intvec r, intvec c)
    384 USAGE:   submat(A,r,c);  A=matrix, r,c=intvec
     394"USAGE:   submat(A,r,c);  A=matrix, r,c=intvec
    385395RETURN:  matrix, submatrix of A with rows specified by intvec r and columns
    386396         specified by intvec c
    387397EXAMPLE: example submat; shows an example
     398"
    388399{
    389400   matrix B[size(r)][size(c)]=A[r,c];
     
    402413
    403414proc symmat (int n, list #)
    404 USAGE:   symmat(n[,id]);  n integer, id ideal
     415"USAGE:   symmat(n[,id]);  n integer, id ideal
    405416RETURN:  symmetric nxn matrix, with entries from id (default: id=maxideal(1))
    406417NOTE:    if id has less than n*(n+1)/2 elements, the matrix is filled with 0's,
    407418         symmat(n); creates the generic symmetric matrix
    408419EXAMPLE: example symmat; shows an example
     420"
    409421{
    410422   matrix B[n][n];
     
    438450
    439451proc tensor (matrix A, matrix B)
    440 USAGE:   tensor(A,B); A,B matrices
     452"USAGE:   tensor(A,B); A,B matrices
    441453RETURN:  matrix, tensor product of A and B
    442454EXAMPLE: example tensor; shows an example
     455"
    443456{
    444457   int i,j;
     
    467480
    468481proc unitmat (int n)
    469 USAGE:   unitmat(n);  n integer >= 0
     482"USAGE:   unitmat(n);  n integer >= 0
    470483RETURN:  nxn unit matrix
    471484NOTE:    needs a basering, diagonal entries are numbers (=1) in the basering
    472485EXAMPLE: example unitmat; shows an example
     486"
    473487{
    474488   return(matrix(freemodule(n)));
     
    483497
    484498proc gauss_col (matrix A)
    485 USAGE:   gauss_col(A); A=matrix with constant coefficients
     499"USAGE:   gauss_col(A); A=matrix with constant coefficients
    486500RETURN:  matrix = col-reduced lower-triagonal normal form of A
    487501NOTE:    the procedure sets the global option-command: option(noredSB);
    488502EXAMPLE: example gauss_col; shows an example
     503"
    489504{
    490505   def R=basering;
     
    512527
    513528proc gauss_row (matrix A)
    514 USAGE:   gauss_row(A); A=matrix with constant coefficients
     529"USAGE:   gauss_row(A); A=matrix with constant coefficients
    515530RETURN:  matrix = row-reduced upper-triangular normal form of A
    516531NOTE:    may be used to solve a system of linear equations
     
    518533         the procedure sets the global option-command: option(noredSB);
    519534EXAMPLE: example gauss_row; shows an example
     535"
    520536{
    521537   A = gauss_col(transpose(A));
     
    534550
    535551proc addcol (matrix A, int c1, poly p, int c2)
    536 USAGE:   addcol(A,c1,p,c2);  A matrix, p poly, c1, c2 positive integers
     552"USAGE:   addcol(A,c1,p,c2);  A matrix, p poly, c1, c2 positive integers
    537553RETURN:  matrix,  A being modified by adding p times column c1 to column c2
    538554EXAMPLE: example addcol; shows an example
     555"
    539556{
    540557   A[1..nrows(A),c2]=A[1..nrows(A),c2]+p*A[1..nrows(A),c1];
     
    551568
    552569proc addrow (matrix A, int r1, poly p, int r2)
    553 USAGE:   addcol(A,r1,p,r2);  A matrix, p poly, r1, r2 positive integers
     570"USAGE:   addcol(A,r1,p,r2);  A matrix, p poly, r1, r2 positive integers
    554571RETURN:  matrix,  A being modified by adding p times row r1 to row r2
    555572EXAMPLE: example addrow; shows an example
     573"
    556574{
    557575   A[r2,1..ncols(A)]=A[r2,1..ncols(A)]+p*A[r1,1..ncols(A)];
     
    568586
    569587proc multcol (matrix A, int c, poly p)
    570 USAGE:   addcol(A,c,p);  A matrix, p poly, c positive integer
     588"USAGE:   addcol(A,c,p);  A matrix, p poly, c positive integer
    571589RETURN:  matrix,  A being modified by multiplying column c with p
    572590EXAMPLE: example multcol; shows an example
     591"
    573592{
    574593   A[1..nrows(A),c]=p*A[1..nrows(A),c];
     
    585604
    586605proc multrow (matrix A, int r, poly p)
    587 USAGE:   addcol(A,r,p);  A matrix, p poly, r positive integer
     606"USAGE:   addcol(A,r,p);  A matrix, p poly, r positive integer
    588607RETURN:  matrix,  A being modified by multiplying row r with p
    589608EXAMPLE: example multrow; shows an example
     609"
    590610{
    591611   A[r,1..ncols(A)]=p*A[r,1..ncols(A)];
     
    602622
    603623proc permcol (matrix A, int c1, int c2)
    604 USAGE:   permcol(A,c1,c2);  A matrix, c1,c2 positive integers
     624"USAGE:   permcol(A,c1,c2);  A matrix, c1,c2 positive integers
    605625RETURN:  matrix,  A being modified by permuting column c1 and c2
    606626EXAMPLE: example permcol; shows an example
     627"
    607628{
    608629   matrix B=A;
     
    621642
    622643proc permrow (matrix A, int r1, int r2)
    623 USAGE:   permrow(A,r1,r2);  A matrix, r1,r2 positive integers
     644"USAGE:   permrow(A,r1,r2);  A matrix, r1,r2 positive integers
    624645RETURN:  matrix,  A being modified by permuting row r1 and r2
    625646EXAMPLE: example permrow; shows an example
     647"
    626648{
    627649   matrix B=A;
  • Singular/LIB/normal.lib

    r4996f52 rd2b2a7  
    66///////////////////////////////////////////////////////////////////////////////
    77
    8 version="$Id: normal.lib,v 1.4 1998-04-03 22:47:08 krueger Exp $";
     8version="$Id: normal.lib,v 1.5 1998-05-05 11:55:32 krueger Exp $";
    99info="
    1010LIBRARY: normal.lib: PROCEDURE FOR NORMALIZATION (I)
     
    2222
    2323proc isR_HomJR (list Li)
    24 USAGE:   isR_HomJR (Li);  Li = list: ideal SBid, ideal J, poly p
     24"USAGE:   isR_HomJR (Li);  Li = list: ideal SBid, ideal J, poly p
    2525COMPUTE: module Hom_R(J,R) = R:J and compare with R
    2626ASSUME:  R    = P/SBid,  P = basering
     
    3030RETURN:  1 if R = R:J, 0 if not
    3131EXAMPLE: example isR_HomJR;  shows an example   
     32"
    3233{
    3334   int n, ii;
     
    7172
    7273proc extraweight (list # )
    73 USAGE:   extraweight (P); P=name of an existing ring (true name, not a string)
     74"USAGE:   extraweight (P); P=name of an existing ring (true name, not a string)
    7475RETURN:  intvec, size=nvars(P), consisting of the weights of the variables of P
    7576NOTE:    This is useful when enlarging P but keeping the weights of the old
    7677         variables
    7778EXAMPLE: example extraweight;  shows an example   
     79"
    7880{
    7981   int ii,q,fi,fo,fia;
     
    152154
    153155proc HomJJ (list Li,list #)
    154 USAGE:   HomJJ (Li);  Li = list: SBid,id,J,poly p
     156"USAGE:   HomJJ (Li);  Li = list: SBid,id,J,poly p
    155157ASSUME:  R    = P/id,  P = basering, a polynomial ring, id an ideal of P,
    156158         SBid = standard basis of id,
     
    165167         _[2]: an integer which is 1 if phi is an isomorphism, 0 if not
    166168EXAMPLE: example HomJJ;  shows an example   
     169"
    167170{
    168171//---------- initialisation ---------------------------------------------------
     
    513516///////////////////////////////////////////////////////////////////////////////
    514517proc normal(ideal id, list #)
    515 USAGE:   normal(i,choose);  i ideal,choose empty or 1
     518"USAGE:   normal(i,choose);  i ideal,choose empty or 1
    516519         in case you choose 1 the factorizing Buchberger algorithm
    517520         is not used which is sometimes more efficient
     
    521524NOTE:    to use the rings: def r=L[i];setring r;
    522525EXAMPLE: example normal; shows an example
     526"
    523527{
    524528   int i,j,y;
     
    654658
    655659proc normalizationPrimes(ideal i,ideal ihp, list #)
    656 USAGE:   normalizationPrimes(i);  i prime ideal
     660"USAGE:   normalizationPrimes(i);  i prime ideal
    657661RETURN:  a list of one ring L=R, in  R are two ideals
    658662         S,M such that R/M is the normalization
     
    660664NOTE:    to use the ring: def r=L[1];setring r;
    661665EXAMPLE: example normalizationPrimes; shows an example
     666"
    662667{
    663668   int y;
  • Singular/LIB/poly.lib

    r4996f52 rd2b2a7  
    1 // $Id: poly.lib,v 1.11 1998-04-06 17:59:38 obachman Exp $
     1// $Id: poly.lib,v 1.12 1998-05-05 11:55:33 krueger Exp $
    22//system("random",787422842);
    33//(GMG, last modified 22.06.96)
     
    55///////////////////////////////////////////////////////////////////////////////
    66
    7 version="$Id: poly.lib,v 1.11 1998-04-06 17:59:38 obachman Exp $";
     7version="$Id: poly.lib,v 1.12 1998-05-05 11:55:33 krueger Exp $";
    88info="
    99LIBRARY:  poly.lib      PROCEDURES FOR MANIPULATING POLYS, IDEALS, MODULES
     
    3030
    3131proc cyclic (int n)
    32 USAGE:   cyclic(n);  n integer
     32"USAGE:   cyclic(n);  n integer
    3333RETURN:  ideal of cyclic n-roots from 1-st n variables of basering
    3434EXAMPLE: example cyclic; shows examples
     35"
    3536{
    3637//----------------------------- procedure body --------------------------------
     
    5859
    5960proc katsura
    60 USAGE:  katsura([n]); n integer
     61"USAGE: katsura([n]); n integer
    6162RETURN: katsura(n) : n-th katsura ideal of newly created and set ring
    6263                     (32003, x(0..n), dp)
    6364        katsura()  : katsura ideal of basering
    6465EXAMPLE: example katsura; shows examples
     66"
    6567{
    6668  if ( size(#) == 1 && typeof(#[1]) == "int")
     
    111113
    112114proc freerank
    113 USAGE:   freerank(M[,any]);  M=poly/ideal/vector/module/matrix
     115"USAGE:   freerank(M[,any]);  M=poly/ideal/vector/module/matrix
    114116COMPUTE: rank of module presented by M in case it is free. By definition this
    115117         is vdim(coker(M)/m*coker(M)) if coker(M) is free, where m = maximal
     
    124126         //betti(0) ist -1 statt 0
    125127EXAMPLE: example freerank; shows examples
     128"
    126129{
    127130  int rk;
     
    148151
    149152proc is_homog (id)
    150 USAGE:   is_homog(id);  id  poly/ideal/vector/module/matrix
     153"USAGE:   is_homog(id);  id  poly/ideal/vector/module/matrix
    151154RETURN:  integer which is 1 if input is homogeneous (resp. weighted homogeneous
    152155         if the monomial ordering consists of one block of type ws,Ws,wp or Wp,
     
    157160         //*** ergaenzen, wenn Matrizen-Spalten Gewichte haben
    158161EXAMPLE: example is_homog; shows examples
     162"
    159163{
    160164//----------------------------- procedure body --------------------------------
     
    186190
    187191proc is_zero
    188 USAGE:   is_zero(M[,any]); M=poly/ideal/vector/module/matrix
     192"USAGE:   is_zero(M[,any]); M=poly/ideal/vector/module/matrix
    189193RETURN:  integer, 1 if coker(M)=0 resp. 0 if coker(M)!=0, where M is considered
    190194         as matrix
     
    193197                L[2] = dim(M)
    194198EXAMPLE: example is_zero; shows examples
     199"
    195200{
    196201  int d=dim(std(#[1]));
     
    211216
    212217proc maxcoef (f)
    213 USAGE:   maxcoef(f);  f  poly/ideal/vector/module/matrix
     218"USAGE:   maxcoef(f);  f  poly/ideal/vector/module/matrix
    214219RETURN:  maximal length of coefficient of f of type int (by counting the
    215220         length of the string of each coefficient)
    216221EXAMPLE: example maxcoef; shows examples
     222"
    217223{
    218224//----------------------------- procedure body --------------------------------
     
    247253
    248254proc maxdeg (id)
    249 USAGE:   maxdeg(id);  id  poly/ideal/vector/module/matrix
     255"USAGE:   maxdeg(id);  id  poly/ideal/vector/module/matrix
    250256RETURN:  int/intmat, each component equals maximal degree of monomials in the
    251257         corresponding component of id, independent of ring ordering
     
    255261         an option for computing weighted degrees
    256262EXAMPLE: example maxdeg; shows examples
     263"
    257264{
    258265   //-------- subprocedure to find maximal degree of given component ----------
     
    300307
    301308proc maxdeg1 (id,list #)
    302 USAGE:   maxdeg1(id[,v]);  id=poly/ideal/vector/module/matrix, v=intvec
     309"USAGE:   maxdeg1(id[,v]);  id=poly/ideal/vector/module/matrix, v=intvec
    303310RETURN:  integer, maximal [weighted] degree of monomials of id independent of
    304311         ring ordering, maxdeg1 of i-th variable is v[i] (default: v=1..1).
     
    307314         maxdeg is faster
    308315EXAMPLE: example maxdeg1; shows examples
     316"
    309317{
    310318   //-------- subprocedure to find maximal degree of given component ----------
     
    381389
    382390proc mindeg (id)
    383 USAGE:   mindeg(id);  id  poly/ideal/vector/module/matrix
     391"USAGE:   mindeg(id);  id  poly/ideal/vector/module/matrix
    384392RETURN:  minimal degree/s of monomials of id, independent of ring ordering
    385393         (mindeg of each variable is 1) of type int if id of type poly, else
     
    388396         has an option for computing weighted degrees.
    389397EXAMPLE: example mindeg; shows examples
     398"
    390399{
    391400   //--------- subprocedure to find minimal degree of given component ---------
     
    434443
    435444proc mindeg1 (id, list #)
    436 USAGE:   mindeg1(id[,v]);  id=poly/ideal/vector/module/matrix, v=intvec
     445"USAGE:   mindeg1(id[,v]);  id=poly/ideal/vector/module/matrix, v=intvec
    437446RETURN:  integer, minimal [weighted] degree of monomials of id independent of
    438447         ring ordering, mindeg1 of i-th variable is v[i] (default v=1..1).
     
    441450         mindeg is faster.
    442451EXAMPLE: example mindeg1; shows examples
     452"
    443453{
    444454   //--------- subprocedure to find minimal degree of given component ---------
     
    514524
    515525proc normalize (id)
    516 USAGE:   normalize(id);  id=poly/vector/ideal/module
     526"USAGE:   normalize(id);  id=poly/vector/ideal/module
    517527RETURN:  object of same type with leading coefficient equal to 1
    518528EXAMPLE: example normalize; shows an example
     529"
    519530{
    520531   return(simplify(id,1));
     
    543554////////////////////////////////////////////////////////////////////////////////
    544555proc rad_con (poly g,ideal I)
    545   USAGE:   rad_con(<poly>,<ideal>);
     556"  USAGE:   rad_con(<poly>,<ideal>);
    546557  RETURNS: 1 (TRUE) (type <int>) if <poly> is contained in the radical of
    547558           <ideal>, 0 (FALSE) (type <int>) otherwise
    548559  EXAMPLE: example rad_con; shows an example
     560"
    549561{ def br=basering;
    550562  int n=nvars(br);
     
    582594
    583595proc lcm (ideal i)
    584 USAGE:   lcm(i); i ideal
     596"USAGE:   lcm(i); i ideal
    585597RETURN:  poly = lcm(i[1],...,i[size(i)])
    586598NOTE:   
    587599EXAMPLE: example lcm; shows an example
     600"
    588601{
    589602  int k,j;
     
    636649
    637650proc content(f)
    638 USAGE:   content(f); f polynomial/vector
     651"USAGE:   content(f); f polynomial/vector
    639652RETURN:  number, the content (greatest common factor of coefficients)
    640653         of the polynomial/vector f
    641654EXAMPLE: example content; shows an example
     655"
    642656{
    643657  return(leadcoef(f)/leadcoef(cleardenom(f)));
  • Singular/LIB/presolve.lib

    r4996f52 rd2b2a7  
    1 // $Id: presolve.lib,v 1.3 1998-04-03 22:47:10 krueger Exp $
     1// $Id: presolve.lib,v 1.4 1998-05-05 11:55:34 krueger Exp $
    22//system("random",787422842);
    33//(GMG), last modified 97/10/07 by GMG
    44///////////////////////////////////////////////////////////////////////////////
    55
    6 version="$Id: presolve.lib,v 1.3 1998-04-03 22:47:10 krueger Exp $";
     6version="$Id: presolve.lib,v 1.4 1998-05-05 11:55:34 krueger Exp $";
    77info="
    88LIBRARY:  presolve.lib     PROCEDURES FOR PRE-SOLVING POLYNOMIAL EQUATIONS
     
    3232
    3333proc degreepart (id,int d1,int d2,list #)
    34 USAGE:   degreepart(id,d1,d2[,v]);  id=ideal/module, d1,d1=integers, v=intvec
     34"USAGE:   degreepart(id,d1,d2[,v]);  id=ideal/module, d1,d1=integers, v=intvec
    3535RETURN:  generators of id of [v-weighted] total degree >= d1 and <= d2
    3636         (default: v = 1,...,1)
    3737EXAMPLE: example degreepart; shows an example
     38"
    3839{
    3940   def dpart = id;
     
    6768
    6869proc elimlinearpart (ideal i,list #)
    69 USAGE:   elimlinearpart(i[,n]);  i=ideal, n=integer
     70"USAGE:   elimlinearpart(i[,n]);  i=ideal, n=integer
    7071RETURN:  list of of 5 objects:
    7172         [1]: (interreduced) ideal obtained from i by eliminating (sbstituting)
     
    8283         // bei ** spaeter eventuell verbessern
    8384EXAMPLE: example elimlinearpart; shows an example
     85"
    8486{
    8587   int ii,n,fi,k;
     
    171173
    172174proc elimpart (ideal i,list #)
    173 USAGE:   elimpart(i[,n,e]);  i=ideal, n,e=integers
     175"USAGE:   elimpart(i[,n,e]);  i=ideal, n,e=integers
    174176         consider 1-st n vars for elimination (better: substitution),
    175177         e =0: substitute from linear part of i (same as elimlinearpart)
     
    191193         since it avoids internal ring change and mapping
    192194EXAMPLE: example elimpart; shows an example
     195"
    193196{
    194197   def P = basering;
     
    315318
    316319proc elimpartanyr (ideal i, list #)
    317 USAGE:   elimpartanyr(i[,p,e]);  i=ideal, p=product of vars to be eliminated,
     320"USAGE:   elimpartanyr(i[,p,e]);  i=ideal, p=product of vars to be eliminated,
    318321         e=int (default: p=product of all vars, e=1)
    319322RETURN:  list of of 6 objects:
     
    334337         placed correctly and then applies 'elimpart';
    335338EXAMPLE: example elimpartanyr; shows an example
     339"
    336340{
    337341   def P = basering;
     
    367371 
    368372proc fastelim (ideal i, poly p, list #)
    369 USAGE:   fastelim(i,p[h,o,a,b,e,m]); i=ideal, p=product of variables to be
     373"USAGE:   fastelim(i,p[h,o,a,b,e,m]); i=ideal, p=product of variables to be
    370374         eliminated; h,o,a,b,e integers
    371375         (options for Hilbert-std, 'valvars', elimpart, minimizing)
     
    380384RETURN:  ideal obtained from i by eliminating those variables which occur in p
    381385EXAMPLE: example fastelim; shows an example.
     386"
    382387{
    383388   def P = basering;
     
    455460
    456461proc faststd (@id,string @s1,string @s2, list #)
    457 USAGE:   faststd(id,s1,s2[,"hilb","sort","dec",o,"blocks"]);
     462"USAGE:   faststd(id,s1,s2[,\"hilb\",\"sort\",\"dec\",o,\"blocks\"]);
    458463         id=ideal/module, s1,s2=strings (names for new ring and maped id)
    459          o = string (allowed ordstring:"lp","dp","Dp","ls","ds","Ds")
    460          "hilb","sort","dec","block" options for Hilbert-std, sortandmap
    461 COMPUTE: create a new ring (with "best" ordering of vars) and compute a
     464         o = string (allowed ordstring:\"lp\",\"dp\",\"Dp\",\"ls\",\"ds\",\"Ds\")
     465         \"hilb\",\"sort\",\"dec\",\"block\" options for Hilbert-std, sortandmap
     466COMPUTE: create a new ring (with \"best\" ordering of vars) and compute a
    462467         std-basis of id (hopefully faster)
    463          - If say, s1="R" and s2="j", the new basering has name R and the
     468         - If say, s1=\"R\" and s2=\"j\", the new basering has name R and the
    464469           std-basis of the image of id in R has name j
    465          - "hilb"  : use Hilbert-series driven std-basis computation
    466          - "sort"  : use 'sortandmap' for a best ordering of vars
    467          - "dec"   : order vars w.r.t. decreasing complexity (with "sort")
    468          - "block" : create blockordering, each block having ordstr=o, s.t.
    469                      vars of same complexity are in one block (with "sort")
     470         - \"hilb\"  : use Hilbert-series driven std-basis computation
     471         - \"sort\"  : use 'sortandmap' for a best ordering of vars
     472         - \"dec\"   : order vars w.r.t. decreasing complexity (with \"sort\")
     473         - \"block\" : create blockordering, each block having ordstr=o, s.t.
     474                     vars of same complexity are in one block (with \"sort\")
    470475         - o       : defines the basic ordering of the resulting ring
    471476         default: o = ordering of 1-st block of basering - if it is allowed,
    472                       else o="dp",
    473                   "sort", if none of the optional parameters is given
     477                      else o=\"dp\",
     478                  \"sort\", if none of the optional parameters is given
    474479RETURN:  nothing
    475480NOTE:    This proc is only useful for hard problems where other methods fail.
    476          "hilb" is useful for hard orderings (as "lp") or for characteristic 0,
    477          it is correct for "lp","dp","Dp" (and for blockorderings combining
     481         \"hilb\" is useful for hard orderings (as \"lp\") or for characteristic 0,
     482         it is correct for \"lp\",\"dp\",\"Dp\" (and for blockorderings combining
    478483         these) but not for s-orderings or if the vars have different weights.
    479          There seem to be only few cases in which "dec" is fast
     484         There seem to be only few cases in which \"dec\" is fast
    480485EXAMPLE: example faststd; shows an example.
     486"
    481487{
    482488   def @P = basering;
     
    624630
    625631proc findvars(id, list #)
    626 USAGE:   findvars(id[,any]); id poly/ideal/vector/module/matrix, any=any type
     632"USAGE:   findvars(id[,any]); id poly/ideal/vector/module/matrix, any=any type
    627633RETURN:  ideal of variables occuring in id, if no second argument is present
    628634         list of 4 objects, if a second argument is given (of any type)
     
    632638         -[4]: intvec of variables not occuring in id
    633639EXAMPLE: example findvars; shows an example
     640"
    634641{
    635642   int ii,n;
     
    670677
    671678proc hilbvec (@id, list #)
    672 USAGE:   hilbvec(id[,c,o]); id poly/ideal/vector/module/matrix, c,o=strings
    673          c=char, o=ord in which hilb is computed (default: c="32003", o="dp")
     679"USAGE:   hilbvec(id[,c,o]); id poly/ideal/vector/module/matrix, c,o=strings
     680         c=char, o=ord in which hilb is computed (default: c=\"32003\", o=\"dp\")
    674681RETURN:  intvec of 1-st Hilbert-series of id, computed in char c and ordering o
    675682         bei ** aendern falls ringmaps vollstaendig ?
    676683NOTE:    id must be homogeneous (all vars having weight 1)
    677684EXAMPLE: example hilbvec; shows an example
     685"
    678686{
    679687   def @P = basering;
     
    701709
    702710proc linearpart (id)
    703 USAGE:   linearpart(id);  id=ideal/module
     711"USAGE:   linearpart(id);  id=ideal/module
    704712RETURN:  generators of id of total degree <= 1
    705713EXAMPLE: example linearpart; shows an example
     714"
    706715{
    707716   return(degreepart(id,0,1));
     
    718727
    719728proc tolessvars (id ,list #)
    720 USAGE:   tolessvars(id,[s1,s2]); id poly/ideal/vector/module/matrix,
     729"USAGE:   tolessvars(id,[s1,s2]); id poly/ideal/vector/module/matrix,
    721730         s1,s2=strings (names of: new ring, new ordering)
    722731CREATE:  nothing, if id contains all vars of the basering. Else, create
     
    725734         new ring, which will be the basering after the proc has finished.
    726735         The name of the new ring is by default R(n), where n is the number of
    727          variables in the new ring. If, say, s1 = "newR" then the new ring has
     736         variables in the new ring. If, say, s1 = \"newR\" then the new ring has
    728737         name newR. In s2 a different ordering for the new ring may be given
    729          as an allowed ordstring (default is "dp" resp. "ds", depending whether
     738         as an allowed ordstring (default is \"dp\" resp. \"ds\", depending whether
    730739         the first block of the old ordering is a p- resp. an s-ordering).
    731740DISPLAY: If printlevel >=0, display ideal of vars which have been ommitted from
     
    739748         occurs in the old ring, for the same reason.
    740749EXAMPLE: example tolessvars; shows an example
     750"
    741751{
    742752//---------------- initialisation and check occurence of vars -----------------
     
    796806
    797807proc solvelinearpart (id,list #)
    798 USAGE:   solvelinearpart(id[,n]);  id=ideal/module, n=integer
     808"USAGE:   solvelinearpart(id[,n]);  id=ideal/module, n=integer
    799809RETURN:  (interreduced) generators of id of degree <=1 in reduced triangular
    800810         form  (default) or if n=0 [non-reduced triangular form if n!=0]
     
    805815         char 0 instead!
    806816EXAMPLE: example solvelinearpart; shows an example
     817"
    807818{
    808819   intvec getoption = option(get);
     
    855866
    856867proc sortandmap (@id,string @s1,string @s2, list #)
    857 USAGE:   sortandmap(id,s1,s2[,n1,p1,n2,p2...,o1,m1,o2,m2...]);
     868"USAGE:   sortandmap(id,s1,s2[,n1,p1,n2,p2...,o1,m1,o2,m2...]);
    858869         id=poly/ideal/vector/module
    859870         s1,s2=strings (names for new ring and maped id)
    860871         p1,p2,...= product of vars, n1,n2,...=integers
    861872         o1,o2,...= allowed ordstrings, m1,m2,...=integers
    862          (default: p1=product of all vars, n1=0, o1="dp",m1=0)
     873         (default: p1=product of all vars, n1=0, o1=\"dp\",m1=0)
    863874         the last pi (containing the remaining vars) may be omitted
    864875CREATE:  a new ring and map id into it, the new ring has same char as basering
     
    867878           id, ni controls the sorting in i-th block (= vars occuring in pi):
    868879           ni=0 (resp.!=0) means that less (resp. more) complex vars come first
    869          - If say, s1="R" and s2="j", the new basering has name R and the image
     880         - If say, s1=\"R\" and s2=\"j\", the new basering has name R and the image
    870881           of id in R has name j
    871882         - oi and mi define the monomial ordering of the i-th block:
     
    874885           each subblock having ordstr=oi, such that vars of same complexity
    875886           are in one block
    876            default: oi="dp", mi=0
    877          - only simple ordstrings oi are allowed:"lp","dp","Dp","ls","ds","Ds"
     887           default: oi=\"dp\", mi=0
     888         - only simple ordstrings oi are allowed:\"lp\",\"dp\",\"Dp\",\"ls\",\"ds\",\"Ds\"
    878889RETURN:  nothing
    879890NOTE:    We define a variable x to be more complex than y (with respect to id)
     
    884895          # of monomials in coefficient of next smaller power of x,...)
    885896EXAMPLE: example sortandmap; shows an example
     897"
    886898{
    887899   def @P = basering;
     
    948960
    949961proc sortvars (id, list #)
    950 USAGE:   sortvars(id[,n1,p1,n2,p2,...]); id=poly/ideal/vector/module,
     962"USAGE:   sortvars(id[,n1,p1,n2,p2,...]); id=poly/ideal/vector/module,
    951963         p1,p2,...= product of vars, n1,n2,...=integers
    952964         (default: p1=product of all vars, n1=0)
     
    972984          # of monomials in coefficient of next smaller power of x,...)
    973985EXAMPLE: example sortvars; shows an example
     986"
    974987{
    975988   int ii,jj,n,s;
     
    10091022
    10101023proc valvars (id, list #)
    1011 USAGE:   valvars(id[,n1,p1,n2,p2,...]); id=poly/ideal/vector/module,
     1024"USAGE:   valvars(id[,n1,p1,n2,p2,...]); id=poly/ideal/vector/module,
    10121025         p1,p2,...= product of vars, n1,n2,...=integers
    10131026         ni controls the ordering of vars occuring in pi:
     
    10321045          # of monomials in coefficient of next smaller power of x,...)
    10331046EXAMPLE: example valvars; shows an example
     1047"
    10341048{
    10351049//---------------------------- initialization ---------------------------------
  • Singular/LIB/primdec.lib

    r4996f52 rd2b2a7  
    1 // $Id: primdec.lib,v 1.12 1998-04-14 15:35:45 Singular Exp $
     1// $Id: primdec.lib,v 1.13 1998-05-05 11:55:34 krueger Exp $
    22///////////////////////////////////////////////////////
    33// primdec.lib
     
    1111//////////////////////////////////////////////////////
    1212
    13 version="$Id: primdec.lib,v 1.12 1998-04-14 15:35:45 Singular Exp $";
     13version="$Id: primdec.lib,v 1.13 1998-05-05 11:55:34 krueger Exp $";
    1414info="
    1515LIBRARY: primdec.lib: PROCEDURE FOR PRIMARY DECOMPOSITION (I)
     
    6565
    6666proc sat1 (ideal id, poly p)
    67 USAGE:   sat1(id,j);  id ideal, j polynomial
     67"USAGE:   sat1(id,j);  id ideal, j polynomial
    6868RETURN:  saturation of id with respect to j (= union_(k=1...) of id:j^k)
    6969NOTE:    result is a std basis in the basering
    7070EXAMPLE: example sat; shows an example
     71"
    7172{
    7273   int @k;
     
    8990
    9091proc sat2 (ideal id, ideal h)
    91 USAGE:   sat2(id,j);  id ideal, j polynomial
     92"USAGE:   sat2(id,j);  id ideal, j polynomial
    9293RETURN:  saturation of id with respect to j (= union_(k=1...) of id:j^k)
    9394NOTE:    result is a std basis in the basering
    9495EXAMPLE: example sat2; shows an example
     96"
    9597{
    9698   int @k,@i;
     
    283285
    284286proc factor(poly p)
    285 USAGE:   factor(p) p poly
     287"USAGE:   factor(p) p poly
    286288RETURN:  list=;
    287289NOTE:
    288290EXAMPLE: example factor; shows an example
     291"
    289292{
    290293
     
    438441
    439442proc testPrimary(list pr, ideal k)
    440 USAGE:   testPrimary(pr,k) pr list, k ideal;
     443"USAGE:   testPrimary(pr,k) pr list, k ideal;
    441444RETURN:  int = 1, if the intersection of the ideals in pr is k, 0 if not
    442445NOTE:
    443446EEXAMPLE: example testPrimary ; shows an example
     447"
    444448{
    445449   int i;
     
    469473////////////////////////////////////////////////////////////////////////////////
    470474proc printPrimary( list l, list #)
    471 USAGE:   printPrimary(l) l list;
     475"USAGE:   printPrimary(l) l list;
    472476RETURN:  nothing
    473477NOTE:
    474478EXAMPLE: example printPrimary; shows an example
     479"
    475480{
    476481   if(size(#)>0)
     
    503508
    504509proc randomLast(int b)
    505 USAGE:   randomLast
     510"USAGE:   randomLast
    506511RETURN:  ideal = maxideal(1) but the last variable exchanged by
    507512         a sum of it with a linear random combination of the other
     
    509514NOTE:
    510515EXAMPLE: example randomLast; shows an example
     516"
    511517{
    512518
     
    823829
    824830proc zero_decomp (ideal j,ideal ser,int @wr,list #)
    825 USAGE:   zero_decomp(j,ser,@wr); j,ser ideals, @wr=0 or 1
     831"USAGE:   zero_decomp(j,ser,@wr); j,ser ideals, @wr=0 or 1
    826832         (@wr=0 for primary decomposition, @wr=1 for computaion of associated
    827833         primes)
     
    833839NOTE:    Algorithm of Gianni, Traeger, Zacharias
    834840EXAMPLE: example zero_decomp; shows an example
     841"
    835842{
    836843  def   @P = basering;
     
    12241231
    12251232proc ggt (ideal i)
    1226 USAGE:   ggt(i); i list of polynomials
     1233"USAGE:   ggt(i); i list of polynomials
    12271234RETURN:  poly = ggt(i[1],...,i[size(i)])
    12281235NOTE:
    12291236EXAMPLE: example ggt; shows an example
     1237"
    12301238{
    12311239  int k;
     
    13131321
    13141322proc lcmP(ideal i)
    1315 USAGE:   lcm(i); i list of polynomials
     1323"USAGE:   lcm(i); i list of polynomials
    13161324RETURN:  poly = lcm(i[1],...,i[size(i)])
    13171325NOTE:
    13181326EXAMPLE: example lcm; shows an example
     1327"
    13191328{
    13201329  int k,j;
     
    13661375///////////////////////////////////////////////////////////////////////////////
    13671376proc clearSB (ideal i,list #)
    1368 USAGE:   clearSB(i); i ideal which is SB ordered by monomial ordering
     1377"USAGE:   clearSB(i); i ideal which is SB ordered by monomial ordering
    13691378RETURN:  ideal = minimal SB
    13701379NOTE:
    13711380EXAMPLE: example clearSB; shows an example
     1381"
    13721382{
    13731383  int k,j;
     
    14441454
    14451455proc independSet (ideal j)
    1446 USAGE:   independentSet(i); i ideal
     1456"USAGE:   independentSet(i); i ideal
    14471457RETURN:  list = new varstring with the independent set at the end,
    14481458                ordstring with the corresponding block ordering,
     
    14501460NOTE:
    14511461EXAMPLE: example independentSet; shows an example
     1462"
    14521463{
    14531464   int n,k,di;
     
    15111522
    15121523proc maxIndependSet (ideal j)
    1513 USAGE:   maxIndependentSet(i); i ideal
     1524"USAGE:   maxIndependentSet(i); i ideal
    15141525RETURN:  list = new varstring with the maximal independent set at the end,
    15151526                ordstring with the corresponding block ordering,
     
    15171528NOTE:
    15181529EXAMPLE: example maxIndependentSet; shows an example
     1530"
    15191531{
    15201532   int n,k,di;
     
    15781590
    15791591proc prepareQuotientring (int nnp)
    1580 USAGE:   prepareQuotientring(nnp); nnp int
     1592"USAGE:   prepareQuotientring(nnp); nnp int
    15811593RETURN:  string = to define Kvar(nnp+1),...,var(nvars)[..rest ]
    15821594NOTE:
    15831595EXAMPLE: example independentSet; shows an example
     1596"
    15841597{
    15851598  ideal @ih,@jh;
     
    16561669
    16571670proc minAssPrimes(ideal i, list #)
    1658 USAGE:   minAssPrimes(i); i ideal
     1671"USAGE:   minAssPrimes(i); i ideal
    16591672         minAssPrimes(i,1); i ideal  (to use also the factorizing Groebner)
    16601673RETURN:  list = the minimal associated prime ideals of i
    16611674NOTE:
    16621675EXAMPLE: example minAssPrimes; shows an example
     1676"
    16631677{
    16641678   #[1]=1;
     
    18801894///////////////////////////////////////////////////////////////////////////////
    18811895proc decomp(ideal i,list #)
    1882 USAGE:   decomp(i); i ideal  (for primary decomposition)   (resp.
     1896"USAGE:   decomp(i); i ideal  (for primary decomposition)   (resp.
    18831897         decomp(i,1);        (for the minimal associated primes) )
    18841898RETURN:  list = list of primary ideals and their associated primes
     
    18871901NOTE:    Algorithm of Gianni, Traeger, Zacharias
    18881902EXAMPLE: example decomp; shows an example
     1903"
    18891904{
    18901905  def  @P = basering;
     
    27402755///////////////////////////////////////////////////////////////////////////////
    27412756proc radicalKL (list m,ideal ser,list #)
    2742 USAGE:   decomp(i); i ideal  (for primary decomposition)   (resp.
     2757"USAGE:   decomp(i); i ideal  (for primary decomposition)   (resp.
    27432758         decomp(i,1);        (for the minimal associated primes) )
    27442759RETURN:  list = list of primary ideals and their associated primes
     
    27472762NOTE:    Algorithm of Gianni, Traeger, Zacharias
    27482763EXAMPLE: example decomp; shows an example
     2764"
    27492765{
    27502766   ideal i=m[2];
  • Singular/LIB/primitiv.lib

    r4996f52 rd2b2a7  
    1 // $Id: primitiv.lib,v 1.4 1998-04-23 13:23:27 obachman Exp $
     1// $Id: primitiv.lib,v 1.5 1998-05-05 11:55:35 krueger Exp $
    22// author:  Martin Lamm,  email: lamm@mathematik.uni-kl.de
    33// last change:           11.3.98
    44///////////////////////////////////////////////////////////////////////////////
    5 version="$Id: primitiv.lib,v 1.4 1998-04-23 13:23:27 obachman Exp $";
     5version="$Id: primitiv.lib,v 1.5 1998-05-05 11:55:35 krueger Exp $";
    66info="
    77LIBRARY:    primitiv.lib    PROCEDURES FOR FINDING A PRIMITIVE ELEMENT
     
    1717
    1818proc randomLast(int b)
    19 USAGE:   randomLast
     19"USAGE:   randomLast
    2020RETURN:  ideal = maxideal(1) but the last variable exchanged by
    2121         a sum of it with a linear random combination of the other
    2222         variables
    2323EXAMPLE: example randomLast; shows an example
     24"
    2425{
    2526  ideal i=maxideal(1);
     
    4041
    4142proc primitive(ideal i)
    42 USAGE:  primitive(i); i ideal of the following form:
     43"USAGE:  primitive(i); i ideal of the following form:
    4344 Let k be the ground field of your basering, a_1,...,a_n algebraic over k,
    4445 m_1(x1), m_2(x_1,x_2),...,m_n(x_1,...,x_n) polynomials in k such that
     
    5455         of given algebraic elements (and minimal polynomials)
    5556EXAMPLE: example primitive;  shows an example
     57"
    5658{
    5759 def altring=basering;
     
    125127
    126128proc splitring
    127 USAGE:  splitring(f,R[,L]);  f poly, univariate, irreducible(!), R string,
     129"USAGE:  splitring(f,R[,L]);  f poly, univariate, irreducible(!), R string,
    128130                     L list of polys and/or ideals (optional)
    129131ACTION: defines a ring with name R, in which f is reducible, and changes to it
     
    135137        The names of variables and orderings are not affected.
    136138
    137         It is also allowed to call splitring with R=="". Then the old basering
     139        It is also allowed to call splitring with R==\"\". Then the old basering
    138140        will be REPLACED by the new ring (with the same name as the old ring).
    139141
     
    142144         (e.g. it cannot be a transcendent ring extension of Q or Z/p)
    143145EXAMPLE: example splitring;  shows an example
     146"
    144147{
    145148 //----------------- split ist bereits eine proc in 'inout.lib' ! -------------
  • Singular/LIB/random.lib

    r4996f52 rd2b2a7  
    1 // $Id: random.lib,v 1.4 1998-04-03 22:47:12 krueger Exp $
     1// $Id: random.lib,v 1.5 1998-05-05 11:55:36 krueger Exp $
    22//system("random",787422842);
    33//(GMG/BM, last modified 22.06.96)
    44///////////////////////////////////////////////////////////////////////////////
    55
    6 version="$Id: random.lib,v 1.4 1998-04-03 22:47:12 krueger Exp $";
     6version="$Id: random.lib,v 1.5 1998-05-05 11:55:36 krueger Exp $";
    77info="
    88LIBRARY:  random.lib    PROCEDURES OF RANDOM MATRIX AND POLY OPERATIONS
     
    2323
    2424proc genericid (id, list #)
    25 USAGE:   genericid(id,[,p,b]);  id ideal/module, k,p,b integers
     25"USAGE:   genericid(id,[,p,b]);  id ideal/module, k,p,b integers
    2626RETURN:  system of generators of id which are generic, sparse, triagonal linear
    2727         combinations of given generators with coefficients in [1,b] and
     
    2929NOTE:    For performance reasons try small bound b in characteristic 0
    3030EXAMPLE: example genericid; shows an example
     31"
    3132{
    3233//----------------------------- set defaults ----------------------------------
     
    5051
    5152proc randomid (id, list #)
    52 USAGE:   randomid(id,[k,b]);  id ideal/module, b,k integers
     53"USAGE:   randomid(id,[k,b]);  id ideal/module, b,k integers
    5354RETURN:  ideal/module having k generators which are random linear combinations
    5455         of generators of id with coefficients in the interval [-b,b]
     
    5657NOTE:    For performance reasons try small bound b in characteristic 0
    5758EXAMPLE: example randomid; shows an example
     59"
    5860{
    5961//----------------------------- set defaults ----------------------------------
     
    7678
    7779proc randommat (int n, int m, list #)
    78 USAGE:   randommat(n,m[,id,b]);  n,m,b integers, id ideal
     80"USAGE:   randommat(n,m[,id,b]);  n,m,b integers, id ideal
    7981RETURN:  nxm matrix, entries are random linear combinations of elements
    8082         of id and coefficients in [-b,b]
     
    8284NOTE:    For performance reasons try small bound b in char 0
    8385EXAMPLE:  example randommat; shows an example
     86"
    8487{
    8588//----------------------------- set defaults ----------------------------------
     
    109112
    110113proc sparseid (int k, int u, list #)
    111 USAGE:   sparseid(k,u[,o,p,b]);  k,u,o,p,b integers
     114"USAGE:   sparseid(k,u[,o,p,b]);  k,u,o,p,b integers
    112115RETURN:  ideal having k generators in each degree d, u<=d<=o, p percent of
    113116         terms in degree d are 0, the remaining have random coefficients
    114117         in the interval [1,b], (default: o=u=d, p=75, b=30000)
    115118EXAMPLE: example sparseid; shows an example
     119"
    116120{
    117121//----------------------------- set defaults ----------------------------------
     
    138142
    139143proc sparsemat (int n, int m, list #)
    140 USAGE:   sparsemat(n,m[,p,b]);  n,m,p,b integers
     144"USAGE:   sparsemat(n,m[,p,b]);  n,m,p,b integers
    141145RETURN:  nxm integer matrix, p percent of the entries are 0, the remaining
    142146         are random coefficients >=1 and <= b; [defaults: (p,b) = (75,1)]
    143147EXAMPLE: example sparsemat; shows an example
     148"
    144149{
    145150   int r,h,ii;
     
    184189
    185190proc sparsepoly (int u, list #)
    186 USAGE:   sparsepoly(u[,o,p,b]);  u,o,p,b integers
     191"USAGE:   sparsepoly(u[,o,p,b]);  u,o,p,b integers
    187192RETURN:  poly having only terms in degree d, u<=d<=o, p percent of the terms
    188193         in degree d are 0, the remaining have random coefficients in [1,b),
    189194         (defaults: o=u=d, p=75, b=30000)
    190195EXAMPLE:  example sparsepoly; shows an example
     196"
    191197{
    192198//----------------------------- set defaults ----------------------------------
     
    209215
    210216proc sparsetriag (int n, int m, list #)
    211 USAGE:   sparsetriag(n,m[,p,b]);  n,m,p,b integers
     217"USAGE:   sparsetriag(n,m[,p,b]);  n,m,p,b integers
    212218RETURN:  nxm lower triagonal integer matrix, diagonal entries equal to 1, about
    213219         p percent of lower diagonal entries are 0, the remaining are random
    214220         integers >=1 and <= b; [defaults: (p,b) = (75,1)]
    215221EXAMPLE: example sparsetriag; shows an example
     222"
    216223{
    217224   int ii,min,l,r; intmat M[n][m];
  • Singular/LIB/ring.lib

    r4996f52 rd2b2a7  
    1 // $Id: ring.lib,v 1.5 1998-04-03 22:47:13 krueger Exp $
     1// $Id: ring.lib,v 1.6 1998-05-05 11:55:37 krueger Exp $
    22//(GMG, last modified 03.11.95)
    33///////////////////////////////////////////////////////////////////////////////
    44
    5 version="$Id: ring.lib,v 1.5 1998-04-03 22:47:13 krueger Exp $";
     5version="$Id: ring.lib,v 1.6 1998-05-05 11:55:37 krueger Exp $";
    66info="
    77LIBRARY:  ring.lib      PROCEDURES FOR MANIPULATING RINGS AND MAPS
     
    2626
    2727proc changechar (string newr, string c, list #)
    28 USAGE:   changechar(newr,c[,r]);  newr,c=strings, r=ring
     28"USAGE:   changechar(newr,c[,r]);  newr,c=strings, r=ring
    2929CREATE:  create a new ring with name `newr` and make it the basering if r is
    3030         an existing ring [default: r=basering].
    3131         The new ring differs from the old ring only in the characteristic.
    32          If, say, (newr,c) = ("R","0,A") and the ring r exists, the new
     32         If, say, (newr,c) = (\"R\",\"0,A\") and the ring r exists, the new
    3333         basering will have name R characteristic 0 and one parameter A.
    3434RETURN:  No return value
     
    3838         start with @ (see the file HelpForProc)
    3939EXAMPLE: example changechar; shows an example
     40"
    4041{
    4142   if( size(#)==0 ) { def @r=basering; }
     
    7172
    7273proc changeord (string newr, string o, list #)
    73 USAGE:   changeord(newr,o[,r]);  newr,o=strings, r=ring/qring
     74"USAGE:   changeord(newr,o[,r]);  newr,o=strings, r=ring/qring
    7475CREATE:  create a new ring with name `newr` and make it the basering if r is
    7576         an existing ring/qring [default: r=basering].
    7677         The new ring differs from the old ring only in the ordering. If, say,
    77          (newr,o) = ("R","wp(2,3),dp") and the ring r exists and has >=3
     78         (newr,o) = (\"R\",\"wp(2,3),dp\") and the ring r exists and has >=3
    7879         variables, the new basering will have name R and ordering wp(2,3),dp.
    7980RETURN:  No return value
     
    8283         start with @ (see the file HelpForProc)
    8384EXAMPLE: example changeord; shows an example
     85"
    8486{
    8587   if( size(#)==0 ) { def @r=basering; }
     
    117119
    118120proc changevar (string newr, string vars, list #)
    119 USAGE:   changevar(newr,vars[,r]);  newr,vars=strings, r=ring/qring
     121"USAGE:   changevar(newr,vars[,r]);  newr,vars=strings, r=ring/qring
    120122CREATE:  creates a new ring with name `newr` and makes it the basering if r
    121123         is an existing ring/qring [default: r=basering].
    122124         The new ring differs from the old ring only in the variables. If,
    123          say, (newr,vars) = ("R","t()") and the ring r exists and has n
     125         say, (newr,vars) = (\"R\",\"t()\") and the ring r exists and has n
    124126         variables, the new basering will have name R and variables
    125127         t(1),...,t(n).
    126          If vars = "a,b,c,d", the new ring will have the variables a,b,c,d.
     128         If vars = \"a,b,c,d\", the new ring will have the variables a,b,c,d.
    127129RETURN:  No return value
    128130NOTE:    This procedure is useful in connection with the procedure ringtensor,
     
    132134         start with @ (see the file HelpForProc)
    133135EXAMPLE: example changevar; shows an example
     136"
    134137{
    135138   if( size(#)==0 ) { def @r=basering; }
     
    174177
    175178proc defring (string s1, string s2, int n, string s3, string s4)
    176 USAGE:   defring(s1,s2,n,s3,s4);  s1..s4=strings, n=integer
     179"USAGE:   defring(s1,s2,n,s3,s4);  s1..s4=strings, n=integer
    177180CREATE:  Define a ring with name 's1', characteristic 's2', ordering 's4' and
    178181         n variables with names derived from s3 and make it the basering.
    179          If s3 is a single letter, say s3="a", and if n<=26 then a and the
     182         If s3 is a single letter, say s3=\"a\", and if n<=26 then a and the
    180183         following n-1 letters from the alphabeth (cyclic order) are taken as
    181184         variables. If n>26 or if s3 is a single letter followed by (, say
    182          s3="T(", the variables are T(1),...,T(n).
     185         s3=\"T(\", the variables are T(1),...,T(n).
    183186RETURN:  No return value
    184187NOTE:    This proc is useful for defining a ring in a procedure.
     
    187190         start with @ (see the file HelpForProc)
    188191EXAMPLE: example defring; shows an example
     192"
    189193{
    190194   string @newring = "ring "+s1+"=("+s2+"),(";
     
    207211
    208212proc defrings (int n, list #)
    209 USAGE:   defrings(n,[p]);  n,p integers
     213"USAGE:   defrings(n,[p]);  n,p integers
    210214CREATE:  Defines a ring with name Sn, characteristic p, ordering ds and n
    211215         variables x,y,z,a,b,...if n<=26 (resp. x(1..n) if n>26) and makes it
     
    213217RETURN:  No return value
    214218EXAMPLE: example defrings; shows an example
     219"
    215220{
    216221   int p;
     
    239244
    240245proc defringp (int n,list #)
    241 USAGE:   defringp(n,[p]);  n,p=integers
     246"USAGE:   defringp(n,[p]);  n,p=integers
    242247CREATE:  defines a ring with name Pn, characteristic p, ordering dp and n
    243248         variables x,y,z,a,b,...if n<=26 (resp. x(1..n) if n>26) and makes it
     
    245250RETURN:  No return value
    246251EXAMPLE: example defringp; shows an example
     252"
    247253{
    248254   int p;
     
    272278
    273279proc extendring (string na, int n, string va, string o, list #)
    274 USAGE:   extendring(na,n,va,o[iv,i,r]);  na,va,o=strings,
     280"USAGE:   extendring(na,n,va,o[iv,i,r]);  na,va,o=strings,
    275281         n,i=integers, r=ring, iv=intvec of positive integers or iv=0
    276282CREATE:  Define a ring with name `na` which extends the ring r by adding n new
     
    279285         -- The characteristic is the characteristic of r
    280286         -- The new vars are derived from va. If va is a single letter, say
    281             va="T", and if n<=26 then T and the following n-1 letters from
     287            va=\"T\", and if n<=26 then T and the following n-1 letters from
    282288            T..Z..T (resp. T(1..n) if n>26) are taken as additional variables.
    283             If va is a single letter followed by (, say va="x(", the new
     289            If va is a single letter followed by (, say va=\"x(\", the new
    284290            variables are x(1),...,x(n)
    285291         -- The ordering is the product ordering between the ordering of r and
     
    289295            not contain a 'c' or a 'C' the same rule applies to ordstr(r).
    290296         -  If no intvec iv is given, or if iv=0, o may be any allowed ordstr,
    291             like "ds" or "dp(2),wp(1,2,3),Ds(2)" or "ds(a),dp(b),ls" if a and b
     297            like \"ds\" or \"dp(2),wp(1,2,3),Ds(2)\" or \"ds(a),dp(b),ls\" if a and b
    292298            are globally (!) defined integers and if a+b+1<=n
    293299            If, however, a and b are local to a proc calling extendring, the
    294300            intvec iv must be used to let extendring know the values of a and b
    295301         -  If an intvec iv !=0 is given, iv[1],iv[2],... is taken for the 1st,
    296             2nd,... block of o, if o contains no substring "w" or "W" i.e. no
    297             weighted ordering (in the above case o="ds,dp,ls" and iv=a,b).
     302            2nd,... block of o, if o contains no substring \"w\" or \"W\" i.e. no
     303            weighted ordering (in the above case o=\"ds,dp,ls\" and iv=a,b).
    298304            If o contains a weighted ordering (only one (!) weighted block is
    299305            allowed) iv[1] is taken as size for the weight-vector, the next
    300306            iv[1] values of iv are taken as weights and the remaining values of
    301307            iv as block-size for the remaining non-weighted blocks.
    302             e.g. o="dp,ws,Dp,ds", iv=3,2,3,4,2,5 creates the ordering
     308            e.g. o=\"dp,ws,Dp,ds\", iv=3,2,3,4,2,5 creates the ordering
    303309            dp(2),ws(2,3,4),Dp(5),ds
    304310RETURN:  No return value
     
    308314         start with @ (see the file HelpForProc)
    309315EXAMPLE: example extendring; shows an example
     316"
    310317{
    311318//--------------- initialization and place c/C of ordering properly -----------
     
    425432
    426433proc fetchall (R, list #)
    427 USAGE:   fetchall(R[,s]);  R=ring/qring, s=string
     434"USAGE:   fetchall(R[,s]);  R=ring/qring, s=string
    428435CREATE:  fetch all objects of ring R (of type poly/ideal/vector/module/number/
    429436         matrix) into the basering.
    430437         If no 3rd argument is present, the names are the same as in R. If,
    431          say, f is a poly in R and the 3rd argument is the string "R", then f
     438         say, f is a poly in R and the 3rd argument is the string \"R\", then f
    432439         is maped to f_R etc.
    433440RETURN:  no return value
     
    439446         //***at the moment it does not work if R contains a map
    440447EXAMPLE: example fetchall; shows an example
     448"
    441449{
    442450   list @L@=names(R);
     
    469477
    470478proc imapall (R, list #)
    471 USAGE:   imapall(R[,s]);  R=ring/qring, s=string
     479"USAGE:   imapall(R[,s]);  R=ring/qring, s=string
    472480CREATE:  map all objects of ring R (of type poly/ideal/vector/module/number/
    473481         matrix) into the basering, by applying imap to all objects of R.
    474482         If no 3rd argument is present, the names are the same as in R. If,
    475          say, f is a poly in R and the 3rd argument is the string "R", then f
     483         say, f is a poly in R and the 3rd argument is the string \"R\", then f
    476484         is maped to f_R etc.
    477485RETURN:  no return value
     
    483491         //***at the moment it does not work if R contains a map
    484492EXAMPLE: example imapall; shows an example
     493"
    485494{
    486495   list @L@=names(R);
     
    513522
    514523proc mapall (R, ideal i, list #)
    515 USAGE:   mapall(R,i[,s]);  R=ring/qring, i=ideal of basering, s=string
     524"USAGE:   mapall(R,i[,s]);  R=ring/qring, i=ideal of basering, s=string
    516525CREATE:  map all objects of ring R (of type poly/ideal/vector/module/number/
    517526         matrix, map) into the basering, by mapping the jth variable of R to
    518527         the jth generator of the ideal i. If no 3rd argument is present, the
    519528         names are the same as in R. If, say, f is a poly in R and the 3rd
    520          argument is the string "R", then f is maped to f_R etc.
     529         argument is the string \"R\", then f is maped to f_R etc.
    521530RETURN:  no return value
    522531NOTE:    This procedure has the same effect as defining a map, say psi, by
     
    529538CAUTION: mapall does not work inside a procedure
    530539EXAMPLE: example mapall; shows an example
     540"
    531541{
    532542   list @L@=names(R); map @psi@ = R,i;
     
    566576
    567577proc ringtensor (string s, list #)
    568 USAGE:   ringtensor(s,r1,r2,...); s=string, r1,r2,...=rings
     578"USAGE:   ringtensor(s,r1,r2,...); s=string, r1,r2,...=rings
    569579CREATE:  A new base ring with name `s` if r1,r2,... are existing rings.
    570          If, say, s = "R" and the rings r1,r2,... exist, the new ring will
     580         If, say, s = \"R\" and the rings r1,r2,... exist, the new ring will
    571581         have name R, variables from all rings r1,r2,... and as monomial
    572582         ordering the block (product) ordering of r1,r2,... . Hence, R
     
    585595         start with @ (see the file HelpForProc)
    586596EXAMPLE: example ringtensor; shows an example
     597"
    587598{
    588599   int @ii,@q;
  • Singular/LIB/sing.lib

    r4996f52 rd2b2a7  
    1 // $Id: sing.lib,v 1.9 1998-04-03 22:47:13 krueger Exp $
     1// $Id: sing.lib,v 1.10 1998-05-05 11:55:38 krueger Exp $
    22//system("random",787422842);
    33//(GMG/BM, last modified 26.06.96)
    44///////////////////////////////////////////////////////////////////////////////
    55
    6 version="$Id: sing.lib,v 1.9 1998-04-03 22:47:13 krueger Exp $";
     6version="$Id: sing.lib,v 1.10 1998-05-05 11:55:38 krueger Exp $";
    77info="
    88LIBRARY:  sing.lib      PROCEDURES FOR SINGULARITIES
     
    3232
    3333proc deform (ideal id)
    34 USAGE:   deform(id); id=ideal or poly
     34"USAGE:   deform(id); id=ideal or poly
    3535RETURN:  matrix, columns are kbase of infinitesimal deformations
    3636EXAMPLE: example deform; shows an example
     37"
    3738{
    3839   list L=T1(id,"");
     
    5152
    5253proc dim_slocus (ideal i)
    53 USAGE:   dim_slocus(i);  i ideal or poly
     54"USAGE:   dim_slocus(i);  i ideal or poly
    5455RETURN:  dimension of singular locus of i
    5556EXAMPLE: example dim_slocus; shows an example
     57"
    5658{
    5759   return(dim(std(slocus(i))));
     
    6668
    6769proc is_active (poly f, id)
    68 USAGE:   is_active(f,id); f poly, id ideal or module
     70"USAGE:   is_active(f,id); f poly, id ideal or module
    6971RETURN:  1 if f is an active element modulo id (i.e. dim(id)=dim(id+f*R^n)+1,
    7072         if id is a submodule of R^n) resp. 0 if f is not active.
     
    7375         components). proc is_reg tests whether f is a regular parameter
    7476EXAMPLE: example is_active; shows an example
     77"
    7578{
    7679   if( size(id)==0 ) { return(1); }
     
    9396
    9497proc is_ci (ideal i)
    95 USAGE:   is_ci(i); i ideal
     98"USAGE:   is_ci(i); i ideal
    9699RETURN:  intvec = sequence of dimensions of ideals (j[1],...,j[k]), for
    97100         k=1,...,size(j), where j is minimal base of i. i is a complete
     
    101104         printlevel >=0: display comments (default)
    102105EXAMPLE: example is_ci; shows an example
     106"
    103107{
    104108   int n; intvec dimvec; ideal id;
     
    135139
    136140proc is_is (ideal i)
    137 USAGE:   is_is(id);  id ideal or poly
     141"USAGE:   is_is(id);  id ideal or poly
    138142RETURN:  intvec = sequence of dimensions of singular loci of ideals
    139143         generated by id[1]..id[i], k = 1..size(id); dim(0-ideal) = -1;
     
    141145NOTE:    printlevel >=0: display comments (default)
    142146EXAMPLE: example is_is; shows an example
     147"
    143148{
    144149  int l; intvec dims; ideal j;
     
    168173
    169174proc is_reg (poly f, id)
    170 USAGE:   is_reg(f,id); f poly, id ideal or module
     175"USAGE:   is_reg(f,id); f poly, id ideal or module
    171176RETURN:  1 if multiplication with f is injective modulo id, 0 otherwise
    172177NOTE:    let R be the basering and id a submodule of R^n. The procedure checks
     
    174179         //**quotient ring
    175180EXAMPLE: example is_reg; shows an example
     181"
    176182{
    177183   if( f==0 ) { return(0); }
     
    199205
    200206proc is_regs (ideal i, list #)
    201 USAGE:   is_regs(i[,id]); i poly, id ideal or module (default: id=0)
     207"USAGE:   is_regs(i[,id]); i poly, id ideal or module (default: id=0)
    202208RETURN:  1 if generators of i are a regular sequence modulo id, 0 otherwise
    203209NOTE:    let R be the basering and id a submodule of R^n. The procedure checks
     
    207213         printlevel >=1: display comments during computation
    208214EXAMPLE: example is_regs; shows an example
     215"
    209216{
    210217   int d,ii,r;
     
    246253
    247254proc milnor (ideal i)
    248 USAGE:   milnor(i); i ideal or poly
     255"USAGE:   milnor(i); i ideal or poly
    249256RETURN:  Milnor number of i, if i is ICIS (isolated complete intersection
    250257         singularity) in generic form, resp. -1 if not
     
    252259         printlevel >=0: display comments (default)
    253260EXAMPLE: example milnor; shows an example
     261"
    254262{
    255263  i = simplify(i,10);     //delete zeroes and multiples from set of generators
     
    298306
    299307proc nf_icis (ideal i)
    300 USAGE:   nf_icis(i); i ideal
     308"USAGE:   nf_icis(i); i ideal
    301309RETURN:  ideal = generic linear combination of generators of i if i is an ICIS
    302310         (isolated complete intersection singularity), return i if not
     
    304312         printlevel >=0: display comments (default)
    305313EXAMPLE: example nf_icis; shows an example
     314"
    306315{
    307316   i = simplify(i,10);  //delete zeroes and multiples from set of generators
     
    349358
    350359proc slocus (ideal i)
    351 USAGE:   slocus(i);  i dieal
     360"USAGE:   slocus(i);  i dieal
    352361RETURN:  ideal of singular locus of i
    353362NOTE:    this proc considers lower dimensional components as singular
    354363EXAMPLE: example slocus; shows an example
     364"
    355365{
    356366  int cod  = nvars(basering)-dim(std(i));
     
    367377
    368378proc spectrum (poly f, intvec w)
    369 USAGE:   spectrum(f,w);  f=poly, w=intvec;
     379"USAGE:   spectrum(f,w);  f=poly, w=intvec;
    370380ASSUME:  f is a weighted homogeneous isolated singularity w.r.t. the weights
    371381         given by w; w must consist of as many positive integers as there
     
    378388         singularity, displays a warning in this case
    379389EXAMPLE: example spectrum; shows an example
     390"
    380391{
    381392   int i,d,W;
     
    419430
    420431proc Tjurina (id, list #)
    421 USAGE:   Tjurina(id[,<any>]);  id=ideal or poly
     432"USAGE:   Tjurina(id[,<any>]);  id=ideal or poly
    422433ASSUME:  id=ICIS (isolated complete intersection singularity)
    423434RETURN:  standard basis of Tjurina-module of id,
     
    431442NOTE:    Tjurina number = -1 implies that id is not an ICIS
    432443EXAMPLE: example Tjurina; shows examples
     444"
    433445{
    434446//---------------------------- initialisation ---------------------------------
     
    468480
    469481proc tjurina (ideal i)
    470 USAGE:   tjurina(id);  id=ideal or poly
     482"USAGE:   tjurina(id);  id=ideal or poly
    471483ASSUME:  id=ICIS (isolated complete intersection singularity)
    472484RETURN:  int = Tjurina number of id
    473485NOTE:    Tjurina number = -1 implies that id is not an ICIS
    474486EXAMPLE: example tjurina; shows an example
     487"
    475488{
    476489   return(vdim(Tjurina(i)));
     
    485498
    486499proc T1 (ideal id, list #)
    487 USAGE:   T1(id[,<any>]);  id = ideal or poly
     500"USAGE:   T1(id[,<any>]);  id = ideal or poly
    488501RETURN:  T1(id): of type module/ideal if id is of type ideal/poly.
    489502         We call T1(id) the T1-module of id. It is a std basis of the
     
    507520         For a complete intersection the proc Tjurina is faster
    508521EXAMPLE: example T1; shows an example
     522"
    509523{
    510524   ideal J=simplify(id,10);
     
    570584
    571585proc T2 (ideal id, list #)
    572 USAGE:   T2(id[,<any>]);  id = ideal
     586"USAGE:   T2(id[,<any>]);  id = ideal
    573587RETURN:  T2(id): T2-module of id . This is a std basis of a presentation of
    574588         the module of obstructions of R=P/id, if P is the basering.
     
    586600         Use proc miniversal to get equations of miniversal deformation.
    587601EXAMPLE: example T2; shows an example
     602"
    588603{
    589604//--------------------------- initialisation ----------------------------------
     
    638653
    639654proc T12 (ideal i, list #)
    640 USAGE:   T12(i[,any]);  i = ideal
     655"USAGE:   T12(i[,any]);  i = ideal
    641656RETURN:  T12(i): list of 2 modules:
    642657             std basis of T1-module =T1(i), 1st order deformations
     
    657672         the list contains all objects used by proc miniversal
    658673EXAMPLE: example T12; shows an example
     674"
    659675{
    660676//--------------------------- initialisation ----------------------------------
     
    724740///////////////////////////////////////////////////////////////////////////////
    725741proc codim (id1, id2)
    726 USAGE:   codim(id1,id2); id1,id2 ideal or module, both must be standard bases
     742"USAGE:   codim(id1,id2); id1,id2 ideal or module, both must be standard bases
    727743RETURN:  int, which is:
    728744         1. the codimension of id2 in id1, i.e. the vectorspace dimension of
     
    734750         sum of the coefficients of q(t) (n dimension of basering)
    735751EXAMPLE: example codim; shows an example
     752"
    736753{
    737754   intvec iv1, iv2, iv;
  • Singular/LIB/standard.lib

    r4996f52 rd2b2a7  
    1 // $Id: standard.lib,v 1.7 1998-04-03 22:47:14 krueger Exp $
     1// $Id: standard.lib,v 1.8 1998-05-05 11:55:38 krueger Exp $
    22///////////////////////////////////////////////////////////////////////////////
    33
    4 version="$Id: standard.lib,v 1.7 1998-04-03 22:47:14 krueger Exp $";
     4version="$Id: standard.lib,v 1.8 1998-05-05 11:55:38 krueger Exp $";
    55info="
    66LIBRARY: standard.lib   PROCEDURES WHICH ARE ALWAYS LOADED AT START-UP
     
    1313
    1414proc stdfglm (ideal i, list #)
    15 USAGE:   stdfglm(i[,s]); i ideal, s string (any allowed ordstr of a ring)
     15"USAGE:   stdfglm(i[,s]); i ideal, s string (any allowed ordstr of a ring)
    1616RETURN:  stdfglm(i): standard basis of i in the basering, calculated via fglm
    17                      from ordering "dp" to the ordering of the basering.
     17                     from ordering \"dp\" to the ordering of the basering.
    1818         stdfglm(i,s): standard basis of i in the basering, calculated via
    1919                     fglm from ordering s to the ordering of the basering.
    2020EXAMPLE: example stdfglm; shows an example
     21"
    2122{
    2223   string os;
     
    5657
    5758proc stdhilbert(ideal i,list #)
    58 USAGE:   stdhilbert(i);  i ideal
     59"USAGE:   stdhilbert(i);  i ideal
    5960         stdhilbert(i,v); i homogeneous ideal, v intvec (the Hilbert function)
    6061RETURN:  stdhilbert(i): a standard basis of i (computing v internally)
    6162         stdhilbert(i,v): standard basis of i, using the given Hilbert function
    6263EXAMPLE: example stdhilbert; shows an example
     64"
    6365{
    6466   def R=basering;
  • Singular/LIB/tex.lib

    r4996f52 rd2b2a7  
    1 // $Id: tex.lib,v 1.5 1998-04-03 22:47:15 krueger Exp $   
     1// $Id: tex.lib,v 1.6 1998-05-05 11:55:39 krueger Exp $   
    22//
    33// author : Christian Gorzel email: gorzelc@math.uni-muenster.de
     
    55///////////////////////////////////////////////////////////////////////////////
    66
    7 version="$Id: tex.lib,v 1.5 1998-04-03 22:47:15 krueger Exp $";
     7version="$Id: tex.lib,v 1.6 1998-05-05 11:55:39 krueger Exp $";
    88info="
    99LIBRARY: tex.lib      PROCEDURES FOR TYPESET OF SINGULAROBJECTS IN TEX
     
    4545
    4646proc closetex(string fname, list #)
    47 USAGE:   closetex(fname[,style]); fname,style = string
     47"USAGE:   closetex(fname[,style]); fname,style = string
    4848RETURN:  nothing; writes a LaTeX2e closing line into file fname
    4949NOTE:    style overwrites the default setting latex2e; maybe latex,amstex,tex
    50          preceeding ">>" end ending ".tex" may miss in fname;
     50         preceeding \">>\" end ending \".tex\" may miss in fname;
    5151         overwriting an existing file is not possible
    5252EXAMPLE: example closetex; shows an example
     53"
    5354{
    5455  string default = "latex2e";       // may be changed appropriatly (C.G.)
     
    8182
    8283proc tex(string fname, list #)
    83 USAGE:   tex(fname[,style]); fname,style = string
     84"USAGE:   tex(fname[,style]); fname,style = string
    8485RETURN:  nothing; calls latex2e for compiling the file fname
    8586NOTE:    style overwrites the default setting latex2e; maybe latex,amstex,tex
    86          ending ".tex" may miss in fname       
     87         ending \".tex\" may miss in fname       
    8788EXAMPLE: example tex; shows an example
     89"
    8890{
    8991  string default = "latex2e";           // may be changed appropriatly (C.G.)
     
    125127
    126128proc opentex(string fname, list #)         
    127 USAGE:   opentex(fname[,style]); fname,style = string
     129"USAGE:   opentex(fname[,style]); fname,style = string
    128130RETURN:  nothing; writes as LaTeX2e header into a new file fname
    129131NOTE:    suffix .tex may miss in fname
    130132         style overwrites the default setting latex2e; may be latex,amstex,tex
    131133EXAMPLE: example opentex; shows an example
     134"
    132135{
    133136  int i =1;
     
    166169
    167170proc texdemo(list #)
    168 USAGE:   texdemo();
     171"USAGE:   texdemo();
    169172RETURN:  nothing; generates automatically a LaTeX2e file called: texlibdemo.tex
    170173         explaining the  features of tex.lib and its gloabl variables
    171174NOTE:    this proc takes some minutes         
    172175EXAMPLE: example texdemo; executes the generation
     176"
    173177{ int make_demo = size(#);
    174178
     
    200204
    201205proc texfactorize(string fname, poly f, list #)
    202 USAGE:   opentex(fname,f); fname = string; f = poly
     206"USAGE:   opentex(fname,f); fname = string; f = poly
    203207RETURN:  string, the poly as as product of its irreducible factors
    204208                 in TeX-typesetting if fname == empty string;
    205209         otherwise append this to file fname.tex; return nothing 
    206 NOTE:    preceeding ">>" end ending ".tex" may miss in fname
     210NOTE:    preceeding \">>\" end ending \".tex\" may miss in fname
    207211EXAMPLE: example texfactorize; shows an example
     212"
    208213{
    209214  def @r = basering;
     
    272277
    273278proc texmap(string fname, def m, def @r1, def @r2, list #)
    274 USAGE:   texmap(fname,f); fname = string; m = string/map, @r1,@r2 = ring
     279"USAGE:   texmap(fname,f); fname = string; m = string/map, @r1,@r2 = ring
    275280RETURN:  string, the map m from @r1 to @r2 preeceded by its name if m = string
    276281                 in TeX-typesetting if fname == empty string;
    277282         otherwise append this to file fname.tex; return nothing 
    278 NOTE:    preceeding ">>" end ending ".tex" may miss in fname
     283NOTE:    preceeding \">>\" end ending \".tex\" may miss in fname
    279284EXAMPLE: example texmap; shows an example
     285"
    280286{
    281287  int saveDollars= defined(NoDollars);
     
    419425
    420426proc texname(string fname, string s)
    421 USAGE:   texname(fname,s);  fname,s = string
    422 RETURN:  the string s if fname == the empty string "" ;
     427"USAGE:   texname(fname,s);  fname,s = string
     428RETURN:  the string s if fname == the empty string \"\" ;
    423429         otherwise append s to file fname.tex; return nothing
    424 NOTE:    preceeding ">>" end ending ".tex" may miss in fname;         
     430NOTE:    preceeding \">>\" end ending \".tex\" may miss in fname;         
    425431EXAMPLE: example texname; shows an example
     432"
    426433{
    427434  string st, extr;
     
    495502
    496503proc texobj(string fname, list #)
    497 USAGE:   texobj(fname,l); fname = string,l = list of Singular dataypes
     504"USAGE:   texobj(fname,l); fname = string,l = list of Singular dataypes
    498505RETURN:  string, the objects in TeX-typesetting if fname == empty string;
    499506         otherwise append this to file fname.tex; return nothing   
    500 NOTE:    preceeding ">>" end ending ".tex" may miss in fname;         
     507NOTE:    preceeding \">>\" end ending \".tex\" may miss in fname;         
    501508EXAMPLE: example texobj; shows an example
     509"
    502510{
    503511 int i,j,k,nr,nc,linear,Tw,Dollars;
     
    759767
    760768proc texproc(string fname,string pname)
    761 USAGE:   opentex(fname,pname); fname,pname = string
     769"USAGE:   opentex(fname,pname); fname,pname = string
    762770RETURN:  string, the proc in a verbatim environment in TeX-typesetting
    763771                 if fname == empty string;
    764772         otherwise append this to file fname.tex; return nothing 
    765 NOTE:    preceeding ">>" end ending ".tex" may miss in fname;
     773NOTE:    preceeding \">>\" end ending \".tex\" may miss in fname;
    766774CAUTION: texproc cannot applied on itself correctly         
    767775EXAMPLE: example texproc; shows an example
     776"
    768777{
    769778  int i,j=1,1;
     
    825834
    826835proc texring(string fname, def r, list #)
    827 USAGE:   texring(fname, r[,l]); fname = string; r = ring;
     836"USAGE:   texring(fname, r[,l]); fname = string; r = ring;
    828837                                l=list of strings : controls the symbol for
    829838                                coefficint field etc. see example texdemo();
    830839RETURN:  string, the ring in TeX-typesetting if fname == empty string;
    831840         otherwise append this to file fname.tex; return nothing   
    832 NOTE:    preceeding ">>" end ending ".tex" may miss in fname;       
     841NOTE:    preceeding \">>\" end ending \".tex\" may miss in fname;       
    833842EXAMPLE: example texring; shows an example
     843"
    834844{
    835845  int i,galT,flag,mipo,nopar,Dollars,TB,TA;
     
    10101020
    10111021proc rmx(string fname)
    1012 USAGE:   rmx(fname); fname = string
     1022"USAGE:   rmx(fname); fname = string
    10131023RETURN:  nothing; removes .log and .aux files associated to file <fname>     
    1014          removes tex and xdvi file too, if suffix ".tex" or ".dvi" is given
     1024         removes tex and xdvi file too, if suffix \".tex\" or \".dvi\" is given
    10151025NOTE:    if fname ends by .dvi or .tex
    10161026         fname.dvi or fname.dvi and fname.tex will be deleted, too           
    10171027EXAMPLE: example rmx; shows an example
     1028"
    10181029{
    10191030  int i,suffix= 1,0;
     
    10581069
    10591070proc xdvi(string fname, list #)
    1060 USAGE:   xdvi(fname[,style]); fname,style = string
     1071"USAGE:   xdvi(fname[,style]); fname,style = string
    10611072RETURN:  nothing; displays dvi-file fname.dvi with previewer xdvi
    10621073NOTE:    ending .dvi may miss in fname
    10631074         style overwrites the default setting xdvi
    10641075EXAMPLE: example xdvi ; shows an example
     1076"
    10651077{
    10661078  int i=1;
     
    13311343}
    13321344
    1333 proc parst(string s,int sec)                // parse parameter
     1345proc parst(string s,int sec)"                // parse parameter
    13341346// sec parameter to see if in parsp a fraction follows
     1347"
    13351348{ int i,j =1,-1;
    13361349  int b,k,jj,mz;                         // begin and end
  • Singular/LIB/tst.lib

    r4996f52 rd2b2a7  
    1 // $Id: tst.lib,v 1.3 1998-04-03 22:47:15 krueger Exp $
     1// $Id: tst.lib,v 1.4 1998-05-05 11:55:40 krueger Exp $
    22//(obachman, last modified 2/13/98)
    33///////////////////////////////////////////////////////////////////////////////
    44
    5 version="$Id: tst.lib,v 1.3 1998-04-03 22:47:15 krueger Exp $";
     5version="$Id: tst.lib,v 1.4 1998-05-05 11:55:40 krueger Exp $";
    66info="
    77LIBRARY:  tst.lib      PROCEDURES FOR RUNNING AUTOMATIC TST TESTS
     
    1717
    1818proc tst_system(string s)
    19 USAGE:    tst_system(s); s string
    20 RETURN:   string which is stdout and stderr of system("sh", s)
     19"USAGE:    tst_system(s); s string
     20RETURN:   string which is stdout \x and stderr of system(\"sh\", s)
    2121EXAMPLE:  example tst_system; shows examples
     22"
    2223{
    2324  string tmpfile = "/tmp/tst_" + string(system("pid"));
     
    3940 
    4041proc tst_ignore
    41 USAGE:    tst_ignore(any,[keyword], [link])
     42"USAGE:    tst_ignore(any,[keyword], [link])
    4243            any     -- valid argument to string()
    43             keyword -- one of "time" or "memory"
     44            keyword -- one of \"time\" or \"memory\"
    4445            link    -- a link which can be written to
    4546RETURN:   none; writes string(any) to link (or stdout, if no link given),
    46           prepending prefix "// ignore:", or "// ignore: time:",
    47           "//ignore: memory:"  if called with the respective keywords;
     47          prepending prefix \"// ignore:\", or \"// ignore: time:\",
     48          \"//ignore: memory:\"  if called with the respective keywords;
    4849          should be used in tst files to output system dependent data
    49           (like date, pathnames) and timings With the keyword "time",
    50           resp. memory usgae with the keyword "memory"
     50          (like date, pathnames) { and timings With the keyword \"time\",
     51          resp. memory usage with the keyword \"memory\"
    5152EXAMPLE:  example tst_ignore; shows examples
     53"
    5254{
    5355  string s;
     
    130132
    131133proc tst_init
    132 USAGE:   tst_init()
     134"USAGE:   tst_init()
    133135RETURN:  none; writes some identification data to stdout;
    134136         should be called as first routine in a tst file
    135137EXAMPLE: example tst_init; shows example
     138"
    136139{
    137140  tst_ignore("USER    : " + system("getenv", "USER"));
Note: See TracChangeset for help on using the changeset viewer.