Abstract: These lectures give a brief introduction to the Computer Algebra systems Reduce and Maple. The aim is to provide a systematic survey of most important commands and concepts. In particular, this includes a discussion of simplification schemes and the handling of simplification and substitution rules (e.g., a Lie Algebra is implemented in Reduce by means of simplification rules). Another emphasis is on the different implementations of tensor calculi and the exterior calculus by Reduce and Maple and their application in Gravitation theory and Differential Geometry. I held the lectures at the Universidad Autonoma Metropolitana-Iztapalapa, Departamento de Fisica, Mexico, in November 1999.
Introduction: The Rosetta Stone of CAS
For researchers in theoretical physics and applied mathematics, symbolic computation is an essential tool, yet the learning curve for Computer Algebra Systems (CAS) can be steep. Most documentation focuses on basic mathematical operators—what author Marc Toussaint categorizes as "Group A" commands. This paper addresses the critical gap in understanding "Group B, C, and D" commands: the underlying logic of how a system defines rules, simplifies expressions, and exports results into usable formats like LaTeX or Fortran.
By providing a pedagogical comparison of Reduce and Maple, this work serves as a "Rosetta Stone" for researchers navigating these symbolic environments. It highlights their divergent philosophies—automatic rule-based simplification versus explicit procedural commands—to help users choose the most effective tool for complex tasks in high-energy physics and gravitation.
Comparative Methodology
The paper is structured as a comparative tutorial, breaking down the functionality of both systems into four primary categories:
- Operators: Forming mathematical expressions.
- Definitions: Managing assignments, aliases, and assumptions.
- Simplification/Solving: The core engine that processes algebraic logic.
- Output: Generating plots or formatted code.
The author employs a "learning by doing" approach, providing side-by-side code examples. A significant portion of the methodology is dedicated to Tensor Calculus, comparing Maple’s specialized tensor and GRTensor packages against Reduce’s Excalc package.
Divergent Philosophies of Simplification
The most striking difference between the two systems lies in their fundamental "thought" processes. Reduce is an automatic reformulation engine. It utilizes global "switches" to automatically simplify every input according to the user's current configuration. For example, a user can toggle switches like exp to expand expressions or mcd to find common denominators globally.
In contrast, Maple—influenced by the C programming language—is more literal. It generally returns exactly what was typed unless the user explicitly invokes a command such as simplify() or expand(). This distinction extends to how variables are handled: in Reduce, the command `a := a$` is a critical tool to force the system to re-evaluate a variable under a new set of global rules. Conversely, Maple excels in handling assumptions on unassigned names (e.g., "assume $x > 0$"), allowing it to simplify expressions like $\sqrt{x^2}$ to $x$ based on logical constraints.
Practical Applications in Theoretical Physics
The utility of these systems is demonstrated through several complex "mini-projects" relevant to physics research:
- The Schwarzschild Metric: The paper concludes with a step-by-step derivation of the Schwarzschild solution to the Einstein equations. It contrasts Maple’s structured
GRTensorentry utility with Reduce’s more manual, transparent calculation using arrays or theExcalcpackage. - Poincaré Group: The author provides code to prove the Casimirs of the Poincaré group in Reduce, showcasing the system's ability to handle non-commuting operators.
- Fractal Generation: Both systems are shown generating Julia Set data for export to external visualization tools like Gnuplot.
While Maple offers powerful, structured packages for General Relativity, the author notes that Reduce’s Excalc package is particularly "beautiful" because its syntax closely mirrors standard mathematical notation for exterior forms and tensors.
Conclusion and Historical Context
Originally written in 1999 and updated in 2001, these notes provide a snapshot of a pivotal era in symbolic computation. While they do not cover modern developments like Python’s SymPy or the latest versions of Mathematica, the fundamental comparison of automatic versus explicit simplification remains highly relevant.
The paper concludes that while Maple’s graphical "worksheet" interface is user-friendly, Reduce’s LISP-based roots make it exceptionally efficient for batch processing and "piping" files in Unix environments. However, Maple's simplify command can sometimes struggle with user-defined objects like tensors unless applied component-wise, a nuance that researchers must account for in their workflows.
Summary updated