# Changeset 805b2d5 in git

Ignore:
Timestamp:
Mar 10, 2009, 7:15:13 PM (14 years ago)
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
808b4e3d84e15799d00c2dbe5ac2b08aefa48d3f
Parents:
ecf319831bc643539b3751c9a97ccf85d1bca4df
Message:
```*levandov: numerous bugfixes and improvements in vct2str mod2str lst2str

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

Unmodified
Added
Removed
• ## Singular/LIB/freegb.lib

 recf3198 ////////////////////////////////////////////////////////////////////////////// version="\$Id: freegb.lib,v 1.18 2009-03-06 20:54:45 levandov Exp \$"; version="\$Id: freegb.lib,v 1.19 2009-03-10 18:15:13 levandov Exp \$"; category="Noncommutative"; info=" vct2str(M[, n]);   convert a vector into a word in free algebra lieBracket(a,b[, N]);    compute Lie bracket ab-ba of two letterplace polynomials serreRelations(A,z);          compute the ideal of Serre's relations associated to a generalized Cartan matrix A isVar(p);             check whether p is a power of a single variable adem(i,j);            compute the ideal of Adem relations for i<2j in char 0 serreRelations(A,z);   compute the ideal of Serre's relations associated to a generalized Cartan matrix A isVar(p);                   check whether p is a power of a single variable ademRelations(i,j);    compute the ideal of Adem relations for i<2j in char 0 SEE ALSO: LETTERPLACE { // skips zeros in a vector, producing another vector if ( (v[1]==0) || (v==0) ) { return(vector(0)); } int sv = nrows(v); int sw = size(v); if ( size(#)>0 ) { if ( typeof(#[1]) != "int") { ERROR("Second argument of type int expected"); } if (#[1]) { int i; int s    = size(L); if (s<1) { return(list(""));} list N; for(i=1; i<=s; i++) " { if (size(M)==0) { return(""); } // returns a string // a sentence in words built from M if ( size(#)>0 ) { if ( typeof(#[1]) != "int") { ERROR("Second argument of type int expected"); } if (#[1]) { else { t = t + "+" + mp; if (mp != "") { t = t + "+" + mp; } } } " { if (v==0) { return(""); } // if #[1] = 1, use * between generators int useStar = 0; // produces a string for it v = skip0(v); if (v==0) { return(string(""));} number cf = leadcoef(v[1]); int s = size(v); if (p==0) { err = "Error: monomial expected at" + string(i+1); dbprint(ppl,err); return("_"); err = "Error: monomial expected at nonzero position " + string(i+1); ERROR(err+" in vct2str"); //      dbprint(ppl,err); //      return("_"); } if (p==1) { scf = string(cf); if (cf == 1) if ( (cf == 1) && (size(vs)>0) ) { scf = ""; "USAGE:  isVar(p);  poly p RETURN:  int PURPOSE: checks whether p is a power of a single variable from the basering. @* Returns the exponent or 0 is p is not a power of  a single variable. PURPOSE: check, whether leading monomial of p is a power of a single variable @* from the basering. Returns the exponent or 0 if p is multivariate. EXAMPLE: example isVar; shows examples " poly f = xy+1; isVar(f); poly g = xy; poly g = y^3; isVar(g); poly h = y^3; poly h = 7*x^3; isVar(h); poly i = 1; end older procs and tests */ proc adem(int i, int j) "USAGE:  adem(i,j); i,j int proc ademRelations(int i, int j) "USAGE:  ademRelations(i,j); i,j int RETURN:  ring (and exports ideal) ASSUME: there are at least i+j variables in the basering PURPOSE: compute the ideal of Adem relations for i<2j in characteristic 0 @*  the ideal is exported under the name AdemRel in the output ring EXAMPLE: example adem; shows examples EXAMPLE: example ademRelations; shows examples " { { "EXAMPLE:"; echo = 2; def A = adem(2,5); def A = ademRelations(2,5); setring A; AdemRel; return(0); } // alias libs for compatibility with older examples proc freegbRing(int d) { return(makeLetterplaceRing(d)); } proc freegbasis( list L, int n) { return(freeGBasis(L, n)); }
Note: See TracChangeset for help on using the changeset viewer.