Stanley Decompositions Using CoCoA

First released in 1988, CoCoA is a special-purpose Computer Algebra System for doing Computations in Commutative Algebra. It is freely available and offers a textual interface, an Emacs mode, and a graphical user interface common to most platforms [39].

  • PDF / 182,630 Bytes
  • 13 Pages / 439.36 x 666.15 pts Page_size
  • 19 Downloads / 176 Views

DOWNLOAD

REPORT


1 First Steps with CoCoA-5 First released in 1988, CoCoA is a special-purpose Computer Algebra System for doing Computations in Commutative Algebra. It is freely available and offers a textual interface, an Emacs mode, and a graphical user interface common to most platforms [39]. Lately is has been entirely rewritten and now comprises three main components: a CCC library (CoCoALib), an interactive system (CoCoA-5), and an algebra computation server (CoCoAServer). Of these components CoCoALib is the heart; it embodies all the “mathematical knowledge” and it is the most evolved part [1]. The roles of the other two parts are to make CoCoALib’s capabilities more readily accessible. Users of CoCoA-4 can move easily to CoCoA-5 because the new CoCoALanguage is highly compatible with the old one; moreover error handling has been greatly improved making it even simpler to use (and to adapt to the new rules). For both old and new users we start now from the very beginning. The first step consists of defining the ring in which we want to work, for example R D QŒx1 ; : : : ; x4 .

A.M. Bigatti ()  E. De Negri Dipartimento di Matematica Universit`a degli Studi di Genova Via Dodecaneso 35, 16146 Genova, Italy e-mail: [email protected]; [email protected] A.M. Bigatti et al. (eds.), Monomial Ideals, Computations and Applications, Lecture Notes in Mathematics 2083, DOI 10.1007/978-3-642-38742-5 2, © Springer-Verlag Berlin Heidelberg 2013

47

48

A.M. Bigatti and E. De Negri

Use R ::= QQ[x[1..4]];

The special assignment symbol “::=” (instead of “:=”) indicates that what follows is to be interpreted as a polynomial ring (normally “[ ]” indicates getting a component of a list). If an expression expr is assigned then it is not printed, otherwise it is printed: equivalent to “Print expr”. The multiplication sign “*” is mandatory, but it can be omitted in expressions between “***” using single lower-case letters (with or without indices) as polynomial indeterminates: M := x[1]ˆ2*x[2]*x[4]ˆ2; P := *** x[1]x[2]x[3] ***;

Text following “--” is a comment, and we will use this to describe our code I := ideal(M, P); I; -- print I

-- the Monomial Ideal generated by M and P

Log(M); -- list of the exponents of M Log(P); -- viceversa: LogToTerm L := [0,1,2,1]; LogToTerm(R,L); -- NEW in CoCoA-5: we need to specify the ring -- NB: "=" is for equality test and LogToTerm(R, Log(P)) = P; Log(LogToTerm(R,L)) = L;

":="

is for assignment

-- How to convert a list of indices into a squarefree monomial: L := [1,2,3]; M := Product([ x[i] | i In L ]); M; --> will print x[1]*x[2]*x[3] -- ...and back: LogM := Log(M); [ i In 1..4 | LogM[i]>0 ]; -- 1..4 is the list [1,2,3,4]

(For CoCoA-4 users: lower case letters, such as “i”, can now be used in CoCoA-5 also for programming variables) To convert this code into a function just write it between “Define ...EndDefine” specifying the name and the arguments of the function, and which expression you want to return: Define Indices(M) LogM := Log(M); Return [ i In 1..Len(LogM) | LogM[i]>0 ]; EndDefine