On Mon, Sep 7, 2009 at 12:44 PM, Richard Fateman<fateman at cs.berkeley.edu> wrote:
> ...Somewhere there should be documentation about add, add*? add2?? etc.
> but the definitions can be found in the files....
The documentation for add, add2, add*, etc. is at the top of
mopers.lisp and opers.lisp, exactly where I put it 35 years ago. It
does assume you know about the general approach Maxima takes. The
short version is: unless you know what you're doing, always use add,
mul, etc. and never use add2, add*, etc.
There are three important cases of functions with operate on General
Representation:
1. Most of the 'mathematical' parts of Maxima assume that simp is
true, that their arguments are simplified, and that their return
values should be simplified. They should always use add, mul, etc.
and never use add* (which assumes unsimplified arguments) or add2
(does no harm to use this, but it is internal and is normally
generated by the macro add).
2. User functions (internally, their names start with a $) may return
unsimplified values, since the Maxima evaluator meval calls simplify
on these return values.
3. Simplifying functions (the OPERATORS property of a function symbol)
have special conventions. If the third argument (simpflag) is true
(non-nil) the first (main) argument is assumed to be simplified.
Otherwise it cannot be assumed to be simplified.
-s