Changeset 73e5a2 in git
 Timestamp:
 Feb 13, 2009, 10:37:20 PM (15 years ago)
 Branches:
 (u'fiekerDuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b52fc4b2495505785981d640dcf7eb3e456778ef')
 Children:
 61d32c91fe3976149b9b30938476f2c3c1257eee
 Parents:
 59f78ae5a870b7808ef48f59619f0aabf5305d9a
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/LIB/freegb.lib
r59f78ae r73e5a2 1 1 ////////////////////////////////////////////////////////////////////////////// 2 version="$Id: freegb.lib,v 1.1 5 20090114 16:07:04 SingularExp $";2 version="$Id: freegb.lib,v 1.16 20090213 21:37:20 levandov Exp $"; 3 3 category="Noncommutative"; 4 4 info=" 5 LIBRARY: freegb.lib Twosided Noncommutative Groebner bases in Free Algebras 5 LIBRARY: freegb.lib Twosided Noncommutative Groebner bases in Free Algebras via Letterplace 6 6 AUTHOR: Viktor Levandovskyy, levandov@math.rwthaachen.de 7 8 THEORY: See chapter 'Letterplace' in the Singular Manual. 7 9 8 10 PROCEDURES: … … 12 14 AUXILIARY PROCEDURES: 13 15 16 lpMult(f,g); letterplace multiplication of letterplace polynomials 14 17 lp2lstr(K, s); convert letterplace ideal to a list of modules 15 18 lst2str(L[, n]); convert a list (of modules) into polynomials in free algebra … … 19 22 Serre(A,z); compute the ideal of Serre's relations associated to a generalized Cartan matrix A 20 23 isVar(p); check whether p is a power of a single variable 24 adem(i,j); compute the ideal of Adem relations for i<2j in char 0 21 25 22 26 SEE ALSO: Letterplace … … 38 42 example freegbasis; 39 43 "AUXILIARY PROCEDURES: "; 44 example lpMult; 40 45 example lp2lstr; 41 46 example lst2str; … … 1458 1463 proc adem(int i, int j) 1459 1464 "USAGE: adem(i,j); i,j int 1460 RETURN: ideal1465 RETURN: ring and exports ideal 1461 1466 ASSUME: there are at least i+j variables in the basering 1462 1467 PURPOSE: 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 1463 1469 EXAMPLE: example adem; shows examples 1464 1470 " … … 1478 1484 n = binomial(j1,i); 1479 1485 q = n*s(i+j)*s(0); 1480 printf("k=0, term=%s",q);1486 // printf("k=0, term=%s",q); 1481 1487 p = p + q; 1482 1488 for (k=1; k<= ii; k++) … … 1484 1490 n = binomial(jk1,i2*k); 1485 1491 q = n*s(i+jk)*s(k);; 1486 printf("k=%s, term=%s",k,q);1492 // printf("k=%s, term=%s",k,q); 1487 1493 p = p + q; 1488 1494 } … … 1531 1537 // Adem rels modulo 2 are interesting 1532 1538 1533 //static 1534 proc stringpoly2lplace(string s) 1539 static proc stringpoly2lplace(string s) 1535 1540 { 1536 1541 // decomposes sentence into terms … … 1706 1711 } 1707 1712 1708 //static 1709 proc sent2lplace(string s) 1713 static proc sent2lplace(string s) 1710 1714 { 1711 1715 // SENTence of words TO LetterPLACE … … 1776 1780 } 1777 1781 1778 proc str2lplace(string s)1782 static proc str2lplace(string s) 1779 1783 { 1780 1784 // converts a word (monomial) with coeff into letterplace … … 1966 1970 "USAGE: Liebr(a,b[,N]); a,b letterplace polynomials, N an optional integer 1967 1971 RETURN: poly 1972 ASSUME: 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 1974 blocks of variables of the letterplace ring ) must be defined 1968 1975 PURPOSE: compute the Lie bracket [a,b] = ab  ba between letterplace polynomials 1969 1976 NOTE: if N>1 is specified, then the left normed bracket [a,[...[a,b]]]] is computed. … … 1971 1978 " 1972 1979 { 1980 1981 if (lpAssumeViolation()) 1982 { 1983 ERROR("Either 'uptodeg' or 'lV' global variables are not set!"); 1984 } 1973 1985 // alias ppLiebr; 1974 1986 //if int N is given compute [a,[...[a,b]]]] left normed bracket … … 2007 2019 Liebr(a,b); 2008 2020 Liebr(x(1),y(1),2); 2021 kill uptodeg, lV; 2009 2022 } 2010 2023 … … 2026 2039 // shifts a monomial a by i 2027 2040 // calls pLPshift(p,sh,uptodeg,lVblock); 2041 if (deg(a) + i > uptodeg) 2042 { 2043 ERROR("degree bound violated by the shift!"); 2044 } 2028 2045 return(system("stest",a,i,uptodeg,lV)); 2029 2046 } … … 2051 2068 poly p = mmLiebr(a(1),b(1)); 2052 2069 poly p = Liebr(a(1),b(1)); 2070 kill uptodeg, lV; 2053 2071 } 2054 2072 … … 2113 2131 ideal I = Serre(A,1); I = simplify(I,1+2+8); 2114 2132 I; 2133 kill uptodeg, lV; 2115 2134 } 2116 2135 … … 2242 2261 } 2243 2262 2244 proc strList2poly(list L)2263 static proc strList2poly(list L) 2245 2264 { 2246 2265 // list L comes from sent2lplace (which takes a poly on the input) … … 2282 2301 } 2283 2302 2284 proc file2lplace(string fname)2303 static proc file2lplace(string fname) 2285 2304 "USAGE: file2lplace(fnm); fnm a string 2286 2305 RETURN: ideal … … 2383 2402 // reduction/ Normalform? needs kernel stuff 2384 2403 2404 proc lpMult(poly f, poly g) 2405 "USAGE: lpMult(f,g); f,g letterplace polynomials 2406 RETURN: poly 2407 ASSUME: 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 2409 blocks of variables of the letterplace ring ) must be defined 2410 PURPOSE: compute the letterplace form of f*g 2411 EXAMPLE: 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 } 2428 example 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 2441 static 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.