REDUCE

REDUCE
User’s Manual
Free Version

Anthony C. Hearn and Rainer Schöpf

https://reduce-algebra.sourceforge.io/

March 29, 2024

Copyright ©2004–2024 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.

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 Timing Facilities
 6.6 DEFINE Command
 6.7 RESETREDUCE Command
7 Built-in Prefix Operators
 7.1 Numerical Operators
 7.2 Mathematical Functions
 7.3 Combinatorial Numbers
 7.4 Bernoulli, Euler and Fibonacci Numbers
 7.5 CHANGEVAR Operator
 7.6 CONTINUED_FRACTION Operator
 7.7 DF Operator
 7.8 INT Operator
 7.9 LENGTH Operator
 7.10 LIMIT Operator
 7.11 MAP Operator
 7.12 MKID Operator
 7.13 The Pochhammer Notation
 7.14 PF Operator
 7.15 RESIDUE and POLEORDER Operators
 7.16 SELECT Operator
 7.17 SOLVE Operator
 7.18 Support for Solving Inequalities
 7.19 Finding Rational or Integer Zeros
 7.20 Modular Solve and Roots
 7.21 Even and Odd Operators
 7.22 Linear Operators
 7.23 Non-Commuting Operators
 7.24 Symmetric and Antisymmetric Operators
 7.25 Declaring New Prefix Operators
 7.26 Declaring New Infix Operators
 7.27 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
 8.6 COMPACT Operator
 8.7 TRIGSIMP package
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 Euclidean Division
 9.7 Polynomial Pseudo-Division
 9.8 RESULTANT Operator
 9.9 DECOMPOSE Operator
 9.10 INTERPOL Operator
 9.11 Obtaining Parts of Polynomials and Rationals
 9.12 Polynomial Coefficient Arithmetic
 9.13 Finding Roots
10 Assigning and Testing Algebraic Properties
 10.1 REALVALUED Declaration and Check
 10.2 SELFCONJUGATE Declaration
 10.3 Declaring Complex Conjugates
 10.4 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 IN_TEX Command
 12.3 OUT Command
 12.4 SHUT Command
 12.5 Using Variables as Filenames
 12.6 REDUCE Startup File
13 Commands for Interactive Use
 13.1 Error Handling: errcont, retry
 13.2 Referencing Previous Results: input, ws, display
 13.3 Interactive Editing: ed, editdef
 13.4 Interactive File Control: int, pause, cont
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- and List-valued Procedures
 15.4 Using LET Inside Procedures
 15.5 LET Rules as Procedures
 15.6 REMEMBER Statement
16 Series Expansion
 16.1 Taylor Expansion
 16.2 TPS: Extendible Power Series
 16.3 FPS: Automatic Calculation of Formal Power Series
17 Solving Numerical Problems
 17.1 Syntax
 17.2 Minima
 17.3 Roots of Functions / Solutions of Equations
 17.4 Integrals
 17.5 Ordinary Differential Equations
 17.6 Bounds of a Function
 17.7 Chebyshev Curve Fitting
 17.8 General Curve Fitting
18 Graphical Display
 18.1 GNUPLOT: Display of Functions and Surfaces
 18.2 Turtle Graphics
19 Tracing in REDUCE
 19.1 Introduction
 19.2 RTrace versus RDebug
 19.3 Procedure Tracing: RTR, UNRTR
 19.4 Assignment Tracing: RTRST, UNRTRST
 19.5 Tracing Active Rules: TRRL, UNTRRL
 19.6 Tracing Inactive Rules: TRRLID, UNTRRLID
 19.7 Output Control: RTROUT
20 User Contributed Packages
 20.1 APPLYSYM: Infinitesimal Symmetries of Differential Equations
 20.2 ASSIST: Useful Utilities for Various Applications
 20.3 ATENSOR: A REDUCE Program for Tensor Simplification
 20.4 AVECTOR: A Vector Algebra and Calculus Package
 20.5 BIBASIS: A Package for Calculating Boolean Involutive Bases
 20.6 BOOLEAN: A Package for Boolean Algebra
 20.7 CALI: A Package for Computational Commutative Algebra
 20.8 CAMAL: Calculations in Celestial Mechanics
 20.9 CANTENS: A Package for Manipulations and Simplifications of Indexed Objects
 20.10 CDE: A Package for Integrability of PDEs
 20.11 CDIFF: A Package for Computations in Geometry of Differential Equations
 20.12 CGB: Computing Comprehensive Gröbner Bases
 20.13 COEFF2: A Variant of the coeff Operator
 20.14 CRACK: Solving Overdetermined Systems of PDEs or ODEs
 20.15 DESIR: Differential Linear Homogeneous Equation Solutions in the Neighborhood of Irregular and Regular Singular Points
 20.16 DFPART: Derivatives of Generic Functions
 20.17 DUMMY: Canonical Form of Expressions
with Dummy Variables

 20.18 EDS: A Package for Exterior Differential Systems
 20.19 ELLIPFN: A Package for Elliptic Functions and Integrals
 20.20 EXCALC: A Differential Geometry Package
 20.21 FIDE: Finite Difference Method for Partial Differential Equations
 20.22 GCREF: A Graph Cross Referencer
 20.23 GENTRAN: A Code Generation Package
 20.24 GRINDER: Calculation of three-loop diagrams in Heavy Quark Effective Theory
 20.25 GROEBNER: A Gröbner Basis Package
 20.26 GUARDIAN: Guarded Expressions in Practice
 20.27 IDEALS: Arithmetic for Polynomial Ideals
 20.28 INVBASE: A Package for Computing Involutive Bases
 20.29 LALR: A Parser Generator
 20.30 LAPLACE: Laplace Transforms
 20.31 LIE: Functions for the Classification of Real \(n\)-Dimensional Lie Algebras
 20.32 LINALG: Linear Algebra Package
 20.33 LISTVECOPS: Vector Operations on Lists
 20.34 LPDO: Linear Partial Differential Operators
 20.35 MRVLIMIT: A New Exp-Log Limits Package
 20.36 NCPOLY: Non-commutative Polynomial Ideals
 20.37 NORMFORM: Computation of
Matrix Normal Forms

 20.38 ODESOLVE: Ordinary Differential Equation Solver
 20.39 ORTHOVEC: Manipulation of Scalars and Vectors
 20.40 PHYSOP: Operator Calculus in Quantum Theory
 20.41 PM: A REDUCE Pattern Matcher
 20.42 QHULL: Compute the Complex Hull
 20.43 QSUM: Indefinite and Definite Summation of q-Hypergeometric Terms
 20.44 RANDPOLY: A Random Polynomial Generator
 20.45 RATAPRX: Rational Approximations Package for REDUCE
 20.46 RATINT: Integrate Rational Functions using the Minimal Algebraic Extension to the Constant Field
 20.47 REACTEQN: Support for Chemical Reaction Equation Systems
 20.48 REDLOG: Extend REDUCE to a Computer Logic System
 20.49 RLFI: REDUCE LaTeX Formula Interface
 20.50 SCOPE: REDUCE Source Code Optimization Package
 20.51 SETS: A Basic Set Theory Package
 20.52 SPARSE: Sparse Matrix Calculations
 20.53 SPDE: Finding Symmetry Groups of PDEs
 20.54 SPECFN: Package for Special Functions
 20.55 SPECFN2: Package for Special Special Functions
 20.56 SSTOOLS: Computations with Supersymmetric Algebraic and Differential Expressions
 20.57 SUM: A Package for Series Summation
 20.58 SYMMETRY: Operations on Symmetric Matrices
 20.59 TRI: TeX REDUCE Interface
 20.60 TRIGD: Trigonometrical Functions with Degree Arguments
 20.61 TRIGINT: Weierstraß Substitution in REDUCE
 20.62 WU: Wu Algorithm for Polynomial Systems
 20.63 XCOLOR: Color Factor in some Field Theories
 20.64 XIDEAL: Gröbner Bases for Exterior Algebra
 20.65 ZEILBERG: Indefinite and Definite Summation
 20.66 ZTRANS: Z-Transform Package
21 Symbolic Mode
 21.1 Symbolic Infix Operators
 21.2 Symbolic Expressions
 21.3 Quoted Expressions
 21.4 Lambda Expressions
 21.5 Symbolic Assignment Statements
 21.6 FOR EACH Statement
 21.7 Symbolic Procedures
 21.8 Standard Lisp Equivalent of REDUCE Input
 21.9 Communicating with Algebraic Mode
 21.10 Rlisp ’88
 21.11 References
22 Calculations in High Energy Physics
 22.1 High Energy Physics Operators
 22.2 Vector Variables
 22.3 Additional Expression Types
 22.4 Trace Calculations
 22.5 Mass Declarations
 22.6 Example
 22.7 Extensions to More Than Four Dimensions
 22.8 The CVIT algorithm
23 REDUCE and Rlisp Utilities
 23.1 The Standard Lisp Compiler
 23.2 Fast Loading Code Generation Program
 23.3 The Standard Lisp Cross Reference Program
 23.4 Prettyprinting REDUCE Expressions
 23.5 Prettyprinting Standard Lisp S-Expressions
24 Maintaining REDUCE
A Reserved Identifiers
 A.1 Commands
 A.2 Boolean Operators
 A.3 Infix Operators
 A.4 Numerical Operators
 A.5 Prefix Operators
 A.6 Reserved Variables
 A.7 Switches
 A.8 Other Reserved Ids
B Bibliography
C Changes since Version 3.8
D Description of Algorithms
 D.1 Definite Integration
 D.2 The CVIT package
Index
 Symbols
 A
 B
 C
 D
 E
 F
 G
 H
 I
 J
 K
 L
 M
 N
 O
 P
 Q
 R
 S
 T
 U
 V
 W
 X
 Y
 Z

Hosted by Download REDUCE Powered by MathJax