REDUCE
User’s Manual
Version 3.8 Anthony C. Hearn
Santa Monica, CA, USA

Email: reduce@rand.org

February 2004

Copyright ©2004 Anthony C. Hearn. All rights reserved.

Registered system holders may reproduce all or any part of this publication for internal purposes, provided that the source of the material is clearly acknowledged, and the copyright notice is retained.

Contents
Abstract
Abstract
Acknowledgment
1 Introductory Information
2 Structure of Programs
 2.1 The REDUCE Standard Character Set
 2.2 Numbers
 2.3 Identifiers
 2.4 Variables
 2.5 Strings
 2.6 Comments
 2.7 Operators
3 Expressions
 3.1 Scalar Expressions
 3.2 Integer Expressions
 3.3 Boolean Expressions
 3.4 Equations
 3.5 Proper Statements as Expressions
4 Lists
 4.1 Operations on Lists
5 Statements
 5.1 Assignment Statements
 5.2 Group Statements
 5.3 Conditional Statements
 5.4 FOR Statements
 5.5 WHILE …DO
 5.6 REPEAT …UNTIL
 5.7 Compound Statements
6 Commands and Declarations
 6.1 Array Declarations
 6.2 Mode Handling Declarations
 6.3 END
 6.4 BYE Command
 6.5 SHOWTIME Command
 6.6 DEFINE Command
7 Built-in Prefix Operators
 7.1 Numerical Operators
 7.2 Mathematical Functions
 7.3 DF Operator
 7.4 INT Operator
 7.5 LENGTH Operator
 7.6 MAP Operator
 7.7 MKID Operator
 7.8 PF Operator
 7.9 SELECT Operator
 7.10 SOLVE Operator
 7.11 Even and Odd Operators
 7.12 Linear Operators
 7.13 Non-Commuting Operators
 7.14 Symmetric and Antisymmetric Operators
 7.15 Declaring New Prefix Operators
 7.16 Declaring New Infix Operators
 7.17 Creating/Removing Variable Dependency
8 Display and Structuring of Expressions
 8.1 Kernels
 8.2 The Expression Workspace
 8.3 Output of Expressions
 8.4 Changing the Internal Order of Variables
 8.5 Obtaining Parts of Algebraic Expressions
9 Polynomials and Rationals
 9.1 Controlling the Expansion of Expressions
 9.2 Factorization of Polynomials
 9.3 Cancellation of Common Factors
 9.4 Working with Least Common Multiples
 9.5 Controlling Use of Common Denominators
 9.6 REMAINDER Operator
 9.7 RESULTANT Operator
 9.8 DECOMPOSE Operator
 9.9 INTERPOL operator
 9.10 Obtaining Parts of Polynomials and Rationals
 9.11 Polynomial Coefficient Arithmetic
10 Substitution Commands
 10.1 SUB Operator
 10.2 LET Rules
 10.3 Rule Lists
 10.4 Asymptotic Commands
11 File Handling Commands
 .1IN Command
 .2OUT Command
 .3SHUT Command
12 Commands for Interactive Use
 12.1 Referencing Previous Results
 12.2 Interactive Editing
 12.3 Interactive File Control
13 Matrix Calculations
 13.1 MAT Operator
 13.2 Matrix Variables
 13.3 Matrix Expressions
 13.4 Operators with Matrix Arguments
 13.5 Matrix Assignments
 13.6 Evaluating Matrix Elements
14 Procedures
 14.1 Procedure Heading
 14.2 Procedure Body
 14.3 Using LET Inside Procedures
 14.4 LET Rules as Procedures
15 User Contributed Packages
 15.1 ALGINT: Integration of square roots
 15.2 APPLYSYM: Infinitesimal symmetries of differential equations
 15.3 ARNUM: An algebraic number package
 15.4 ASSIST: Useful utilities for various applications
 15.5 AVECTOR: A vector algebra and calculus package
 15.6 BOOLEAN: A package for boolean algebra
 15.7 CALI: A package for computational commutative algebra
 15.8 CAMAL: Calculations in celestial mechanics
 15.9 CHANGEVR: Change of Independent Variable(s) in DEs
 15.10 COMPACT: Package for compacting expressions
 15.11 CRACK: Solving overdetermined systems of PDEs or ODEs
 15.12 CVIT: Fast calculation of Dirac gamma matrix traces
 15.13 DEFINT: A definite integration interface
 15.14 DESIR: Differential linear homogeneous equation solutions in the neighborhood of irregular and regular singular points
 15.15 DFPART: Derivatives of generic functions
 15.16 DUMMY: Canonical form of expressions with dummy variables
 15.17 EXCALC: A differential geometry package
 15.18 FIDE: Finite difference method for partial differential equations
 15.19 FPS: Automatic calculation of formal power series
 15.20 GENTRAN: A code generation package
 15.21 GNUPLOT: Display of functions and surfaces
 15.22 GROEBNER: A Gröbner basis package
 15.23 IDEALS: Arithmetic for polynomial ideals
 15.24 INEQ: Support for solving inequalities
 15.25 INVBASE: A package for computing involutive bases
 15.26 LAPLACE: Laplace transforms
 15.27 LIE: Functions for the classification of real n-dimensional Lie algebras
 15.28 LIMITS: A package for finding limits
 15.29 LINALG: Linear algebra package
 15.30 MODSR: Modular solve and roots
 15.31 NCPOLY: Non–commutative polynomial ideals
 15.32 NORMFORM: Computation of matrix normal forms
 15.33 NUMERIC: Solving numerical problems
 15.34 ODESOLVE: Ordinary differential equations solver
 15.35 ORTHOVEC: Manipulation of scalars and vectors
 15.36 PHYSOP: Operator calculus in quantum theory
 15.37 PM: A REDUCE pattern matcher
 15.38 RANDPOLY: A random polynomial generator
 15.39 REACTEQN: Support for chemical reaction equation systems
 15.40 RESET: Code to reset REDUCE to its initial state
 15.41 RESIDUE: A residue package
 15.42 RLFI: REDUCE LaTeX formula interface
 15.43 ROOTS: A REDUCE root finding package
 15.44 RSOLVE: Rational/integer polynomial solvers
 15.45 SCOPE: REDUCE source code optimization package
 15.46 SETS: A basic set theory package
 15.47 SPDE: Finding symmetry groups of PDE’s
 15.48 SPECFN: Package for special functions
 15.49 SPECFN2: Package for special special functions
 15.50 SUM: A package for series summation
 15.51 SYMMETRY: Operations on symmetric matrices
 15.52 TAYLOR: Manipulation of Taylor series
 15.53 TPS: A truncated power series package
 15.54 TRI: TeX REDUCE interface
 15.55 TRIGSIMP: Simplification and factorization of trigonometric and hyperbolic functions
 15.56 WU: Wu algorithm for polynomial systems
 15.57 XCOLOR: Color factor in some field theories
 15.58 XIDEAL: Gröbner Bases for exterior algebra
 15.59 ZEILBERG: A package for indefinite and definite summation
 15.60 ZTRANS: Z-transform package
16 Symbolic Mode
 16.1 Symbolic Infix Operators
 16.2 Symbolic Expressions
 16.3 Quoted Expressions
 16.4 Lambda Expressions
 16.5 Symbolic Assignment Statements
 16.6 FOR EACH Statement
 16.7 Symbolic Procedures
 16.8 Standard Lisp Equivalent of Reduce Input
 16.9 Communicating with Algebraic Mode
 16.10 Rlisp ’88
 16.11 References
17 Calculations in High Energy Physics
 17.1 High Energy Physics Operators
 17.2 Vector Variables
 17.3 Additional Expression Types
 17.4 Trace Calculations
 17.5 Mass Declarations
 17.6 Example
 17.7 Extensions to More Than Four Dimensions
18 REDUCE and Rlisp Utilities
 18.1 The Standard Lisp Compiler
 18.2 Fast Loading Code Generation Program
 18.3 The Standard Lisp Cross Reference Program
 18.4 Prettyprinting Reduce Expressions
 18.5 Prettyprinting Standard Lisp S-Expressions
19 Maintaining REDUCE
A Reserved Identifiers
Index

Services provided by