MAS

Modula–2 Algebra System

Specifications Definition Modules

Indexes

Computer Algebra Group University of Passau

MAS Version 0.6^{1}

1Document revision April 6, 1989

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:

MAS: \begin{matrix}c \\ ◯ \end{matrix}1989, 1990, 1991, by H. Kredel, University Passau.
ALDES / SAC–2: \begin{matrix}c \\ ◯ \end{matrix}1982, by G.E.Collins and R.Loos.

However remember: We make no warranty and disclaim any usefulness. Use this program at your own risk. If you find a bug in MAS, please let us know. Also any suggestions will be welcome. Most of the MAS system is available via anonnymous ftp

from internet address 132.231.10.1 = alice.fmi.uni-passau.de.

Preface

This document contains summarys and indexes which are useful for working with the MAS system. The plan of this document is as follows: Chapter 1 gives an short introduction in using the different informations containted in this document. Chapter 2 contains the specifications of several algebraic structures. Chapter 3 lists all Modula–2 definition modules of the ALDES /SAC–2, the DIP and the MAS libraries. Chapter 4 contains a algorithm comment to procedure name index. Chapter 5 consists of an procedure header to definition module index. The last part is an procedure name index of this document.

Acknowledgements

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: B. Deyle, H. Friebel, E. Reisinger, M. Rothmeier, K. Rieger, T. Wollersberger, J. Müller. The MAS system was first developed using the following hard– and software: Computer: Atari 1040 ST, (1 MB) 1986. Compiler: TDI: Modula–2/ST, Clifton, Bristol, UK, 1986. Editor: micro EMACS, by Daniel Lawrence, 1988. Shell: Guläm by Prabhaker Mateti at Case, 1988.

Passau, April 6, 1989. H. Kredel^{1}

1University of Passau, Innstraße 33, D-8390 Passau, FRG, Tel: (49,0) 851/ 509-315, E-mail: kredel @ unipas.fmi.uni-passau.de

Contents

1 Overview and Introduction 7

1.1 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2 Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.3 Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.4 How to Use the Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2 Specifications 11 2.1 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.2 Abstract Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.3 LISP Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.4 Arithmetic Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.5 Polynomial Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.6 Term Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.7 Test Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3 Kernel Algoritms 30 3.1 MAS Basic I/O System . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.2 MAS BIOS Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.3 MAS Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.4 MAS Elementary Functions . . . . . . . . . . . . . . . . . . . . . . . . 32 3.5 MAS GEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.6 MAS Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 3.7 SAC Basic I/O System . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 3.8 SAC List Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

4 LISP Algorithms 38 4.1 Aldes Parser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 4.2 MAS Lisp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 4.3 MAS Lisp Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.4 MAS Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.5 MAS Load A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.6 MAS Load B. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.7 MAS Load C. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.8 MAS Load D. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.9 MAS Load L. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.10 MAS Parser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.11 MAS Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.12 MAS Sepcification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.13 MAS Symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.14 MAS/SAC Symbol System 2. . . . . . . . . . . . . . . . . . . . . . . . 43 4.15 MAS Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 4.16 MAS Symbol to DIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 4.17 SAC Symbol System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.18 SAC Symbol 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

5 Arithmetic Algorithms 49 5.1 MAS Arbitrary Precision Floating Point . . . . . . . . . . . . . . . . . 49 5.2 MAS Floating Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 5.3 MAS Integer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 5.4 MAS Rational Number . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 5.5 SAC Combinatorical System . . . . . . . . . . . . . . . . . . . . . . . . 52 5.6 SAC Digit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 5.7 SAC Integer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 5.8 SAC Modular Digit and Integer . . . . . . . . . . . . . . . . . . . . . . 57 5.9 SAC Factorization and Prime Number . . . . . . . . . . . . . . . . . . 59 5.10 SAC Rational Number . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 5.11 SAC Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

6 Polynomial Systems Algorithms 62 6.1 DIP Common Polynomial System . . . . . . . . . . . . . . . . . . . . . 62 6.2 DIP Integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 6.3 DIP Integer Polynomial . . . . . . . . . . . . . . . . . . . . . . . . . . 70 6.4 DIP Rational . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 6.5 DIP Rational Number Polynomial . . . . . . . . . . . . . . . . . . . . . 73 6.6 DIP Termorder Optimization . . . . . . . . . . . . . . . . . . . . . . . 73 6.7 SAC Dense Polynomial . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 6.8 SAC Integer Polynomial System . . . . . . . . . . . . . . . . . . . . . . 75 6.9 SAC Modular Polynomial . . . . . . . . . . . . . . . . . . . . . . . . . 78 6.10 SAC Polynomial System . . . . . . . . . . . . . . . . . . . . . . . . . . 81 6.11 SAC Rational Polynomial . . . . . . . . . . . . . . . . . . . . . . . . . 82

7 Module Algorithms 84 7.1 MAS Linear Algebra Integer . . . . . . . . . . . . . . . . . . . . . . . . 84 7.2 MAS Linear Algebra Rational Number . . . . . . . . . . . . . . . . . . 86 7.3 SAC Linear Diophantine Equation System . . . . . . . . . . . . . . . . 90 7.4 Symmetric functions definition module. . . . . . . . . . . . . . . . . . 92

8 MAS Ring Algorithms 93 8.1 DIP Ideal Decomposition 0 System . . . . . . . . . . . . . . . . . . . . 93 8.2 DIP Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 8.3 DIP GCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 8.4 DIP Ideal System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 8.5 DIP Rational Function . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 8.6 DIP Rational Groebner Bases . . . . . . . . . . . . . . . . . . . . . . . 96 8.7 DIP Ideal Real Root System . . . . . . . . . . . . . . . . . . . . . . . . 97 8.8 DIP Zero Dimensional Ideal . . . . . . . . . . . . . . . . . . . . . . . . 98

9 SAC Ring Algorithms 99 9.1 SAC Algebraic Number Field . . . . . . . . . . . . . . . . . . . . . . . 99 9.2 SAC Extensions 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 9.3 SAC Extensions 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 9.4 SAC Extensions 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 9.5 SAC Extensions 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 9.6 SAC Extensions 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 9.7 SAC Extensions 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 9.8 SAC Extensions 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 9.9 SAC Modular Univariate Polynomial Factorization . . . . . . . . . . . 103 9.10 SAC Polynomial Factorization . . . . . . . . . . . . . . . . . . . . . . . 104 9.11 SAC Polynomial GCD and RES System . . . . . . . . . . . . . . . . . 105 9.12 SAC Polynomial Real Root . . . . . . . . . . . . . . . . . . . . . . . . 108 9.13 SAC Univariate Polynomial Factorization . . . . . . . . . . . . . . . . 111

10 Non–commutative Algorithms 113 10.1 DIP Exterior Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 10.2 MAS Non-commutative . . . . . . . . . . . . . . . . . . . . . . . . . . 116 10.3 MAS Non-commutative Center . . . . . . . . . . . . . . . . . . . . . . 116 6 CONTENTS

10.4 MAS Non-commutative Groebner Bases . . . . . . . . . . . . . . . . . 118 11 Procedure Header to Module Index 119 12 Comment to Procedure and Module index 142 Index 167

Chapter 1

Overview and Introduction

This document contains useful information for programming and computing with MAS. In the first sections we discuss the structure of the information contained in the following chapters. In the last section we provide some hints on how to retrieve the information from this document.

1.1 Specifications

The chapter on specifications contains some listings of first test structures. These specifications may change in later versions. The listings have been printed using some LaTEX macros distributed by Eamann Mc-Manus. The macros combine two character tokens into one TEX math–operator. The transliteration is given in table 1.1.

1.1.1 Overview

The first section in this chapter contains an initialization data set, which reads all required specifications of algebraic structures and exposes them in the top level environment. The second section defines some abstract structures like Abelian Groups (AGROUP) or Fields (FIELD). The third section contains the definition of all built–in structures such as lists (Lists), booleans (BOOL) or atoms (ATOM). The fourth section contains the specifications of the arithmetic structures such as integers (INTEGER), rational numbers (RATIONAL), modular integers (MODINT) or arbitrary precision floating point numbers (FLOAT). The fifth section defines the polynomial system structures such as integral recursive polynomials (IPOL), distributive rational polynomials (DIRP), sets (lists) of distributive rational polynomials (DIRL) and rings with Gröbner bases (GBRING).

Modula–2 string  printed TEX character

                         !=  ≠
                         <<  ≪
                         <=  ≤
                         <>  ≠
                         >>  ≫
                         >=  ≥
                         ->  →
                         :=  ←
                         ^↑
                 "character string"  "character␣string"
                 'character string'  'character␣string'

Table 1.1: Transliteration in Listings

The sixth section contains the definition of some term models such as propositional logic (PROPLOG) or Peano arithmetic (PEANO). The last section contains some test examples for the evaluation of expression using the specifications.

1.2 Libraries

The library chapters contain the Modula–2 definition modules of MAS. Not contained are probably defined global variables of the modules. The comments on the procedures are structured according the ALDES / SAC–2 publication scheme. The first sentence of the comment defines the full procedure identification. The procedure name is a mnemonic abreviation of this full identification. The remaining text describes the input and output parameters of the procedure together with a short description of its purpose and functionality. The comments are extracted from the implementation ALDES source files so they may differ in some cases to the official publication ALDES versions. Only the destinction between capital letters and lower case letters has been introduced. The ornamentations are still in implementation ALDES style. However the identifier names in the Modula–2 implementation modules still correspond to the implementation ALDES names. Some care is needed in case of the function return parameters. They are no more visible in the Modula–2 procedure header, but should be determinable from the comment text without difficulty. The procedure names are put to the master index at the end of the document. Information on the data structure definitions is partly contained in the MAS Interactive Usage document or directly in the Modula–2 implementation modules. Some statistics on system source code sizes are summarized in table 1.2. The indicated

System  lines 1000 bytes
MAS 0.6  42023  1 484
Reduce 3.3  51661  1 665
Scratchpad II 66382  2 402

Table 1.2: System Source Code Sizes

numbers refer to the distributed systems without further user contributed packages which may be available.

1.3 Indexes

There are three indexes:

1. a procedure header to definition module index,

2. a comment to procedure name index and

3. a master index of procedure names. In the sequel we discuss the definition of each index. In case of the procedure header to definition module index each line is build as follows:

1. The first column shows the name of the Modula–2 definition module. The file name extension .DEF is not shown.

2. The second column shows the Modula–2 (ALDES / SAC–2) procedure name.

3. The rest of the line shows the input and output parameters of the procedures.

4. The index is alphabeticaly sorted by the second column. In case of the comment to procedure name index each line is build as follows:

1. The first column shows the name of the Modula–2 (ALDES / SAC–2) procedure.

2. The second column shows the name identifying comment sentence.

3. The index is alphabeticaly sorted by the second column. Finally the master index of procedure names contains all names of procedures listed in the definition modules. The numbers following the procedure name show the page number in this document where the procedure comment is listed.

1.4 How to Use the Indexes

There are three main usages of this document

1. you know the procedure name and you want to know the procedure parameters or the procedure location.

2. you have some idea of a procedure function and want to know if there exists a procedure which implements this function.

3. you know the procedure name and want to know the description of the functionality of the procedure.

The first problem can be solved in two ways:

1. You search the procedure name in the procedure header to definition module index. From the found entry the number of parameters and (in most cases) from the parameter names the types of the parameters can be determined.

2. Or you search the procedure name in the master index. From the found entry the page number of the procedure comment can be determined. Looking at this page the description of the procedure parameters together with the functionality of the procedure can be determined.

For the second problem there are also two solutions:

1. You search for an procedure comment in the comment to procedure name index. From the found entry the names of the desired procedures can be determined.

2. You search in the table of contents for the definition module with the required functionality. Then from the listing of the definition module the existance of an appropriate procedure can be determined.

For the third problem there is only one recomendable solution:

1. You search the procedure name in the master index. From the found entry the page number of the procedure comment can be determined. Looking at this page the description of the procedure parameters together with the functionality of the procedure can be determined.

Note that for the interactive use of MAS it is required that you check if the procedure is accessible from the interpreter by the HELP or EXTPROCS command.

Specifications

2.1 Initialization

BEGIN

 CLOUT("Loading␣specifications␣...");

(∗OUT(”NUL:”);∗) x←T; (∗ define T for parser ∗) PRAGMA(SLOPPY); (∗PRAGMA(GENPARSE); ensure non-generic parse ∗) END.

(∗ read required specifications. ∗)

IN("spec/abstr.spc"). (∗ abstract items ∗)

IN("spec/lisp.spc"). (∗ builtin lisp functions ∗)

IN("spec/arith.spc"). (∗ basic arithmetic ∗)

IN("spec/term.spc"). (∗ elementary term structures ∗)

IN("spec/poly.spc"). (∗ polynomials ∗)

CLOUT("␣...␣exposing␣units␣...␣").

(∗specifics. ∗) EXPOSE ATOM. EXPOSE REPRESENTATION. EXPOSE Lists.

EXPOSE INTEGER. EXPOSE RATIONAL.

12 CHAPTER 2. SPECIFICATIONS

EXPOSE MODINT. EXPOSE FLOATING.

EXPOSE PROPLOG. EXPOSE PEANO.

EXPOSE IPOL. EXPOSE DIRP. EXPOSE DIRL.

(∗generics. ∗) EXPOSE OBJECT. EXPOSE AGROUP. EXPOSE FIELD. EXPOSE RING. EXPOSE GBRING.

BEGIN PRAGMA(FUSSY); (∗SHUT(”NUL:”);∗) (∗PRAGMA(GENPARSE); allow generic parse, if required ∗)

 CLOUT("...␣finished.");

END.

2.2 Abstract Structures

(∗ ———- specifications of abstract items — ∗)

SPECIFICATION OBJECT; (∗Object specification. ∗) (∗1∗) SORT obj; (∗2∗) SIGNATURE READ (obj) : obj;

SIGNATURE WRITE (obj) ; (∗3∗) SIGNATURE DECREAD (obj) : obj;

SIGNATURE DECWRITE (obj) ; (∗4∗) SIGNATURE DEFAULT (obj) : obj;

SIGNATURE COERCE (obj) : obj; (∗9∗) END OBJECT.

SPECIFICATION AMONO; (∗Abelian monoid specification. ∗)

2.2. ABSTRACT STRUCTURES 13

(∗1∗) IMPORT OBJECT[ amono/obj ]; (∗2∗) SIGNATURE ZERO (amono) : amono; (∗3∗) SIGNATURE SUM (amono,amono) : amono; (∗9∗) END AMONO.

SPECIFICATION AGROUP; (∗Abelian group specification. ∗) (∗1∗) IMPORT AMONO[ ag/amono ]; (∗2∗) SIGNATURE DIF (ag,ag) : ag;

SIGNATURE NEG (ag) : ag; (∗9∗) END AGROUP.

SPECIFICATION XRING; (∗Ring specification extending A group. ∗) (∗1∗) IMPORT AGROUP[ xring/ag ]; (∗2∗) SIGNATURE ONE (xring) : xring; (∗3∗) SIGNATURE PROD (xring,xring) : xring;

SIGNATURE EXP (xring,xring) : xring; (∗9∗) END XRING.

SPECIFICATION RING; (∗Ring specification combining an A group and an A moniod. ∗) (∗1∗) SORT atom;

IMPORT AGROUP[ ring/ag ];

IMPORT AMONO [ ring/amono, ONE/ZERO, PROD/SUM ]; (∗3∗) SIGNATURE EXP (ring,atom) : ring; (∗9∗) END RING.

SPECIFICATION MODULE(Ring (∗: spec∗)); (∗Module specification. ∗) (∗1∗) IMPORT AGROUP[ melem/ag ];

(∗IMPORT Ring;∗)

SORT ring; (∗3∗) SIGNATURE SPROD (ring,melem) : melem; (∗9∗) END MODULE.

SPECIFICATION ERING; (∗Euclidean ring specification. ∗) (∗1∗) IMPORT RING[ er/ring ]; (∗2∗) SIGNATURE QR (er,er,er,er) ;

SIGNATURE GCD (er,er) : er; (∗9∗) END ERING.

SPECIFICATION GBRING; (∗Groebner base ring specification. ∗)

IMPORT RING[ gbring/ring ]; (∗2∗) SIGNATURE NF (gbring,ring) : ring;

SIGNATURE GB (gbring) : gbring; SIGNATURE IRR (gbring) : gbring;

(∗9∗) END GBRING.

SPECIFICATION XFIELD; (∗Field specification extending ring. ∗) (∗1∗) IMPORT RING[ xfield/ring ]; (∗2∗) SIGNATURE REZIP (xfield) : xfield;

SIGNATURE Q (xfield,xfield) : xfield; (∗9∗) END XFIELD.

SPECIFICATION FIELD; (∗Field specification combining two A groups. ∗) (∗1∗) SORT atom;

IMPORT AGROUP[ field/ag ];

IMPORT AGROUP[ field/ag, ONE/ZERO, PROD/SUM, REZIP/NEG, Q/DIF ]; (∗3 SIGNATURE EXP (field ,atom) : field; ∗) (∗9∗) END FIELD.

(∗ ———– implementations of abstract items — ∗)

IMPLEMENTATION RING; (∗1∗) PROCEDURE EXP(X,n);

VAR x: ring; VAR i: atom; BEGIN (∗1∗) IF n ≤ 0 THEN x←ONE(X); RETURN(x) END; (∗3∗) i←n; x←X;

WHILE i > 1 DO i←i−1; x←PROD(x,X) END;

RETURN(x) (∗9∗) END EXP;

(∗9∗) END RING.

2.3. LISP STRUCTURES 15

2.3 LISP Structures

(∗ ———- atom unit — ∗)

SPECIFICATION ATOM; (∗Atoms specification. ∗) (∗1∗) SORT atom; (∗2∗) SIGNATURE Aone () : atom;

SIGNATURE Azero () : atom; (∗3∗) SIGNATURE MUL (atom,atom) : atom;

SIGNATURE ADD (atom,atom) : atom; SIGNATURE SUB (atom) : atom; SIGNATURE SUB (atom,atom) : atom; SIGNATURE POW (atom,atom) : atom; SIGNATURE QUOT (atom,atom) : atom; SIGNATURE REM (atom,atom) : atom;

(∗4∗) SIGNATURE Adefault () : atom; (∗9∗) END ATOM.

IMPLEMENTATION ATOM; (∗1∗) PROCEDURE Aone();

BEGIN RETURN(1) END Aone; (∗2∗) PROCEDURE Azero();

BEGIN RETURN(0) END Azero; (∗3∗) PROCEDURE Adefault();

BEGIN RETURN(0) END Adefault; (∗9∗) END ATOM.

MODEL RING; (∗Atoms are a model for rings. ∗) (∗1∗) IMPORT ATOM;

IMPORT INTEGER; (∗2∗) MAP READ(atom) → IREAD();

MAP WRITE(atom) → IWRITE(VAL); MAP DEFAULT(atom) → Adefault();

(∗3∗) MAP ONE(atom) → Aone(); MAP ZERO(atom) → Azero(); (∗4∗) MAP PROD(atom,atom) → MUL(VAL,VAL);

MAP SUM(atom,atom) → ADD(VAL,VAL); MAP DIF(atom,atom) → SUB(VAL,VAL); MAP NEG(atom) → SUB(VAL);

(∗9∗) END RING.

(∗ ———- list unit — ∗)

SPECIFICATION Lists; (∗LIST is a keyword ! ∗) (∗List processing specification. ∗) (∗1∗) SORT list, object, atom; (∗2∗) SIGNATURE NullList () : list;

SIGNATURE COMP (object, list) : list; SIGNATURE LIST (object, (∗...,∗) object) : list; SIGNATURE CONC (list,list) : list; SIGNATURE CCONC (list,list) : list;

(∗3∗) SIGNATURE FIRST (list) : object; SIGNATURE RED (list) : list; SIGNATURE ADV (list, object, list) ;

(∗4∗) SIGNATURE INV (list) : list;

SIGNATURE CINV (list) : list; (∗5∗) SIGNATURE SFIRST (list,object) ;

SIGNATURE SRED (list,list) ; (∗7∗) SIGNATURE EQUAL (object,object) : atom;

SIGNATURE LENGTH (list) : atom; (∗9∗) END Lists.

IMPLEMENTATION Lists; (∗1∗) PROCEDURE NullList(): list;

RETURN(LIST()) NullList; (∗9∗) END Lists.

(∗ ———- bool unit — ∗)

SPECIFICATION BOOL; (∗Boolean specification. ∗) (∗1∗) SORT bool, object; (∗2∗) SIGNATURE true () : bool;

SIGNATURE false () : bool; (∗3∗) SIGNATURE EQ (object,object) : bool;

SIGNATURE NE (object,object) : bool; SIGNATURE LE (object,object) : bool;

2.3. LISP STRUCTURES 17

SIGNATURE GE (object,object) : bool; SIGNATURE LT (object,object) : bool; SIGNATURE GT (object,object) : bool;

(∗4 (∗key words∗)

SIGNATURE OR (bool,bool) : bool; SIGNATURE AND (bool,bool) : bool; SIGNATURE NOT (bool) : bool; ∗)

(∗9∗) END BOOL.

IMPLEMENTATION BOOL; (∗1∗) PROCEDURE true();

BEGIN RETURN(T) END true; (∗2∗) PROCEDURE false();

BEGIN RETURN(LIST()) END false; (∗9∗) END BOOL.

(∗ ———– representation unit — ∗)

SPECIFICATION REPRESENTATION; (∗Representation specification. ∗) (∗1∗) SORT elem, name, rep, pair, bool, func; (∗2∗) SIGNATURE NewRep () : rep;

SIGNATURE SetRep (name,elem,rep) ; SIGNATURE GetRep (name,rep) : elem; SIGNATURE CopyRep (rep) : rep; SIGNATURE StepRep (rep) : pair; SIGNATURE ForEachinRep (rep,func) : rep; SIGNATURE FullRep (rep) : bool; SIGNATURE Pair (name,elem) : pair; SIGNATURE NullPair () : pair;

(∗9∗) END REPRESENTATION.

IMPLEMENTATION REPRESENTATION; (∗1∗) PROCEDURE Pair(a,b): pair;

RETURN(LIST(a,b)) Pair; (∗2∗) PROCEDURE NullPair(): pair;

RETURN(LIST()) NullPair; (∗9∗) END REPRESENTATION.

2.4 Arithmetic Structures

(∗ ———- integer unit — ∗)

SPECIFICATION INTEGER; (∗Integral numbers specification. ∗) (∗1∗) SORT INT; (∗2∗) SIGNATURE IWRITE (INT) ;

SIGNATURE IREAD (INT) : INT; (∗3∗) SIGNATURE Ione () : INT;

SIGNATURE Izero () : INT; (∗4∗) SIGNATURE IPROD (INT,INT) : INT;

SIGNATURE ISUM (INT,INT) : INT; SIGNATURE IDIF (INT,INT) : INT; SIGNATURE INEG (INT) : INT; SIGNATURE IQR (INT,INT,INT,INT) ; SIGNATURE IGCD (INT,INT) : INT;

(∗9∗) END INTEGER.

IMPLEMENTATION INTEGER; (∗1∗) PROCEDURE Ione();

BEGIN RETURN(1) END Ione; (∗2∗) PROCEDURE Izero();

BEGIN RETURN(0) END Izero; (∗9∗) END INTEGER.

MODEL RING; (∗Integers are a model for rings. ∗) (∗1∗) IMPORT INTEGER; (∗2∗) MAP READ(INT) → IREAD();

MAP WRITE(INT) → IWRITE(VAL); (∗3∗) MAP ONE(INT) → Ione();

MAP ZERO(INT) → Izero(); (∗4∗) MAP PROD(INT,INT) → IPROD(VAL,VAL);

MAP SUM(INT,INT) → ISUM(VAL,VAL); MAP DIF(INT,INT) → IDIF(VAL,VAL); MAP NEG(INT) → INEG(VAL);

(∗9∗) END RING.

(∗ ———- rational number unit — ∗)

2.4. ARITHMETIC STRUCTURES 19

SPECIFICATION RATIONAL; (∗Rational numbers specification. ∗) (∗1∗) SORT RAT, INT, atom; (∗2∗) SIGNATURE RNWRITE (RAT) ;

SIGNATURE RNDRD (RAT) : RAT; (∗3∗) SIGNATURE RNone () : RAT;

SIGNATURE RNzero () : RAT; (∗4∗) SIGNATURE RNPROD (RAT,RAT) : RAT;

SIGNATURE RNSUM (RAT,RAT) : RAT; SIGNATURE RNDIF (RAT,RAT) : RAT; SIGNATURE RNNEG (RAT) : RAT; SIGNATURE RNINV (RAT) : RAT; SIGNATURE RNQ (RAT,RAT) : RAT;

(∗5∗) SIGNATURE RNINT (INT) : RAT;

SIGNATURE RNprec (atom) ; (∗9∗) END RATIONAL.

IMPLEMENTATION RATIONAL;

VAR s: atom; (∗1∗) PROCEDURE RNone();

BEGIN RETURN(RNINT(1)) END RNone; (∗2∗) PROCEDURE RNzero();

BEGIN RETURN(RNINT(0)) END RNzero; (∗3∗) PROCEDURE RNWRITE(a);

BEGIN IF s < 0 THEN RNWRIT(a) ELSE RNDWR(a,s) END;

END RNWRITE; (∗4∗) PROCEDURE RNprec(a);

BEGIN s←a END RNprec; (∗8∗) BEGIN

s←−1; (∗9∗) END RATIONAL.

MODEL FIELD; (∗Rational numbers are a model for fields. ∗) (∗1∗) IMPORT RATIONAL; (∗2∗) MAP READ(RAT) → RNDRD();

MAP WRITE(RAT) → RNWRITE(VAL); (∗3∗) MAP ONE(RAT) → RNone();

MAP ZERO(RAT) → RNzero(); (∗4∗) MAP PROD(RAT,RAT) → RNPROD(VAL,VAL);

MAP SUM(RAT,RAT) → RNSUM(VAL,VAL); MAP DIF(RAT,RAT) → RNDIF(VAL,VAL); MAP NEG(RAT) → RNNEG(VAL); MAP Q(RAT,RAT) → RNQ(VAL,VAL); MAP REZIP(RAT) → RNINV(VAL);

(∗9∗) END FIELD.

(∗ ———- modular integer unit — ∗)

SPECIFICATION MODINT; (∗Modular integers specification. ∗) (∗1∗) SORT MI, INT, mod; (∗2∗) SIGNATURE MIWRIT (MI) ;

SIGNATURE MIREAD (mod,MI) : MI; (∗3∗) SIGNATURE MIone (mod) : MI;

SIGNATURE MIzero () : MI; (∗4∗) SIGNATURE MIPROD (mod,MI,MI) : MI;

SIGNATURE MISUM (mod,MI,MI) : MI; SIGNATURE MIDIF (mod,MI,MI) : MI; SIGNATURE MINEG (mod,MI) : MI; SIGNATURE MIINV (mod,MI) : MI; SIGNATURE MIQ (mod,MI,MI) : MI;

(∗5∗) SIGNATURE MIHOM (mod,INT) : MI; (∗9∗) END MODINT.

IMPLEMENTATION MODINT; (∗1∗) PROCEDURE MIone(m);

BEGIN RETURN(MIHOM(m,1)) END MIone; (∗2∗) PROCEDURE MIzero();

BEGIN RETURN(0) END MIzero; (∗3∗) PROCEDURE MIREAD(m);

BEGIN RETURN(MIHOM(m,IREAD())) END MIREAD; (∗4∗) PROCEDURE MIWRIT(x);

BEGIN IWRITE(x) END MIWRIT; (∗9∗) END MODINT.

MODEL FIELD; (∗Integers mod p are a model for fields. ∗) (∗1∗) IMPORT MODINT;

IMPORT INTEGER; (∗2∗) MAP READ(MI) → MIREAD(DESC);

MAP WRITE(MI) → MIWRIT(VAL); MAP DECREAD(MI) → IREAD(); MAP DECWRITE(MI) → IWRITE(VAL);

2.4. ARITHMETIC STRUCTURES 21

(∗3∗) MAP ONE(MI) → MIone(DESC);

MAP ZERO(MI) → MIzero(); (∗4∗) MAP PROD(MI,MI) → MIPROD(DESC,VAL,VAL) WHEN EQ(DESC,DESC);

MAP SUM(MI,MI) → MISUM(DESC,VAL,VAL) WHEN EQ(DESC,DESC); MAP DIF(MI,MI) → MIDIF(DESC,VAL,VAL) WHEN EQ(DESC,DESC); MAP NEG(MI) → MINEG(DESC,VAL); MAP Q(MI,MI) → MIQ(DESC,VAL,VAL) WHEN EQ(DESC,DESC); MAP REZIP(MI) → MIINV(DESC,VAL);

(∗9∗) END FIELD.

(∗ ———- floating point number unit — ∗)

SPECIFICATION FLOATING; (∗Floating point numbers specification. ∗) (∗1∗) SORT FLOAT, INT, RAT, atom; (∗2∗) SIGNATURE APWRIT (FLOAT) ;

SIGNATURE APREAD (FLOAT) : FLOAT; (∗3∗) SIGNATURE APone () : FLOAT;

SIGNATURE APzero () : FLOAT; (∗2∗) SIGNATURE APPROD (FLOAT,FLOAT) : FLOAT;

SIGNATURE APSUM (FLOAT,FLOAT) : FLOAT; SIGNATURE APDIF (FLOAT,FLOAT) : FLOAT; SIGNATURE APNEG (FLOAT) : FLOAT; SIGNATURE APINV (FLOAT) : FLOAT; SIGNATURE APQ (FLOAT,FLOAT) : FLOAT;

(∗5∗) SIGNATURE APFINT (INT) : FLOAT; SIGNATURE APFRN (RAT) : FLOAT; SIGNATURE RNFAP (FLOAT) : RAT; SIGNATURE APSPRE (atom) ;

(∗9∗) END FLOATING.

IMPLEMENTATION FLOATING; (∗1∗) PROCEDURE APone();

BEGIN RETURN(APFINT(1)) END APone; (∗2∗) PROCEDURE APzero();

BEGIN RETURN(APFINT(0)) END APzero; (∗3∗) PROCEDURE APDIF(a,b);

BEGIN RETURN(APDIFF(a,b)) END APDIF; (∗4∗) PROCEDURE APINV(a);

BEGIN RETURN(APQ(APFINT(1),a)) END APINV; (∗9∗) END FLOATING.

MODEL FIELD; (∗AP floating numbers are (nearly) a model for fields. ∗) (∗1∗) IMPORT FLOATING; (∗2∗) MAP READ(FLOAT) → APREAD();

MAP WRITE(FLOAT) → APWRIT(VAL); (∗3∗) MAP ONE(FLOAT) → APone();

MAP ZERO(FLOAT) → APzero(); (∗4∗) MAP PROD(FLOAT,FLOAT) → APPROD(VAL,VAL);

MAP SUM(FLOAT,FLOAT) → APSUM(VAL,VAL); MAP DIF(FLOAT,FLOAT) → APDIF(VAL,VAL); MAP NEG(FLOAT) → APNEG(VAL); MAP Q(FLOAT,FLOAT) → APQ(VAL,VAL); MAP REZIP(FLOAT) → APINV(VAL);

(∗9∗) END FIELD.

2.5 Polynomial Structures

(∗ ———- integer recursive polynomial unit — ∗)

SPECIFICATION IPOL; (∗Integer recursive polynomial specification. ∗) (∗1∗) SORT ipol, pol, dip, atom; (∗2∗) SIGNATURE IPzero () : ipol;

SIGNATURE IPSUM (atom,ipol,ipol) : ipol; SIGNATURE IPNEG (atom,ipol) : ipol; SIGNATURE IPDIF (atom,ipol,ipol) : ipol;

(∗3∗) SIGNATURE IPPROD (atom,ipol,ipol) : ipol;

SIGNATURE IPEXP (atom,ipol,ipol) : ipol; (∗4∗) SIGNATURE PFDIP (dip,atom,pol) ; (∗9∗) END IPOL.

IMPLEMENTATION IPOL; (∗2∗) PROCEDURE IPzero();

BEGIN RETURN(0) END IPzero; (∗2∗) PROCEDURE IPDIF(r,a,b);

BEGIN RETURN(IPSUM(r,a,IPNEG(r,b))) END IPDIF; (∗9∗) END IPOL.

MODEL RING;

2.5. POLYNOMIAL STRUCTURES 23

(∗Integer recursive polynomial are a model for rings. ∗) (∗1∗) IMPORT IPOL; (∗2∗) MAP ZERO(ipol) → IPzero();

MAP SUM(ipol,ipol) → IPSUM(DESC,VAL,VAL) WHEN EQ(DESC,DESC); MAP NEG(ipol) → IPNEG(DESC,VAL); MAP DIF(ipol,ipol) → IPDIF(DESC,VAL,VAL) WHEN EQ(DESC,DESC);

(∗3∗) MAP PROD(ipol,ipol) → IPPROD(DESC,VAL,VAL) WHEN EQ(DESC,DESC);

MAP EXP(ipol,atom) → IPEXP(DESC,VAL,VAL); (∗9∗) END RING.

(∗ ———- distributive rational polynomial unit — ∗)

SPECIFICATION DIRP; (∗Distributive rational polynomial specification. ∗) (∗1∗) SORT dip, dirp, diip, pol, atom; (∗2∗) SIGNATURE DIRPSM (dirp,dirp) : dirp;

SIGNATURE DIRPNG (dirp) : dirp; SIGNATURE DIRPDF (dirp,dirp) : dirp;

(∗3∗) SIGNATURE DIRPPR (dirp,dirp) : dirp; (∗4∗) SIGNATURE DIPFP (atom,pol) : dip; (∗6∗) SIGNATURE DIIFRP (dirp) : diip;

SIGNATURE DIRFIP (diip) : dirp; (∗9∗) END DIRP.

IMPLEMENTATION DIRP; (∗2∗) PROCEDURE DIRPDF(a,b);

BEGIN RETURN(DIRPSM(a,DIRPNG(b))) END DIRPDF; (∗9∗) END DIRP.

MODEL RING; (∗Distributive rational polynomial are a model for rings. ∗) (∗1∗) IMPORT DIRP; (∗2∗) MAP SUM(dirp,dirp) → DIRPSM(VAL,VAL);

MAP NEG(dirp) → DIRPNG(VAL); MAP DIF(dirp,dirp) → DIRPDF(VAL,VAL);

(∗4∗) MAP PROD(dirp,dirp) → DIRPPR(VAL,VAL);

MAP EXP(dirp,dirp) → DIRPEX(VAL,VAL); (∗9∗) END RING.

(∗ ———- distributive rational polynomial list unit — ∗)

SPECIFICATION DIRL; (∗Distributive rational polynomial list specification. ∗) (∗1∗) SORT dip, dirp, diip, pol, atom, dc; (∗2∗) SIGNATURE PDREAD () : dc;

SIGNATURE PDWRITE (dc) ; (∗3∗) SIGNATURE DIRLRD () : dirl;

SIGNATURE DIRLWR (dirl) ;

SIGNATURE PREADD (dc) : dirl; SIGNATURE PWRITED (dirl) ;

(∗4∗) SIGNATURE DIILFR (dirl) : diil; (∗5∗) SIGNATURE DIRPNF (dirl,dirp) : dirp;

SIGNATURE DIRPGB (dirl,atom) : dirl; SIGNATURE DIRPGB1 (dirl) : dirl; SIGNATURE DIRLIS (dirl) : dirl;

(∗6∗) SIGNATURE SetTflag(atom) ; (∗9∗) END DIRL.

IMPLEMENTATION DIRL; (∗Distributive rational polynomial list implementation. ∗)

VAR s: atom; (∗2∗) PROCEDURE DIRPGB1(a) : dirl;

BEGIN RETURN(DIRPGB(a,s)) END DIRPGB1; (∗3∗) PROCEDURE SetTflag(a);

BEGIN s←a END SetTflag; (∗4∗) BEGIN

s←1; (∗9∗) END DIRL.

MODEL OBJECT; (∗Distributive rational polynomial lists are a model for objects. ∗) (∗1∗) IMPORT DIRL; (∗2∗) MAP DECREAD(dirl) → PDREAD();

MAP DECWRITE(dirl) → PDWRITE(VAL); (∗3∗) MAP READ(dirl) → PREADD(DESC);

MAP WRITE(dirl) → PWRITED(DESC,VAL); (∗9∗) END OBJECT.

(∗ ———- gb structure unit — ∗)

MODEL GBRING; (∗Distributive rational polynomial lists are a model for Groebner base rings. ∗)

2.6. TERM STRUCTURES 25

IMPORT DIRL; (∗2∗) MAP NF(dirl,dirp) → DIRPNF(VAL,VAL);

MAP GB(dirl) → DIRPGB1(VAL); MAP IRR(dirl) → DIRLIS(VAL);

(∗9∗) END GBRING.

2.6 Term Structures

(∗ ———- propositional logic unit — ∗)

SPECIFICATION PROPLOG; (∗Propositional logic specification. ∗) (∗1∗) SORT bool; (∗2∗) SIGNATURE FALSE () : bool;

SIGNATURE TRUE () : bool; (∗3∗) SIGNATURE and (bool,bool) : bool;

SIGNATURE or (bool,bool) : bool; SIGNATURE not (bool) : bool; SIGNATURE implies (bool,bool) : bool; SIGNATURE equival (bool,bool) : bool; SIGNATURE test (bool,bool) : bool;

(∗9∗) END PROPLOG.

AXIOMS PROPLOG; (∗Axioms for propositional logic. ∗) (∗1∗) RULE not(TRUE()) => FALSE();

RULE not(FALSE()) => TRUE(); (∗2∗) RULE and(TRUE(),TRUE()) => TRUE();

RULE and(FALSE(),TRUE()) => FALSE(); RULE and(TRUE(),FALSE()) => FALSE(); RULE and(FALSE(),FALSE()) => FALSE();

(∗3∗) RULE or(TRUE(),TRUE()) => TRUE(); RULE or(FALSE(),TRUE()) => TRUE(); RULE or(TRUE(),FALSE()) => TRUE(); RULE or(FALSE(),FALSE()) => FALSE();

(∗4∗) RULE implies(X,Y) => or(not(X),Y);

RULE equival(X,Y) => and(implies(X,Y),implies(Y,X)); (∗9∗) END PROPLOG.

(∗ ———- peano arithmetic unit — ∗)

SPECIFICATION PEANO; (∗Peano structure specification. ∗) (∗1∗) SORT nat;

IMPORT PROPLOG; (∗2∗) SIGNATURE null () : nat;

SIGNATURE one () : nat; (∗ SIGNATURE succ (nat) : nat; ∗)

SIGNATURE add (nat,nat) : nat; SIGNATURE prod (nat,nat) : nat;

(∗3∗) SIGNATURE equal (nat,nat) : bool;

(∗ SIGNATURE pred (nat) : bool; ∗) (∗9∗) END PEANO.

AXIOMS PEANO; (∗Axioms for Peano system. ∗)

RULE equal(X,X) => TRUE(); RULE equal(succ(X),null()) => FALSE(); RULE equal(null(),succ(X)) => FALSE();

(∗1∗) RULE equal(succ(null()),null()) => FALSE(); (∗2∗) RULE equal(succ(X),succ(Y)) => equal(X,Y); (∗3∗) RULE add(X,null()) => X; (∗4∗) RULE add(X,succ(Y)) => succ(add(X,Y)); (∗5∗) RULE prod(X,null()) => null(); (∗6∗) RULE prod(X,succ(Y)) => add(prod(X,Y),X);

(∗additional equations ”lemmas” ∗)

RULE add(succ(X),Y) => succ(add(X,Y)); RULE add(null(),X) => X; RULE prod(succ(X),Y) => add(X,prod(X,Y)); RULE prod(null(),X) => null(); RULE one() => succ(null());

(∗9∗) END PEANO.

MODEL RING; (∗Peano numbers are a model for rings, except subtract. ∗) (∗1∗) IMPORT PEANO; (∗2∗) MAP WRITE(nat) → MWRITE(VAL); (∗3∗) MAP ONE(nat) → one();

MAP ZERO(nat) → null(); (∗4∗) MAP PROD(nat,nat) → prod(VAL,VAL);

MAP SUM(nat,nat) → add(VAL,VAL); (∗9∗) END RING.

2.7. TEST EXAMPLES 27

2.7 Test Examples

CLOUT("Testing␣specification␣component␣...").

PRAGMA(GENPARSE).

(∗Arithmetic units. ∗) VAR i, j : INT.

i←"111111111111111111111111111111111111111111111111111111111111".

j←i↑2. j←j↑0−i∗i+j.

j←j+ "333333333333333333": INT −j.

VAR r, s: RAT.

r←"2222222222.777777777777777".

s←r/r. s←r↑0+s− "1": RAT.

VAR m, n: MI "7".

m←"11111111111111111111111111".

n←m/m. n←m↑0+n− "8": MI "7".

28 CHAPTER 2. SPECIFICATIONS

VAR f, g: FLOAT.

f←"2222.3E10".

g←f↑3. g←f/g. g←g∗f∗f.

(∗Term units. ∗) x←one(). x←add(x,x). y←prod(x,x). (∗ (∗Polynomial unit. ∗) (∗Example from Trinks 6/7. ∗) (∗Syntax: ”<variable list> <term order>” ∗)

VAR p, q: dirl "(B,S,T,Z,P,W)␣L".

(∗Syntax: ”<polynomial list>” ∗) p←"( ( 45 P + 35 S − 165 B − 36 ),

( 35 P + 40 Z + 25 T − 27 S ),

( 15 W + 25 S P + 30 Z − 18 T − 165 B∗∗2 ), ( − 9 W + 15 T P + 20 S Z ), ( P W + 2 T Z − 11 B∗∗3 ), ( 99 W − 11 B S + 3 B∗∗2 ) ( B∗∗2 + 33/50 B + 2673/10000 )

   )".

q←GB(p). ∗) PRAGMA(GENPARSE).

2.7. TEST EXAMPLES 29

CLOUT("...finished.").

Kernel Algoritms

3.1 MAS Basic I/O System

procedure BKSP ; {Backspace. Reread the last character from the input stream. } procedure BLINES (N: GAMMAINT); {Blank lines. N is a positive integer. N records of one blank each are output. } procedure CREAD (): GAMMAINT; {Character read. Returns next character from the input stream. } procedure CREADB (): GAMMAINT; {Character read, skipping blanks. Returns next character from the input stream. } procedure CWRITE (C: GAMMAINT); {Character write. The character c is transmitted to the output stream. } procedure CloseBIOS ; {Close BIOS. Close all streams and write summary. } procedure CUNIT (S: ARRAY OF CHAR): GAMMAINT; {Close unit. The unit S is closed, with S as the external name. CUNIT returns 0 on successful completion, ne 0 else. } procedure DIBUFF ; {Display input buffer. The input buffer status is displayed. } procedure DIGIT (C: GAMMAINT): BOOLEAN; {Digit. c is a character. If c is a digit then TRUE is returned otherwise FALSE is returned. } procedure GREAD (): GAMMAINT; {Gamma-integer read. A gamma-integer is read from the input stream. any preceding blanks are skipped. } procedure GWRITE (a: GAMMAINT); {Gamma-integer write. The gamma-integer a is written in the output stream. } procedure LETTER (C: GAMMAINT): BOOLEAN; {Letter. c is a character. If c is a letter then TRUE is returned otherwise FALSE is returned. } procedure LISTS (VAR S: ARRAY OF CHAR): LIST; {List from string. S is a character string with respect to local character code. A list if the

3.2. MAS BIOS UTILITY 31

corresponding ALDES character codes is returned. } procedure SLIST (A: LIST; VAR S: ARRAY OF CHAR); {String from list. A is a list of ALDES character codes. S is a the corresponding character string with respect to local character codes. } procedure MASCHR (C: GAMMAINT): CHAR; {MAS character. Returns the local character for the aldes character c. } procedure MASORD (C: CHAR): GAMMAINT; {MAS order. Returns the aldes code for the character c. } procedure MASORDI (C: GAMMAINT): GAMMAINT; {MAS order integer. Returns the aldes code for the integer c. } procedure SILINE (VAR S, L, R: GAMMAINT); {Set input line. The input line length is set to S, the left margin is set to L and the right margin is set to R. If any of the values of S, L or R is negative, then the corresponding value is left unchanged. The values in effect are returned. } procedure SIUNIT (S: ARRAY OF CHAR): GAMMAINT; {Set input unit. iunit is set to n, with s as the external name. siunit returns 0 on successful completion, ne 0 else. } procedure SOLINE (VAR S, L, R: GAMMAINT); {Set output line. The output line length is set to S, the left margin is set to L and the right margin is set to R. If any of the values of S, L or R is negative, then the corresponding value is left unchanged. The values in effect are returned. } procedure SOUNIT (S: ARRAY OF CHAR): GAMMAINT; {Set output unit. ounit is set to n, with s as the external name. sounit returns 0 on successful completion, ne 0 else. the current output buffer is emptied. } procedure Summary ; {Summary of stream IO. } procedure StorSummary (); {MASSTOR Summary. } procedure SWRITE (VAR S: ARRAY OF CHAR); {String write. S is a character string with respect to local character codes. The single characters are converted to ALDES codes and written to the output stream. } procedure TAB (n: GAMMAINT); {Tabulate. n is a positive integer. if lmarg le n le rmarg then blanks are inserted in obuff until opos eq n. }

3.2 MAS BIOS Utility

32 CHAPTER 3. KERNEL ALGORITMS

procedure INP (A: LIST): LIST; {Input. Set input unit to stream A, A is an SAC-2 character list. } procedure OUT (A: LIST): LIST; {Output. Set output unit to stream A, A is an SAC-2 character list. } procedure SHUT (A: LIST): LIST; {Shut. Close stream A, A is an SAC-2 character list. } procedure EDIT (A: LIST): LIST; {Edit. Call editor for file A, A is an SAC-2 character list. } procedure DOS (A: LIST): LIST; {DOS. Call DOS program with parameters. A is an SAC-2 character list. } procedure CLTIS (A: LIST); {Character list to input stream. A is an SAC-2 character list. }

3.3 MAS Configuration

3.4 MAS Elementary Functions

procedure MASABS (a: GAMMAINT): GAMMAINT; {Absolute value. a is a gamma-integer. Returns the absolute value of a. } procedure MASEVEN (a: GAMMAINT): BOOLEAN; {Even. a is a gamma-integer. Returns TRUE if a is even and FALSE otherwise. } procedure MASEXP (a,b: GAMMAINT): GAMMAINT; {Exponential function. a and b are gamma-integers, b non-negative. Returns a^{b}, with 0^{0} = 1. } procedure MASMAX (a,b: GAMMAINT): GAMMAINT; {Maximum. a and b are gamma-integers. Returns the maximum of a and b. } procedure MASMIN (a,b: GAMMAINT): GAMMAINT; {Minimum. a and b are gamma-integers. Returns the minimum of a and b. } procedure MASODD (a: GAMMAINT): BOOLEAN; {Odd. a is a gamma-integer. Returns TRUE if a is odd and FALSE otherwise. } procedure MASQREM (a,b: GAMMAINT; VAR q,r: GAMMAINT); {Quotient and remainder. a and b are gamma-integers, b non-zero. q = integer(a/b) and r = a − b ∗ q. } procedure MASREM (a,b: GAMMAINT): GAMMAINT; {Remainder. a and b are gamma-integers, b non-zero. Returns a − b ∗ integer(a/b). } procedure MASSIGN (a: GAMMAINT): GAMMAINT; {Sign. a is a gamma-integer. Returns the sign of a. }

3.5 MAS GEM

procedure NextParm (VAR s: ARRAY OF CHAR): BOOLEAN; {Next Parameter. The next parameter from the GEM environement is placed in string s. If no parameter was found, FALSE is returned and s is undefined, else TRUE is returned. The separator for the parameters is the blank character. } procedure DOS (s: ARRAY OF CHAR): INTEGER; {Call DOS program. } procedure EDIT (s: ARRAY OF CHAR): INTEGER; {Edit file with name s. }

3.6. MAS STORAGE 33

3.6 MAS Storage

procedure ADV (L: LIST; VAR a, LP: LIST); {Advance. L is a non-null list. a=FIRST(L) and LP=RED(L). }

procedure CELLS (): GAMMAINT; {Cells. Returns the used cells since storage initialization. }

procedure CLOCK (): GAMMAINT; {Clock. Returns the current CPU clock reading in seconds. At ATARI ST the clock is in 2 seconds intervalls. }

procedure COMP (a,L: LIST): LIST; {Composition. a is an object. L is a list. Returns the composition of a and L. }

procedure DEQUE (L: LIST): LIST; {Dequeue. L is a non empty queue representing list. Returns a, the first object from the queue. L is updated. }

procedure EMPTYQUE (M: LIST): BOOLEAN; {Empty Queue. Tests if a queue is empty. }

procedure ENQUE (a,L: LIST); {Enqueue. a is an object. L is a queue representing list. Appends a to the quque L. }

procedure ERROR (a: GAMMAINT; s: ARRAY OF CHAR); {Error. An error of severity a and indication s is reported. }

procedure ErrorHandler (a: P0): GAMMAINT; {Error handler. Any error reported by the ERROR procedure is catched. }

procedure FIRST (L: LIST): LIST; {First. L is a non-null list. a is the first element of L. }

procedure NEWQUE (): LIST; {New Queue. Returns a new empty queue. }

procedure GENPROCESS (P: PROC; VAR S: ADDRESS; n: BOOLEAN); {Generate a new process. The process working space is allocated unter control of the garbage collector if n is TRUE, else it is assumed that the last working space is reused. P is a parameter less procedure, S is the address of the generated process. If not enough space is available an error ocours. }

procedure INV (L: LIST): LIST; {Inverse. L is a list. The inverse of L is returned. The list L is modified. }

procedure LENGTH (L: LIST): GAMMAINT; {Length. L is a list. Returns length(L). }

procedure LIST1 (a: LIST): LIST; {List, 1 element. a is an object. L is the list (a). }

procedure LISTVAR (VAR L: LIST); {List variable. L is a list. The address of L is made accessible to the garbage collector. }

procedure RED (L: LIST): LIST; {Reductum. L is a non-null list. Returns the reductum of L. }

procedure SFIRST (L, a: LIST); {Set first. L is a non-null list. a is an object. The first element of L is changed to a. } procedure SRED (L, LP: LIST); {Set reductum. L is a non-null list. LP is a list. The reductum of L is changed to LP. }

procedure SAVEPROCESS ; {Save current process. Prepare transfer of two processes unter the control of the garbage collector. }

procedure TIME (): GAMMAINT; {Time. Returns the CLOCK minus the garbage collection time TAU. At ATARI ST the clock is in 2 seconds intervalls. }

3.7 SAC Basic I/O System

procedure CWRIT2 (C1,C2: GAMMAINT); {Character write, 2 characters. C1 and C2 are sequentially transmitted to the output stream using CWRITE. }

procedure CWRIT3 (C1,C2,C3: GAMMAINT); {Character write, 3 characters. C1, C2 and C3 are sequentially transmitted to the output stream using CWRITE. }

procedure CWRIT4 (C1,C2,C3,C4: GAMMAINT); {Character write, 4 characters. C1, C2, C3, and C4 are sequentially transmitted to the output stream using CWRITE. }

procedure CWRIT5 (C1,C2,C3,C4,C5: GAMMAINT); {Character write, 5 characters. C1, C2, C3, C4 and C5 are sequentially transmitted to the output stream using CWRITE. }

procedure CWRIT6 (C1,C2,C3,C4,C5,C6: GAMMAINT); {Character write, 6 characters. C1, C2, C3, C4, C5 and C6 are sequentially transmitted to the output stream using CWRITE. }

3.8 SAC List Processing

procedure ADV2 (L: LIST; VAR AL,BL,LP: LIST); {Advance 2. L is a list of length two or more. a=FIRST(L), b=SECOND(L) and LP=RED(RED(L)). }

procedure ADV3 (L: LIST; VAR AL1,AL2,AL3,LP: LIST); {Advance 3. L is a list of length 3 or more. a1, a2 and a3 are the first three elements of L. LP is the third reductum of L. }

procedure ADV4 (L: LIST; VAR AL1,AL2,AL3,AL4,LP: LIST); {Advance 4. L is a list of length 4 or more. a1, a2, a3, and a4 are the first 4 elements of L. LP is the fourth reductum of L. }

procedure AREAD (): LIST; {Atom read. An atom A is read from the input stream. Any preceding blanks are skipped. }

procedure AWRITE (A: LIST); {Atom write. The atom A is written in the output stream. }

3.8. SAC LIST PROCESSING 35

procedure CCONC (L1,L2: LIST): LIST; {Constructive concatenation. L1 and L2 are lists. L is the concatenation of L1 and L2. The list L is constructed. } procedure CINV (L: LIST): LIST; {Constructive inverse. L is a list. M=INV(L). M is constructed using comp. } procedure CLOUT (L: LIST); {Character list out. The input is a character list L=(C(1),C(2),..., C(n)). The C(i) are sequentially transmitted to the output stream using CWRITE. } procedure COMP2 (AL,BL,L: LIST): LIST; {Composition 2. a and b are objects. L is a list. M=COMP(a,COMP(b,L)). } procedure COMP3 (AL1,AL2,AL3,L: LIST): LIST; {Composition 3. a1, a2 and a3 are objects. L is a list. M=COMP(a1,COMP(a2,COMP(a3,L))). } procedure COMP4 (AL1,AL2,AL3,AL4,L: LIST): LIST; {Composition 4. a1, a2, a3 and a4 are objects. L is a list. M=COMP(a1,COMP(a2,COMP(a3,COMP(a4,l)))). } procedure CONC (L1,L2: LIST): LIST; {Concatenation. L1 and L2 are lists. L=CONC(L1,L2). The list L1 is modified. } procedure EQUAL (AL,BL: LIST): LIST; {Equal. a and b are objects. t=1 if a and b are equal and otherwise t=0. } procedure EXTENT (AL: LIST): LIST; {Extent. a is an object. n=EXTENT(a). } procedure FIRST2 (L: LIST; VAR AL,BL: LIST); {First 2. L is a list of length 2 or more. a=FIRST(L) and b=SECOND(L). } procedure FIRST3 (L: LIST; VAR AL1,AL2,AL3: LIST); {First 3. L is a list of length 3 or more. a1=FIRST(L), a2=SECOND(L) and a3=THIRD(L). } procedure FIRST4 (L: LIST; VAR AL1,AL2,AL3,AL4: LIST); {First 4. L is a list of length 4 or more. a1=FIRST(L), a2=SECOND(L), a3=THIRD(L) and a4=FOURTH(L). } procedure FOURTH (L: LIST): LIST; {Fourth. L is a list of length 4 or more. a is the fourth element of L. } procedure LAST (L: LIST): LIST; {Last. L is a non-null list. LP is the location of the last cell of L. } procedure LEINST (A,IL,AL: LIST): LIST; {List element insertion. A is the list (a(1), ...,a(n)) of objects. i is a beta-integer, 0 le i le n. a is an object. If i=0, then L=(a,a(1), ...,a(n)). If i=n, then L=(a(1), ...,a(n),a). otherwise, L=(a(1), ...,a(i),a,a(i+1), ...,a(n)). A is modified. } procedure LELT (A,IL: LIST): LIST; {List element. A is a list. 1 le i le LENGTH(A). a is the i-th element of A. } procedure LEROT (L,IL,JL: LIST): LIST; {List element rotation. L is a list (a(1), ...,a(n)) of objects, n gt 0. i and j, 1 le i le j le n, are beta-integers. If i=j then M=L. Otherwise M=(a(1), ...,a(i-1),a(j),a(i), ...,a(j-1), a(j+1), ...,a(n)). L is modified. } procedure LINS (AL,L: LIST); {List insertion. L is a non-null list (a(1), ...,a(n)). a is an object. a is inserted in L after a(1) (suffixed to L if n=1), producing a modified list L=(a(1),a,a(2), ...,a(n)). }

procedure LINSRT (AL,A: LIST): LIST; {List insertion. A is a list (a(1), ...,a(n)) of beta-integers, n ge 0, with a(1) lt a(2) lt ...lt a(n). If n=0 then B=(a). If a lt a(1) then B=(a,a(1), ...,a(n)). If a ge a(n) then B=(a(1), ...,a(n),a). Otherwise B=(a(1), ...,a(i),a,a(i+1), ...,a(n)) where a(i) le a lt a(i+1). The list A is modified to produce B. }

procedure LIST10 (AL1,AL2,AL3,AL4,AL5,AL6,AL7,AL8,AL9,AL10: LIST): LIST; {List, 10 elements. a1, a2, a3, a4, a5, a6, a7, a8, a9 and a10 are objects. L is the list (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10). }

procedure LIST2 (AL,BL: LIST): LIST; {List, 2 elements. a and b are objects. L is the list (a,b). }

procedure LIST3 (AL1,AL2,AL3: LIST): LIST; {List, 3 elements. a1, a2 and a3 are objects. L=(a1,a2,a3). }

procedure LIST4 (AL1,AL2,AL3,AL4: LIST): LIST; {List, 4 elements. a1, a2, a3 and a4 are objects. L is the list (a1,a2,a3,a4). }

procedure LIST5 (AL1,AL2,AL3,AL4,AL5: LIST): LIST; {List, 5 elements. a1,a2,a3,a4 and a5 are objects. L is the list (a1,a2,a3,a4,a5). }

procedure LREAD (): LIST; {List read. The list L is read from the input stream. Any preceding blanks are skipped. }

procedure LSRCH (AL,A: LIST): LIST; {List search. A is a list of beta-integers, (a(1), ...,a(n)), n ge 0. If there is a j such that a=a(j) then i is the least such j. Otherwise i=0. }

procedure LWRITE (L: LIST); {List write. The input list L is written in the output stream. }

procedure MEMBER (AL,L: LIST): LIST; {Membership test. a is an object, L a list. t=1 if a is a member of L and otherwise t=0. }

procedure ORDER (AL: LIST): LIST; {Order. a is an object. n=ORDER(a). }

procedure OREAD (): LIST; {Object read. The object B is read from the input stream. Any preceding blanks are skipped. }

procedure OWRITE (B: LIST); {Object write. The input object B is written in the output stream. }

procedure PAIR (A,B: LIST): LIST; {Pair. A=(a(1), ...,a(m)) and B=(b(1), ...,b(n)) are lists with m and n non-negative. C is the list (a(1),b(1), ...,a(r),b(r)) where r=MIN(m,n). }

procedure REDUCT (A,IL: LIST): LIST; {Reductum. A is a list. i is a non-negative beta-integer not less than LENGTH(A). B=A, if i=0. Otherwise, B is the i-th reductum of A. }

procedure RED2 (L: LIST): LIST; {Reductum 2. L is a list of length 2 or more. LP=RED(RED(L)). }

3.8. SAC LIST PROCESSING 37

procedure RED3 (L: LIST): LIST; {Reductum 3. L is a list of length 3 or more. M is the third reductum of L. } procedure RED4 (L: LIST): LIST; {Reductum 4. L is a list of length 4 or more. M is the fourth reductum of L. } procedure SECOND (L: LIST): LIST; {Second. L is a list of length 2 or more. a is the second element of L. } procedure SLELT (A,IL,AL: LIST); {Set list element. A is a list. 1 le i le LENGTH(A). The i-th element of A is changed to a. } procedure SUFFIX (L,BL: LIST): LIST; {Suffix. L is a list (a(1), ..., a(n)), n non-negative. b is an object. LP=(a(1), ..., a(n),b). L is modified. } procedure THIRD (L: LIST): LIST; {Third. L is a list of length 3 or more. a is the third element of L. }

LISP Algorithms

4.1 Aldes Parser

procedure Aparse (): LIST {Parse a set of ALDES-2 declarations and algorithms. }

4.2 MAS Lisp

procedure ECENV (ENV: LIST): LIST; {Encode environment. The encoded environment E is returned. } procedure DCENV (E: LIST): LIST; {Decode environment. The encoded environment E is decoded. } procedure SETV (V, A: LIST; VAR ENV: LIST); {Set variable. V is a symbol and A is an S-expression. A is associated to V in the environment ENV. } procedure EXTENDENV (A, X: LIST; VAR ENV: LIST): BOOLEAN; {Extend environement. A is a list of symbols. X is a list of values. The environment ENV is extented by the bindings of the symbols in A to the values in X. If the binding is possible, then TRUE is returned else FALSE. } procedure COPYTOENV (V, EP: LIST; VAR ENV: LIST); {Copy to environement. V is a list of symbols. EP is an environment. The environment ENV is extented by the bindings of the symbols in V to the values in EP. } procedure SPECIALFORM (S: LIST): BOOLEAN; {Test if expression S is a special form. } procedure LAMBDAP (S: LIST): BOOLEAN; {Test if expression S is a lambda form. } procedure SEXPRP (X: LIST): BOOLEAN; {Test if X is a S-expression function. } procedure DEFE (X: LIST; VAR ENV: LIST): LIST; {Define expr function. X is a DE expression. A LAMBDA expression generated from X is associated to name(X) in the environment ENV. }

4.2. MAS LISP 39

procedure DEFF (X: LIST; VAR ENV: LIST): LIST; {Define fexpr function. X is a DF expression. A FLAMBDA expression generated from X is associated to name(X) in the environment ENV. }

procedure DEFM (X: LIST; VAR ENV: LIST): LIST; {Define macro function. X is a DM expression. A MLAMBDA expression generated from X is associated to name(X) in the environment ENV. }

procedure DEFMAP (X: LIST; VAR ENV: LIST): LIST; {Define generic map function. X is a MAP expression. A GLAMBDA expression generated from X is associated to name(X) in the environment ENV. }

procedure DEFPROC (X: LIST; VAR ENV: LIST): LIST; {Define generic proc function. X is a DE expression. A GLAMBDA expression generated from X is associated to name(X) in the environment ENV. }

procedure DEFRULE (X: LIST; VAR ENV: LIST): LIST; {Define generic rule function. X is a RULE expression. A GLAMBDA expression generated from X is associated to name(X) in the environment ENV. }

procedure DSPEC (X: LIST; VAR ENV: LIST): LIST; {Define specification. X is a SPEC expression. An UNIT expression generated from X is associated to name(X) in the environment ENV. }

procedure DMIA (X: LIST; VAR ENV: LIST): LIST; {Define model, implementation or axioms. X is a MODEL, IMPLEMENTATION or AXIOMS expression. An UNIT expression associated to name(X) is modified by a generated expression of X. }

procedure TYPEOF (X: LIST): LIST; {Type of S-expression. X is an S-expression. A list of types, values and descriptors of X is returend. }

procedure TAG (V,T: LIST): LIST; {Tag object. V is an S-expression, T is a type expression. A tagged TYPEINFO S-expression is returned. }

procedure VALOFTAG (L: LIST): LIST; {Value of tagged object. L is a tagged S-expression. The value component of L is returned. }

procedure TYPOFTAG (L: LIST): LIST; {Type of tagged object. L is a tagged S-expression. The type component of L is returned. }

procedure DECOFTAG (L: LIST): LIST; {Descriptor of tagged object. L is a tagged S-expression. The descriptor component of L is returned. }

procedure GENPL (P,V,T,D: LIST): LIST; {Generate parameter list. P is a list of patterns. V is a list of values. T is a list of types and D is a list of descriptors. A parameter list is returned. }

procedure GENTE (Z,N,D: LIST): LIST; {Generate typed expression. Z is an S-expression, N is a function name, D is a descriptor. A typed S-expression for evaluation is returned. }

40 CHAPTER 4. LISP ALGORITHMS

4.3 MAS Lisp Utility

procedure CallCompiled (F, PI: LIST; VAR PO: LIST; VAR fu: BOOLEAN); {Call compiled function or procedure. F is a function or procedure symbol. PI is the list of input parameters. fu is TRUE if F is a function and FALSE if F is a procedure. PO is a list of output parameters if F is a procedure and PO is the output parameter if F is a function. } procedure Compiledp0 (F: PROCP0; VAR S: ARRAY OF CHAR); {Compiled function declaration p0. F is a Modula-2 procedure, S is the print name of F. } procedure Compiledp1 (F: PROCP1; VAR S: ARRAY OF CHAR); {Compiled function declaration p1. F is a Modula-2 procedure, S is the print name of F. } procedure Compiledp2 (F: PROCP2; VAR S: ARRAY OF CHAR); {Compiled function declaration p2. F is a Modula-2 procedure, S is the print name of F. } procedure Compiledp3 (F: PROCP3; VAR S: ARRAY OF CHAR); {Compiled function declaration p3. F is a Modula-2 procedure, S is the print name of F. } procedure Compiledf0 (F: PROCF0; VAR S: ARRAY OF CHAR); {Compiled function declaration f0. F is a Modula-2 procedure, S is the print name of F. } procedure Compiledf1 (F: PROCF1; VAR S: ARRAY OF CHAR); {Compiled function declaration f1. F is a Modula-2 procedure, S is the print name of F. } procedure Compiledf2 (F: PROCF2; VAR S: ARRAY OF CHAR); {Compiled function declaration f2. F is a Modula-2 procedure, S is the print name of F. } procedure Compiledf3 (F: PROCF3; VAR S: ARRAY OF CHAR); {Compiled function declaration f3. F is a Modula-2 procedure, S is the print name of F. } procedure Compiledf4 (F: PROCF4; VAR S: ARRAY OF CHAR); {Compiled function declaration f4. F is a Modula-2 procedure, S is the print name of F. } procedure Compiledp1v2 (F: PROCP1V2; VAR S: ARRAY OF CHAR); {Compiled function declaration p1v2. F is a Modula-2 procedure, S is the print name of F. } procedure Compiledp1v3 (F: PROCP1V3; VAR S: ARRAY OF CHAR); {Compiled function declaration p1v3. F is a Modula-2 procedure, S is the print name of F. } procedure Compiledp2v2 (F: PROCP2V2; VAR S: ARRAY OF CHAR); {Compiled function declaration p2v2. F is a Modula-2 procedure, S is the print name of F. } procedure Compiledp2v3 (F: PROCP2V3; VAR S: ARRAY OF CHAR); {Compiled function declaration p2v3. F is a Modula-2 procedure, S is the print name of F. } procedure Compiledp3v2 (F: PROCP3V2; VAR S: ARRAY OF CHAR); {Compiled function declaration p3v2. F is a Modula-2 procedure, S is the print name of F. } procedure Compiledp3v3 (F: PROCP3V3; VAR S: ARRAY OF CHAR); {Compiled function declaration p3v3. F is a Modula-2 procedure, S is the print name of F. } procedure CompSummary ; {Compiled function and procedure summary. Write out all compiled functions with their signature from symbol table SYMTB. } procedure Declare (VAR X: LIST; VAR S: ARRAY OF CHAR); {Declare. X is declared as symbol with print name S. } procedure PROCP (X: LIST): BOOLEAN; {Procedure Pointer. Test if the symbol X is a compiled function. }

4.4. MAS LOAD 41

procedure Signature (F: LIST; VAR PI, PO: LIST; VAR def: BOOLEAN); {Signature of a compiled function or procedure. F is a function or procedure symbol. PI is the number of input parameters. def is TRUE if F is defined as compiled function or procedure else def is FALSE. PO is the number of output parameters if F is a procedure, PO = -1 if F is a function. }

4.4 MAS Load

procedure InitExternals ; {Initialize external compiled procedures. }

4.5 MAS Load A.

procedure InitExternalsA ; {Initialize external compiled arithmetic procedures. }

4.6 MAS Load B.

procedure InitExternalsB ; {Initialize external compiled polynomial procedures. }

4.7 MAS Load C.

procedure InitExternalsC ; {Initialize external compiled non-commutative polynomial procedures. }

4.8 MAS Load D.

procedure InitExternalsD ; {Initialize external compiled ideal decomposition and root procedures. }

4.9 MAS Load L.

procedure InitExternalsL (); {Initialize external compiled linear algebra procedures. }

4.10 MAS Parser

procedure Parse (): LIST; {Parse program and generate code. } procedure SwitchParse (g: BOOLEAN); {Switch parsing between generic / non-generic parse. If g = TRUE then the parser generates code for generic names, if g = FALSE then the parser generates code for the builtin LISP arithmetic functions. }

4.11 MAS Representation

procedure NewRep (): LIST; {New representation. A new representation is returned. } procedure SetRep (n,e,r: LIST); {Set representation. r is a representation. n is a unique label, e is an expression. } procedure GetRep (n,r: LIST): LIST; {Get representation. r is a representation. n is a unique label, An expression e stored under n is returned. } procedure CopyRep (r: LIST): LIST; {Copy representation. r is a representation. A copy of r is returned. Step counters are reset. } procedure StepRep (r: LIST): LIST; {Step through representation. r is a representation. The next expression e and its label n are returned as pair (n,e). If all pairs (n,e) of representation r have been processed, then NIL is returned. } procedure ForEachinRep (r, f, E: LIST): LIST; {For each pair (n,e) in r apply function f. r is a representation. (n, e) is a pair in r, where e is an expression and n is its label. f is applied to (n, e) such that p = f(n,e) with p = (n’, e’) or p = NIL. If p ¡¿ NIL, then the pair (n’, e’) is added to the returned representation r’ = n’ e’ : f(n,e) ¡¿ NIL, n e in r . E is a LISP environment, if E = NIL, then the top level environment is used. } procedure FullRep (r: LIST): LIST; {Full representation. Test for non-empty representation. r is a representation. } procedure ForEachinList (r, f, E: LIST): LIST; {For each element e in r apply function f. r is a list. e is an element in r. f is applied to e such that e’ = f(e). E is a LISP environment, if E = NIL, then the top level environment is used. }

4.12 MAS Sepcification

procedure EVALUATE (X: LIST; VAR ENV: LIST): LIST; {Lisp evaluator. X is an S-expression, ENV is an environment. }

4.13 MAS Symbol

procedure ATOM (X: LIST): BOOLEAN; {Atom. Test if X is an atom. } procedure ELEMP (X: LIST): BOOLEAN; {Elementary Pointer. Test if X is an elementary SAC-2 structure. }

4.14. MAS/SAC SYMBOL SYSTEM 2. 43

procedure MEMQ (AL,L: LIST): BOOLEAN; {Membership test equal pointers. a is an object, L a list. t=1 if the pointer or atom a occurs in L and otherwise t=0. }

procedure OCCURQ (AL,L: LIST): BOOLEAN; {Occurs test equal pointers. a and L are objects. t=TRUE if the pointer or atom a occurs in L and otherwise t=FALSE. }

procedure UREAD (): LIST; {Universal read. The next atom, symbol, string or list over atoms, strings and symbols is read and stored under L. Blanks may occur anywhere. Elements of a list may or may not be separated by a comma. }

procedure UWRITE (L: LIST); {Universal write. L is an atom, symbol or a list over atoms and symbols. L is written in the output stream, followed by blines. }

procedure UWRIT1 (L: LIST); {Universal write, 1. subalgorithm. L is an atom, a symbol or a list over atoms or symbols. L is written in the output stream. }

procedure UNIFY (A,B: LIST; VAR S: LIST): BOOLEAN; {Unification. A and B are objects. If there exists a most general unificator of A and B, then S is the list of substitutions. In this case TRUE is returned. If no unificator exists, then FALSE is returned and S is undefined. }

procedure GENARRAY (A: LIST): LIST; {Generate array reference symbol. S is a generated symbol. }

procedure GENINDEX (A: LIST): LIST; {Generate index set. I is an index set. }

procedure ARRAYDEC (A: LIST): LIST; {Generate array name declarations. A is an array reference. }

4.14 MAS/SAC Symbol System 2.

procedure ACOMP (A,B: LIST): LIST; {Alphabetic comparison. A and B are symbols. t=+1,0,-1 according to whether A preceds, is equal, or follows B alphabetically. }

procedure ACOMP1 (A,B: LIST): LIST; {Alphabetic comparison, 1. subalgorithm. A and B are packed strings. s=-1,0,1 according to whether a preceds, is equal, or succeeds B alphabetically. }

procedure ASSOC (AL,L: LIST): LIST; {Associate. L=(a1 b1, a2 b2, ...,a sub n b sub n), n ge 0, a is an object. If there is an i such that a=a sub i then P=(b sub i, ...,a sub n b sub n), otherwise P=(). }

procedure ASSOCQ (AL,L: LIST): LIST; {Associate equal. L=(a1 b1, a2 b2, ...,a sub n b sub n), n ge 0, a is an object. If there is an i such that a is equal to a sub i then P=(b sub i, ...,a sub n b sub n), otherwise P=(). }

procedure ATTRIB (L: LIST): LIST; {Attribute. L is a symbol. Returns the attributes of L. } procedure EXPLOD (S: LIST): LIST; {Explode symbol. S is a symbol, L its character list. }

procedure ENTER (L: LIST): LIST; {Enter into symbol table. L is a character list, S the pointer to the corresponding symbol. If the symbol is not yet in the symbol table SYMTB, then a new node is created. }

procedure GENSYM (): LIST; {Generate symbol. S is a newly generated symbol. NAM is advanced. }

procedure GET (S,AL: LIST): LIST; {Get property. The property list of the symbol S is searched under indicator a. A is the property under a, if any, otherwise A is set to beta. }

procedure NAME (L: LIST): LIST; {Name. L is a symbol. Returns the name of L. }

procedure PACK (L: LIST): LIST; {Pack character list. L is a non-empty character list. B is the packed list. }

procedure PUT (S,AL,A: LIST); {Put. The property A is stored on the property list of the symbol S under the indicator a. }

procedure REMPRP (S,AL: LIST); {Remove property. Under indicator a on the property list of symbol S the property is removed. }

procedure SMEMB (S,L: LIST): LIST; {Symbol membership. S is a symbol, L a list containing possibly also symbols. b=1 if S or a copy of S occurs in L, b=0 otherwise. }

procedure SREAD (): LIST; {Symbol read. The next symbol is read from input. S is the symbol in the symbol table SYMTB. }

procedure SREAD1 (): LIST; {Symbol read, 1. The first non-alphanumeric character of the input stream terminates the symbol. L is the character list of the symbol, which is not entered in the symbol table. }

procedure STCNT (T: LIST; VAR S,P: LIST); {Symbol table tree count. T is a symbol tree, S is the number of symbols in T, P the number of properties of all symbols of the tree. Since every symbol has a name property, P ge S. }

procedure STINS (B: LIST): LIST; {Symbol tree insertion. B is a packed list of characters. S is a pointer to the corresponding symbol in the symbol table. If it is not yet in, a new node is created. }

procedure STLST (T: LIST): LIST; {Symbol tree list. T is a symbol tree, L is the list of its symbols in alphabetic order. }

procedure STLSTI (T: LIST): LIST; {Symbol tree list, in-order. T is a binary tree of symbols, L is a list of its symbols, with the root symbol appearing first. }

procedure STSRCH (T,AP: LIST): LIST; {Symbol tree search. T is a binary tree of symbols, AP is a packed list of characters. If the symbol with the name AP occurs already in the symbol table T then S=() and otherwise S points to the entry. }

4.15. MAS UTILITY 45

procedure STWRT (T: LIST); {Symbol tree write. T is a binary tree of symbols. The symbols followed by their properties are printed in alphabetic order. } procedure SYMBOL (AP: LIST): BOOLEAN; {Symbol. AP is an object. Returns true if it is a symbol and false else. } procedure SymSummary (); {Summary of symbol system. The number of symbols in SYMTB and the number of their properties is written. } procedure SYWRIT (S: LIST); {Symbol write. The symbol S is written in the output stream. } procedure SUBLIS (L,A: LIST): LIST; {Substitution with list. L=(x1 e1, ...,x sub n e sub n), a and e sub i are objects. The x sub i are beta-digits or pointers to uniquely stored lists like symbols. B is A with the x sub i substituted by the e sub i. } procedure UREAD (): LIST; {Universal read. The next atom, symbol or list over atoms and symbols is read and stored under L. Blanks may occur anywhere, elements of a list may or may not be separated by a comma. } procedure UWRITE (L: LIST); {Universal write. L is an atom, symbol or a list over atoms and symbols. L is written in the output stream, followed by BLINES(0). } procedure UWRIT1 (L: LIST); {Universal write, 1. subalgorithm. L is an atom, a symbol or a list over atoms or symbols. L is written in the output stream followed by a blank character, but not by BLINES. }

4.15 MAS Utility

procedure InitExternalsU (); {Initialize external compiled utility procedures. } procedure DoParse (): LIST; {Do parse. Call specific Parser. } procedure DoWrite (Y: LIST); {Do Write. Write according to Parser. } procedure MWRITE (Y: LIST); {Output in modula like syntax. } procedure MWRIT1 (Y: LIST; top: BOOLEAN); {Output in modula like syntax. }

4.16 MAS Symbol to DIP

procedure DIPVDEF (V: LIST): LIST; {DIP define distributive polynomial variable list. V is a variable list. The old variable list is returned. } procedure DIPTODEF (T: LIST): LIST; {DIP define distributive polynomial term order. V is a term order indicator. The old term order indicator is returned. } procedure SYM2DIP (T: LIST): LIST; {Symbol term to distributive polynomial. } procedure DIP2SYM (D: LIST): LIST; {Distributive polynomial to symbol term. } procedure TVARS (T: LIST): LIST; {Term variables. T is a term. The list of variables occuring in T is returned. } procedure DIRPFT (T, V: LIST): LIST; {Distributive rational polynomial from term. T is a term, V is a variable list. A distributive rational polynomial A in r variables, where r=length(V), r ge 0, is formed from term T. } procedure TFDIRP (A, V: LIST): LIST; {Term from distributive rational polynomial. A is a distributive rational polynomial in r variables, where r=length(V), r ge 0, V is a symbol list. A term T is formed from A. } procedure InitExternalsI ; {Initialize external compiled interface procedures. }

4.17 SAC Symbol System

procedure ACOMP (A,B: LIST): LIST; {Alphabetic comparison. A and B are symbols. t=+1,0,-1 according to whether A preceds, is equal, or follows B alphabetically. } procedure ACOMP1 (A,B: LIST): LIST; {Alphabetic comparison, 1. subalgorithm. A and B are packed strings. s=-1,0,1 according to whether a preceds, is equal, or succeeds B alphabetically. } procedure ASSOC (AL,L: LIST): LIST; {Associate. L=(a1 b1, a2 b2, ...,a sub n b sub n), n ge 0, a is an object. If there is an i such that a=a sub i then P=(b sub i, ...,a sub n b sub n), otherwise P=(). } procedure ASSOCQ (AL,L: LIST): LIST; {Associate equal. L=(a1 b1, a2 b2, ...,a sub n b sub n), n ge 0, a is an object. If there is an i such that a is equal to a sub i then P=(b sub i, ...,a sub n b sub n), otherwise P=(). } procedure ATTRIB (L: LIST): LIST; {Attribute. L is a symbol. Returns the attributes of L. } procedure EXPLOD (S: LIST): LIST; {Explode symbol. S is a symbol, L its character list. } procedure ENTER (L: LIST): LIST; {Enter into symbol table. L is a character list, S the pointer to the corresponding symbol. If the symbol is not yet in the symbol table SYMTB, then a new node is created. } procedure GENSYM (): LIST; {Generate symbol. S is a newly generated symbol. NAM is advanced. } procedure GET (S,AL: LIST): LIST; {Get property. The property list of the symbol S is searched under indicator a. A is the property under a, if any, otherwise A is set to beta. }

4.17. SAC SYMBOL SYSTEM 47

procedure NAME (L: LIST): LIST; {Name. L is a symbol. Returns the name of L. }

procedure PACK (L: LIST): LIST; {Pack character list. L is a non-empty character list. B is the packed list. }

procedure PUT (S,AL,A: LIST); {Put. The property A is stored on the property list of the symbol S under the indicator a. }

procedure REMPRP (S,AL: LIST); {Remove property. Under indicator a on the property list of symbol S the property is removed. }

procedure SMEMB (S,L: LIST): LIST; {Symbol membership. S is a symbol, L a list containing possibly also symbols. b=1 if S or a copy of S occurs in L, b=0 otherwise. }

procedure SREAD (): LIST; {Symbol read. The next symbol is read from input. S is the symbol in the symbol table SYMTB. }

procedure SREAD1 (): LIST; {Symbol read, 1. The first non-alphanumeric character of the input stream terminates the symbol. L is the character list of the symbol, which is not entered in the symbol table. }

procedure STCNT (T: LIST; VAR S,P: LIST); {Symbol table tree count. T is a symbol tree, S is the number of symbols in T, P the number of properties of all symbols of the tree. Since every symbol has a name property, P ge S. }

procedure STINS (B: LIST): LIST; {Symbol tree insertion. B is a packed list of characters. S is a pointer to the corresponding symbol in the symbol table. If it is not yet in, a new node is created. }

procedure STLST (T: LIST): LIST; {Symbol tree list. T is a symbol tree, L is the list of its symbols in alphabetic order. }

procedure STLSTI (T: LIST): LIST; {Symbol tree list, in-order. T is a binary tree of symbols, L is a list of its symbols, with the root symbol appearing first. }

procedure STSRCH (T,AP: LIST): LIST; {Symbol tree search. T is a binary tree of symbols, AP is a packed list of characters. If the symbol with the name AP occurs already in the symbol table T then S=() and otherwise S points to the entry. }

procedure STWRT (T: LIST); {Symbol tree write. T is a binary tree of symbols. The symbols followed by their properties are printed in alphabetic order. }

procedure SYMBOL (AP: LIST): BOOLEAN; {Symbol. AP is an object. Returns true if it is a symbol and false else. }

procedure SymSummary (); {Summary of symbol system. The number of symbols in SYMTB and the number of their properties is written. }

procedure SYWRIT (S: LIST); {Symbol write. The symbol S is written in the output stream. } procedure SUBLIS (L,A: LIST): LIST; {Substitution with list. L=(x1 e1, ...,x sub n e sub n), a and e sub i are objects. The x sub i are beta-digits or pointers to uniquely stored lists like symbols. B is A with the x sub i substituted by the e sub i. } procedure UREAD (): LIST; {Universal read. The next atom, symbol or list over atoms and symbols is read and stored under L. Blanks may occur anywhere, elements of a list may or may not be separated by a comma. } procedure UWRITE (L: LIST); {Universal write. L is an atom, symbol or a list over atoms and symbols. L is written in the output stream, followed by BLINES(0). } procedure UWRIT1 (L: LIST); {Universal write, 1. subalgorithm. L is an atom, a symbol or a list over atoms or symbols. L is written in the output stream followed by a blank character, but not by BLINES. }

4.18 SAC Symbol 2

procedure STBAL (L,n: LIST): LIST; {Symbol tree balance. L is an alphabetical list of n symbol-tree nodes (n gt 0), out of which a balanced binary tree S is constructed. } procedure STBALS (VAR A: ARRAY OF LIST; l, r: INTEGER): INTEGER; {Symbol tree balance subroutine. The array A contains symbol-tree nodes in alphabetical order. The binary tree of the symbols in A[l..r] is constructed and A[m] is its root. } procedure STNLST (T: LIST; VAR L,n: LIST); {Symbol tree nodes list. T is a non-empty symbol tree. L is the list of its nodes in alphabetical order of the corresponding symbols and n the number of nodes. This algorithm is normally used for creating the data as required for STBAL. } procedure SSYTBAL ; {System symbol tree balance. SYMTB is balanced. }

Arithmetic Algorithms

5.1 MAS Arbitrary Precision Floating Point

50 CHAPTER 5. ARITHMETIC ALGORITHMS

procedure APCOMP (ML,EL: LIST): LIST; {Arbitrary precision floating point composition. e is the exponent, m is the mantissa of the arbitrary precision floating point number A. } procedure APMANT (A: LIST): LIST; {Arbitrary precision floating point mantissa. m is the mantissa of the arbitrary precision floating point number A. } procedure APEXPT (A: LIST): LIST; {Arbitrary precision floating point exponent. e is the exponent of the arbitrary precision floating point number A. } procedure ILOG10 (N: LIST): LIST; {Integer logarithm base 10. N is an integer, l is a beta integer. l=LOG10(ABS(N)). } procedure APSPRE (N: LIST); {Arbitrary precision floating point set precision. N is the desired precision of the floating point numbers. } procedure APFINT (N: LIST): LIST; {Arbitrary precision floating point from integer. The integer N is converted to the arbitrary precision floating point number A. } procedure APSHFT (B,EL: LIST): LIST; {Arbitrary precision floating point shift. The arbitrary precision floating point number B is multiplied by 2**e. A is an arbitrary precision floating point number. } procedure APSIGN (A: LIST): LIST; {Arbitrary precision floating point sign. A is an arbitrary precision floating point number, s is the sign of A. } procedure APWRIT (A: LIST); {Arbitrary precision floating point write. The arbitrary precision floating point number A is written to the output stream. } procedure APNEG (A: LIST): LIST; {Arbitrary precision floating point negative. The arbitrary precision floating point number A is negated. B= -A. } procedure APABS (A: LIST): LIST; {Arbitrary precision floating point absolute value. A is a arbitrary precision floating point number. B is the absolute value of A. }

procedure APCMPR (A,B: LIST): LIST; {Arbitrary precision floating point compare. A and B are arbitrary precision floating point numbers. s is the sign of the difference of A and B. s=SIGN(A-B). }

procedure APNELD (A,B: LIST): LIST; {Arbitrary precision floating point number of equal leading digits. A and B are arbitrary precision floating point numbers. l is the number of equal leading digits of A and B. }

procedure APPROD (A,B: LIST): LIST; {Arbitrary precision floating point product. A, B and C are arbitrary precision floating point numbers. C is the product of A and B. C=A*B. }

procedure APQ (A,B: LIST): LIST; {Arbitrary precision floating point quotient. A, B and C are arbitrary precision floating point numbers. C is the quotient of A and B. C=A/B. }

procedure APSUM (A,B: LIST): LIST; {Arbitrary precision floating point sum. A, B and C are arbitrary precision floating point numbers. C is the sum of A and B. C=A+B. }

procedure APDIFF (A,B: LIST): LIST; {Arbitrary precision floating point difference. A, B and C are arbitrary precision floating point numbers. C is the difference of A and B. C=A-B. }

procedure APLG10 (A: LIST): LIST; {Arbitrary precision floating point logarithm base 10. A is an arbitrary precision floating point number, l is a beta integer, l=LOG10(ABS(A)). }

procedure APEXP (A,NL: LIST): LIST; {Arbitrary precision floating point exponentiation. A and B are arbitrary precision floating point numbers. n is a beta-integer. B=A**n. }

procedure APFRN (A: LIST): LIST; {Arbitrary precision floating point from rational number. B is an arbitrary precision floating point number. A is a rational number. }

procedure RNFAP (A: LIST): LIST; {Rational number from arbitrary precision floating point. A is an arbitrary precision floating point number. B is a rational number. }

procedure RNDRD (): LIST; {Rational number decimal read. The rational number R is read from the input stream. Any preceding blanks are skipped. }

procedure APROOT (A,NL: LIST): LIST; {Arbitrary precision floating point n-th root. A and B are arbitrary precision floating point numbers. B is the n-th root of A. }

procedure APPI (): LIST; {Arbitrary precision floating point pi. pi is an arbitrary precision floating point number. }

5.2. MAS FLOATING POINT 51

5.2 MAS Floating Point

procedure FFGI (N: GAMMAINT): MFLOAT; {Floating point from gamma integer. The gamma integer N is converted to the floating point number A. }

procedure IFF (F: MFLOAT): LIST; {Integer from floating point. The floating point number F is converted to the integer A. }

procedure FEXP (F, N: MFLOAT): MFLOAT; {Floating point exponentiation. The floating point number F raised to the n-th power. }

procedure FLOG10 (F: MFLOAT): MFLOAT; {Floating point logarithm base 10. The logarithm of the floating point number F with base 10 is returned. }

procedure FFINT (N: LIST): MFLOAT; {Floating point from integer. The integer N is converted to the floating point number f. }

procedure FFRN (A: LIST): MFLOAT; {Floating point from rational number. The rational number A is converted to the floating point number f. }

procedure RNFF (F: MFLOAT): LIST; {Rational number from floating point. The floating point number F is converted to the rational number R. }

procedure SIN (A: LIST): LIST; {Sinus. A is a rational number, the sinus of A is returned. }

procedure COS (A: LIST): LIST; {Cosinus. A is a rational number, the cosinus of A is returned. }

procedure TAN (A: LIST): LIST; {Tangens. A is a rational number, the tangens of A is returned. }

procedure ARCTAN (A: LIST): LIST; {Arcus tangens. A is a rational number, the arctangens of A is returned. }

procedure EXPF (A: LIST): LIST; {Exponential. A is a rational number, the exponential of A is returned. }

procedure LN (A: LIST): LIST; {Ln. A is a rational number, the natural logarithm of A is returned. }

procedure LOG (A: LIST): LIST; {Log. A is a rational number, the logarithm base 10 of A is returned. }

procedure SQRT (A: LIST): LIST; {Sqrt. A is a rational number, the square root of A is returned. }

5.3 MAS Integer

procedure IPROD (A,B: LIST): LIST; {Integer product. A and B are integers. C=A*B. For long integers Karatsubas method is used. }

5.4 MAS Rational Number

procedure RNDRD (): LIST; {Rational number decimal read. The rational number R is read from the input stream. Any preceding blanks are skipped. }

procedure RNDWR (R,NL: LIST); {Rational number decimal write. R is a rational number. n is a non-negative integer. R is approximated by a decimal fraction D with n decimal digits following the decimal point and D is written in the output stream. The inaccuracy of the approximation is at most (1/2)*10**-n. }

procedure RNDWRS (A,S: LIST); {Rational number decimal write special. Call RNDWR. }

procedure RNEXP (A,NL: LIST): LIST; {Rational number exponentiation. A is a rational number, n is a non-negative beta-integer. B=A**n. }

procedure RNMAX (AL,BL: LIST): LIST; {Rational number maximum. a and b are rational numbers. c is the maximum of a and b. }

procedure RNONE (R: LIST): LIST; {Rational number one. R is a rational number. s=1 if R=1, s=0 else. }

5.5 SAC Combinatorical System

procedure ASSPR (A: LIST; VAR PL,ML: LIST); {Assignment problem. A is a square matrix of beta-integers, say n by n. p is an n-permutation for which the sum on i of A(i,p(i)) is maximal, and m is this maximal sum. All matrix elements A(i,j) must be less than beta in absolute value. }

procedure CSFPAR (L: LIST): LIST; {Characteristic set from partition. L is a list of non-negative beta- integers (l sub 1, ...,l sub n). C is a characteristic set, with j belonging to C if and only if there is a subset I of the integers from 1 to n such that the sum of the l sub i with i in I=j. }

procedure CSINT (A,B: LIST): LIST; {Characteristic set intersection. A and B are characteristic sets. C is the intersection of A and B. }

procedure CSSUB (A,B: LIST): LIST; {Characteristic set subset. A and B are characteristic sets. t=1 if A is a subset of B and otherwise t=0. }

procedure CSUN (A,B: LIST): LIST; {Characteristic set union. A and B are characteristic sets. C is the union of A and B. }

procedure DAND (AL,BL: LIST): LIST; {Digit and. a and b are non-negative beta-digits. c is the bit-wise and of a and b. }

procedure DNIMP (AL,BL: LIST): LIST; {Digit non-implication. a and b are non-negative beta-digits. c is the bit-wise non-implication of a and b. }

5.5. SAC COMBINATORICAL SYSTEM 53

procedure DNOT (AL: LIST): LIST; {Digit not. a is a non-negative beta-digit. b is the bit-wise not of a. }

procedure DOR (AL,BL: LIST): LIST; {Digit or. a and b are non-negative beta-digits. c is the bit-wise or of a and b. }

procedure IBCIND (A,NL,KL: LIST): LIST; {Integer binomial coefficient induction. n and k are beta-integers with 0 less than or equal to k less than or equal to n. A is the binomial coefficient n over k. B is the binomial coefficient n over k+1. }

procedure IBCOEF (NL,KL: LIST): LIST; {Integer binomial coefficient. n and k are beta-integers with 0 less than or equal to k less than or equal to n. A is the binomial coefficient n over k. }

procedure IBCPS (NL,KL: LIST): LIST; {Integer binomial coefficient partial sum. n and k are beta integers, 0 le k le n. A is the sum on i, from 0 to k, of the binomial coefficient n over i. }

procedure IFACTL (NL: LIST): LIST; {Integer factorial. n is a non-negative beta-integer. A is n factorial. }

procedure LEXNEX (A: LIST): LIST; {Lexicographically next. A is a non-null list (a sub 1, ...,a sub m) such that a sub i is a non-null reductant of a sub i+1 for each 1 le i lt m. B is the lexicographically next such list of the same length, if one exists, and is () otherwise. }

procedure LPERM (L,P: LIST): LIST; {List permute. L is a list (a sub 1, ...,a sub n). P is a list (p sub 1, ...,p sub n) of integers in the range 1, ...,n. LP is the list (a sub p sub 1, ...,a sub p sub n). }

procedure PARTN (NL,P: LIST): LIST; {Partition, next. n is a positive beta-integer. P is a partition of n. Q is the next partition of n after P in lexicographical order, if any. Otherwise Q=(). }

procedure PARTR (NL: LIST): LIST; {Partition, random. n is a positive beta-integer, n less than or equal to 100. P is a partition of n whose elements are the cycle lengths of a random n-permutation. }

procedure PARTSS (PL: LIST): LIST; {Partition sumset. p is a partition. A is the sum set of p, a characteristic set. }

procedure PERMR (NL: LIST): LIST; {Permutation, random. n is a positive integer, n le 100. L is a list of the first n positive integers in random order. }

procedure SDR (S: LIST; VAR A,I: LIST); {System of distinct representatives. S is a list (s(1), ...,s(n)), n ge 1, where each s(i) is a set of beta-integers represented as a list. Either A is a list (a(1), ...,a(n)) of distinct representatives for (s(1), ...,s(n)) and I=(), or else A=() and I=(i(1), ...,i(k)) is a subsequence of (1, ...,n) such that (s(i(1)), ...,s(i(k))) has no system of distinct representatives. }

procedure SFCS (A: LIST): LIST; {Set from characteristic set. A is a characteristic set. B is the same set represented as an increasing list of beta-integers. }

5.6 SAC Digit

procedure BITRAN (): LIST; {Bit, random. b is a random bit, 0 or 1. } procedure DEGCD (AL,BL: LIST; VAR CL,UL,VL: LIST); {Digit extended greatest common divisor. a and b are beta-integers, a ge b ge 0. c=GCD(a,b), a beta-integer. a*u+b*v=c, with ABS(u) le b/2c, ABS(v) le a/2c. } procedure DGCD (AL,BL: LIST): LIST; {Digit greatest common divisor. a and b are beta-integers, a ge b ge 0. c=GCD(a,b). } procedure DLOG2 (AL: LIST): LIST; {Digit logarithm, base 2. a is a beta-digit. If a=0 then n=0. otherwise n=FLOOR(LOG2(ABS(a)))+1. } procedure DPCC (AL1,AL2: LIST; VAR UL,ULP,VL,VLP: LIST); {Digit partial cosequence calculation. a1 and a2 are beta-integers, a1 ge a2 gt 0. u, up, v and vp are the last cosequence elements of a1 and a2 which can be guaranteed to correspond to correct quotient digits. } procedure DPR (AL,BL: LIST; VAR CL,DL: LIST); {Digit product. a and b are beta-digits. c and d are the unique beta-digits such that a*b=c*beta+d and c*d ge 0. } procedure DQR (AL1,AL0,BL: LIST; VAR QL,RL: LIST); {Digit quotient and remainder. a1, a0 and b are beta-integers with a1*a0 ge 0 and ABS(b) gt ABS(a1). q is the integral part of (a1*beta+a0)/b and r is (a1*beta+a0)-b*q. q and r are beta-integers. } procedure DRAN (): LIST; {Digit, random. a is a random beta-digit. } procedure DRANN (): LIST; {Digit, random non-negative. a is a random non-negative beta-digit. Caution, the low-order bits of a are not very random. } procedure DSQRTF (AL: LIST; VAR BL,TL: LIST); {Digit square root function. a is a non-negative beta-integer. b is the floor function of the square root of a and t is the sign of a-b*b. }

5.7 SAC Integer

procedure AADV (L: LIST; VAR AL,LP: LIST); {Arithmetic advance. L is a list. If L ne () then a=FIRST(L) and LP=RED(L). Otherwise a=0 and LP=(). } procedure IABSF (A: LIST): LIST; {Integer absolute value function. A is an integer. B=ABS(A). } procedure ICOMP (A,B: LIST): LIST; {Integer comparison. A and B are integers. s=SIGN(A-B). } procedure IDEGCD (AL,BL: LIST; VAR CL,UL1,VL1,UL2,VL2: LIST); {Integer doubly extended greatest common divisor algorithm. a and b are integers. c=GCD(a,b). a*u1+b*v1=c and a*u2+b*v2=0. If a ne 0 and b ne 0 then ABS(u1) le ABS(b)/(2*c), ABS(v1)

5.7. SAC INTEGER 55

le ABS(a)/(2*c), u2=-b/c and v2=a/c. Otherwise u1=v2=SIGN(a), v1=SIGN(b) and u2=- SIGN(b). } procedure IDIF (A,B: LIST): LIST; {Integer difference. A and B are integers. C=A-B. } procedure IDIPR2 (A,B,AL,BL: LIST): LIST; {Integer digit inner product, length 2. A and B are integers. a and b are beta-integers. C=A*a+B*b. } procedure IDPR (A,BL: LIST): LIST; {Integer-digit product. A is an integer. b is a beta-digit. C=A*b. } procedure IDP2 (A,KL: LIST): LIST; {Integer division by power of 2. A is an integer. k is a non-negative beta-digit. B is the integral part of A/2**k. } procedure IDQ (A,BL: LIST): LIST; {Integer-digit quotient. A is an integer. b is a non-zero beta-digit. C=INTEGER(A/b). } procedure IDQR (A,BL: LIST; VAR Q,RL: LIST); {Integer-digit quotient and remainder. A is an integer. b is a non-zero beta-digit. Q is the integral part of A/b and r=A-b*Q. } procedure IDREM (A,BL: LIST): LIST; {Integer-digit remainder. A is an integer. b is a non-zero beta-digit. r=A-b*INTEGER(A/b). } procedure IEGCD (AL,BL: LIST; VAR CL,UL1,VL1: LIST); {Integer extended greatest common divisor algorithm. a and b are integers. c=GCD(a,b). a*u1+b*v1=c. If a ne 0 and b ne 0 then ABS(u1) le ABS(b)/(2*c) and ABS(v1) le ABS(a)/(2*c). Otherwise u1=SIGN(a) and v1=SIGN(b). } procedure IEVEN (A: LIST): BOOLEAN; {Integer even. A is an integer. If A is even then true is returned and otherwise false. } procedure IEXP (A,NL: LIST): LIST; {Integer exponentiation. A is an integer. n is a non-negative beta-integer. B=A**n. } procedure IFCL2 (AL: LIST; VAR ML,NL: LIST); {Integer, floor and ceiling, logarithm, base 2. a is a non-zero integer. m and n, gamma-integers, are the floor and ceiling of LOG2(ABS(a)) respectively. } procedure IGCD (A,B: LIST): LIST; {Integer greatest common divisor. A and B are integers. C=GCD(A,B). } procedure IGCDCF (A,B: LIST; VAR C,AB,BB: LIST); {Integer greatest common divisor and cofactors. A and B are integers. C eq GCD(A,B). If C eq 0 then AB eq BB eq 0 and otherwise AB eq A/C,BB eq B/C. } procedure IHEGCD (A,B: LIST; VAR C,V: LIST); {Integer half-extended greatest common divisor. A and B are integers. C=GCD(A,B). If A ne 0, B*V=C(mod A), with ABS(V) le ABS(A)/2C. If A=0,V=SIGN(B). } procedure ILCM (A,B: LIST): LIST; {Integer least common multiple. A and B are integers. C=LCM(A,B), a nonnegative integer. } procedure ILCOMB (A,B,UL,VL: LIST): LIST; {Integer linear combination. A and B are non-negative integers. u and v are beta-integers such that A*u+B*v ge 0. C=A*u+B*v. } procedure ILOG2 (A: LIST): LIST; {Integer logarithm, base 2. A is an integer. If A=0 then n=0. Otherwise n=FLOOR(LOG2(ABS(A)))+1, a beta-integer. }

procedure ILWRIT (L: LIST); {Integer list write. L is a list of integers. The list L is written in the output stream. }

procedure IMAX (AL,BL: LIST): LIST; {Integer maximum. a and b are integers. c is the maximum of a and b. }

procedure IMIN (AL,BL: LIST): LIST; {Integer minimum. a and b are integers. c is the minimum of a and b. }

procedure IMP2 (A,HL: LIST): LIST; {Integer multiplication by power of 2. A is an integer. h is a non-negative beta-integer. B=A*(2**h). }

procedure INEG (A: LIST): LIST; {Integer negation. A is an integer. B=-A. }

procedure IODD (A: LIST): BOOLEAN; {Integer odd. A is an integer. If a is odd then true is returned and otherwise false. }

procedure IORD2 (AL: LIST): LIST; {Integer, order of 2. a is a non-zero integer. n is the largest integer such that 2**n divides a. }

procedure IPOWER (A,L: LIST; VAR B,NL: LIST); {Integer power. A, greater than or equal to 3, is an odd positive integer. L is a list (p(1),p(2), ...,p(k)) of the first k prime numbers, with p(k) greater than or equal to the base 3 logarithm of A. If A=B**m for some m greater than or equal to 2 then n is the least such m and B=A**(1/n). Otherwise B=0 and n=0. }

procedure IPROD (A,B: LIST): LIST; {Integer product. A and B are integers. C=A*B. }

procedure IPRODK (A,B: LIST): LIST; {Integer product, Karatsuba algorithm. A and B are integers. C=A*B. }

procedure IQ (A,B: LIST): LIST; {Integer quotient. A and B are integers, B ne 0. C is the integral part of A/B. }

procedure IQR (A,B: LIST; VAR Q,R: LIST); {Integer quotient and remainder. A and B are integers, B ne 0. Q is the quotient, integral part of A/B, and R is the remainder A-B*Q. }

procedure IRAND (NL: LIST): LIST; {Integer, random. n is a positive beta-integer. A is an integer with random sign and random absolute value less than 2**n. }

procedure IREAD (): LIST; {Integer read. The integer A is read from the input stream. Any preceding blanks are skipped. }

procedure IREM (A,B: LIST): LIST; {Integer remainder. A and B are integers, B non-zero. C is the remainder of A and B. }

procedure IROOT (A,NL: LIST; VAR B,TL: LIST); {Integer root. A is a positive integer. n, greater than or equal to 2, is a beta-integer. B=FLOOR(A**(1/n)) and t=SIGN(A-B**n). }

5.8. SAC MODULAR DIGIT AND INTEGER 57

procedure ISEG (A,NL: LIST; VAR A1,A0: LIST); {Integer segmentation. A is an integer. n is a positive beta- integer. A1 is the integral part of A/beta**n. A0=A-A1*beta**n. } procedure ISIGNF (A: LIST): LIST; {Integer sign function. A is an integer. s=SIGN(A). } procedure ISQRT (A: LIST; VAR B,TL: LIST); {Integer square root. A is a non-negative integer. B is the floor function of the square root of A and t is the sign of A-B*B. } procedure ISSUM (NL,L: LIST): LIST; {Integer shifted sum. n is a positive integer. L is a list (c(0),c(1), ...,c(k)), k non-negative, of integers c(i) with ABS(c(i)) less than beta**(2*n+1). Either each c(i) is non-negative or each c(i) is non-positive. C is the sum on i, from 0 to k, of c(i)*(beta**(i*n)). } procedure ISUM (A,B: LIST): LIST; {Integer sum. A and B are integers. C=A+B. } procedure ITRUNC (A,NL: LIST): LIST; {Integer truncation. A is an integer. n is a beta-integer. B=INTEGER(A/2**n). } procedure IWRITE (A: LIST); {Integer write. The input integer A is converted to decimal and written in the output stream. }

5.8 SAC Modular Digit and Integer

procedure MDCRA (ML1,ML2,MLP1,AL1,AL2: LIST): LIST; {Modular digit chinese remainder algorithm. m1 and m2 are positive beta-integers, with GCD(m1,m2)=1 and m=m1*m2 less than beta. mp1 is the inverse of m1 in Z(m2). a1 and a2 are elements of Z(m1) and Z(m2) respectively. a is the unique element of Z(m) such that a is congruent to a1 modulo m1 and a is congruent to a2 modulo m2. } procedure MDDIF (ML,AL,BL: LIST): LIST; {Modular digit difference. m is a positive beta-integer. a and b belong to Z sub m. c=a-b. } procedure MDEXP (ML,AL,NL: LIST): LIST; {Modular digit exponentiation. m is a positive beta-integer. a belongs to Z sub m. n is a non-negative beta-integer. b=a**n. } procedure MDHOM (ML,A: LIST): LIST; {Modular digit homomorphism. m is a positive beta-integer. A is an integer. b is the image of A under the homomorphism H sub m. } procedure MDINV (ML,AL: LIST): LIST; {Modular digit inverse. m is a positive beta-integer. a is a unit of Z sub m. b=a**-1. } procedure MDLCRA (ML1,ML2,L1,L2: LIST): LIST; {Modular digit list chinese remainder algorithm. m1 and m2 are positive beta-integers, with GCD(m1,m2)=1 and m=m1*m2 less than beta. L1 and L2 are lists of elements of Z(m1) and Z(m2) respectively. L is a list of all a in Z(m) such that a is congruent to a1 modulo m1 and a is congruent to a2 modulo m2 with a1 in L1 and a2 in L2. } procedure MDNEG (ML,AL: LIST): LIST; {Modular digit negative. m is a positive beta-integer. a belongs to Z sub m. b=-a. } procedure MDPROD (ML,AL,BL: LIST): LIST; {Modular digit product. m is a positive beta-integer. a and b belong to Z sub m. c=a*b. }

procedure MDQ (ML,AL,BL: LIST): LIST; {Modular digit quotient. m is a positive beta-integer. a and b belong to Z sub m. b is a unit. c=a/b. }

procedure MDRAN (ML: LIST): LIST; {Modular digit, random. m is a positive beta-digit. a is a random element of Z(m). }

procedure MDSUM (ML,AL,BL: LIST): LIST; {Modular digit sum. m is a positive beta-integer. a and b belong to Z sub m. c=a+b. }

procedure MIDCRA (M,ML,MLP,A,AL: LIST): LIST; {Modular integer digit chinese remainder algorithm. M is a positive integer. m is an odd positive beta-integer. GCD(M,m)=1. mp is the inverse of the image of M under the homomorphism H sub m. A and a are elements of Z prime sub M and Z sub m respectively. AS is the unique element of Z prime sub MS which is congruent to A modulo M and congruent to a modulo m, where MS=M*m. }

procedure MIDIF (M,A,B: LIST): LIST; {Modular integer difference. M is a positive integer. A and B belong to Z sub M. C=A-B. }

procedure MIEXP (M,A,N: LIST): LIST; {Modular integer exponentiation. M is a positive integer. A is an element of Z(M). N is a non-negative integer. B=A**N in Z(M). }

procedure MIHOM (M,A: LIST): LIST; {Modular integer homomorphism. M is a positive integer. A is an integer. AS=H sub M(A). }

procedure MIINV (M,A: LIST): LIST; {Modular integer inverse. M is a positive integer. A is a unit of Z sub M. B=A**-1. }

procedure MINEG (M,A: LIST): LIST; {Modular integer negation. M is a positive integer. A belongs to Z sub M. B=-A. }

procedure MIPROD (M,A,B: LIST): LIST; {Modular integer product. M is a positive integer. A and B belong to Z(M). C=A*B in Z(M). }

procedure MIQ (M,A,B: LIST): LIST; {Modular integer quotient. M is a positive integer. A and B belong to Z sub M. B is a unit. C=A/B. }

procedure MIRAN (M: LIST): LIST; {Modular integer, random. M is a positive integer. R is a uniformly distributed random element of Z sub M. }

procedure MISUM (M,A,B: LIST): LIST; {Modular integer sum. M is a positive integer. A and B belong to Z sub M. C=A+B. }

procedure SMFMI (M,A: LIST): LIST; {Symmetric modular from modular integer. M is a positive integer. A belongs to Z sub M. B belongs to Z prime sub M with B=A(modulo M). }

5.9. SAC FACTORIZATION AND PRIME NUMBER 59

5.9 SAC Factorization and Prime Number

procedure DPGEN (ML, K: LIST): LIST; {Digit prime generator. K and m are positive beta-integers. L is the list (p(1),...,p(r)) of all prime numbers p such that m le p lt m+2*K, with p(1) lt p(2) lt ... lt p(r). A local array is used. } procedure FRESL (NL: LIST; VAR ML,L: LIST); {Fermat residue list. n is a positive integer with no prime divisors less than 17. m is a positive beta-integer and L is an ordered list of the elements of Z(m) such that if x**2-n is a square then x is congruent to a (modulo m) for some a in L. } procedure FRLSM (ML,AL: LIST): LIST; {Fermat residue list, single modulus. m is a positive beta-integer. a belongs to Z(m). L is a list of the distinct b in Z(m) such that b**2-a is a square in Z(m). } procedure GDPGEN (ML: LIST; KL: INTEGER): LIST; {Gaussian digit prime generator. m and k are positive beta-integers. L is the list (p(1),...,p(r)) of all prime numbers p such that m is less than or equal to p, p is less than m+4*k and p is congruent to 3 mod 4, with p(1) lt p(2) lt ... lt p(r). A local array is used. } procedure IFACT (NL: LIST): LIST; {Integer factorization. n is a positive integer. F is a list (q(1), q(2),...,q(h)) of the prime factors of n, q(1) le q(2) le ... le q(h), with n equal to the product of the q(i). } procedure ILPDS (NL,AL,BL: LIST; VAR PL,NLP: LIST); {Integer large prime divisor search. n is a positive integer with no prime divisors less than 17. 1 le a le b le n. A search is made for a divisor p of the integer n, with a le p le b. If such a p is found then np=n/p, otherwise p=1 and np=n. A modular version of fermats method is used, and the search goes from a to b. } procedure IMPDS (NL,AL,BL: LIST; VAR PL,QL: LIST); {Integer medium prime divisor search. n, a and b are positive integers such that a le b le n and n has no positive divisors less than a. If n has a prime divisor in the closed interval from a to b then p is the least such prime and q=n/p. Otherwise p=1 and q=n. } procedure ISPD (NL: LIST; VAR F,ML: LIST); {Integer small prime divisors. n is a positive integer. F is a list of primes (q(1),q(2),...,q(h)), h non-negative, q(1) le q(2) le ... lt q(h), such that n is equal to m times the product of the q(i) and m is not divisible by any prime in SMPRM. Either m=1 or m gt 1,000,000. } procedure ISPT (ML,MLP,F: LIST): LIST; {Integer selfridge primality test. m is an integer greater than or equal to 3. mp=m-1. F is a list (q(1),q(2),...,q(k)), q(1) le q(2) le ... le q(k), of the prime factors of mp, with mp equal to the product of the q(i). An attempt is made to find a root of unity modulo m of order m-1. If the existence of such a root is discovered then m is prime and s=1. If it is discovered that no such root exists then m is not a prime and s=-1. Otherwise the primality of m remains uncertain and s=0. }

5.10 SAC Rational Number

procedure RIRNP (I,CL: LIST): LIST; {Rational interval rational number product. I is an interval with rational endpoints. c is a rational number. J is the interval I*c. }

procedure RNABS (R: LIST): LIST; {Rational number absolute value. R is a rational number. S is the absolute value of R. }

procedure RNCEIL (RL: LIST): LIST; {Rational number, ceiling of. r is a rational number. a=CEILING(r), an integer. }

procedure RNCOMP (R,S: LIST): LIST; {Rational number comparison. R and S are rational numbers. t=SIGN(R-S). }

procedure RNDEN (R: LIST): LIST; {Rational number denominator. R is a rational number. b is the denominator of R, a positive integer. }

procedure RNDIF (R,S: LIST): LIST; {Rational number difference. R and S are rational numbers. T=R-S. }

procedure RNDWR (R,NL: LIST); {Rational number decimal write. R is a rational number. n is a non-negative integer. R is approximated by a decimal fraction D with n decimal digits following the decimal point and D is written in the output stream. The inaccuracy of the approximation is at most (1/2)*10**-n. If ABS(D) is greater than ABS(R) then the last digit is followed by a minus sign, if ABS(D) is less than ABS(R) then by a plus sign. }

procedure RNFCL2 (AL: LIST; VAR ML,NL: LIST); {Rational number floor and ceiling of logarithm, base 2. a is a non- zero rational number. m=FLOOR(LOG2(ABS(a))) and n=CEILING(LOG2(ABS(a))) are gamma-integers. }

procedure RNFLOR (RL: LIST): LIST; {Rational number, floor of. r is a rational number. a=FLOOR(r), an integer. }

procedure RNINT (A: LIST): LIST; {Rational number from integer. A is an integer. R is the rational number A/1. }

procedure RNINV (R: LIST): LIST; {Rational number inverse. R is a non-zero rational number. S=1/R. }

procedure RNNEG (R: LIST): LIST; {Rational number negative. R is a rational number. S=-R. }

procedure RNNUM (R: LIST): LIST; {Rational number numerator. R is a rational number. a is the numerator of R, an integer. }

procedure RNPROD (R,S: LIST): LIST; {Rational number product. R and S are rational numbers. T=R*S. }

procedure RNP2 (KL: LIST): LIST; {Rational number power of 2. k is a gamma-integer. r=2**k, a rational number. }

procedure RNQ (R,S: LIST): LIST; {Rational number quotient. R and S are rational numbers, S non-zero. T=R/S. }

procedure RNRAND (NL: LIST): LIST; {Rational number, random. n is a positive beta-integer. Random integers A and B are generated using IRAND(n). Then R=A/(ABS(B)+1), reduced to lowest terms. }

procedure RNREAD (): LIST; {Rational number read. The rational number R is read from the input stream. Any preceding blanks are skipped. }

5.11. SAC SET 61

procedure RNRED (A,B: LIST): LIST; {Rational number reduction to lowest terms. A and B are integers, B non-zero. R is the rational number A/B in canonical form. } procedure RNSIGN (R: LIST): LIST; {Rational number sign. R is a rational number. s=SIGN(R). } procedure RNSUM (R,S: LIST): LIST; {Rational number sum. R and S are rational numbers. T=R+S. } procedure RNWRIT (R: LIST); {Rational number write. R is a rational number. R is converted to decimal and written in the output stream. }

5.11 SAC Set

procedure LBIBMS (L: LIST): LIST; {List of beta-integers bubble-merge sort. L is an arbitrary list of beta-integers, possibly with repetitions. M is the result of sorting L into non-decreasing order. A combination of bubble-sort and merge- sort is used. The list L is modified to produce M. } procedure LBIBS (L: LIST); {List of beta-integers bubble sort. L is an arbitrary list of beta-integers, with possible repetitions. L is sorted into non-decreasing order by the bubble-sort method. The list L, though not its location, is modified. } procedure LBIM (L1,L2: LIST): LIST; {List of beta-integers merge. L1 and L2 are arbitrary lists of beta-integers in non-decreasing order. L is the merge of L1 and L2. L1 and L2 are modified to produce L. } procedure SCOMP (AL,L: LIST): LIST; {Set composition. a is a beta-integer, L is a set of beta-integers. LP is the union of SET(a) and L. } procedure SDIFF (A,B: LIST): LIST; {Set difference. A and B are sets of beta-integers. C=A-B. } procedure SINTER (A,B: LIST): LIST; {Set intersection. A and B are sets of beta-integers. C is the intersection of A and B. } procedure SUNION (A,B: LIST): LIST; {Set union. A and B are sets of beta-integers. C is the union of A and B. } procedure USCOMP (AL,L: LIST): LIST; {Unordered set composition. a is an object, L is an unordered set. LP is the union of SET(a) and L. } procedure USDIFF (A,B: LIST): LIST; {Unordered set difference. A and B are unordered sets. C is the difference A-B. } procedure USINT (A,B: LIST): LIST; {Unordered set intersection. A and B are unordered sets. C is the intersection of A and B. } procedure USUN (A,B: LIST): LIST; {Unordered set union. A and B are unordered sets. C is the union of A and B. }

Polynomial Systems Algorithms

6.1 DIP Common Polynomial System

procedure LPERM (L,P: LIST): LIST; {List permute. L is a list (a sub 1, ..., a sub n). P is a list (p sub 1, ..., p sub n) of integers in the range 1, ...,n. LP is the list (a sub p sub 1, ..., a sub p sub n) . } procedure BACKUB (); {Backspace until blank. } procedure CLIN (): LIST; {Character list in. If a character list is next in the input stream then it is read, else L is empty. } procedure DILBSO (A: LIST); {Distributive polynomial list bubble sort. A is a list of lists of base coefficients and exponent vectors. Each element of A is sorted with respect to the termordering defined in EVORD by the bubble-sort method, two monomials with equal exponents will lead to an error. The lists in A but not there location, are modified. } procedure DILFPL (RL,A: LIST): LIST; {Distributive polynomial list from polynom list. A is a list of polynomials in r variables, r ge 0. Every polynomial in A is converted to distributive representation and returned in B. } procedure DIPADM (A: LIST; VAR EL,FL,BL,B: LIST); {Distributive polynomial advance main variable. A is a distributive polynomial in one or more variables. e is the degree of A, b is the leading coefficient of A, B is the reductum of A, f is the degree of B. } procedure DIPADS (A,IL,SL: LIST; VAR EL,FL,BL,B: LIST); {Distributive polynomial advance and substitute. A is a distributive polynomial, i is the specified variable, 1 le i le r=DIPNOV(A), s is the new exponent of b in the i-th variable. e is the exponent of the leading monomial of A in the i-th variable, let bs be part of the coefficient of xi**e then b = bs * xi**s, B = A - bs*xi**e, f is the exponent of the leading monomial of B in the i-th variable. } procedure DIPADV (A,IL: LIST; VAR EL,FL,BL,B: LIST); {Distributive polynomial advance. A is a distributive polynomial, i is the specified variable, 1 le i le r=DIPNOV(A). e is the exponent of the leading monomial of A in the i-th variable, b is part of the coefficient of xi**e of A, B = A - b*xi**e, f is the exponent of the leading monomial

6.1. DIP COMMON POLYNOMIAL SYSTEM 63

64 CHAPTER 6. POLYNOMIAL SYSTEMS ALGORITHMS

of B in the i-th variable. } procedure DIPBSO (A: LIST); {Distributive polynomial bubble sort. A is a list of base coefficients and exponent vectors, A is sorted with respect to the termordering defined in EVORD by the bubble-sort method, two monomials with equal exponents will lead to an error. The list A but not its location, is modified. } procedure DIPCMP (EL,A: LIST): LIST; {Distributive polynomial composition. A is a distributive polynomial in r variables. e is an exponent. Let t=r+1, then B(x1, ...,xr,xt)=A(x1, ...,xr)*xt**e. } procedure DIPDEG (A: LIST): LIST; {Distributive polynomial degree. A is a distributive polynomial. n is the degree of A in its main variable. } procedure DIPDPV (A,SL,QL: LIST): LIST; {Distributive polynomial division by power of variable. A is a distributive polynomial in r variables. s is the desired variable to be divided, s le r. q is a beta-integer. Q = A / ( xs**q). } procedure DIPERM (A,P: LIST): LIST; {Distributive polynomial permutation of variables. A is a distributive polynomial, in r variables, r ge 0. P is a list (p sub 1, ...,p sub r) whose elements are the beta-digits 1 through r. B(x sub (p sub 1), ...,x sub (p sub r)) =A(x sub 1, ...,x sub r). } procedure DIPEVL (A: LIST): LIST; {Distributive polynomial exponent vector leading monomial. A is a distributive polynomial. u is the exponent vector of the leading monomial of A. } procedure DIPEVP (A,EL: LIST): LIST; {Distributive polynomial exponent vector product. A is a distributive polynomial, e is an exponent vector C=A*(x**e). } procedure DIPEXC (A,ILP,JLP: LIST): LIST; {Distributive polynomial exchange variables. A is a distributive polynomial, the variables ip and jp are exchanged, B=(x1, ...,xip, ...,xjp, ...,xr)=A(x1, ...,xjp, ...,xip, ...,xr), 0 le ip, jp le DIPNOV(A). } procedure DIPFMO (AL,EL: LIST): LIST; {Distributive polynomial from monomial. A is a non zero distributive polynomial with a as its leading base coefficient and e as is its exponent vector of the leading monomial. } procedure DIPFP (RL,A: LIST): LIST; {Distributive polynomial from polynomial. A is a polynomial in r variables, r ge 0. B is the result of converting A from recursive to distributive representation. Modified version original version by G. E. Collins. } procedure DIPINV (A,JL,KL: LIST): LIST; {Distributive polynomial introduction of new variables. A is a distributive polynomial in r variables. k ge 0, 0 le j le r. B(x1, ...,xj,y1, ...,yk,xj+1, ...,xr)=A(x1, ...,xr). } procedure DIPLBC (A: LIST): LIST; {Distributive polynomial leading base coefficient. A is a distributive polynomial. a is the leading base coefficient of A. } procedure DIPLDC (A: LIST): LIST; {Distributive polynomial leading coefficient. A is a distributive polynomial in one or more variables. a is the leading coefficient of A. } procedure DIPLM (L1,L2: LIST): LIST; {Distributive polynomial list merge. L1 and L2 are lists of non zero distributive polynomials in non decreasing order. L is the merge of L1 and L2. L1 and L2 are modified to produce L. } procedure DIPLPM (A: LIST): LIST; {Distributive polynomial list pair-merge sort. A is a list of non zero distributive polynomials. B is the result of sorting A into non-decreasing order. Pairs of polynomials are merged. The list A is modified to produce B. } procedure DIPLRS (A: LIST); {Distributive polynomial list re-sort. A is a list of distributive polynomials in r variables, r ge 0. The polynomials in A are re-sorted. } procedure DIPMAD (A: LIST; VAR AL,EL,AP: LIST); {Distributive polynomial monomial advance. A is a non zero distributive polynomial. a is its leading base coefficient, e is the exponent vector of the leading monomial of A. AP is the distributive polynomial a without its leading monomial, or the empty list. } procedure DIPMCP (AL,EL,A: LIST): LIST; {Distributive polynomial monomial composition. A is an emty list or a non zero distributive polynomial. AP is a non zero distributive polynomial with a as its leading base coefficient, e as is its exponent vector of the leading monomial and A as its monomial reductum. } procedure DIPMPM (A,PL: LIST): LIST; {Distributive polynomial multiplication by power of main variable. A is a distributive polynomial in r variables. p is a beta- integer. B = A * ( xr**p ). } procedure DIPMPV (A,SL,PL: LIST): LIST; {Distributive polynomial multiplication by power of variable. A is a distributive polynomial in r variables. s is the specified variable to be multiplicated, 1 le s le r. p is a beta-integer. B = A * ( xs**p ). } procedure DIPMRD (A: LIST): LIST; {Distributive polynomial monomial reductum. A is a distributive polynomial. B is the distributive polynomial a without the leading monomial of A. } procedure DIPMST (A,AL,EL: LIST); {Distributive polynomial monomial set. A is a non zero distributive polynomial. Its leading base coefficient is set to a and its exponent vector of the leading monomial is set to e. } procedure DIPNBC (A: LIST): LIST; {Distributive polynomial number of base coefficients. A is a distributive polynomial. l is the number of base coefficients. } procedure DIPNOV (A: LIST): LIST; {Distributive polynomial number of variables. A is a distributive polynomial. r is the number of variables, r ge 0. If A=0 then r is set to zero. } procedure DIPRED (A: LIST): LIST; {Distributive polynomial reductum. A is a distributive polynomial, in one or more variables. B is the reductum of A. } procedure DIPTBC (A: LIST): LIST; {Distributive polynomial trailing base coefficient. A is a distributive polynomial. a is the trailing base coefficient. } procedure DIPTCF (A: LIST): LIST; {Distributive polynomial trailing coefficient. A is a distributive polynomial. a is the trailing

6.1. DIP COMMON POLYNOMIAL SYSTEM 65

coefficient of A. }

procedure DIPTCS (A,IL: LIST): LIST; {Distributive polynomial trailing coefficient specified variable. A is a distributive polynomial in r variables. a is the trailing coefficient of A with respect to the i-th variable, 1 le i le r. }

procedure DIPTDG (A: LIST): LIST; {Distributive polynomial total degree. A is a distributive polynomial. n is the total degree of A. }

procedure DIPUNT (A: LIST): LIST; {Distributive polynomial univariate test. A is a distributive polynomial. If a is univariate then t=1, otherwise t=0. }

procedure DIPUV (A: LIST): LIST; {Distributive polynomial univariate variable output. A is a distributive polynomial. If A is univariate then t=i, otherwise t=0. were i is the index of the variable in which A is univariate. If A is constant then t= -1. }

procedure EPREAD (): LIST; {Exponent read. If ** is found in the input stream then e=AREAD, else e=1. }

procedure EVCADD (U,IL,EL: LIST; VAR V,FL: LIST); {Exponent vector component add. U=(u1, ...,ur) is an exponent vector of length r, e is added to the i-th component, 1 le i le r, f=ui+e, V=(u1, ...,ui+e, ...,ur). }

procedure EVCOMP (U,V: LIST): LIST; {Exponent vector compare. U=(u1, ...,ur), V=(v1, ...vr) are exponent vectors. r is the length of U and V. t=0 if U eq V. t=1 if U gt V. t=-1 if U lt V. eq, gt, lt with respect to the ordering of the exponent vectors specified in the global variable EVORD. Lexicographical, inverse lexicographical, graded lexicograhpical, inverse graded lexicographical orderings are possible. }

procedure EVCSUB (U,IL,EL: LIST; VAR V,FL: LIST); {Exponent vector component subtract. U=(u1, ...,ur) is an exponent vector of length r, e is subtracted from the i-th component, 1 le i le r, V=(u1, ...,ui-e, ...,ur), f=ui. }

procedure EVDEL (U,IL: LIST; VAR V,EL: LIST); {Exponent vector delete. U=(u1, ...,ur) is an exponent vector of length r. i is the component to be deleted, 1 le i le r. V=(u1, ...,ui-1,ui+1, ...,ur), e=ui. }

procedure EVDER (U,IL,EL: LIST; VAR V,FL: LIST); {Exponent vector derivation. U=(u1, ...,ur) is an exponent vector of length r, from the i-th component e-times one is subtracted and f is multiplied with the result. V=(u1, ...,ui-e, ...,ur). If f=0 then V is undefined. }

procedure EVDFSI (U,V: LIST; VAR W,SL: LIST); {Exponent vector difference and sign. U=(u1, ...,ur), V=(v1, ...,vr) are exponent vectors of length r. W=(w1, ...,wr) is the componentwise difference of U and V. s is the EVSIGN of W. If s=-1 then W is undefined. }

procedure EVDIF (U,V: LIST): LIST; {Exponent vector difference. U=(u1, ...,ur), V=(v1, ...,vr) are exponent vectors of length r. W=(w1, ...,wr) is the componentwise difference of U and V. }

procedure EVDOV (U: LIST): LIST; {Exponent vector dependency on variables. U is an exponent vector. V is the list (j1, ...,jn) where each j is the index of a variable with non zero exponent in U. } procedure EVEXC (U,IL,JL: LIST): LIST; {Exponent vector exchange. U=(u1, ...,ui, ...,uj, ...,ur) is an exponent vector of length r. The components ui and uj are exchanged, 1 le i lt j le r. V=(u1, ...,uj, ...,ui, ...,ur). } procedure EVIGLC (U,V: LIST): LIST; {Exponent vector inverse graded lexicographical compare. U=(u1, ...,ur), V=(v1, ...vr) are exponent vectors. t=0 if U eq V. t=1 if U gt V. t=-1 if U lt V. eq, gt, lt with respect to the inverse graded lexicographical ordering of the exponent vectors. r is the length of U and V. } procedure EVILCI (U,V: LIST): LIST; {Exponent vector inverse lexicographical compare inverse exponent vector. U=(u1, ...,ur), V=(v1, ...vr) are exponent vectors. t=0 if U eq V. t=1 if U gt V. t=-1 if U lt V. eq, gt, lt with respect to the inverse lexicographical ordering of the exponent vectors. r is the length of U and V. } procedure EVILCP (U,V: LIST): LIST; {Exponent vector inverse lexicographical compare. U=(u1, ...,ur), V=(v1, ...vr) are exponent vectors. t=0 if U eq V. t=1 if U gt V. t=-1 if U lt V. eq, gt, lt with respect to the inverse lexicographical ordering of the exponent vectors. r is the length of U and V. } procedure EVITDC (U,V: LIST): LIST; {Exponent vector inverse total degree compare. U=(u1, ...,ur), V=(v1, ...vr) are exponent vectors. t=0 if U eq V. t=1 if U gt V. t=-1 if U lt V. eq, gt, lt with respect to buchbergers total degree ordering of the exponent vectors. r is the length of U and V. } procedure EVLFCP (L,U,V: LIST): LIST; {Exponent vector linear form compare. U=(u1, ...,ur), V=(v1, ...,vr) are exponent vectors of length r. L is an univariate integral polynomial vector. t=0 if U eq V. t=1 if U gt V. t=-1 if U lt V. eq, gt, lt with respect to the ordering of the exponent vectors determined by the linear form. } procedure EVLCM (U,V: LIST): LIST; {Exponent vector least common multiple. U=(u1, ...,ur), V=(v1, ...,vr) are exponent vectors of length r. W=(w1, ...,wr) is the least common multiple of U and V. } procedure EVMT (U,V: LIST): LIST; {Exponent vector multiple test. U=(u1, ...,ur), V=(v1, ...,vr) are exponent vectors of length r. t=1 if U is a multiple of V, t=0 else. } procedure EVNNZE (U: LIST): LIST; {Exponent vector number of non zero exponents. U is an exponent vector. n is the number of non zero exponents of U. } procedure EVRAND (RL,KL: LIST): LIST; {Exponent vector random. r is the length of U. k is a positive beta-digit such that every component of U will be less than k and k lt beta. U is a random exponent vector. } procedure EVRASP (RL,KL,QL: LIST): LIST; {Exponent vector random. r is the length of U. k is a positive beta-digit such that every component of U will be less than k and k lt beta. U is a random exponent vector. } procedure EVSIGN (U: LIST): LIST; {Exponent vector signum. U=(u1, ...,ur) is an exponent vector of length r. t=0 if all components are eq 0, t=1 if all components are ge 0, else t=-1. } procedure EVSU (U,IL,FL: LIST; VAR V,EL: LIST); {Exponent vector substitution. U=(u1, ...,ui, ...,ur) is an exponent vector of length r. The i-th

6.2. DIP INTEGRAL 67

component is changed into f. 1 le i le r. e=ui. V=(u1, ...,ui-1,f,ui+1, ...,ur). } procedure EVSUM (U,V: LIST): LIST; {Exponent vector sum. U=(u1, ...,ur), V=(v1, ...,vr) are exponent vectors of length r. W=(u1+v1, ...,ur+vr) is the componentwise sum of U and V. } procedure EVTDEG (U: LIST): LIST; {Exponent vector total degree. U is an exponent vector. n is the sum of the components of U. } procedure PBCLI (RL,A: LIST): LIST; {Polynomial base coefficients list. A is a polynomial in r variables. B is the list of the base coefficients of A. } procedure PFDIP (A: LIST; VAR RL,B: LIST); {Polynomial from distributive polynomial. A is a distributive polynomial. B is the result of converting A to recursive representation, r is the number of variables of B, r ge 0. Modified version, original version by G. E. Collins. } procedure PLFDIL (A: LIST; VAR RL,B: LIST); {Polynomial list from distributive polynom list. A is a list of distributive polynomials in r variables, r ge 0. Every polynomial in A is converted to recursive representation and stored in B. } procedure PMPV (RL,A,IL,NL: LIST): LIST; {Polynomial multiplication by power of variable. A is a polynomial in r variables. 1 le i le r and n is a beta-integer. B=A*(x sub i)**n. } procedure PPERMV (RL,A,P: LIST): LIST; {Polynomial permutation of variables. A is a polynomial in r variables, r ge 0. P is a list (p sub 1, ...,p sub r) whose elements are the beta-digits 1 through r. B(x sub (p sub 1), ...,x sub (p sub r))=A(x sub 1, ..., x sub r). } procedure STVL (RL: LIST): LIST; {Standard variable list. r is the number of variables. V is the variable list for the variables x1, ...,xr. }

6.2 DIP Integral

procedure DIIFRP (A: LIST): LIST; {Distributive integral polynomial from rational polynomial. A is a distributive rational polynomial, B is the primitive positive associate integral polynomial of A. } procedure DIILFR (A: LIST): LIST; {Distributive integral polynomial list from rational polynomial list. A is a list of distributive rational polynomial, B is a list of primitive positive associate integral polynomials of the polynomials of A. } procedure DIILRD (V: LIST): LIST; {Distributive integral polynomial list read. V is a variable list. A list of distributive integral polynomials in r variables, where r=length(V), r ge 0, is read from the input stream. any blanks preceding A are skipped. } procedure DIILWR (A,V: LIST); {Distributive integral polynomial list write. V is a variable list. A list of distributive integral polynomials in r variables, where r=length(V), r ge 0, is written to the output stream. } procedure DIIPAB (A: LIST): LIST; {Distributive integral polynomial absolute value. A is a distributive integral polynomial. B is the absolute value of A. } procedure DIIPCP (A: LIST; VAR CL,AP: LIST); {Distributive integral polynomial content and primitive part. A is an distributive integral polynomial, c is the integer content and AP is the positive primitive part of A. } procedure DIIPDF (A,B: LIST): LIST; {Distributive integral polynomial difference. A and B are distributive integral polynomials. C=A-B. } procedure DIIPDM (A: LIST): LIST; {Distributive integral polynomial derivation main variable. A is a distributive polynomial. B is the derivation of A with respect to its main variable. } procedure DIIPDR (A,IL: LIST): LIST; {Distributive integral polynomial derivation. A is a distributive polynomial. B is the derivation of A with respect to its i-th variable, 0 le i le DIPNOV(A). } procedure DIIPEM (A,AL: LIST): LIST; {Distributive integral polynomial evaluation of main variable. A is a distributive integral polynomial. a is an integer. B(x1, ...,x(r-1))=A(x1, ...,x(r-1),a). } procedure DIIPEV (A,IL,AL: LIST): LIST; {Distributive integral polynomial evaluation of the i-th variable. A is a distributive integral polynomial, 1 le i le DIPNOV(A), a is an integer. B(x1, ...,x(i-1),x(i+1), ...,xr)= A(x1, ...,x(i-1),a,x(i+1), ...,xr). } procedure DIIPEX (A,NL: LIST): LIST; {Distributive integral polynomial exponentiation. A is a distributive integral polynomial, n is a non-negative beta- integer. B=A**n. 0**0 is by definition a polynomial in zero variables. } procedure DIIPHD (A,IL,NL: LIST): LIST; {Distributive integral polynomial higher derivation. A is a distributive integral polynomial. B is the n-th derivation of A with respect to its i-th variable, 0 le i le DIPNOV(A). } procedure DIIPIP (A,BL: LIST): LIST; {Distributive integral polynomial integer product. A is a distributive integral polynomial, b is an integer. C=A*b. } procedure DIIPIQ (A,BL: LIST): LIST; {Distributive integral polynomial integer quotient. A is a distributive integral polynomial, b is a nonzero integer, and b divides any coefficient of A. C=A/b. } procedure DIIPLS (A: LIST): LIST; {Distributive integral polynomial list sum. A is a circular list of distributive integral polynomials. B is the sum of all polynomials in A. } procedure DIIPMN (A: LIST): LIST; {Distributive integral polynomial maximum norm. A is a distributive integral polynomial. b is the maximum norm of A. } procedure DIIPNG (A: LIST): LIST; {Distributive integral polynomial negative. B= -A. } procedure DIIPON (A: LIST): LIST; {Distributive integral polynomial one. A is a distributive integral polynomial. If A=1 then t=1, otherwise t=0. }

6.2. DIP INTEGRAL 69

procedure DIIPPR (A,B: LIST): LIST; {Distributive integral polynomial product. A and B are distributive integral polynomials. C=A*B. } procedure DIIPPS (A,B: LIST): LIST; {Distributive integral polynomial pseudo-remainder. A and B are distributive integral polynomials, B ne 0. C is the pseudo-remainder of A and B. } procedure DIIPQ (A,B: LIST): LIST; {Distributive integral polynomial quotient. A and B are distributive integral polynomials. B is a non zero divisor of A. C=B/A. } procedure DIIPQR (A,B: LIST; VAR Q,R: LIST); {Distributive integral polynomial quotient and remainder. A and B are distributive integral polynomials with B ne 0. Q and R are unique distributive integral polynomials such that either B divides A, so Q=A/B and R=0 or B does not divide A, so A=B*Q+R with DEG(R) minimal. } procedure DIIPRA (RL,KL,LL,EL: LIST): LIST; {Distributive integral polynomial random. k, l and e are positive beta-digits. e is the maximal permitted exponent of A in any variable. A is a random distributive integral polynomial in r variables max norm of a lt 2**k and maximal l base coefficients. } procedure DIIPRD (V: LIST): LIST; {Distributive integral polynomial read. V is a variable list. A distributive integral polynomial A in r variables, where r=length(V), r ge 0, is read from the input stream. Any blanks preceding A are skipped. Modified version, orginal version by G. E. Collins. } procedure DIIPSG (A: LIST): LIST; {Distributive integral polynomial sign. A is a distributive integral polynomial. s is the sign of the leading base coefficient of A. } procedure DIIPSM (A,B: LIST): LIST; {Distributive integral polynomial sum. A and B are distributive integral polynomials. C=A+B. } procedure DIIPSN (A: LIST): LIST; {Distributive integral polynomial sum norm. A is a distributive integral polynomial. b is the sum norm of A. } procedure DIIPSO (A: LIST): LIST; {Distributive integral polynomial sort. A is a list of integer base coefficients and exponent vectors, A is sorted with respect to the actual term order, two terms with equal exponent vectors are added. } procedure DIIPSU (A,IL,B: LIST): LIST; {Distributive integral polynomial substitution. A and B are distributive integral polynomials, 1 le i le r=DIPNOV(A). E(x1, ...,x(i-1),x(i+1), ...,xr)=A(x1, ...,x(i-1), B(x1, ...,x(i-1),x(i+1), ...,xr),x(i+1), ...,xr). } procedure DIIPSV (A,B: LIST): LIST; {Distributive integral polynomial substitution for main variable. A and B are distributive integral polynomials. t=DIPNOV(A)-1. C(x1, ...,xt)=A(x1, ...,xt,B(x1, ...,xt)). } procedure DIIPTM (A,HL: LIST): LIST; {Distributive integral polynomial translation main variable. A is a distributive integral polynomial, h is an integer. B(x1, ...xr)=A(x1, ...,x(r-1),xr+h). r=DIPNOV(A). } procedure DIIPTR (A,HL,IL: LIST): LIST; {Distributive integral polynomial translation. A is a distributive integral polynomial, h is an integer, the i-th variable is translated. 1 le i le r=DIPNOV(A). B(x1, ...,xr)=A(x1, ...,xi+h, ...,xr). }

procedure DIIPWR (A,V: LIST); {Distributive integral polynomial write. A is a distributive integral poynomial in r variables, r ge 0. V is a variable list for A. A is written in the output stream. Modified version, original version by G. E. Collins. }

procedure DIIPWV (A: LIST); {Distributive integral polynomial write with standard variable list. A is a distributive integral poynomial. The standard variable list is used. A is written in the output stream. }

procedure DIIRAS (RL,KL,LL,EL,QL: LIST): LIST; {Distributive integral polynomial random sparse exponent vector. k, l and e are positive betadigits. e is the maximal permitted exponent of A in any variable. A is a random distributive integral polynomial in r variables max norm of a lt 2**k and maximal l base coefficients. }

6.3 DIP Integer Polynomial

procedure VIPIIP (RL,A,B: LIST): LIST; {Vector of integral polynomials with vector of integers inner product. A is a vector of integral polynomials in r variables, r non-negative. B is a vector of integers. C is the inner product of A and B. }

procedure HIPRAN (RL,KL,QL,NL: LIST): LIST; {Homogeneous integral polynomial random. k is a positive beta-digit. q is a rational number q1/q2 with 0 lt q1 le q2 lt beta. n is a non-negative beta-digit r ge 0. A is a random homogeneous integral polynomial in r variables with homogeneous degree n. max norm of A lt 2**k and q is the probability that any particular term of A has a non-zero coefficient. }

procedure IPRAN (RL,KL,QL,N: LIST): LIST; {Integral polynomial random. k is a positive beta-digit. q is a rational number q1/q2 with 0 lt q1 le q2 lt beta. N is a list (n sub r, ...,n sub 1) of non-negative beta-digits r ge 0. A is a random integral polynomial in r variables with deg sub i of a le n sub i + 1 for 1 le i le r. Max norm of A lt 2**k and q is the probability that any particular term of A has a non-zero coefficient. Modified version, original version by G. E. Collins. }

6.4 DIP Rational

procedure DIRFIP (A: LIST): LIST; {Distributive rational polynomial from integral polynomial. A is a distributive integral polynomial, B is the monic associate rational polynomial of A. }

procedure DIRLRD (V: LIST): LIST; {Distributive rational polynomial list read. V is a variable list. A list of distributive rational polynomials in r variables, where r=length(V), r ge 0, is read from the input stream. Any blanks preceding A are skipped. }

6.4. DIP RATIONAL 71

procedure DIRLWR (A,V,S: LIST); {Distributive rational polynomial list write. V is a variable list. A list of distributive rational polynomials in r variables, where r=length(V), r ge 0, is written to the output stream. } procedure DIRPAB (A: LIST): LIST; {Distributive rational polynomial absolute value. A is a distributive rational polynomial. B is the absolute value of A. } procedure DIRPDF (A,B: LIST): LIST; {Distributive rational polynomial difference. A and B are distributive rational polynomials. C=A-B. } procedure DIRPDM (A: LIST): LIST; {Distributive rational polynomial derivation main variable. A is a distributive polynomial. B is the derivation of A with respect to its main variable. } procedure DIRPDR (A,IL: LIST): LIST; {Distributive rational polynomial derivation. A is a distributive polynomial. B is the derivation of A with respect to its i-th variable, 0 le i le DIPNOV(A). } procedure DIRPEM (A,AL: LIST): LIST; {Distributive rational polynomial evaluation of main variable. A is a distributive rational polynomial. a is a rational number. B(x1, ...,x(r-1))=A(x1, ...,x(r-1),a). } procedure DIRPEV (A,IL,AL: LIST): LIST; {Distributive rational polynomial evaluation of the i-th variable. A is a distributive rational polynomial, 1 le i le DIPNOV(A), a is a rational number. B(x1, ...,x(i-1),x(i+1), ...,xr)= A(x1, ...,x(i-1),a,x(i+1), ...,xr). } procedure DIRPEX (A,NL: LIST): LIST; {Distributive rational polynomial exponentiation. A is a distributive rational polynomial, n is a non-negative beta- integer. B=A**n. 0**0 is by definition a polynomial in zero variables. } procedure DIRPHD (A,IL,NL: LIST): LIST; {Distributive rational polynomial higher derivation. A is a distributive rational polynomial. B is the n-th derivation of A with respect to its i-th variable, 0 le i le DIPNOV(A). } procedure DIRPLS (A: LIST): LIST; {Distributive rational polynomial list sum. A is a circular list of distributive rational polynomials. B is the sum of all polynomials in A. } procedure DIRPMC (A: LIST): LIST; {Distributive rational polynomial monic. A and C are distributive rational polynomials, C=A/LBC(A) if A ne 0 C=0 if A eq 0. } procedure DIRPMN (A: LIST): LIST; {Distributive rational polynomial maximum norm. A is a distributive rational polynomial. b is the maximum norm of A. } procedure DIRPNG (A: LIST): LIST; {Distributive rational polynomial negative. B= -A. } procedure DIRPON (A: LIST): LIST; {Distributive rational polynomial one. A is a distributive rational polynomial. If A=1 then t=1, otherwise t=0. } procedure DIRPPR (A,B: LIST): LIST; {Distributive rational polynomial product. A and B are distributive rational polynomials. C=A*B. } procedure DIRPQ (A,B: LIST): LIST; {Distributive rational polynomial quotient. A and B are distributive rational polynomials. B is a non zero divisor of A. C=B/A. } procedure DIRPQR (A,B: LIST; VAR Q,R: LIST); {Distributive rational polynomial quotient and remainder. A and B are distributive rational polynomials with B ne 0. Q and R are unique distributive rational polynomials such that either B divides A, so Q=A/B and R=0 or B does not divide A, so A=B*Q+R with deg(R) lt deg(B). } procedure DIRPRA (RL,KL,LL,EL: LIST): LIST; {Distributive rational polynomial random. k, l and e are positive beta-digits. e is the maximal permitted exponent of A in any variable. A is a random distributive rational polynomial in r variables max norm of A lt 2**k and maximal l base coefficients. } procedure DIRPRD (V: LIST): LIST; {Distributive rational polynomial read. V is a variable list. A distributive rational polynomial A in r variables, where r=length(V), r ge 0, is read from the input stream. Any blanks preceding A are skipped. modified version, orginal version by G. E. Collins. } procedure DIRPRP (A,BL: LIST): LIST; {Distributive rational polynomial rational number product. Is a distributive rational polynomial, b is a rational number. C=A*b. } procedure DIRPRQ (A,BL: LIST): LIST; {Distributive rational polynomial rational number quotient. A is a distributive rational polynomial, b is a nonzero rational number. C=A/b. } procedure DIRPSG (A: LIST): LIST; {Distributive rational polynomial sign. A is a distributive rational polynomial. s is the sign of the leading base coefficient of A. } procedure DIRPSM (A,B: LIST): LIST; {Distributive rational polynomial sum. A and B are distributive rational polynomials. C=A+B. } procedure DIRPSN (A: LIST): LIST; {Distributive rational polynomial sum norm. A is a distributive rational polynomial. b is the sum norm of A. } procedure DIRPSO (A: LIST): LIST; {Distributive rational polynomial sort. A is a list of rational coefficients and exponent vectors, A is sorted into inverse lexicographical order, two terms with equal exponent vectors are added. } procedure DIRPSU (A,IL,B: LIST): LIST; {Distributive rational polynomial substitution. A and B are distributive rational polynomials, 1 le i le r=DIPNOV(A). E(x1, ...,x(i-1),x(i+1), ...,xr)=A(x1, ...,x(i-1), B(x1, ...,x(i-1),x(i+1), ...,xr),x(i+1), ...,xr). } procedure DIRPSV (A,B: LIST): LIST; {Distributive rational polynomial substitution for main variable. A and B are distributive rational polynomials. t=DIPNOV(A)-1. C(x1, ...,xt)=A(x1, ...,xt,B(x1, ...,xt)). } procedure DIRPTM (A,HL: LIST): LIST; {Distributive rational polynomial translation main variable. A is a distributive rational polynomial, h is a rational number. B(x1, ...xr)=A(x1, ...,x(r-1),x(r)+h). r=DIPNOV(A). }

6.5. DIP RATIONAL NUMBER POLYNOMIAL 73

procedure DIRPTR (A,HL,IL: LIST): LIST; {Distributive rational polynomial translation. A is a distributive rational polynomial, h is a rational number, the i-th variable is translated. 1 le i le r=DIPNOV(A). B(x1, ...,xr)=A(x1, ...,x(i)+h, ...,xr). } procedure DIRPWR (A,V,S: LIST); {Distributive rational polynomial write. A is a distributive rational poynomial in r variables, r ge 0. V is a variable list for A. If S ge 0 then the coefficients are written by RNDWR else by RNWRIT. A is written in the output stream. Modified version, original version by G. E. Collins. } procedure DIRPWV (A: LIST); {Distributive rational polynomial write with standard variable list. A is a distributive rational poynomial. The standard variable list is used. A is written in the output stream. } procedure DIRRAS (RL,KL,LL,EL,QL: LIST): LIST; {Distributive rational polynomial, random sparse exponent vector. k, l and e are positive betadigits. e is the maximal permitted exponent of A in any variable. A is a random distributive rational polynomial in r variables max norm of A lt 2**k and maximal l base coefficients. }

6.5 DIP Rational Number Polynomial

procedure RPLWRS (RL,A,V,S: LIST); {Rational polynomial list write. A is a list of rational polynomial in r variables, r ge 0. V is a variable list for the polynomials in A. S is a decimal flag. A is written in the output stream in external canonical form. } procedure RPWRTS (RL,A,V,S: LIST); {Rational polynomial write. A is a rational polynomial in r variables, r ge 0. V is a variable list for A. S is a decimal flag. A is written in the output stream in external canonical form. } procedure RPONE (RL,A: LIST): LIST; {Rational polynomial one. A is a rational polynomial in r variables. If A=1 then t=1, otherwise t=0. }

6.6 DIP Termorder Optimization

procedure DIPDEM (A: LIST): LIST; {Distributive polynomial degree matrix. A is a distributive polynomial. B is the degree matrix of A. } procedure DIPDEV (A: LIST): LIST; {Distributive polynomial degree vector. A is a distributive polynomial. N is the degree vector of A. } procedure DIPLDM (A: LIST): LIST; {Distributive polynomial list degree matrix. A is a list of distributive polynomials. B is the sum of all degree matrices of each element of A. } procedure DIPTRM (A: LIST): LIST; {Distributive polynomial terms. A is a distributive polynomial in r variables. T is a list of beta-integers each counting the terms in the respective variable. } procedure DIPTYP (A: LIST): LIST; {Distributive polynomial typ. A is a distributive polynomial in r variables. t is a rational number, t is the typ of A, 0 lt t le 1. }

procedure DIPVOP (P,V: LIST; VAR PP,VP: LIST); {Distributive polynomial variable ordering optimisation. P and PP are lists of distributive polynomials. V and VP are variable lists. The optimal variable ordering for the polynomials in P is determined. The variables of the polynomials in P are permuted to produce PP. VP is the new variable list. }

procedure DMEVAD (A,E: LIST): LIST; {Degree matrix exponent vector add. A is a degree matrix. E is an exponent vector. B=A + E. }

procedure HDIFDI (A: LIST; VAR B,FL: LIST); {Homogeneous distributive polynomial from distributive polynomial. A is a distributive polynomial in r variables. s=r+1. If A is allready homogeneous then f=0 else f=1. B(xs,x1, ...,xr)=(xs)**(tdeg(A)) * A(x1/xs, ...,xr/xs). }

procedure LBLXCO (U,V: LIST): LIST; {List of beta integers lexicographical compare. U=(u1, ...,ur), V=(v1, ...vs) are lists of beta integers. t=0 if U eq V. t=1 if U gt V. t=-1 if U lt V. eq, gt, lt with respect to the lexicographical ordering of the beta integers. }

procedure PTERM (RL,A: LIST): LIST; {Polynomial terms. A is a recursive polynomial in r variables. T is a list of beta-integers each counting the terms in the respective variable. }

procedure PTYP (RL,A: LIST): LIST; {Polynomial typ. A is a recursive polynomial in r variables. t is a rational number, t is the PTYP of A, 0 lt t lt 1. }

procedure PVDEMA (A: LIST): LIST; {Permutation vector for degree matrix. A is a degree matrix. P is a permutation vector. }

6.7 SAC Dense Polynomial

procedure DMPPRD (RL,ML,A,B: LIST): LIST; {Dense modular polynomial product. A and B are polynomials in r variables over Z sub m, m a beta-integer, r ge 0. C=A*B. }

procedure DMPSUM (RL,ML,A,B: LIST): LIST; {Dense modular polynomial sum. A and B are dense polynomials in r variables over Z sub m, m a beta-integer. C=A+B. }

procedure DMUPNR (PL,A,B: LIST): LIST; {Dense modular univariate polynomial natural remainder. A and B are non-zero dense univariate polynomials over Z sub p, p a prime beta-integer, with deg(A) ge deg(B). C is the natural remainder of B. The list for A is modified. }

procedure DPFP (RL,A: LIST): LIST; {Dense polynomial from polynomial. A is a polynomial in r variables, r ge 0. B is the result of converting A to dense polynomial representation. }

6.8. SAC INTEGER POLYNOMIAL SYSTEM 75

6.8 SAC Integer Polynomial System

procedure IPABS (RL,A: LIST): LIST; {Integral polynomial absolute value. A is an integral polynomial in r variables. B is the absolute value of A. } procedure IPCRA (M,ML,MLP,RL,A,AL: LIST): LIST; {Integral polynomial chinese remainder algorithm. M is a positive integer. m is a positive beta-integer. gcd(M,m)=1. mp is the inverse of H sub m of M. A is an integral polynomial in r variables whose coefficients belong to Z prime sub M, r non-negative. a is a polynomial in r variables over Z sub m. AS is the unique integral polynomial in r variables with coefficients in Z prime sub MS, where MS=M*m, which is congruent to A modulo M and to a modulo m. } procedure IPDER (RL,A,IL: LIST): LIST; {Integral polynomial derivative. A is an integral polynomial in r variables. 1 le i le r. B is the derivative of A with respect to its i-th variable. } procedure IPDIF (RL,A,B: LIST): LIST; {Integral polynomial difference. A and B are integral polynomials in r variables, r ge 0. C=A-B. } procedure IPDMV (RL,A: LIST): LIST; {Integral polynomial derivative, main variable. A is an integral polynomial in r variables. B is the derivative of A with respect to its main variable. } procedure IPEMV (RL,A,AL: LIST): LIST; {Integral polynomial evaluation of main variable. A is an integral polynomial in r variables. a is an integer. B(x(1), ...,x(r-1))=A(x(1), ...,x(r-1),a). } procedure IPEVAL (RL,A,IL,AL: LIST): LIST; {Integral polynomial evaluation. A is an integral polynomial in r variables. 1 le i le r. a is an integer. B(x(1), ..., x(i-1),x(i+1), ...,x(r))=A(x(1), ...,x(i-1),a,x(i+1), ...,x(r)). } procedure IPEXP (RL,A,NL: LIST): LIST; {Integral polynomial exponentiation. A is an integral polynomial in r variables, r ge 0. n is a non-negative integer. B=A**n. } procedure IPFCB (V: LIST): LIST; {Integral polynomial factor coefficient bound. V is the degree vector of a non-zero integral polynomial A. b is a non-negative integer such that if b(1)* ...*b(k) divides A then the product of the infinity norms of the b(i) is less than or equal to 2**b times the infinity norm of A. Gelfonds bound is used. } procedure IPFRP (RL,A: LIST): LIST; {Integral polynomial from rational polynomial. A is a rational polynomial in r variables, r ge 0, each of whose base coefficients is an integer. B is a converted to integral polynomial representation. } procedure IPGSUB (RL,A,SL,L: LIST): LIST; {Integral polynomial general substitution. A is an integral polynomial in r variables, r ge 1. L is a list (b(1), ...,b(r)) of integral polynomials in s variables, s ge 1. C(y(1), ...,y(s))= A(b(1)(y(1), ...,y(s)), ...,b(r)(y(1), ...,y(s))). } procedure IPHDMV (RL,A,KL: LIST): LIST; {Integral polynomial higher derivative, main variable. A is an integral polynomial in r variables. k is a non-negative gamma-integer B is the k-th derivative of A with respect to its main variable.

} procedure IPIHOM (RL,D,A: LIST): LIST; {Integral polynomial mod ideal homomorphism. D is a list (d sub 1, ..., d sub r-1) of nonnegative beta-integers, r ge 0. A is an r-variate integral polynomial. B=A mod (x sub 1 ** d sub 1, ...,x sub r-1 ** d sub r-1). } procedure IPIP (RL,AL,B: LIST): LIST; {Integral polynomial integer product. a is an integer. B is an integral polynomial in r variables. C=a*B. } procedure IPIPR (RL,D,A,B: LIST): LIST; {Integral polynomial mod ideal product. D is a list (d sub 1, ..., d sub r-1) of non-negative beta-integers, r ge 1. A and B belong to Z(x sub 1, ...,x sub r-1,y)/(x sub 1 **d sub 1, ...,x sub r-1 ** d sub r-1). C=A*B. } procedure IPIQ (RL,A,BL: LIST): LIST; {Integral polynomial integer quotient. A is an integral polynomial in r variables. b is a non-zero integer which divides A. C=A/b. } procedure IPMAXN (RL,A: LIST): LIST; {Integral polynomial maximum norm. A is an integral polynomial in r variables. b is the maximum norm of A. } procedure IPNEG (RL,A: LIST): LIST; {Integral polynomial negative. A is an integral polynomial in r variables, r ge 0. B=-A. } procedure IPONE (RL,A: LIST): LIST; {Integral polynomial one. A is an integral polynomial in r variables. If A=1 then t=1, otherwise t=0. } procedure IPPROD (RL,A,B: LIST): LIST; {Integral polynomial product. A and B are integral polynomials in r variables, r ge 0. C=A*B. } procedure IPPSR (RL,A,B: LIST): LIST; {Integral polynomial pseudo-remainder. A and B are integral polynomials in r variables, B non-zero. C is the pseudo-remainder of A and B. } procedure IPQ (RL,A,B: LIST): LIST; {Integral polynomial quotient. A and B are integral polynomials in r variables, r ge 0. B is a non-zero divisor of A. C=A/B. } procedure IPQR (RL,A,B: LIST; VAR Q,R: LIST); {Integral polynomial quotient and remainder. A and B are integral polynomials in r variables with B non-zero. Q and R are the unique integral polynomials such that either B divides A, Q=A/B and R=0 or else B does not divide A and A=BQ+R with deg(R) minimal. } procedure IPRAN (RL,KL,QL,N: LIST): LIST; {Integral polynomial, random. k is a positive beta-digit. q is a rational number q1/q2 with 0 lt q1 le q2 lt beta. N is a list (n sub r, ...,n sub 1) of non-negative beta-digits, r ge 0. A is a random integral polynonial in r variables with deg sub i of a le n sub i for 1 le i le r. Max norm of A lt 2**k and q is the probability that any particular term of a has a non-zero coefficient. } procedure IPREAD ( VAR RL,A,V: LIST); {Integral polynomial read. The integral polynomial A is read from the input stream. r, nonnegative, is the number of variables of A and V is the variable list of A. Any number of preceding blanks are skipped. }

6.8. SAC INTEGER POLYNOMIAL SYSTEM 77

procedure IPSIGN (RL,A: LIST): LIST; {Integral polynomial sign. A is an integral polynomial in r variables. s is the sign of A. } procedure IPSMV (RL,A,B: LIST): LIST; {Integral polynomial substitution for main variable. A is an integral polynomial in r variables, x(1), ...,x(r). B is an integral polynomial in x(1), ...,x(r-1). C(x(1), ...,x(r-1))= A(x(1), ...,x(r-1),B(x(1), ...,x(r-1))). } procedure IPSUB (RL,A,IL,B: LIST): LIST; {Integral polynomial substitution. A is an integral polynomial in r variables, x(1), ...,x(r). 1 le i le r. B is an integral polynomial in x(1), ...,x(i-1). C(x(1), ...,x(i-1),x(i+1), ..., x(r))=A(x(1), ...,x(i-1),B(x(1), ...,x(i-1)),x(i+1), ..., x(r)). } procedure IPSUM (RL,A,B: LIST): LIST; {Integral polynomial sum. A and B are integral polynomials in r variables, r ge 0. C=A+B. } procedure IPSUMN (RL,A: LIST): LIST; {Integral polynomial sum norm. A is an integral polynomial in r variables, r non-negative. b is the sum norm of A. } procedure IPTPR (RL,D,A,B: LIST): LIST; {Integral polynomial truncated product. D is a list (d sub 1, ...,d sub r) of non-negative betaintegers, r ge 1. A and B belong to Z(x sub 1, ...,x sub r)/(x sub 1 **d sub 1, ...,x sub r ** d sub r). C=A*B. } procedure IPTRAN (RL,A,T: LIST): LIST; {Integral polynomial translation. A is an integral polynomial in r variables, r ge 1. T is a list (tr, ...,t1) of integers. B(x1, ...,xr)=A(x1+t1, ...,xr+tr). } procedure IPTRMV (RL,A,HL: LIST): LIST; {Integral polynomial translation, main variable. A is an integral polynomial in r variables, r ge 1. h is an integer. B(x1, ...,xr)=A(x1, ...,x(r-1),xr+h). } procedure IPTRUN (RL,D,A: LIST): LIST; {Integral polynomial truncation. D is a list (d sub 1, ...,d sub r) of non-negative beta-integers, r ge 0. A is an r-variate integral polynomial. B=A mod (x sub 1 ** d sub 1, ..., x sub r ** d sub r). } procedure IPWRIT (RL,A,V: LIST); {Integral polynomial write. A is an integral polynomial in r variables, r ge 0. V is a variable list for A. A is written in the output stream in external canonical form. } procedure IUPBEI (A,CL,ML: LIST): LIST; {Integral univariate polynomial binary rational evaluation, integer output. A is a univariate integral polynomial. c is an integer. m is a non-negative beta-integer. b=2**(n*m)*A(c/2**m) where n=deg(A). b is an integer. } procedure IUPBES (A,AL: LIST): LIST; {Integral univariate polynomial binary rational evaluation of sign. A is a univariate polynomial. a is a binary rational number. s=sign(A(a)). } procedure IUPBHT (A,KL: LIST): LIST; {Integral univariate polynomial binary homothetic transformation. A is a non-zero univariate integral polynomial. k is a gamma-integer. B(x)=2**(-h)*A(2**k*x) where h is uniquely determined so that B is an integral polynomial not divisible by 2. } procedure IUPBRE (A,AL: LIST): LIST; {Integral univariate polynomial binary rational evaluation. A is a univariate integral polynomial. a is a binary rational number. B=A(a), a binary rational number. } procedure IUPCHT (A: LIST): LIST; {Integral univariate polynomial circle to half-plane transformation. A is a non-zero univariate integral polynomial. Let n=deg(A). Then B(x)=(x+1)**n*A(1/(x+1)), a univariate integral polynomial. } procedure IUPNT (A: LIST): LIST; {Integral univariate polynomial negative transformation. A is a univariate integral polynomial. B(x)=A(-x). } procedure IUPTPR (NL,A,B: LIST): LIST; {Integral univariate polynomial truncated product. n is a non- negative integer. A and B are integral univariate polynomials. C(x)=A(x)*B(x) (modulo x**n) and C=0 or deg(C) lt n. } procedure IUPTR (A,HL: LIST): LIST; {Integral univariate polynomial translation. A is a univariate integral polynomial. h is an integer. B(x)=A(x+h). } procedure IUPTR1 (A: LIST): LIST; {Integral univariate polynomial translation by 1. A is a univariate integral polynomial. B(x)=A(x+1). }

6.9 SAC Modular Polynomial

procedure MIPDIF (RL,M,A,B: LIST): LIST; {Modular integral polynomial difference. M is a positive integer. A and B are polynomials in r variables over Z sub M, r ge 0. C=A-B. } procedure MIPFSM (RL,M,A: LIST): LIST; {Modular integral polynomial from symmetric modular. M is a positive integer. A is a polynomial in r variables over Z prime sub M, r ge 0. B belongs to Z sub M (x, ...,x sub r) with B=A (modulo M). } procedure MIPHOM (RL,M,A: LIST): LIST; {Modular integral polynomial homomorphism. A is an integral polynomial in r variables, r ge 0. M is a positive integer. B=H sub M (A), a polynomial in r variables over Z sub M. } procedure MIPIPR (RL,M,D,A,B: LIST): LIST; {Modular integral polynomial mod ideal product. D is a list (d sub 1, ...,d sub r-1) of nonnegative beta-integers, r ge 1. M is a positive integer. A and B belong to Z sub M (x sub 1, ...,x sub r-1,y)/(x sub 1 ** d sub 1, ...,x sub r-1 ** d sub r-1). C=A*B. } procedure MIPNEG (RL,M,A: LIST): LIST; {Modular integral polynomial negation. M is a positive integer. A is a polynomial in r variables over Z sub M, r ge 0. B=-A. } procedure MIPPR (RL,M,A,B: LIST): LIST; {Modular integral polynomial product. M is a positive integer. A and B are polynomials in r variables over Z sub M, r ge 0. C=A*B. } procedure MIPRAN (RL,M,QL,N: LIST): LIST; {Modular integral polynomial, random. M is a positive integer. q is a rational number q1/q2 with 0 lt q1 le q2 lt beta. N is a list (n sub r, ...,n sub 1) of non-negative beta-digits, r ge 0. A is a random polynomial in r variables over Z sub M with deg sub i of A le n sub i for 1 le i le r.

6.9. SAC MODULAR POLYNOMIAL 79

q is the probability that any particular term of A has a non-zero coefficient. }

procedure MIPSUM (RL,M,A,B: LIST): LIST; {Modular integral polynomial sum. M is a positive integer. A and B are polynomials in r variables over Z sub M, r ge 0. C=A+B. }

procedure MIUPQR (M,A,B: LIST; VAR Q,R: LIST); {Modular integral univariate polynomial quotient and remainder. M is a positive integer. A and B belong to Z sub M (x) with LDCF(B) a unit. Q and R are the unique elements of Z sub M (x) such that A=B*Q+R with either R=0 or DEG(R) lt DEG(B). }

procedure MMPIQR (RL,M,D,A,B: LIST; VAR Q,R: LIST); {Modular monic polynomial mod ideal quotient and remainder. M is a positive integer. D is a list (d sub 1, ...,d sub r-1) of non-nega- tive beta-integers, r ge 1. A and B belong to Z sub M(x sub 1, ...,x sub r-1,y)/(x sub 1 ** d sub 1, ...,x sub r-1 ** d sub r-1), with B monic. A=B*Q+R, deg sub y of R lt deg sub y of B unless B divides A, in which case R=0, with Q,R belonging to Z sub M (x sub 1, ...,x sub r-1,y)/(x sub 1 ** d sub 1, ...,x sub r-1 ** d sub r-1). }

procedure MPDIF (RL,ML,A,B: LIST): LIST; {Modular polynomial difference. A and B are polynomials in r variables over Z sub m, m a beta-integer. C=A-B. }

procedure MPEMV (RL,ML,A,AL: LIST): LIST; {Modular polynomial evaluation of main variable. A is a polynomial in r variables over Z sub m, m a beta-integer. a is an element of Z sub m. B(x(1), ...,x(r-1))=A(x(1), ...,x(r-1),a). }

procedure MPEVAL (RL,ML,A,IL,AL: LIST): LIST; {Modular polynomial evaluation. A is a polynomial in r variables over Z sub m, m a betainteger. 1 le i le r. a is an element of Z sub m. B(x(1), ...,x(i-1),x(i+1), ...,x(r))= A(x(1), ...,x(i-1),a,x(i+1), ...,x(r)). }

procedure MPEXP (RL,ML,A,NL: LIST): LIST; {Modular polynomial exponentiation. A is a polynomial in r variables over Z sub m, m a beta-integer. n is a non-negative integer. B=A**n. }

procedure MPHOM (RL,ML,A: LIST): LIST; {Modular polynomial homomorphism. A is an integral polynomial in r variables, r ge 0. m is a positive beta-integer. B is the image of A under the homomorphism H sub m, a polynomial in r variables over Z sub m. }

procedure MPINT (PL,B,BL,BLP,RL,A,A1: LIST): LIST; {Modular polynomial interpolation. p is a prime beta-integer. B is a univariate polynomial over Z sub p. b is an element of Z sub p such that B(b) ne 0 and bp=B(b)**-1. A is a polynomial over Z sub p in r variables, r ge 1, with A=0 or the degree of A in x(1) less than the degree of B. A1 is a polynomial over Z sub p in r-1 variables. AS(x(1), ...,x(r)) is the unique polynomial over Z sub p such that AS(x(1), ...,x(r)) is congruent to A(x(1), ...,x(r)) modulo B(x(1)), AS(b,x(2), ...,x(r))=A1(x(2), ...,x(r)) and the degree of AS in x(1) is less than or equal to the degree of B. }

procedure MPMDP (RL,PL,AL,B: LIST): LIST; {Modular polynomial modular digit product. a is an element of Z sub p, p a prime beta-integer. B is a polynomial in r variables over Z sub p. C=a*B. }

procedure MPMON (RL,PL,A: LIST): LIST; {Modular polynomial monic. A is a polynomial in r variables over Z sub p, p a prime betainteger. If A is non-zero then AP is the polynomial similar to A with LBCF(AP)=1. If A=0 then AP=0. }

procedure MPNEG (RL,ML,A: LIST): LIST; {Modular polynomial negative. A is a polynomial in r variables over Z sub m, m a beta-integer. B=-A. }

procedure MPPROD (RL,ML,A,B: LIST): LIST; {Modular polynomial product. A and B are polynomials in r variables over Z sub m, m a beta-integer, r ge 0. C=A*B. }

procedure MPPSR (RL,PL,A,B: LIST): LIST; {Modular polynomial pseudo-remainder. A and B are polynomials in r variables over Z sub p, p a prime beta-integer, with B non-zero. C is the pseudo-remainder of A and B. }

procedure MPQ (RL,PL,A,B: LIST): LIST; {Modular polynomial quotient. A and B are polynomials in r variables over Z sub p, p a prime beta-integer, r ge 0. B is a non-zero divisor of A. C=A/B. }

procedure MPQR (RL,PL,A,B: LIST; VAR Q,R: LIST); {Modular polynomial quotient and remainder. A and B are polynomials un r variables over Z sub p, p a prime beta-integer, with B non-zero. Q and R are the unique polynomials such that either B divides A, Q=A/B and R=0 or else B does not divide A and A=BQ+R with DEG(R) minimal. }

procedure MPRAN (RL,ML,QL,N: LIST): LIST; {Modular polynomial, random. m is a positive beta-integer. q is a rational number q1/q2 with 0 lt q1 le q2 lt beta. N is a list (n sub r, ...,n sub 1) of non-negative beta-digits, r ge 0. A is a random polynomial in r variables over Z sub m with deg sub i of A le n sub i for 1 le i le r. q is the probability that any particular term of A has a non-zero coefficient. }

procedure MPSUM (RL,ML,A,B: LIST): LIST; {Modular polynomial sum. A and B are polynomials in r variables over Z sub m, m a betainteger. C=A+B. }

procedure MPUP (RL,ML,CL,A: LIST): LIST; {Modular polynomial univariate product. A is a polynomial in r variables, r ge 1, over Z sub m, m a positive beta-integer. c is a univariate polynomial over Z sub m. B(x(1), ...,x(r)) = c(x(1))*A(x(1), ...,x(r)). }

procedure MPUQ (RL,PL,A,BL: LIST): LIST; {Modular polynomial univariate quotient. A is a polynomial in r variables, r ge 2, over Z sub p, p a prime beta-integer. b is a non-zero univariate polynomial over Z sub p which divides A. C(x(1), ...,x(r))=A(x(1), ...,x(r))/b(x(1)). }

procedure MUPDER (ML,A: LIST): LIST; {Modular univariate polynomial derivative. m is a beta-integer. A is a univariate polynomial over Z sub m. B is the derivative of A, a univariate polynomial over Z sub m. }

procedure MUPRAN (PL,NL: LIST): LIST; {Modular univariate polynomial, random. A is a random univariate polynomial of degree n over Z(p). }

procedure SMFMIP (RL,M,A: LIST): LIST; {Symmetric modular from modular integral polynomial. M is a positive integer. A is a polynomial in r variables over Z sub M, r ge 0. B belongs to Z prime sub M (x1, ...,x sub r) with B=A (modulo M). }

6.10. SAC POLYNOMIAL SYSTEM 81

procedure VMPIP (RL,ML,A,B: LIST): LIST; {Vector of modular polynomial inner product. A and B are vectors of modular polynomials in r variables over Z sub m, r non-negative, m a beta-integer. C is the inner product of A and B. }

6.10 SAC Polynomial System

procedure PBIN (AL1,EL1,AL2,EL2: LIST): LIST; {Polynomial binomial. a1 and a2 are elements of a coefficient ring R. e1 and e2 are non-negative beta-integers e1 gt e2. A is the polynomial A(x)=a1*x**e1+a2*x**e2, a univariate polynomial over R. } procedure PCL (A: LIST): LIST; {Polynomial coefficient list. A is a non-zero polynomial. L is the list (a(n),a(n-1), ...,a(0)) where n=DEG(A) and A(x)=a(n)*x**n+ a(n-1)*x**(n-1)+ ...+a(0). } procedure PDBORD (A: LIST): LIST; {Polynomial divided by order. A is a non-zero polynomial. B(x)= A(x)/x**k where k is the order of A. } procedure PDEG (A: LIST): LIST; {Polynomial degree. A is a polynomial. n is the degree of A. } procedure PDEGSV (RL,A,IL: LIST): LIST; {Polynomial degree, specified variable. A is a polynomial in r variables, r ge 1. 1 le i le r. n is the degree of A in the i-th variable. } procedure PDEGV (RL,A: LIST): LIST; {Polynomial degree vector. A is a polynomial A(x(1), ...,x(r)) in r variables. V is the list (v(r), ...,v(1)) where v(i) is the degree of a in x(i). } procedure PDPV (RL,A,IL,NL: LIST): LIST; {Polynomial division by power of variable. A is a polynomial in r variables. 1 le i le r and n is a beta-integer such that x sub i sup n divides A. B eq A/x sub i sup n. } procedure PFDP (RL,A: LIST): LIST; {Polynomial from dense polynomial. A is a dense polynomial in r variables, r ge 0. B is the result of converting A to recursive polynomial representation. } procedure PINV (RL,A,KL: LIST): LIST; {Polynomial introduction of new variables. A is a polynomial in r variables, r ge 0. k ge 0. B(y(1), ...,y(k),x(1), ...,x(r)) =A(x(1), ...,x(r)). } procedure PLBCF (RL,A: LIST): LIST; {Polynomial leading base coefficient. A is a polynomial in r variables. a is the leading base coefficient of A. } procedure PLDCF (A: LIST): LIST; {Polynomial leading coefficient. A is a polynomial. a is the leading coefficient of A. } procedure PMDEG (A: LIST): LIST; {Polynomial modified degree. A is a polynomial. If A=0 then n=-1 and otherwise n=DEG(A). } procedure PMON (AL,EL: LIST): LIST; {Polynomial monomial. a is an element of a coefficient ring R. e is a non-negative beta-integer. A is the polynomial A(x)=a*x**e, a univariate polynomial over R. } procedure PMPMV (A,KL: LIST): LIST; {Polynomial multiplication by power of main variable. A is a polynomial in r variables, r ge 1. k is a non-negative integer. B(x sub 1 , ..., x sub r ) eq A(x sub 1 , ..., x sub r ) * x sub r sup k . } procedure PORD (A: LIST): LIST; {Polynomial order. A is a non-zero polynomial. k is the order of A. that is, if A(x)=a(n)*x**n+ ...+a(0), then k is the smallest integer such that a(k) ne 0. } procedure PRED (A: LIST): LIST; {Polynomial reductum. A is a polynomial. B is the reductum of A. } procedure PRT (A: LIST): LIST; {Polynomial reciprocal transformation. A is a non-zero polynomial. let n=DEG(A). Then B(x)=x**n*A(1/x), where x is the main variable of A. } procedure PTBCF (RL,A: LIST): LIST; {Polynomial trailing base coefficient. A is an r-variate polynomial, r ge 0. a=trailing base coefficient of A. } procedure PUFP (RL,A: LIST): LIST; {Polynomial, univariate, from polynomial. A is an r-variate polynomial, r ge 0. B, a univariate polynomial, equals A(0, ...,0,x). } procedure VCOMP (U,V: LIST): LIST; {Vector comparison. U=(u(1), ...,u(r)) and V=(v(1), ...,v(r)) are lists of beta-integers with common length r ge 1. If U=V then t=0. If U is not equal to V then t=1 if u(i) le v(i) for all i and t=2 if v(i) le u(i) for all i. Otherwise t=3. } procedure VLREAD (): LIST; {Variable list read. V, a list of variables, is read from the input stream. Any preceding blanks are skipped. } procedure VLSRCH (VL,V: LIST): LIST; {Variable list search. v is a variable. V is a list of variables (v(1), ...,v(n)), n non-negative. If v=v(j) for some j then i=j. Otherwise i=0. } procedure VLWRIT (V: LIST); {Variable list write. V, a list of variables, is written in the output stream. } procedure VMAX (U,V: LIST): LIST; {Vector maximum. U=(u(1), ...,u(r)) and V=(v(1), ...,v(r)) are lists of beta-integers with common length r ge 1. W=(w(1), ..., w(r)) where w(i)=MAX(u(i),v(i)). } procedure VMIN (U,V: LIST): LIST; {Vector maximum. U=(u(1), ...,u(r)) and V=(v(1), ...,v(r)) are lists of beta-integers with common length r ge 1. W=(w(1), ..., w(r)) where w(i)=MIN(u(i),v(i)). } procedure VREAD (): LIST; {Variable read. The variable v is read from the input stream. Any number of preceding blanks are skipped. }

6.11 SAC Rational Polynomial

procedure RPDIF (RL,A,B: LIST): LIST; {Rational polynomial difference. A and B are rational polynomials in r variables, r ge 0. C=A-B.

6.11. SAC RATIONAL POLYNOMIAL 83

} procedure RPEMV (RL,A,BL: LIST): LIST; {Rational polynomial evaluation, main variable. A is a rational polynomial in r variables, r gt 0. b is a rational number. C(x(1), ...,x(r-1))=A(x(1), ...,x(r-1),b). } procedure RPFIP (RL,A: LIST): LIST; {Rational polynomial from integral polynomial. A is an integral polynomial in r variables, r ge 0. } procedure RPIMV (RL,A: LIST): LIST; {Rational polynomial integration, main variable. A is a rational polynomial in r variables, r gt 0. B is the integral of A with respect to its main variable. The constant of integration is 0. } procedure RPNEG (RL,A: LIST): LIST; {Rational polynomial negative. A is an rational polynomial in r variables, r ge 0. B=-A. } procedure RPPROD (RL,A,B: LIST): LIST; {Rational polynomial product. A and B are rational polynomials in r variables, r ge 0. C=A*B. } procedure RPQR (RL,A,B: LIST; VAR Q,R: LIST); {Rational polynomial quotient and remainder. A and B are rational polynomials in r variables with B non-zero. Q and R are the unique rational polynomials such that either B divides A, Q=A/B and R=0 or else B does not divide A and A=BQ+R with DEG(R) minimal. } procedure RPREAD ( VAR RL,A,V: LIST); {Rational polynomial read. The rational polynomial A is read from the input stream. r ge 0 is the number of variables of A and V is the variable list of A. Any number of preceding blanks are skipped. } procedure RPRNP (RL,AL,B: LIST): LIST; {Rational polynomial rational number product. B is a rational polynomial in r variables, r ge 0. a is a rational number. C=a*B. } procedure RPSUM (RL,A,B: LIST): LIST; {Rational polynomial sum. A and B are rational polynomials in r variables, r ge 0. C=A+B. } procedure RPWRIT (RL,A,V: LIST); {Rational polynomial write. A is a rational polynomial in r variables, r ge 0. V is a variable list for A. A is written in the output stream in external canonical form. }

Module Algorithms

7.1 MAS Linear Algebra Integer

procedure IUM (m, n : LIST): LIST; {Integer unit matrix. m, n integer. An (m x n) integer unit matrix is returned. }

procedure IVWRITE (A : LIST); {Integer vector write. A is an integer vector. A is written to the output stream. }

procedure IMWRITE (A : LIST); {Integer matrix write. A is an integer matrix. A is written to the output stream. }

procedure IVVDIF (A, B : LIST): LIST; {Integer vector difference. A and B are integer vectors. The integer vector C = A - B is returned. }

procedure IKM (A, B : LIST): LIST; {Integer vector component product. IKM returns the difference of the product of the integer vector A with FIRST(B) and the product of the integer vector B with FIRST(A). C = A * FIRST(B) - B * FIRST(A). C is an integer vector. }

procedure IVVSUM (A, B : LIST): LIST; {Integer vector vector sum. A and B are integer vectors. An integer vector C = A + B is returned. }

procedure IVSVSUM (A, B : LIST): LIST; {Integer vector scalar and vector sum. A and B are integer vectors. An integer vector C = A + FIRST(B) is returned. }

procedure IVSSUM (A : LIST): LIST; {Integer vector scalar sum. A is an integer vector. An integer C = a1 + a2 + ... + an is returned. }

procedure IVSVPROD (A, B : LIST): LIST; {Integer vector scalar and vector product. A and B are integer vectors. An integer vector C = (a1*FIRST(B), ..., an*FIRST(B) ) is returned. }

procedure IVVPROD (A, B : LIST): LIST; {Integer vector vectors product. A and B are integer vectors. An integer vector C = (a1*b1, ..., an*bn) is returned. }

7.1. MAS LINEAR ALGEBRA INTEGER 85

86 CHAPTER 7. MODULE ALGORITHMS

procedure IVSPROD (A, B : LIST): LIST; {Integer vector scalar product. A and B are integer vectors. An integer C = a1*b1 + ... + an*bn is returned. } procedure IVMAX (M : LIST): LIST; {Integer vector maximum norm. M is an integer vector. An integer a = maximum absolute value M(i) is returned. } procedure IVLC (a, A, b, B : LIST): LIST; {Integer vector linear combination. A and B are integer vectors. a and b are integers. An integer vector C = a*A + b*B is returned. } procedure IVSQ (a, A: LIST): LIST; {Integer vector scalar quotient. A is an integer vector. a is an integer. An integer vector C = A/a is returned. a must divide each element of A exactly. } procedure IVFRNV (A: LIST): LIST; {Integer vector from rational number vector. A is a rational number vector. A is muliplied by a common multiple of its denominators, then the denominators are removed. An integer vector C = lcm(denom(A)) * A is returned. } procedure IVFRNV1 (A, B : LIST; VAR C, D: LIST); {Integer vector from rational number vector. A and B are rational number vectors. A and B are muliplied by a common multiple of their denominators, then the denominators are removed. C and D are integer vectors, such that C = lcm(denom(A),denom(B))*A and D = lcm(denom(A),denom(B))*B. } procedure IMPROD (A, B : LIST): LIST; {Integer matrix product. A and B are integer matrices. An integer matrix C = A * B is returned, if the number of coloums of A is equal to the number of rows of B, otherwise the empty matrix is returned. } procedure IMSUM (A, B : LIST): LIST; {Integer matrix sum. A and B are integer matrices. An integer matrix C = A + B is returned. } procedure IMDIF (A, B : LIST): LIST; {Integer matrix difference. A and B are integer matrices. An integer matrix C = A - B is returned. } procedure ISMPROD (A, B : LIST): LIST; {Integer scalar and matrix product. B is an integer matrix. A is an integer. An integer matrix C = A * B is returned. } procedure IMMAX (M : LIST): LIST; {Integer matrix maximum norm. M is an integer matrix. An integer a = maximum absolute value M(i,j) is returned. } procedure IMFRNM (A : LIST): LIST; {Integer matrix from rational number matrix. A is a rational number row matix. The rows of A are muliplied by a common multiple of its denominators, then the denominators are removed. An integer matix C is returned, such that for all rows C(i) = lcm(denom(A(i))) * A(i). } procedure IMFRNM1 (A, B : LIST; VAR C, D: LIST); {Integer matrix from rational number matrix. A is a rational number row matix. B is a rational number column matix. The rows of A and the rows of B are muliplied by a common multiple of their denominators, then the denominators are removed. C and D are integer matices, such that C(i) = lcm(denom(A(i)),B(i)) * A(i) and D(i) = lcm(denom(A(i)),B(i)) * B(i). } procedure IMGELUD (M : LIST; VAR L, U: LIST); {Integer matrix Gaussian elimination LU-decomposition. M is an integer matrix represented rowwise. L is a lower triangular integer matrix represented columnwise. U is an upper triangular integer matrix represented rowwise. M = L * U for appropriate modifications of L and U. The pivot operations and exact division factors are also recorded in L. } procedure IMLT (L, b : LIST): LIST; {Integer lower triangular matrix transformation. L is a lower triangular integer matrix represented columnwise as generated by IMGELUD. b is an integer vector. An integer vector u = L * b is returned, such that if M * x = b and M = L * U, then U * x = u. } procedure IMUT (U, b : LIST): LIST; {Integer upper triangular matrix transformation. U is an upper triangular integer matrix represented rowwise as generated by IMGELUD. b is an integer vector b = L * b’ as generated by IMLT. A rational number (!) vector x, such that U * x = b is returned. If no such x exists, then an empty vector is returned. If more than one such x exists, then for free x(i), x(i) = 0 is taken. } procedure IMGE (M : LIST): LIST; {Integer matrix Gaussian elimination. M is a (n x m) integer matrix. A (n x m) integer matrix resulting from Gaussian elimination is returned. IMGELUD is called. } procedure IMSDS (L, U, b : LIST): LIST; {Integer matrix solve decomposed system. L is a lower triangular integer matrix represented columnwise, U is an upper triangular integer matrix represented rowwise. L and U as generated by IMGELUD. If M = L * U, then a rational number (!) vector x, such that M * x = b is returned. If no such x exists, then an empty vector is returned. If more than one such x exists, then for free x(i), x(i) = 0 is taken. } procedure RNMINVI (A : LIST): LIST; {Rational number matrix inversion, integer algorithm. A is a rational number matrix represented rowwise. If it exists, the inverse matrix of A is returned, otherwise an empty matrix is returned. The integer Gaussian elimination IMGELUD is used. } procedure IMUNS (U : LIST): LIST; {Integer matrix upper triangular matrix solution null space. U is an upper triangular integer matrix represented rowwise as generated by IMGELUD. A matrix X of linear independent rational number vectors x is returned, such that for each x in X, U * x = 0 holds. If only x = 0 satisfies the condition U * x = 0, then the matrix X is empty. } procedure IMDETL (M : LIST): LIST; {Integer matrix determinant, using Laplace expansion. M is an integer matrix. The determinant of M is returned. } procedure IMDET (M : LIST): LIST; {Integer matrix determinant, using Gaussian elimination. M is an integer matrix. The determinant of M is returned. }

7.2 MAS Linear Algebra Rational Number

procedure MDIM (M : LIST): LIST; {Matrix dimension. M is a matrix. MDIM returns max( row, column) of M. }

7.2. MAS LINEAR ALGEBRA RATIONAL NUMBER 87

procedure MGET (M, k, l : LIST): LIST; {Matrix get. M is a matrix. k, l are integers, 0 le k le rows(M), 0 le l le columns(M). MGET returns the element M(k,l) of matrix M. } procedure MSET (M, k, l, x : LIST): LIST; {Matrix set. M is a matrix. k, l are integers, 0 le k le rows(M), 0 le l le columns(M). MSET sets the element M(k,l) to x. The new matrix is returned. } procedure VDELEL (V, i : LIST): LIST; {Vector delete element. V is a vector. The i-th element of V is deleted. 0 le i le length(V). } procedure MDELCOL (M, i : LIST): LIST; {Matrix delete column. M is a vector of row vectors. In each row the i-th element is deleted, 0 le i le columns(M). The new matrix is returned. } procedure MMINOR (M, i, j : LIST): LIST; {Matrix minor. M is a vector of row vectors. The i-th column, 0 le i le rows(M), and in each remaining row the j-th element, 0 le j le columns(M), is deleted. } procedure MTRANS (M : LIST): LIST; {Matrix transpose. M is a matrix. The transposed matrix is returned. } procedure VEL (a, n : LIST): LIST; {Vector elements. A vector of length n with elements a is returned. } procedure MFILL (M, m, n: LIST): LIST; {Matrix fill. M is an upper triangular matrix. A (m x n) matrix with zeros in the lower triangular part is returned. } procedure MRANG (U: LIST): LIST; {Matrix rang. U is an upper triangular matrix from a LU-decomposition. The rang of U is returned. } procedure RNMHILBERT (m, n : LIST): LIST; {Rational number matrix Hilbert. m, n integer. A (m x n) rational number Hilbert matrix is returned. } procedure RNUM (m, n : LIST): LIST; {Rational number unit matrix. m, n integer. A (m x n) rational number unit matrix is returned. } procedure RNVWRITE (A : LIST); {Rational number vector write. A is a rational number vector. A is written to the output stream. } procedure RNVREAD (): LIST; {Rational number vector read. A rational number vector is read from the input stream, and returned. } procedure RNMWRITE (A : LIST); {Rational number matrix write. A is a rational number matrix. A is written to the output stream. } procedure RNMREAD (): LIST; {Rational number matrix read. A rational number matrix is read from the input stream, and returned. } procedure RNVFIV (A : LIST): LIST; {Rational number vector from integer vector. A is an integer vector. A rational number vector with denominators 1 and nominators equal to the elements of A is returned. } procedure RNMFIM (M : LIST): LIST; {Rational number matrix from integer matrix. A is an integer matrix. A rational number matrix with denominators 1 and nominators equal to the elements of A is returned. } procedure RNVDIF (A, B : LIST): LIST; {Rational number vector difference. A and B are rational number vectors. The rational number vector C = A - B is returned. } procedure RNVQ (A, B : LIST): LIST; {Rational number vector quotient. A and B are rational number vectors. The rational number vector C = A / FIRST(B) is returned. } procedure RNVQF (A : LIST): LIST; {Rational number vector quotient. A is a rational number vector. The rational number vector C = A / FIRST(A) is returned. } procedure RNVVSUM (A, B : LIST): LIST; {Rational number vector vector sum. A and B are rational number vectors. A rational number vector C = A + B is returned. } procedure RNVSVSUM (A, B : LIST): LIST; {Rational number vector scalar sum. A and B are rational number vectors. A rational number vector C = A + FIRST(B) is returned. } procedure RNVSSUM (A : LIST): LIST; {Rational number vector scalar sum. A is a rational number vector. A rational number C = a1 + a2 + ... + an is returned. } procedure RNVSVPROD (A, B : LIST): LIST; {Rational number vector scalar vector product. A and B are rational number vectors. A rational number vector C = (a1*FIRST(B), ..., an*FIRST(B)) is returned. } procedure RNVVPROD (A, B : LIST): LIST; {Rational number vector vector product. A and B are rational number vectors. A rational number vector C = (a1*b1, ..., an*bn) is returned. } procedure RNVSPROD (A, B : LIST): LIST; {Rational number vector scalar product. A and B are rational number vectors. A rational number C = a1*b1 + ... + an*bn is returned. } procedure RNVMAX (M : LIST): LIST; {Rational number vector maximum norm. M is a rational number vector. A rational number a = maximum absolute value M(i) is returned. } procedure RNVLC (a, A, b, B : LIST): LIST; {Rational number vector linear combination. A and B are rational number vectors. a and b are rational numbers. A rational number vector C = a*A + b*B is returned. } procedure RNSVPROD (a, A : LIST): LIST; {Rational number vector product with scalar. A is a rational number vector. a is a rational number. A rational number vector C = a*A is returned. } procedure RNMSUM (A, B : LIST): LIST; {Rational number matrix sum. A and B are rational number matrices. A rational number matrix C = A + B is returned. } procedure RNMDIF (A, B : LIST): LIST; {Rational number matrix difference. A and B are rational number matrices. A rational number matrix C = A - B is returned. }

7.2. MAS LINEAR ALGEBRA RATIONAL NUMBER 89

procedure RNMPROD (A, B : LIST): LIST; {Rational number matrix product. A and B are rational number matrices. A rational number matrix C = A * B is returned, if the number of coloums of A is equal to the number of rows of B, otherwise the empty matrix is returned. }

procedure RNSMPROD (A, B : LIST): LIST; {Rational number scalar and matrix product. B is a rational number matrix. A is a rational number. A rational number matrix C = A * B is returned. }

procedure RNMMAX (M : LIST): LIST; {Rational number matrix maximum norm. M is a rational number matrix. A rational number a = maximum absolute value M(i,j) is returned. }

procedure RNMGE (M : LIST): LIST; {Rational number matrix Gaussian elimination. M is a (n x m) rational number matrix. A (n x m) rational number matrix resulting from Gaussian elimination is returned. RNMGELUD is called. }

procedure RNMDET (M : LIST): LIST; {Rational number matrix determinant, using Gaussian elimination. M is a rational number matrix. The determinant of M is returned. }

procedure RNMDETL (M : LIST): LIST; {Rational number matrix determinant, using Laplace expansion. M is a rational number matrix. The determinant of M is returned. }

procedure RNMGELUD (M : LIST; VAR L, U: LIST); {Rational number matrix Gaussian elimination LU-decomposition. M is a rational number matrix represented rowwise. L is a lower triangular rational number matrix represented columnwise. U is an upper triangular rational number matrix represented rowwise. M = L * U for appropriate modifications of L and U. The pivot operations are also recorded in L. }

procedure RNMLT (L, b : LIST): LIST; {Rational matrix lower triangular matrix transformation. L is a lower triangular rational number matrix represented columnwise as generated by RNMGELUD. b is a rational number vector. A rational number vector u = L * b is returned, such that if M * x = b and M = L * U, then U * x = u. }

procedure RNMUT (U, b : LIST): LIST; {Rational matrix upper triangular matrix transformation. U is an upper triangular rational number matrix represented rowwise as generated by RNMGELUD. b is a rational number vector b = L * b’ as generated by RNMLT. A rational number vector x, such that U * x = b is returned. If no such x exists, then an empty vector is returned. If more than one such x exists, then for free x(i), x(i) = 0 is taken. }

procedure RNMSDS (L, U, b : LIST): LIST; {Rational number matrix solve decomposed system. L is a lower triangular rational number matrix represented columnwise, U is an upper triangular rational number matrix represented rowwise. L and U as generated by RNMGELUD. If M = L * U, then a rational number vector x, such that M * x = b is returned. If no such x exists, then an empty vector is returned. If more than one such x exists, then for free x(i), x(i) = 0 is taken. }

procedure RNMINV (A : LIST): LIST; {Rational number matrix inversion. A is a rational number matrix represented rowwise. If it exists, the inverse matrix of A is returned, otherwise an empty matrix is returned. } procedure RNMUNS (U : LIST): LIST; {Rational number matrix upper triangular matrix solution null space. U is an upper triangular rational number matrix represented rowwise as generated by RNMGELUD. A matrix X of linear independent rational number vectors x is returned, such that for each x in X, U * x = 0 holds. If only x = 0 satisfies the condition U * x = 0, then the matrix X is empty. }

7.3 SAC Linear Diophantine Equation System

procedure LDSMKB (A,BL: LIST; VAR XLS,N: LIST); {Linear diophantine system solution, modified Kannan and Bachem algorithm. A is an m by n integral matrix. A is represented column-wise. b is an integral m-vector. If the diophantine system A*x=b is consistent, then xs is a particular solution and N is a list of basis vectors of the solution module of A*x=0. Otherwise, xs and N are null lists. A and b are modified. } procedure LDSSBR (A,BL: LIST; VAR XLS,N: LIST); {Linear diophantine system solution, based on Rosser ideas. A is an m by n integral matrix. A is represented column-wise. b is an integral m-vector. If the diophantine system A*x=b is consistent, then xs is a particular solution and N is a list of basis vectors of the solution module of A*x=0. Otherwise, xs and N are null lists. A and b are modified. } procedure MAIPDE (RL,M: LIST): LIST; {Matrix of integral polynomials determinant, exact division algorithm. M is a square matrix of integral polynomials in r variables, r ge 0, represented as a list. D is the determinant of M. } procedure MAIPDM (RL,M: LIST): LIST; {Matrix of integral polynomials determinant, modular algorithm. M is a square matrix of integral polynomials in r variables, r non-negative. D is the determinant of M. } procedure MAIPHM (RL,ML,A: LIST): LIST; {Matrix of integral polynomials homomorphism. A is a matrix of integral polynomials in r variables, r non-negative. m is a positive beta-integer. B is the matrix B(i,j) of polynomials in r variables over Z sub m such that B(i,j)=H(m)(A(i,j)). } procedure MAIPP (RL,A,B: LIST): LIST; {Matrix of integral polynomials product. A and B are matrices of integral polynomials in r variables, r ge 0, for which the matrix product A*B is defined. C=A*B. } procedure MIAIM (A: LIST): LIST; {Matrix of integers, adjoin identity matrix, A is an m by n matrix of integers. A is represented column-wise. B is the matrix obtained by adjoining an n by n identity matrix to the bottom of A. A is modified. } procedure MICINS (A,V: LIST): LIST; {Matrix of integers column insertion. A is an m by n integral matrix represented by the list (a(1),a(2), ...,a(n)), where a(i) is the list (a(1,i), ...,a(m,i)) representing column i of A and a(1,1) ge a(1,2) ge ... ge a(1,m). V=(v(1), ...,v(m)) is an integral vector with v(1) lt a(1,1). Let i be the largest integer such that a(1,i) ge v(1). Then B is the matrix represented by the list (a(1), ..., a(i),V,a(i+1), ...,a(n)). A is modified. } procedure MICS (A: LIST): LIST; {Matrix of integers column sort. A is an integral matrix with non- negative elements in first row. A is represented column-wise. B is an integral matrix obtained by sorting columns of A such that elements of the first row are in descending order. A is modified. }

7.3. SAC LINEAR DIOPHANTINE EQUATION SYSTEM 91

procedure MINNCT (A: LIST): LIST; {Matrix of integers, non-negative column transformation. A=(a(i,j)) is an m by n integral matrix. A is represented column-wise. B=(b(i,j)) is the m by n integral matrix with b(i,j)=a(i,j) if a(1,j) ge 0 and b(i,j)=-a(i,j) if a(1,j) lt 0. A is modified. }

procedure MMDDET (PL,M: LIST): LIST; {Matrix of modular digits determinant. p is a prime beta-integer. M is a square matrix over GF(p), represented as a list. d is the determinant of M. }

procedure MMDNSB (PL,M: LIST): LIST; {Matrix of modular digits null space basis. p is a prime beta- integer. M is an m by n matrix over Z sub p. B is a list (b(1), ..., b(r)) representing a basis for the null space of M, consisting of all x such that M*x=0. r is the dimension of the null space. B=() if the null space of M is 0. Each b(i) is a list representing an m-vector. M is modified. Alternatively, if M represents a matrix by columns, then B is a basis for the null space consisting of all x such that x*M=0. }

procedure MMPDMA (RL,PL,M: LIST): LIST; {Matrix of modular polynomials determinant, modular algorithm. M is a square matrix of modular polynomials in r variables over Z sub p, r non-negative, p a prime beta-integer. D is the determinant of M. }

procedure MMPEV (RL,ML,A,KL,AL: LIST): LIST; {Matrix of modular polynomials evaluation. A is a matrix of polynomials in r variables over Z sub m, m a positive beta-integer. 1 le k le r and a is an element of Z sub m. B is the matrix of polynomials b(i,j) where b(i,j)(x(1), ...,x(k-1),x(k+1), ...,x(r))= a(i,j)(x(1), ...,x(k-1),a,x(k+1), ...,x(r)). }

procedure VIAZ (A,NL: LIST): LIST; {Vector of integers, adjoin zeros. A is the vector (a(1), ...,a(m)). n is a non-negative beta-integer. B is the vector (a(1), ...,a(m), 0, ...,0) of m+n components. A is modified. }

procedure VIDIF (A,B: LIST): LIST; {Vector of integers difference. A and B are vectors in Z sup n. C=A-B. }

procedure VIERED (U,V,IL: LIST): LIST; {Vector of integers, element reduction. U=(u(1), ...,u(n)) and V=(v(1), ...,v(n)) are integral n-vectors. 1 le i le n. v(i) ne 0. W=U-q*V, where q=INTEGER(u(i)/v(i)). }

procedure VILCOM (AL,BL,A,B: LIST): LIST; {Vector of integers linear combination. a and b are integers. A and B are integral vectors in Z sup n. C=a*A+b*B. }

procedure VINEG (A: LIST): LIST; {Vector of integers negation. A is an integral vector. B=-A. }

procedure VISPR (AL,A: LIST): LIST; {Vector of integers scalar product. a is an integer. A is an integral vector. C=a*A. }

procedure VISUM (A,B: LIST): LIST; {Vector of integers sum. A and B are vectors in Z sup n. C=A+B. }

procedure VIUT (U,V,IL: LIST; VAR UP,VP: LIST); {Vector of integers, unimodular transformation. U=(u(1), ...,u(n)) and V=(v(1), ...,v(n)) are vectors in Z sup n with u(i) ne 0. (UP,VP)=(U,V)*K where K is a unimodular matrix, depending on u(i) and v(i), whose elements are obtained from IDEGCD. }

7.4 Symmetric functions definition module.

procedure DIRPSR (Q,PL: LIST; VAR P1,P2: LIST); {Distributive rational polynomial symmetric function reduction. Q is a list of the rl elementary symmetric functions in rl variables. pl is reduced modulo Q to p2, the reduction relation is p1. } procedure DIRPSE (Q,U: LIST; VAR PL,V: LIST); {Distributive rational polynomial symm. function exponent reduction. Q is a list of the rl elementary symmetric functions in rl variables. pl is a product of elemenatry symmetric polynomials such that head term pl = u. v is the exponent vector of the product. } procedure DIRPES (RL: LIST): LIST; {Distributive rational polynomial elementary symmetric functions. Q is a list of the rl elementary symmetric functions in rl variables. } procedure EVASC (U: LIST): LIST; {Exponent vector ascending. U is an exponent vector of length rl, U=(u1, ... ,url). tl = 1 if u1 le ... le url, else tl = 0. }

MAS Ring Algorithms

8.1 DIP Ideal Decomposition 0 System

procedure DIGFET (P,IL,JL: LIST): LIST; {DIP G base successful extension test. P is a Groebner base of an ideal of dimension 0 in inverse lexicographical term ordering. i and j are indexes of variables where an field extension is required. t=1 if the extension was successful t=0 else. }

procedure DIGISM (P: LIST): LIST; {DIP G base index search for extension multiple univariats. P is a Groebner base of dimension 0 in inverse lexicographical term ordering. I is a list of indexes of variables where an field extension is required or I=() if no field extension is neccessary. }

procedure DIGISR (P: LIST): LIST; {DIP G base index search for extension reductas. P is a Groebner base of an ideal of dimension 0 in inverse lexicographical term ordering. I is a list of indexes of variables where an field extension is required or I=() if no field extension is neccessary. }

procedure DINTFE (T,IL,JL: LIST): LIST; {DIP normalized tupel field extension. T is a normalized tupel of a zero set with a final Groebner base of dimension 0. i and j determine the variable indexes for the field extension. TP is a list of normalized tupels for the field extension for T. Trial values are used for the transcendent parameter. }

procedure DINTSR (T: LIST): LIST; {DIP normalized tupel separation refinement. T is a list of normalized tupels with final Groebner base of dimension 0. TP is a list of normalized tupels for some field extensions for T. }

procedure DINTSS (T: LIST): LIST; {DIP normalized tupel strong separation. T is a list of normalized tupels with final Groebner base of dimension 0. TP is a list of normalized tupels for some field extensions for T. }

procedure DINTZS (N: LIST): LIST; {DIP nomalized tupels from system zero. N is a zero set. T is the list of nomalized tupels of N. }

94 CHAPTER 8. MAS RING ALGORITHMS

procedure DIRGZS (VB,PB,W: LIST): LIST; {Distributive rational Groebner base zero set. VB is a rest of a variable list. PB is a Groebner base. W is the total variable list. N is the zero set of P. } procedure DIRLPD (A,VP: LIST): LIST; {DIP rational polynomial ideal primary ideal decomposition. A is a non empty list of distributive rational polynomials representing a Groebner base. The polynomials in A have r variables. L=(l1, ...,ln) with li=(pi,ei,vpi,qi) i=1, ...,n where qi = ideal(pi**e,A) with A contained in qi and e maximal. Ideal(pi) is a prime ideal in at most r+1 variables. VPI is the variable list vor pi. } procedure DIRLPW (A,V,L: LIST); {DIP rational polynomial ideal primary ideal decomposition write. A is a non empty list of distributive rational polynomials representing a Groebner base. The polynomials in a have r variables. L=(l1, ...,ln) with li=(pi,eli,vpi,qi) i=1, ...,n where qi = ideal(pi)**e with A contained in qi and e maximal. Ideal(pi) is a prime ideal in at most r+1 variables. VPI is the variable list for pi. } procedure DIRPDA (A,VP: LIST): LIST; {DIP rational polynomial ideal primary ideal decomposition over Q(alpha). A is a non empty list of distributive rational polynomials representing a Groebner base. The polynomials in A have r variables. L=(l1, ...,ln) with li=(pi,ei,vpi,qi) i=1, ...,n where qi = ideal(pi**e,A) with A contained in qi and e maximal. Ideal(pi) is a prime ideal in at most r+1 variables. VPI is the variable list vor pi. } procedure DITFZS (N: LIST): LIST; {DIP tupel from zero set. N is a zero set. T is a list of tupels of the zero set. } procedure DITSPL (T: LIST; VAR T0,T1: LIST); {DIP zero set tupel split. T is a list of normalized tupels of a zero set. T0 is a list of normalized tupels of a zero set with a final Groebner base of a ideal of dimension 0. T1=T-T0. }

8.2 DIP Dimension

procedure DIGBZT (S: LIST): LIST; {Distributive polynomial groebner base common zero test. S is a groebner basis. t = -1 or 0 if DIMENSION(S) eq -1 or 0, t = 1 if DIMENSION(S) ge 1. } procedure DILDIM (G: LIST; VAR DL,S,M: LIST); {Distributive polynomial list dimension. G is a list of distributive polynomials, a groebner base. d is the dimension of ideal(G). M is a maximal independend set of variables. S is a set of maximal independent sets of variables. } procedure DIDIMS (G,S,U,M: LIST): LIST; {Distributive polynomial dimension maximal independent set. G is a list of distributive rational polynomials, and a g-base. S is a maximal independent set of variables. U is a set of variables of unknown status. M and MP are lists of maximal independent sets of variables. } procedure EVGBIT (S,G: LIST): LIST; {Exponent vector groebner base intersection test. S is a set of variable indices. G is a groebner basis. t = 0 if intersection = () else t = 1. } procedure USETCT (U,V: LIST): LIST; {Unordered set containment test. U and V are unordered sets. t = 1 if U is contained in V else t = 0. } procedure IXSUBS (V,I: LIST): LIST; {Indexed subset. V is a list. I is an index list. The elements of V with index from I are put to

8.3. DIP GCD 95

VP. }

8.3 DIP GCD

procedure DIRFAC (P: LIST): LIST; {Distributive rational polynomial factorisation. P is a distributive rational polynomial. PP=((e1,P1), ...,(en,Pn)), where P=P1**e1+ ... +Pn**en. } procedure IPLCM (RL,A,B: LIST): LIST; {Integral polynomial least common multiple. A and B are integal polynomials. C=LCM(A,B), a nonnegative integral polynomial. }

8.4 DIP Ideal System

procedure DIPLDV (A,V: LIST): LIST; {Distributive polynomial list dependency on variables. A is a list of distributive polynomials. V is the variable list. U is the variable list of variables with positive exponents in A. } procedure DIRLCT (A,B: LIST): LIST; {Distributive rational polynomial list ideal containement test. A and B are lists of distributive rational polynomials representing groebner bases. t = 1 if ideal(A) is contained in ideal(B), t = 0 else. } procedure DIRLIP (PL,A,B: LIST): LIST; {Distributive rational polynomial list ideal product. A and B are lists of distributive rational polynomials. C=GBASIS(p,A*B). } procedure DIRLPI (A,P,VP: LIST): LIST; {Distributive rational polynomial list primary ideal. A and P are non empty lists of distributive rational polynomials representing groebner bases. The polynomials in A have r variables. ideal(P) is a prime ideal in at most r+1 variables. VP is the variable list for P. QP=(P,e,VP,Q) where Q = ideal(P**e,A) with A contained in Q and e maximal. }

8.5 DIP Rational Function

procedure IFWRIT (R,V: LIST); {Integral function write. R is an integral function. R is the variable list. R is written in the output stream. } procedure RFDEN (R: LIST): LIST; {Rational function denominator. R is a rational function. BL is the denominator of R, a positive integral polynomial in RL variables. } procedure RFDIF (R,S: LIST): LIST; {Rational function difference. R and S are rational functions. T=R-S. } procedure RFEXP (A,NL: LIST): LIST; {Rational function exponentiation. A is a rational function, n is a non-negative beta-integer. B=A**n. } procedure RFFIP (RL,A: LIST): LIST; {Rational function from integral polynomial. A is an integral polynomial in RL variables. R is the rational function A/1. }

procedure RFINV (R: LIST): LIST; {Rational function inverse. R is a non-zero rational function. S=1/R. }

procedure RFNEG (R: LIST): LIST; {Rational function negative. R is a rational function. S=-R. }

procedure RFNOV (R: LIST): LIST; {Rational function number of variables. R is a rational function. RL is the number of variables of the numerator and denumerator of R. }

procedure RFNUM (R: LIST): LIST; {Rational function numerator. R is a rational function. AL is the numerator of R, an integral polynomial. }

procedure RFONE (R: LIST): LIST; {Rational function one. R is a rational function. s=1 if R=1, s=0 else. }

procedure RFPROD (R,S: LIST): LIST; {Rational function product. R and S are rational functions. T=R*S. }

procedure RFQ (R,S: LIST): LIST; {Rational function quotient. R and S are rational functions, S non-zero. T=R/S. }

procedure RFREAD (V: LIST): LIST; {Rational function read. The rational function R is read from the input stream. V is the variable list. any preceding blanks are skipped. }

procedure RFRED (RL,A,B: LIST): LIST; {Rational function reduction to lowest terms. A and B are integral polynomials in RL variables, B non-zero. R is the rational function A/B in canonical form. }

procedure RFSIGN (R: LIST): LIST; {Rational function sign. R is a rational function. s=sign(R). }

procedure RFSUM (R,S: LIST): LIST; {Rational function sum. R and S are rational functions. T=R+S. }

procedure RFWRIT (R,V: LIST); {Rational function write. R is a rational function. V is the variable list. R is written in the output stream. }

8.6 DIP Rational Groebner Bases

procedure DIGBC3 (B,PLI,PLJ,EL: LIST): LIST; {Distributive polynomial groebner basis criterion 3. B is a non empty list of reduction sets. pi and pj are distributive polynomials. e is the least common multiple of the leading exponent vectors of pi and pj. s=1 if the reduction of pi and pj is necessary s=0 else. }

procedure DIGBC4 (PLI,PLJ,EL: LIST): LIST; {Distributive polynomial groebner basis criterion 4. pi and pj are polynomials in distributive representation. e is the least common multiple of the leading exponent vectors of pi and pj. s=1 if the reduction of pi and pj is necessary s=0 else. }

8.7. DIP IDEAL REAL ROOT SYSTEM 97

procedure DIGBMI (P: LIST): LIST; {Distributive minimal ordered groebner basis. P is a list of non zero rational polynomials in distributive representation in r variables. PP is the minimal normed and ordered groebner basis. } procedure DILCPL (P: LIST; VAR D,B: LIST); {Distributive polynomial list construct pair list. P is list of polynomials in distributive representation in r variables. B is the polynomials pairs list and D is the pairs list. } procedure DILUPL (PL,P,D,B: LIST): LIST; {Distributive polynomial list update pair list. P is list of polynomials in distributive representation in r variables. B is the polynomials pairs list and D is the pairs list. p is a non zero polynomial in distributive representation. D, P and B are modified. DP is the updated pairs list. } procedure DIRGBA (PL,P,TF: LIST): LIST; {Distributive rational polynomial groebner basis augmentation. P is a groebner basis of polynomials in distributive representation in r variables. p is a polynomial. PP is the groebner basis of (P,p). t is the trace flag. } procedure DIRGBR (P,TF: LIST): LIST; {Distributive rational polynomial groebner basis recursion. P is a list of rational polynomials in distributive representation in r variables. PP is the groebner basis of P. t is the trace flag. } procedure DIRLIS (P: LIST): LIST; {Distributive rational polynomial list irreducible set. P is a list of distributive rational polynomials, PP is the result of reducing each p element of P modulo P-(p) until no further reductions are possible. } procedure DIRPGB (P,TF: LIST): LIST; {Distributive rational polynomials groebner basis. P is a list of rational polynomials in distributive representation in r variables. PP is the groebner basis of P. t is the trace flag. } procedure DIRPNF (P,S: LIST): LIST; {Distributive rational polynomial normal form. P is a list of non zero polynomials in distributive rational representation in r variables. S is a distributive rational polynomial. R is a polynomial such that S is reducible to R modulo P and R is in normalform with respect to P. } procedure DIRPSP (A,B: LIST): LIST; {Distributive rational polynomial S polynomial. A and B are rational polynomials in distributive representation. C is the S polynomial of A and B. } procedure EVPLM (L1,L2: LIST): LIST; {Exponent vector pair-list merge. L1 and L2 are pair-lists of exponent vectors in non decreasing order. L is the merge of L1 and L2. L1 and L2 are modified to produce L. } procedure EVPLSO (A: LIST): LIST; {Exponent vector pair-list sort. A is a list of pair-lists. B is the result of sorting A into nondecreasing order. Pairs of elements of A are merged. The list A is modified to produce B. }

8.7 DIP Ideal Real Root System

procedure DIGBSI (P,T,A: LIST): LIST; {Distributive polynomial system algebraic number G basis sign. P is a goebner basis in inverse lexicographical term order in r variables (non empty), with all neccessary refinements. T=(t1,... ,ti) i le r, where tj=(vj,ij,pj) j=1, ...,i and v is the character list for the j-th variable, ij is an isolating intervall for a real root of the univariate polynomial pjl. A is a distributive rational polynomial depending maximal on one variable. s is the sign of A as element of an algebraic extension of Q determined by P. } procedure DIITNT (T: LIST): LIST; {Distributive polynomial system intervall tupel from norm tupel. T is a refined normalized tupel of a zero set with a final Goebner base of dimension 0. TP is a list of intervall tupels for T. } procedure DIITWR (TP,EPS: LIST); {Distributive polynomial system intervall tupels write. TP is a list of intervall tupels of a zero set. EPS is LOG10 of the desired precision. } procedure DINTWR (TP,EPS: LIST); {Distributive polynomial system normalized tupels write. TP is a list of normalized tupels of a zero set. EPS is log10 of the desired precision. } procedure DIROWR (V,P,EPS: LIST); {Distributive polynomial system real root write. V is a variable list. P is a list (e,p). EPS is the desired precision. e is the multiplicity of the root, and p is an irreducible polynomial. } procedure GBZSET (V,PP,EPS: LIST); {Groebner base real zero set of zero dimensional ideal. V is a variable list. PP is a list of distributive rational polynomials, PP is a Groebner base. EPS is is LOG10 of the desired precision. } procedure RIRWRT (R,EPS: LIST); {Rational intervall refinement write. R=(v,i,p) where v is the variable character string, i is a rational intervall containing only one real root of the polynomial p. EPS is the presicion epsilon. }

8.8 DIP Zero Dimensional Ideal

procedure DIRMPG (IL,F: LIST): LIST; {Distributive rational minimal polynomial for a groebner basis. F is a groebner basis. PP is the minimal polynomial for the i-th variable for F. }

SAC Ring Algorithms

9.1 SAC Algebraic Number Field

procedure AFDIF (AL,BL: LIST): LIST; {Algebraic number field element difference. AL and BL are elements of Q(alpha) for some algebraic number alpha. CL=AL-BL. }

procedure AFINV (M,AL: LIST): LIST; {Algebraic number field inverse. AL is a nonzero element of Q(alpha) for some algebraic number alpha. M is the rational minimal polynomial for alpha. BL=1/AL. }

procedure AFNEG (AL: LIST): LIST; {Algebraic number field element negation. AL is an element of Q(alpha) for some algebraic number alpha. BL= -AL. }

procedure AFPROD (M,AL,BL: LIST): LIST; {Algebraic number field element product. AL and BL are elements of Q(alpha) for some algebraic number alpha. M is the minimal polynomial of alpha. CL=AL+BL. }

procedure AFQ (M,AL,BL: LIST): LIST; {Algebraic number field quotient. AL and BL are elements of Q(alpha) for some algebraic number alpha with BL nonzero. M is the minimal polynomial for alpha. CL=AL/BL. }

procedure AFSIGN (M,I,AL: LIST): LIST; {Algebraic number field sign. M is the integral minimal polynomial of a real algebraic number alpha. I is an acceptable isolating interval for alpha. AL is an element of Q(alpha). SL=SIGN(AL). }

procedure AFSUM (AL,BL: LIST): LIST; {Algebraic number field element sum. AL and BL are elements of Q(alpha) for some algebraic number alpha. CL=AL+BL. }

procedure RUPMRN (R: LIST): LIST; {Rational univariate polynomial minimal polynomial of a rational number. R is a rational number. M is the rational minimal polynomial of R. }

100 CHAPTER 9. SAC RING ALGORITHMS

9.2 SAC Extensions 1

procedure LCONC (L: LIST): LIST; {List concatenation. L is a list (L sub 1 , ..., L sub n ), n ge 0, such that each L sub i is a list. M eq CONC(L sub 1 , ..., L sub n ). The lists L sub 1 , ..., L sub n are modified. } procedure LEQUAL (A,B: LIST): LIST; {List equality. A eq (A sub 1 , ..., A sub m ), m ge 0, and B eq (B sub 1 , ..., B sub n ), n ge 0, are two lists. b eq 1 if for each a sub i there is at least one B sub j such that A sub i eq B sub j, and for each B sub j there is at least one A sub i with B sub j eq a sub i. otherwise b eq 0. } procedure LMERGE (A,B: LIST): LIST; {List merge. A and B are lists of objects. C is the result of merging A and B. }

9.3 SAC Extensions 2

procedure RNBCR (A,B: LIST; VAR M,N,KL: LIST); {Rational number binary common representation. A and B are binary rational numbers. If both A eq 0 and B eq 0, then M eq N eq K eq 0. If A eq 0, B ne 0, then M eq 0 and N and K are the unique integers such that B eq N cdot 2 sup k with N odd. If B eq 0, A ne 0, then N eq 0 and M and K are the unique integers such that A eq M cdot 2 sup K with M odd. If A ne 0 and B ne 0, then M,N, and K are the unique integers such that A eq M cdot 2 sup K and B eq N cdot 2 sup K with at least one of M and N odd. }

9.4 SAC Extensions 3

procedure CPLEXN (L: LIST; VAR I,M: LIST); {Cartesian product, lexicographically next. L eq (L sub 1 , L sub 2 , ..., L sub 2n ), n ge 1, is a list such that L sub 2i is a non-null list, and L sub 2i-1 is a non-null reductum of L sub 2i, for 1 le i le n. I is the element (first(L sub 1 ), first(L sub 3 ) , ..., first(L sub 2n-1 )) of the cartesian product of L sub 2 , L sub 4 , ..., L sub 2n. If I is not the last element (in the inverse lexicographic ordering) of this cartesian product, then M is a list (M sub 1 , M sub 2 , ..., M sub 2n ), with M sub 2i eq L sub 2i, M sub 2i-1 a non-null reductum of M sub 2i, for 1 le i le n, and (first(M sub 1 ), first(M sub 3 ) , ..., first(M sub 2n-1 )) the lexicographically next element. If I is the last element, then M eq (). the list L is modified. } procedure PERMCY (P: LIST): LIST; {Permutation, cyclic. P is a list (P sub 1 , P sub 2 , ..., P sub n ), n ge 0. PP eq (P sub 2 , P sub 3 , ..., P sub n , P sub 1 ). }

9.5 SAC Extensions 4

procedure IPINT (RL,A,BL: LIST): LIST; {Integral polynomial integration. A is a non-zero integral polynomial in r variables, r ge 1, such that the integral of a with respect to its main variable is an integral polynomial. b is an integral polynomial in r-1 variables. B eq B(x sub 1 , ..., x sub r ) is the integral of a with respect to its main variable, such that B(x sub 1 , ..., x sub r-1 ,0) eq b. }

9.6. SAC EXTENSIONS 5 101

procedure IUPIHT (A,NL: LIST): LIST; {Integral univariate polynomial integer homothetic transformation. A is a non-zero univariate integral polynomial. n is a non-zero integer. B(x) is the primitive part of A(nx). } procedure PCONST (RL,A: LIST): LIST; {Polynomial constant. A(x sub 1 , ..., x sub r ) is a polynomial in r variables, r ge 1. b eq 1 if a is a constant polynomial, otherwise b eq 0. } procedure PSDSV (RL,A,IL,NL: LIST): LIST; {Polynomial special decomposition, specified variable. A is a polynomial in r variables. 1 le i le r and n is a beta-integer such that each exponent of x sub i occurring in a is divisible by n. B is A with each exponent e of x sub i replaced by e/n. } procedure PUNT (RL,A: LIST): LIST; {Polynomial univariate test. A eq A(x sub 1 , ..., x sub r ) is a polynomial in r variables, r ge 1. b eq 2 if A has degree zero in all variables. b eq 1 if A has degree zero in x sub 2 , ..., x sub r, but positive degree in x sub 1. otherwise b eq 0. } procedure RPDMV (RL,A: LIST): LIST; {Rational polynomial derivative, main variable. A is a rational polynomial in r variables. B is the derivative of A with respect to its main variable. } procedure RPMAIP (RL,A: LIST): LIST; {Rational polynomial monic associate of integral polynomial. A is an integral polynomial in r variables, r ge 1. If A eq 0 then B eq 0. if A ne 0, let the integer a be the leading base coefficient of A. Then B eq (1/a) A, a monic rational polynomial. }

9.6 SAC Extensions 5

procedure IPCSFB (RL,A: LIST): LIST; {Integral polynomial coarsest squarefree basis. A eq (A sub 1 , ..., A sub n ), n ge 0, is a list of positive primitive integral polynomials in r variables, r ge 1, each of which is of positive degree in its main variable. B is a coarsest squarefree basis for A. } procedure IPDSCR (RL,A: LIST): LIST; {Integral polynomial discriminant. A is an integral polynomial in r variables, r ge 1, of degree greater than or equal to two in its main variable. B is the discriminant of A. } procedure IPLCPP (RL,A: LIST; VAR C,P: LIST); {Integral polynomial list of contents and primitive parts. A eq (A sub 1 , ..., A sub n ), n ge 0, is a list of integral polynomials in r variables, r ge 1. C eq (C sub 1 , ..., C sub s ), 0 le s le n, is a list such that for 1 le i le n, content(a sub i ) eq c sub j for some j, 1 le j le s, if and only if content(a sub i ) has positive degree in some variable. P eq (P sub 1 , ..., P sub m ), 0 le m le n, is a list such that for 1 le i le n, PP(A sub i ) eq P sub j for some j, 1 le j le m, if and only if PP(a sub i ) has positive degree in its main variable. } procedure IPPSC (RL,A,B: LIST): LIST; {Integral polynomial principal subresultant coefficients. A and B are integral polynomials in r variables, r ge 1, of positive degree in the main variable. P is a list of the principal subresultant coefficients of the second kind of A and B. } procedure IPSFBA (RL,A,B: LIST): LIST; {Integral polynomial squarefree basis augmentation. A is a primitive positive squarefree integral polynomial in r variables, r ge 1, of positive degree in its main variable. B eq (B sub 1 , ..., B sub s ), s ge 0, is a squarefree integral polynomial basis in r variables. BS is a coarsest squarefree basis for (A,B sub 1 , ..., B sub s ). } procedure ISPSFB (RL,A: LIST): LIST; {Integral squarefree polynomial squarefree basis. A eq (A sub 1 , ..., A sub n ), n ge 0, is a list of positive primitive squarefree integral polynomials in r variables,r ge 1, each of which is of positive degree in its main variable. B is a coarsest squarefree basis for A. } procedure IUPRC (A,B: LIST; VAR C,R: LIST); {Integral univariate polynomial resultant and cofactor. A and B are univariate integral polynomials of positive degree. R is the resultant of A and B. C is a univariate integral polynomial such that for some univariate integral polynomial D, AD+BC eq R. } procedure MUPRC (PL,A,B: LIST; VAR C,RL: LIST); {Modular univariate polynomial resultant and cofactor. p is a prime beta-digit. A and B are univariate polynomials over Z sub p of positive degree. R is the resultant of A and B, an element of Z sub p. C is a univariate polynomial over Z sub p such that for some univariate polynomial D over Z sub p, AD+BC eq R. }

9.7 SAC Extensions 6

procedure IPFSFB (RL,A: LIST): LIST; {Integral polynomial finest squarefree basis. A eq (A sub 1 , ..., A sub n ), n ge 0, is a list of positive primitive integral polynomials in r variables, r ge 1, each of which is of positive degree in its main variable. B is a finest squarefree basis for A. }

9.8 SAC Extensions 7

procedure IPRICL (A: LIST): LIST; {Integral polynomial real root isolation, Collins-Loos algorithm. A is an integral polynomial. L is a strong isolation list for A. } procedure IPRRII (A,AP,DL,LP: LIST): LIST; {Integral polynomial real root isolation induction. A is a primitive positive univariate integral polynomial of positive degree. AP is the derivative of A. D is a binary rational real root bound for A. LP is a strong isolation list for AP. L is a strong isolation list for A. } procedure IPRRRI (A,B,I,SL1,TL1: LIST): LIST; {Integral polynomial relative real root isolation. A and B are univariate integral polynomials. I is a left-open, right-closed interval (a sub 1 ,a sub 2 ) where al sub 1 and al sub 2 are binary rational numbers with al sub 1 lt al sub 2. A and B have unique roots, alpha and beta respectively, in I, each of odd multiplicity and with alpha ne beta. sl sub 1 eq sign(A(al sub 1 +)) and tl sub 1 eq sign(B(al sub 1 +)). is eq (al sub 1 sup * ,al sub 2 sup * ) is al left-open, right-closed subinterval of I with al sub 1 sup * and al sub 2 sup * binary rational numbers and al sub 1 sup * lt al sub 2 sup *, such that is contains alpha but not beta. } procedure IPSIFI (A,I: LIST): LIST; {Integral polynomial standard isolating interval from isolating interval. I is an interval with binary rational endpoints, which is either left-open and right-closed or a one-point interval. A is a univariate integral polynomial which has a unique root alpha of odd multiplicity in I. If I is

9.9. SAC MODULAR UNIVARIATE POLYNOMIAL FACTORIZATION 103

a one-point interval, then J=I. If I is left-open and right-closed, then J is either a standard leftopen and right-closed subinterval of I containing alpha, or if alpha is a binary rational number, J may possibly instead be the one-point interval ( alpha , alpha ). }

procedure ISFPIR (A,I,KL: LIST): LIST; {Integral squarefree polynomial isolating interval refinement. A is a squarefree univariate integral polynomial. I is an isolating interval for a real root alpha of A. k is a nonnegative beta -integer. J is a subinterval of I isolating alpha with length less than 10 sup -k. }

procedure IUPVOI (A,I: LIST): LIST; {Integral univariate polynomial, variations for open interval. A is a non-zero integral univariate polynomial. I is an open interval (a,b) with a and b binary rational numbers such that a lt b. Let t(z) be the transformation mapping the right half-plane onto the circle having I as diameter. Let B(X) eq A(t(X)). then v is the number of sign variations in the coefficients of B. }

9.9 SAC Modular Univariate Polynomial Factorization

procedure MCPMV (NL,L: LIST): LIST; {Matrix of coefficients of polynomials, with respect to main variable. L is a list (L(1), ...,L(k)) of k, ge 1, non-zero polynomials with degrees less than n. n is a positive beta-integer. M is the matrix with m(1,il)+m(2,i)*x+ ...+m(n,i)*x**(n-1)=L(i) for 1 le i le k. }

procedure MIUPSE (M,A,B,S,T,C: LIST; VAR U,V: LIST); {Modular integral univariate polynomial, solution of equation. M is a positive integer. A,B,S,T and C belong to Z sub M (x) with ldcf(A) a unit, deg(T) lt deg(A) and A*S+B*T=1. U and V are the unique elements of Z sub M (x) such that A*U+B*V=C, with deg(V) lt deg(A). }

procedure MUPBQP (PL,A: LIST): LIST; {Modular univariate polynomial Berlekamp q polynomials construction. p is a prime betainteger. A is a univariate polynomial over Z sub p with deg(A) ge 2. Q is the list (Q(0), ...,Q(n-1)), where Q(i)(x)= rem(x**(p*i),A(x)) and n=deg(A). }

procedure MUPDDF (PL,A: LIST): LIST; {Modular univariate polynomial distinct degree factorization. p is a prime beta-integer. A is a monic squarefree univariate polynomial over Z sub p, with deg(A) ge 2. L is a list ((n(1),A(1)), ... ,(n(k),A(k))) where each n(i) is a positive integer, n(1) lt n(2) lt ...lt n(k), and A(i) is the product of all irreducible monic factors of A of degree n(i). }

procedure MUPFBL (PL,A: LIST): LIST; {Modular univariate polynomial factorization-Berlekamp algorithm. p is a prime beta-integer. A is a monic squarefree univariate poly- nomial, with deg(A) ge 2. L is a list of all the monic irreducible factors of A of positive degree. }

procedure MUPFS (PL,A,B,DL: LIST): LIST; {Modular univariate polynomial factorization, special. p is a prime beta-integer. A is a monic squarefree polynomial in Z sub p(x),deg(A) ge 2. B is a list (B(1), ...,B(r)) of monic univariate polynomials over Z sub p, which constitute a basis for the space of all polynomials C of degree less than deg(A) such that A is a divisor of C**p-C. Further-more, B(1)=1. d is a positive beta-integer such that A has no irreducible factor of degree less than d. L is a list consisting of all the monic irreducible factors of A of positive degree. }

9.10 SAC Polynomial Factorization

procedure IPCEVP (RL,A: LIST; VAR B,L: LIST); {Integral polynomial, choice of evaluation points. A is an r-variate integral polynomial, squarefree in its main variable x, r ge 1. L is a list (l sub 1, ...,l sub r-1) of beta-integers, with L as small as possible in reverse lexicographic order with 0 lt 1 lt -1 lt 2 lt -2 lt ... such that deg sub x of A(x1, ...,x sub r-1,x)=deg sub x of A(l sub 1, ...,l sub r-1,x), and A(l sub 1, ...,l sub r-1,x) is the square- free univariate integral polynomial B. }

procedure IPFAC (RL,A: LIST; VAR SL,CL,L: LIST); {Integral polynomial factorization. A is a non-zero integral polynomial in r variables, r ge 1. s=sign(A). c is the integer content of A. L is a list ((e1,A1), ...,(ek,Ak)), k ge 0, where each ei is a positive integer, the Aips are the distinct positive irreducible integral factors of A, and A=s*c*(the product from i equal 1 to k of Ai**ei). }

procedure IPGFCB (RL,A: LIST): LIST; {Integral polynomial Gelfond factor coefficient bound. A is an integral polynomial in r variables, r gt 0. a=2**h*(the degree of A in xr) where h=the least integer greater than the sum from i=1 to r of the maximum of 0 and ((2*the i-th partial derivative of A)-1)/2. a is an integer. }

procedure IPIQH (RL,PL,D,AB,BB,SB,TB,M,C: LIST; VAR A,B: LIST); {Integral polynomial mod ideal quadratic Hensel lemma. D is a list of non-negative beta-integers (d sub 1, ...,d sub r-1), r ge 1. AB, BB, SB and TB belong to Z sub p (x sub 1, ...,x sub r-1,y)/(x sub 1 ** d sub 1, ...,x sub r-1 ** d sub r-1), with AB monic, AB*SB+BB*TB=1, deg sub y of AB gt 0 and p a prime beta-integer. C is an r-variate integral polynomial with AB*BB congruent to C. M, a positive integer, is equal to p**j for some positive integer j. A, B belong to Z sub M (x sub 1, ...,x sub r-1,y)/(x sub 1 ** d sub 1, ...,x sub r-1 ** d sub r-1), with A monic, A congruent to AB, B congruent to BB, deg sub y of A=deg sub y of AB, and A*B congruent to C. }

procedure ISFPF (RL,A: LIST): LIST; {Integral squarefree polynomial factorization. A is a positive integral polynomial in r variables, r ge 1, which with respect to its main variable is of positive degree, primitive, and squarefree. L is a list (A1, ...,Ak) of the distinct positive irreducible factors of A. }

procedure MIPISE (RL,M,D,A,B,S,T,C: LIST; VAR U,V: LIST); {Modular integral polynomial mod ideal, solution of equation. D is a list (d sub 1, ...,d sub r-1) of non-negative beta-integers, r ge 1. A, B, S, T and C belong to Z sub M (x sub 1, ...,x sub r-1,y)/(x sub 1 ** d sub 1, ...,x sub r-1 ** d sub r-1), with A monic and of positive degree in y, and A*S+B*T=1. U and V belong to Z sub M(x sub 1, ...,x sub r-1,y)/(x sub 1 ** d sub 1, ...,x sub r-1 ** d sub r-1) such that A*U+B*V=C, and deg sub y of V lt deg sub y of A. }

procedure MPIQH (RL,PL,D,AB,BB,SB,TB,M,DP,C: LIST; VAR A,B: LIST); {Modular polynomial mod ideal, quadratic Hensel lemma. p is a beta- prime. D and DP are lists of positive beta-integers of length r-1, r ge 1. AB, BB, SB, TB belong to Z sub p (x sub 1, ...,x sub r-1,y)/(x sub 1 ** d(1), ...,x sub r-1 ** d(r-1)), with AB monic, AB*SB+BB*TB=1, and deg sub y of AB gt 0. C is an r-variate integral polynomial, with AB* BB congruent to C. M, a positive integer, is equal to p**j for some positive integer j. A, b belong to Z sub M(x sub 1, ...,x sub r-1,y)/ (x sub 1 ** DP(1), ...,x sub rl-1 ** DP(r-1)), with A monic, A congruent to AB, B congruent to BB, deg sub y of A=deg sub y of AB, and A*B congruent to C. }

procedure MPIQHL (RL,PL,F,M,D,C: LIST): LIST; {Modular polynomial mod ideal quadratic Hensel lemma, list. C is an r-variate integral poly-

9.11. SAC POLYNOMIAL GCD AND RES SYSTEM 105

nomial. F is a list (f sub 1, ...,f sub m) of monic univariate polynomials of positive degree over Z sub p, with the product of the f sub i (x) similar to C(0, ...,0,x), and gcd(f sub i, f sub j)=1 for 1 le i lt j le m, p a beta-prime not dividing ldcf(C). M is a positive power of p. D is a list (d sub 1, ...,d sub r-1) of non-negative beta-integers. FP is a list (fp sub 1, ...,fp sub m) of monic polynomials in Z sub M (x sub 1, ...,x sub r-1,x)/(x sub 1 ** d sub 1, ...,x sub r-1 ** d sub r-1), with C similar to the product of the fp sub i, fp sub i congruent to f sub i, and deg sub x of fp sub i=deg sub x of f sub i, for 1 le i le m. }

procedure MPIQHS (RL,M,D,AB,BB,SB,TB,SL,NL,C: LIST; VAR A,B,S,T,DP: LIST); {Modular polynomial mod ideal, quadratic Hensel lemma on a single variable. M is a positive integer. D is a list of positive beta-integers (d sub 1, ...,d sub r-1), r ge 2. AB, BB, SB, TB belong to Z sub M(x sub 1, ...,x sub r-1,y)/(x sub 1 ** d sub 1, ...,x sub r-1 **d sub r-1). s is a positive integer lt r, and N is a non-negative beta-integer. C is an element of Z sub M ( x sub 1, ..., x sub r-1,yl). AB is monic. AB*SB+BB*TB=1, AB*BB is congruent to C, and deg sub y of AB gt 0. A, B, S, T belong to Z sub M(x sub 1, ...,x sub r-1,y)/(x sub 1 ** d sub 1, ...,S sub s-1 ** d sub s-1,x sub s ** n,x sub s+1 ** d sub s+1, ...,x sub r-1 ** d sub r-1), with A*S+B*T=1, deg sub y of A=deg sub y of AB, A monic, A*B congruent to C, and A congruent to AB, B congruent to BB, S congruent to SB, T congruent to TB. DP is a list of non-negative beta-integers (d sub 1, ...,d sub s-1,n,d sub s+1, ...,d sub r-1). }

9.11 SAC Polynomial GCD and RES System

procedure IPC (RL,A: LIST): LIST; {Integral polynomial content. A is an integral polynomial in r variables. C is the content of A. }

procedure IPCPP (RL,A: LIST; VAR C,AB: LIST); {Integral polynomial content and primitive part. A is an integral polynomial in r variables. C is the content of A and AB is the primitive part of A. }

procedure IPGCDC (RL,A,B: LIST; VAR C,AB,BB: LIST); {Integral polynomial greatest common divisor and cofactors. A and B are integral polynomials in r variables, r ge 0. C=GCD(A,B). If C is non-zero then AB=A/C and BB=B/C. Otherwise AB=0 and BB=0. }

procedure IPIC (RL,A: LIST): LIST; {Integral polynomial integer content. A is an integral polynomial in r variables. c is the integer content of A. }

procedure IPICPP (RL,A: LIST; VAR AL,AB: LIST); {Integral polynomial integer content and primitive part. A is an integral polynomial in r variables. a is the integer content of A. AB=A/a if A is non-zero and AB=0 if A=0. }

procedure IPICS (RL,A,CL: LIST): LIST; {Integral polynomial integer content subroutine. A is a non-zero integral polynomial in r variables. c is an integer. d is the greatest common divisor of c and the integer content of A. }

procedure IPIPP (RL,A: LIST): LIST; {Integral polynomial integer primitive part. A is an integral polynomial in r variables. If A ne 0 then AB=A/a where a is the integer content of A. If A=0 then AB=0. } procedure IPPGSD (RL,A: LIST): LIST; {Integral polynomial primitive greatest squarefree divisor. A is an integral polynomial in r variables. If A=0 then B=0. Otherwise B is the greatest squarefree divisor of the primitive part of A. }

procedure IPPP (RL,A: LIST): LIST; {Integral polynomial primitive part. A is an integral polynomial in r variables. AB is the primitive part of A. }

procedure IPRES (RL,A,B: LIST): LIST; {Integral polynomial resultant. A and B are integral polynomials in r variables, r ge 1, of positive degrees. C is the resultant of A and B with respect to the main variable, an integral polynomial in r-1 variables. }

procedure IPRPRS (RL,A,B: LIST): LIST; {Integral polynomial reduced polynomial remainder sequence. A and B are non-zero integral polynomials in r variables with deg(A) ge deg(B). S is the reduced polynomial remainder sequence of A and B. }

procedure IPSCPP (RL,A: LIST; VAR SL,C,AB: LIST); {Integral polynomial sign, content, and primitive part. A is an integral polynomial in R ge 1 variables. s is the sign of A, C is the content of A, and AB is the primitive part of A. }

procedure IPSF (RL,A: LIST): LIST; {Integral polynomial squarefree factorization. A is a positive pri- mitive integral polynomial in r variables of positive degree. L is the list ((e sub 1,A sub 1), ...,(e sub l,A sub l)) where A equal to the product of (A sub i)**(e sub i) for i = 1, ...,k is the squarefree factorization of A in which 1 le e sub 1 lt e sub 2 lt ... lt e sub k and each A sub i is a positive squarefree polynomial of positive degree. }

procedure IPSPRS (RL,A,B: LIST): LIST; {Integral polynomial subresultant polynomial remainder sequence. A and B are non-zero integral polynomials in r variables with deg(A) ge deg(B). S is the subresultant p.r.s. of the first kind of A and B. }

procedure IPSRP (RL,A: LIST; VAR AL,AB: LIST); {Integral polynomial similiar to rational polynomial. A is a rational polynomial in r variables, r ge 0. a is a rational number, and AB is an integral polynomial such that A=a*AB. If A eq 0 then a=AB=0. Otherwise AB is integer primitive and positive. }

procedure MPGCDC (RL,PL,A,B: LIST; VAR C,AB,BB: LIST); {Modular polynomial greatest common divisor and cofactors. p is a prime beta-integer. A and B are polynomials in r variables over Z sub p. C=gcd(A,B). If C is non-zero then AB=A/C and BB=B/C. Otherwise AB=0 and BB=0. }

procedure MPRES (RL,PL,A,B: LIST): LIST; {Modular polynomial resultant. p is a prime beta-digit. A and B are polynomials over Z sub p in r variables, r ge 1, of positive degree. C is the resultant of A and B, a polynomial over Z sub p in r-1 variables. }

procedure MPSPRS (RL,PL,A,B: LIST): LIST; {Modular polynomial subresultant polynomial remainder sequence. A and B are non-zero polynomials in r variables over Z sub p, p a prime beta-integer, with deg(A) ge deg(B). S is the subresultant p.r.s. of the first kind of A and B. }

9.11. SAC POLYNOMIAL GCD AND RES SYSTEM 107

procedure MPUC (RL,PL,A: LIST): LIST; {Modular polynomial univariate content. A is a polynomial in r variables, r ge 2, over Z sub p, p a prime beta-integer. c is the univariate content of A. }

procedure MPUCPP (RL,PL,A: LIST; VAR AL,AB: LIST); {Modular polynomial univariate content and primitive part. A is a polynomial in r variables, r ge 2, over Z sub p, p a prime beta-integer. a is the univariate content of A. AB=A/a if A is non-zero and AB=0 if A=0. }

procedure MPUCS (RL,PL,A,CL: LIST): LIST; {Modular polynomial univariate content subroutine. A is a non-zero polynomial in r variables, r ge 2, over Z sub p, p a prime beta-integer. c is a univariate polynomial over Z sub p. d is the greatest common divisor of c and the univariate content of A. }

procedure MPUPP (RL,PL,A: LIST): LIST; {Modular polynomial univariate primitive part. A is a polynomial in r variables, r ge 2, over Z sub p, p a prime beta-integer. If A is non-zero then AB=A/a where a is the univariate content of A. If A=0 then AB=0. }

procedure MUPEGC (PL,A,B: LIST; VAR C,U,V: LIST); {Modular univariate polynomial extended greatest common divisor. p is a prime beta-integer. A and B are univariate polynomials over Z sub p. C=gcd(A,B). A*U+B*V=C, and, if deg(A/C) gt 0, then deg(V) lt deg(A/C), else deg(V)=0. Similarly, if deg(B/C) gt 0, then deg(U) lt deg(B/C), else deg(U)=0. If A=0, U=0. If B=0, V=0. }

procedure MUPGCD (PL,A,B: LIST): LIST; {Modular univariate polynomial greatest common divisor. A and B are univariate polynomials over Z sub p, p a prime beta-integer. C=gcd(A,B). }

procedure MUPHEG (PL,A,B: LIST; VAR C,V: LIST); {Modular univariate polynomial half-extended greatest common divisor. p is a prime betainteger. A and B are univariate polynomials over Z sub p. C=gcd(A,B). There exists a polynomial U such that A*U+B*V=C, and, if deg(A/C) gt 0, then deg(V) lt deg(A/C). If deg(A/C)=0, deg(V) is also 0. If B=0, V=0. }

procedure MUPRES (PL,A,B: LIST): LIST; {Modular univariate polynomial resultant. p is a prime beta-digit. A and B are univariate polynomials over Z sub p of positive degrees. C is the resultant of A and B, an element of Z sub p. }

procedure MUPSFF (PL,A: LIST): LIST; {Modular univariate polynomial squarefree factorization. p is a prime beta-integer. A is a monic univariate polynomial over Z sub p of positive degree. L is a list ((i(1),A(1)), ...,(i(r),A(r))) with i(1) lt i(2) lt ... lt i(r), A(j) a monic squarefree factor of a of positive degree for 1 le j le r and A the product of A(j)**i(j) for j=1, ...,r. }

procedure RPBLGS (RL,A: LIST; VAR AL,BL,SL: LIST); {Rational polynomial base coefficients least common multiple, greatest common divisor, and sign. A is a rational polynomial in r variables, r ge 0. If A=0 then a=b=s=0. Otherwise, a is the lcm of the denominators of the base coefficients of A, b is the gcd of the numerators of the base coefficients of A, and s is the sign of the leading base coefficient of A. }

9.12 SAC Polynomial Real Root

procedure IIC (A,AP,I,L: LIST): LIST; {Isolating interval conversion. A is a squarefree univariate integral polynomial. AP is the derivative of A. I is an left open right closed interval (a,b) with binary rational endpoints represented by the list (a,b). L is a list of isolating intervals with binary rational end- points for the real roots of A in I. L=((a(1),b(1)), ...,(a(k),b(k))) with a(1) le b(1) le ... le a(k) le b(k) and (a(i), b(i)) represents the open interval (a(i),b(i)) if a(i) lt b(i), the closed interval (a(i),b(i)) if a(i)=b(i). LS is a list ((as(1),bs(1)), ...,(as(k),bs(k))) of isolating intervals for the same roots and satisfying the same conditions except that each pair (as(i),bs(i)) represents the left open right closed interval (as(i),bs(i)). } procedure IPFSD (RL,A: LIST): LIST; {Integral polynomial factorization, second derivative. A is a positive primitive integral polynomial in r variables of positive degree. L is a list (a(1), ...,a(k)) where k ge 1, A equal to sum of a(i) for i=1, ...,k and, for each i, a(i) is a positive primitive integral polynomial of positive degree with deg(a(i)) le 2 or gcd(a(i),app(i))=1 where app(i) is the second derivative of a(i). } procedure IPLRRI (L: LIST): LIST; {Integral polynomial list real root isolation. L is a non-empty list (A sub 1 , ..., A sub n ) of distinct univariate integral polynomials which are positive, of positive degree, squarefree, and pairwise relatively prime. M is a list (I sub 1 , B sub 1 , ..., I sub m , B sub m ), where I sub 1 lt I sub 2 lt ... lt I sub m are strongly disjoint isolating intervals for all of the real roots of A eq prod from (j eq 1) to n (A sub j). Each I sub i has binary rational number endpoints, and is either left-open and right-closed or is a one-point interval. B sub i is the unique A sub j which has a root in I sub i. } procedure IPRCH (A,I,KL: LIST): LIST; {Integral polynomial real root calculation, high precision. A is a univariate integral polynomial of positive degree. I is either the nulllist () or a standard interval or an interval whose positive and non-positive parts are standard. k is a gamma-integer. L is a list ((e(1),I(1)), ...,(e(r),I(r))) where the e(j) are beta-integers, 1 le e(1) le ... le e(r), and the I(j) are binary rational isolating intervals, I(j)=(a(j),b(j)), for the r distinct real roots of A if I=(), or for the r distinct real roots of A in I if I ne (). e(j) is the multiplicity of the root alpha(j) in I(j) and abs(b(j)-a(j)) le 2**k. I(j) is a left-open and right-closed interval if a(j) lt b(j), a one-point interval if a(j)=b(j). } procedure IPRCHS (A,I,KL: LIST): LIST; {Integral polynomial real root calculation, high-precision special. A is a positive, primitive, squarefree, univariate, integral polynomial of positive degrre with GCD(A,APP)=1. I is either the null list () or a standard interval or an interval whose positive and non-positive parts are standard. k is a gamma-integer. L is a list (I(1), ...,I(r)) of binary rational isolating intervals I(j)=(a(j),b(j)) for the r distinct real roots of A if I=(), for the r distinct real roots of A of I if I ne (), with b(j)-a(j) le 2**kl. I(j) is a left-open and right-closed interval if a(j) ne b(j), a one-point interval if a(j)=b(j). } procedure IPRCNP (A,I: LIST; VAR SLP,SLPP,J: LIST); {Integral polynomial real root calculation, newton method preparation. A is a positive, primitive, squarefree, univariate integral polynomial of positive degree. I is an open interval (a1,a2) with binary rational endpoints containing no roots of AP and APP. sp and spp, beta-integers, are the signs of AP and APP on I. J is a subinterval (b1,b2) of I with binary rational endpoints, containing alpha and such that spp*SIGN(AP(b1)+f*AP(b2)) ge 0, where f=(-3/4)**(sp*spp). J is a left-open and right-closed interval if b1 lt b2, the one-point interval if b1=b2. }

9.12. SAC POLYNOMIAL REAL ROOT 109

procedure IPRCN1 (A,I,SL,KL: LIST): LIST; {Integral polynomial real root calcuation, 1 root. A is a positive primitive univariate integral polynomial of positive degree. I is an open interval (a1,a2) with binary rational endpoints containing a unique root alpha of A and containing no roots of AP or APP. s, a beta-integer, is the sign of AP*APP on I. min(abs(AP(a1)),abs(AP(a2))) le (3/4)*max(abs(AP(a1)),abs(AP(a2))). k is a beta-integer. J is a subinterval of I of length 2**k or less containing alpha and with binary rational endpoints. } procedure IPRIM (A: LIST): LIST; {Integral polynomial real root isolation, modified Uspensky method. A is a non-zero squarefree univariate integral polynomial. L is a list (I sub 1 , ..., I sub r ) of strongly disjoint isolating intervals for all of the real roots of A with I sub 1 lt I sub 2 lt ... lt I sub r. Each I sub j has binary rational endpoints and is either left-open and right-closed or a one-point interval. } procedure IPRIMO (A,AP,I: LIST): LIST; {Integral polynomial real root isolation, modified Uspensky method, open interval. A is a univariate integral polynomial without multiple roots. AP is the derivative of A. I is an open interval (a,b) with binary rational endpoints, represented by the list (a,b), such that there are integers h and k for which a=h*2**k and b=(h+1)*2**k. L is a list (I(1), ...,I(r)) of isolating intervals for the real roots of A in I. Each I(j) is a left open right closed interval with binary rational endpoints and I(1) lt I(2) lt ... lt I(r). } procedure IPRIMS (A,AP,I: LIST): LIST; {Integral polynomial real root isolation, modified Uspensky method, standard interval. A is a univariate integral polynomial without multiple roots. AP is the derivative of A. I is a standard interval. L is a list (I(1), ...,I(r)) of isolating intervals for the real roots of A in I. Each interval I(j) is a left open right closed interval (a(j),b(j)) with binary rational endpoints and I(1) lt I(2) lt ... lt I(r). } procedure IPRIMU (A: LIST): LIST; {Integral polynomial real root isolation, modified Uspensky method, unit interval. A is a squarefree univariate integral polynomial. L is a list (I(1), ...,I(r)) of isolating intervals for all the roots of A in the left closed right open interval (0,1). Each I(j) is a pair (a(j),b(j)) of binary rational numbers, with 0 le a(1) le b(1) le ... le a(r) le b(r). If a(j)=b(j) then (a(j),b(j)) represents the one-point interval (a(j),b(j)). If a(j) lt b(j) then the pair (a(j),b(j)) represents the open interval (a(j),b(j)). } procedure IPRIU (A: LIST): LIST; {Integral polynomial real root isolation, Uspensky method. A is a non-zero squarefree univariate integral polynomial. L is a list of pairs ((a(1),b(1)), ...,(a(k),b(k))) representing isolating intervals forall of the real roots of A, with a(1) le b(1) le ... le a(k) le b(k). If a(i) lt b(i) then the pair (a(i),b(i)) represents the open interval (a(i),b(i)), while if a(i)=b(i) then it represents the closed one-point interval (a(i),b(i)). The a(i) and b(i) are rational numbers except that one may have a(1) equal to negative infinity, represented by -1/0, that is the pair (-1,0), and one may have b(k) equal to infinity, represented by 1/0. } procedure IPRIUP (A: LIST): LIST; {Integral polynomial real root isolation, Uspensky method, positive roots. A is a non-zero squarefree univariate integral polynomial. L is a list of pairs ((a(1),b(1)), ...,(a(k),b(k))) representing iso- lating intervals for the positive real roots of A, with a(1) le b(1) le ... le a(k) le b(k). If a(i) lt e(i) then the pair (a(i), b(i)) represents the open interval (a(i),b(i)) while if a(i)=b(i) then (a(i),b(i)) represents the closed one-point interval (a(i),b(i)). The a(i) and b(i) are rational numbers except thatone may have b(k) equal to infinity, represented by 1/0, that is, the pair (1,0). }

procedure IPRRLS (A1,A2,L1,L2: LIST; VAR LS1,LS2: LIST); {Integral polynomial real root list separation. A1 and A2 are univariate integral polynomials with no multiple real roots and with no common real roots. L1 and L2 are lists of isolating intervals for some or all of the real roots of A1 and A2, respectively. The intervals in L1 and L2 have binary rational endpoints, and are either left-open and right-closed or one-point intervals. Let L1 eq (I sub 1,1 , ..., I sub (1,r sub 1) ), L2 eq (I sub 2,1 , ..., I sub (2,r sub 2) ). Then I sub 1,1 lt I sub 1,2 lt ... lt I sub (1,r sub 1) and I sub 2,1 lt I sub 2,2 lt ... lt I sub (2,r sub 2) . L sub 1 sup * eq (I sub 1,1 sup * , ..., I sub (1,r sub 1) sup * ) and L sub 2 sup * eq (I sub 2,1 sup * , ..., I sub (2,r sub 2) sup * ), where I sub i,j sup * is a binary rational subinterval of I sub i,j containing the root of A sub i in I sub i,j. Each I sub 1,j sup * is strongly disjoint from each I sub 2,j sup *. }

procedure IPRRS (A1,A2,I1,I2: LIST; VAR IS1,IS2,SL: LIST); {Integral polynomial real root separation. A1 and A2 are squarefree univariate integral polynomials of positive degrees. I1 and I2 are intervals with binary rational number endpoints, each of which is either left-open and right-closed, or a one-point interval. I1 contains a unique root alpha sub 1 of A1, and I2 contains a unique root alpha sub 2 ne alpha sub 1 of A2. I sub 1 sup * and I sub 2 sup * are binary rational subintervals of I1 and I2 containing alpha sub 1 and alpha sub 2 respectively, with I sub 1 sup * and I sub 2 sup * strongly disjoint. If I1 is left-open and right-closed then so is I sub 1 sup *, and similarly for I2 and I sub 2 sup *. s eq -1 if I sub 1 sup * lt I sub 2 sup *, and s eq 1 if I sub 1 sup * gt I sub 2 sup *. }

procedure IPSFSD (RL,A: LIST): LIST; {Integral squarefree factorization, second derivative. A is a positive integral polynomial in r variables of positive degree L is a list ((e(1),A(1)), ...,(e(k),A(k))) where primitive part of A is equal to the sum of A(i)**e(i) for i=1, ...,k. The a(i) are pairwise relatively prime squarefree positive polynomials of positive degrees, with deg(A(i))=1 or GCD(A(i),APP(i))=1 for all i where APP(i) is the second derivative of A(i) and the e(i) are positive beta-integers e(1) le e(2) le ... le e(k). }

procedure IPSRM (A,I: LIST): LIST; {Integral polynomial strong real root isolation, modified Uspensky method. A is a univariate integral polynomial with multiple roots and with no real roots in common with APP. I is either the null list () or a standard interval or an interval whose positive and non-negative parts are standard. L is a list (I(1), ...,I(r)) of isolating intervals for all the real roots of A if I=(), or for all the real roots of A in I if I ne (). The intervals I(j) contain no roots of AP or APP, are left-open and right-closed, have binary rational endpoints, and satisfy I(1) lt I(2) lt ... lt I(r). }

procedure IPSRMS (A,I: LIST): LIST; {Integral polynomial strong real root isolation, modified Uspensky method, standard interval. A is a univariate integral polynomial with no multiple real roots and with no real roots in common with APP. I is a standard interval. L is a list (I(1), ...,I(r)) of isolating intervals for the roots of A in I. The intervals I(j) contain no roots of AP or APP, are left-open and right-closed, have binary rational endpoints, are subintervals of I, and satisfy I(1) lt I(2) lt ... lt I(r). }

procedure IPVCHT (A: LIST): LIST; {Integral polynomial variations after circle to half-plane transformation. A is a non-zero univariate integral polynomial. Let n=deg(A), AP(x)=(x**n)*A(1/x), B(x)=AP(x+1). k is the number of sign variations in the coefficients of B. }

9.13. SAC UNIVARIATE POLYNOMIAL FACTORIZATION 111

procedure IUPRB (A: LIST): LIST; {Integral univariate polynomial root bound. A is an integral poly- nomial of positive degree. b is a binary rational number which is a root bound for A. If A(x) is equal to the sum of a(i)*x(i)**i for i=0, ...,n, a(n) ne 0, then b is the smallest power of 2 such that 2*abs(a(n-k)/a(n))**(1/k) le b for 1 le k le n. If a(n-k)=0 for 1 le k le n then b=1. } procedure IUPRLP (A: LIST): LIST; {Integral univariate polynomial, root of a linear polynomial. A is an integral univariate polynomial of degree one. r is the unique rational number such that A(r)=0. } procedure IUPVAR (A: LIST): LIST; {Integral univariate polynomial variations. A is a non-zero uni- variate integral polynomial. n is the number of sign variations in the coefficients of A. } procedure IUPVSI (A,I: LIST): LIST; {Integral univariate polynomial, variations for standard interval. A is a non-zero integral univariate polynomial. I is a standard open interval. Let T(z) be the transformation mapping the right half-plane onto the circle having I as a diameter. Let B(x)=A(T(x)). Then v is the number of sign variations in the coefficients of B. } procedure RIB (RL,SL: LIST): LIST; {Rational interval bisection. r and s are binary rational numbers, r lt s. t is a binary rational number with r lt t lt s, defined as follows. Let h=floor(log2(s-r)) and let c be the least integer such that c*2**h gt r. Then t=c*2**h if c*2**h lt s and t=(2*c-1)*2**(h-1) otherwise. } procedure RILC (I,KL: LIST): LIST; {Rational interval length comparison. I is an interval (a,b) with rational endpoints, a le b. k is a gamma-integer. t=1 if b-a le 2**k and t=0 otherwise. } procedure RINT (I: LIST): LIST; {Rational interval normalizing transformation. I is a list (r,s) with rational endpoints and r lt s. IS is the list (rs,ss)= psi(r,s). }

9.13 SAC Univariate Polynomial Factorization

procedure IPFLC (RL,M,I,A,L,D: LIST): LIST; {Integral polynomial factor list combine. A is a non-constant primitive r-variate integral polynomial. M is a positive integer. I is a list (d sub 1, ...,d sub r - 1) of non-negative beta-digits. L is a list of monic factors of A modulo M, ((x sub 1)**(d sub 1), ... ,(x sub rl- 1)**(d sub r - 1)) such that if B is an integral factor of A, then H sub M,I (B) is an associate of some product of elements of L. D is either 0, or a characteristic set for the possible degrees of integral factors of A. LP is a list of the primitive irreducible integral factors of A. } procedure IUPFAC (A: LIST; VAR SL,CL,L: LIST); {Integral univariate polynomial factorization. A is a non-zero integral univariate polynomial. s=sign(A), c=cont(A). L is a list ((e1,A1), ...,(ek,Ak)), k ge 0, where each ei is a positive integer, e1 le e2 le ... le ek, each A i is an ir- reducible positive integral univariate polynomial, and A = s * c * the product of A i ** ei, 1 le i le k. } procedure IUPFDS (A: LIST; VAR PL,F,C: LIST); {Integral univariate polynomial factor degree set. A is a non-zero square-free integral polynomial. C is the intersection of the degree sets of factorizations over Z sub p for as many as NPFDS primes p (fewer only if SMPRM is exhausted or A is proved irredu- cible). C is represented as a characteristic set. p is the least examined prime in P which gave the smallest number of factors, and F is the distinct degree factorization of A over Z sub p, unless A is shown to be irreducible, in which case p=0, F=(). } procedure IUPQH (PL,AB,BB,SB,TB,M,C: LIST; VAR A,B: LIST); {Integral univariate polynomial quadratic Hensel lemma. AB, BB, SB, TB are univariate polynomials over Z sub p, p a prime beta-integer, with AB*SB+BB*TB=1, and deg(TB) lt deg(AB). C is a univariate integral polynomial with H sub p of C=AB*BB. M, a positive integer, is equal to p**j for some positive integer j. A and B are univariate polynomials over Z sub M, with H sub p of A=AB, H sub p of B=BB, ldcf(A)=ldcf(AB),deg(A)=deg(AB), and H sub M of C=A*B. } procedure IUPQHL (PL,F,M,C: LIST): LIST; {Integral univariate polynomial quadratic Hensel lemma, list. C is an integral univariate polynomial. F is a list (f sub 1, ...,f sub r) of monic polynomials in Z sub p (x) with H sub p of C similar to the product of the f sub i, and gcd(f sub i,f sub j)=1 for 1 le i lt j le r, p a beta-prime not dividing ldcf(C). M is a positive power of p. FP is a list (fp sub 1, ...,fp sub r) of monic polynomials in Z sub M (x) with H sub M of C similar to the product of the fp sub i, H sub p of fp sub i=f sub i and deg(fp sub i)=deg(f sub i), for 1 le i le r. } procedure IUSFPF (A: LIST): LIST; {Integral univariate squarefree polynomial factorization. A is an integral univariate squarefree polynomial which is positive, primitive and of positive degree. L is a list (A1, ...,Ak) of the positive irreducible factors of A. }

Non–commutative Algorithms

10.1 DIP Exterior Algebra

114 CHAPTER 10. NON–COMMUTATIVE ALGORITHMS

procedure COPYOB (A: LIST): LIST; {Copy object. A is an object. B is the copy of A. } procedure EIMWRT (A: LIST); {Exterior integral matrix write. A is an exterior integral matrix. A is written in the output stream. } procedure EIVABS (U: LIST): LIST; {Exterior integral vector absolute value. U is an exterior integral vector. V is the absolute value of U. } procedure EIVAPP (U: LIST): LIST; {Exterior integral vector absolute primitive part. U is an exterior integral vector. V is the absolute primitive part of U. } procedure EIVCPP (U: LIST; VAR V,VL: LIST); {Exterior integral vector content and primitive part. U is an exterior integral vector. v is the content and V is the primitive part of U. } procedure EIVEPR (U,V: LIST): LIST; {Exterior integral vector exterior product. U and V are exterior integral vectors. W is the exterior product of U and V. } procedure EIVFUP (A,PL: LIST): LIST; {Exterior integral vector from univariate integral polynomial with multiplication by power of main variable. A is an univariate integral polynomial. p is a beta-integer. B is the exterior integral vector from A(x)*(x**p). } procedure EIVILP (U,V: LIST): LIST; {Exterior integral vector inner left product. U and V are exterior integral vectors. W is the inner left product of U and V. } procedure EIVIP (A,BL: LIST): LIST; {Exterior integral vector integer product. A is an exterior integral vector, b is an integer, C=A*b. } procedure EIVIQ (A,BL: LIST): LIST; {Exterior integral vector integer quotient. A is an exterior integral vector, b is a nonzero integer, and b divides any coefficient of A. C=A/b. }

procedure EIVIRP (U,V: LIST): LIST; {Exterior integral vector inner right product. U and V are exterior integral vectors. W is the inner right product of U and V. }

procedure EIVNEG (U: LIST): LIST; {Exterior integral vector negative. U is an exterior integral vector. V is the negative of U. }

procedure EIVPP (U: LIST): LIST; {Exterior integral vector primitive part. U is an exterior integral vector. V is the primitive part of U. }

procedure EIVSIG (U: LIST): LIST; {Exterior integral vector sign. U is an exterior integral vector. s is the sign of U. }

procedure EIVSUM (U,V: LIST): LIST; {Exterior integral vector sum. U and V are exterior integral vectors. W is the sum of U and V. }

procedure EIVWRT (A: LIST); {Exterior integral vector write. A is an exterior integral vector. A is written in the output stream. }

procedure EXIDET (M: LIST): LIST; {Exterior integral matrix determinant. M is an exterior integral matrix. d is the determinant of A. }

procedure EXIDT2 (M: LIST): LIST; {Exterior integral matrix determinant 2. M is an exterior integral matrix. d is the determinant of A. }

procedure EXMHOM (M: LIST): LIST; {Exterior matrix homomorphism. M=(m1,... ,mn) is a vector of integral vectors mi, 0 le i le n. MS is a vector of exterior integral vectors, MS=(ms1,... ,msn). were msi=EXVHOM(mi). }

procedure EXVHOM (U,SL: LIST): LIST; {Exterior vector homomorphism. U=(u1,... ,un) is an integral vector of n components, 0 le n. s is the starting index for the exterior index list. V=(u1,(s),... ,un,(s+n)). }

procedure ITD (A: LIST): LIST; {Integer trailing digit. A is an integer, A = b mod beta. }

procedure IJACS (X,Y: LIST): LIST; {Integer Jacobi symbol algorithm. Y is an odd positive integer, X is an integer relatively prime to Y. s=(X/Y). }

procedure ILADDC (U,CL: LIST): LIST; {Index list addition of constant. U is an index list, c is a beta-integer. V=(u1+c, ...,un+c) where U=(u1, ...,un). n ge 0. }

procedure ILEXPR (U,V: LIST; VAR W,SL: LIST); {Index list exterior product. U, V and W are index lists. W is the exterior product of U and V. s is the sign of the exterior product. If s = 0 then W = (). }

procedure ILILPR (U,V: LIST; VAR W,SL: LIST); {Index list inner left product. U, V and W are index lists. W is the inner left product of U and V. s is the sign of the inner left product. If s = 0 then W = (). }

10.1. DIP EXTERIOR ALGEBRA 115

procedure ILINPR (U,V: LIST; VAR W,SL: LIST); {Index list inner product. U, V and W are index lists. W is the inner product of U and V, i.e. if U is contained in V then W is the complement of U in V, otherwise the sign of the inner product is set to zero. s is the sign of the inner product. } procedure ILIRPR (U,V: LIST; VAR W,SL: LIST); {Index list inner right product. U, V and W are index lists. W is the inner right product of U and V. s is the sign of the inner right product. if s = 0 then W = (). } procedure ILSCMP (U,V: LIST): LIST; {Index list strong compare. U=(u1,... ,un), V=(v1,... vm) are index lists with length n and m. t=1 if n gt m, t=-1 if n lt m. If n=m then t=0 if U=V, t=1 if U gt V, t=-1 if U lt V. } procedure ILWCMP (U,V: LIST): LIST; {Index list week compare. U=(u1,... ,un), V=(v1,... vm) are index lists. t=0 if U=V, t=1 if U gt V, t=-1 if U lt V. } procedure INDLST (RL,SL: LIST): LIST; {Index list. Starting with r and ending with s. } procedure INLWRT (U: LIST); {Index list write. U is an exterior index list. U is written in the output stream. } procedure IPSR (R: LIST): LIST; {Integral polynomial specified roots. R is a list of integers. A is an integral univariate polynomial with roots from R. } procedure IVHOM (U,IL,JL: LIST): LIST; {Integer vector homomorphism. U=(u1,(s),... ,un,(r)) is an exterior integral vector. i is the starting index for the integral vector and j is its ending index. V=(vi,... ,vj). } procedure IVRAND (KL,QL,NL: LIST): LIST; {Integer vector random. U is an random integer vector with n components, 0 le n, and the absolut value of each component is lt 2**k. q is a rational number qd/qn, with 0 lt qd le qn lt beta. So q is the propability that any particular component of V is not zero. } procedure KREISP (NL: LIST): LIST; {Kreisteilungs polynom. n is a beta-integer gt 1. A is an univariate integral polynomial. } procedure MDVHOM (ML,U: LIST): LIST; {Modular vector homomorphism. U is an integral vector. V is a modular vector. m is a beta-integer. } procedure MIRAND (KL,QL,NL,ML: LIST): LIST; {Matrix random. M is an integral matrix with n rows generated by IVRAND(k,q,m). } procedure POWSEV (PL,A: LIST): LIST; {Power of variable symmetric product with exterior vector. p is a beta-integer. A is an exterior vector. B is the symmetric product of x**p and A. } procedure UIPRES (A,B: LIST; VAR CL,KL: LIST); {Univariate integral polynomials resultant. A and B are univariate integral polynomials. c is the resultant of A and B. k is the degree of the common factor. } procedure UIPRS1 (A,B: LIST): LIST; {Univariate integral polynomials resultant 1. A and B are univariate integral polynomials. c is the resultant of A and B. } procedure UIPSIL (A,EL: LIST): LIST; {Univariate integral polynomial symmetric product with exterior index list. A is an univariate integral polynomial. e is an exterior index list. B is the symmetric product of A and e. } procedure UIPSIV (A,B: LIST): LIST; {Univariate integral polynomial symmetric product with exterior integral vector. A is an univariate integral polynomial. B is an exterior integral vector. C is the symmetric product of A and B. }

10.2 MAS Non-commutative

procedure DINPPR (T,A,B: LIST): LIST; {Distributive polynomial non-commutative product. A and B are distributive polynomials. T is a table of distributive polynomials specifying the non-commutative relations. C=A*B, the non-commutative product of A and B. The table T may be modified. } procedure DINPTL (T,EL,FL: LIST; VAR C,EP,FP: LIST); {Distributive polynomial non-commutative product table lookup. e and f are exponent vectors. T is a table of distributive polynomials specifying the non-commutative relations. C is the noncommutative product of x**es and x**fs. ep and fp are exponent vectors with es+ep=e and fs+fp=f. If e=es or f=fs then ep=() or fp=(). } procedure DINPTU (T,EL,FL,C: LIST); {Distributive polynomial non-commutative product table update. e and f are exponent vectors. T is a table of distributive polynomials specifying the non-commutative relations. C is a distributive rational polynomial. The relation e * f = C is added to T. T is modified. } procedure DINPEX (T,A,NL: LIST): LIST; {Distributive non-commutative polynomial exponentiation. A is a distributive rational polynomial, n is a non-negative beta- integer. T is a table of non-commutative relations. B=A**n. 0**0 is by definition a polynomial in zero variables. } procedure DINLRD (V,T: LIST): LIST; {Distributive non-commutative polynomial list read. V is a variable list. T is a table of noncommutative relations. A list of distributive non-commutative polynomials in r variables, where r=length(V), r ge 0, is read from the input stream. Any blanks preceding A are skipped. } procedure DINPRD (V,T: LIST): LIST; {Distributive non-commutative polynomial read. V is a variable list. T is a table on noncommutative relations. A distributive rational polynomial A in r variables, where r=length(V), r ge 0, is read from the input stream. Any blanks preceding A are skipped. } procedure EVZERO (RL: LIST): LIST; {Exponent vector zero. U is an exponent vector of length r, r ge 0 with all components zero. }

10.3 MAS Non-commutative Center

procedure DINCCO (T, A, B: LIST): LIST; {Distributive rational non-commutative polynomial commutator. A and B are distributive rational non-commutative polynomials. The commutator of A and B is returned. T is the relation table. } procedure DINCCP (T, E: LIST): LIST; {Distributive rational non-commutative polynomial center polynomial. E is a list of exponent

10.3. MAS NON-COMMUTATIVE CENTER 117

vectors. T is the relation table. A polynomial in the center of the ideal is returned. }

procedure DINCCPpre (T, E: LIST): LIST; {Distributive rational non-commutative polynomial center polynomial preparation. E is a list of exponent vectors. T is the relation table. A polynomial in the center of the polynomial ring is returned. }

procedure DILFEL (a, E: LIST): LIST; {Distributive polynomial list from exponent vector list. E is a list of exponent vectors. A list distributive polynomials with exponent vectors from E and coefficients equal to a is returned. }

procedure DINPTslT (T: LIST): BOOLEAN; {Distributive polynomial non-commutative product table strict lex test. T is a table of distributive polynomials specifying the non-commutative relations. It is tested if T is strict lexicographical, i.e. if Xj*Xi = cij Xi Xj + pij is a strict lexicographical commutator relation, then cij = 1 and pij ¡(inv lex) Xi Xj. }

procedure DINLMPG (T,i,F: LIST): LIST; {Distributive non-commutative left rational minimal polynomial for a G basis. F is a noncommutative left groebner basis. PP is the left minimal polynomial for the i-th variable for F. }

procedure DINLMPL (T,F: LIST): LIST; {Distributive non-commutative left rational minimal polynomial list for a G basis. F is a noncommutative left groebner basis. P is the list of left minimal polynomial for each variable for F. }

procedure EVGCD (U,V: LIST): LIST; {Exponent vector greatest common divisor. U=(UL1, ...,ULRL), V=(VL1, ...,VLRL) are exponent vectors of length r. W=(WL1, ...,WLRL) is the greatest common divisor of U and V. }

procedure EVLGTD (r,d,L: LIST): LIST; {Exponent vector list generate for total degree. r is the number of variables. L is a list of already generated exponent vectors. A list of exponent vectors up to total degree d (¿= 0) is returned. }

procedure EVLGIL (D: LIST): LIST; {Exponent vector list generate for inverse lexicographical sequence. D is a list of maximal degrees in the respective variable. A list of exponent vectors up to the maximal degrees is returned. }

procedure EVLINV (L,i,k: LIST): LIST; {Exponent vector list introduction of new variables. L is a list of exponent vectors. In each element of L k new variables are introduced after position i. The new list is returned. }

procedure EVTSZ (i,U: LIST): BOOLEAN; {Exponent vector test if starting with i zero exponents. }

procedure EVINV (U,i,k: LIST): LIST; {Exponent vector introduction of new variables. At position i in U k new variables are introduced. }

10.4 MAS Non-commutative Groebner Bases

procedure DINLNF (T,P,S: LIST): LIST; {Distributive non-commutative polynomial left normal form. P is a list of non zero polynomials in distributive rational representation in r variables. S is a distributive rational polynomial. R is a polynomial such that S is left reducible to R modulo P and R is in normalform with respect to P. T is a table of distributive polynomials specifying the non-commutative relations. } procedure DINLIS (T,P: LIST): LIST; {Distributive non-commutative polynomial list left irreducible set. P is a list of distributive rational polynomials, PP is the result of left reducing each p element of P modulo P-(p) until no further reductions are possible. T is a table of distributive polynomials specifying the noncommutative relations. } procedure DINLSP (T,A,B: LIST): LIST; {Distributive non-commutative polynomial left S-polynomial. A and B are rational polynomials in distributive representation. C is the left S-polynomial of A and B. T is a table of distributive polynomials specifying the non-commutative relations. } procedure DINLGB (T,P,TF: LIST): LIST; {Distributive non-commutative polynomials left Groebner base. P is a list of rational polynomials in distributive representation in r variables. PP is the left Groebner base of P. t is the trace flag. T is a table of distributive polynomials specifying the non-commutative relations. } procedure DINLGM (T,P: LIST): LIST; {Distributive non-commutative minimal ordered left Groebner base. P is a list of non zero rational polynomials in distributive representation in r variables, P is a left Groebner base. PP is the minimal normed and ordered left Groebner base. T is a table of distributive polynomials specifying the non-commutative relations. } procedure DIN1GB (T,P,TF: LIST): LIST; {Distributive non-commutative polynomials Groebner base. P is a list of rational polynomials in distributive representation in r variables. PP is the Groebner base of P. t is the trace flag. T is a table of distributive polynomials specifying the non-commutative relations. } procedure DINCGB (T,P,TF: LIST): LIST; {Distributive non-commutative polynomials Groebner base. P is a list of rational polynomials in distributive representation in r variables. PP is the Groebner base of P. t is the trace flag. T is a table of distributive polynomials specifying the non-commutative relations. }

Procedure Header to Module Index

120 CHAPTER 11. PROCEDURE HEADER TO MODULE INDEX

SACI : AADV(L: LIST; VAR AL,LP: LIST); MASSYM2 : ACOMP(A,B: LIST): LIST; SACSYM : ACOMP(A,B: LIST): LIST; MASSYM2 : ACOMP1(A,B: LIST): LIST; SACSYM : ACOMP1(A,B: LIST): LIST; MASSTOR : ADV(L: LIST; VAR a, LP: LIST); SACLIST : ADV2(L: LIST; VAR AL,BL,LP: LIST); SACLIST : ADV3(L: LIST; VAR AL1,AL2,AL3,LP: LIST); SACLIST : ADV4(L: LIST; VAR AL1,AL2,AL3,AL4,LP: LIST); SACANF : AFDIF(AL,BL: LIST): LIST; SACANF : AFINV(M,AL: LIST): LIST; SACANF : AFNEG(AL: LIST): LIST; SACANF : AFPROD(M,AL,BL: LIST): LIST; SACANF : AFQ(M,AL,BL: LIST): LIST; SACANF : AFSIGN(M,I,AL: LIST): LIST; SACANF : AFSUM(AL,BL: LIST): LIST; ALDPARSE : Aparse(): LIST MASAPF : APABS(A: LIST): LIST; MASAPF : APCMPR(A,B: LIST): LIST; MASAPF : APCOMP(ML,EL: LIST): LIST; MASAPF : APDIFF(A,B: LIST): LIST; MASAPF : APEXP(A,NL: LIST): LIST; MASAPF : APEXPT(A: LIST): LIST; MASAPF : APFINT(N: LIST): LIST; MASAPF : APFRN(A: LIST): LIST; MASAPF : APLG10(A: LIST): LIST; MASAPF : APMANT(A: LIST): LIST; MASAPF : APNEG(A: LIST): LIST; MASAPF : APNELD(A,B: LIST): LIST; MASAPF : APPI(): LIST; MASAPF : APPROD(A,B: LIST): LIST; MASAPF : APQ(A,B: LIST): LIST; MASAPF : APROOT(A,NL: LIST): LIST; MASAPF : APSHFT(B,EL: LIST): LIST; MASAPF : APSIGN(A: LIST): LIST; MASAPF : APSPRE(N: LIST); MASAPF : APSUM(A,B: LIST): LIST; MASAPF : APWRIT(A: LIST); MASF : ARCTAN(A: LIST): LIST; SACLIST : AREAD(): LIST; MASSYM : ARRAYDEC(A: LIST): LIST; MASSYM2 : ASSOC(AL,L: LIST): LIST; SACSYM : ASSOC(AL,L: LIST): LIST; MASSYM2 : ASSOCQ(AL,L: LIST): LIST; SACSYM : ASSOCQ(AL,L: LIST): LIST; SACCOMB : ASSPR(A: LIST; VAR PL,ML: LIST); MASSYM : ATOM(X: LIST): BOOLEAN; MASSYM2 : ATTRIB(L: LIST): LIST; SACSYM : ATTRIB(L: LIST): LIST; SACLIST : AWRITE(A: LIST); DIPC : BACKUB(); SACD : BITRAN(): LIST; MASBIOS : BKSP; MASBIOS : BLINES(N: GAMMAINT); MASLISPU : CallCompiled(F, PI: LIST; VAR PO: LIST; VAR fu: BOOLEAN); SACLIST : CCONC(L1,L2: LIST): LIST; MASSTOR : CELLS(): GAMMAINT; SACLIST : CINV(L: LIST): LIST; MASBIOS : CloseBIOS; DIPC : CLIN(): LIST; MASSTOR : CLOCK(): GAMMAINT; SACLIST : CLOUT(L: LIST); MASBIOSU : CLTIS(A: LIST); MASLISPU : Compiledf0(F: PROCF0; VAR S: ARRAY OF CHAR); MASLISPU : Compiledf1(F: ôæPROCF1; VAR S: ARRAY OF CHAR); MASLISPU : Compiledf2(F: PROCF2; VAR S: ARRAY OF CHAR); MASLISPU : Compiledf3(F: PROCF3; VAR S: ARRAY OF CHAR); MASLISPU : Compiledf4(F: PROCF4; VAR S: ARRAY OF CHAR); MASLISPU : Compiledp0(F: PROCP0; VAR S: ARRAY OF CHAR); MASLISPU : Compiledp1(F: PROCP1; VAR S: ARRAY OF CHAR); MASLISPU : Compiledp1v2(F: PROCP1V2; VAR S: ARRAY OF CHAR); MASLISPU : Compiledp1v3(F: PROCP1V3; VAR S: ARRAY OF CHAR); MASLISPU : Compiledp2(F: PROCP2; VAR S: ARRAY OF CHAR); MASLISPU : Compiledp2v2(F: PROCP2V2; VAR S: ARRAY OF CHAR); MASLISPU : Compiledp2v3(F: PROCP2V3; VAR S: ARRAY OF CHAR); MASLISPU : Compiledp3(F: PROCP3; VAR S: ARRAY OF CHAR); MASLISPU : Compiledp3v2(F: PROCP3V2; VAR S: ARRAY OF CHAR); MASLISPU : Compiledp3v3(F: PROCP3V3; VAR S: ARRAY OF CHAR); MASLISPU : CompSummary; MASREP : CopyRep(r: LIST): LIST; MASSTOR : COMP(a,L: LIST): LIST; SACLIST : COMP2(AL,BL,L: LIST): LIST; SACLIST : COMP3(AL1,AL2,AL3,L: LIST): LIST; SACLIST : COMP4(AL1,AL2,AL3,AL4,L: LIST): LIST; SACLIST : CONC(L1,L2: LIST): LIST; DIPE : COPYOB(A: LIST): LIST; MASLISP : COPYTOENV(V, EP: LIST; VAR ENV: LIST); MASF : COS(A: LIST): LIST; SACEXT3 : CPLEXN(L: LIST; VAR I,M: LIST); MASBIOS : CREAD(): GAMMAINT; MASBIOS : CREADB(): GAMMAINT; SACCOMB : CSFPAR(L: LIST): LIST; SACCOMB : CSINT(A,B: LIST): LIST; SACCOMB : CSSUB(A,B: LIST): LIST; SACCOMB : CSUN(A,B: LIST): LIST; MASBIOS : CUNIT(S: ARRAY OF CHAR): GAMMAINT; SACBIOS : CWRIT2(C1,C2: GAMMAINT); SACBIOS : CWRIT3(C1,C2,C3: GAMMAINT); SACBIOS : CWRIT4(C1,C2,C3,C4: GAMMAINT); SACBIOS : CWRIT5(C1,C2,C3,C4,C5: GAMMAINT); SACBIOS : CWRIT6(C1,C2,C3,C4,C5,C6: GAMMAINT); MASBIOS : CWRITE(C: GAMMAINT); SACCOMB : DAND(AL,BL: LIST): LIST; MASLISP : DCENV(E: LIST): LIST; MASLISPU : Declare(VAR X: LIST; VAR S: ARRAY OF CHAR); MASLISP : DECOFTAG(L: LIST): LIST; MASLISP : DEFE(X: LIST; VAR ENV: LIST): LIST; MASLISP : DEFF(X: LIST; VAR ENV: LIST): LIST; MASLISP : DEFM(X: LIST; VAR ENV: LIST): LIST; MASLISP : DEFMAP(X: LIST; VAR ENV: LIST): LIST; MASLISP : DEFPROC(X: LIST; VAR ENV: LIST): LIST; MASLISP : DEFRULE(X: LIST; VAR ENV: LIST): LIST; SACD : DEGCD(AL,BL: LIST; VAR CL,UL,VL: LIST); MASSTOR : DEQUE(L: LIST): LIST; SACD : DGCD(AL,BL: LIST): LIST; MASBIOS : DIBUFF; DIPDIM : DIDIMS(G,S,U,M: LIST): LIST; DIPRNGB : DIGBC3(B,PLI,PLJ,EL: LIST): LIST; DIPRNGB : DIGBC4(PLI,PLJ,EL: LIST): LIST; DIPRNGB : DIGBMI(P: LIST): LIST; DIPROOT : DIGBSI(P,T,A: LIST): LIST; DIPDIM : DIGBZT(S: LIST): LIST; DIPDEC0 : DIGFET(P,IL,JL: LIST): LIST; DIPDEC0 : DIGISM(P: LIST): LIST; DIPDEC0 : DIGISR(P: LIST): LIST; MASBIOS : DIGIT(C: GAMMAINT): BOOLEAN; DIPI : DIIFRP(A: LIST): LIST; DIPI : DIILFR(A: LIST): LIST; DIPI : DIILRD(V: LIST): LIST; DIPI : DIILWR(A,V: LIST); DIPI : DIIPAB(A: LIST): LIST; DIPI : DIIPCP(A: LIST; VAR CL,AP: LIST); DIPI : DIIPDF(A,B: LIST): LIST; DIPI : DIIPDM(A: LIST): LIST; DIPI : DIIPDR(A,IL: LIST): LIST; DIPI : DIIPEM(A,AL: LIST): LIST; DIPI : DIIPEV(A,IL,AL: LIST): LIST; DIPI : DIIPEX(A,NL: LIST): LIST; DIPI : DIIPHD(A,IL,NL: LIST): LIST; DIPI : DIIPIP(A,BL: LIST): LIST; DIPI : DIIPIQ(A,BL: LIST): LIST; DIPI : DIIPLS(A: LIST): LIST; DIPI : DIIPMN(A: LIST): LIST; DIPI : DIIPNG(A: LIST): LIST; DIPI : DIIPON(A: LIST): LIST; DIPI : DIIPPR(A,B: LIST): LIST; DIPI : DIIPPS(A,B: LIST): LIST; DIPI : DIIPQ(A,B: LIST): LIST; DIPI : DIIPQR(A,B: LIST; VAR Q,R: LIST); DIPI : DIIPRA(RL,KL,LL,EL: LIST): LIST; DIPI : DIIPRD(V: LIST): LIST; DIPI : DIIPSG(A: LIST): LIST; DIPI : DIIPSM(A,B: LIST): LIST; DIPI : DIIPSN(A: LIST): LIST; DIPI : DIIPSO(A: LIST): LIST; DIPI : DIIPSU(A,IL,B: LIST): LIST; DIPI : DIIPSV(A,B: LIST): LIST; DIPI : DIIPTM(A,HL: LIST): LIST; DIPI : DIIPTR(A,HL,IL: LIST): LIST; DIPI : DIIPWR(A,V: LIST); DIPI : DIIPWV(A: LIST); DIPI : DIIRAS(RL,KL,LL,EL,QL: LIST): LIST; DIPROOT : DIITNT(T: LIST): LIST; DIPROOT : DIITWR(TP,EPS: LIST); DIPC : DILBSO(A: LIST); DIPRNGB : DILCPL(P: LIST; VAR D,B: LIST); DIPDIM : DILDIM(G: LIST; VAR DL,S,M: LIST); MASNCC : DILFEL(a, E: LIST): LIST; DIPC : DILFPL(RL,A: LIST): LIST; DIPRNGB : DILUPL(PL,P,D,B: LIST): LIST; MASNCGB : DIN1GB(T,P,TF: LIST): LIST; MASNCC : DINCCO(T, A, B: LIST): LIST; MASNCC : DINCCP(T, E: LIST): LIST; MASNCC : DINCCPpre(T, E: LIST): LIST; MASNCGB : DINCGB(T,P,TF: LIST): LIST; MASNCGB : DINLGB(T,P,TF: LIST): LIST; MASNCGB : DINLGM(T,P: LIST): LIST; MASNCGB : DINLIS(T,P: LIST): LIST; MASNCC : DINLMPG(T,i,F: LIST): LIST; MASNCC : DINLMPL(T,F: LIST): LIST; MASNCGB : DINLNF(T,P,S: LIST): LIST; MASNC : DINLRD(V,T: LIST): LIST; MASNCGB : DINLSP(T,A,B: LIST): LIST; MASNC : DINPEX(T,A,NL: LIST): LIST; MASNC : DINPPR(T,A,B: LIST): LIST; MASNC : DINPRD(V,T: LIST): LIST; MASNC : DINPTL(T,EL,FL: LIST; VAR C,EP,FP: LIST); MASNCC : DINPTslT(T: LIST): BOOLEAN; MASNC : DINPTU(T,EL,FL,C: LIST); DIPDEC0 : DINTFE(T,IL,JL: LIST): LIST; DIPDEC0 : DINTSR(T: LIST): LIST; DIPDEC0 : DINTSS(T: LIST): LIST; DIPROOT : DINTWR(TP,EPS: LIST); DIPDEC0 : DINTZS(N: LIST): LIST; MASYMDIP : DIP2SYM(D: LIST): LIST; DIPC : DIPADM(A: LIST; VAR EL,FL,BL,B: LIST); DIPC : DIPADS(A,IL,SL: LIST; VAR EL,FL,BL,B: LIST); DIPC : DIPADV(A,IL: LIST; VAR EL,FL,BL,B: LIST); DIPC : DIPBSO(A: LIST); DIPC : DIPCMP(EL,A: LIST): LIST; DIPC : DIPDEG(A: LIST): LIST; DIPTOO : DIPDEM(A: LIST): LIST; DIPTOO : DIPDEV(A: LIST): LIST; DIPC : DIPDPV(A,SL,QL: LIST): LIST; DIPC : DIPERM(A,P: LIST): LIST; DIPC : DIPEVL(A: LIST): LIST; DIPC : DIPEVP(A,EL: LIST): LIST; DIPC : DIPEXC(A,ILP,JLP: LIST): LIST; DIPC : DIPFMO(AL,EL: LIST): LIST; DIPC : DIPFP(RL,A: LIST): LIST; DIPC : DIPINV(A,JL,KL: LIST): LIST; DIPC : DIPLBC(A: LIST): LIST; DIPC : DIPLDC(A: LIST): LIST; DIPTOO : DIPLDM(A: LIST): LIST; DIPIDEAL : DIPLDV(A,V: LIST): LIST; DIPC : DIPLM(L1,L2: LIST): LIST; DIPC : DIPLPM(A: LIST): LIST; DIPC : DIPLRS(A: LIST); DIPC : DIPMAD(A: LIST; VAR AL,EL,AP: LIST); DIPC : DIPMCP(AL,EL,A: LIST): LIST; DIPC : DIPMPM(A,PL: LIST): LIST; DIPC : DIPMPV(A,SL,PL: LIST): LIST; DIPC : DIPMRD(A: LIST): LIST; DIPC : DIPMST(A,AL,EL: LIST); DIPC : DIPNBC(A: LIST): LIST; DIPC : DIPNOV(A: LIST): LIST; DIPC : DIPRED(A: LIST): LIST; DIPC : DIPTBC(A: LIST): LIST; DIPC : DIPTCF(A: LIST): LIST; DIPC : DIPTCS(A,IL: LIST): LIST; DIPC : DIPTDG(A: LIST): LIST; MASYMDIP : DIPTODEF(T: LIST): LIST; DIPTOO : DIPTRM(A: LIST): LIST; DIPTOO : DIPTYP(A: LIST): LIST; DIPC : DIPUNT(A: LIST): LIST; DIPC : DIPUV(A: LIST): LIST; MASYMDIP : DIPVDEF(V: LIST): LIST; DIPTOO : DIPVOP(P,V: LIST; VAR PP,VP: LIST); DIPGCD : DIRFAC(P: LIST): LIST; DIPRN : DIRFIP(A: LIST): LIST; DIPRNGB : DIRGBA(PL,P,TF: LIST): LIST; DIPRNGB : DIRGBR(P,TF: LIST): LIST; DIPDEC0 : DIRGZS(VB,PB,W: LIST): LIST; DIPIDEAL : DIRLCT(A,B: LIST): LIST; DIPIDEAL : DIRLIP(PL,A,B: LIST): LIST; DIPRNGB : DIRLIS(P: LIST): LIST; DIPDEC0 : DIRLPD(A,VP: LIST): LIST; DIPIDEAL : DIRLPI(A,P,VP: LIST): LIST; DIPDEC0 : DIRLPW(A,V,L: LIST); DIPRN : DIRLRD(V: LIST): LIST; DIPRN : DIRLWR(A,V,S: LIST); DIPZ : DIRMPG(IL,F: LIST): LIST; DIPROOT : DIROWR(V,P,EPS: LIST); DIPRN : DIRPAB(A: LIST): LIST; DIPDEC0 : DIRPDA(A,VP: LIST): LIST; DIPRN : DIRPDF(A,B: LIST): LIST; DIPRN : DIRPDM(A: LIST): LIST; DIPRN : DIRPDR(A,IL: LIST): LIST; DIPRN : DIRPEM(A,AL: LIST): LIST; SYMMFU : DIRPES(RL: LIST): LIST; DIPRN : DIRPEV(A,IL,AL: LIST): LIST; DIPRN : DIRPEX(A,NL: LIST): LIST; MASYMDIP : DIRPFT(T, V: LIST): LIST; DIPRNGB : DIRPGB(P,TF: LIST): LIST; DIPRN : DIRPHD(A,IL,NL: LIST): LIST; DIPRN : DIRPLS(A: LIST): LIST; DIPRN : DIRPMC(A: LIST): LIST; DIPRN : DIRPMN(A: LIST): LIST; DIPRNGB : DIRPNF(P,S: LIST): LIST; DIPRN : DIRPNG(A: LIST): LIST; DIPRN : DIRPON(A: LIST): LIST; DIPRN : DIRPPR(A,B: LIST): LIST; DIPRN : DIRPQ(A,B: LIST): LIST; DIPRN : DIRPQR(A,B: LIST; VAR Q,R: LIST); DIPRN : DIRPRA(RL,KL,LL,EL: LIST): LIST; DIPRN : DIRPRD(V: LIST): LIST; DIPRN : DIRPRP(A,BL: LIST): LIST; DIPRN : DIRPRQ(A,BL: LIST): LIST; SYMMFU : DIRPSE(Q,U: LIST; VAR PL,V: LIST); DIPRN : DIRPSG(A: LIST): LIST; DIPRN : DIRPSM(A,B: LIST): LIST; DIPRN : DIRPSN(A: LIST): LIST; DIPRN : DIRPSO(A: LIST): LIST; DIPRNGB : DIRPSP(A,B: LIST): LIST; SYMMFU : DIRPSR(Q,PL: LIST; VAR P1,P2: LIST); DIPRN : DIRPSU(A,IL,B: LIST): LIST; DIPRN : DIRPSV(A,B: LIST): LIST; DIPRN : DIRPTM(A,HL: LIST): LIST; DIPRN : DIRPTR(A,HL,IL: LIST): LIST; DIPRN : DIRPWR(A,V,S: LIST); DIPRN : DIRPWV(A: LIST); DIPRN : DIRRAS(RL,KL,LL,EL,QL: LIST): LIST; DIPDEC0 : DITFZS(N: LIST): LIST; DIPDEC0 : DITSPL(T: LIST; VAR T0,T1: LIST); SACD : DLOG2(AL: LIST): LIST; DIPTOO : DMEVAD(A,E: LIST): LIST; MASLISP : DMIA(X: LIST; VAR ENV: LIST): LIST; SACDPOL : DMPPRD(RL,ML,A,B: LIST): LIST; SACDPOL : DMPSUM(RL,ML,A,B: LIST): LIST; SACDPOL : DMUPNR(PL,A,B: LIST): LIST; SACCOMB : DNIMP(AL,BL: LIST): LIST; SACCOMB : DNOT(AL: LIST): LIST; MASU : DoParse(): LIST; MASU : DoWrite(Y: LIST); SACCOMB : DOR(AL,BL: LIST): LIST; MASBIOSU : DOS(A: LIST): LIST; MASGEM : DOS(s: ARRAY OF CHAR): INTEGER; SACD : DPCC(AL1,AL2: LIST; VAR UL,ULP,VL,VLP: LIST); SACDPOL : DPFP(RL,A: LIST): LIST; SACPRIM : DPGEN(ML, K: LIST): LIST; SACD : DPR(AL,BL: LIST; VAR CL,DL: LIST); SACD : DQR(AL1,AL0,BL: LIST; VAR QL,RL: LIST); SACD : DRAN(): LIST; SACD : DRANN(): LIST; MASLISP : DSPEC(X: LIST; VAR ENV: LIST): LIST; SACD : DSQRTF(AL: LIST; VAR BL,TL: LIST); MASLISP : ECENV(ENV: LIST): LIST; MASBIOSU : EDIT(A: LIST): LIST; MASGEM : EDIT(s: ARRAY OF CHAR): INTEGER; DIPE : EIMWRT(A: LIST); DIPE : EIVABS(U: LIST): LIST; DIPE : EIVAPP(U: LIST): LIST; DIPE : EIVCPP(U: LIST; VAR V,VL: LIST); DIPE : EIVEPR(U,V: LIST): LIST; DIPE : EIVFUP(A,PL: LIST): LIST; DIPE : EIVILP(U,V: LIST): LIST; DIPE : EIVIP(A,BL: LIST): LIST; DIPE : EIVIQ(A,BL: LIST): LIST; DIPE : EIVIRP(U,V: LIST): LIST; DIPE : EIVNEG(U: LIST): LIST; DIPE : EIVPP(U: LIST): LIST; DIPE : EIVSIG(U: LIST): LIST; DIPE : EIVSUM(U,V: LIST): LIST; DIPE : EIVWRT(A: LIST); MASSYM : ELEMP(X: LIST): BOOLEAN; MASSTOR : EMPTYQUE(M: LIST): BOOLEAN; MASSTOR : ENQUE(a,L: LIST); MASSYM2 : ENTER(L: LIST): LIST; SACSYM : ENTER(L: LIST): LIST; DIPC : EPREAD(): LIST; SACLIST : EQUAL(AL,BL: LIST): LIST; MASSTOR : ErrorHandler(a: P0): GAMMAINT; MASSTOR : ERROR(a: GAMMAINT; s: ARRAY OF CHAR); MASSPEC : EVALUATE(X: LIST; VAR ENV: LIST): LIST; SYMMFU : EVASC(U: LIST): LIST; DIPC : EVCADD(U,IL,EL: LIST; VAR V,FL: LIST); DIPC : EVCOMP(U,V: LIST): LIST; DIPC : EVCSUB(U,IL,EL: LIST; VAR V,FL: LIST); DIPC : EVDEL(U,IL: LIST; VAR V,EL: LIST); DIPC : EVDER(U,IL,EL: LIST; VAR V,FL: LIST); DIPC : EVDFSI(U,V: LIST; VAR W,SL: LIST); DIPC : EVDIF(U,V: LIST): LIST; DIPC : EVDOV(U: LIST): LIST; DIPC : EVEXC(U,IL,JL: LIST): LIST; DIPDIM : EVGBIT(S,G: LIST): LIST; MASNCC : EVGCD(U,V: LIST): LIST; DIPC : EVIGLC(U,V: LIST): LIST; DIPC : EVILCI(U,V: LIST): LIST; DIPC : EVILCP(U,V: LIST): LIST; MASNCC : EVINV(U,i,k: LIST): LIST; DIPC : EVITDC(U,V: LIST): LIST; DIPC : EVLCM(U,V: LIST): LIST; DIPC : EVLFCP(L,U,V: LIST): LIST; MASNCC : EVLGIL(D: LIST): LIST; MASNCC : EVLGTD(r,d,L: LIST): LIST; MASNCC : EVLINV(L,i,k: LIST): LIST; DIPC : EVMT(U,V: LIST): LIST; DIPC : EVNNZE(U: LIST): LIST; DIPRNGB : EVPLM(L1,L2: LIST): LIST; DIPRNGB : EVPLSO(A: LIST): LIST; DIPC : EVRAND(RL,KL: LIST): LIST; DIPC : EVRASP(RL,KL,QL: LIST): LIST; DIPC : EVSIGN(U: LIST): LIST; DIPC : EVSU(U,IL,FL: LIST; VAR V,EL: LIST); DIPC : EVSUM(U,V: LIST): LIST; DIPC : EVTDEG(U: LIST): LIST; MASNCC : EVTSZ(i,U: LIST): BOOLEAN; MASNC : EVZERO(RL: LIST): LIST; DIPE : EXIDET(M: LIST): LIST; DIPE : EXIDT2(M: LIST): LIST; DIPE : EXMHOM(M: LIST): LIST; MASF : EXPF(A: LIST): LIST; MASSYM2 : EXPLOD(S: LIST): LIST; SACSYM : EXPLOD(S: LIST): LIST; MASLISP : EXTENDENV(A, X: LIST; VAR ENV: LIST): BOOLEAN; SACLIST : EXTENT(AL: LIST): LIST; DIPE : EXVHOM(U,SL: LIST): LIST; MASF : FEXP(F, N: MFLOAT): MFLOAT; MASF : FFGI(N: GAMMAINT): MFLOAT; MASF : FFINT(N: LIST): MFLOAT; MASF : FFRN(A: LIST): MFLOAT; MASSTOR : FIRST(L: LIST): LIST; SACLIST : FIRST2(L: LIST; VAR AL,BL: LIST); SACLIST : FIRST3(L: LIST; VAR AL1,AL2,AL3: LIST); SACLIST : FIRST4(L: LIST; VAR AL1,AL2,AL3,AL4: LIST); MASF : FLOG10(F: MFLOAT): MFLOAT; MASREP : ForEachinList(r, f, E: LIST): LIST; MASREP : ForEachinRep(r, f, E: LIST): LIST; SACLIST : FOURTH(L: LIST): LIST; SACPRIM : FRESL(NL: LIST; VAR ML,L: LIST); SACPRIM : FRLSM(ML,AL: LIST): LIST; MASREP : FullRep(r: LIST): LIST; DIPROOT : GBZSET(V,PP,EPS: LIST); SACPRIM : GDPGEN(ML: LIST; KL: INTEGER): LIST; MASREP : GetRep(n,r: LIST): LIST; MASSYM : GENARRAY(A: LIST): LIST; MASSYM : GENINDEX(A: LIST): LIST; MASLISP : GENPL(P,V,T,D: LIST): LIST; MASSTOR : GENPROCESS(P: PROC; VAR S: ADDRESS; n: BOOLEAN); MASSYM2 : GENSYM(): LIST; SACSYM : GENSYM(): LIST; MASLISP : GENTE(Z,N,D: LIST): LIST; MASSYM2 : GET(S,AL: LIST): LIST; SACSYM : GET(S,AL: LIST): LIST; MASBIOS : GREAD(): GAMMAINT; MASBIOS : GWRITE(a: GAMMAINT); DIPTOO : HDIFDI(A: LIST; VAR B,FL: LIST); DIPIPOL : HIPRAN(RL,KL,QL,NL: LIST): LIST; SACI : IABSF(A: LIST): LIST; SACCOMB : IBCIND(A,NL,KL: LIST): LIST; SACCOMB : IBCOEF(NL,KL: LIST): LIST; SACCOMB : IBCPS(NL,KL: LIST): LIST; SACI : ICOMP(A,B: LIST): LIST; SACI : IDEGCD(AL,BL: LIST; VAR CL,UL1,VL1,UL2,VL2: LIST); SACI : IDIF(A,B: LIST): LIST; SACI : IDIPR2(A,B,AL,BL: LIST): LIST; SACI : IDP2(A,KL: LIST): LIST; SACI : IDPR(A,BL: LIST): LIST; SACI : IDQ(A,BL: LIST): LIST; SACI : IDQR(A,BL: LIST; VAR Q,RL: LIST); SACI : IDREM(A,BL: LIST): LIST; SACI : IEGCD(AL,BL: LIST; VAR CL,UL1,VL1: LIST); SACI : IEVEN(A: LIST): BOOLEAN; SACI : IEXP(A,NL: LIST): LIST; SACPRIM : IFACT(NL: LIST): LIST; SACCOMB : IFACTL(NL: LIST): LIST; SACI : IFCL2(AL: LIST; VAR ML,NL: LIST); MASF : IFF(F: MFLOAT): LIST; DIPRF : IFWRIT(R,V: LIST); SACI : IGCD(A,B: LIST): LIST; SACI : IGCDCF(A,B: LIST; VAR C,AB,BB: LIST); SACI : IHEGCD(A,B: LIST; VAR C,V: LIST); SACROOT : IIC(A,AP,I,L: LIST): LIST; DIPE : IJACS(X,Y: LIST): LIST; LinAlgI : IKM(A, B : LIST): LIST; DIPE : ILADDC(U,CL: LIST): LIST; SACI : ILCM(A,B: LIST): LIST; SACI : ILCOMB(A,B,UL,VL: LIST): LIST; DIPE : ILEXPR(U,V: LIST; VAR W,SL: LIST); DIPE : ILILPR(U,V: LIST; VAR W,SL: LIST); DIPE : ILINPR(U,V: LIST; VAR W,SL: LIST); DIPE : ILIRPR(U,V: LIST; VAR W,SL: LIST); MASAPF : ILOG10(N: LIST): LIST; SACI : ILOG2(A: LIST): LIST; SACPRIM : ILPDS(NL,AL,BL: LIST; VAR PL,NLP: LIST); DIPE : ILSCMP(U,V: LIST): LIST; DIPE : ILWCMP(U,V: LIST): LIST; SACI : ILWRIT(L: LIST); SACI : IMAX(AL,BL: LIST): LIST; LinAlgI : IMDET(M : LIST): LIST; LinAlgI : IMDETL(M : LIST): LIST; LinAlgI : IMDIF(A, B : LIST): LIST; LinAlgI : IMFRNM(A : LIST): LIST; LinAlgI : IMFRNM1(A, B : LIST; VAR C, D: LIST); LinAlgI : IMGE(M : LIST): LIST; LinAlgI : IMGELUD(M : LIST; VAR L, U: LIST); SACI : IMIN(AL,BL: LIST): LIST; LinAlgI : IMLT(L, b : LIST): LIST; LinAlgI : IMMAX(M : LIST): LIST; SACI : IMP2(A,HL: LIST): LIST; SACPRIM : IMPDS(NL,AL,BL: LIST; VAR PL,QL: LIST); LinAlgI : IMPROD(A, B : LIST): LIST; LinAlgI : IMSDS(L, U, b : LIST): LIST; LinAlgI : IMSUM(A, B : LIST): LIST; LinAlgI : IMUNS(U : LIST): LIST; LinAlgI : IMUT(U, b : LIST): LIST; LinAlgI : IMWRITE(A : LIST); MASLOAD : InitExternals; MASLOADA : InitExternalsA; MASLOADB : InitExternalsB; MASLOADC : InitExternalsC; MASLOADD : InitExternalsD; MASYMDIP : InitExternalsI; MASLOADL : InitExternalsL; MASU : InitExternalsU(); DIPE : INDLST(RL,SL: LIST): LIST; SACI : INEG(A: LIST): LIST; DIPE : INLWRT(U: LIST); MASBIOSU : INP(A: LIST): LIST; MASSTOR : INV(L: LIST): LIST; SACI : IODD(A: LIST): BOOLEAN; SACI : IORD2(AL: LIST): LIST; SACIPOL : IPABS(RL,A: LIST): LIST; SACPGCD : IPC(RL,A: LIST): LIST; SACPFAC : IPCEVP(RL,A: LIST; VAR B,L: LIST); SACPGCD : IPCPP(RL,A: LIST; VAR C,AB: LIST); SACIPOL : IPCRA(M,ML,MLP,RL,A,AL: LIST): LIST; SACEXT5 : IPCSFB(RL,A: LIST): LIST; SACIPOL : IPDER(RL,A,IL: LIST): LIST; SACIPOL : IPDIF(RL,A,B: LIST): LIST; SACIPOL : IPDMV(RL,A: LIST): LIST; SACEXT5 : IPDSCR(RL,A: LIST): LIST; SACIPOL : IPEMV(RL,A,AL: LIST): LIST; SACIPOL : IPEVAL(RL,A,IL,AL: LIST): LIST; SACIPOL : IPEXP(RL,A,NL: LIST): LIST; SACPFAC : IPFAC(RL,A: LIST; VAR SL,CL,L: LIST); SACIPOL : IPFCB(V: LIST): LIST; SACUPFAC : IPFLC(RL,M,I,A,L,D: LIST): LIST; SACIPOL : IPFRP(RL,A: LIST): LIST; SACROOT : IPFSD(RL,A: LIST): LIST; SACEXT6 : IPFSFB(RL,A: LIST): LIST; SACPGCD : IPGCDC(RL,A,B: LIST; VAR C,AB,BB: LIST); SACPFAC : IPGFCB(RL,A: LIST): LIST; SACIPOL : IPGSUB(RL,A,SL,L: LIST): LIST; SACIPOL : IPHDMV(RL,A,KL: LIST): LIST; SACPGCD : IPIC(RL,A: LIST): LIST; SACPGCD : IPICPP(RL,A: LIST; VAR AL,AB: LIST); SACPGCD : IPICS(RL,A,CL: LIST): LIST; SACIPOL : IPIHOM(RL,D,A: LIST): LIST; SACEXT4 : IPINT(RL,A,BL: LIST): LIST; SACIPOL : IPIP(RL,AL,B: LIST): LIST; SACPGCD : IPIPP(RL,A: LIST): LIST; SACIPOL : IPIPR(RL,D,A,B: LIST): LIST; SACIPOL : IPIQ(RL,A,BL: LIST): LIST; SACPFAC : IPIQH(RL,PL,D,AB,BB,SB,TB,M,C: LIST; VAR A,B: LIST); DIPGCD : IPLCM(RL,A,B: LIST): LIST; SACEXT5 : IPLCPP(RL,A: LIST; VAR C,P: LIST); SACROOT : IPLRRI(L: LIST): LIST; SACIPOL : IPMAXN(RL,A: LIST): LIST; SACIPOL : IPNEG(RL,A: LIST): LIST; SACIPOL : IPONE(RL,A: LIST): LIST; SACI : IPOWER(A,L: LIST; VAR B,NL: LIST); SACPGCD : IPPGSD(RL,A: LIST): LIST; SACPGCD : IPPP(RL,A: LIST): LIST; SACIPOL : IPPROD(RL,A,B: LIST): LIST; SACEXT5 : IPPSC(RL,A,B: LIST): LIST; SACIPOL : IPPSR(RL,A,B: LIST): LIST; SACIPOL : IPQ(RL,A,B: LIST): LIST; SACIPOL : IPQR(RL,A,B: LIST; VAR Q,R: LIST); SACIPOL : IPRAN(RL,KL,QL,N: LIST): LIST; DIPIPOL : IPRAN(RL,KL,QL,N: LIST): LIST; SACROOT : IPRCH(A,I,KL: LIST): LIST; SACROOT : IPRCHS(A,I,KL: LIST): LIST; SACROOT : IPRCN1(A,I,SL,KL: LIST): LIST; SACROOT : IPRCNP(A,I: LIST; VAR SLP,SLPP,J: LIST); SACIPOL : IPREAD( VAR RL,A,V: LIST); SACPGCD : IPRES(RL,A,B: LIST): LIST; SACEXT7 : IPRICL(A: LIST): LIST; SACROOT : IPRIM(A: LIST): LIST; SACROOT : IPRIMO(A,AP,I: LIST): LIST; SACROOT : IPRIMS(A,AP,I: LIST): LIST; SACROOT : IPRIMU(A: LIST): LIST; SACROOT : IPRIU(A: LIST): LIST; SACROOT : IPRIUP(A: LIST): LIST; SACI : IPROD(A,B: LIST): LIST; MASI : IPROD(A,B: LIST): LIST; SACI : IPRODK(A,B: LIST): LIST; SACPGCD : IPRPRS(RL,A,B: LIST): LIST; SACEXT7 : IPRRII(A,AP,DL,LP: LIST): LIST; SACROOT : IPRRLS(A1,A2,L1,L2: LIST; VAR LS1,LS2: LIST); SACEXT7 : IPRRRI(A,B,I,SL1,TL1: LIST): LIST; SACROOT : IPRRS(A1,A2,I1,I2: LIST; VAR IS1,IS2,SL: LIST); SACPGCD : IPSCPP(RL,A: LIST; VAR SL,C,AB: LIST); SACPGCD : IPSF(RL,A: LIST): LIST; SACEXT5 : IPSFBA(RL,A,B: LIST): LIST; SACROOT : IPSFSD(RL,A: LIST): LIST; SACEXT7 : IPSIFI(A,I: LIST): LIST; SACIPOL : IPSIGN(RL,A: LIST): LIST; SACIPOL : IPSMV(RL,A,B: LIST): LIST; SACPGCD : IPSPRS(RL,A,B: LIST): LIST; DIPE : IPSR(R: LIST): LIST; SACROOT : IPSRM(A,I: LIST): LIST; SACROOT : IPSRMS(A,I: LIST): LIST; SACPGCD : IPSRP(RL,A: LIST; VAR AL,AB: LIST); SACIPOL : IPSUB(RL,A,IL,B: LIST): LIST; SACIPOL : IPSUM(RL,A,B: LIST): LIST; SACIPOL : IPSUMN(RL,A: LIST): LIST; SACIPOL : IPTPR(RL,D,A,B: LIST): LIST; SACIPOL : IPTRAN(RL,A,T: LIST): LIST; SACIPOL : IPTRMV(RL,A,HL: LIST): LIST; SACIPOL : IPTRUN(RL,D,A: LIST): LIST; SACROOT : IPVCHT(A: LIST): LIST; SACIPOL : IPWRIT(RL,A,V: LIST); SACI : IQ(A,B: LIST): LIST; SACI : IQR(A,B: LIST; VAR Q,R: LIST); SACI : IRAND(NL: LIST): LIST; SACI : IREAD(): LIST; SACI : IREM(A,B: LIST): LIST; SACI : IROOT(A,NL: LIST; VAR B,TL: LIST); SACI : ISEG(A,NL: LIST; VAR A1,A0: LIST); SACPFAC : ISFPF(RL,A: LIST): LIST; SACEXT7 : ISFPIR(A,I,KL: LIST): LIST; SACI : ISIGNF(A: LIST): LIST; LinAlgI : ISMPROD(A, B : LIST): LIST; SACPRIM : ISPD(NL: LIST; VAR F,ML: LIST); SACEXT5 : ISPSFB(RL,A: LIST): LIST; SACPRIM : ISPT(ML,MLP,F: LIST): LIST; SACI : ISQRT(A: LIST; VAR B,TL: LIST); SACI : ISSUM(NL,L: LIST): LIST; SACI : ISUM(A,B: LIST): LIST; DIPE : ITD(A: LIST): LIST; SACI : ITRUNC(A,NL: LIST): LIST; LinAlgI : IUM(m, n : LIST): LIST; SACIPOL : IUPBEI(A,CL,ML: LIST): LIST; SACIPOL : IUPBES(A,AL: LIST): LIST; SACIPOL : IUPBHT(A,KL: LIST): LIST; SACIPOL : IUPBRE(A,AL: LIST): LIST; SACIPOL : IUPCHT(A: LIST): LIST; SACUPFAC : IUPFAC(A: LIST; VAR SL,CL,L: LIST); SACUPFAC : IUPFDS(A: LIST; VAR PL,F,C: LIST); SACEXT4 : IUPIHT(A,NL: LIST): LIST; SACIPOL : IUPNT(A: LIST): LIST; SACUPFAC : IUPQH(PL,AB,BB,SB,TB,M,C: LIST; VAR A,B: LIST); SACUPFAC : IUPQHL(PL,F,M,C: LIST): LIST; SACROOT : IUPRB(A: LIST): LIST; SACEXT5 : IUPRC(A,B: LIST; VAR C,R: LIST); SACROOT : IUPRLP(A: LIST): LIST; SACIPOL : IUPTPR(NL,A,B: LIST): LIST; SACIPOL : IUPTR(A,HL: LIST): LIST; SACIPOL : IUPTR1(A: LIST): LIST; SACROOT : IUPVAR(A: LIST): LIST; SACEXT7 : IUPVOI(A,I: LIST): LIST; SACROOT : IUPVSI(A,I: LIST): LIST; SACUPFAC : IUSFPF(A: LIST): LIST; LinAlgI : IVFRNV(A: LIST): LIST; LinAlgI : IVFRNV1(A, B : LIST; VAR C, D: LIST); DIPE : IVHOM(U,IL,JL: LIST): LIST; LinAlgI : IVLC(a, A, b, B : LIST): LIST; LinAlgI : IVMAX(M : LIST): LIST; DIPE : IVRAND(KL,QL,NL: LIST): LIST; LinAlgI : IVSPROD(A, B : LIST): LIST; LinAlgI : IVSQ(a, A: LIST): LIST; LinAlgI : IVSSUM(A : LIST): LIST; LinAlgI : IVSVPROD(A, B : LIST): LIST; LinAlgI : IVSVSUM(A, B : LIST): LIST; LinAlgI : IVVDIF(A, B : LIST): LIST; LinAlgI : IVVPROD(A, B : LIST): LIST; LinAlgI : IVVSUM(A, B : LIST): LIST; LinAlgI : IVWRITE(A : LIST); SACI : IWRITE(A: LIST); DIPDIM : IXSUBS(V,I: LIST): LIST; DIPE : KREISP(NL: LIST): LIST; MASLISP : LAMBDAP(S: LIST): BOOLEAN; SACLIST : LAST(L: LIST): LIST; SACSET : LBIBMS(L: LIST): LIST; SACSET : LBIBS(L: LIST); SACSET : LBIM(L1,L2: LIST): LIST; DIPTOO : LBLXCO(U,V: LIST): LIST; SACEXT1 : LCONC(L: LIST): LIST; SACLDIO : LDSMKB(A,BL: LIST; VAR XLS,N: LIST); SACLDIO : LDSSBR(A,BL: LIST; VAR XLS,N: LIST); SACLIST : LEINST(A,IL,AL: LIST): LIST; SACLIST : LELT(A,IL: LIST): LIST; MASSTOR : LENGTH(L: LIST): GAMMAINT; SACEXT1 : LEQUAL(A,B: LIST): LIST; SACLIST : LEROT(L,IL,JL: LIST): LIST; MASBIOS : LETTER(C: GAMMAINT): BOOLEAN; SACCOMB : LEXNEX(A: LIST): LIST; SACLIST : LINS(AL,L: LIST); SACLIST : LINSRT(AL,A: LIST): LIST; MASSTOR : LIST1(a: LIST): LIST; SACLIST : LIST10(AL1,AL2,AL3,AL4,AL5,AL6,AL7,AL8,AL9,AL10: LIST): LIST; SACLIST : LIST2(AL,BL: LIST): LIST; SACLIST : LIST3(AL1,AL2,AL3: LIST): LIST; SACLIST : LIST4(AL1,AL2,AL3,AL4: LIST): LIST; SACLIST : LIST5(AL1,AL2,AL3,AL4,AL5: LIST): LIST; MASBIOS : LISTS(VAR S: ARRAY OF CHAR): LIST; MASSTOR : LISTVAR(VAR L: LIST); SACEXT1 : LMERGE(A,B: LIST): LIST; MASF : LN(A: LIST): LIST; MASF : LOG(A: LIST): LIST; DIPC : LPERM(L,P: LIST): LIST; SACCOMB : LPERM(L,P: LIST): LIST; SACLIST : LREAD(): LIST; SACLIST : LSRCH(AL,A: LIST): LIST; SACLIST : LWRITE(L: LIST); SACLDIO : MAIPDE(RL,M: LIST): LIST; SACLDIO : MAIPDM(RL,M: LIST): LIST; SACLDIO : MAIPHM(RL,ML,A: LIST): LIST; SACLDIO : MAIPP(RL,A,B: LIST): LIST; MASELEM : MASABS(a: GAMMAINT): GAMMAINT; MASBIOS : MASCHR(C: GAMMAINT): CHAR; MASELEM : MASEVEN(a: GAMMAINT): BOOLEAN; MASELEM : MASEXP(a,b: GAMMAINT): GAMMAINT; MASELEM : MASMAX(a,b: GAMMAINT): GAMMAINT; MASELEM : MASMIN(a,b: GAMMAINT): GAMMAINT; MASELEM : MASODD(a: GAMMAINT): BOOLEAN; MASBIOS : MASORD(C: CHAR): GAMMAINT; MASBIOS : MASORDI(C: GAMMAINT): GAMMAINT; MASELEM : MASQREM(a,b: GAMMAINT; VAR q,r: GAMMAINT); MASELEM : MASREM(a,b: GAMMAINT): GAMMAINT; MASELEM : MASSIGN(a: GAMMAINT): GAMMAINT; SACMUFAC : MCPMV(NL,L: LIST): LIST; SACM : MDCRA(ML1,ML2,MLP1,AL1,AL2: LIST): LIST; SACM : MDDIF(ML,AL,BL: LIST): LIST; LinAlgRN : MDELCOL(M, i : LIST): LIST; SACM : MDEXP(ML,AL,NL: LIST): LIST; SACM : MDHOM(ML,A: LIST): LIST; LinAlgRN : MDIM(M : LIST): LIST; SACM : MDINV(ML,AL: LIST): LIST; SACM : MDLCRA(ML1,ML2,L1,L2: LIST): LIST; SACM : MDNEG(ML,AL: LIST): LIST; SACM : MDPROD(ML,AL,BL: LIST): LIST; SACM : MDQ(ML,AL,BL: LIST): LIST; SACM : MDRAN(ML: LIST): LIST; SACM : MDSUM(ML,AL,BL: LIST): LIST; DIPE : MDVHOM(ML,U: LIST): LIST; SACLIST : MEMBER(AL,L: LIST): LIST; MASSYM : MEMQ(AL,L: LIST): BOOLEAN; LinAlgRN : MFILL(M, m, n: LIST): LIST; LinAlgRN : MGET(M, k, l : LIST): LIST; SACLDIO : MIAIM(A: LIST): LIST; SACLDIO : MICINS(A,V: LIST): LIST; SACLDIO : MICS(A: LIST): LIST; SACM : MIDCRA(M,ML,MLP,A,AL: LIST): LIST; SACM : MIDIF(M,A,B: LIST): LIST; SACM : MIEXP(M,A,N: LIST): LIST; SACM : MIHOM(M,A: LIST): LIST; SACM : MIINV(M,A: LIST): LIST; SACM : MINEG(M,A: LIST): LIST; SACLDIO : MINNCT(A: LIST): LIST; SACMPOL : MIPDIF(RL,M,A,B: LIST): LIST; SACMPOL : MIPFSM(RL,M,A: LIST): LIST; SACMPOL : MIPHOM(RL,M,A: LIST): LIST; SACMPOL : MIPIPR(RL,M,D,A,B: LIST): LIST; SACPFAC : MIPISE(RL,M,D,A,B,S,T,C: LIST; VAR U,V: LIST); SACMPOL : MIPNEG(RL,M,A: LIST): LIST; SACMPOL : MIPPR(RL,M,A,B: LIST): LIST; SACMPOL : MIPRAN(RL,M,QL,N: LIST): LIST; SACM : MIPROD(M,A,B: LIST): LIST; SACMPOL : MIPSUM(RL,M,A,B: LIST): LIST; SACM : MIQ(M,A,B: LIST): LIST; SACM : MIRAN(M: LIST): LIST; DIPE : MIRAND(KL,QL,NL,ML: LIST): LIST; SACM : MISUM(M,A,B: LIST): LIST; SACMPOL : MIUPQR(M,A,B: LIST; VAR Q,R: LIST); SACMUFAC : MIUPSE(M,A,B,S,T,C: LIST; VAR U,V: LIST); SACLDIO : MMDDET(PL,M: LIST): LIST; SACLDIO : MMDNSB(PL,M: LIST): LIST; LinAlgRN : MMINOR(M, i, j : LIST): LIST; SACLDIO : MMPDMA(RL,PL,M: LIST): LIST; SACLDIO : MMPEV(RL,ML,A,KL,AL: LIST): LIST; SACMPOL : MMPIQR(RL,M,D,A,B: LIST; VAR Q,R: LIST); SACMPOL : MPDIF(RL,ML,A,B: LIST): LIST; SACMPOL : MPEMV(RL,ML,A,AL: LIST): LIST; SACMPOL : MPEVAL(RL,ML,A,IL,AL: LIST): LIST; SACMPOL : MPEXP(RL,ML,A,NL: LIST): LIST; SACPGCD : MPGCDC(RL,PL,A,B: LIST; VAR C,AB,BB: LIST); SACMPOL : MPHOM(RL,ML,A: LIST): LIST; SACMPOL : MPINT(PL,B,BL,BLP,RL,A,A1: LIST): LIST; SACPFAC : MPIQH(RL,PL,D,AB,BB,SB,TB,M,DP,C: LIST; VAR A,B: LIST); SACPFAC : MPIQHL(RL,PL,F,M,D,C: LIST): LIST; SACPFAC : MPIQHS(RL,M,D,AB,BB,SB,TB,SL,NL,C: LIST; VAR A,B,S,T,DP: LIST); SACMPOL : MPMDP(RL,PL,AL,B: LIST): LIST; SACMPOL : MPMON(RL,PL,A: LIST): LIST; SACMPOL : MPNEG(RL,ML,A: LIST): LIST; SACMPOL : MPPROD(RL,ML,A,B: LIST): LIST; SACMPOL : MPPSR(RL,PL,A,B: LIST): LIST; SACMPOL : MPQ(RL,PL,A,B: LIST): LIST; SACMPOL : MPQR(RL,PL,A,B: LIST; VAR Q,R: LIST); SACMPOL : MPRAN(RL,ML,QL,N: LIST): LIST; SACPGCD : MPRES(RL,PL,A,B: LIST): LIST; SACPGCD : MPSPRS(RL,PL,A,B: LIST): LIST; SACMPOL : MPSUM(RL,ML,A,B: LIST): LIST; SACPGCD : MPUC(RL,PL,A: LIST): LIST; SACPGCD : MPUCPP(RL,PL,A: LIST; VAR AL,AB: LIST); SACPGCD : MPUCS(RL,PL,A,CL: LIST): LIST; SACMPOL : MPUP(RL,ML,CL,A: LIST): LIST; SACPGCD : MPUPP(RL,PL,A: LIST): LIST; SACMPOL : MPUQ(RL,PL,A,BL: LIST): LIST; LinAlgRN : MRANG(U: LIST): LIST; LinAlgRN : MSET(M, k, l, x : LIST): LIST; LinAlgRN : MTRANS(M : LIST): LIST; SACMUFAC : MUPBQP(PL,A: LIST): LIST; SACMUFAC : MUPDDF(PL,A: LIST): LIST; SACMPOL : MUPDER(ML,A: LIST): LIST; SACPGCD : MUPEGC(PL,A,B: LIST; VAR C,U,V: LIST); SACMUFAC : MUPFBL(PL,A: LIST): LIST; SACMUFAC : MUPFS(PL,A,B,DL: LIST): LIST; SACPGCD : MUPGCD(PL,A,B: LIST): LIST; SACPGCD : MUPHEG(PL,A,B: LIST; VAR C,V: LIST); SACMPOL : MUPRAN(PL,NL: LIST): LIST; SACEXT5 : MUPRC(PL,A,B: LIST; VAR C,RL: LIST); SACPGCD : MUPRES(PL,A,B: LIST): LIST; SACPGCD : MUPSFF(PL,A: LIST): LIST; MASU : MWRIT1(Y: LIST; top: BOOLEAN); MASU : MWRITE(Y: LIST); MASSYM2 : NAME(L: LIST): LIST; SACSYM : NAME(L: LIST): LIST; MASREP : NewRep(): LIST; MASGEM : NextParm(VAR s: ARRAY OF CHAR): BOOLEAN; MASSTOR : NEWQUE(): LIST; MASSYM : OCCURQ(AL,L: LIST): BOOLEAN; SACLIST : ORDER(AL: LIST): LIST; SACLIST : OREAD(): LIST; MASBIOSU : OUT(A: LIST): LIST; SACLIST : OWRITE(B: LIST); MASPARSE : Parse(): LIST; MASSYM2 : PACK(L: LIST): LIST; SACSYM : PACK(L: LIST): LIST; SACLIST : PAIR(A,B: LIST): LIST; SACCOMB : PARTN(NL,P: LIST): LIST; SACCOMB : PARTR(NL: LIST): LIST; SACCOMB : PARTSS(PL: LIST): LIST; DIPC : PBCLI(RL,A: LIST): LIST; SACPOL : PBIN(AL1,EL1,AL2,EL2: LIST): LIST; SACPOL : PCL(A: LIST): LIST; SACEXT4 : PCONST(RL,A: LIST): LIST; SACPOL : PDBORD(A: LIST): LIST; SACPOL : PDEG(A: LIST): LIST; SACPOL : PDEGSV(RL,A,IL: LIST): LIST; SACPOL : PDEGV(RL,A: LIST): LIST; SACPOL : PDPV(RL,A,IL,NL: LIST): LIST; SACEXT3 : PERMCY(P: LIST): LIST; SACCOMB : PERMR(NL: LIST): LIST; DIPC : PFDIP(A: LIST; VAR RL,B: LIST); SACPOL : PFDP(RL,A: LIST): LIST; SACPOL : PINV(RL,A,KL: LIST): LIST; SACPOL : PLBCF(RL,A: LIST): LIST; SACPOL : PLDCF(A: LIST): LIST; DIPC : PLFDIL(A: LIST; VAR RL,B: LIST); SACPOL : PMDEG(A: LIST): LIST; SACPOL : PMON(AL,EL: LIST): LIST; SACPOL : PMPMV(A,KL: LIST): LIST; DIPC : PMPV(RL,A,IL,NL: LIST): LIST; SACPOL : PORD(A: LIST): LIST; DIPE : POWSEV(PL,A: LIST): LIST; DIPC : PPERMV(RL,A,P: LIST): LIST; SACPOL : PRED(A: LIST): LIST; MASLISPU : PROCP(X: LIST): BOOLEAN; SACPOL : PRT(A: LIST): LIST; SACEXT4 : PSDSV(RL,A,IL,NL: LIST): LIST; SACPOL : PTBCF(RL,A: LIST): LIST; DIPTOO : PTERM(RL,A: LIST): LIST; DIPTOO : PTYP(RL,A: LIST): LIST; SACPOL : PUFP(RL,A: LIST): LIST; SACEXT4 : PUNT(RL,A: LIST): LIST; MASSYM2 : PUT(S,AL,A: LIST); SACSYM : PUT(S,AL,A: LIST); DIPTOO : PVDEMA(A: LIST): LIST; MASSTOR : RED(L: LIST): LIST; SACLIST : RED2(L: LIST): LIST; SACLIST : RED3(L: LIST): LIST; SACLIST : RED4(L: LIST): LIST; SACLIST : REDUCT(A,IL: LIST): LIST; MASSYM2 : REMPRP(S,AL: LIST); SACSYM : REMPRP(S,AL: LIST); DIPRF : RFDEN(R: LIST): LIST; DIPRF : RFDIF(R,S: LIST): LIST; DIPRF : RFEXP(A,NL: LIST): LIST; DIPRF : RFFIP(RL,A: LIST): LIST; DIPRF : RFINV(R: LIST): LIST; DIPRF : RFNEG(R: LIST): LIST; DIPRF : RFNOV(R: LIST): LIST; DIPRF : RFNUM(R: LIST): LIST; DIPRF : RFONE(R: LIST): LIST; DIPRF : RFPROD(R,S: LIST): LIST; DIPRF : RFQ(R,S: LIST): LIST; DIPRF : RFREAD(V: LIST): LIST; DIPRF : RFRED(RL,A,B: LIST): LIST; DIPRF : RFSIGN(R: LIST): LIST; DIPRF : RFSUM(R,S: LIST): LIST; DIPRF : RFWRIT(R,V: LIST); SACROOT : RIB(RL,SL: LIST): LIST; SACROOT : RILC(I,KL: LIST): LIST; SACROOT : RINT(I: LIST): LIST; SACRN : RIRNP(I,CL: LIST): LIST; DIPROOT : RIRWRT(R,EPS: LIST); SACRN : RNABS(R: LIST): LIST; SACEXT2 : RNBCR(A,B: LIST; VAR M,N,KL: LIST); SACRN : RNCEIL(RL: LIST): LIST; SACRN : RNCOMP(R,S: LIST): LIST; SACRN : RNDEN(R: LIST): LIST; SACRN : RNDIF(R,S: LIST): LIST; MASAPF : RNDRD(): LIST; MASRN : RNDRD(): LIST; SACRN : RNDWR(R,NL: LIST); MASRN : RNDWR(R,NL: LIST); MASRN : RNDWRS(A,S: LIST); MASRN : RNEXP(A,NL: LIST): LIST; MASAPF : RNFAP(A: LIST): LIST; SACRN : RNFCL2(AL: LIST; VAR ML,NL: LIST); MASF : RNFF(F: MFLOAT): LIST; SACRN : RNFLOR(RL: LIST): LIST; SACRN : RNINT(A: LIST): LIST; SACRN : RNINV(R: LIST): LIST; MASRN : RNMAX(AL,BL: LIST): LIST; LinAlgRN : RNMDET(M : LIST): LIST; LinAlgRN : RNMDETL(M : LIST): LIST; LinAlgRN : RNMDIF(A, B : LIST): LIST; LinAlgRN : RNMFIM(M : LIST): LIST; LinAlgRN : RNMGE(M : LIST): LIST; LinAlgRN : RNMGELUD(M : LIST; VAR L, U: LIST); LinAlgRN : RNMHILBERT(m, n : LIST): LIST; LinAlgRN : RNMINV(A : LIST): LIST; LinAlgI : RNMINVI(A : LIST): LIST; LinAlgRN : RNMLT(L, b : LIST): LIST; LinAlgRN : RNMMAX(M : LIST): LIST; LinAlgRN : RNMPROD(A, B : LIST): LIST; LinAlgRN : RNMREAD(): LIST; LinAlgRN : RNMSDS(L, U, b : LIST): LIST; LinAlgRN : RNMSUM(A, B : LIST): LIST; LinAlgRN : RNMUNS(U : LIST): LIST; LinAlgRN : RNMUT(U, b : LIST): LIST; LinAlgRN : RNMWRITE(A : LIST); SACRN : RNNEG(R: LIST): LIST; SACRN : RNNUM(R: LIST): LIST; MASRN : RNONE(R: LIST): LIST; SACRN : RNP2(KL: LIST): LIST; SACRN : RNPROD(R,S: LIST): LIST; SACRN : RNQ(R,S: LIST): LIST; SACRN : RNRAND(NL: LIST): LIST; SACRN : RNREAD(): LIST; SACRN : RNRED(A,B: LIST): LIST; SACRN : RNSIGN(R: LIST): LIST; LinAlgRN : RNSMPROD(A, B : LIST): LIST; SACRN : RNSUM(R,S: LIST): LIST; LinAlgRN : RNSVPROD(a, A : LIST): LIST; LinAlgRN : RNUM(m, n : LIST): LIST; LinAlgRN : RNVDIF(A, B : LIST): LIST; LinAlgRN : RNVFIV(A : LIST): LIST; LinAlgRN : RNVLC(a, A, b, B : LIST): LIST; LinAlgRN : RNVMAX(M : LIST): LIST; LinAlgRN : RNVQ(A, B : LIST): LIST; LinAlgRN : RNVQF(A : LIST): LIST; LinAlgRN : RNVREAD(): LIST; LinAlgRN : RNVSPROD(A, B : LIST): LIST; LinAlgRN : RNVSSUM(A : LIST): LIST; LinAlgRN : RNVSVPROD(A, B : LIST): LIST; LinAlgRN : RNVSVSUM(A, B : LIST): LIST; LinAlgRN : RNVVPROD(A, B : LIST): LIST; LinAlgRN : RNVVSUM(A, B : LIST): LIST; LinAlgRN : RNVWRITE(A : LIST); SACRN : RNWRIT(R: LIST); SACPGCD : RPBLGS(RL,A: LIST; VAR AL,BL,SL: LIST); SACRPOL : RPDIF(RL,A,B: LIST): LIST; SACEXT4 : RPDMV(RL,A: LIST): LIST; SACRPOL : RPEMV(RL,A,BL: LIST): LIST; SACRPOL : RPFIP(RL,A: LIST): LIST; SACRPOL : RPIMV(RL,A: LIST): LIST; DIPRNPOL : RPLWRS(RL,A,V,S: LIST); SACEXT4 : RPMAIP(RL,A: LIST): LIST; SACRPOL : RPNEG(RL,A: LIST): LIST; DIPRNPOL : RPONE(RL,A: LIST): LIST; SACRPOL : RPPROD(RL,A,B: LIST): LIST; SACRPOL : RPQR(RL,A,B: LIST; VAR Q,R: LIST); SACRPOL : RPREAD( VAR RL,A,V: LIST); SACRPOL : RPRNP(RL,AL,B: LIST): LIST; SACRPOL : RPSUM(RL,A,B: LIST): LIST; SACRPOL : RPWRIT(RL,A,V: LIST); DIPRNPOL : RPWRTS(RL,A,V,S: LIST); SACANF : RUPMRN(R: LIST): LIST; MASSTOR : SAVEPROCESS; SACSET : SCOMP(AL,L: LIST): LIST; SACSET : SDIFF(A,B: LIST): LIST; SACCOMB : SDR(S: LIST; VAR A,I: LIST); MASREP : SetRep(n,e,r: LIST); SACLIST : SECOND(L: LIST): LIST; MASLISP : SETV(V, A: LIST; VAR ENV: LIST); MASLISP : SEXPRP(X: LIST): BOOLEAN; SACCOMB : SFCS(A: LIST): LIST; MASSTOR : SFIRST(L, a: LIST); MASBIOSU : SHUT(A: LIST): LIST; MASLISPU : Signature(F: LIST; VAR PI, PO: LIST; VAR def: BOOLEAN); MASBIOS : SILINE(VAR S, L, R: GAMMAINT); MASF : SIN(A: LIST): LIST; SACSET : SINTER(A,B: LIST): LIST; MASBIOS : SIUNIT(S: ARRAY OF CHAR): GAMMAINT; SACLIST : SLELT(A,IL,AL: LIST); MASBIOS : SLIST(A: LIST; VAR S: ARRAY OF CHAR); MASSYM2 : SMEMB(S,L: LIST): LIST; SACSYM : SMEMB(S,L: LIST): LIST; SACM : SMFMI(M,A: LIST): LIST; SACMPOL : SMFMIP(RL,M,A: LIST): LIST; MASBIOS : SOLINE(VAR S, L, R: GAMMAINT); MASBIOS : SOUNIT(S: ARRAY OF CHAR): GAMMAINT; MASLISP : SPECIALFORM(S: LIST): BOOLEAN; MASF : SQRT(A: LIST): LIST; MASSYM2 : SREAD(): LIST; SACSYM : SREAD(): LIST; MASSYM2 : SREAD1(): LIST; SACSYM : SREAD1(): LIST; MASSTOR : SRED(L, LP: LIST); SACSYM2 : SSYTBAL; MASREP : StepRep(r: LIST): LIST; MASBIOS : StorSummary(); SACSYM2 : STBAL(L,n: LIST): LIST; SACSYM2 : STBALS(VAR A: ARRAY OF LIST; l, r: INTEGER): INTEGER; MASSYM2 : STCNT(T: LIST; VAR S,P: LIST); SACSYM : STCNT(T: LIST; VAR S,P: LIST); MASSYM2 : STINS(B: LIST): LIST; SACSYM : STINS(B: LIST): LIST; MASSYM2 : STLST(T: LIST): LIST; SACSYM : STLST(T: LIST): LIST; MASSYM2 : STLSTI(T: LIST): LIST; SACSYM : STLSTI(T: LIST): LIST; SACSYM2 : STNLST(T: LIST; VAR L,n: LIST); MASSYM2 : STSRCH(T,AP: LIST): LIST; SACSYM : STSRCH(T,AP: LIST): LIST; DIPC : STVL(RL: LIST): LIST; MASSYM2 : STWRT(T: LIST); SACSYM : STWRT(T: LIST); MASBIOS : Summary; MASSYM2 : SUBLIS(L,A: LIST): LIST; SACSYM : SUBLIS(L,A: LIST): LIST; SACLIST : SUFFIX(L,BL: LIST): LIST; SACSET : SUNION(A,B: LIST): LIST; MASPARSE : SwitchParse(g: BOOLEAN); MASBIOS : SWRITE(VAR S: ARRAY OF CHAR); MASSYM2 : SymSummary(); SACSYM : SymSummary(); MASYMDIP : SYM2DIP(T: LIST): LIST; MASSYM2 : SYMBOL(AP: LIST): BOOLEAN; SACSYM : SYMBOL(AP: LIST): BOOLEAN; MASSYM2 : SYWRIT(S: LIST); SACSYM : SYWRIT(S: LIST); MASBIOS : TAB(n: GAMMAINT); MASLISP : TAG(V,T: LIST): LIST; MASF : TAN(A: LIST): LIST; MASYMDIP : TFDIRP(A, V: LIST): LIST; SACLIST : THIRD(L: LIST): LIST; MASSTOR : TIME(): GAMMAINT; MASYMDIP : TVARS(T: LIST): LIST; MASLISP : TYPEOF(X: LIST): LIST; MASLISP : TYPOFTAG(L: LIST): LIST; DIPE : UIPRES(A,B: LIST; VAR CL,KL: LIST); DIPE : UIPRS1(A,B: LIST): LIST; DIPE : UIPSIL(A,EL: LIST): LIST; DIPE : UIPSIV(A,B: LIST): LIST; MASSYM : UNIFY(A,B: LIST; VAR S: LIST): BOOLEAN; MASSYM : UREAD(): LIST; MASSYM2 : UREAD(): LIST; SACSYM : UREAD(): LIST; SACSET : USCOMP(AL,L: LIST): LIST; SACSET : USDIFF(A,B: LIST): LIST; DIPDIM : USETCT(U,V: LIST): LIST; SACSET : USINT(A,B: LIST): LIST; SACSET : USUN(A,B: LIST): LIST; MASSYM : UWRIT1(L: LIST); MASSYM2 : UWRIT1(L: LIST); SACSYM : UWRIT1(L: LIST); MASSYM : UWRITE(L: LIST); MASSYM2 : UWRITE(L: LIST); SACSYM : UWRITE(L: LIST); MASLISP : VALOFTAG(L: LIST): LIST; SACPOL : VCOMP(U,V: LIST): LIST; LinAlgRN : VDELEL(V, i : LIST): LIST; LinAlgRN : VEL(a, n : LIST): LIST; SACLDIO : VIAZ(A,NL: LIST): LIST; SACLDIO : VIDIF(A,B: LIST): LIST; SACLDIO : VIERED(U,V,IL: LIST): LIST; SACLDIO : VILCOM(AL,BL,A,B: LIST): LIST; SACLDIO : VINEG(A: LIST): LIST; DIPIPOL : VIPIIP(RL,A,B: LIST): LIST; SACLDIO : VISPR(AL,A: LIST): LIST; SACLDIO : VISUM(A,B: LIST): LIST; SACLDIO : VIUT(U,V,IL: LIST; VAR UP,VP: LIST); SACPOL : VLREAD(): LIST; SACPOL : VLSRCH(VL,V: LIST): LIST; SACPOL : VLWRIT(V: LIST); SACPOL : VMAX(U,V: LIST): LIST; SACPOL : VMIN(U,V: LIST): LIST; SACMPOL : VMPIP(RL,ML,A,B: LIST): LIST; SACPOL : VREAD(): LIST;

Comment to Procedure and Module index

MASABS : Absolute value. ADV2 : Advance 2. ADV3 : Advance 3. ADV4 : Advance 4. ADV : Advance. ALDPARSE : Aldes Parser Definition Module. AFDIF : Algebraic number field element difference. AFNEG : Algebraic number field element negation. AFPROD : Algebraic number field element product. AFSUM : Algebraic number field element sum. AFINV : Algebraic number field inverse. AFQ : Algebraic number field quotient. AFSIGN : Algebraic number field sign. ACOMP1 : Alphabetic comparison, 1. ACOMP1 : Alphabetic comparison, 1. ACOMP : Alphabetic comparison. ACOMP : Alphabetic comparison. APABS : Arbitrary precision floating point absolute value. APCMPR : Arbitrary precision floating point compare. APCOMP : Arbitrary precision floating point composition. APDIFF : Arbitrary precision floating point difference. APEXPT : Arbitrary precision floating point exponent. APEXP : Arbitrary precision floating point exponentiation. APFINT : Arbitrary precision floating point from integer. APFRN : Arbitrary precision floating point from rational number. APLG10 : Arbitrary precision floating point logarithm base 10. APMANT : Arbitrary precision floating point mantissa. APROOT : Arbitrary precision floating point n-th root. APNEG : Arbitrary precision floating point negative. APNELD : Arbitrary precision floating point number of equal leading digits. APPI : Arbitrary precision floating point pi. APPROD : Arbitrary precision floating point product. APQ : Arbitrary precision floating point quotient.

APSPRE : Arbitrary precision floating point set precision. APSHFT : Arbitrary precision floating point shift. APSIGN : Arbitrary precision floating point sign. APSUM : Arbitrary precision floating point sum. APWRIT : Arbitrary precision floating point write. ARCTAN : Arcus tangens. AADV : Arithmetic advance. ASSPR : Assignment problem. ASSOCQ : Associate equal. ASSOCQ : Associate equal. ASSOC : Associate. ASSOC : Associate. AREAD : Atom read. AWRITE : Atom write. ATOM : Atom. ATTRIB : Attribute. ATTRIB : Attribute. BACKUB : Backspace until blank. BKSP : Backspace. BITRAN : Bit, random. BLINES : Blank lines. CallCompiled : Call compiled function or procedure. DOS : Call DOS program. CPLEXN : Cartesian product, lexicographically next. CELLS : Cells. CLIN : Character list in. CLOUT : Character list out. CLTIS : Character list to input stream. CREADB : Character read, skipping blanks. CREAD : Character read. CWRIT2 : Character write, 2 characters. CWRIT3 : Character write, 3 characters. CWRIT4 : Character write, 4 characters. CWRIT5 : Character write, 5 characters. CWRIT6 : Character write, 6 characters. CWRITE : Character write. CSFPAR : Characteristic set from partition. CSINT : Characteristic set intersection. CSSUB : Characteristic set subset. CSUN : Characteristic set union. CLOCK : Clock. CloseBIOS : Close BIOS. CUNIT : Close unit. CompSummary : Compiled function and procedure summary. Compiledf0 : Compiled function declaration f0. Compiledf1 : Compiled function declaration f1. Compiledf2 : Compiled function declaration f2. Compiledf3 : Compiled function declaration f3.

144 CHAPTER 12. COMMENT TO PROCEDURE AND MODULE INDEX

Compiledf4 : Compiled function declaration f4. Compiledp0 : Compiled function declaration p0. Compiledp1 : Compiled function declaration p1. Compiledp1v2 : Compiled function declaration p1v2. Compiledp1v3 : Compiled function declaration p1v3. Compiledp2 : Compiled function declaration p2. Compiledp2v2 : Compiled function declaration p2v2. Compiledp2v3 : Compiled function declaration p2v3. Compiledp3 : Compiled function declaration p3. Compiledp3v2 : Compiled function declaration p3v2. Compiledp3v3 : Compiled function declaration p3v3. COMP2 : Composition 2. COMP3 : Composition 3. COMP4 : Composition 4. COMP : Composition. CONC : Concatenation. CCONC : Constructive concatenation. CINV : Constructive inverse. COPYOB : Copy object. CopyRep : Copy representation. COPYTOENV : Copy to environement. COS : Cosinus. Declare : Declare. DCENV : Decode environment. DEFE : Define expr function. DEFF : Define fexpr function. DEFMAP : Define generic map function. DEFPROC : Define generic proc function. DEFRULE : Define generic rule function. DEFM : Define macro function. DMIA : Define model, implementation or axioms. DSPEC : Define specification. DMEVAD : Degree matrix exponent vector add. DMPPRD : Dense modular polynomial product. DMPSUM : Dense modular polynomial sum. DMUPNR : Dense modular univariate polynomial natural remainder. DPFP : Dense polynomial from polynomial. DEQUE : Dequeue. DECOFTAG : Descriptor of tagged object. DAND : Digit and. DEGCD : Digit extended greatest common divisor. DGCD : Digit greatest common divisor. DLOG2 : Digit logarithm, base 2. DNIMP : Digit non-implication. DNOT : Digit not. DOR : Digit or. DPCC : Digit partial cosequence calculation. DPGEN : Digit prime generator.

DPR : Digit product. DQR : Digit quotient and remainder. DSQRTF : Digit square root function. DRANN : Digit, random non-negative. DRAN : Digit, random. DIGIT : Digit. DIBUFF : Display input buffer. DIIPAB : Distributive integral polynomial absolute value. DIIPCP : Distributive integral polynomial content and primitive part. DIIPDM : Distributive integral polynomial derivation main variable. DIIPDR : Distributive integral polynomial derivation. DIIPDF : Distributive integral polynomial difference. DIIPEM : Distributive integral polynomial evaluation of main variable. DIIPEV : Distributive integral polynomial evaluation of the i-th variable. DIIPEX : Distributive integral polynomial exponentiation. DIIFRP : Distributive integral polynomial from rational polynomial. DIIPHD : Distributive integral polynomial higher derivation. DIIPIP : Distributive integral polynomial integer product. DIIPIQ : Distributive integral polynomial integer quotient. DIILFR : Distributive integral polynomial list from rational polynomial list. DIILRD : Distributive integral polynomial list read. DIIPLS : Distributive integral polynomial list sum. DIILWR : Distributive integral polynomial list write. DIIPMN : Distributive integral polynomial maximum norm. DIIPNG : Distributive integral polynomial negative. DIIPON : Distributive integral polynomial one. DIIPPR : Distributive integral polynomial product. DIIPPS : Distributive integral polynomial pseudo-remainder. DIIPQR : Distributive integral polynomial quotient and remainder. DIIPQ : Distributive integral polynomial quotient. DIIRAS : Distributive integral polynomial random sparse exponent vector. DIIPRA : Distributive integral polynomial random. DIIPRD : Distributive integral polynomial read. DIIPSG : Distributive integral polynomial sign. DIIPSO : Distributive integral polynomial sort. DIIPSV : Distributive integral polynomial substitution for main variable. DIIPSU : Distributive integral polynomial substitution. DIIPSN : Distributive integral polynomial sum norm. DIIPSM : Distributive integral polynomial sum. DIIPTM : Distributive integral polynomial translation main variable. DIIPTR : Distributive integral polynomial translation. DIIPWV : Distributive integral polynomial write with standard variable list. DIIPWR : Distributive integral polynomial write. DIGBMI : Distributive minimal ordered groebner basis. DINLMPG : Distributive non-commutative left rational minimal polynomial for a G basis. DINLMPL : Distributive non-commutative left rational minimal polynomial list for a G basis. DINLGM : Distributive non-commutative minimal ordered left Groebner base.

DINPEX : Distributive non-commutative polynomial exponentiation. DINLNF : Distributive non-commutative polynomial left normal form. DINLSP : Distributive non-commutative polynomial left S-polynomial. DINLIS : Distributive non-commutative polynomial list left irreducible set. DINLRD : Distributive non-commutative polynomial list read. DINPRD : Distributive non-commutative polynomial read. DIN1GB : Distributive non-commutative polynomials Groebner base. DINCGB : Distributive non-commutative polynomials Groebner base. DINLGB : Distributive non-commutative polynomials left Groebner base. DIPADS : Distributive polynomial advance and substitute. DIPADM : Distributive polynomial advance main variable. DIPADV : Distributive polynomial advance. DIPBSO : Distributive polynomial bubble sort. DIPCMP : Distributive polynomial composition. DIPDEM : Distributive polynomial degree matrix. DIPDEV : Distributive polynomial degree vector. DIPDEG : Distributive polynomial degree. DIDIMS : Distributive polynomial dimension maximal independent set. DIPDPV : Distributive polynomial division by power of variable. DIPEXC : Distributive polynomial exchange variables. DIPEVL : Distributive polynomial exponent vector leading monomial. DIPEVP : Distributive polynomial exponent vector product. DIPFMO : Distributive polynomial from monomial. DIPFP : Distributive polynomial from polynomial. DIGBZT : Distributive polynomial groebner base common zero test. DIGBC3 : Distributive polynomial groebner basis criterion 3. DIGBC4 : Distributive polynomial groebner basis criterion 4. DIPINV : Distributive polynomial introduction of new variables. DIPLBC : Distributive polynomial leading base coefficient. DIPLDC : Distributive polynomial leading coefficient. DILBSO : Distributive polynomial list bubble sort. DILCPL : Distributive polynomial list construct pair list. DIPLDM : Distributive polynomial list degree matrix. DIPLDV : Distributive polynomial list dependency on variables. DILDIM : Distributive polynomial list dimension. DILFEL : Distributive polynomial list from exponent vector list. DILFPL : Distributive polynomial list from polynom list. DIPLM : Distributive polynomial list merge. DIPLPM : Distributive polynomial list pair-merge sort. DIPLRS : Distributive polynomial list re-sort. DILUPL : Distributive polynomial list update pair list. DIPMAD : Distributive polynomial monomial advance. DIPMCP : Distributive polynomial monomial composition. DIPMRD : Distributive polynomial monomial reductum. DIPMST : Distributive polynomial monomial set. DIPMPM : Distributive polynomial multiplication by power of main variable. DIPMPV : Distributive polynomial multiplication by power of variable. DINPTL : Distributive polynomial non-commutative product table lookup.

DINPTslT : Distributive polynomial non-commutative product table strict lex test. DINPTU : Distributive polynomial non-commutative product table update. DINPPR : Distributive polynomial non-commutative product. DIPNBC : Distributive polynomial number of base coefficients. DIPNOV : Distributive polynomial number of variables. DIPERM : Distributive polynomial permutation of variables. DIPRED : Distributive polynomial reductum. DIGBSI : Distributive polynomial system algebraic number G basis sign. DIITNT : Distributive polynomial system intervall tupel from norm tupel. DIITWR : Distributive polynomial system intervall tupels write. DINTWR : Distributive polynomial system normalized tupels write. DIROWR : Distributive polynomial system real root write. DIPTRM : Distributive polynomial terms. DIP2SYM : Distributive polynomial to symbol term. DIPTDG : Distributive polynomial total degree. DIPTBC : Distributive polynomial trailing base coefficient. DIPTCS : Distributive polynomial trailing coefficient specified variable. DIPTCF : Distributive polynomial trailing coefficient. DIPTYP : Distributive polynomial typ. DIPUNT : Distributive polynomial univariate test. DIPUV : Distributive polynomial univariate variable output. DIPVOP : Distributive polynomial variable ordering optimisation. DIRGZS : Distributive rational Groebner base zero set. DIRMPG : Distributive rational minimal polynomial for a groebner basis. DINCCPpre : Distributive rational non-commutative polynomial center polynomial preparation. DINCCP : Distributive rational non-commutative polynomial center polynomial. DINCCO : Distributive rational non-commutative polynomial commutator. DIRPAB : Distributive rational polynomial absolute value. DIRPDM : Distributive rational polynomial derivation main variable. DIRPDR : Distributive rational polynomial derivation. DIRPDF : Distributive rational polynomial difference. DIRPES : Distributive rational polynomial elementary symmetric functions. DIRPEM : Distributive rational polynomial evaluation of main variable. DIRPEV : Distributive rational polynomial evaluation of the i-th variable. DIRPEX : Distributive rational polynomial exponentiation. DIRFAC : Distributive rational polynomial factorisation. DIRFIP : Distributive rational polynomial from integral polynomial. DIRPFT : Distributive rational polynomial from term. DIRGBA : Distributive rational polynomial groebner basis augmentation. DIRGBR : Distributive rational polynomial groebner basis recursion. DIRPHD : Distributive rational polynomial higher derivation. DIRLCT : Distributive rational polynomial list ideal containement test. DIRLIP : Distributive rational polynomial list ideal product. DIRLIS : Distributive rational polynomial list irreducible set. DIRLPI : Distributive rational polynomial list primary ideal. DIRLRD : Distributive rational polynomial list read. DIRPLS : Distributive rational polynomial list sum.

DIRLWR : Distributive rational polynomial list write. DIRPMN : Distributive rational polynomial maximum norm. DIRPMC : Distributive rational polynomial monic. DIRPNG : Distributive rational polynomial negative. DIRPNF : Distributive rational polynomial normal form. DIRPON : Distributive rational polynomial one. DIRPPR : Distributive rational polynomial product. DIRPQR : Distributive rational polynomial quotient and remainder. DIRPQ : Distributive rational polynomial quotient. DIRPRA : Distributive rational polynomial random. DIRPRP : Distributive rational polynomial rational number product. DIRPRQ : Distributive rational polynomial rational number quotient. DIRPRD : Distributive rational polynomial read. DIRPSG : Distributive rational polynomial sign. DIRPSO : Distributive rational polynomial sort. DIRPSV : Distributive rational polynomial substitution for main variable. DIRPSU : Distributive rational polynomial substitution. DIRPSN : Distributive rational polynomial sum norm. DIRPSM : Distributive rational polynomial sum. DIRPSE : Distributive rational polynomial symm. DIRPSR : Distributive rational polynomial symmetric function reduction. DIRPSP : Distributive rational polynomial S polynomial. DIRPTM : Distributive rational polynomial translation main variable. DIRPTR : Distributive rational polynomial translation. DIRPWV : Distributive rational polynomial write with standard variable DIRPWR : Distributive rational polynomial write. DIRRAS : Distributive rational polynomial, random sparse exponent vector. DIRPGB : Distributive rational polynomials groebner basis. DIPC : DIP Common Polynomial System Definition Module. DIPTODEF : DIP define distributive polynomial term order. DIPVDEF : DIP define distributive polynomial variable list. DIPDIM : DIP Dimension Definition Module. DIPE : DIP Exterior Algebra Definition Module. DIGISM : DIP G base index search for extension multiple univariats. DIGISR : DIP G base index search for extension reductas. DIGFET : DIP G base successful extension test. DIPGCD : DIP GCD Definition Module. DIPDEC0 : DIP Ideal Decomposition 0 System Definition Module. DIPROOT : DIP Ideal Real Root System Definition Module. DIPIDEAL : DIP Ideal System Definition Module. DIPIPOL : DIP Integer Polynomial Definition Module. DIPI : DIP Integral Definition Module. DINTZS : DIP nomalized tupels from system zero. DINTFE : DIP normalized tupel field extension. DINTSR : DIP normalized tupel separation refinement. DINTSS : DIP normalized tupel strong separation. DIRPDA : DIP rational polynomial ideal primary ideal decomposition over Q(alpha). DIRLPW : DIP rational polynomial ideal primary ideal decomposition write.

DIRLPD : DIP rational polynomial ideal primary ideal decomposition. DIPRN : DIP Rational Definition Module. DIPRF : DIP Rational Function Definition Module. DIPRNGB : DIP Rational Groebner Bases Definition Module. DIPRNPOL : DIP Rational Number Polynomial Definition Module. DITFZS : DIP tupel from zero set. DIPTOO : DIP Termorder Optimization Definition Module. DITSPL : DIP zero set tupel split. DIPZ : DIP Zero Dimensional Ideal Definition Module. DoParse : Do parse. DoWrite : Do Write. DOS : DOS. EDIT : Edit file with name s. EDIT : Edit. ELEMP : Elementary Pointer. EMPTYQUE : Empty Queue. ECENV : Encode environment. ENQUE : Enqueue. ENTER : Enter into symbol table. ENTER : Enter into symbol table. EQUAL : Equal. ErrorHandler : Error handler. ERROR : Error. MASEVEN : Even. EXPLOD : Explode symbol. EXPLOD : Explode symbol. EPREAD : Exponent read. EVASC : Exponent vector ascending. EVCOMP : Exponent vector compare. EVCADD : Exponent vector component add. EVCSUB : Exponent vector component subtract. EVDEL : Exponent vector delete. EVDOV : Exponent vector dependency on variables. EVDER : Exponent vector derivation. EVDFSI : Exponent vector difference and sign. EVDIF : Exponent vector difference. EVEXC : Exponent vector exchange. EVGCD : Exponent vector greatest common divisor. EVGBIT : Exponent vector groebner base intersection test. EVINV : Exponent vector introduction of new variables. EVIGLC : Exponent vector inverse graded lexicographical compare. EVILCI : Exponent vector inverse lexicographical compare inverse exponent vector. EVILCP : Exponent vector inverse lexicographical compare. EVITDC : Exponent vector inverse total degree compare. EVLCM : Exponent vector least common multiple. EVLFCP : Exponent vector linear form compare. EVLGIL : Exponent vector list generate for inverse lexicographical sequence. EVLGTD : Exponent vector list generate for total degree.

EVLINV : Exponent vector list introduction of new variables. EVMT : Exponent vector multiple test. EVNNZE : Exponent vector number of non zero exponents. EVPLM : Exponent vector pair-list merge. EVPLSO : Exponent vector pair-list sort. EVRAND : Exponent vector random. EVRASP : Exponent vector random. EVSIGN : Exponent vector signum. EVSU : Exponent vector substitution. EVSUM : Exponent vector sum. EVTSZ : Exponent vector test if starting with i zero exponents. EVTDEG : Exponent vector total degree. EVZERO : Exponent vector zero. MASEXP : Exponential function. EXPF : Exponential. EXTENDENV : Extend environement. EXTENT : Extent. EXIDT2 : Exterior integral matrix determinant 2. EXIDET : Exterior integral matrix determinant. EIMWRT : Exterior integral matrix write. EIVAPP : Exterior integral vector absolute primitive part. EIVABS : Exterior integral vector absolute value. EIVCPP : Exterior integral vector content and primitive part. EIVEPR : Exterior integral vector exterior product. EIVFUP : Exterior integral vector from univariate integral polynomial EIVILP : Exterior integral vector inner left product. EIVIRP : Exterior integral vector inner right product. EIVIP : Exterior integral vector integer product. EIVIQ : Exterior integral vector integer quotient. EIVNEG : Exterior integral vector negative. EIVPP : Exterior integral vector primitive part. EIVSIG : Exterior integral vector sign. EIVSUM : Exterior integral vector sum. EIVWRT : Exterior integral vector write. EXMHOM : Exterior matrix homomorphism. EXVHOM : Exterior vector homomorphism. FRLSM : Fermat residue list, single modulus. FRESL : Fermat residue list. FIRST2 : First 2. FIRST3 : First 3. FIRST4 : First 4. FIRST : First. FEXP : Floating point exponentiation. FFGI : Floating point from gamma integer. FFINT : Floating point from integer. FFRN : Floating point from rational number. FLOG10 : Floating point logarithm base 10. ForEachinList : For each element e in r apply function f.

ForEachinRep : For each pair (n,e) in r apply function f. FOURTH : Fourth. FullRep : Full representation. GREAD : Gamma-integer read. GWRITE : Gamma-integer write. GDPGEN : Gaussian digit prime generator. GENPROCESS : Generate a new process. ARRAYDEC : Generate array name declarations. GENARRAY : Generate array reference symbol. GENINDEX : Generate index set. GENPL : Generate parameter list. GENSYM : Generate symbol. GENSYM : Generate symbol. GENTE : Generate typed expression. GET : Get property. GET : Get property. GetRep : Get representation. GBZSET : Groebner base real zero set of zero dimensional ideal. HDIFDI : Homogeneous distributive polynomial from distributive polynomial. HIPRAN : Homogeneous integral polynomial random. ILADDC : Index list addition of constant. ILEXPR : Index list exterior product. ILILPR : Index list inner left product. ILINPR : Index list inner product. ILIRPR : Index list inner right product. ILSCMP : Index list strong compare. ILWCMP : Index list week compare. INLWRT : Index list write. INDLST : Index list. IXSUBS : Indexed subset. InitExternalsA : Initialize external compiled arithmetic procedures. InitExternalsD : Initialize external compiled ideal decomposition and root procedures. InitExternalsI : Initialize external compiled interface procedures. InitExternalsL : Initialize external compiled linear algebra procedures. InitExternalsC : Initialize external compiled non-commutative polynomial procedures. InitExternalsB : Initialize external compiled polynomial procedures. InitExternals : Initialize external compiled procedures. InitExternalsU : Initialize external compiled utility procedures. INP : Input. IABSF : Integer absolute value function. IBCIND : Integer binomial coefficient induction. IBCPS : Integer binomial coefficient partial sum. IBCOEF : Integer binomial coefficient. ICOMP : Integer comparison. IDIF : Integer difference. IDIPR2 : Integer digit inner product, length 2. IDP2 : Integer division by power of 2. IDEGCD : Integer doubly extended greatest common divisor algorithm.

IEVEN : Integer even. IEXP : Integer exponentiation. IEGCD : Integer extended greatest common divisor algorithm. IFACTL : Integer factorial. IFACT : Integer factorization. IFF : Integer from floating point. IGCDCF : Integer greatest common divisor and cofactors. IGCD : Integer greatest common divisor. IHEGCD : Integer half-extended greatest common divisor. IJACS : Integer Jacobi symbol algorithm. ILPDS : Integer large prime divisor search. ILCM : Integer least common multiple. ILCOMB : Integer linear combination. ILWRIT : Integer list write. ILOG10 : Integer logarithm base 10. ILOG2 : Integer logarithm, base 2. IMLT : Integer lower triangular matrix transformation. IMDET : Integer matrix determinant, using Gaussian elimination. IMDETL : Integer matrix determinant, using Laplace expansion. IMDIF : Integer matrix difference. IMFRNM : Integer matrix from rational number matrix. IMFRNM1 : Integer matrix from rational number matrix. IMGELUD : Integer matrix Gaussian elimination LU-decomposition. IMGE : Integer matrix Gaussian elimination. IMMAX : Integer matrix maximum norm. IMPROD : Integer matrix product. IMSDS : Integer matrix solve decomposed system. IMSUM : Integer matrix sum. IMUNS : Integer matrix upper triangular matrix solution null space. IMWRITE : Integer matrix write. IMAX : Integer maximum. IMPDS : Integer medium prime divisor search. IMIN : Integer minimum. IMP2 : Integer multiplication by power of 2. INEG : Integer negation. IODD : Integer odd. IPOWER : Integer power. IPRODK : Integer product, Karatsuba algorithm. IPROD : Integer product. IPROD : Integer product. IQR : Integer quotient and remainder. IQ : Integer quotient. IREAD : Integer read. IREM : Integer remainder. IROOT : Integer root. ISMPROD : Integer scalar and matrix product. ISEG : Integer segmentation. ISPT : Integer selfridge primality test.

ISSUM : Integer shifted sum. ISIGNF : Integer sign function. ISPD : Integer small prime divisors. ISQRT : Integer square root. ISUM : Integer sum. ITD : Integer trailing digit. ITRUNC : Integer truncation. IUM : Integer unit matrix. IMUT : Integer upper triangular matrix transformation. IKM : Integer vector component product. IVVDIF : Integer vector difference. IVFRNV : Integer vector from rational number vector. IVFRNV1 : Integer vector from rational number vector. IVHOM : Integer vector homomorphism. IVLC : Integer vector linear combination. IVMAX : Integer vector maximum norm. IVRAND : Integer vector random. IVSVPROD : Integer vector scalar and vector product. IVSVSUM : Integer vector scalar and vector sum. IVSPROD : Integer vector scalar product. IVSQ : Integer vector scalar quotient. IVSSUM : Integer vector scalar sum. IVVSUM : Integer vector vector sum. IVVPROD : Integer vector vectors product. IVWRITE : Integer vector write. IWRITE : Integer write. IFCL2 : Integer, floor and ceiling, logarithm, base 2. IORD2 : Integer, order of 2. IRAND : Integer, random. IDPR : Integer-digit product. IDQR : Integer-digit quotient and remainder. IDQ : Integer-digit quotient. IDREM : Integer-digit remainder. IFWRIT : Integral function write. IPABS : Integral polynomial absolute value. IPCRA : Integral polynomial chinese remainder algorithm. IPCSFB : Integral polynomial coarsest squarefree basis. IPCPP : Integral polynomial content and primitive part. IPC : Integral polynomial content. IPDMV : Integral polynomial derivative, main variable. IPDER : Integral polynomial derivative. IPDIF : Integral polynomial difference. IPDSCR : Integral polynomial discriminant. IPEMV : Integral polynomial evaluation of main variable. IPEVAL : Integral polynomial evaluation. IPEXP : Integral polynomial exponentiation. IPFCB : Integral polynomial factor coefficient bound. IPFLC : Integral polynomial factor list combine.

IPFSD : Integral polynomial factorization, second derivative. IPFAC : Integral polynomial factorization. IPFSFB : Integral polynomial finest squarefree basis. IPFRP : Integral polynomial from rational polynomial. IPGSUB : Integral polynomial general substitution. IPGCDC : Integral polynomial greatest common divisor and cofactors. IPGFCB : Integral polynomial Gelfond factor coefficient bound. IPHDMV : Integral polynomial higher derivative, main variable. IPICPP : Integral polynomial integer content and primitive part. IPICS : Integral polynomial integer content subroutine. IPIC : Integral polynomial integer content. IPIPP : Integral polynomial integer primitive part. IPIP : Integral polynomial integer product. IPIQ : Integral polynomial integer quotient. IPINT : Integral polynomial integration. IPLCM : Integral polynomial least common multiple. IPLCPP : Integral polynomial list of contents and primitive parts. IPLRRI : Integral polynomial list real root isolation. IPMAXN : Integral polynomial maximum norm. IPIHOM : Integral polynomial mod ideal homomorphism. IPIPR : Integral polynomial mod ideal product. IPIQH : Integral polynomial mod ideal quadratic Hensel lemma. IPNEG : Integral polynomial negative. IPONE : Integral polynomial one. IPPGSD : Integral polynomial primitive greatest squarefree divisor. IPPP : Integral polynomial primitive part. IPPSC : Integral polynomial principal subresultant coefficients. IPPROD : Integral polynomial product. IPPSR : Integral polynomial pseudo-remainder. IPQR : Integral polynomial quotient and remainder. IPQ : Integral polynomial quotient. IPRAN : Integral polynomial random. IPREAD : Integral polynomial read. IPRCN1 : Integral polynomial real root calcuation, 1 root. IPRCH : Integral polynomial real root calculation, high precision. IPRCHS : Integral polynomial real root calculation, high-precision special. IPRCNP : Integral polynomial real root calculation, newton method preparation. IPRRII : Integral polynomial real root isolation induction. IPRICL : Integral polynomial real root isolation, Collins-Loos algorithm. IPRIMO : Integral polynomial real root isolation, modified Uspensky method, open interval. IPRIMS : Integral polynomial real root isolation, modified Uspensky method, standard interval. IPRIMU : Integral polynomial real root isolation, modified Uspensky method, unit interval. IPRIM : Integral polynomial real root isolation, modified Uspensky method. IPRIUP : Integral polynomial real root isolation, Uspensky method, positive roots. IPRIU : Integral polynomial real root isolation, Uspensky method.

IPRRLS : Integral polynomial real root list separation. IPRRS : Integral polynomial real root separation. IPRPRS : Integral polynomial reduced polynomial remainder sequence. IPRRRI : Integral polynomial relative real root isolation. IPRES : Integral polynomial resultant. IPSCPP : Integral polynomial sign, content, and primitive part. IPSIGN : Integral polynomial sign. IPSRP : Integral polynomial similiar to rational polynomial. IPSR : Integral polynomial specified roots. IPSFBA : Integral polynomial squarefree basis augmentation. IPSF : Integral polynomial squarefree factorization. IPSIFI : Integral polynomial standard isolating interval from isolating interval. IPSRMS : Integral polynomial strong real root isolation, modified Uspensky method, standard interval. IPSRM : Integral polynomial strong real root isolation, modified Uspensky method. IPSPRS : Integral polynomial subresultant polynomial remainder sequence. IPSMV : Integral polynomial substitution for main variable. IPSUB : Integral polynomial substitution. IPSUMN : Integral polynomial sum norm. IPSUM : Integral polynomial sum. IPTRMV : Integral polynomial translation, main variable. IPTRAN : Integral polynomial translation. IPTPR : Integral polynomial truncated product. IPTRUN : Integral polynomial truncation. IPVCHT : Integral polynomial variations after circle to half-plane transformation. IPWRIT : Integral polynomial write. IPCEVP : Integral polynomial, choice of evaluation points. IPRAN : Integral polynomial, random. IPSFSD : Integral squarefree factorization, second derivative. ISFPF : Integral squarefree polynomial factorization. ISFPIR : Integral squarefree polynomial isolating interval refinement. ISPSFB : Integral squarefree polynomial squarefree basis. IUPBHT : Integral univariate polynomial binary homothetic transformation. IUPBES : Integral univariate polynomial binary rational evaluation of sign. IUPBEI : Integral univariate polynomial binary rational evaluation, integer output. IUPBRE : Integral univariate polynomial binary rational evaluation. IUPCHT : Integral univariate polynomial circle to half-plane transformation. IUPFDS : Integral univariate polynomial factor degree set. IUPFAC : Integral univariate polynomial factorization. IUPIHT : Integral univariate polynomial integer homothetic transformation. IUPNT : Integral univariate polynomial negative transformation. IUPQHL : Integral univariate polynomial quadratic Hensel lemma, list. IUPQH : Integral univariate polynomial quadratic Hensel lemma. IUPRC : Integral univariate polynomial resultant and cofactor. IUPRB : Integral univariate polynomial root bound. IUPTR1 : Integral univariate polynomial translation by 1. IUPTR : Integral univariate polynomial translation. IUPTPR : Integral univariate polynomial truncated product.

IUPVAR : Integral univariate polynomial variations. IUPRLP : Integral univariate polynomial, root of a linear polynomial. IUPVOI : Integral univariate polynomial, variations for open interval. IUPVSI : Integral univariate polynomial, variations for standard interval. IUSFPF : Integral univariate squarefree polynomial factorization. INV : Inverse. IIC : Isolating interval conversion. KREISP : Kreisteilungs polynom. LAST : Last. LENGTH : Length. LETTER : Letter. LEXNEX : Lexicographically next. LDSSBR : Linear diophantine system solution, based on Rosser ideas. LDSMKB : Linear diophantine system solution, modified Kannan and Bachem algorithm. EVALUATE : Lisp evaluator. LCONC : List concatenation. LEINST : List element insertion. LEROT : List element rotation. LELT : List element. LEQUAL : List equality. LISTS : List from string. LINS : List insertion. LINSRT : List insertion. LMERGE : List merge. LBLXCO : List of beta integers lexicographical compare. LBIBS : List of beta-integers bubble sort. LBIBMS : List of beta-integers bubble-merge sort. LBIM : List of beta-integers merge. LPERM : List permute. LPERM : List permute. LREAD : List read. LSRCH : List search. LISTVAR : List variable. LWRITE : List write. LIST1 : List, 1 element. LIST10 : List, 10 elements. LIST2 : List, 2 elements. LIST3 : List, 3 elements. LIST4 : List, 4 elements. LIST5 : List, 5 elements. LN : Ln. LOG : Log. MDELCOL : Matrix delete column. MDIM : Matrix dimension. MFILL : Matrix fill. MGET : Matrix get. MMINOR : Matrix minor.

MCPMV : Matrix of coefficients of polynomials, with respect to main variable. MICINS : Matrix of integers column insertion. MICS : Matrix of integers column sort. MIAIM : Matrix of integers, adjoin identity matrix, A is an m by n matrix MINNCT : Matrix of integers, non-negative column transformation. MAIPDE : Matrix of integral polynomials determinant, exact division algorithm. MAIPDM : Matrix of integral polynomials determinant, modular algorithm. MAIPHM : Matrix of integral polynomials homomorphism. MAIPP : Matrix of integral polynomials product. MMDDET : Matrix of modular digits determinant. MMDNSB : Matrix of modular digits null space basis. MMPDMA : Matrix of modular polynomials determinant, modular algorithm. MMPEV : Matrix of modular polynomials evaluation. MIRAND : Matrix random. MRANG : Matrix rang. MSET : Matrix set. MTRANS : Matrix transpose. MASMAX : Maximum. MASAPF : MAS Arbitrary Precision Floating Point Definition Module. MASBIOS : MAS Basic I/O System Definition Module. MASBIOSU : MAS BIOS Utility Definition Module. MASCHR : MAS character. MASCONF : MAS Configuration Definition Module. MASELEM : MAS Elementary Functions Definition Module. MASF : MAS Floating Point Definition Module. MASGEM : MAS GEM Definition Module. MASI : MAS Integer Definition Module. LinAlgI : MAS Linear Algebra Integer Definition Module. LinAlgRN : MAS Linear Algebra Rational Number Definition Module. MASLISP : MAS Lisp Definition Module. MASLISPU : MAS Lisp Utility Definition Module. MASLOADA : MAS Load Definition Module A. MASLOADB : MAS Load Definition Module B. MASLOADC : MAS Load Definition Module C. MASLOADD : MAS Load Definition Module D. MASLOADL : MAS Load Definition Module L. MASLOAD : MAS Load Definition Module. MASNCC : MAS Non-commutative Center Definition Module. MASNC : MAS Non-commutative Definition Module. MASNCGB : MAS Non-commutative Groebner Bases Definition Module. MASORDI : MAS order integer. MASORD : MAS order. MASPARSE : MAS Parser Definition Module. MASRN : MAS Rational Number Definition Module. MASREP : MAS Representation Definition Module. MASSPEC : MAS Sepcification Definition Module. MASSTOR : MAS Storage Definition Module. MASSYM : MAS Symbol Definition Module.

MASYMDIP : MAS Symbol to DIP Definition Module. MASU : MAS Utility Definition Module. MASSYM2 : MAS/SAC Symbol System Definition Module 2. StorSummary : MASSTOR Summary. MEMQ : Membership test equal pointers. MEMBER : Membership test. MASMIN : Minimum. MDCRA : Modular digit chinese remainder algorithm. MDDIF : Modular digit difference. MDEXP : Modular digit exponentiation. MDHOM : Modular digit homomorphism. MDINV : Modular digit inverse. MDLCRA : Modular digit list chinese remainder algorithm. MDNEG : Modular digit negative. MDPROD : Modular digit product. MDQ : Modular digit quotient. MDSUM : Modular digit sum. MDRAN : Modular digit, random. MIDIF : Modular integer difference. MIDCRA : Modular integer digit chinese remainder algorithm. MIEXP : Modular integer exponentiation. MIHOM : Modular integer homomorphism. MIINV : Modular integer inverse. MINEG : Modular integer negation. MIPROD : Modular integer product. MIQ : Modular integer quotient. MISUM : Modular integer sum. MIRAN : Modular integer, random. MIPDIF : Modular integral polynomial difference. MIPFSM : Modular integral polynomial from symmetric modular. MIPHOM : Modular integral polynomial homomorphism. MIPIPR : Modular integral polynomial mod ideal product. MIPISE : Modular integral polynomial mod ideal, solution of equation. MIPNEG : Modular integral polynomial negation. MIPPR : Modular integral polynomial product. MIPSUM : Modular integral polynomial sum. MIPRAN : Modular integral polynomial, random. MIUPQR : Modular integral univariate polynomial quotient and remainder. MIUPSE : Modular integral univariate polynomial, solution of equation. MMPIQR : Modular monic polynomial mod ideal quotient and remainder. MPDIF : Modular polynomial difference. MPEMV : Modular polynomial evaluation of main variable. MPEVAL : Modular polynomial evaluation. MPEXP : Modular polynomial exponentiation. MPGCDC : Modular polynomial greatest common divisor and cofactors. MPHOM : Modular polynomial homomorphism. MPINT : Modular polynomial interpolation. MPIQHL : Modular polynomial mod ideal quadratic Hensel lemma, list.

MPIQHS : Modular polynomial mod ideal, quadratic Hensel lemma on a single variable. MPIQH : Modular polynomial mod ideal, quadratic Hensel lemma. MPMDP : Modular polynomial modular digit product. MPMON : Modular polynomial monic. MPNEG : Modular polynomial negative. MPPROD : Modular polynomial product. MPPSR : Modular polynomial pseudo-remainder. MPQR : Modular polynomial quotient and remainder. MPQ : Modular polynomial quotient. MPRES : Modular polynomial resultant. MPSPRS : Modular polynomial subresultant polynomial remainder sequence. MPSUM : Modular polynomial sum. MPUCPP : Modular polynomial univariate content and primitive part. MPUCS : Modular polynomial univariate content subroutine. MPUC : Modular polynomial univariate content. MPUPP : Modular polynomial univariate primitive part. MPUP : Modular polynomial univariate product. MPUQ : Modular polynomial univariate quotient. MPRAN : Modular polynomial, random. MUPBQP : Modular univariate polynomial Berlekamp q polynomials construction. MUPDER : Modular univariate polynomial derivative. MUPDDF : Modular univariate polynomial distinct degree factorization. MUPEGC : Modular univariate polynomial extended greatest common divisor. MUPFS : Modular univariate polynomial factorization, special. MUPFBL : Modular univariate polynomial factorization-Berlekamp algorithm. MUPGCD : Modular univariate polynomial greatest common divisor. MUPHEG : Modular univariate polynomial half-extended greatest common divisor. MUPRC : Modular univariate polynomial resultant and cofactor. MUPRES : Modular univariate polynomial resultant. MUPSFF : Modular univariate polynomial squarefree factorization. MUPRAN : Modular univariate polynomial, random. MDVHOM : Modular vector homomorphism. NAME : Name. NAME : Name. NEWQUE : New Queue. NewRep : New representation. NextParm : Next Parameter. OREAD : Object read. OWRITE : Object write. OCCURQ : Occurs test equal pointers. MASODD : Odd. ORDER : Order. MWRIT1 : Output in modula like syntax. MWRITE : Output in modula like syntax. OUT : Output. PACK : Pack character list. PACK : Pack character list. PAIR : Pair.

Aparse : Parse a set of ALDES-2 declarations and algorithms. Parse : Parse program and generate code. PARTSS : Partition sumset. PARTN : Partition, next. PARTR : Partition, random. PVDEMA : Permutation vector for degree matrix. PERMCY : Permutation, cyclic. PERMR : Permutation, random. PBCLI : Polynomial base coefficients list. PBIN : Polynomial binomial. PCL : Polynomial coefficient list. PCONST : Polynomial constant. PDEGV : Polynomial degree vector. PDEGSV : Polynomial degree, specified variable. PDEG : Polynomial degree. PDBORD : Polynomial divided by order. PDPV : Polynomial division by power of variable. PFDP : Polynomial from dense polynomial. PFDIP : Polynomial from distributive polynomial. PINV : Polynomial introduction of new variables. PLBCF : Polynomial leading base coefficient. PLDCF : Polynomial leading coefficient. PLFDIL : Polynomial list from distributive polynom list. PMDEG : Polynomial modified degree. PMON : Polynomial monomial. PMPMV : Polynomial multiplication by power of main variable. PMPV : Polynomial multiplication by power of variable. PORD : Polynomial order. PPERMV : Polynomial permutation of variables. PRT : Polynomial reciprocal transformation. PRED : Polynomial reductum. PSDSV : Polynomial special decomposition, specified variable. PTERM : Polynomial terms. PTBCF : Polynomial trailing base coefficient. PTYP : Polynomial typ. PUNT : Polynomial univariate test. PUFP : Polynomial, univariate, from polynomial. POWSEV : Power of variable symmetric product with exterior vector. PROCP : Procedure Pointer. PUT : Put. PUT : Put. MASQREM : Quotient and remainder. RFDEN : Rational function denominator. RFDIF : Rational function difference. RFEXP : Rational function exponentiation. RFFIP : Rational function from integral polynomial. RFINV : Rational function inverse. RFNEG : Rational function negative.

RFNOV : Rational function number of variables. RFNUM : Rational function numerator. RFONE : Rational function one. RFPROD : Rational function product. RFQ : Rational function quotient. RFREAD : Rational function read. RFRED : Rational function reduction to lowest terms. RFSIGN : Rational function sign. RFSUM : Rational function sum. RFWRIT : Rational function write. RIB : Rational interval bisection. RILC : Rational interval length comparison. RINT : Rational interval normalizing transformation. RIRNP : Rational interval rational number product. RIRWRT : Rational intervall refinement write. RNMLT : Rational matrix lower triangular matrix transformation. ôæRNMUT : Rational matrix upper triangular matrix transformation. RNABS : Rational number absolute value. RNBCR : Rational number binary common representation. RNCOMP : Rational number comparison. RNDRD : Rational number decimal read. RNDRD : Rational number decimal read. RNDWRS : Rational number decimal write special. RNDWR : Rational number decimal write. RNDWR : Rational number decimal write. RNDEN : Rational number denominator. RNDIF : Rational number difference. RNEXP : Rational number exponentiation. RNFCL2 : Rational number floor and ceiling of logarithm, base 2. RNFAP : Rational number from arbitrary precision floating point. RNFF : Rational number from floating point. RNINT : Rational number from integer. RNINV : Rational number inverse. RNMDET : Rational number matrix determinant, using Gaussian elimination. RNMDETL : Rational number matrix determinant, using Laplace expansion. RNMDIF : Rational number matrix difference. RNMFIM : Rational number matrix from integer matrix. RNMGELUD : Rational number matrix Gaussian elimination LU-decomposition. RNMGE : Rational number matrix Gaussian elimination. RNMHILBERT : Rational number matrix Hilbert. RNMINVI : Rational number matrix inversion, integer algorithm. RNMINV : Rational number matrix inversion. RNMMAX : Rational number matrix maximum norm. RNMPROD : Rational number matrix product. RNMREAD : Rational number matrix read. RNMSDS : Rational number matrix solve decomposed system. RNMSUM : Rational number matrix sum. RNMUNS : Rational number matrix upper triangular matrix solution null space.

RNMWRITE : Rational number matrix write. RNMAX : Rational number maximum. RNNEG : Rational number negative. RNNUM : Rational number numerator. RNONE : Rational number one. RNP2 : Rational number power of 2. RNPROD : Rational number product. RNQ : Rational number quotient. RNREAD : Rational number read. RNRED : Rational number reduction to lowest terms. RNSMPROD : Rational number scalar and matrix product. RNSIGN : Rational number sign. RNSUM : Rational number sum. RNUM : Rational number unit matrix. RNVDIF : Rational number vector difference. RNVFIV : Rational number vector from integer vector. RNVLC : Rational number vector linear combination. RNVMAX : Rational number vector maximum norm. RNSVPROD : Rational number vector product with scalar. RNVQ : Rational number vector quotient. RNVQF : Rational number vector quotient. RNVREAD : Rational number vector read. RNVSPROD : Rational number vector scalar product. RNVSSUM : Rational number vector scalar sum. RNVSVSUM : Rational number vector scalar sum. RNVSVPROD : Rational number vector scalar vector product. RNVVPROD : Rational number vector vector product. RNVVSUM : Rational number vector vector sum. RNVWRITE : Rational number vector write. RNWRIT : Rational number write. RNCEIL : Rational number, ceiling of. RNFLOR : Rational number, floor of. RNRAND : Rational number, random. RPBLGS : Rational polynomial base coefficients least common multiple, greatest common divisor, and sign. RPDMV : Rational polynomial derivative, main variable. RPDIF : Rational polynomial difference. RPEMV : Rational polynomial evaluation, main variable. RPFIP : Rational polynomial from integral polynomial. RPIMV : Rational polynomial integration, main variable. RPLWRS : Rational polynomial list write. RPMAIP : Rational polynomial monic associate of integral polynomial. RPNEG : Rational polynomial negative. RPONE : Rational polynomial one. RPPROD : Rational polynomial product. RPQR : Rational polynomial quotient and remainder. RPRNP : Rational polynomial rational number product. RPREAD : Rational polynomial read.

RPSUM : Rational polynomial sum. RPWRIT : Rational polynomial write. RPWRTS : Rational polynomial write. RUPMRN : Rational univariate polynomial minimal polynomial of a rational number. RED2 : Reductum 2. RED3 : Reductum 3. RED4 : Reductum 4. RED : Reductum. REDUCT : Reductum. MASREM : Remainder. REMPRP : Remove property. REMPRP : Remove property. SAVEPROCESS : Save current process. SACANF : SAC Algebraic Number Field Definition Module. SACBIOS : SAC Basic I/O System Definition Module. SACCOMB : SAC Combinatorical System Definition Module. SACDPOL : SAC Dense Polynomial Definition Module. SACD : SAC Digit Definition Module. SACEXT1 : SAC Extensions 1 Definition Module. SACEXT2 : SAC Extensions 2 Definition Module. SACEXT3 : SAC Extensions 3 Definition Module. SACEXT4 : SAC Extensions 4 Definition Module. SACEXT5 : SAC Extensions 5 Definition Module. SACEXT6 : SAC Extensions 6 Definition Module. SACEXT7 : SAC Extensions 7 Definition Module. SACPRIM : SAC Factorization and Prime Number Definition Module. SACI : SAC Integer Definition Module. SACIPOL : SAC Integer Polynomial System Definition Module. SACLDIO : SAC Linear Diophantine Equation System Definition Module. SACLIST : SAC List Processing Definition Module. SACM : SAC Modular Digit and Integer Definition Module. SACMPOL : SAC Modular Polynomial Definition Module. SACMUFAC : SAC Modular Univariate Polynomial Factorization Definition Module. SACPFAC : SAC Polynomial Factorization Definition Module. SACPGCD : SAC Polynomial GCD and RES System Definition Module. SACROOT : SAC Polynomial Real Root Definition Module. SACPOL : SAC Polynomial System Definition Module. SACRN : SAC Rational Number Definition Module. SACRPOL : SAC Rational Polynomial Definition Module. SACSET : SAC Set Definition Module. SACSYM2 : SAC Symbol 2 Definition Module. SACSYM : SAC Symbol System Definition Module. SACUPFAC : SAC Univariate Polynomial Factorization Definition Module. SECOND : Second. SCOMP : Set composition. SDIFF : Set difference. SFIRST : Set first. SFCS : Set from characteristic set.

SILINE : Set input line. SIUNIT : Set input unit. SINTER : Set intersection. SLELT : Set list element. SOLINE : Set output line. SOUNIT : Set output unit. SRED : Set reductum. SetRep : Set representation. SUNION : Set union. SETV : Set variable. SHUT : Shut. MASSIGN : Sign. Signature : Signature of a compiled function or procedure. SIN : Sinus. SQRT : Sqrt. STVL : Standard variable list. StepRep : Step through representation. SLIST : String from list. SWRITE : String write. SUBLIS : Substitution with list. SUBLIS : Substitution with list. SUFFIX : Suffix. Summary : Summary of stream IO. SymSummary : Summary of symbol system. SymSummary : Summary of symbol system. SwitchParse : Switch parsing between generic / non-generic parse. SMEMB : Symbol membership. SMEMB : Symbol membership. SREAD1 : Symbol read, 1. SREAD1 : Symbol read, 1. SREAD : Symbol read. SREAD : Symbol read. STCNT : Symbol table tree count. STCNT : Symbol table tree count. SYM2DIP : Symbol term to distributive polynomial. STBALS : Symbol tree balance subroutine. STBAL : Symbol tree balance. STINS : Symbol tree insertion. STINS : Symbol tree insertion. STLSTI : Symbol tree list, in-order. STLSTI : Symbol tree list, in-order. STLST : Symbol tree list. STLST : Symbol tree list. STNLST : Symbol tree nodes list. STSRCH : Symbol tree search. STSRCH : Symbol tree search. STWRT : Symbol tree write. STWRT : Symbol tree write.

SYWRIT : Symbol write. SYWRIT : Symbol write. SYMBOL : Symbol. SYMBOL : Symbol. SYMMFU : Symmetric functions definition module. SMFMI : Symmetric modular from modular integer. SMFMIP : Symmetric modular from modular integral polynomial. SDR : System of distinct representatives. SSYTBAL : System symbol tree balance. TAB : Tabulate. TAG : Tag object. TAN : Tangens. TFDIRP : Term from distributive rational polynomial. TVARS : Term variables. LAMBDAP : Test if expression S is a lambda form. SPECIALFORM : Test if expression S is a special form. SEXPRP : Test if X is a S-expression function. THIRD : Third. TIME : Time. TYPEOF : Type of S-expression. TYPOFTAG : Type of tagged object. MASLISPU : Types, S-Expresion Types and Indicators. UNIFY : Unification. UIPSIL : Univariate integral polynomial symmetric product with exterior index list. UIPSIV : Univariate integral polynomial symmetric product with exterior integral vector. UIPRS1 : Univariate integral polynomials resultant 1. UIPRES : Univariate integral polynomials resultant. UREAD : Universal read. UREAD : Universal read. UREAD : Universal read. UWRIT1 : Universal write, 1. UWRIT1 : Universal write, 1. UWRIT1 : Universal write, 1. UWRITE : Universal write. UWRITE : Universal write. UWRITE : Universal write. USCOMP : Unordered set composition. USETCT : Unordered set containment test. USDIFF : Unordered set difference. USINT : Unordered set intersection. USUN : Unordered set union. VALOFTAG : Value of tagged object. VLREAD : Variable list read. VLSRCH : Variable list search. VLWRIT : Variable list write. VREAD : Variable read. VCOMP : Vector comparison.

VDELEL : Vector delete element. VEL : Vector elements. VMAX : Vector maximum. VMIN : Vector maximum. VIDIF : Vector of integers difference. VILCOM : Vector of integers linear combination. VINEG : Vector of integers negation. VISPR : Vector of integers scalar product. VISUM : Vector of integers sum. VIAZ : Vector of integers, adjoin zeros. VIERED : Vector of integers, element reduction. VIUT : Vector of integers, unimodular transformation. VIPIIP : Vector of integral polynomials with vector of integers inner product. VMPIP : Vector of modular polynomial inner product.

*_{Index}

A

AADV 59 ACOMP 47 50 ACOMP1 47 50 ADV 35 ADV2 37 ADV3 37 ADV4 37 AFDIF 110 AFINV 110 AFNEG 110 AFPROD 110 AFQ 110 AFSIGN 110 AFSUM 110 APABS 54 Aparse 41 APCMPR 54 APCOMP 53 APDIFF 54 APEXP 54 APEXPT 53 APFINT 53 APFRN 54 APLG10 54 APMANT 53 APNEG 54 APNELD 54 APPI 55 APPROD 54 APQ 54 APROOT 55 APSHFT 53 APSIGN 53 APSPRE 53 APSUM 54 APWRIT 53 ARCTAN 55 AREAD 37 ARRAYDEC 47 ASSOC 47 50 ASSOCQ 47 50 ASSPR 56 ATOM 46 ATTRIB 47 50 AWRITE 37

B

BACKUB 68 BITRAN 58 BKSP 32 BLINES 32

C

CallCompiled 43 CCONC 37 CELLS 35 CINV 37 CLIN 68 CLOCK 35 CloseBIOS 32 CLOUT 37 CLTIS 34 Compiledf0 43 Compiledf1 43 Compiledf2 43 Compiledf3 43 Compiledf4 43 Compiledp0 43 Compiledp1 43 Compiledp1v2 43 Compiledp1v3 43 Compiledp2 43 Compiledp2v2 44 Compiledp2v3 44 Compiledp3 43 Compiledp3v2 44 Compiledp3v3 44 COMP 35 CompSummary 44 COMP2 37 COMP3 37 COMP4 37 CONC 38 COPYOB 126 CopyRep 45 COPYTOENV 41 COS 55 CPLEXN 111 CREADB 32 CREAD 32 CSFPAR 57 CSINT 57 CSSUB 57 CSUN 57 CUNIT 32 CWRITE 32 CWRIT2 36 CWRIT3 36 CWRIT4 36 CWRIT5 37 CWRIT6 37

D

DAND 57 DCENV 41 Declare 44 DECOFTAG 42 DEFE 42 DEFF 42 DEFMAP 42 DEFM 42 DEFPROC 42 DEFRULE 42 DEGCD 58 DEQUE 35 DGCD 58 DIBUFF 32 DIDIMS 105 DIGBC3 107 DIGBC4 107 DIGBMI 107 DIGBSI 108 DIGBZT 104 DIGFET 103 DIGISM 103 DIGISR 103 DIGIT 32 DIIFRP 74 DIILFR 74 DIILRD 74 DIILWR 74 DIIPAB 74 DIIPCP 74 DIIPDF 74 DIIPDM 75 DIIPDR 75 DIIPEM 75 DIIPEV 75 DIIPEX 75 DIIPHD 75 DIIPIP 75 DIIPIQ 75 DIIPLS 75 DIIPMN 75 DIIPNG 75 DIIPON 75 DIIPPR 75 DIIPPS 76 DIIPQ 76 DIIPQR 76 DIIPRA 76 DIIPRD 76 DIIPSG 76 DIIPSM 76 DIIPSN 76 DIIPSO 76 DIIPSU 76 DIIPSV 76 DIIPTM 76 DIIPTR 77 DIIPWR 77 DIIPWV 77 DIIRAS 77 DIITNT 108 DIITWR 108 DILBSO 68 DILCPL 107 DILDIM 104 DILFEL 130 DILFPL 68 DILUPL 107 DINCCO 130 DINCCP 130 DINCCPpre 130 DINCGB 132 DINLGB 132 DINLGM 132 DINLIS 131 DINLMPG 130 DINLMPL 131 DINLNF 131 DINLRD 130 DINLSP 131 DINPEX 129 DINPPR 129 DINPRD 130 DINPTL 129 DINPTslT 130 DINPTU 129 DINTFE 103 DINTSR 103 DINTSS 103 DINTWR 109 DINTZS 104 DIN1GB 132 DIPADM 68 DIPADS 68 DIPADV 69 DIPBSO 69 DIPCMP 69 DIPDEG 69 DIPDEM 81 DIPDEV 81 DIPDPV 69 DIPERM 69 DIPEVL 69 DIPEVP 69 DIPEXC 69 DIPFMO 69 DIPFP 69 DIPINV 70 DIPLBC 70 DIPLDC 70 DIPLDM 81 DIPLDV 105 DIPLM 70 DIPLPM 70 DIPLRS 70 DIPMAD 70 DIPMCP 70 DIPMPM 70 DIPMPV 70 DIPMRD 70 DIPMST 71 DIPNBC 71 DIPNOV 71 DIPRED 71 DIPTBC 71 DIPTCF 71 DIPTCS 71 DIPTDG 71 DIPTODEF 50 DIPTRM 81 DIPTYP 81 DIPUNT 71 DIPUV 71 DIPVDEF 49 DIPVOP 81 DIP2SYM 50 DIRFAC 105 DIRFIP 78 DIRGBA 107 DIRGBR 107 DIRGZS 104 DIRLCT 105 DIRLIP 105 DIRLIS 108 DIRLPD 104 DIRLPI 105 DIRLPW 104 DIRLRD 78 DIRLWR 78 DIRMPG 109 DIROWR 109 DIRPAB 78 DIRPDA 104 DIRPDF 78 DIRPDM 78 DIRPDR 78 DIRPEM 78 DIRPES 102 DIRPEV 78 DIRPEX 78 DIRPFT 50 DIRPGB 108 DIRPHD 78 DIRPLS 78 DIRPMC 79 DIRPMN 79 DIRPNF 108 DIRPNG 79 DIRPON 79 DIRPPR 79 DIRPQ 79 DIRPQR 79 DIRPRA 79 DIRPRD 79 DIRPRP 79 DIRPRQ 79 DIRPSE 102 DIRPSG 79 DIRPSM 79 DIRPSN 80 DIRPSO 80 DIRPSP 108 DIRPSR 102 DIRPSU 80 DIRPSV 80 DIRPTM 80 DIRPTR 80 DIRPWR 80 DIRPWV 80 DIRRAS 80 DITFZS 104 DITSPL 104 DLOG2 58 DMEVAD 81 DMIA 42 DMPPRD 82 DMPSUM 82 DMUPNR 82 DNIMP 57 DNOT 57 DoParse 49 DOR 57 DOS 34 35 DoWrite 49 DPCC 58 DPFP 82 DPGEN 64 DPR 58 DQR 59 DRAN 59 DRANN 59 DSPEC 42 DSQRTF 59

E

ECENV 41 EDIT 34 35 EIMWRT 126 EIVABS 126 EIVAPP 126 EIVCPP 126 EIVEPR 126 EIVFUP 126 EIVILP 126 EIVIP 127 EIVIQ 127 EIVIRP 127 EIVNEG 127 EIVPP 127 EIVSIG 127 EIVSUM 127 EIVWRT 127 ELEMP 46 EMPTYQUE 35 ENQUE 35 ENTER 47 50 EPREAD 71 EQUAL 38 ErrorHandler 35 ERROR 35 EVALUATE 46 EVASC 102 EVCADD 71 EVCOMP 71 EVCSUB 72 EVDEL 72 EVDER 72 EVDFSI 72 EVDIF 72 EVDOV 72 EVEXC 72 EVGBIT 105 EVGCD 131 EVIGLC 72 EVILCI 72 EVILCP 72 EVINV 131 EVITDC 72 EVLCM 73 EVLFCP 73 EVLGIL 131 EVLGTD 131 EVLINV 131 EVMT 73 EVNNZE 73 EVPLM 108 EVPLSO 108 EVRAND 73 EVRASP 73 EVSIGN 73 EVSU 73 EVSUM 73 EVTDEG 73 EVTSZ 131 EVZERO 130 EXIDET 127 EXIDT2 127 EXMHOM 127 EXPF 55 EXPLOD 47 50 EXTENDENV 41 EXTENT 38 EXVHOM 127

F

FEXP 55 FFGI 55 FFINT 55 FFRN 55 FIRST 36 FIRST2 38 FIRST3 38 FIRST4 38 FLOG10 55 ForEachinList 46 ForEachinRep 46 FOURTH 38 FRESL 64 FRLSM 64 FullRep 46

G

GBZSET 109 GDPGEN 64 GENARRAY 47 GENINDEX 47 GENPL 43 GENPROCESS 36 GENSYM 47 51 GENTE 43 GET 47 51 GetRep 45 GREAD 32 GWRITE 33

H

HDIFDI 82 HIPRAN 77

I

IABSF 59 IBCIND 57 IBCOEF 57 IBCPS 57 ICOMP 59 IDEGCD 59 IDIF 59 IDIPR2 59 IDPR 59 IDP2 59 IDQ 59 IDQR 60 IDREM 60 IEGCD 60 IEVEN 60 IEXP 60 IFACT 64 IFACTL 57 IFCL2 60 IFF 55 IFWRIT 106 IGCDCF 60 IGCD 60 IHEGCD 60 IIC 120 IJACS 127 IKM 93 ILADDC 128 ILCM 60 ILCOMB 60 ILEXPR 128 ILILPR 128 ILINPR 128 ILIRPR 128 ILOG10 53 ILOG2 60 ILPDS 64 ILSCMP 128 ILWCMP 128 ILWRIT 60 IMAX 60 IMDET 96 IMDETL 96 IMDIF 94 IMFRNM 95 IMFRNM1 95 IMGE 95 IMGELUD 95 IMIN 60 IMLT 95 IMMAX 94 IMPDS 64 IMPROD 94 IMP2 61 IMSDS 95 IMSUM 94 IMUNS 95 IMUT 95 IMWRITE 93 INDLST 128 INEG 61 InitExternalsA 44 InitExternalsB 44 InitExternalsC 45 InitExternalsD 45 InitExternalsI 50 InitExternals 44 InitExternalsL 45 InitExternalsU 49 INLWRT 128 INP 34 INV 36 IODD 61 IORD2 61 IPABS 82 IPCEVP 115 IPC 117 IPCPP 117 IPCRA 82 IPCSFB 112 IPDER 83 IPDIF 83 IPDMV 83 IPDSCR 112 IPEMV 83 IPEVAL 83 IPEXP 83 IPFAC 115 IPFCB 83 IPFLC 124 IPFRP 83 IPFSD 120 IPFSFB 113 IPGCDC 117 IPGFCB 116 IPGSUB 83 IPHDMV 83 IPIC 117 IPICPP 117 IPICS 117 IPIHOM 84 IPINT 112 IPIP 84 IPIPP 117 IPIPR 84 IPIQH 116 IPIQ 84 IPLCM 105 IPLCPP 113 IPLRRI 120 IPMAXN 84 IPNEG 84 IPONE 84 IPOWER 61 IPPGSD 117 IPPP 118 IPPROD 84 IPPSC 113 IPPSR 84 IPQ 84 IPQR 84 IPRAN 77 84 IPRCH 120 IPRCHS 120 IPRCNP 121 IPRCN1 121 IPREAD 85 IPRES 118 IPRICL 114 IPRIM 121 IPRIMO 121 IPRIMS 121 IPRIMU 121 IPRIU 122 IPRIUP 122 IPROD 56 61 IPRODK 61 IPRPRS 118 IPRRII 114 IPRRLS 122 IPRRRI 114 IPRRS 122 IPSCPP 118 IPSFBA 113 IPSF 118 IPSFSD 122 IPSIFI 114 IPSIGN 85 IPSMV 85 IPSPRS 118 IPSR 128 IPSRM 123 IPSRMS 123 IPSRP 118 IPSUB 85 IPSUM 85 IPSUMN 85 IPTPR 85 IPTRAN 85 IPTRMV 85 IPTRUN 85 IPVCHT 123 IPWRIT 85 IQ 61 IQR 61 IRAND 61 IREAD 61 IREM 61 IROOT 61 ISEG 61 ISFPF 116 ISFPIR 114 ISIGNF 61 ISMPROD 94 ISPD 64 ISPSFB 113 ISPT 64 ISQRT 62 ISSUM 62 ISUM 62 ITD 127 ITRUNC 62 IUM 93 IUPBEI 85 IUPBES 86 IUPBHT 86 IUPBRE 86 IUPCHT 86 IUPFAC 124 IUPFDS 124 IUPIHT 112 IUPNT 86 IUPQH 124 IUPQHL 124 IUPRB 123 IUPRC 113 IUPRLP 123 IUPTPR 86 IUPTR 86 IUPTR1 86 IUPVAR 123 IUPVOI 114 IUPVSI 123 IUSFPF 125 IVFRNV 94 IVFRNV1 94 IVHOM 128 IVLC 94 IVMAX 94 IVRAND 128 IVSPROD 94 IVSQ 94 IVSSUM 93 IVSVPROD 93 IVSVSUM 93 IVVDIF 93 IVVPROD 94 IVVSUM 93 IVWRITE 93 IWRITE 62 IXSUBS 105

K

KREISP 128

L

LAMBDAP 41 LAST 38 LBIBMS 66 LBIBS 66 LBIM 66 LBLXCO 82 LCONC 111 LDSMKB 99 LDSSBR 100 LEINST 38 LELT 38 LENGTH 36 LEQUAL 111 LEROT 38 LETTER 33 LEXNEX 57 LINS 38 LINSRT 38 LISTS 33 LISTVAR 36 LIST1 36 LIST10 38 LIST2 39 LIST3 39 LIST4 39 LIST5 39 LMERGE 111 LN 55 LOG 56 LPERM 57 68 LREAD 39 LSRCH 39 LWRITE 39

M

MAIPDE 100 MAIPDM 100 MAIPHM 100 MAIPP 100 MASABS 34 MASCHR 33 MASEVEN 34 MASEXP 34 MASMAX 34 MASMIN 34 MASODD 34 MASORDI 33 MASORD 33 MASQREM 34 MASREM 35 MASSIGN 35 MCPMV 114 MDCRA 62 MDDIF 62 MDELCOL 96 MDEXP 62 MDHOM 62 MDIM 96 MDINV 62 MDLCRA 62 MDNEG 62 MDPROD 63 MDQ 63 MDRAN 63 MDSUM 63 MDVHOM 128 MEMBER 39 MEMQ 46 MFILL 96 MGET 96 MIAIM 100 MICINS 100 MICS 100 MIDCRA 63 MIDIF 63 MIEXP 63 MIHOM 63 MIINV 63 MINEG 63 MINNCT 100 MIPDIF 86 MIPFSM 86 MIPHOM 86 MIPIPR 87 MIPISE 116 MIPNEG 87 MIPPR 87 MIPRAN 87 MIPROD 63 MIPSUM 87 MIQ 63 MIRAND 129 MIRAN 63 MISUM 63 MIUPQR 87 MIUPSE 115 MMDDET 100 MMDNSB 101 MMINOR 96 MMPDMA 101 MMPEV 101 MMPIQR 87 MPDIF 87 MPEMV 87 MPEVAL 87 MPEXP 88 MPGCDC 118 MPHOM 88 MPINT 88 MPIQH 116 MPIQHL 116 MPIQHS 117 MPMDP 88 MPMON 88 MPNEG 88 MPPROD 88 MPPSR 88 MPQ 88 MPQR 88 MPRAN 88 MPRES 118 MPSPRS 118 MPSUM 89 MPUC 119 MPUCPP 119 MPUCS 119 MPUP 89 MPUPP 119 MPUQ 89 MRANG 96 MSET 96 MTRANS 96 MUPBQP 115 MUPDDF 115 MUPDER 89 MUPEGC 119 MUPFBL 115 MUPFS 115 MUPGCD 119 MUPHEG 119 MUPRAN 89 MUPRC 113 MUPRES 119 MUPSFF 119 MWRITE 49 MWRIT1 49

N

NAME 48 51 NEWQUE 36 NewRep 45 NextParm 35

O

OCCURQ 46 ORDER 39 OREAD 39 OUT 34 OWRITE 39

P

PACK 48 51 PAIR 39 Parse 45 PARTN 58 PARTR 58 PARTSS 58 PBCLI 73 PBIN 89 PCL 89 PCONST 112 PDBORD 89 PDEG 90 PDEGSV 90 PDEGV 90 PDPV 90 PERMCY 111 PERMR 58 PFDIP 73 PFDP 90 PINV 90 PLBCF 90 PLDCF 90 PLFDIL 74 PMDEG 90 PMON 90 PMPMV 90 PMPV 74 PORD 90 POWSEV 129 PPERMV 74 PRED 90 PROCP 44 PRT 90 PSDSV 112 PTBCF 91 PTERM 82 PTYP 82 PUFP 91 PUNT 112 PUT 48 51 PVDEMA 82

R

RED 36 REDUCT 39 RED2 39 RED3 39 RED4 39 REMPRP 48 51 RFDEN 106 RFDIF 106 RFEXP 106 RFFIP 106 RFINV 106 RFNEG 106 RFNOV 106 RFNUM 106 RFONE 106 RFPROD 106 RFQ 106 RFREAD 106 RFRED 106 RFSIGN 107 RFSUM 107 RFWRIT 107 RIB 123 RILC 124 RINT 124 RIRNP 65 RIRWRT 109 RNABS 65 RNBCR 111 RNCEIL 65 RNCOMP 65 RNDEN 65 RNDIF 65 RNDRD 54 56 RNDWR 56 65 RNDWRS 56 RNEXP 56 RNFAP 54 RNFCL2 65 RNFF 55 RNFLOR 65 RNINT 65 RNINV 65 RNMAX 56 RNMDET 98 RNMDETL 99 RNMDIF 98 RNMFIM 97 RNMGE 98 RNMGELUD 99 RNMHILBERT 96 RNMINVI 95 RNMINV 99 RNMLT 99 RNMMAX 98 RNMPROD 98 RNMREAD 97 RNMSDS 99 RNMSUM 98 RNMUNS 99 RNMUT 99 RNMWRITE 97 RNNEG 65 RNNUM 65 RNONE 56 RNPROD 66 RNP2 66 RNQ 66 RNRAND 66 RNREAD 66 RNRED 66 RNSIGN 66 RNSMPROD 98 RNSUM 66 RNSVPROD 98 RNUM 97 RNVDIF 97 RNVFIV 97 RNVLC 98 RNVMAX 98 RNVQF 97 RNVQ 97 RNVREAD 97 RNVSPROD 98 RNVSSUM 97 RNVSVPROD 98 RNVSVSUM 97 RNVVPROD 98 RNVVSUM 97 RNVWRITE 97 RNWRIT 66 RPBLGS 119 RPDIF 91 RPDMV 112 RPEMV 91 RPFIP 91 RPIMV 92 RPLWRS 81 RPMAIP 112 RPNEG 92 RPONE 81 RPPROD 92 RPQR 92 RPREAD 92 RPRNP 92 RPSUM 92 RPWRIT 92 RPWRTS 81 RUPMRN 110

S

SAVEPROCESS 36 SCOMP 66 SDIFF 67 SDR 58 SECOND 39 SetRep 45 SETV 41 SEXPRP 42 SFCS 58 SFIRST 36 SHUT 34 Signature 44 SILINE 33 SIN 55 SINTER 67 SIUNIT 33 SLELT 40 SLIST 33 SMEMB 48 51 SMFMI 64 SMFMIP 89 SOLINE 33 SOUNIT 33 SPECIALFORM 41 SQRT 56 SREAD 48 51 SREAD1 48 51 SRED 36 SSYTBAL 52 STBAL 52 STBALS 52 STCNT 48 51 StepRep 45 STINS 48 51 STLSTI 48 51 STLST 48 51 STNLST 52 StorSummary 33 STSRCH 48 51 STVL 74 STWRT 48 52 SUBLIS 49 52 SUFFIX 40 Summary 33 SUNION 67 SwitchParse 45 SWRITE 33 SYMBOL 48 52 SymSummary 49 52 SYM2DIP 50 SYWRIT 49 52

T

TAB 33 TAG 42 TAN 55 TFDIRP 50 THIRD 40 TIME 36 TVARS 50 TYPEOF 42 TYPOFTAG 42

U

UIPRES 129 UIPRS1 129 UIPSIL 129 UIPSIV 129 UNIFY 47 UREAD 46 49 52 USCOMP 67 USDIFF 67 USETCT 105 USINT 67 USUN 67 UWRITE 46 49 52 UWRIT1 47 49 52

V

VALOFTAG 42 VCOMP 91 VDELEL 96 VEL 96 VIAZ 101 VIDIF 101 VIERED 101 VILCOM 101 VINEG 101 VIPIIP 77 VISPR 101 VISUM 101 VIUT 101 VLREAD 91 VLSRCH 91 VLWRIT 91 VMAX 91 VMIN 91 VMPIP 89 VREAD 91