Maxima error when having strings in terms



On 3/20/10, Oliver Kullmann <O.Kullmann at swansea.ac.uk> wrote:

> The testcase is("x">0) was just there for illustration, but the real
> problem is that if somewhere in your term there is a string, like
>
> is(g(f("x")) > 0);
> Maxima encountered a Lisp error:
>  "x" is not of type LIST.
>
> then you get an error, where g (and f) are declared as posfun.

OK, thanks for explaining; the example is("x" > 0) is really pretty
different from is(f("x") > 0). I'm pretty sure the latter should
be true (given declare(f, posfun)) for any argument (even a string).
In the presence of the posfun declaration, there's no need for "is"
to inspect the arguments; that's a bug.

It's also bug (a different bug) that is("x" > 0) triggers a Lisp error.
I think the correct output for that is false.
(Consider: is(%i > 0) => false.)

> For example the application mentions the "variable" "AIS".
> Out of that we want to make in a systematic (algorithmic) way
> some "propositional variable" (at object-level, not at meta-level),
> and using something like f("AIS") would have all the properties
> we wanted (where f is an unevaluated function declared as positive).

I guess I still don't see why you couldn't have a symbol 'AIS,
but that's beside the point; "is" should be fixed anyway.

best

Robert Dodier