The design of Macaulay: a system for computing in algebraic geometry and commutative algebra
Authors: D. Bayer, M. Stillman
Venue: Proceedings of the fifth ACM symposium on Symbolic and algebraic computation (1986)

Macaulay is a system for computing in algebraic geometry and cummutative algebra; it is capable of a variety of computations which are tedious or impossible to perform by hand. The primitive types in the system are polynomials, matrices, ideals, polynomial rings, modules, maps between rings, and complexes of modules. The system performs algebraic manipulation on objects of these types. The possible manipulations include the computation of standard (Gr&ouml;bner) bases, modules of syzygies, finite free resolutions, Hilbert polynomials and functions. Using these basic operations, a variety of derived operations are possible, such as projections, ideal intersections, and the computation of coherent sheaf cohomology groups. The algorithm used for constructing standard (Gr&ouml;bner) bases and syzygies is described in ([Buc76], [Zac78], [Sch80], [Bay82], [BaSt86a]). Macaulay is intended to provide a computational research tool for working mathematicians. Macaulay is designed primarily to aid in generating non-trivial examples in algebraic geometry and commutative algebra. Such examples help mathematicians to gain intuition, and formulate or gather evidence for conjectures. In certain cases, an example can provide a step in the proof of a theorem. This system has been continuously evolving since 1977 where it was first developed at the University of Illinois by the second author. The algorithms have become substantially more sophisticated and efficient and the scope and power of the system has increased dramatically since its inception. Macaulay differs in a number of significant ways from other computer algebra systems. The computation of standard bases is its fundamental operation, rather than simplification and factoring. Unlike other systems which provide for the computation of standard bases, submodules of free modules can uniformly be used wherever ideals can be used. Macaulay is written in the language C and its design has been optimized for execution on small systems; Macaulay is available, and reasonably powerful, on a Macintosh microcomputer. Macaulay uses a novel encoding scheme for monomials which considerably reduces the storage requirements for polynomials, further enhancing its viability on small systems. Computations in Macaulay are interruptible, with the full power of the system available to study and use partial results. Macaulay is command-driven, and is quickly learned by mathematicians having no experience with computers. The basic data types of Macaulay are highly structured, reflecting its focus on the construction of standard bases and syzygies, not the simplification of general expressions. This design allows Macaulay to outperform more general systems, within its problem domain. Macaulay is capable of many computations that are not available in more general systems. These include the computation of syzygies, finite free resolutions of modules and ideals, and coherent sheaf cohomology groups. The set of commands provided allow the user to directly compute and manipulate algebraic objects, without the need to write and debug complicated programs. Ideals and submodules are handled uniformly, in order to permit many of the above operations. There are tricks that permit the computation of first syzygies without use of modules, but any system which cannot uniformly handle standard basis calculations for modules in the same manner as ideals is incapable of computing higher syzygies, or cohomology groups. Surprisingly, other computer algebra systems that compute standard bases do so only for ideals. Macaulay (like Maple [CGGG83] is written in C for portability and efficiency. Portability is an important consideration because the availability of computer resources is constantly changing, and mathematicians are nomadic. The system has been designed to run on microcomputers as well as mainframes. Macaulay has been designed with the intention of making a given implementation capable of handling problems of as large a scale as possible. The Macintosh implementation is able to perform significant computations in a reasonable amount of time within the memory constraints available. The user does not have to purchase an unusually large amount of memory or disk space in order to run the system effectively; a 512K Macintosh is sufficient to satisfy many research mathematicians needs. The mainframe versions of Macaulay are intended as alternatives to microcomputers for specific problems which are too large for a microcomputer. For this reason, the same optimizations which make use of a microcomputer feasible, permit the solution of very large problems on a mainframe. It is useful to obtain intermediate results during a complex computation: partial results often suffice to answer questions, when the full result takes unexpectedly long to compute. The Macintosh implementation of Macaulay allows the user to halt the computation at reasonable stages of the computation, to examine partial results. Since Macaulay is not programmable, but rather command driven, Macaulay can be easily used by algebraic geometers with little or no training in computer science. Researchers are able to learn the system relatively quickly and use it for their everyday research. There is an online tutorial system built into Macaulay which familiarizes new users with the commands in the system, by stepping them through a set of examples which are based on typical computations in algebraic geometry and commutative algebra. Following this 20 minute tutorial, users can begin making use of the system for their research. Macaulay consists of approximately 9,000 lines of C source code. The object code on the Macintosh is 90K bytes in length. Currently, Macaulay is implemented on the Macintosh, Sun, Vax/VMS, and Ridge. In fact, it runs on a 512K Macintosh with one disk drive. The program has been used by mathematicians in a number of countries, including Canada, France, Germany, Italy, Norway, and the USA. The program is available by request from either author or by obtaining a copy from a current user. However, in the latter case, the authors should be contacted so that notices of updates can be sent to the new user. Macaulay is a continuously evolving system. There are two major design changes which we envision for the near future: more general base rings, and a programmable interface. Currently, all polynomials must be defined over polynomial rings with positive characteristic, and be homogeneous or quasi-homogeneous. In practice these restrictions are not serious; there are simple techniques for handling many of these problems in the current system. In the future we plan to remove these restrictions and allow more general base rings. While the command driven approach of Macaulay is easy to learn and use, a programmable interface would be more flexible. In the near future we plan to introduce such an interface. In &sect;1, we discuss our original motivation for the present design of Macaulay. In &sect;2, we present Macaulay from the user's point of view and explain the details of a sample session, in order to give a feeling for Macaulay's user interface. In &sect;3, we discuss those implementation details of Macaulay which are novel or important. Finally, in &sect;4, we present some system benchmarks. Macaulay is named after F. S. Macaulay, for his seminal paper &ldquo;Some properties of enumeration in the theory of modular systems.&rdquo; [Mac27].