Changeset d2b2a7 in git for Singular/LIB/ring.lib


Ignore:
Timestamp:
May 5, 1998, 1:55:40 PM (26 years ago)
Author:
Kai Krüger <krueger@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.