Changeset 73e5a2 in git


Ignore:
Timestamp:
Feb 13, 2009, 10:37:20 PM (15 years ago)
Author:
Viktor Levandovskyy <levandov@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b52fc4b2495505785981d640dcf7eb3e456778ef')
Children:
61d32c91fe3976149b9b30938476f2c3c1257eee
Parents:
59f78ae5a870b7808ef48f59619f0aabf5305d9a
Message:
*levandov: doc changes, new function lpMult


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/freegb.lib

    r59f78ae r73e5a2  
    11//////////////////////////////////////////////////////////////////////////////
    2 version="$Id: freegb.lib,v 1.15 2009-01-14 16:07:04 Singular Exp $";
     2version="$Id: freegb.lib,v 1.16 2009-02-13 21:37:20 levandov Exp $";
    33category="Noncommutative";
    44info="
    5 LIBRARY: freegb.lib   Twosided Noncommutative Groebner bases in Free Algebras
     5LIBRARY: freegb.lib   Twosided Noncommutative Groebner bases in Free Algebras via Letterplace
    66AUTHOR: Viktor Levandovskyy,     levandov@math.rwth-aachen.de
     7
     8THEORY: See chapter 'Letterplace' in the Singular Manual.
    79
    810PROCEDURES:
     
    1214AUXILIARY PROCEDURES:
    1315
     16lpMult(f,g);        letterplace multiplication of letterplace polynomials
    1417lp2lstr(K, s);      convert letter-place ideal to a list of modules
    1518lst2str(L[, n]);     convert a list (of modules) into polynomials in free algebra
     
    1922Serre(A,z);          compute the ideal of Serre's relations associated to a generalized Cartan matrix A
    2023isVar(p);             check whether p is a power of a single variable
     24adem(i,j);            compute the ideal of Adem relations for i<2j in char 0
    2125
    2226SEE ALSO: Letterplace
     
    3842  example freegbasis;
    3943    "AUXILIARY PROCEDURES: ";
     44  example lpMult;
    4045  example lp2lstr;
    4146  example lst2str;
     
    14581463proc adem(int i, int j)
    14591464"USAGE:  adem(i,j); i,j int
    1460 RETURN:  ideal
     1465RETURN:  ring and exports ideal
    14611466ASSUME: there are at least i+j variables in the basering
    14621467PURPOSE: compute the ideal of Adem relations for i<2j in characteristic 0
     1468@*  the ideal is exported under the name AdemRel in the output ring
    14631469EXAMPLE: example adem; shows examples
    14641470"
     
    14781484  n = binomial(j-1,i);
    14791485  q = n*s(i+j)*s(0);
    1480   printf("k=0, term=%s",q);
     1486  //  printf("k=0, term=%s",q);
    14811487  p = p + q;
    14821488  for (k=1; k<= ii; k++)
     
    14841490    n = binomial(j-k-1,i-2*k);
    14851491    q = n*s(i+j-k)*s(k);;
    1486     printf("k=%s, term=%s",k,q);
     1492    //    printf("k=%s, term=%s",k,q);
    14871493    p = p + q;
    14881494  }
     
    15311537  // Adem rels modulo 2 are interesting
    15321538
    1533 //static
    1534 proc stringpoly2lplace(string s)
     1539static proc stringpoly2lplace(string s)
    15351540{
    15361541  // decomposes sentence into terms
     
    17061711}
    17071712
    1708 //static
    1709 proc sent2lplace(string s)
     1713static proc sent2lplace(string s)
    17101714{
    17111715  // SENTence of words TO LetterPLACE
     
    17761780}
    17771781
    1778 proc str2lplace(string s)
     1782static proc str2lplace(string s)
    17791783{
    17801784  // converts a word (monomial) with coeff into letter-place
     
    19661970"USAGE:  Liebr(a,b[,N]); a,b letterplace polynomials, N an optional integer
    19671971RETURN:  poly
     1972ASSUME: basering has a letterplace ring structure, like the one returned by freegbRing
     1973@*   Moreover, the variables 'uptodeg' (degree bound of the letterplace ring) and 'lV' (number of
     1974blocks of variables of the letterplace ring ) must be defined
    19681975PURPOSE: compute the Lie bracket [a,b] = ab - ba between letterplace polynomials
    19691976NOTE: if N>1 is specified, then the left normed bracket [a,[...[a,b]]]] is computed.
     
    19711978"
    19721979{
     1980
     1981  if (lpAssumeViolation())
     1982  {
     1983    ERROR("Either 'uptodeg' or 'lV' global variables are not set!");
     1984  }
    19731985  // alias ppLiebr;
    19741986  //if int N is given compute [a,[...[a,b]]]] left normed bracket
     
    20072019  Liebr(a,b);
    20082020  Liebr(x(1),y(1),2);
     2021  kill uptodeg, lV;
    20092022}
    20102023
     
    20262039  // shifts a monomial a by i
    20272040  // calls pLPshift(p,sh,uptodeg,lVblock);
     2041  if (deg(a) + i > uptodeg)
     2042  {
     2043    ERROR("degree bound violated by the shift!");
     2044  }
    20282045  return(system("stest",a,i,uptodeg,lV));
    20292046}
     
    20512068  poly p = mmLiebr(a(1),b(1));
    20522069  poly p = Liebr(a(1),b(1));
     2070  kill uptodeg, lV;
    20532071}
    20542072
     
    21132131  ideal I = Serre(A,1); I = simplify(I,1+2+8);
    21142132  I;
     2133  kill uptodeg, lV;
    21152134}
    21162135
     
    22422261}
    22432262
    2244 proc strList2poly(list L)
     2263static proc strList2poly(list L)
    22452264{
    22462265  //  list L comes from sent2lplace (which takes a poly on the input)
     
    22822301}
    22832302
    2284 proc file2lplace(string fname)
     2303static proc file2lplace(string fname)
    22852304"USAGE:  file2lplace(fnm);  fnm a string
    22862305RETURN:  ideal
     
    23832402// reduction/ Normalform? needs kernel stuff
    23842403
     2404proc lpMult(poly f, poly g)
     2405"USAGE:  lpMult(f,g); f,g letterplace polynomials
     2406RETURN:  poly
     2407ASSUME: basering has a letterplace ring structure, like the one returned by freegbRing
     2408@*   Moreover, the variables 'uptodeg' (degree bound of the letterplace ring) and 'lV' (number of
     2409blocks of variables of the letterplace ring ) must be defined
     2410PURPOSE: compute the letterplace form of f*g
     2411EXAMPLE: example lpMult; shows examples
     2412"
     2413{
     2414  if (lpAssumeViolation())
     2415  {
     2416    ERROR("Either 'uptodeg' or 'lV' global variables are not set!");
     2417  }
     2418  int sf = deg(f);
     2419  int sg = deg(g);
     2420  if (sf+sg > uptodeg)
     2421  {
     2422    ERROR("degree bound violated by the product!");
     2423  }
     2424  //  if (sf>1) { sf = sf -1; }
     2425  poly v = f*pshift(g,sf);
     2426  return(v);
     2427}
     2428example
     2429{
     2430  "EXAMPLE:"; echo = 2;
     2431  // define a ring in letterplace form as follows:
     2432  ring r = 0,(x(1),y(1),x(2),y(2),x(3),y(3),x(4),y(4)),dp;
     2433  poly a = x(1)*y(2); poly b = y(1);
     2434  int uptodeg=4; int lV=2;
     2435  export uptodeg; export lV;
     2436  lpMult(b,a);
     2437  lpMult(a,b);
     2438  kill uptodeg, lV;
     2439}
     2440
     2441static proc lpAssumeViolation()
     2442{
     2443  // checks whether the global vars
     2444  // uptodeg and lV are defined
     2445  // returns Boolean : yes/no [for assume violation]
     2446  int i = ( defined(uptodeg) && (defined(lV)) );
     2447  return ( !i );
     2448}
Note: See TracChangeset for help on using the changeset viewer.