Changeset 2b4755 in git


Ignore:
Timestamp:
Mar 19, 2004, 5:28:50 PM (20 years ago)
Author:
Viktor Levandovskyy <levandov@…>
Branches:
(u'spielwiese', 'a719bcf0b8dbc648b128303a49777a094b57592c')
Children:
20ee6d53a86cc7bbe5d1762a73628af8fb98231a
Parents:
72391bbb1d0acd8a82fe089b6bb86b8c7e773a73
Message:
*levandov: doc-related patches and changes


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/ncalg.lib

    r72391b r2b4755  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: ncalg.lib,v 1.1 2004-03-19 15:52:29 levandov Exp $";
     2version="$Id: ncalg.lib,v 1.2 2004-03-19 16:28:49 levandov Exp $";
    33category="Noncommutative";
    44info="
     
    2525// functions for debug/logging
    2626
    27 static proc mySetRing (string @baseName, list #)
     27proc mySetRing (string @baseName, list #)
    2828// set @@@_RING to description of current ring
    2929{
     
    6060}
    6161
    62 static proc myGetRing ()
     62proc myGetRing ()
    6363// get desription of current ring
    6464{
     
    7070}
    7171
    72 static proc myGetRingName ()
     72proc myGetRingName ()
    7373// get desription of current ring, only family
    7474{
     
    8181}
    8282
    83 static proc myGetRingChar ()
     83proc myGetRingChar ()
    8484// get desription of current ring, only family
    8585{
     
    9393
    9494
    95 static proc myInt ( list # )
     95proc myInt ( list # )
    9696// return 0 or int(#)
    9797{
  • Singular/LIB/nctools.lib

    r72391b r2b4755  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: nctools.lib,v 1.2 2004-03-18 21:34:03 levandov Exp $";
     2version="$Id: nctools.lib,v 1.3 2004-03-19 16:28:50 levandov Exp $";
    33category="Noncommutative";
    44info="
     
    2323
    2424AUXILIARY PROCEDURES:
    25 wRing(r);               alias to weightedRing,
    2625Newton(f);              Newton diagram of a polynomial f,
    2726NCRelations(r);         Recovers the non-commutative relations of a G-algebra,
    2827IsCentral(p,[v]);       Check for the commutativity of polynomial p with the G-algebra,
    2928UpOneMatrix(N);         Returns NxN matrix with 1's in the whole upper triagle,
     29
     30ALIAS PROCEDURES:
     31wRing(r);               alias to weightedRing,
    3032";
    3133
    32 ///////////////////////////////////////////////////////////////////////////////
    33 
    34 proc wRing(ring r)
    35 "USAGE:   wRing(r); r a ring
    36 RETURN:  the same ring r but the order
    37 NOTE:    you have to activate this ring with the "setring" command
    38 EXAMPLE: example wRing; shows examples
    39 SEE ALSO: weightedRing, Gweights
    40 "{
    41   return(weightedRing(r));
    42 }
    43 example
    44 {
    45   "EXAMPLE:";echo=2;
    46   LIB "qmatrix.lib";
    47   def r=quant(3); // generate quant(3) and store it in r
    48   setring r; // set the ring r the active ring
    49   r;
    50   def s=wRing(r);
    51   setring s;
    52   s;
    53 }
    5434///////////////////////////////////////////////////////////////////////////////
    5535
     
    179159///////////////////////////////////////////////////////////////////////////////
    180160
     161proc wRing(def r)
     162"USAGE:   see weightedRing
     163"{
     164  def a=weightedRing(r);
     165  if (typeof(a)=="ring") { return(a); }
     166  "Error";
     167  return();
     168}
     169example
     170{
     171  "EXAMPLE:";echo=2;
     172  LIB "qmatrix.lib";
     173  def r=quant(3); // generate quant(3) and store it in r
     174  setring r; // set the ring r the active ring
     175  r;
     176  def s=wRing(r);
     177  setring s;
     178  s;
     179}
     180
     181///////////////////////////////////////////////////////////////////////////////
     182
    181183// This procedure computes ei+ej-f with f running in Newton(pij) and deletes the zero rows
    182184
     
    358360    if (n>1)
    359361    {
    360       for (int i=2; i<=n; i++)
     362      int i,j;
     363      for (i=2; i<=n; i++)
    361364      {
    362         for (int j=1; j<i; j++)
     365        for (j=1; j<i; j++)
    363366        {
    364367          f=var(i)*var(j); // yx=c*xy+...
     
    389392{
    390393  "EXAMPLE:";echo=2;
    391   ring r = 0,(x,y,z),lp;
     394  ring r = 0,(x,y,z),dp;
    392395  matrix C[3][3]=0,1,2,0,0,-1,0,0,0;
    393396  print(C);
     
    416419    else
    417420    {
    418       setring #[1];
     421      def @R1 = #[1];
     422      setring @R1;
    419423    }
    420424  }
     
    493497  "EXAMPLE:";echo=2;
    494498  ring r=0,(x,y,z),dp;
    495   poly c=;
     499  matrix D[3][3]=0;
     500  D[1,2]=-z;
     501  D[1,3]=2*x;
     502  D[2,3]=-2*y;
     503  ncalgebra(1,D); // this is U(sl_2)
     504  poly c=4*x*y+z^2-2*z;
    496505  IsCentral(c,1);
    497506}
     
    605614    return(0);
    606615  }
     616  if (n<1) { return(0); }
    607617  number mp = par(1); 
    608618  if (n==1) { return(mp-1); }
    609619  if (n==2) { return(mp+1); }
    610   string OR = nameof(basering);
     620  def OldRing = basering;
    611621  string CH = charstr(basering);
    612622  string MCH;
     
    616626    MCH=MCH+CH[j]; j++;
    617627  }
    618   string SR = "ring @@r="+MCH+","+parstr(basering)+",dp;";
     628  string SR = "ring @@rR="+MCH+","+parstr(basering)+",dp;";
    619629  execute(SR);
    620   setring @@r;
    621630  poly @t=var(1)^n-1; // (x^2i-1)=(x^i-1)(x^i+1)
    622631  list l=factorize(@t);
     
    627636  int cnt=1;
    628637  poly res;
    629   for (j=s-1;j>=1;j--)
     638  for (j=s-1; j>=1; j--)
    630639  {
    631640    if ( deg(@l[j]) > d) { d=deg(@l[j]); }
    632641  }
    633   for (j=1;j<=s;j++)
     642  for (j=1; j<=s; j++)
    634643  {
    635644    if ( deg(@l[j]) == d) { @d[cnt]=@l[j]; cnt++; }
    636645  }
    637   if (size(@d)==1) { res = poly(@d[1]); }
     646  if ( size(@d)==1 )
     647  {
     648    res = poly(@d[1]);
     649  }
    638650  else
    639651  {
     
    647659    res = @d[j];
    648660  }
    649   execute("setring "+OR);
    650   poly I = imap(@@r,res);
     661  setring OldRing;
     662  poly I = imap(@@rR,res);
    651663  mp = leadcoef(I);
    652   kill @@r;
     664  kill @@rR;
    653665  return(mp);
    654666}
     
    779791  string NewRing = "ring @R=("+charstr(basering)+"),("+varstr(basering)+"),("+ordstr(basering)+");";
    780792  execute(NewRing);
    781   setring @R;
    782793  matrix @E = UpOneMatrix(N);
    783794  @E = -1*(@E);
  • Singular/LIB/qmatrix.lib

    r72391b r2b4755  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: qmatrix.lib,v 1.2 2004-03-18 21:36:09 levandov Exp $";
     2version="$Id: qmatrix.lib,v 1.3 2004-03-19 16:28:50 levandov Exp $";
    33category="Noncommutative";
    44info="
     
    1919";
    2020
     21LIB "ncalg.lib";
    2122LIB "nctools.lib";
    22 
    2323///////////////////////////////////////////////////////////////////////////////
    2424
     
    148148      m[i,nv+1-i]=1;
    149149    }
     150    int chr = myInt(#);
    150151    ring @rrr=(0,q),(y(1..nv)),Dp;
    151     if (size(#)>0)
    152     {
    153       if ( typeof( #[1] ) == "int" )
    154       {
    155         int chr = #[1];
    156         if (chr>1)
    157         {
    158           minpoly = RooOfUnity(chr);
    159         }
    160         else
    161         {
    162           "The degree of a root should be at least 2";
    163         }
    164       }
    165     }
    166     setring @rrr;
     152    minpoly = RootOfUnity(chr);
    167153    matrix C[nv][nv]=0;
    168154    matrix D[nv][nv]=0;
Note: See TracChangeset for help on using the changeset viewer.