`http://cocoa.dima.unige.it/`

(NB
without `www`

)
CoCoALib is a C++ library offering facilities for computational commutative algebra, and is a major component of the CoCoA 5 project. The design of the library aims to offer the following:

- good run-time performance (in terms of both speed and space)
- ease of use through a structured design and clear documentation
- ready accessibility to non-programmers (e.g. via a server, or as an interactive system)
- reliability and longevity of the code by being open source

CoCoALib and the interactive system CoCoA 4.4 are members of a small, elite family of highly specialized systems having as their main forte the ability to calculate Gröbner bases; Singular and Macaulay 2 are members of this family too. Although a number of general purpose symbolic computation systems (e.g. REDUCE and Maple) do have the ability to compute Gröbner bases, their non-specialist nature implies a number of severe compromises which make them far less suitable to be used as laboratories ― most notably: relatively poor execution speed and limited control over the algorithm parameters.

The facilities of the library are currently accessible in two ways: indirectly through CoCoA 4.4, or directly as a C++ library. Many of the facilities of the library can be used from CoCoA 4.4; they appear simply as new functions in the system. But some features are not yet available via the interactive system CoCoA 4.4. Instead, for the time being, to have full access to all the features of the library you must use it directly: this does require some programming skills and knowledge of C++. Eventually an interactive system granting full access will become available.

In the demo we shall show some examples using CoCoALib through the CoCoA 4.4 interactive system: internally the CoCoA 4.4 functions just send a request to a CoCoAServer, and then interpret the result sent back by the server. Intercommunication is via a rudimentary OpenMath-like protocol. We will also exhibit some of the more advanced capabilities of CoCoALib using standalone C++ programs. And to emphasize the cleanliness of the library design we will show the source code of some small C++ programs which use CoCoALib.

The particular computational features of CoCoALib which we shall show include:

- computation of Gröbner bases with floating point coefficients (from exact input)
- computation of Gröbner bases in a graded ring with user defined (deg-compatible) ordering
- use of rings and their homomorphisms as first class objects

In addition CoCoALib offers, or will shortly offer, these features:

- special operations for univariate polynomials
- modules, matrices and module homomorphisms
- computation in (non-commutative) Weyl algebras
- a design faithful to the underlying mathematical structures
- design facilitating experimentation and debugging
- extensive documentation

An important aspect of the design of CoCoALib is that it should cater not only to those wishing simply to effect some computations but also to those wishing to explore, invent and try new algorithms. It is both a tool and a laboratory for computations in commutative algebra. To guarantee its role as a laboratory we have made the source code free (GPL), and have produced extensive clear documentation for both users and developers.

CoCoALib acquires natural usability, flexibility, and efficiency from following a design guided and inspired by the mathematical theory underpinning the algorithms. Thus new algorithms may readily be implemented in a clear and natural way, and in their full generality. The C++ inheritance mechanism has been crucial in achieving this end.

CoCoALib's claim to being a laboratory is in part justified by the presence of numerous aids to debugging aimed at complementing the standard programming development tools.

Some of the technology lying hidden (or soon will be) in CoCoALib includes:

- automatic homogenization prior to running Buchberger's algorithm
- sophisticated strategies for choosing critical pairs and reducers
- geobuckets

Acknowledgment: all underlying high precision arithmetic is calculated using the GMP library (

`http://www.swox.com/gmp/`

).