Changeset 89abd46 in git


Ignore:
Timestamp:
Jul 13, 2007, 4:05:14 PM (16 years ago)
Author:
Motsak Oleksandr <motsak@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
5accf0ace0c30c09c866e4c16039ef64597f6a2c
Parents:
90ee8d1d1ab99050b0c30c21eadf342a5b681f01
Message:
*motsak: fix for the procedure SuperCommutative(). Note that there is a side effect!


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/nctools.lib

    r90ee8d r89abd46  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: nctools.lib,v 1.26 2007-05-24 09:16:59 motsak Exp $";
     2version="$Id: nctools.lib,v 1.27 2007-07-13 14:05:14 motsak Exp $";
    33category="Noncommutative";
    44info="
     
    721721"USAGE:   SuperCommutative([b,[e, [Q]]]);
    722722RETURN:  qring
    723 PURPOSE:  create the super-commutative algebra over a basering,
    724 NOTE:  activate this qring with the \"setring\" command
     723PURPOSE:  create the super-commutative algebra (as a GR-algebra) 'over' a basering,
     724NOTE: activate this qring with the \"setring\" command.
     725NOTE: as a side effect the basering will be changed to bo the basis G-algebra (without factor).
    725726THEORY: given a basering, this procedure introduces the anticommutative relations x(j)x(i)=-x(i)x(j) for all e>=j>i>=b,
    726727@* moreover, creates a factor algebra modulo the two-sided ideal, generated by x(b)^2, ..., x(e)^2[ + Q]
     
    739740  int e = N;
    740741
    741         def saveRing = basering;
     742  def saveRing = basering;
    742743  ideal Q = 0;
    743744
     
    752753  }
    753754
    754         if(size(#)>1)
    755         {
    756           if(typeof(#[2]) != "int")
    757           {
    758             ERROR("Last argument 'e' must be an integer!");
    759             return();
    760           }
    761           e = #[2];
    762         }
    763 
    764         if(size(#)>2)
    765         {
    766           if(typeof(#[3]) != "ideal")
    767           {
    768             ERROR("Last argument 'Q' must be an ideal!");
    769             return();
    770           }
    771           Q = #[3];
    772         }
    773        
     755  if(size(#)>1)
     756  {
     757    if(typeof(#[2]) != "int")
     758    {
     759      ERROR("Last argument 'e' must be an integer!");
     760      return();
     761    }
     762    e = #[2];
     763  }
     764
     765  if(size(#)>2)
     766  {
     767    if(typeof(#[3]) != "ideal")
     768    {
     769      ERROR("Last argument 'Q' must be an ideal!");
     770      return();
     771    }
     772    Q = #[3];
     773  }
     774
     775/*
     776  // Singular'(Hans) politics: no ring copyes!
     777  // in future ncalgebra() should return a new ring!!!
    774778  list CurrRing = ringlist(basering);
    775779  def @R = ring(CurrRing);
    776780  setring @R; // @R;
     781*/
    777782
    778783  matrix @E = UpOneMatrix(N);
     
    790795  ncalgebra(@E, 0);
    791796
    792         ideal Q = fetch(saveRing, Q);
    793         j = ncols(Q) + 1;
     797  ideal Q = fetch(saveRing, Q);
     798  j = ncols(Q) + 1;
    794799
    795800  for ( i=e; i>=b; i--, j++ )
     
    861866      if( c == -1 )
    862867      {
    863         if(i < b)
    864         {
    865                 b = i;         
    866         }
    867        
    868         if(j > e)
    869         {
    870                 e = j;         
    871         }
     868        if(i < b)
     869        {
     870          b = i;       
     871        }
     872
     873        if(j > e)
     874        {
     875          e = j;       
     876        }
    872877      } else
    873878      { // should commute
     
    915920//  E;
    916921
    917         ideal Q = fetch(saveRing, Q); // should belong to E!
    918         Q = twostd(Q);
     922  ideal Q = fetch(saveRing, Q); // should belong to E!
     923  Q = twostd(Q);
    919924
    920925//  "Q = ", string(Q);
     
    924929    if( NF(var(i)^2, Q) != 0 )
    925930    {
    926         setring saveRing;
     931      setring saveRing;
    927932      return("The current ring is not SCA! (Wrong quotient ideal)");
    928933    }
    929934  }
    930935
    931         ////////////////////////////////////////////////////////////////////////
     936  ////////////////////////////////////////////////////////////////////////
    932937  // ok. it is a SCA!!!
    933938
Note: See TracChangeset for help on using the changeset viewer.