Changeset 1b5f4b in git


Ignore:
Timestamp:
Oct 30, 2007, 10:04:42 PM (16 years ago)
Author:
Motsak Oleksandr <motsak@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
054f36c953adc6d7ede471fd6c7417fd55233fc3
Parents:
b9ed9219019a539488427520e4fd4f0a1f50e0a0
Message:
*motsak: fixes to SuperCommutative due to Simon King


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/nctools.lib

    rb9ed92 r1b5f4b  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: nctools.lib,v 1.33 2007-10-30 17:27:44 motsak Exp $";
     2version="$Id: nctools.lib,v 1.34 2007-10-30 21:04:42 motsak Exp $";
    33category="Noncommutative";
    44info="
     
    717717///////////////////////////////////////////////////////////////////////////////
    718718proc SuperCommutative(list #)
    719 "USAGE:   SuperCommutative([b,[e, [Q]]]);
     719"USAGE:   SuperCommutative([b,[e, [Q, [flag]]]]);
    720720RETURN:  qring
    721721PURPOSE:  create the super-commutative algebra (as a GR-algebra) 'over' a basering,
    722722NOTE: activate this qring with the \"setring\" command.
    723 NOTE: as a side effect the basering will be changed (if not in a commutative case) to bo the ground G-algebra (without factor).
    724 NOTE: if b==e then the resulting ring is commutative.
     723NOTE: if b==e then the resulting ring is commutative unles 'flag' is given and non-zero.
    725724THEORY: given a basering, this procedure introduces the anticommutative relations x(j)x(i)=-x(i)x(j) for all e>=j>i>=b,
    726725@* moreover, creates a factor algebra modulo the two-sided ideal, generated by x(b)^2, ..., x(e)^2[ + Q]
     
    728727"
    729728{
     729
     730// NOTE: as a side effect the basering will be changed (if not in a commutative case) to bo the ground G-algebra (without factor).
    730731  int fprot = (find(option(),"prot") != 0);
    731732 
     
    743744  int b = 1;
    744745  int e = N;
    745 
     746  int flag = 0;
     747 
    746748  ideal Q = 0;
    747749
     
    750752    if(typeof(#[1]) != "int")
    751753    {
    752       ERROR("First argument 'b' must be an integer!");
     754      ERROR("The argument 'b' must be an integer!");
    753755      return();
    754756    }   
     
    757759    if((b < 1)||(b > N))
    758760    {
    759       ERROR("First argument 'b' must within [1..nvars(basering)]!");
     761      ERROR("The argument 'b' must within [1..nvars(basering)]!");
    760762      return();
    761763    }   
     
    767769    if(typeof(#[2]) != "int")
    768770    {
    769       ERROR("Second argument 'e' must be an integer!");
     771      ERROR("The argument 'e' must be an integer!");
    770772      return();
    771773    }
     
    774776    if((e < 1)||(e > N))
    775777    {
    776       ERROR("Second argument 'e' must within [1..nvars(basering)]!");
     778      ERROR("The argument 'e' must within [1..nvars(basering)]!");
    777779      return();
    778780    }
     
    780782    if(e < b)
    781783    {
    782       ERROR("Second argument 'e' must be bigger or equal to 'b'!");
     784      ERROR("The argument 'e' must be bigger or equal to 'b'!");
    783785      return();
    784786    }
    785 
    786787  }
    787788
     
    790791    if(typeof(#[3]) != "ideal")
    791792    {
    792       ERROR("Last argument 'Q' must be an ideal!");
     793      ERROR("The argument 'Q' must be an ideal!");
    793794      return();
    794795    }
    795796    Q = #[3];
    796797  }
    797 
    798   if( b == e ) // commutative ring!!!
     798 
     799  if(size(#)>3)
     800  {
     801    if(typeof(#[4]) != "int")
     802    {
     803      ERROR("The argument 'flag' must be an integer!");
     804      return();
     805    }
     806    flag = #[4];
     807  }
     808
     809  int iSavedDegBoung = degBound;
     810
     811  if( (b == e) && (flag == 0) ) // commutative ring!!!
    799812  {
    800813    if( fprot == 1)
     
    802815      print("Warning: (b==e) means that the resulting ring will be commutative!");
    803816    }
     817   
     818    degBound=0;
    804819    Q = std(Q + (var(b)^2));
     820    degBound = iSavedDegBoung;
     821   
    805822    qring @EA = Q; // and it will be internally commutative as well!!!
     823       
    806824    return(@EA);   
    807825  }
     
    815833*/
    816834
    817   if (char(basering)==2) // commutative ring!!!
     835  if( (char(basering)==2) && (flag == 0) )// commutative ring!!!
    818836  {
    819837    if( fprot == 1)
     
    829847    }
    830848   
     849    degBound=0;   
    831850    Q = std(Q);
     851    degBound = iSavedDegBoung;
     852   
    832853    qring @EA = Q; // and it will be internally commutative as well!!!
    833854    return(@EA);     
     
    870891    print("Q:", @Q);
    871892  }
    872  
     893
     894  degBound=0;   
    873895  @Q = twostd(@Q); // must be computed within the ground G-algebra => problems with local orderings!
     896  degBound = iSavedDegBoung;
    874897 
    875898  qring @EA = @Q;
Note: See TracChangeset for help on using the changeset viewer.