Changeset df346ce in git for Singular/LIB


Ignore:
Timestamp:
Jan 12, 2001, 8:52:48 PM (23 years ago)
Author:
Christoph Lossen <lossen@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd08f5f0bb3329b8ca19f23b74cb1473686415c3a')
Children:
4ee700919d4a2c6339cf4c4678715d6669aeb753
Parents:
48b00a5d1e6b037949cfdc671392031e9321de1a
Message:
* lossen: Help strings of main procedures changed


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/standard.lib

    r48b00a rdf346ce  
    11//////////////////////////////////////////////////////////////////////////////
    2 version="$Id: standard.lib,v 1.52 2000-12-22 14:52:32 greuel Exp $";
     2version="$Id: standard.lib,v 1.53 2001-01-12 19:52:48 lossen Exp $";
    33category="Miscellaneous";
    44info="
     
    6666
    6767proc stdhilb(ideal i,list #)
    68 "SYNTAX:  stdhilb(ideal_expression);
    69          stdhilb(ideal_expression, intvec_expression);
     68"SYNTAX: stdhilb ( ideal_expression )
     69         stdhilb ( ideal_expression, intvec_expression )
    7070TYPE:    ideal
    7171PURPOSE: computes the standard basis of the homogeneous ideal in the basering,
     
    127127example
    128128{ "EXAMPLE:"; echo = 2;
    129    ring  r = 0,(x,y,z),lp;
    130    ideal i = y3+x2, x2y+x2, x3-x2, z4-x2-y;
    131    ideal i1= stdhilb(i); i1;
     129   ring  r=0,(x,y,z),lp;
     130   ideal i=y3+x2,x2y+x2,x3-x2,z4-x2-y;
     131   ideal i1=stdhilb(i); i1;
    132132   // is in this case equivalent to:
    133133   intvec v=1,0,0,-3,0,1,0,3,-1,-1;
     
    137137
    138138proc groebner(def i, list #)
    139 "SYNTAX:  groebner(ideal_expression);
    140          groebner(module_expression);
    141          groebner(ideal_expression, int_expression);
    142          groebner(module_expression, int_expression);
     139"SYNTAX: groebner ( ideal_expression )
     140         groebner ( module_expression )
     141         groebner ( ideal_expression, int_expression )
     142         groebner ( module_expression, int_expression )
    143143TYPE:    type of the first argument
    144 PURPOSE: computes the standard basis of the first argument i
    145          (ideal or module) by a heuristically chosen method:
    146          If the ordering of the current ring is a local ordering, or
    147          if it is a non-block ordering and the current ring has no
    148          parameters, then std(i) is returned.
    149          Otherwise, i is mapped into a ring with no parameters and
    150          ordering dp, where its Hilbert series is computed. This is
    151          followed by a Hilbert-series based std computation in the
    152          original ring.
    153 NOTE: If a 2nd argument 'wait' is given, then the computation proceeds
    154       at most 'wait' seconds. That is, if no result could be computed in
    155       'wait' seconds, then the computation is interrupted, 0 is returned,
     144PURPOSE: computes the standard basis of the first argument @code{I}
     145         (ideal or module), by a heuristically chosen method: if the
     146         ordering of the current ring is a local ordering, or if it is a
     147         non-block ordering and the current ring has no parameters, then
     148         @code{std(I)} is returned. Otherwise, @code{I} is mapped into a
     149         ring with no parameters and ordering dp, where its Hilbert series
     150         is computed. This is followed by a Hilbert-series based std
     151         computation in the original ring.
     152NOTE: If a 2nd argument @code{wait} is given, then the computation proceeds
     153      at most @code{wait} seconds. That is, if no result could be computed in
     154      @code{wait} seconds, then the computation is interrupted, 0 is returned,
    156155      a warning message is displayed, and the global variable
    157       'groebner_error' is defined.
     156      @code{groebner_error} is defined.
    158157SEE ALSO: stdhilb, stdfglm, std
    159158KEYWORDS: time limit on computations; MP, groebner basis computations
     
    408407}
    409408example
    410 { "EXAMPLE: "; echo = 2;
    411   ring r = 0, (a,b,c,d), lp;
     409{ "EXAMPLE: "; echo=2;
     410  ring r=0,(a,b,c,d),lp;
    412411  option(prot);
    413   ideal i = a+b+c+d, ab+ad+bc+cd, abc+abd+acd+bcd, abcd-1; // cyclic 4
     412  ideal i=a+b+c+d,ab+ad+bc+cd,abc+abd+acd+bcd,abcd-1; // cyclic 4
    414413  groebner(i);
    415   ring rp = (0, a, b), (c,d), lp;
    416   ideal i = imap(r, i);
    417   ideal j = groebner(i);
     414  ring rp=(0,a,b),(c,d), lp;
     415  ideal i=imap(r,i);
     416  ideal j=groebner(i);
    418417  option(noprot);
    419   j; simplify(j, 1); std(i);
    420   if (system("with", "MP")) {groebner(i, 0);}
     418  j; simplify(j,1); std(i);
     419  if (system("with","MP")) {groebner(i,0);}
    421420  defined(groebner_error);
    422421}
     
    446445@code{nres} (classical method using syzygies) , see @ref{nres}.
    447446
    448 @item @strong{homogenous ideals and k == 0:}
     447@item @strong{homogeneous ideals and k=0:}
    449448@code{lres} (La'Scala's method), see @ref{lres}.
    450449
    451 @item @strong{not minimized resolution,  and, homogenous input with k != 0 or local rings:}
     450@item @strong{not minimized resolution and (homogeneous input with k<>0
     451or local rings):}
    452452@code{sres} (Schreyer's method), see @ref{sres}.
    453453
     
    456456@end table
    457457@item @strong{Note:}
    458 Accessing single elements of a resolution may require that some partial computations have to be finished and may therefor take some time.
     458Accessing single elements of a resolution may require that some partial
     459computations have to be finished and may therefore take some time.
    459460@end table
    460461@c ref
     
    575576{"EXAMPLE:"; echo = 2;
    576577  ring r=0,(x,y,z),dp;
    577   ideal i=xz,yz,x^3-y^3;
    578   def l=res(i,0); // homogenous ideal: uses lres
    579   l;              // resolution is not yet minimized
     578  ideal i=xz,yz,x3-y3;
     579  def l=res(i,0); // homogeneous ideal: uses lres
     580  l;
    580581  print(betti(l), "betti"); // input to betti may be of type resolution
    581582  l[2];         // element access may take some time
    582   i=i, x+1;
    583   l=res(i,0);   // inhomogenous ideal: uses mres
    584   l;            // resolution is not yet minimized
     583  i=i,x+1;
     584  l=res(i,0);   // inhomogeneous ideal: uses mres
     585  l;
    585586  ring rs=0,(x,y,z),ds;
    586   ideal i = imap(r, i);
     587  ideal i=imap(r,i);
    587588  def l=res(i,0); // local ring not minimized: uses sres
    588   l;              // resolution is minimized
     589  l;
    589590  res(i,0,0);     // local ring and minimized: uses mres
    590591}
     
    592593
    593594proc quot (m1,m2,list #)
    594 "SYNTAX: quot(module_expression, module_expression);
    595          @*quot(module_expression, module_expression, int_expression);
    596          @*quot(ideal_expression, ideal_expression);
    597          @*quot(ideal_expression, ideal_expression, int_expression);
     595"SYNTAX: @code{quot} ( module_expression, module_expression )
     596         @*@code{quot} ( module_expression, module_expression, int_expression )
     597         @*@code{quot} ( ideal_expression, ideal_expression )
     598         @*@code{quot} ( ideal_expression, ideal_expression, int_expression )
    598599TYPE:    ideal
    599 SYNTAX:  quot(module_expression, ideal_expression);
     600SYNTAX:  @code{quot} ( module_expression, ideal_expression )
    600601TYPE:    module
    601 PURPOSE: computes the quotient of the first and the 2nd argument
    602          If a 3rd argumnt 'n' is given the n-th method is used
    603          (1 <= n <= 5).
     602PURPOSE: computes the quotient of the first and the 2nd argument.
     603         If a 3rd argument 'n' is given the n-th method is used
     604         (n=1...5).
    604605SEE ALSO: quotient
    605606EXAMPLE: example quot; shows an example"
     
    636637  ideal id2=x2+xyz,y2-z3y,z3+y5xz;
    637638  option(prot);
    638   ideal id6=quotient(id1,id2);
    639   id6;
    640   ideal id7=quot(id1,id2,1);
    641   id7;
    642   ideal id8=quot(id1,id2,2);
    643   id8;
     639  ideal id3=quotient(id1,id2);
     640  id3;
     641  ideal id4=quot(id1,id2,1);
     642  id4;
     643  ideal id5=quot(id1,id2,2);
     644  id5;
    644645}
    645646
     
    847848///
    848849proc sprintf(string fmt, list #)
    849 "USAGE:    sprintf(fmt, ...) fmt string
     850"SYNTAX:  @code{sprintf} ( string_expression [, any_expressions] )
    850851RETURN:   string
    851 PURPOSE:  sprintf performs output formatting. The first argument is a format
    852           control string. Additional arguments may be required, depending on
    853           the contents of the control string. A series of output characters is
    854           generated as directed by the control string; these characters are
    855           returned as a string. The control string is simply text to be copied,
    856           except that the string may contain conversion specifications. Do
    857           'help print:' for a listing of valid conversion specifications.
    858           As an addition to the conversions of 'print', the '%n' and '%2'
    859           conversion specification does not consume an additional argument,
    860           but simply generates a newline character.
     852PURPOSE:  @code{sprintf(fmt,...);} performs output formatting. The first
     853          argument is a format control string. Additional arguments may be
     854          required, depending on the content of the control string. A series
     855          of output characters is generated as directed by the control string;
     856          these characters are returned as a string. @*
     857          The control string @code{fmt} is simply text to be copied,
     858          except that the string may contain conversion specifications.@*
     859          Do @code{help print;} for a listing of valid conversion
     860          specifications. As an addition to the conversions of @code{print},
     861          the @code{%n} and @code{%2} conversion specification does not
     862          consume an additional argument, but simply generates a newline
     863          character.
    861864NOTE:     If one of the additional arguments is a list, then it should be
    862           enclosed once more into a list() command, since passing a list
     865          enclosed once more into a @code{list()} command, since passing a list
    863866          as an argument flattens the list by one level.
    864867SEE ALSO: fprintf, printf, print, string
     
    934937
    935938proc printf(string fmt, list #)
    936 "USAGE:    printf(fmt, ...) fmt string
     939"SYNTAX:  @code{printf} ( string_expression [, any_expressions] )
    937940RETURN:   none
    938 PURPOSE:  printf performs output formatting. The first argument is a format
    939           control string. Additional arguments may be required, depending on
    940           the contents of the control string. A series of output characters is
    941           generated as directed by the control string; these characters are
    942           displayed (i.e. printed to standard out).
    943           The control string is simply text to be copied, except that the
    944           string may contain conversion specifications.
    945           Do 'help print:' for a listing of valid conversion specifications.
    946           As an addition to the conversions of 'print', the '%n' and '%2'
    947           conversion specification does not consume an additional argument,
    948           but simply generates a newline character.
    949 
     941PURPOSE:  @code{printf(fmt,...);} performs output formatting. The first
     942          argument is a format control string. Additional arguments may be
     943          required, depending on the content of the control string. A series
     944          of output characters is generated as directed by the control string;
     945          these characters are displayed (i.e., printed to standard out). @*
     946          The control string @code{fmt} is simply text to be copied, except
     947          that the string may contain conversion specifications. @*
     948          Do @code{help print;} for a listing of valid conversion
     949          specifications. As an addition to the conversions of @code{print},
     950          the @code{%n} and @code{%2} conversion specification does not
     951          consume an additional argument, but simply generates a newline
     952          character.
    950953NOTE:     If one of the additional arguments is a list, then it should be
    951           enclosed once more into a list() command, since passing a list
    952           as an argument flattens the list by one level.
     954          enclosed once more into a @code{list()} command, since passing a
     955          list as an argument flattens the list by one level.
    953956SEE ALSO: sprintf, fprintf, print, string
    954957EXAMPLE : example printf; shows an example
     
    962965  module m=[1,y],[0,x+z];
    963966  intmat M=betti(mres(m,0));
    964   list l = r, m, M;
    965   printf("s:%s, l:%l", 1, 2);
    966   printf("s:%s", l);
    967   printf("s:%s", list(l));
    968   printf("2l:%2l", list(l));
    969   printf("%p", list(l));
    970   printf("%;", list(l));
    971   printf("%b", M);
     967  list l=r,m,M;
     968  printf("s:%s,l:%l",1,2);
     969  printf("s:%s",l);
     970  printf("s:%s",list(l));
     971  printf("2l:%2l",list(l));
     972  printf("%p",list(l));
     973  printf("%;",list(l));
     974  printf("%b",M);
    972975}
    973976
    974977
    975978proc fprintf(link l, string fmt, list #)
    976 "USAGE:    fprintf(l, fmt, ...) l link; fmt string
     979"SYNTAX:  @code{fprintf} ( link_expression, string_expression [,
     980          any_expressions] )
    977981RETURN:   none
    978 PURPOSE:  fprintf performs output formatting. The second argument is a format
    979           control string. Additional arguments may be required, depending on
    980           the contents of the control string. A series of output characters is
    981           generated as directed by the control string; these characters are
     982PURPOSE:  @code{fprintf(l,fmt,...);} performs output formatting.
     983          The second argument is a format control string. Additional
     984          arguments may be required, depending on the content of the
     985          control string. A series of output characters is generated as
     986          directed by the control string; these characters are
    982987          written to the link l.
    983           The control string is simply text to be copied, except that the
    984           string may contain conversion specifications.
    985           Do 'help print:' for a listing of valid conversion specifications.
    986           As an addition to the conversions of 'print', the '%n' and '%2'
    987           conversion specification does not consume an additional argument,
    988           but simply generates a newline character.
    989 
     988          The control string @code{fmt} is simply text to be copied, except
     989          that the string may contain conversion specifications.@*
     990          Do @code{help print;} for a listing of valid conversion
     991          specifications. As an addition to the conversions of @code{print},
     992          the @code{%n} and @code{%2} conversion specification does not
     993          consume an additional argument, but simply generates a newline
     994          character.
    990995NOTE:     If one of the additional arguments is a list, then it should be
    991           enclosed once more into a list() command, since passing a list
    992           as an argument flattens the list by one level.
     996          enclosed once more into a @code{list()} command, since passing
     997          a list as an argument flattens the list by one level.
    993998SEE ALSO: sprintf, printf, print, string
    994999EXAMPLE : example fprintf; shows an example
     
    10021007  module m=[1,y],[0,x+z];
    10031008  intmat M=betti(mres(m,0));
    1004   list l = r, m, M;
    1005   link li = ""; // link to stdout
    1006   fprintf(li, "s:%s, l:%l", 1, 2);
    1007   fprintf(li, "s:%s", l);
    1008   fprintf(li, "s:%s", list(l));
    1009   fprintf(li, "2l:%2l", list(l));
    1010   fprintf(li, "%p", list(l));
    1011   fprintf(li, "%;", list(l));
    1012   fprintf(li, "%b", M);
     1009  list l=r,m,M;
     1010  link li="";  // link to stdout
     1011  fprintf(li,"s:%s,l:%l",1,2);
     1012  fprintf(li,"s:%s",l);
     1013  fprintf(li,"s:%s",list(l));
     1014  fprintf(li,"2l:%2l",list(l));
     1015  fprintf(li,"%p",list(l));
     1016  fprintf(li,"%;",list(l));
     1017  fprintf(li,"%b",M);
    10131018}
    10141019
Note: See TracChangeset for help on using the changeset viewer.