User’s Manual
Free Version

Anthony C. Hearn and Rainer Schöpf

February 18, 2017

Copyright ©2004–2017 Anthony C. Hearn, Rainer Schöpf and contributors to the Reduce project. All rights reserved.

Reproduction of this manual is allowed, provided that the source of the material is clearly acknowledged, and the copyright notice is retained.

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.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.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 Bernoulli Numbers and Euler Numbers
 7.4 Fibonacci Numbers and Fibonacci Polynomials
 7.5 Motzkin numbers
 7.6 CHANGEVAR operator
 7.8 DF Operator
 7.9 INT Operator
 7.10 LENGTH Operator
 7.11 MAP Operator
 7.12 MKID Operator
 7.13 The Pochhammer Notation
 7.14 PF Operator
 7.15 SELECT Operator
 7.16 SOLVE Operator
 7.17 Even and Odd Operators
 7.18 Linear Operators
 7.19 Non-Commuting Operators
 7.20 Symmetric and Antisymmetric Operators
 7.21 Declaring New Prefix Operators
 7.22 Declaring New Infix Operators
 7.23 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
 9.12 ROOT_VAL Operator
10 Assigning and Testing Algebraic Properties
 10.1 REALVALUED Declaration and Check
 10.2 Declaring Expressions Positive or Negative
11 Substitution Commands
 11.1 SUB Operator
 11.2 LET Rules
 11.3 Rule Lists
 11.4 Asymptotic Commands
12 File Handling Commands
 12.1 IN Command
 12.2 OUT Command
 12.3 SHUT Command
13 Commands for Interactive Use
 13.1 Referencing Previous Results
 13.2 Interactive Editing
 13.3 Interactive File Control
14 Matrix Calculations
 14.1 MAT Operator
 14.2 Matrix Variables
 14.3 Matrix Expressions
 14.4 Operators with Matrix Arguments
 14.5 Matrix Assignments
 14.6 Evaluating Matrix Elements
15 Procedures
 15.1 Procedure Heading
 15.2 Procedure Body
 15.3 Matrix-valued Procedures
 15.4 Using LET Inside Procedures
 15.5 LET Rules as Procedures
 15.6 REMEMBER Statement
16 User Contributed Packages
 16.1 ALGINT: Integration of square roots
 16.2 APPLYSYM: Infinitesimal symmetries of differential equations
 16.3 ARNUM: An algebraic number package
 16.4 ASSERT: Dynamic Verification of Assertions on Function Types
 16.5 ASSIST: Useful utilities for various applications
 16.6 AVECTOR: A vector algebra and calculus package
 16.7 BIBASIS: A Package for Calculating Boolean Involutive Bases
 16.8 BOOLEAN: A package for boolean algebra
 16.9 CALI: A package for computational commutative algebra
 16.10 CAMAL: Calculations in celestial mechanics
 16.11 CANTENS: A Package for Manipulations and Simplifications of Indexed Objects
 16.12 CDE: A package for integrability of PDEs
 16.13 CDIFF: A package for computations in geometry of Differential Equations
 16.14 CGB: Computing Comprehensive Gröbner Bases
 16.15 COMPACT: Package for compacting expressions
 16.16 CRACK: Solving overdetermined systems of PDEs or ODEs
 16.17 CVIT: Fast calculation of Dirac gamma matrix traces
 16.18 DEFINT: A definite integration interface
 16.19 DESIR: Differential linear homogeneous equation solutions in the neighborhood of irregular and regular singular points
 16.20 DFPART: Derivatives of generic functions
 16.21 DUMMY: Canonical form of expressions with dummy variables
 16.22 EXCALC: A differential geometry package
 16.23 FIDE: Finite difference method for partial differential equations
 16.24 FPS: Automatic calculation of formal power series
 16.25 GCREF: A Graph Cross Referencer
 16.26 GENTRAN: A code generation package
 16.27 GNUPLOT: Display of functions and surfaces
 16.28 GROEBNER: A Gröbner basis package
 16.29 GUARDIAN: Guarded Expressions in Practice
 16.30 IDEALS: Arithmetic for polynomial ideals
 16.31 INEQ: Support for solving inequalities
 16.32 INVBASE: A package for computing involutive bases
 16.33 LALR: A parser generator
 16.34 LAPLACE: Laplace transforms
 16.35 LIE: Functions for the classification of real n-dimensional Lie algebras
 16.36 LIMITS: A package for finding limits
 16.37 LINALG: Linear algebra package
 16.38 LISTVECOPS: Vector operations on lists
 16.39 LPDO: Linear Partial Differential Operators
 16.40 MODSR: Modular solve and roots
 16.41 NCPOLY: Non–commutative polynomial ideals
 16.42 NORMFORM: Computation of matrix normal forms
 16.43 NUMERIC: Solving numerical problems
 16.44 ODESOLVE: Ordinary differential equations solver
 16.45 ORTHOVEC: Manipulation of scalars and vectors
 16.46 PHYSOP: Operator calculus in quantum theory
 16.47 PM: A REDUCE pattern matcher
 16.48 POLYDIV: Enhanced Polynomial Division
 16.49 QSUM: Indefinite and Definite Summation of q-hypergeometric Terms
 16.50 RANDPOLY: A random polynomial generator
 16.51 RATAPRX: Rational Approximations Package for REDUCE
 16.52 REACTEQN: Support for chemical reaction equation systems
 16.53 REDLOG: Extend REDUCE to a computer logic system
 16.54 RESET: Code to reset REDUCE to its initial state
 16.55 RESIDUE: A residue package
 16.56 RLFI: REDUCE LATEX formula interface
 16.57 ROOTS: A REDUCE root finding package
 16.58 RSOLVE: Rational/integer polynomial solvers
 16.59 RTRACE: Tracing in REDUCE
 16.60 SCOPE: REDUCE source code optimization package
 16.61 SETS: A basic set theory package
 16.62 SPARSE: Sparse Matrix Calculations
 16.63 SPDE: Finding symmetry groups of PDE’s
 16.64 SPECFN: Package for special functions
 16.65 SPECFN2: Package for special special functions
 16.66 SSTOOLS: Computations with supersymmetric algebraic and differential expressions
 16.67 SUM: A package for series summation
 16.68 SYMMETRY: Operations on symmetric matrices
 16.69 TAYLOR: Manipulation of Taylor series
 16.70 TPS: A truncated power series package
 16.71 TRI: TeX REDUCE interface
 16.72 TRIGSIMP: Simplification and factorization of trigonometric and hyperbolic functions
 16.73 TURTLE: Turtle Graphics Interface for REDUCE
 16.74 WU: Wu algorithm for polynomial systems
 16.75 XCOLOR: Color factor in some field theories
 16.76 XIDEAL: Gröbner Bases for exterior algebra
 16.77 ZEILBERG: Indefinite and definite summation
 16.78 ZTRANS: Z-transform package
17 Symbolic Mode
 17.1 Symbolic Infix Operators
 17.2 Symbolic Expressions
 17.3 Quoted Expressions
 17.4 Lambda Expressions
 17.5 Symbolic Assignment Statements
 17.6 FOR EACH Statement
 17.7 Symbolic Procedures
 17.8 Standard Lisp Equivalent of Reduce Input
 17.9 Communicating with Algebraic Mode
 17.10 Rlisp ’88
 17.11 References
18 Calculations in High Energy Physics
 18.1 High Energy Physics Operators
 18.2 Vector Variables
 18.3 Additional Expression Types
 18.4 Trace Calculations
 18.5 Mass Declarations
 18.6 Example
 18.7 Extensions to More Than Four Dimensions
19 REDUCE and Rlisp Utilities
 19.1 The Standard Lisp Compiler
 19.2 Fast Loading Code Generation Program
 19.3 The Standard Lisp Cross Reference Program
 19.4 Prettyprinting Reduce Expressions
 19.5 Prettyprinting Standard Lisp S-Expressions
20 Maintaining REDUCE
A Reserved Identifiers
B Bibliography
C Changes since Version 3.8