Changeset c91ad1 in git


Ignore:
Timestamp:
Oct 30, 2007, 6:27:44 PM (16 years ago)
Author:
Motsak Oleksandr <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
0273dec39cc5a468a269edd6c08a5ba742e0fb14
Parents:
ae4b619fa9115e2df8467ef6e83ea5302280e402
Message:
*motsal:ncalgebra + commutative cases in SuperCommutative()


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/nctools.lib

    rae4b61 rc91ad1  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: nctools.lib,v 1.32 2007-10-30 17:17:43 Singular Exp $";
     2version="$Id: nctools.lib,v 1.33 2007-10-30 17:27:44 motsak Exp $";
    33category="Noncommutative";
    44info="
     
    116116  matrix D[4][4];
    117117  D[1,4]=(q-1/q)*b*c;
    118   def S=ncalgebra(C,D);
    119   setring S;S;
     118  def S = ncalgebra(C,D); setring S; S;
    120119  Gweights(S);
    121120  def D=fetch(r,D);
     
    157156    execute (newringstring);
    158157    def lnewring=imap(r,lr);
    159     def S=ncalgebra(lnewring[1],lnewring[2]);
    160     return(S);
     158    return( ncalgebra(lnewring[1],lnewring[2]) );
    161159  }
    162160  else
     
    174172  matrix D[4][4];
    175173  D[1,4]=(q-1/q)*b*c;
    176   def S=ncalgebra(C,D);setring S;
    177   S;
     174  def S = ncalgebra(C,D); setring S; S;
    178175  def t=weightedRing(S);
    179176  setring t; t;
     
    380377  matrix D[3][3]=0,1,2y,0,0,-2x+y+1;
    381378  print(D);
    382   def S=ncalgebra(C,D);setring S;
    383   S;
     379  def S=ncalgebra(C,D);setring S; S;
    384380  def l=ncRelations(S);
    385381  print (l[1]);
     
    441437    }
    442438  }
    443   def S=ncalgebra(C,D);
    444   ideal fdQuot = I;
     439  def save = basering;
     440  def S = ncalgebra(C,D); setring S;
     441  ideal fdQuot = fetch(save,D);
    445442  export fdQuot;
    446443}
     
    493490  D[1,3]=2*x;
    494491  D[2,3]=-2*y;
    495   ncalgebra(1,D); // this is U(sl_2)
     492  def S = ncalgebra(1,D); setring S;
     493  S; // this is U(sl_2)
    496494  poly c = 4*x*y+z^2-2*z;
    497495  printlevel = 0;
     
    530528  C[1,3]   = q;
    531529  print(C);
    532   ncalgebra(C,0);
    533   r;
     530  def S = ncalgebra(C,0); serring S;
     531  S;
    534532}
    535533
     
    596594  matrix D[3][3];
    597595  D[1,2]=x; D[1,3]=z;
    598   ncalgebra(C,D);
    599   r;
     596  def S = ncalgebra(C,D); setring S;
     597  S;
    600598  ideal j=ndcond(); // the silent version
    601599  j;
     
    675673proc makeHeisenberg(int N, list #)
    676674"USAGE:  makeHeisenberg(n, [p,d]); int n (setting 2n+1 variables), optional int p (field characteristic), optional int d (power of h in the commutator)
    677 RETURN: nothing
     675RETURN: ring
    678676PURPOSE: create an n-th Heisenberg algebra in the variables x(1),y(1),...,x(n),y(n),h
    679677SEE ALSO: makeWeyl
     
    706704    D[i,N+i]=h^@deg;
    707705  }
    708   ncalgebra(1,D);
    709   return(@@r);
     706  return(ncalgebra(1,D));
    710707}
    711708example
     
    803800    if( fprot == 1)
    804801    {
    805       print("Warning: b==e means that the resulting ring will be commutative!");
     802      print("Warning: (b==e) means that the resulting ring will be commutative!");
    806803    }
    807804    Q = std(Q + (var(b)^2));
     
    818815*/
    819816
    820   matrix @E = UpOneMatrix(N);
     817  if (char(basering)==2) // commutative ring!!!
     818  {
     819    if( fprot == 1)
     820    {
     821      print("Warning: (char == 2) means that the resulting ring will be commutative!");
     822    }
     823   
     824    int j = ncols(Q) + 1;
     825   
     826    for ( int i=e; i>=b; i--, j++ )
     827    {
     828      Q[j] = var(i)^2;
     829    }
     830   
     831    Q = std(Q);
     832    qring @EA = Q; // and it will be internally commutative as well!!!
     833    return(@EA);     
     834  }
     835 
    821836
    822837  int i, j;
    823 
    824   for ( i = b; i < e; i++ )
    825   {
    826     for ( j = i+1; j <= e; j++ )
    827     {
    828       @E[i, j] = -1;
    829     }
    830   }
    831 
    832   ncalgebra(@E, 0); // define ground G-algebra!
     838 
     839  if( (b == 1) && (e == N) ) // just an exterior algebra?
     840  { 
     841    def S = ncalgebra(-1, 0); // define ground G-algebra!
     842    setring S; 
     843  } else
     844  {
     845    matrix @E = UpOneMatrix(N);
     846 
     847    for ( i = b; i < e; i++ )
     848    {
     849      for ( j = i+1; j <= e; j++ )
     850      {
     851        @E[i, j] = -1;
     852      }
     853    }
     854    def S = ncalgebra(@E, 0); // define ground G-algebra!
     855    setring S;
     856  }
    833857
    834858  ideal @Q = fetch(saveRing, Q);
     
    11091133/////////////////////////////////////////////////////////////////////
    11101134  ring R = 0,(x(1..4)),dp;
    1111   ncalgebra(1, 0); // still commutative!
     1135  def S = ncalgebra(1, 0); setring S; S; // still commutative!
    11121136  if(IsSCA())
    11131137    { "Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "]."; }
     
    11331157  }
    11341158
    1135   ncalgebra(E,0);
     1159  def S = ncalgebra(E,0); setring S; S;
     1160 
    11361161  if(IsSCA())
    11371162    { "Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "]."; }
     
    11771202  matrix @E = UpOneMatrix(N);
    11781203  @E = -1*(@E);
    1179   def @@RR=ncalgebra(@E,0);
    1180   setring @@RR;
     1204  def @@RR = ncalgebra(@E,0); setring @@RR;
    11811205  int i;
    11821206  ideal Q;
     
    13291353{ "EXAMPLE:"; echo = 2;
    13301354  ring r = 0,(x,d),dp;
    1331   ncalgebra(1,1); // the first Weyl algebra
     1355  def S = ncalgebra(1,1); setring S; // the first Weyl algebra
    13321356  ideal I = x,d;
    13331357  module LS = syz(I);
     
    13611385  LIB "ncalg.lib";
    13621386  ring r = 0,(x,d),dp;
    1363   ncalgebra(1,1); // Weyl algebra
     1387  def S = ncalgebra(1,1); setring S; // Weyl algebra
    13641388  ideal I = x; I = std(I);
    13651389  poly  p = x*d+1;
Note: See TracChangeset for help on using the changeset viewer.