>From: Stavros Macrakis
>Sent: Tuesday, March 13, 2012 5:27 PM
>
>To: Edwin Woollett
>Cc: maxima mailing list ; Barton Willis
>Subject: Re: [Maxima] 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
I thought I would chime in here because I have noticed this bug in
simp_assuming and don't use it in pw.mac anymore, which is my package. I
have another variation on it copied from pw.mac version 4 which fixes the
problem above. I don't know if it is perfect but it may solve this issue, I
think.
/* a variation of simp_assuming that fixes a minor bug. */
simp_given(e, [fcts]) ::=
buildq([e,fcts], block([_ans], unwind_protect((_ans:apply(assume, fcts),
expand(e,0,0)), apply(forget,_ans))));
Rich