Up Next Tail

### 1 Introduction

This document should explain some essential technical details for symbolic mode programming in REDUCE for those who have some experience in REDUCE algebraic programming and need to write a program in symbolic mode. For a general introduction to REDUCE please consult the REDUCE User’s Manual or one of the available books, e.g. “Algebraic computing with REDUCE” by Malcolm MacCallum and Francis Wright (Oxford Press).

This text cannot be complete, as the set of facilities available in REDUCE is so rich that it would take years to describe all and months to read and understand such text. So a good policy for entering the business of symbolic mode programming is to study the source files - the liberal REDUCE distribution policy simplifies this - and to understand those parts which contribute to the field which one would like to use. This text tries to collect in one place some of the wide spread basic information in order to facilitate your walk through the REDUCE mountains.

When should you write a program in symbolic mode? Symbolic programs are not a priori better than algebraic programs - the essential thing is the mathematics which they implement. A common prejudice is that symbolic programs are more “efficient”. This is true only if you can save in symbolic mode substantial algebraic evaluation steps. As long as most of the computing time is needed for a few big calculations steps (integrals, equation solving, polynomial gcd etc.) you will gain nothing when calling the same procedures from symbolic mode. However, if you need structures which are not present in algebraic mode or if you can design an evaluation avoiding lots of conversions, the step to symbolic mode programming is justified.

As it is very difficult to design non trivial but short examples for symbolic mathematical programming no attempt has been made in that direction. The examples in this text all are silly - please look at the sources of REDUCE for meaningful material. The following pieces of the sources are good points for first reading as they provide a substantial functionality within a few pages of code:

1. module polrep in package poly: routines addf, addd and addm, the heart of standard form and standard quotient arithmetic,
2. module det of package matrix: internal arithmetic with symbolic entities (standard quotients) and clever local data structure,
3. module rational in package poly: implementation of a typical REDUCE domain,
4. module maxmin in package alg: a typical simplification routine for an operator,
5. module algbool in package alg: demonstrates how to supply “small” pieces of symbolic code for algebraic use.

For symbolic mode programming you will urgently need the Standard LISP Report which describes the basic LISP functions; these will be available under all REDUCE implementations and they guarantee an optimum of portability. However, in the course of the years REDUCE has imported some additional functions on the LISP level – they have been implemented on top of Standard LISP and live in the module support of the package rlisp.red. In order to prevent the reinvention of the wheel these functions are described in the appendix as an extension to the Standard LISP Report.

The description is based on the recent version of REDUCE. Some of the described features are not available in earlier versions.

 Up Next Front

Services provided by
SourceForge