The documentation for assume states that only certain expressions can
be put in the assume database:
The predicates <pred_1>, ..., <pred_n> can only be expressions
with the relational operators `< <= equal notequal >=' and `>'.
Predicates cannot be literal equality `=' or literal inequality
`#' expressions, nor can they be predicate functions such as
`integerp'.
however this is never checked.
assume(f(1,f(1)) -> lisp error
is(f(1,f(1)) -> lisp error
I propose we check if the argument to isp (in db.lisp) is something
that can be put into assume database:
(defmfun isp (pat)
(if (member (car pat) '(mlessp mleqp mgreaterp mgeqp $equal $notequal))
(cond ((truep pat))
((falsep pat) nil)
(t 'unknown))
'unknown))
With this change we get
(%i1) assume(f(1,f(1)));
(%o1) [meaningless]
(%i2) is(f(1,f(1)));
(%o2) unknown
BTW, this fixes the bug exposed with logic.mac
(http://www.math.utexas.edu/pipermail/maxima/2009/015307.html) which
is why I got interested.
Andrej