Trigsimp problems



On 3/8/07, Chris Sangwin <sangwinc at for.mat.bham.ac.uk> wrote:

> (%i1) trigsimp(0);
> (%o1) 0
>
> (%i2) kill(allbut [functions]);
> (%o0) done
>
> (%i1) trigsimp(0);
> trigrule1 not found#0: trigsimp(x=0)
> (trgsmp.mac line 71) -- an error.
> To debug this try debugmode(true);

Chris, it looks like kill and trigsimp are working as intended.

trigsimp is an autoloading Maxima function. The first trigsimp(0)
causes Maxima to load trigsimp along with some other functions
and some rules. kill(all) kills the functions and the rules, so the
next time trigsimp is called, it is loaded again.
However kill(allbut(functions)) kills the rules but not the functions,
and since the rules do not have an autoload property, their absence
does not cause them to be reloaded (instead an error is triggered).

There should probably be a way to mark stuff as unkillable.
Stuff which is implemented by Maxima scripts but considered part
of the core functionality (e.g. trigsimp) could be marked like that.
Probably built-in Maxima script stuff should be excluded from
infolists (functions, values, rules, ...) as well -- save those for user stuff.

By the way I think kill(allbut(foo)) (with parentheses) is the intended
syntax, but it's likely kill won't notice if allbut is written w/ []'s instead.

HTH
Robert