another question about maxima and lisp



On 1/19/07, Raymond Toy <raymond.toy at ericsson.com> wrote:
>     sen1> I would still like to know where
>     sen1>   SIMP, MEXPT, MDEFINE
>     sen1>   etc are defined in the source files.

MDEFINE is the only one of these which is actually an executable
function.  I'd recommend you use etags with Emacs to find symbols in
the source easily, but... it is defined in mlisp.lisp.  All it really
does is set the function property of the relevant symbol, just like
Lisp's Defun.  It is a bit more complicated because it also handles
memoizing functions like f[i](x):=.... It has nothing to do with
*applying* the function.

MEXPT and SIMP are not defined in one place.  They are defined by
their behavior.  I suppose you could say that MEXPT is defined by
simpexpt (in simp.lisp), but there are many other functions that "know
about" MEXPT.  So, for example, log(x^2) simplifies to 2*log(x) in
simpln.

The SIMP flag is in some sense it is 'defined' by simplifya (also in
simp.lisp), in that most of the differences between expressions with
SIMP and those without are handled there.

In general, simplifying constructors (like MPLUS, MEXPT, etc.) are
mostly handled by the simplifying function found in their operators
property, which is invoked by simplifya.

              -s