mydefint2



On Mon, Mar 12, 2012 at 14:54, Edwin Woollett <woollett at charter.net> wrote:

> ...

load("unwind_protect.lisp")$
>
> simp_assuming(e, [fcts]) ::=
>  buildq([e,fcts], unwind_protect((apply(assume, fcts), expand(e,0,0)),
> apply(forget,fcts)))$
>

I'm guessing you copied this definition from the contrib package
abs_integrate.  Keep in mind that contrib packages are *not* necessarily
maintained by the Maxima developers, and are often inconsistent with core
Maxima.

In particular, there are two problems with this definition:

a) It is actually eval_assuming, not simp_assuming (remember that ::=
defines a macro).

b) It does *not* necessarily return you to the original state:

assume(x>0)$
facts() => [x>0]
block( assume(x>0), forget(x>0) )
facts() => []   <<< oops, deleted existing fact


A better definition would use the 'context' mechanism to do this cleanly.

            -s