Am Dienstag, den 20.04.2010, 13:42 -0500 schrieb Barton Willis:
> > You have to set the properties verb, alias, noun, rerversealias.
> > Furthermore, a verb function $sqrt and a simplifying function is needed,
> > which has to be put on the property list. The property list of the noun
> > and verb must look like (I have cut out some information which is not
> > needed for the most simple implementation):
>
> Oh, I think all I need is to define $spherical_harmonic as
>
> (defun $spherical_harmonic (...)
> (take '(%spherical_harmonic) ...)
I am not sure and I have not studied this point in detail, but it might
be possible, that we have code, which passes an unsimplified argument to
the verb function. Therefore, I have always used a call to simplify,
e.g. (simplify (list '(%spherical_harmonic) ... ). This call to the
simplifier does not assume that the argument is already simplified. (We
have the macro take* to do this call too.)
Perhaps, this is not true, but this point has to be investigated in more
detail.
Remark: A lot of simplifying functions do a resimplify of the argument.
This is not necessary. Therefore, I have removed the call of resimplify
for some special functions. But we have a lot of code, which uses this
resimplify still, e.g. the following code in mlips.lisp defines a lot of
verb functions which resimplify their arguments:
(defmfun |''MAKE-FUN| (noun-name x)
(simplifya (list (ncons noun-name) (resimplify x)) t))
(macrolet ((|''MAKE| (fun noun)
`(defmfun ,fun (x) (|''MAKE-FUN| ',noun x))))
(|''MAKE| $log %log)
(|''MAKE| $sin %sin) (|''MAKE| $cos %cos) (|''MAKE| $tan %tan)
(|''MAKE| $cot %cot) (|''MAKE| $sec %sec) (|''MAKE| $csc %csc)
(|''MAKE| $sinh %sinh) (|''MAKE| $cosh %cosh) (|''MAKE| $tanh %tanh)
(|''MAKE| $coth %coth) (|''MAKE| $sech %sech) (|''MAKE| $csch %csch)
(|''MAKE| $asin %asin) (|''MAKE| $acos %acos) (|''MAKE| $atan %atan)
(|''MAKE| $acot %acot) (|''MAKE| $asec %asec) (|''MAKE| $acsc %acsc)
(|''MAKE| $asinh %asinh) (|''MAKE| $acosh %acosh) (|''MAKE| $atanh %
atanh)
(|''MAKE| $acoth %acoth) (|''MAKE| $asech %asech) (|''MAKE| $acsch %
acsch)
(|''MAKE| $round %round) (|''MAKE| $truncate %truncate) (|''MAKE|
$plog %plog)
(|''MAKE| $signum %signum) (|''MAKE| $gamma %gamma))
Dieter Kaiser