% revised for version 0.60, 21.2.91 
% revised for version 1.0, 5.11.95
% title and preface

\title{MAS \\ Modula--2 Algebra System\\
       {Interactive Usage}}

\author{%Heinz Kredel \\
        Computer Algebra Group \\ 
        University of Passau
        }

\date{MAS Version 1.0\footnote{Document revision \today}
      }


\maketitle

\thispagestyle{empty} 
\section*{Abstract}

MAS is an experimental computer algebra system
combining imperative programming facilities with 
algebraic specification capabilities 
for design and study of algebraic algorithms.
MAS contains a large library of implemented  Gr\"obner base algorithms 
for nearly all algebraic structures where such methods exist.
This document describes the interactive usage of MAS, 
the MAS language, the specification component, 
basic arithmetic and polynomial system libraries.

\vfill


\section*{Copyrights}

The MAS system was developed using several public domain programs. 
So permission is granted for unrestricted use of MAS 
as long as the copyrights are preserved.
The copyrights are: \\
\begin{tabular}{rl}
MAS: \copyright 1989 -- 1996, & by H.~Kredel, University Mannheim, \\ 
                              & M.~Pesch, University Passau. \\
ALDES / SAC--2: \copyright 1982, & by G.~E.~Collins and R.~Loos.
\end{tabular}

However remember:
{\em 
We make no warranty and disclaim any usefulness. 
Use this program at your own risk. 
}


\chapter*{Preface}
\pagenumbering{arabic}

MAS (Modula--2 Algebra System) is an 
experimental computer algebra system
combining imperative programming facilities with 
algebraic specification capabilities 
for design and study of algebraic algorithms.
MAS contains a large library of implemented  Gr\"obner base algorithms 
for nearly all algebraic structures where such methods exist, 
together with many applications which make use of these algorithms. 
The interactive part of MAS views mathematics in the 
sense of universal algebra and model theory and is 
in some parts influenced by category theory.

MAS combines Modula--2 program development, 
a LISP interpreter with a Modula--2 like language and 
an algebraic specification component.
MAS can be used interactively, but includes access to
to the comprehensive ALDES/SAC--2 and DIP 
algebraic algorithm libraries. 
MAS can also be used as ordinary Modula--2 program library.
Despite of its design it can directly access 
numerical Modula--2 libraries. 

The current implementations (version 1.0) run on 
IBM RS6000 / AIX\index{AIX}\index{IBM! RS6000}, 
IBM--AT 386/ DOS\index{DOS} (or compatible),
IBM--AT 386/ OS2 2.x, 3.x\index{OS2} (or compatible) 
and further workstations with unix tools and C compiler. 
The previous implementations (version 0.7 and 0.6) were running on 
IBM RS6000 / AIX\index{AIX}\index{IBM! RS6000}, 
IBM--PC, IBM--AT / MS--DOS\index{DOS} (or compatible),
Atari 1040ST / GEM\index{GEM}--TOS\index{TOS} and on 
Commodore Amiga / Amiga--DOS\index{AmigaDOS}. 
It is mostly written in the programming language 
Modula-2.

Major mathematical library changes of the current version 1.0 are:
\begin{itemize}
\item added a package for counting real roots based on Hermites method 
      by F.~Lippold, 
\item added a package on permutation invariant polynomials by M.~G\"obel, 
\item added an optimized Gr\"obner base package 
      (including the ``sugar''-method) by C.~Rose, 
\item added a package to compute factorized Gr\"obner bases by J.~Pfeil, 
\item added a logic formula representation with simplification package  
      and real quantifier elimination package by A.~Dolzmann, 
\item a package for involutive bases by R.~Grosse-Gehling, 
\item Improved comprehensive Gr\"obner Base algorithms 
      using factorization, condition evaluation and case elimination 
      by M.~Pesch, 
\item arbitrary domain polynomial system extended to a 
      generic Gr\"obner base package.
\end{itemize}

Major system changes of the current version 1.0 are:
\begin{itemize}
\item MAS language accepts small letter key words 
      and braces \verb/{}/ to denote list expressions.
\item Improved error handling and user signal processing to 
      examine long running computations.
\item GNU readline for easier command line editing. 
\item Using Kpathsearch Library from K.~Berry.  
\item Improved batch processing capabilities. 
\item Distribution now uses GNU autoconfig for easy compilation. 
\item Generic garbage collection support for most architectures. 
\end{itemize}


Major mathematical library changes between version 0.7 and version 0.6 were:
\begin{itemize}
\item arbitrary domain polynomial system implemented, 
\item added comprehensive Gr\"obner base package 
      by E. Sch\"onfeld,
\item added several new basic arithmetic packages: 
      complex numbers, quaternion numbers, octonion numbers,
      finite fields,
\item added package for computation in non-commutative polynomial 
      rings of solvable type: $*$-product, left Gr\"obner base, 
      two-sided Gr\"obner base, elements in the center,
\item added a package for the computation of generators for the module 
      of syzygies of systems of homogeneous polynomial equations and 
      Gr\"obner bases for modules over polynomial rings 
      (also available for solvable polynomial rings)
      by J. Phillip. 
\item added universal Gr\"obner base package 
      by T. Belkahia. 
\item added d-Gr\"obner base and e-Gr\"obner base packages  
      for Gr\"obner bases over the integers and 
      univariate rational polynomial rings 
      by W. Mark. 
\end{itemize}

Major system changes between the version 0.6 and 0.7 were:
\begin{itemize}
\item Distribution based on Modula-2 to C translator and 
      a C distribution which will work on 'most' workstations. 
\item New support for PC 386 and higher (OS2 2.0 and higher) with 
      emx dll runtime libraries. 
\item New support for PC 386 and higher (DOS 5.0) with 
      emx DOS extender (10 times faster).
\item Dropped support for the Atari, Amiga and PC XT up to 286 versions.
      That means, that we do no more distribute executables for these 
      systems, but if you have the maskern(el) you can get the 
      new source code (except maskern) and compile it on your system. 
\item The HELP and help command has been changed to provide 
      name ranges and more information from the procedure comments. 
\end{itemize}

Major system changes between the version 0.3 and 0.6 were:
\begin{itemize}
\item added language extensions for specification capabilities,
\item added a parser for the ALDES language and 
      possibility for interpretation of ALDES programs,
\item added an interface between the MAS language 
      and the distributive polynomial system,
\item improved symbol handling by hash tables 
      combined with balanced trees,
\item EMS support for IBM PC implementations,
\item C code version of the Modula-2 programms, 
      generated be the Modula-2 to C translator from the GMD.
\end{itemize}


\section*{Organization}

This document is a description of the front--end part of the system:
the interpreter. It is intended as a manual for 
the MAS interactive part. The syntax of the 
MAS language together with informal semantics 
and examples is discussed. 
Further basic arithmetic and polynomial system 
data structures and libraries are discussed. 
A document for implementors is already available 
under the title `MAS Library description'. 
The definition modules and indexes are contained 
in a separate document 
`MAS Specification, Definition Modules, Indexes'.

Some discussions are currently rather short but 
will be improved in later revisions of the document.
The first chapters (up to chapter 7) are already self contained
and can serve as a tutorial introduction into MAS and the 
algorithm libraries and data structures.
The later chapters are complete, but very condensed.
So you may need some knowledge of LISP, the ALDES / SAC--2
computer algebra system and Modula-2 in the more advanced chapters.

The organization of this document is as follows:

Chapter 1 
gives a short introduction of MAS
and shows how to use MAS for the first time.

Chapter 2 
gives an tutorial overview of MAS,
and discusses several important aspects of MAS,
such as arithmetic, help facilities, 
specifications and function overloading,
talking LISP and handling errors.

Chapter 3 
describes the MAS language and chapter 4 describes the 
MAS specification component.

Chapter 5 
gives an introduction into list processing and 
algorithm complexity. 

In chapter 6 the basic arithmetic algorithms 
and in chapter 7 the polynomial systems 
are described. 

Chapter 8 
contains description of the available packages 
like Gr\"obner bases, ideal dimension, primary ideal decomposition,
real roots of zero dimensional ideals, 
real root counting, real quantifier elimination, 
polynomial invariants, 
involutive bases and more.

In Chapter 9 
the parser for the ALDES language and the syntax of the 
ALDES language are presented. 

Chapter 10 
summarizes system commands: display commands, pragmas, 
LISP commands and command line parameters.

Chapter 11
gives some information on the system components, 
on the internal structure, on implementation issues 
and on the configuration of MAS.
It also provides some background information 
on the underlying LISP.

The appendices 
contain notes on the distribution and the 
current release of MAS and an index of this document.

\section*{Acknowledgments}

Many thanks to all who made contributions or influenced this project:
R. Loos, G. E. Collins and co--workers for the 
ALDES / SAC--2 system;
I. Giese, W. Kynast and H. Czytrek for discussions in the
early stages of the MAS project;
M. Pesch, B. Haible,
V. Weispfenning and T. Becker
for feedback during 
the later stages of the development of MAS. 
In the current version also contributions from students 
are incorporated:
\begin{itemize}
\item a package on permutation invariant polynomials by M.~G\"obel, 
\item a package for counting real roots by F.~Lippold, 
\item a ``sugar''-optimized Gr\"obner base package by C.~Rose, 
\item a Gr\"obner factorizer package by J.~Pfeil, 
\item a logic package and extensions to the interpreter by A.~Dolzmann, 
\item a real quantifier elimination package by A.~Dolzmann, 
\item a package for involutive bases by R.~Grosse-Gehling, 
\item a non-noetherian ring package by I.~Bader,
\item a comprehensive Gr\"obner base package by E.~Sch\"onfeld, 
\item a syzygy package by J.~Phillip, 
\item a linear algebra library by J.~M\"uller,
\item an universal Gr\"obner base package by T.~Belkahia, 
\item an d- and e-Gr\"obner base package by W.~Mark, 
\item port to IBM PC, M2SDS by B.~Deyle, 
\item port to IBM PC, Topspeed Modula--2 by H.~Freibel, 
\item port to Atari ST, SPC by E.~Reisinger, 
\item port to Amiga, M2Amiga by M.~Rothmeier, 
\item a hash table symbol handling by T.~Wollersberger,
\item and an ALDES parser by K.~Rieger.
\end{itemize}

If you find a bug in MAS, please let us know 
(email to \verb/mas@alice.fmi.uni-passau.de/). 
Also any suggestions will be welcome. 
Most of the MAS system is available via anonymous ftp 
from internet node \verb,alice.fmi.uni-passau.de, 
or on world wide web \verb,http://alice.fmi.uni-passau.de/mas.html,.

\begin{center}
Passau, \today. \hfill H.~Kredel\footnote{University of Mannheim, 
                                 L 15, 16, D-68131 Mannheim, FRG,
                                 Tel: (49,0) 621/ 292 5673,
                                 E-mail: kredel @ 
                                 rz.uni-mannheim.de},
                        M.~Pesch\footnote{University of Passau, 
                                 Innstra\ss e 33, D-94030 Passau, FRG,
                                 Tel: (49,0) 851/ 509-3123,
                                 E-mail: pesch @ 
                                 alice.fmi.uni-passau.de}
\end{center}


